nnao (Thu, 02 Feb 2017 17:33:20 GMT):
Has joined the channel.

markparz (Thu, 02 Feb 2017 17:33:20 GMT):
Has joined the channel.

silliman (Thu, 02 Feb 2017 17:56:17 GMT):
Has joined the channel.

sstone1 (Thu, 02 Feb 2017 18:24:40 GMT):
Has joined the channel.

muralisr (Thu, 02 Feb 2017 18:33:53 GMT):
Has joined the channel.

Ratnakar (Thu, 02 Feb 2017 20:07:02 GMT):
Has joined the channel.

sbrakev (Thu, 02 Feb 2017 22:16:40 GMT):
Has joined the channel.

donjohnny (Thu, 02 Feb 2017 23:38:39 GMT):
Has joined the channel.

nickgaski (Thu, 02 Feb 2017 23:46:37 GMT):
Has joined the channel.

C0rWin (Fri, 03 Feb 2017 00:11:57 GMT):
Has joined the channel.

salmanbaset (Fri, 03 Feb 2017 01:20:14 GMT):
Has joined the channel.

JonathanTan (Fri, 03 Feb 2017 01:51:55 GMT):
Has joined the channel.

timblankers (Fri, 03 Feb 2017 02:43:38 GMT):
Has joined the channel.

rock_martin (Fri, 03 Feb 2017 05:29:01 GMT):
Has joined the channel.

grapebaba (Fri, 03 Feb 2017 06:30:46 GMT):
Has joined the channel.

frbrkoala (Fri, 03 Feb 2017 07:00:33 GMT):
Has joined the channel.

nvlasov (Fri, 03 Feb 2017 07:14:22 GMT):
Has joined the channel.

JonathanLevi (Fri, 03 Feb 2017 07:50:20 GMT):
Has joined the channel.

ryokawajp (Fri, 03 Feb 2017 07:50:48 GMT):
Has joined the channel.

jdockter (Fri, 03 Feb 2017 11:40:08 GMT):
Has joined the channel.

elisabetta (Fri, 03 Feb 2017 14:28:55 GMT):
Has joined the channel.

gormand (Fri, 03 Feb 2017 14:43:59 GMT):
Has joined the channel.

kletkeman (Fri, 03 Feb 2017 15:20:17 GMT):
Has joined the channel.

ssaddem (Fri, 03 Feb 2017 15:53:42 GMT):
Has joined the channel.

cdaughtr (Fri, 03 Feb 2017 16:25:02 GMT):
Has joined the channel.

rickr (Fri, 03 Feb 2017 17:32:40 GMT):
Has joined the channel.

jjjjibm (Fri, 03 Feb 2017 18:34:12 GMT):
Has joined the channel.

jjjjibm (Fri, 03 Feb 2017 18:34:31 GMT):
Hello. Looks like I made it to rocket chat

rickr (Fri, 03 Feb 2017 18:38:55 GMT):
blast off !!! :)

marcusvcs (Fri, 03 Feb 2017 18:48:24 GMT):
Has joined the channel.

fz (Fri, 03 Feb 2017 19:30:10 GMT):
Has joined the channel.

karkal (Fri, 03 Feb 2017 19:53:50 GMT):
Has joined the channel.

kletkeman (Fri, 03 Feb 2017 20:00:18 GMT):
I'm a rocket man ....

greg.haskins (Fri, 03 Feb 2017 20:34:09 GMT):
Has joined the channel.

arner (Fri, 03 Feb 2017 20:42:37 GMT):
Has joined the channel.

jimthematrix (Fri, 03 Feb 2017 21:26:23 GMT):
@rameshthoomu the node SDK CI is messed up, two things I noticed lately, 1) it's marked successful when `gulp` actually failed, 2) it runs maven build. see an example https://jenkins.hyperledger.org/job/fabric-sdk-node-verify-x86_64/399/console

rameshthoomu (Fri, 03 Feb 2017 21:26:23 GMT):
Has joined the channel.

zmanian (Fri, 03 Feb 2017 22:05:13 GMT):
Has joined the channel.

ericmvaughn (Fri, 03 Feb 2017 22:06:11 GMT):
Has joined the channel.

rameshthoomu (Sat, 04 Feb 2017 00:33:01 GMT):
@jimthematrix@gmail.com will check and let you know

rameshthoomu (Sat, 04 Feb 2017 03:26:11 GMT):
@jimthematrix@gmail.com issue is fixed.. Please check the build result here https://jenkins.hyperledger.org/job/fabric-sdk-node-verify-x86_64/403/

rameshthoomu (Sat, 04 Feb 2017 03:26:54 GMT):
irrespective of the build result, CI runs maven build to collect build artifacts..

yacovm (Sat, 04 Feb 2017 04:53:24 GMT):
Has joined the channel.

Saravana KumarMalaichami (Sat, 04 Feb 2017 08:56:36 GMT):
Has joined the channel.

bfuentes@fr.ibm.com (Sat, 04 Feb 2017 09:20:46 GMT):
Has joined the channel.

yury (Sat, 04 Feb 2017 11:45:45 GMT):
Has joined the channel.

jimthematrix (Sun, 05 Feb 2017 14:08:31 GMT):
thanks @rameshthoomu

schwentker2 (Sun, 05 Feb 2017 15:50:22 GMT):
Has joined the channel.

rickr (Sun, 05 Feb 2017 20:19:44 GMT):
Where is V6 branch ? Looking at github and gerrit I only see master and v1.0-alpha.

zmanian (Sun, 05 Feb 2017 20:25:19 GMT):
Of Fabric or the SDK?

zmanian (Sun, 05 Feb 2017 20:25:31 GMT):
the 0.6 tag is published to github

greg.haskins (Sun, 05 Feb 2017 20:25:48 GMT):
@rickr The SDK for v0.6 was in the fabric tree

greg.haskins (Sun, 05 Feb 2017 20:26:03 GMT):
So use the fabric v0.6 branch

yacovm (Sun, 05 Feb 2017 20:26:08 GMT):
https://github.com/hyperledger/fabric/tree/v0.6

rickr (Sun, 05 Feb 2017 20:27:40 GMT):
thx -- biased biased mindset from the java-sdk :)

rickr (Sun, 05 Feb 2017 20:27:40 GMT):
thx -- biased mindset from the java-sdk :)

Honglei (Sun, 05 Feb 2017 23:58:23 GMT):
Has joined the channel.

xixuejia (Mon, 06 Feb 2017 00:59:53 GMT):
Has joined the channel.

hanhzf (Mon, 06 Feb 2017 03:37:17 GMT):
Has joined the channel.

bryanhuang (Mon, 06 Feb 2017 04:36:48 GMT):
Has joined the channel.

Vadim (Mon, 06 Feb 2017 06:38:00 GMT):
Has joined the channel.

ibmamnt (Mon, 06 Feb 2017 07:49:57 GMT):
Has joined the channel.

pd93 (Mon, 06 Feb 2017 09:03:41 GMT):
Has joined the channel.

david.peyronnin (Mon, 06 Feb 2017 09:53:29 GMT):
Has joined the channel.

nhrishi (Mon, 06 Feb 2017 15:13:25 GMT):
Has joined the channel.

greg.haskins (Mon, 06 Feb 2017 16:00:01 GMT):
@jimthematrix switching conversation to here

greg.haskins (Mon, 06 Feb 2017 16:00:58 GMT):
One could probably reasonably argue that chaincodespec.path has little relevance outside of the SDK/CLI context either, because that path should be translated into a chaincodedeploymentspec.CodePackage in that context alone

greg.haskins (Mon, 06 Feb 2017 16:01:11 GMT):
so we should probably look at the appropriateness of that field in general

greg.haskins (Mon, 06 Feb 2017 16:01:22 GMT):
but that said, I am pretty sure that is whats happening

greg.haskins (Mon, 06 Feb 2017 16:02:07 GMT):
e.g. the code makes assumptions about the relationship between the chaincodespec.path and the chaincode name, but we didnt look at it as closely in the past when the dockerfile context was already formed

klorenz (Mon, 06 Feb 2017 16:06:51 GMT):
Has joined the channel.

rocket.chat (Mon, 06 Feb 2017 16:10:57 GMT):
Has joined the channel.

jyg (Mon, 06 Feb 2017 16:27:48 GMT):
Has joined the channel.

jyg (Mon, 06 Feb 2017 17:18:19 GMT):
The problem is not there with an older release of the fabric (I tried commit 425e8e7dfe557c4779c16602cc43b2f0e6aa8158 for example)

bmos299 (Mon, 06 Feb 2017 17:20:46 GMT):
FAB-2060. This one is needed to cut the Alpha release. I talked to Binh, and we want the Alpha to work with the gettingstarted in the docs, so please let us know what we would need to change externally (i.e. no more dockerfile, etc). Thanks, bmos299

bmos299 (Mon, 06 Feb 2017 17:20:53 GMT):
...I put this in the FAB issue as well.

jyg (Mon, 06 Feb 2017 17:34:36 GMT):
HEAD is now at 5d5f020... Merge "[FAB-678|1820] Support peer-side Dockerfile generation" is the fabric commit when this problem appears with the sdk when deploying a chaincode.

karan-bharadwaj (Mon, 06 Feb 2017 17:55:53 GMT):
Has joined the channel.

jimthematrix (Mon, 06 Feb 2017 17:56:49 GMT):
@greg.haskins based on your analysis above, the error seems to be from the logic in the peer/chaincode package, do I understand it right? and if so should I re-assign FAB-2060 to you?

greg.haskins (Mon, 06 Feb 2017 18:06:28 GMT):
@jimthematrix I havent looked at 2060 yet, but sure, assign it to me and it can always be reassigned if necessary

jimthematrix (Mon, 06 Feb 2017 18:08:44 GMT):
Greg I moved it to fabric-peer component and assigned to you, thanks

rjones (Mon, 06 Feb 2017 18:20:21 GMT):
Has joined the channel.

greg.haskins (Mon, 06 Feb 2017 18:21:55 GMT):
ty

avrahamleff (Mon, 06 Feb 2017 18:55:37 GMT):
Has joined the channel.

greg.haskins (Mon, 06 Feb 2017 19:19:55 GMT):
@jimthematrix looking at 2060 now

greg.haskins (Mon, 06 Feb 2017 19:20:08 GMT):
so, can you tell me what was running when that error came out?

greg.haskins (Mon, 06 Feb 2017 19:20:14 GMT):
or, how to reproduce in general

jtrayfield (Mon, 06 Feb 2017 19:20:22 GMT):
Has joined the channel.

sanchezl (Mon, 06 Feb 2017 19:20:27 GMT):
Has joined the channel.

greg.haskins (Mon, 06 Feb 2017 19:21:18 GMT):
i know the bug says "run end-to-end" but its not clear

greg.haskins (Mon, 06 Feb 2017 19:21:26 GMT):
a) which test/lineno in e2e is failing

greg.haskins (Mon, 06 Feb 2017 19:21:31 GMT):
b) how to run e2e

greg.haskins (Mon, 06 Feb 2017 19:21:45 GMT):
I know "npm test" will drive headless test

greg.haskins (Mon, 06 Feb 2017 19:21:57 GMT):
not sure on process for the others

yedendra (Mon, 06 Feb 2017 19:34:22 GMT):
Has joined the channel.

jimthematrix (Mon, 06 Feb 2017 20:10:34 GMT):
@greg.haskins you can run e2e independently using `node test/unit/end-to-end.js step1`, which only runs the first step to deploy the chaincode where this problem is demonstrated

greg.haskins (Mon, 06 Feb 2017 20:10:51 GMT):
ty

jimthematrix (Mon, 06 Feb 2017 20:10:56 GMT):
(sorry i didn't turn on audio notifications earlier)

weeds (Mon, 06 Feb 2017 20:28:21 GMT):
Has joined the channel.

greg.haskins (Mon, 06 Feb 2017 21:01:09 GMT):
@jimthematrix i think I see the issue

greg.haskins (Mon, 06 Feb 2017 21:02:36 GMT):
I think its this ccSpec

greg.haskins (Mon, 06 Feb 2017 21:02:37 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Chain.js#L891

greg.haskins (Mon, 06 Feb 2017 21:02:52 GMT):
it needs to have something like "chaincodePath: request.chaincodePath"

greg.haskins (Mon, 06 Feb 2017 21:03:54 GMT):
ill see if I can get the environment running to test that theory, but if you have the ability to quickly integrate that into your env, that should fix it

greg.haskins (Mon, 06 Feb 2017 21:04:32 GMT):
sorry, that should be a sub-element of chaincodeID i think

greg.haskins (Mon, 06 Feb 2017 21:04:52 GMT):
right next to name

greg.haskins (Mon, 06 Feb 2017 21:04:55 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Chain.js#L894

greg.haskins (Mon, 06 Feb 2017 21:05:40 GMT):
thats what tells the peer the name of the golang package that represents your chaincode

greg.haskins (Mon, 06 Feb 2017 21:21:11 GMT):
@jimthematrix can you try this: https://gerrit.hyperledger.org/r/#/c/5621/

greg.haskins (Mon, 06 Feb 2017 21:21:18 GMT):
@bmos299 ^^^

bmos299 (Mon, 06 Feb 2017 21:21:18 GMT):
Has joined the channel.

greg.haskins (Mon, 06 Feb 2017 21:21:29 GMT):
i have no way to run the e2e, it just falls on its face for me

greg.haskins (Mon, 06 Feb 2017 21:21:40 GMT):
but I am fairly certain that is the issue

rameshthoomu (Mon, 06 Feb 2017 21:22:45 GMT):
@greg.haskins Will run this and let you know the update

greg.haskins (Mon, 06 Feb 2017 21:22:48 GMT):
ty

mgutala (Mon, 06 Feb 2017 21:38:42 GMT):
Has joined the channel.

pmullaney (Tue, 07 Feb 2017 00:37:56 GMT):
Has joined the channel.

rameshthoomu (Tue, 07 Feb 2017 01:35:17 GMT):
Greg, ran end-to-end.js test and observed the same error.. ```

rameshthoomu (Tue, 07 Feb 2017 01:35:53 GMT):

Message Attachments

greg.haskins (Tue, 07 Feb 2017 01:57:01 GMT):
can someone help debug my e2e process?

greg.haskins (Tue, 07 Feb 2017 01:57:08 GMT):
mine just falls over coming out of the gate

greg.haskins (Tue, 07 Feb 2017 01:57:14 GMT):
i am not sure what i am doing wrong

greg.haskins (Tue, 07 Feb 2017 01:59:31 GMT):
```$ node test/unit/end-to-end.js step1 info: Returning a new winston logger with default configurations [2017-02-06 20:58:44.440] [DEBUG] E2E - [crypto_ecdsa_aes]: Hash algorithm: SHA2, hash output size: 256 info: [Chain.js]: Constructed Chain instance: name - testChain-e2e, securityEnabled: true, TCert download batch size: 10, network mode: true info: [Peer.js]: Peer.const - url: grpc://localhost:7051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Peer.js]: Peer.const - url: grpc://localhost:7056 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca [2017-02-06 20:58:44.524] [INFO] E2E - Found steps: step1 useSteps: true TAP version 13 # End-to-end flow of chaincode deploy, transaction invocation, and query [2017-02-06 20:58:44.533] [DEBUG] E2E - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-02-06 20:58:44.537] [DEBUG] E2E - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-02-06 20:58:44.546] [INFO] E2E - Executing step1 info: [Client.js]: Failed to load user "admin" from local key value store [2017-02-06 20:58:44.593] [DEBUG] E2E - [crypto_ecdsa_aes]: Hash algorithm: SHA2, hash output size: 256 [2017-02-06 20:58:44.594] [INFO] E2E - [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} [2017-02-06 20:58:44.662] [INFO] E2E - [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store /Users/ghaskins/.hfc-key-store [2017-02-06 20:58:44.672] [DEBUG] E2E - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-02-06 20:58:44.673] [DEBUG] E2E - [crypto_ecdsa_aes]: _getKeyValueStore returning kvs [2017-02-06 20:58:44.674] [DEBUG] E2E - [crypto_ecdsa_aes]: generateKey, store.setValue [2017-02-06 20:58:44.675] [DEBUG] E2E - [ecdsa/key.js]: ECDSA curve param X: 01e744c1e5ead00e98b74a798ce7af9ce3cfbc128fa9e3e68ecd278b8007a770 [2017-02-06 20:58:44.675] [DEBUG] E2E - [ecdsa/key.js]: ECDSA curve param Y: e17a2226347ddef4b33bb33d2ab6b7f3e5bd7ea509ec8531cceac857638beec1 [2017-02-06 20:58:44.683] [DEBUG] E2E - [FileKeyValueStore.js]: FileKeyValueStore -- setValue events.js:160 throw er; // Unhandled 'error' event ^ Error: {"created":"@1486432724.684911000","description":"Endpoint read failed","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1851,"grpc_status":14,"occurred_during_write":0,"referenced_errors":[{"created":"@1486432724.684909000","description":"TCP Read failed","file":"../src/core/lib/iomgr/tcp_uv.c","file_line":170}]} at ClientDuplexStream._emitStatusIfDone (/Users/ghaskins/sandbox/git/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19) at ClientDuplexStream._readsDone (/Users/ghaskins/sandbox/git/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/ghaskins/sandbox/git/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:242:12)```

greg.haskins (Tue, 07 Feb 2017 02:07:00 GMT):
am I expected to stand something up prior to running the test?

greg.haskins (Tue, 07 Feb 2017 02:07:18 GMT):
it seems to want to talk to peers on 70517056?

greg.haskins (Tue, 07 Feb 2017 02:08:29 GMT):
@rameshthoomu ^^^

greg.haskins (Tue, 07 Feb 2017 02:08:32 GMT):
any ideas?

rameshthoomu (Tue, 07 Feb 2017 02:10:02 GMT):
This is what I have followed 1) ran docker-compose from test/fixtures 2) npm install 3) node test/unit/end-to-end.js

rameshthoomu (Tue, 07 Feb 2017 02:10:02 GMT):
```deployImage -> ERRO 9e7 Image Output: ******************** Step 1/4 : FROM hyperledger/fabric-ccenv:x86_64-0.7.0 -snapshot-7b5c1b6 ---> 7dc0f14d50c8 Step 2/4 : WORKDIR $GOPATH ---> Using cache ---> eb44f110ad5c Step 3/4 : ADD codepackage.tgz $GOPATH ---> Using cache ---> 557cff1f326f Step 4/4 : RUN go install github.com/example_cc && mv $GOPATH/bin/example_cc $GOPATH/bin/end2end ---> Running in 4e04fd0b2cb1 can't load package: package github.com/example_cc: cannot find package "github.com/example_cc" in any of: /opt/go/src/github.com/example_cc (from $GOROOT) /opt/gopath/src/github.com/example_cc (from $GOPATH) ```

greg.haskins (Tue, 07 Feb 2017 02:10:24 GMT):
ok, cool, will try that

rameshthoomu (Tue, 07 Feb 2017 02:11:57 GMT):
I see `ca ` container is existing with latest commit docker image so I have used `ca commit# 6294c57`

rameshthoomu (Tue, 07 Feb 2017 02:11:57 GMT):
is it existing ?

greg.haskins (Tue, 07 Feb 2017 02:12:57 GMT):
will that matter

greg.haskins (Tue, 07 Feb 2017 02:12:58 GMT):
?

greg.haskins (Tue, 07 Feb 2017 02:13:06 GMT):
i was just going to use the ca I have built

greg.haskins (Tue, 07 Feb 2017 02:22:38 GMT):
unfortunately, i am out of time

greg.haskins (Tue, 07 Feb 2017 02:22:52 GMT):
I couldnt open the ccenv.txt you pasted above @rameshthoomu

greg.haskins (Tue, 07 Feb 2017 02:23:07 GMT):
but the problem is almost certainly related to the spec.ChaincodeID.Path parameter

rameshthoomu (Tue, 07 Feb 2017 02:23:14 GMT):
yes

greg.haskins (Tue, 07 Feb 2017 02:23:20 GMT):
maybe I didnt get it quite right in my patch, but that is probably very close to correct

greg.haskins (Tue, 07 Feb 2017 02:23:27 GMT):
slight variation of that will likely fix it

greg.haskins (Tue, 07 Feb 2017 02:24:22 GMT):
actually, maybe I know whats wrong

rameshthoomu (Tue, 07 Feb 2017 02:24:49 GMT):
```deployImage -> ERRO 9e7 Image Output: ******************** Step 1/4 : FROM hyperledger/fabric-ccenv:x86_64-0.7.0 -snapshot-7b5c1b6 ---> 7dc0f14d50c8 Step 2/4 : WORKDIR $GOPATH ---> Using cache ---> eb44f110ad5c Step 3/4 : ADD codepackage.tgz $GOPATH ---> Using cache ---> 557cff1f326f Step 4/4 : RUN go install github.com/example_cc && mv $GOPATH/bin/example_cc $GOPATH/bin/end2end ---> Running in 4e04fd0b2cb1 can't load package: package github.com/example_cc: cannot find package "github.com/example_cc" in any of: /opt/go/src/github.com/example_cc (from $GOROOT) /opt/gopath/src/github.com/example_cc (from $GOPATH) ```

greg.haskins (Tue, 07 Feb 2017 02:26:01 GMT):
nevermind, I checked it looks ok

greg.haskins (Tue, 07 Feb 2017 02:26:08 GMT):
(the thing I was thinking of i mean

greg.haskins (Tue, 07 Feb 2017 02:26:40 GMT):
ok, good, that means its working as I was thinking originally

greg.haskins (Tue, 07 Feb 2017 02:26:59 GMT):
so, its expecting to find the code under github.com/example_cc

greg.haskins (Tue, 07 Feb 2017 02:27:37 GMT):
in the tarball that the SDK uploads in cds.CodePackage, this means there needs to be chaincode under /src/github.com/example_cc

greg.haskins (Tue, 07 Feb 2017 02:27:42 GMT):
can you confirm that is indeed the case?

greg.haskins (Tue, 07 Feb 2017 02:28:39 GMT):
thats what needs to be fixed, I would guess

greg.haskins (Tue, 07 Feb 2017 02:28:56 GMT):
unforunately i am traveling for work early in the AM, so I cant stay up late nor look at it tomorrow

greg.haskins (Tue, 07 Feb 2017 02:29:03 GMT):
it will be wed at the earliest I can look

greg.haskins (Tue, 07 Feb 2017 02:29:11 GMT):
but I think that is the problem area to focus on

rameshthoomu (Tue, 07 Feb 2017 02:29:24 GMT):
I did this ``` volumes: - /var/run/:/host/var/run/ - ./src/github.com/example_cc:/opt/gopath/src/github.com/example_cc ``` in peer container

greg.haskins (Tue, 07 Feb 2017 02:29:50 GMT):
is the code there?

greg.haskins (Tue, 07 Feb 2017 02:30:08 GMT):
im not sure what you mean by "in the peer container"

rameshthoomu (Tue, 07 Feb 2017 02:30:42 GMT):
you mean chaincode ? yes

greg.haskins (Tue, 07 Feb 2017 02:30:46 GMT):
yes

greg.haskins (Tue, 07 Feb 2017 02:30:58 GMT):
the SDK should be packaging up /src/github.com/example_cc

greg.haskins (Tue, 07 Feb 2017 02:31:16 GMT):
because its telling me the package name is "github.com/example_cc" in the path

rameshthoomu (Tue, 07 Feb 2017 02:31:20 GMT):
yes.. I just tried one option..

greg.haskins (Tue, 07 Feb 2017 02:31:50 GMT):
my guess is, the SDK is forming the tarball in a way that varies from how the peer expects it

rameshthoomu (Tue, 07 Feb 2017 02:32:48 GMT):
agree

greg.haskins (Tue, 07 Feb 2017 02:33:48 GMT):
ok, heres the hint

greg.haskins (Tue, 07 Feb 2017 02:33:50 GMT):
https://gerrit.hyperledger.org/r/#/c/5427/3/test/unit/end-to-end.js

greg.haskins (Tue, 07 Feb 2017 02:34:07 GMT):
`COPY . $GOPATH/src/build-chaincode`

greg.haskins (Tue, 07 Feb 2017 02:34:43 GMT):
this means the tarball engine is flattening things under ./

greg.haskins (Tue, 07 Feb 2017 02:35:08 GMT):
let me check one other thing

greg.haskins (Tue, 07 Feb 2017 02:35:39 GMT):
yes, ok, what I said earlier stands

greg.haskins (Tue, 07 Feb 2017 02:35:58 GMT):
the peer expects the clients to submit a $GOPATH relative tree

greg.haskins (Tue, 07 Feb 2017 02:36:05 GMT):
this means ./src/pkgname

greg.haskins (Tue, 07 Feb 2017 02:36:56 GMT):
so, I think if the current code were to be modified, have it shift from ./ to ./src/$pkgname and then send me $pkgname in the ChaincodeID.Path

greg.haskins (Tue, 07 Feb 2017 02:37:01 GMT):
and then it will work, I believe

greg.haskins (Tue, 07 Feb 2017 02:37:31 GMT):
this didnt matter before because the SDK was constructing its own Dockerfile

greg.haskins (Tue, 07 Feb 2017 02:37:42 GMT):
so it only needed to conform to its own standard

greg.haskins (Tue, 07 Feb 2017 02:38:12 GMT):
should be an easy fix to @jimthematrix and company

greg.haskins (Tue, 07 Feb 2017 02:38:18 GMT):
but unfortunately, i have to run

binhn (Tue, 07 Feb 2017 02:38:53 GMT):
Has joined the channel.

rameshthoomu (Tue, 07 Feb 2017 02:39:43 GMT):
thanks greg. Will check this and let you know the update

binhn (Tue, 07 Feb 2017 02:39:51 GMT):
not sure if this one contributes to this issue https://gerrit.hyperledger.org/r/#/c/5613/ -- should we merge it?

greg.haskins (Tue, 07 Feb 2017 02:40:22 GMT):
@binhn no, that should have no impact

binhn (Tue, 07 Feb 2017 02:40:45 GMT):
ok, thanks

greg.haskins (Tue, 07 Feb 2017 02:41:15 GMT):
what happened, essentially, is there was no test coverage between fabric "make unit-tests", sdk "npm test", or CI that covered how the SDK generates tarballs

greg.haskins (Tue, 07 Feb 2017 02:41:50 GMT):
if there were, we would have seen that the SDK was breaking after CR 4943

greg.haskins (Tue, 07 Feb 2017 02:41:57 GMT):
but alas, this is the fallout

greg.haskins (Tue, 07 Feb 2017 02:42:04 GMT):
i think its a simple fix

greg.haskins (Tue, 07 Feb 2017 02:42:21 GMT):
This is one part of it: https://gerrit.hyperledger.org/r/#/c/5621/

greg.haskins (Tue, 07 Feb 2017 02:42:54 GMT):
the other is that the SDK needs to formulate the tarball it stuffs into cds.CodePackage such that it may be expanded under $GOPATH and do the right thing

greg.haskins (Tue, 07 Feb 2017 02:43:03 GMT):
meaning prefixed with ./src

greg.haskins (Tue, 07 Feb 2017 02:43:10 GMT):
and then path/to/package

greg.haskins (Tue, 07 Feb 2017 02:43:26 GMT):
where ChaincodeID.Path is also "path/to/package"

greg.haskins (Tue, 07 Feb 2017 02:43:30 GMT):
then it will also align

greg.haskins (Tue, 07 Feb 2017 02:44:07 GMT):
@binhn will need 5613 to fix FAB-678 fully though

greg.haskins (Tue, 07 Feb 2017 02:44:16 GMT):
but nothing to do with the SDK breakage

binhn (Tue, 07 Feb 2017 02:45:13 GMT):
I've just +2d it, will ping another maintainer to merge it. Thanks

greg.haskins (Tue, 07 Feb 2017 02:45:35 GMT):
ty

greg.haskins (Tue, 07 Feb 2017 02:45:48 GMT):
this is the relevant code in play that the SDK needs to conform to: https://github.com/hyperledger/fabric/blob/2f801c72ae74f1f9accba184b7ebca35c09f5e35/core/chaincode/platforms/golang/platform.go#L151

greg.haskins (Tue, 07 Feb 2017 02:46:06 GMT):
codepackage.tgz is what the SDK uploads

jimthematrix (Tue, 07 Feb 2017 03:13:08 GMT):
@greg.haskins thanks I'll give 5621 a try now

siddhid (Tue, 07 Feb 2017 05:00:16 GMT):
Has joined the channel.

jimthematrix (Tue, 07 Feb 2017 06:49:01 GMT):
just uploaded a patch that produces the 'src/' directory structure, plus tests

jimthematrix (Tue, 07 Feb 2017 06:49:01 GMT):
@greg.haskins just uploaded a patch that produces the 'src/' directory structure, plus tests

jimthematrix (Tue, 07 Feb 2017 06:50:22 GMT):
haven't tested it with the latest fabric, if you can try it that'd be great, otherwise I can do it tomorrow

mbaizan (Tue, 07 Feb 2017 07:45:06 GMT):
Has joined the channel.

gatakka (Tue, 07 Feb 2017 09:29:08 GMT):
Has joined the channel.

gvlax (Tue, 07 Feb 2017 11:02:01 GMT):
Has joined the channel.

ikruiper (Tue, 07 Feb 2017 14:34:22 GMT):
Has joined the channel.

skbodwell (Tue, 07 Feb 2017 14:44:55 GMT):
Has joined the channel.

jimthematrix (Tue, 07 Feb 2017 14:49:28 GMT):
@greg.haskins @rameshthoomu @Ratnakar https://gerrit.hyperledger.org/r/#/c/5621/ has been tested and verified with latest fabric pulled last night, I just pinged on #fabric-pr-review for review and merge

rameshthoomu (Tue, 07 Feb 2017 14:54:05 GMT):
thanks @jimthematrix @greg.haskins : It's working for me too

ardashev120101 (Tue, 07 Feb 2017 14:59:47 GMT):
Has joined the channel.

Ratnakar (Tue, 07 Feb 2017 15:08:31 GMT):
@jimthematrix @rameshthoomu has verified the patch for balance-transfer example aswell , all good :) , once this change is merged I shall upload the changes for `https://jira.hyperledger.org/browse/FAB-2065`

MartinMateev (Tue, 07 Feb 2017 15:10:59 GMT):
Has joined the channel.

cbf (Tue, 07 Feb 2017 15:15:20 GMT):
Has joined the channel.

mihaig (Tue, 07 Feb 2017 15:18:42 GMT):
Has joined the channel.

sukrit.handa@gmail.com (Tue, 07 Feb 2017 15:57:41 GMT):
Has joined the channel.

umasuthan (Tue, 07 Feb 2017 16:04:47 GMT):
Has joined the channel.

harrijk (Tue, 07 Feb 2017 16:05:29 GMT):
Has joined the channel.

bretharrison (Tue, 07 Feb 2017 16:11:12 GMT):
Has joined the channel.

robear (Tue, 07 Feb 2017 16:32:30 GMT):
Has joined the channel.

jworthington (Tue, 07 Feb 2017 16:45:44 GMT):
Has joined the channel.

randomnerd (Tue, 07 Feb 2017 17:07:24 GMT):
Has joined the channel.

beauson45 (Tue, 07 Feb 2017 20:59:51 GMT):
Has joined the channel.

rahulhegde (Tue, 07 Feb 2017 21:03:45 GMT):
Has joined the channel.

rahulhegde (Tue, 07 Feb 2017 21:06:13 GMT):
Can someone pass me the nodeJS-fabric SDK API documentation link for v1.0 arch?

randomnerd (Tue, 07 Feb 2017 21:44:57 GMT):
@rahulhegde it doesnt exist afaik :S

randomnerd (Tue, 07 Feb 2017 21:45:35 GMT):
did you guys just discuss how deploying chaincode is missing stuff?

randomnerd (Tue, 07 Feb 2017 21:46:34 GMT):
someone enlightened me that if you put the github.com/... into the vendor subdir of your chaincode directory, it happens to work

randomnerd (Tue, 07 Feb 2017 21:46:34 GMT):
someone enlightened me that if you put the `github.com/...` into the vendor subdir of your chaincode directory, it happens to work

jimthematrix (Tue, 07 Feb 2017 21:50:00 GMT):
@randomnerd if your chaincode.go code has external dependencies, they do need to be added to the "vendor" sub-folder, that's always the case and still required now

randomnerd (Tue, 07 Feb 2017 21:51:06 GMT):
@jimthematrix the unexpected thing is that you also have to put the fabric git repo there too

randomnerd (Tue, 07 Feb 2017 21:52:11 GMT):
or you get this

randomnerd (Tue, 07 Feb 2017 21:52:19 GMT):

Message Attachments

jimthematrix (Tue, 07 Feb 2017 21:56:16 GMT):
@randomnerd right, in fact just the shim package but there's probably not a good way to get just the shim package right now

randomnerd (Tue, 07 Feb 2017 21:58:30 GMT):
it took me a couple of hours to figure that out, i guess it should be pointed out at the docs

randomnerd (Tue, 07 Feb 2017 21:59:56 GMT):
not to say we're missing the docs alot though :)

mgk (Tue, 07 Feb 2017 22:07:19 GMT):
Has joined the channel.

patchpon (Wed, 08 Feb 2017 01:16:42 GMT):
Has joined the channel.

yp (Wed, 08 Feb 2017 02:52:24 GMT):
Has joined the channel.

oiakovlev (Wed, 08 Feb 2017 09:05:43 GMT):
Has joined the channel.

14gracel (Wed, 08 Feb 2017 09:57:48 GMT):
Has joined the channel.

pd93 (Wed, 08 Feb 2017 11:33:39 GMT):
I'm getting `Error: ENOENT: no such file or directory, scandir 'undefined/src///home/vcap/app/chaincode'` when trying to deploy my chaincode. Is this a known error? Not sure where the `undefined/src//` bit is coming from

randomnerd (Wed, 08 Feb 2017 11:56:17 GMT):
@pd93 i guess you don't have GOPATH environment variable set

randomnerd (Wed, 08 Feb 2017 11:56:57 GMT):
it builds chaincode path of $GOPATH/src/(whatever you set in chaincodePath variable)

pd93 (Wed, 08 Feb 2017 11:57:46 GMT):
This is being deployed on Bluemix though. So I have no way of changing the GOPath :/ which I would assume is set correctly?

randomnerd (Wed, 08 Feb 2017 11:58:56 GMT):
undefined is not correctly set :)

pd93 (Wed, 08 Feb 2017 12:00:12 GMT):
I still have no way of setting it though

pd93 (Wed, 08 Feb 2017 12:00:28 GMT):
Why on earth would Bluemix not have a GoPath set D:

randomnerd (Wed, 08 Feb 2017 12:01:15 GMT):
do you run the script on bluemix or do you run the script on local computer while script deploys to bluemix?

randomnerd (Wed, 08 Feb 2017 12:01:35 GMT):
on the second case, GOPATH should be set on *your* computer

pd93 (Wed, 08 Feb 2017 12:01:35 GMT):
Everything gets sent to bluemix and runs there.

pd93 (Wed, 08 Feb 2017 12:01:47 GMT):
Go path is definitely set on my computer

randomnerd (Wed, 08 Feb 2017 12:02:01 GMT):
run `echo $GOPATH` ?

pd93 (Wed, 08 Feb 2017 12:02:03 GMT):
But that shouldn't make a difference anyway. Both the node app and blockchain are on bluemix

randomnerd (Wed, 08 Feb 2017 12:02:20 GMT):
oh. i dont have any experience with bluemix, sorry

randomnerd (Wed, 08 Feb 2017 12:02:49 GMT):
but im pretty sure GOPATH is the key to your problem

randomnerd (Wed, 08 Feb 2017 12:03:09 GMT):
and also that path you set in you node app is wrong

randomnerd (Wed, 08 Feb 2017 12:03:09 GMT):
and also that path you set in your node app is wrong

randomnerd (Wed, 08 Feb 2017 12:03:36 GMT):
it should be relative to $GOPATH/src as i mentioned before

pd93 (Wed, 08 Feb 2017 12:04:39 GMT):
Ah okI thought putting something like `github.com/user/repo` would deploy it from the public repo?

pd93 (Wed, 08 Feb 2017 12:04:39 GMT):
Ah ok. I thought putting something like `github.com/user/repo` would deploy it from the public repo?

randomnerd (Wed, 08 Feb 2017 12:05:04 GMT):
nope

randomnerd (Wed, 08 Feb 2017 12:05:21 GMT):
what it does is concatenating strings

randomnerd (Wed, 08 Feb 2017 12:05:29 GMT):
no way it will go and clone a git repo for you

randomnerd (Wed, 08 Feb 2017 12:05:33 GMT):
sadly :)

greg.haskins (Wed, 08 Feb 2017 12:50:31 GMT):
@jimthematrix @rameshthoomu back from my trip: is everything sorted out with the tarball issue?

jimthematrix (Wed, 08 Feb 2017 12:51:21 GMT):
hi Greg, we are good for Golang chaincode

greg.haskins (Wed, 08 Feb 2017 12:51:37 GMT):
@jimthematrix awesome, thanks. Sorry for the drama

jimthematrix (Wed, 08 Feb 2017 12:51:39 GMT):
https://gerrit.hyperledger.org/r/#/c/5621/ was merged yesterday

jimthematrix (Wed, 08 Feb 2017 12:52:07 GMT):
thank you for the investigation, I just finished what you started ;-)

greg.haskins (Wed, 08 Feb 2017 12:52:54 GMT):
nice, i like the solution

greg.haskins (Wed, 08 Feb 2017 12:53:15 GMT):
you also fixed the "/tmp/deploy.tgz" thing that was there that was just asking for a collision

greg.haskins (Wed, 08 Feb 2017 12:53:18 GMT):
very nice

greg.haskins (Wed, 08 Feb 2017 12:54:21 GMT):
I was thinking about how things work on my trip and realized I should probably add a JIRA/fix for the peer to ensure clients dont slip things like $GOPATH/pkg or $GOPATH/bin into the tarball

greg.haskins (Wed, 08 Feb 2017 12:54:28 GMT):
seems like an attack surface

greg.haskins (Wed, 08 Feb 2017 12:54:53 GMT):
not sure if it could be exploited, but its also simple to block

greg.haskins (Wed, 08 Feb 2017 12:55:09 GMT):
(this would be at the peer side, not SDK)

greg.haskins (Wed, 08 Feb 2017 13:02:33 GMT):
https://jira.hyperledger.org/browse/FAB-2122

jadhavajay (Wed, 08 Feb 2017 13:18:00 GMT):
Has joined the channel.

pmcosta1 (Wed, 08 Feb 2017 14:21:42 GMT):
Has joined the channel.

divyank (Wed, 08 Feb 2017 14:50:38 GMT):
Has joined the channel.

OlufAndrews (Wed, 08 Feb 2017 15:18:42 GMT):
Has joined the channel.

yuki-kon (Wed, 08 Feb 2017 16:32:26 GMT):
Has joined the channel.

tzipih0 (Wed, 08 Feb 2017 16:49:44 GMT):
Has joined the channel.

sk.karl (Wed, 08 Feb 2017 17:04:51 GMT):
Has joined the channel.

balakrishna.devasani (Wed, 08 Feb 2017 17:11:18 GMT):
Has joined the channel.

jimthematrix (Wed, 08 Feb 2017 18:35:29 GMT):
@bretharrison https://gerrit.hyperledger.org/r/#/c/5721/ was merged, thanks for keeping us caught up with the fabric changes

rameshthoomu (Wed, 08 Feb 2017 19:13:33 GMT):
@jimthematrix Observed end-to-end test failed on latest commits.. Could you please check this https://jenkins.hyperledger.org/view/FIT/job/FIT-node-x86_64/92/consoleText

jimthematrix (Wed, 08 Feb 2017 19:16:48 GMT):
i literally just git pulled fabric and fabric-ca, build docker and ran e2e

jimthematrix (Wed, 08 Feb 2017 19:17:32 GMT):
@rameshthoomu can you try the build again? not sure what i need to do to reproduce the error

rameshthoomu (Wed, 08 Feb 2017 19:17:54 GMT):
yes running again.. will let you know in few mins

jimthematrix (Wed, 08 Feb 2017 19:18:08 GMT):
thanks!

rameshthoomu (Wed, 08 Feb 2017 19:24:32 GMT):
@jimthematrix it's working now on the latest commit# 5e43972

rameshthoomu (Wed, 08 Feb 2017 19:24:38 GMT):
thanks

lee_merrill (Wed, 08 Feb 2017 21:53:16 GMT):
Has joined the channel.

vijayr24 (Wed, 08 Feb 2017 22:08:58 GMT):
Has joined the channel.

warong (Thu, 09 Feb 2017 02:50:57 GMT):
Has joined the channel.

siddhid (Thu, 09 Feb 2017 05:32:19 GMT):
Hi All, we can specify a relaxed endorsement policy for a chaincode. so from the below mentioned link I got how to specify endorsement policy for a chaincode from command prompt at the time of deploy. I want to know how to specify the endorsement policy from node js application. Link https://github.com/hyperledger/fabric/blob/master/docs/endorsement-policies.md Thanks

karthikworks (Thu, 09 Feb 2017 08:09:08 GMT):
Has joined the channel.

Vadim (Thu, 09 Feb 2017 09:06:38 GMT):
Hi @siddhid, this is a good question. I've looked in the code of sdk client and found this: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Chain.js#L911 . If you read the code, there is nothing that seems to be setting the endrorsement policies. I would expected to see it in the line https://github.com/hyperledger/fabric/blob/master/protos/utils/proputils.go#L468 as an input argument. So my conclusion is that it's not implemented yet.

Vadim (Thu, 09 Feb 2017 09:06:38 GMT):
Hi @siddhid, this is a good question. I've looked in the code of sdk client and found this: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Chain.js#L911 . If you read the code, there is nothing that seems to be setting the endrorsement policies. I would expected to see it in the line https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Chain.js#L918 as an input argument. So my conclusion is that it's not implemented yet.

Vadim (Thu, 09 Feb 2017 09:10:54 GMT):
Here (https://github.com/hyperledger/fabric/blob/master/protos/utils/proputils.go#L468) is where the policy gets set in the fabric when you invoke it over command line

Vadim (Thu, 09 Feb 2017 09:10:54 GMT):
Here (https://github.com/hyperledger/fabric/blob/master/protos/utils/proputils.go#L468) is where the policy gets set in the fabric peer when you invoke it over command line

Vadim (Thu, 09 Feb 2017 09:10:54 GMT):
Here (https://github.com/hyperledger/fabric/blob/master/protos/utils/proputils.go#L468) is where the policy gets set in the fabric peer when you deploy the chaincode over the command line

Vadim (Thu, 09 Feb 2017 09:15:45 GMT):
btw you can apparently also upgrade the existing chaincodes, but this is not yet supported with node sdk neither

randomnerd (Thu, 09 Feb 2017 09:43:27 GMT):
hi there

randomnerd (Thu, 09 Feb 2017 09:43:46 GMT):
i have a silly question, what exactly does `chain.setInvokeWaitTime(10);` do?

randomnerd (Thu, 09 Feb 2017 09:44:19 GMT):
does it mean that there is actually no events in invoke process and it just waits and then checks for results?

randomnerd (Thu, 09 Feb 2017 09:44:19 GMT):
does it mean that there are actually no events in invoke process and it just waits and then checks for results?

siddhid (Thu, 09 Feb 2017 10:52:56 GMT):
Hi @Vadim any idea when it will be implemented? and if this feature is currently under development ?

Vadim (Thu, 09 Feb 2017 10:53:52 GMT):
I unfortunately don't know, I'm not a part of a development team. But you can search in their Jira, I suppose there should be a ticket for that

Vadim (Thu, 09 Feb 2017 11:00:00 GMT):
@siddhid btw did you figure out where the principal identity mentioned in the endorsement policy comes from?

siddhid (Thu, 09 Feb 2017 11:14:50 GMT):
@Vadim nope yet to figure it out

pd93 (Thu, 09 Feb 2017 12:51:41 GMT):
Does anyone know if there is there any support for promises in the fabric-sdk? .. or do I have to use nested callback functions? :/

Vadim (Thu, 09 Feb 2017 12:58:52 GMT):
I'm using v1 and it has promises

dongming (Thu, 09 Feb 2017 14:36:10 GMT):
Has joined the channel.

greg.haskins (Thu, 09 Feb 2017 14:38:47 GMT):
@jimthematrix struggling to get the latest SDK working, probably some simple user-error related to changes I am not aware of

greg.haskins (Thu, 09 Feb 2017 14:38:58 GMT):
```$ node client.js deploy -p ../../app/build/org.hyperledger.chaincode.example02-0.1-SNAPSHOT.car info: Returning a new winston logger with default configurations module.js:471 throw err; ^ Error: Cannot find module './api.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/Users/ghaskins/sandbox/git/chaintool.orig/examples/example02/client/nodejs/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:19:11) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)```

greg.haskins (Thu, 09 Feb 2017 14:39:08 GMT):
does that look familar?

greg.haskins (Thu, 09 Feb 2017 14:40:25 GMT):
I am doing this still:

greg.haskins (Thu, 09 Feb 2017 14:40:30 GMT):
```$ git grep FabricCA client.js:var CA = require('fabric-ca-client/lib/FabricCAClientImpl.js');```

greg.haskins (Thu, 09 Feb 2017 14:40:44 GMT):
should that just be "require(fabric-ca-client)" now?

jimthematrix (Thu, 09 Feb 2017 14:46:50 GMT):
@greg.haskins you need to run `gulp watch`

greg.haskins (Thu, 09 Feb 2017 14:46:52 GMT):
hmm, i dont even see the CA in the e2e any more

greg.haskins (Thu, 09 Feb 2017 14:47:34 GMT):
@jimthematrix this is an app that is consuming the sdk outside of the tree

jimthematrix (Thu, 09 Feb 2017 14:48:00 GMT):
I planned to update the `gulp ca` task to have it update the node_modules/fabric-ca-client as `gulp watch` does

greg.haskins (Thu, 09 Feb 2017 14:48:01 GMT):
what I have done historically is I run "npm install path/to/sdk/fabric-client" and fabric-ca-client

greg.haskins (Thu, 09 Feb 2017 14:48:21 GMT):
wouldnt gulp-watch only impact the node_modules within the sdk tree itself?

jimthematrix (Thu, 09 Feb 2017 14:48:53 GMT):
if you are installing an app outside of the project tree, it's best to use the published packages `fabric-client` and `fabric-ca-client`

greg.haskins (Thu, 09 Feb 2017 14:49:04 GMT):
understood, but I cant ;)

greg.haskins (Thu, 09 Feb 2017 14:49:07 GMT):
im patching the sdk

jimthematrix (Thu, 09 Feb 2017 14:49:22 GMT):
if you install from the folder, then fabric-ca-client does not have the necessary dependencies that get copied by `gulp watch`

greg.haskins (Thu, 09 Feb 2017 14:49:35 GMT):
this is w.r.t. $ git grep FabricCA client.js:var CA = require('fabric-ca-client/lib/FabricCAClientImpl.js');

greg.haskins (Thu, 09 Feb 2017 14:49:39 GMT):
opps

greg.haskins (Thu, 09 Feb 2017 14:49:42 GMT):
wrong paste

greg.haskins (Thu, 09 Feb 2017 14:49:48 GMT):
https://gerrit.hyperledger.org/r/#/c/5429/

greg.haskins (Thu, 09 Feb 2017 14:49:48 GMT):
This is w.r.t. https://gerrit.hyperledger.org/r/#/c/5429/

greg.haskins (Thu, 09 Feb 2017 14:50:27 GMT):
ok, but this has worked until today IIUC

greg.haskins (Thu, 09 Feb 2017 14:50:32 GMT):
did something change recently?

greg.haskins (Thu, 09 Feb 2017 14:50:41 GMT):
this is how I developed the other patches and it always worked

greg.haskins (Thu, 09 Feb 2017 14:51:08 GMT):
if run gulp-watch and then install to my external project, will it pick up the right stuff?

jimthematrix (Thu, 09 Feb 2017 14:52:18 GMT):
not sure what change may have caused that, but you can definitely keep `gulp watch` running and then `npm install path/to/fabric-ca-client`

greg.haskins (Thu, 09 Feb 2017 14:52:33 GMT):
ah, yes this worked!

greg.haskins (Thu, 09 Feb 2017 14:52:35 GMT):
thx

greg.haskins (Thu, 09 Feb 2017 14:52:43 GMT):
maybe I had it running before and didnt realize

jimthematrix (Thu, 09 Feb 2017 14:52:45 GMT):
key is to keep `gulp watch` running ;-)

greg.haskins (Thu, 09 Feb 2017 14:52:47 GMT):
in any case, working now

greg.haskins (Thu, 09 Feb 2017 14:52:51 GMT):
yeah, i can see that ;)

greg.haskins (Thu, 09 Feb 2017 14:52:58 GMT):
ty

jimthematrix (Thu, 09 Feb 2017 14:53:02 GMT):
yw

greg.haskins (Thu, 09 Feb 2017 14:53:32 GMT):
I do look forward to when I can just reference npm packages with my patches though ;)

greg.haskins (Thu, 09 Feb 2017 14:53:36 GMT):
will make life easier, heh

wrabadi_ibm (Thu, 09 Feb 2017 15:03:25 GMT):
Has joined the channel.

enidz (Thu, 09 Feb 2017 16:12:25 GMT):
Has joined the channel.

enidz (Thu, 09 Feb 2017 16:15:53 GMT):
Hi I tried to run the example from this doc : http://hyperledger-fabric.readthedocs.io/en/v0.6/nodeSDK/sample-standalone-app/ but I fail at the very beginning ``` zhasni@9360 /opt/gopath/src/github.com/hyperledger/fabric/build/bin [v0.6 *] ± % ./membersrvc 17:05:37.240 [ca] NewCA -> CRIT 001 unable to open database file panic: unable to open database file goroutine 1 [running]: panic(0xa27e00, 0xc8202104d0) /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6 github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc820161920, 0xc8202103e0, 0x1, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xc8 github.com/hyperledger/fabric/membersrvc/ca.NewCA(0xc2eba0, 0x3, 0xd72a00, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/membersrvc/ca/ca.go:248 +0x63c github.com/hyperledger/fabric/membersrvc/ca.NewACA(0xc820161aa0) /opt/gopath/src/github.com/hyperledger/fabric/membersrvc/ca/aca.go:225 +0x3c main.main() /opt/gopath/src/github.com/hyperledger/fabric/membersrvc/server.go:73 +0x6d1 ``` what is this database file ? I'm on V0.6 branch (v0.6.2 images) thx !

jimthematrix (Thu, 09 Feb 2017 16:27:55 GMT):
@enidz it's been a while since I touched v0.6 last (been focusing on v1.0 as you know), but this is referring to the database file used by the membersrvc. @smithbk would know better what might be the reasons for the error

smithbk (Thu, 09 Feb 2017 16:27:55 GMT):
Has joined the channel.

enidz (Thu, 09 Feb 2017 16:39:11 GMT):
OK thx I was previously on v0.6.0.preview... and deploying my own blockchain it's been a while since I do not follow the DOC...

greg.haskins (Thu, 09 Feb 2017 16:40:01 GMT):
@jimthematrix @pmullaney regarding the eventhub access via the SDK

greg.haskins (Thu, 09 Feb 2017 16:40:29 GMT):
the example has the registration performed after the proposal response is forwarded to the orderer

greg.haskins (Thu, 09 Feb 2017 16:40:37 GMT):
I wrote my code similarly, but I am not getting the event

greg.haskins (Thu, 09 Feb 2017 16:40:50 GMT):
so my first question is: is that the correct sequence?

greg.haskins (Thu, 09 Feb 2017 16:40:57 GMT):
and if so, any good way to debug?

greg.haskins (Thu, 09 Feb 2017 16:41:32 GMT):
(I would generally have expected to need to complete the registration before the transaction was submitted

smithbk (Thu, 09 Feb 2017 16:55:45 GMT):
@enidz Has been a while for me also, but is it possible that you don't have write access to the /var/hyperledger/production directory?

smithbk (Thu, 09 Feb 2017 16:56:17 GMT):
It tries to create a file to store the DB in under the ".membersrvc" subdirectory of that folder

enidz (Thu, 09 Feb 2017 16:59:35 GMT):
ok thx it could be that indeed... I check that ^^

pmullaney (Thu, 09 Feb 2017 17:26:11 GMT):
@greg.haskins : thats not the right sequence

enidz (Thu, 09 Feb 2017 17:26:26 GMT):
@smithbk you nailed it ! thank you !

greg.haskins (Thu, 09 Feb 2017 17:26:38 GMT):
so I register before I even send the proposal to the endorsers?

greg.haskins (Thu, 09 Feb 2017 17:26:45 GMT):
or in between

pmullaney (Thu, 09 Feb 2017 17:26:59 GMT):
oh you said orderer above

pmullaney (Thu, 09 Feb 2017 17:27:17 GMT):
there are no endorser events

greg.haskins (Thu, 09 Feb 2017 17:27:37 GMT):
``` // send proposal to endorser return chain.sendDeploymentProposal(request) .then((response) => { utils.processProposalResponse(chain, response); }) .then(utils.wait(eventhub, request.txId, 20000)); ```

greg.haskins (Thu, 09 Feb 2017 17:27:46 GMT):
I am doing the register in that "utils.wait()" function

pmullaney (Thu, 09 Feb 2017 17:27:47 GMT):
that should be a normal request response

greg.haskins (Thu, 09 Feb 2017 17:28:16 GMT):
do I want to do it before the sendDeploymentProposal or before the processProposalResponse?

pmullaney (Thu, 09 Feb 2017 17:29:47 GMT):
I think you want to do it after the processProposalResponse but before the sendTransaction(to orderer)

pmullaney (Thu, 09 Feb 2017 17:30:11 GMT):
the sendTransaction should trigger it

greg.haskins (Thu, 09 Feb 2017 17:30:14 GMT):
thats where I do the sendTransaction, sorry

greg.haskins (Thu, 09 Feb 2017 17:30:30 GMT):
so it needs to be between sendDeployment and sendTransaction, it sounds like

pmullaney (Thu, 09 Feb 2017 17:30:38 GMT):
check this out, might help https://gerrit.hyperledger.org/r/#/c/4799/

pmullaney (Thu, 09 Feb 2017 17:31:33 GMT):
I am hoping the promise returned by sendTransaction eventually pulls this logic inside

jimthematrix (Thu, 09 Feb 2017 17:33:24 GMT):
@greg.haskins the latest end-to-end.js code has the right sequence, registers listener by txId before sendTransaction(), @pmullaney's PR above has the same design but code is organized a bit differently

jimthematrix (Thu, 09 Feb 2017 17:34:07 GMT):
and like Pat said, goal is for this to be also supported via the returned promise from sendTransaction() call

rahulhegde (Thu, 09 Feb 2017 17:36:04 GMT):
v1.0 - Do we have the proto definition of the event'ed out structure (Rejected, Accepted or Custom Chaincode Event) that will come to the nodeJS application (Block Listener)

rahulhegde (Thu, 09 Feb 2017 17:36:49 GMT):
Is it events.proto file?

rahulhegde (Thu, 09 Feb 2017 17:38:37 GMT):
@greg.haskins even the SFHackfest Images + nodeJS application works perfectly fine and is good reference too.

marcusvcs (Thu, 09 Feb 2017 20:20:19 GMT):
Hi, i am doing a simple test, sending a lot of invoke requests via hfc library for node and it seems that the requests are being send in packs of six at time. Is this a configuration that I can overwrite? I would like to try to break things :)

varadatibm (Thu, 09 Feb 2017 21:27:11 GMT):
Has joined the channel.

greg.haskins (Thu, 09 Feb 2017 22:10:28 GMT):
@jimthematrix something else I am struggling with here is getting a consistent build within vagrant

greg.haskins (Thu, 09 Feb 2017 22:10:36 GMT):
```npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17 npm ERR! Linux 4.4.0-59-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v6.7.0 npm ERR! npm v3.10.3 npm ERR! path /local-dev/git/fabric-sdk-node/node_modules/grpc/node_modules/node-pre-gyp/node_modules/mkdirp/bin/cmd.js npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall chmod npm ERR! enoent ENOENT: no such file or directory, chmod '/local-dev/git/fabric-sdk-node/node_modules/grpc/node_modules/node-pre-gyp/node_modules/mkdirp/bin/cmd.js' npm ERR! enoent ENOENT: no such file or directory, chmod '/local-dev/git/fabric-sdk-node/node_modules/grpc/node_modules/node-pre-gyp/node_modules/mkdirp/bin/cmd.js' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! /local-dev/git/fabric-sdk-node/npm-debug.log```

greg.haskins (Thu, 09 Feb 2017 22:10:43 GMT):
does this look familar?

greg.haskins (Thu, 09 Feb 2017 22:11:02 GMT):
this is with a clean checkout of HEAD, and "npm install" from the root

greg.haskins (Thu, 09 Feb 2017 22:11:16 GMT):
(which, at least as one point, was the instructions in the SDK)

jimthematrix (Thu, 09 Feb 2017 22:12:36 GMT):
i haven't tried with vagrant, but from the messages if could be due to node.js engine version, which grpc is sensitive to

greg.haskins (Thu, 09 Feb 2017 22:12:45 GMT):
my motivation to run within vagrant is so I can fire up the test/fixtures and then run e2e

greg.haskins (Thu, 09 Feb 2017 22:12:57 GMT):
what version do you use?

jimthematrix (Thu, 09 Feb 2017 22:13:05 GMT):
i would first try upgrading to 6.9.0 (which is what i use)

greg.haskins (Thu, 09 Feb 2017 22:13:07 GMT):
i know theres at least v6.9 out in the v6.x series

greg.haskins (Thu, 09 Feb 2017 22:13:09 GMT):
ok

greg.haskins (Thu, 09 Feb 2017 22:29:41 GMT):
didnt help :(

greg.haskins (Thu, 09 Feb 2017 22:30:03 GMT):
same basic problem, let me try copying the sdk src out of the shared volume

greg.haskins (Thu, 09 Feb 2017 22:30:09 GMT):
i know that was a problem at one point

greg.haskins (Thu, 09 Feb 2017 22:34:49 GMT):
that was it

greg.haskins (Thu, 09 Feb 2017 22:35:03 GMT):
trying to "npm install" the SDK from a vagrant shared fs fails

greg.haskins (Thu, 09 Feb 2017 22:35:18 GMT):
I seem to recall this was a problem in the past, so its probably just always been like that

greg.haskins (Thu, 09 Feb 2017 22:35:31 GMT):
(to be clear, I dont think it has anything to do with sdk)

greg.haskins (Thu, 09 Feb 2017 22:35:58 GMT):
it seems to be bad interactions between some of the transitive deps + npm + vboxfs

greg.haskins (Thu, 09 Feb 2017 22:36:16 GMT):
but FYI in case someone else encounters

malik-altaf (Thu, 09 Feb 2017 23:52:08 GMT):
Has joined the channel.

jimthematrix (Fri, 10 Feb 2017 00:41:06 GMT):
interesting, i haven't tried that myself but wouldn't predict that shared volume would fail the npm install. thanks for the information, will definitely keep this in mind

kenzhang (Fri, 10 Feb 2017 01:11:11 GMT):
Has joined the channel.

greg.haskins (Fri, 10 Feb 2017 03:12:25 GMT):
i think there is some problem with how npm works with things that need to compile to $arch binaries

greg.haskins (Fri, 10 Feb 2017 03:12:41 GMT):
not sure what, but it seems to get unexpected responses from the fs

greg.haskins (Fri, 10 Feb 2017 03:13:08 GMT):
(like chmod not behaving as it expects)

siddhid (Fri, 10 Feb 2017 04:20:46 GMT):
Hi Guys In fabric 1.0 we can create multiple channels. But wanted to know if there is a way where we create a dedicated channel between 2 peers, such that the third peer is prevented from joining the channel? Thanks

theathibm (Fri, 10 Feb 2017 04:47:03 GMT):
Has joined the channel.

yacovm (Fri, 10 Feb 2017 07:19:31 GMT):
Put them in their own organization, @siddhid

siddhid (Fri, 10 Feb 2017 08:26:20 GMT):
@yacovm dint get what you meant by own organization

yacovm (Fri, 10 Feb 2017 08:52:08 GMT):
a peer can be in an organization

yacovm (Fri, 10 Feb 2017 08:52:31 GMT):
and channel membership is based on organizations

siddhid (Fri, 10 Feb 2017 09:08:24 GMT):
@yacovm and these organization accesses we specify in policy right?

yacovm (Fri, 10 Feb 2017 09:14:24 GMT):
yes.

yacovm (Fri, 10 Feb 2017 09:14:31 GMT):
ask in #fabric-crypto

subbu165 (Fri, 10 Feb 2017 11:18:43 GMT):
Has joined the channel.

seanbarclay (Fri, 10 Feb 2017 11:58:05 GMT):
Has joined the channel.

theathibm (Fri, 10 Feb 2017 12:11:25 GMT):
anyone using eclipse to debug chaincode in V1.0 using peer-chaincodedev?

theathibm (Fri, 10 Feb 2017 12:12:19 GMT):
having issues doing invoke via invoke.js with SDK

Basug (Fri, 10 Feb 2017 13:10:28 GMT):
Has joined the channel.

Basug (Fri, 10 Feb 2017 13:13:06 GMT):
is there a way to query all transactions for a given key ?

Basug (Fri, 10 Feb 2017 13:13:29 GMT):
with the example in getting started - lets say all transactions that changed state of 'A'

marcusvcs (Fri, 10 Feb 2017 13:18:53 GMT):
forget my earlier question, it was the browser who is limiting the requests

arner (Fri, 10 Feb 2017 17:48:18 GMT):
Hi all, is there any documentation or an example application available for the v1 client sdk's? Thanks!

jimthematrix (Fri, 10 Feb 2017 18:17:54 GMT):
@arner for node.js SDK: https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer, also the end-to-end.js in the test/unit folder

jimthematrix (Fri, 10 Feb 2017 18:18:27 GMT):
for java SDK, check out https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdk/End2endIT.java

arner (Fri, 10 Feb 2017 18:19:34 GMT):
Great, thanks a lot. We're using it in the Dutch Blockchain Hackathon, very cool to experiment with v1 :)

arner (Fri, 10 Feb 2017 18:45:36 GMT):
Are attributes working already?

jimthematrix (Fri, 10 Feb 2017 19:23:23 GMT):
@arner TCerts support are still being worked on

jimthematrix (Fri, 10 Feb 2017 19:23:23 GMT):
@arner TCerts support are still being worked on (assuming you are referring to tcert attributes)

arner (Fri, 10 Feb 2017 19:25:18 GMT):
Yes I am, thanks for the info. Enrollment and registration is working fine? Thanks for all the hard work by the way.

arner (Fri, 10 Feb 2017 23:20:36 GMT):
For the record, registration is not implemented. https://jira.hyperledger.org/browse/FAB-1239

jimthematrix (Sat, 11 Feb 2017 05:01:55 GMT):
@arner you are correct, registration implementation was started by @mastersingh24 but it couldn't be fully implemented until the fabric-ca's digital signature verification has been updated to assume signatures with malleability resistance (registration requests must be signed)

mastersingh24 (Sat, 11 Feb 2017 05:01:55 GMT):
Has joined the channel.

jimthematrix (Sat, 11 Feb 2017 05:34:25 GMT):
@rameshthoomu when you get a minute, can you please update the verification CI job to run `gulp test-headless` instead of `node test/unit/headless-test.js`? this is because I'm starting to write new headless tests in individual modules instead of continuing to grow the already lengthy headless-tests.js.

jimthematrix (Sat, 11 Feb 2017 05:34:52 GMT):
I just uploaded https://gerrit.hyperledger.org/r/#/c/5883/ that has all the new headless tests in a separate module test/unit/msp-tests.js

jimthematrix (Sat, 11 Feb 2017 05:34:54 GMT):
thanks

rameshthoomu (Sat, 11 Feb 2017 05:38:35 GMT):
Ok so you want me to replace existing command with gulp test-headless?

rjones (Sat, 11 Feb 2017 05:57:45 GMT):
@jimthematrix you can check out the ci-management repo and propose the changes as well

rjones (Sat, 11 Feb 2017 05:58:34 GMT):
Look in /jjb/ and grep -R node-sdk

mastersingh24 (Sat, 11 Feb 2017 09:33:31 GMT):
@arner - I think we can do registration properly now. it does work if you disable authentication (solely for testing). I plan to work on it this weekend

seand20tech (Sun, 12 Feb 2017 15:59:53 GMT):
Has joined the channel.

jimthematrix (Sun, 12 Feb 2017 20:05:38 GMT):
@rameshthoomu yes please, replace existing command with gulp test-headless. the gulp task already has istanbul configured. to keep the cobertura integration you may need to modify the gulp task in build/tasks/test.js

seand20tech (Sun, 12 Feb 2017 21:58:31 GMT):
i'm trying to run the code in examples/balance-transfer and running into some problems. when i execute deploy.js, the command appears to execute successfully, but hangs after printing "Successfully sent deployment transaction to the orderer."

seand20tech (Sun, 12 Feb 2017 21:58:45 GMT):
if i run invoke.js, it fails with the error "Error: failed to obtain cds for mycc - transaction not found mycc/myc1"

seand20tech (Sun, 12 Feb 2017 21:59:00 GMT):
i don't see any errors in the peer or orderer logs. any advice on now to debug?

seand20tech (Sun, 12 Feb 2017 21:59:00 GMT):
i don't see any errors in the peer or orderer logs. any advice on how to debug?

seand20tech (Sun, 12 Feb 2017 22:44:37 GMT):
also -- i'm running code off of master (both on fabric and fabric-sdk-node)

yacovm (Sun, 12 Feb 2017 22:45:45 GMT):
hmm

yacovm (Sun, 12 Feb 2017 22:46:22 GMT):
I think I've seen the cds thing before- it usually says the peer hasn't joined the channel

yacovm (Sun, 12 Feb 2017 22:46:22 GMT):
I think I've seen the cds thing before- it usually means the peer hasn't joined the channel

yacovm (Sun, 12 Feb 2017 22:46:28 GMT):
@seand20tech

muralisr (Mon, 13 Feb 2017 00:32:09 GMT):
@seand20tech are you in the latest master ?

seand20tech (Mon, 13 Feb 2017 00:37:58 GMT):
@muralisr -- yes, master as of this afternoon

seand20tech (Mon, 13 Feb 2017 00:38:15 GMT):
i can pull again

muralisr (Mon, 13 Feb 2017 00:40:02 GMT):
well, that won;t help. You'd have to wait a bit for node code to make use of a "remote install" in the fabric to send the chaincode over to the peer (the previous "deploy" will not do the trick entirely)

muralisr (Mon, 13 Feb 2017 00:40:33 GMT):
the support for that was added today and hopefully will be in SDK shortly

muralisr (Mon, 13 Feb 2017 00:40:47 GMT):
how are you running the peer ?

seand20tech (Mon, 13 Feb 2017 00:41:25 GMT):
in a docker-compose rig with a solo orderer

muralisr (Mon, 13 Feb 2017 00:41:43 GMT):
if you need it urgently I can help you setup so you can continue with the invoke etc

seand20tech (Mon, 13 Feb 2017 00:42:11 GMT):
i did modify Chain.js and chaincode.proto so that it sends over a version number

muralisr (Mon, 13 Feb 2017 00:42:23 GMT):
ok

muralisr (Mon, 13 Feb 2017 00:42:30 GMT):
but that's not going to be enough

muralisr (Mon, 13 Feb 2017 00:42:45 GMT):
you'll have to do a manual install (for now) of the chaincode on the peer

muralisr (Mon, 13 Feb 2017 00:42:51 GMT):
and then do the deploy etc

seand20tech (Mon, 13 Feb 2017 00:42:59 GMT):
ah

seand20tech (Mon, 13 Feb 2017 00:43:37 GMT):
is there a rough timeframe on when this will make its way into sdk? i'd hate to waste time debugging something that is going to be fixed

muralisr (Mon, 13 Feb 2017 00:44:05 GMT):
I do not know but if I'd guess within 1 or 2 days

seand20tech (Mon, 13 Feb 2017 00:44:50 GMT):
ok -- i can wait. thanks for the info

muralisr (Mon, 13 Feb 2017 00:44:54 GMT):
fyi https://gerrit.hyperledger.org/r/#/c/5899 is the CR that needs to go in before it is fixed

muralisr (Mon, 13 Feb 2017 00:46:05 GMT):
SDK would use the same mechanism that the CLI uses in the CR to do the remote install... hopefully will not be too disruptive to the SDK users

sachikoy (Mon, 13 Feb 2017 11:36:45 GMT):
Has joined the channel.

zwsyjj (Mon, 13 Feb 2017 13:00:14 GMT):
Has joined the channel.

ssaddem (Mon, 13 Feb 2017 15:52:55 GMT):
hi i try to invoke query with nodejs but i have this error

ssaddem (Mon, 13 Feb 2017 15:52:55 GMT):
msg: 'Error: signature does not verify' }

ssaddem (Mon, 13 Feb 2017 15:53:02 GMT):
can you help me plz ?

ssaddem (Mon, 13 Feb 2017 16:45:35 GMT):
@all can in one help me plz

jimthematrix (Mon, 13 Feb 2017 16:52:10 GMT):
@ssaddem can you provide more context? v0.6 or master? how are you running the fabric and fabric-ca? was this happening when you run end-to-end.js?

ssaddem (Mon, 13 Feb 2017 16:53:30 GMT):
firs thank you for your resp

ssaddem (Mon, 13 Feb 2017 16:53:57 GMT):
i m in v0.6 i try to invoke query() on deployed chain code

ssaddem (Mon, 13 Feb 2017 16:54:38 GMT):
error on invoke: {"error":{"code":2,"metadata":{"_internal_repr":{}}},"msg":"Error: signature does not verify"}

kletkeman (Mon, 13 Feb 2017 16:55:47 GMT):
@muralisr I will be porting our contract platform and our dynamic UI with monitoring and chaincode commands to v1 starting in the next day or two. This issue with the SDK not deploying seems like something that predated REST and POSTMAN deploys from github. Are you saying that the SDK does not know how to do a remote deploy and that we need to copy our code into the fabric and build it ourselves to do said deploy? I was hoping to spin up the latest peer and cop code for this round of testing and not run in debug mode as much as before (assuming that still works).

muralisr (Mon, 13 Feb 2017 16:58:51 GMT):
@kletkeman `Are you saying that the SDK does not know how to do a remote deploy and that we need to copy our code into the fabric and build it ourselves to do said deploy` - there's a CR https://gerrit.hyperledger.org/r/#/c/5899 that has support for remote installs and a ref. implementation in the CLI

kletkeman (Mon, 13 Feb 2017 17:13:28 GMT):
Ok, so we use the CLI for now and not the SDK, correct?

kletkeman (Mon, 13 Feb 2017 17:13:28 GMT):
Ok, so we use the CLI for now and not the SDK, correct? @muralisr

jimthematrix (Mon, 13 Feb 2017 17:39:28 GMT):
@ssaddem if you can paste the peer logs around that error that'd help us determine the cause. it's been a while since I touched v0.6 so nothing jumps out in my mind as to what could be causing that error

tzipih0 (Mon, 13 Feb 2017 21:45:35 GMT):
Hi, I tried to run the sample-standalone-app

tzipih0 (Mon, 13 Feb 2017 21:45:57 GMT):
I tried to follow the instructions under the docs folder

tzipih0 (Mon, 13 Feb 2017 21:46:07 GMT):
the instructions seem to be incorrect

tzipih0 (Mon, 13 Feb 2017 21:46:26 GMT):
written probably for the previous version of the sdk

tzipih0 (Mon, 13 Feb 2017 21:46:37 GMT):
also the app.js does not work with the current sdk version

muralisr (Mon, 13 Feb 2017 21:46:51 GMT):
@kletkeman for a shortwhile I hope

muralisr (Mon, 13 Feb 2017 21:46:59 GMT):
and just for installing

muralisr (Mon, 13 Feb 2017 21:47:13 GMT):
but hopefully you can go back to SDK soon

tzipih0 (Mon, 13 Feb 2017 21:48:15 GMT):
Can anyone suggest when will an updated example of a stand-alone-app will be available?

s.narayanan (Mon, 13 Feb 2017 23:57:58 GMT):
Has joined the channel.

rjones (Mon, 13 Feb 2017 23:59:13 GMT):
Has left the channel.

ibmamnt (Tue, 14 Feb 2017 06:51:29 GMT):
I check the status of this CR is DONE.

ibmamnt (Tue, 14 Feb 2017 06:51:31 GMT):
https://jira.hyperledger.org/browse/FAB-1993

ibmamnt (Tue, 14 Feb 2017 06:52:08 GMT):
However, I still see the error like: ```[2017-02-14 15:49:35.446] [INFO] QUERY - Executing Query error: [Chain.js]: Failed Proposal. Error: TypeError: Cannot read property 'toArray' of null```

ibmamnt (Tue, 14 Feb 2017 06:52:30 GMT):
I'm using fabric-client /fabric-ca-client v0.1.3

qb (Tue, 14 Feb 2017 07:04:40 GMT):
Has joined the channel.

ibmamnt (Tue, 14 Feb 2017 07:14:43 GMT):
By the way, it works on both Ubuntu 14.04 and 16.04, but does not work on Mac OS El Capitan and Windows 7.

clydedacruz (Tue, 14 Feb 2017 08:17:50 GMT):
Has joined the channel.

mne (Tue, 14 Feb 2017 11:16:05 GMT):
Has joined the channel.

dsanchezseco (Tue, 14 Feb 2017 11:16:23 GMT):
Has joined the channel.

isramos (Tue, 14 Feb 2017 16:49:02 GMT):
Has joined the channel.

kamo (Tue, 14 Feb 2017 17:28:00 GMT):
Has joined the channel.

kamo (Tue, 14 Feb 2017 18:08:13 GMT):
Does anybody know, how to request the affiliation string of a specific user out of the membersrvc ?

isramos (Tue, 14 Feb 2017 20:45:07 GMT):
How do I get the hashCode back as the result of deploying "chaincodeID" = "mycc"? I suspect I could add a printf around line 96 of deploy.js (part of hackfest demo). Ideas?

isramos (Tue, 14 Feb 2017 20:47:58 GMT):

Message Attachments

suryalanka (Tue, 14 Feb 2017 21:12:38 GMT):
Has joined the channel.

jimthematrix (Tue, 14 Feb 2017 22:01:17 GMT):
@bretharrison do you know the answer to the question from @isramos above?

ibmamnt (Wed, 15 Feb 2017 00:40:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uaA9MoiArLweR2Pop) The problem is resolved, I need to copy ~/hfc-key-store to Mac as well.

chrism28 (Wed, 15 Feb 2017 05:06:18 GMT):
Has joined the channel.

chrism28 (Wed, 15 Feb 2017 06:48:44 GMT):
Hi there How can you view your chaincode compile errors? I'm following the fabric v1.0 getting started guide here: https://hyperledger-fabric.readthedocs.io/en/latest/gettingstarted/ If I edit the supplied example_cc.go and introduce a syntax error in the code and then try to deploy, I receive some errors like: error: [Peer.js]: GRPC client got an error response from the peer. Error: Failed to deploy chaincode spec(Error creating image: %!s()) How can I see the real golang error? (In fabric 0.6 I could see the golang errors on the peer's console) Thanks in advance.

Vadim (Wed, 15 Feb 2017 07:52:01 GMT):
@chrism28 I see the errors in the peer log. Also, you can just `cd` to your chaincode dir and then do `go build`

DannyWong (Wed, 15 Feb 2017 09:29:37 GMT):
Has joined the channel.

pospi (Wed, 15 Feb 2017 09:50:52 GMT):
Has joined the channel.

pospi (Wed, 15 Feb 2017 09:53:17 GMT):
Hi all, I am having a problem with `hfc` 0.6.5 enrolling users in the membersrvc. I get the `[MemberServicesImpl.enroll] [Contact ECA]` console output, but the following line `self.ecapClient.createCertificatePair` never seems to complete the callback and I never get any response. Any thoughts? thanks

pospi (Wed, 15 Feb 2017 09:54:44 GMT):
(upgrading to Fabric 1.0 is not an option at this point as we have quite some migration work to do before getting there)

levinkwong (Wed, 15 Feb 2017 10:14:38 GMT):
Has joined the channel.

aliblackwell (Wed, 15 Feb 2017 10:32:20 GMT):
Has joined the channel.

greg.haskins (Wed, 15 Feb 2017 14:25:52 GMT):
@chrism28 build-time failures should be reported as [ERROR] level debug entries coming from "dockercontroller" in the peer log

greg.haskins (Wed, 15 Feb 2017 14:26:11 GMT):
that said, that error message looks like it has a bug in it

greg.haskins (Wed, 15 Feb 2017 14:26:24 GMT):
the "%!s"

greg.haskins (Wed, 15 Feb 2017 14:26:37 GMT):
can you file a JIRA for that?

chrism28 (Wed, 15 Feb 2017 21:02:41 GMT):
@Vadim Thanks for the response. I'm really sorry for the noob question but where would I find the peer log? I am running on Ubuntu (desktop) with 6+ docker containers. I can't see any relevant log files in any of the 3 peer docker containers. There are some log-like files in the cli container but they weren't helpful. Also - from which container do I perform a go build? Do I need to install go on my Ubuntu desktop? Are there any instructions for this - because it surely must require the shim stuff to compile? Or can I do this from within one of the docker containers?

chrism28 (Thu, 16 Feb 2017 01:47:13 GMT):
@greg.haskins Thanks for the response. I've created JIRA FAB-2260

chrism28 (Thu, 16 Feb 2017 03:57:43 GMT):
Does anyone know what may be causing the following error? Error getting endorser client chaincode: PEER_CONNECTIONERROR - Error trying to connect to local peer: grpc: timed out when dialing I'm following the instructions in fabric 1.0 Getting Started and attempting to deploy the example chaincode from within the CLI docker container. The deploy command is: CORE_PEER_ADDRESS=peer0:8051 CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:8050 peer chaincode deploy -C myc1 -n mycc -p github.com/hyperledger/fabric/examples -c '{"Args":["init","a","100","b","200"]}' - and I receive the above error. (The chaincode deploys fine using Node SDK from the ubuntu host)

chrism28 (Thu, 16 Feb 2017 03:57:43 GMT):
Does anyone know what may be causing the following error? Error getting endorser client chaincode: PEER_CONNECTIONERROR - Error trying to connect to local peer: grpc: timed out when dialing I'm following the instructions in fabric 1.0 Getting Started and attempting to deploy the example chaincode from within the CLI docker container. The deploy command is: CORE_PEER_ADDRESS=peer0:7051 CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050 peer chaincode deploy -C myc1 -n mycc -p github.com/hyperledger/fabric/examples -c '{"Args":["init","a","100","b","200"]}' - and I receive the above error. (The chaincode deploys fine using Node SDK from the ubuntu host)

chrism28 (Thu, 16 Feb 2017 04:23:21 GMT):
A bit more information on the above error... If I use ip addresses the timeout error goes away and I get a new error: Error: Error endorsing chaincode: rpc error: code = 2 desc = Failed to deserialize creator identity, err MSP DEFAULT is unknown Does anyone know what causes this 2nd error? The new deploy command is: CORE_PEER_ADDRESS=172.19.0.3:7051 CORE_PEER_COMMITTER_LEDGER_ORDERER=172.19.0.2:7050 peer chaincode deploy -C myc1 -n cli1 -p github.com/hyperledger/fabric/examples -c '{"Args":["init","a","100","b","200"]}'

wutongtree (Thu, 16 Feb 2017 10:07:07 GMT):
Has joined the channel.

fabianpo (Thu, 16 Feb 2017 12:16:22 GMT):
Has joined the channel.

jimthematrix (Thu, 16 Feb 2017 15:38:36 GMT):
@cdaughtr @bretharrison note that this one just got merged, I don't think it should break the SDK (the backend assumes the "payload_visibility" field will always have the "nil" value) but if you ever see errors related to this field in proposal submission, it might be related to this: https://gerrit.hyperledger.org/r/#/c/6087/

jimthematrix (Thu, 16 Feb 2017 16:03:46 GMT):
@chrism28 there could be a few possible reasons for the "MSP DEFAULT is unknown" error, what level of fabric and sdk are you running?

davidkel (Thu, 16 Feb 2017 16:07:28 GMT):
Has joined the channel.

pnovotny (Thu, 16 Feb 2017 18:02:41 GMT):
Has joined the channel.

chrism28 (Thu, 16 Feb 2017 19:11:27 GMT):
@jimthematrix Hi Jim. As I mentioned above I'm just following the fabric 1.0 Getting Started guide which installs a "standard" snapshot. It would appear that it installs the following: fabric-client@0.1.3 Fabric peer server version 0.7.0-snapshot-c7b3fe0 I decided to follow this guide because I thought it would be the most efficient way to get me up and running with fabric 1.0 - which appears to be a mistake. I suspect nobody here is using the same process and hence not experiencing these issues. I have 2500 lines of chaincode to migrate from fabric 0.6 to 1.0 on a system that won't even display the compilations errors. Maybe there's another channel I should be posting these questions to (because they are not really node-sdk related)

greg.haskins (Thu, 16 Feb 2017 20:00:21 GMT):
@chrism28 lets move over to #fabric

vpaprots (Thu, 16 Feb 2017 21:54:50 GMT):
Has joined the channel.

vpaprots (Thu, 16 Feb 2017 21:56:40 GMT):
just getting started compiling node sdk.. cloned latest onto my mac, `brew install node`, `npm install` according to the readme.. > hashtable@2.0.2 install /Users/vpapro/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/hashtable > node-gyp configure build CXX(target) Release/obj.target/native/src/hashtable.o In file included from ../src/hashtable.cpp:1: ../src/hashtable.h:7:10: fatal error: 'tr1/unordered_map' file not found #include

vpaprots (Thu, 16 Feb 2017 21:56:57 GMT):
any hints?

vpaprots (Thu, 16 Feb 2017 22:24:27 GMT):
`npm install` didnt like me because my node was too new.. `brew` installs node >7.0

harrijk (Thu, 16 Feb 2017 22:44:53 GMT):
@jimthematrix I pulled down the latest nodeSDK and installed it on a z Systems LInux instance. I received the following messages after the `npm install` completed from the fabric-sdk-node directory: ``` npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17 `` Since it's a warning, I'm not sure if we should be concerned that *fsevents* cannot be installed on z (and I assume p as well). Is *fsevents* used for performance purposes?

harrijk (Thu, 16 Feb 2017 22:44:53 GMT):
@jimthematrix I pulled down the latest nodeSDK and installed it on a z Systems LInux instance. I received the following messages after the `npm install` completed from the fabric-sdk-node directory: ``` npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17 ``` Since it's a warning, I'm not sure if we should be concerned that *fsevents* cannot be installed on z (and I assume p as well). Is *fsevents* used for performance purposes?

jimthematrix (Thu, 16 Feb 2017 23:50:25 GMT):
@harrijk fsevents is an indirect dependency so it's not easy to determine what it's used for (we could dig in the code in node_modules but it's difficult to determine what code path would hit it), you can try running the tests to see if anything would fail: ``` gulp test-headless ``` the headless tests is the easiest to run to get an initial sense of how things hold up in the new platform

jimthematrix (Thu, 16 Feb 2017 23:51:09 GMT):
then you can try the tests that require a target fabric (you can use test/fixtures/docker-compose.yaml to launch one): ``` gulp test ```

jimthematrix (Thu, 16 Feb 2017 23:51:21 GMT):
please do let us know how your tests runs go

jimthematrix (Thu, 16 Feb 2017 23:51:21 GMT):
please do let us know how your test runs go

greg.haskins (Fri, 17 Feb 2017 00:05:15 GMT):
@harrijk if it makes you feel any better, I see that on x86

greg.haskins (Fri, 17 Feb 2017 00:05:23 GMT):
so its not a P/Z thing per se

greg.haskins (Fri, 17 Feb 2017 00:05:39 GMT):
if I had to guess, im guessing its a OS thing

ylsGit (Fri, 17 Feb 2017 02:30:01 GMT):
Has joined the channel.

Jacco (Fri, 17 Feb 2017 06:48:05 GMT):
Has joined the channel.

Jacco (Fri, 17 Feb 2017 07:13:07 GMT):
I'm trying to work with TCerts and the nodejs sdk (in fabric v0.6). But I seem to have trouble saving- and retreiving the certificates from the key/value storage.. What is the best way to go on this? Right now I retreive the TCert using `user.getNextTCert(null,function (err,cert) { ...`, then I save the resulting TCert as a JSON string in the keyValueStore: ```var store = chain.getKeyValStore(); store.setValue("tcert",JSON.stringify(cert), function (err) {``` Then I later retreive this certificate, and convert it to an object (`store.getValue("tcert", function (err, value) {`, `var jsonCert = JSON.parse(value);`). Now I'm trying to figure out how to convert the JSON tring back to a valid TCert object. What I've tried is this: ```var tcert = new hfc.TCert(jsonCert.publicKey,jsonCert.privateKey);``` This seems to result in a new TCert object, but when I then try to use it, set is as _userCert_ value in the deploy request, I get the following error: ```TypeError: request.userCert.privateKey.getPrivate is not a function``` so there seems to be something wrong with the TCert object I created.. Is the process of storing it as JSON correct, or should I use a different method? (like use the `cert.encode()` method)

Jacco (Fri, 17 Feb 2017 07:13:07 GMT):
I'm trying to work with TCerts and the nodejs sdk (in fabric v0.6). But I seem to have trouble saving- and retreiving the certificates from the key/value storage.. What is the best way to go on this? Right now I retreive the TCert using `user.getNextTCert(null,function (err,cert) { ...`, then I save the resulting TCert as a JSON string in the keyValueStore: ```var store = chain.getKeyValStore(); store.setValue("tcert",JSON.stringify(cert), function (err) {...``` Then I later retreive this certificate, and convert it to an object (`store.getValue("tcert", function (err, value) {`, `var jsonCert = JSON.parse(value);`). Now I'm trying to figure out how to convert the JSON tring back to a valid TCert object. What I've tried is this: ```var tcert = new hfc.TCert(jsonCert.publicKey,jsonCert.privateKey);``` This seems to result in a new TCert object, but when I then try to use it, set is as _userCert_ value in the deploy request, I get the following error: ```TypeError: request.userCert.privateKey.getPrivate is not a function``` so there seems to be something wrong with the TCert object I created.. Is the process of storing it as JSON correct, or should I use a different method? (like use the `cert.encode()` method)

Jacco (Fri, 17 Feb 2017 07:13:07 GMT):
I'm trying to work with TCerts and the nodejs sdk (in fabric v0.6). But I seem to have trouble saving- and retreiving the certificates from the key/value storage.. What is the best way to go on this? Right now I retreive the TCert using `user.getNextTCert(null,function (err,cert) { ...`, then I save the resulting TCert as a JSON string in the keyValueStore: ```var store = chain.getKeyValStore(); store.setValue("tcert",JSON.stringify(cert), function (err) {...``` Then I later retreive this certificate, and convert it to an object (`store.getValue("tcert", function (err, value) {... ` and then `var jsonCert = JSON.parse(value);`). Now I'm trying to figure out how to convert the JSON tring back to a valid TCert object. What I've tried is this: ```var tcert = new hfc.TCert(jsonCert.publicKey,jsonCert.privateKey);``` This seems to result in a new TCert object, but when I then try to use it, set is as _userCert_ value in the deploy request, I get the following error: ```TypeError: request.userCert.privateKey.getPrivate is not a function``` so there seems to be something wrong with the TCert object I created.. Is the process of storing it as JSON correct, or should I use a different method? (like use the `cert.encode()` method)

Jacco (Fri, 17 Feb 2017 07:13:07 GMT):
I'm trying to work with TCerts and the nodejs sdk (in fabric v0.6). But I seem to have trouble saving- and retreiving the certificates from the key/value storage.. What is the best way to go on this? Right now I retreive the TCert using `user.getNextTCert(null,function (err,cert) { ...`, then I save the resulting TCert as a JSON string in the keyValueStore: ```var store = chain.getKeyValStore(); store.setValue("tcert",JSON.stringify(cert), function (err) {...``` Then I later retreive this certificate, and convert it to an object ( `store.getValue("tcert", function (err, value) {... `, `var jsonCert = JSON.parse(value);`). Now I'm trying to figure out how to convert the JSON tring back to a valid TCert object. What I've tried is this: ```var tcert = new hfc.TCert(jsonCert.publicKey,jsonCert.privateKey);``` This seems to result in a new TCert object, but when I then try to use it, set is as _userCert_ value in the deploy request, I get the following error: ```TypeError: request.userCert.privateKey.getPrivate is not a function``` so there seems to be something wrong with the TCert object I created.. Is the process of storing it as JSON correct, or should I use a different method? (like use the `cert.encode()` method)

Jacco (Fri, 17 Feb 2017 07:13:07 GMT):
I'm trying to work with TCerts and the nodejs sdk (in fabric v0.6). But I seem to have trouble saving- and retreiving the certificates from the key/value storage.. What is the best way to go on this? Right now I retreive the TCert using `user.getNextTCert(null,function (err,cert) { ...`, then I save the resulting TCert as a JSON string in the keyValueStore: ```var store = chain.getKeyValStore(); store.setValue("tcert",JSON.stringify(cert), function (err) {...``` Then I later retreive this certificate, and convert it to an object ( `store.getValue("tcert", function (err, value) {... `, `var jsonCert = JSON.parse(value);`). Now I'm trying to figure out how to convert the JSON tring back to a valid TCert object. What I've tried is this: ```var tcert = new hfc.TCert(jsonCert.publicKey,jsonCert.privateKey);``` This seems to result in a new TCert object, but when I then try to use it, set is as _userCert_ value in the deploy request, I get the following error: ```TypeError: request.userCert.privateKey.getPrivate is not a function``` so there seems to be something wrong with the TCert object I created.. Is the process of storing it as JSON correct, or should I use a different method? (like use the `cert.encode()` method)

Jacco (Fri, 17 Feb 2017 07:13:07 GMT):
I'm trying to work with TCerts and the nodejs sdk (in fabric v0.6). But I seem to have trouble saving- and retreiving the certificates from the key/value storage.. What is the best way to go on this? Right now I retreive the TCert using `user.getNextTCert(null,function (err,cert) { ...`, then I save the resulting TCert as a JSON string in the keyValueStore: ```var store = chain.getKeyValStore(); store.setValue("tcert",JSON.stringify(cert), function (err) {...``` Then I later retreive this certificate, and convert it to an object ( `store.getValue("tcert", function (err, value) {... `, `var jsonCert = JSON.parse(value);`). Now I'm trying to figure out how to convert the JSON tring back to a valid TCert object. What I've tried is this: ```var tcert = new hfc.TCert(jsonCert.publicKey,jsonCert.privateKey);``` This seems to result in a new TCert object, but when I then try to use it, set is as _userCert_ value in the deploy request, I get the following error: ```TypeError: request.userCert.privateKey.getPrivate is not a function``` so there seems to be something wrong with the TCert object I created.. Is the process of storing it as JSON correct, or should I use a different method? (like use the `cert.encode()` method). When I directly use the certificate received from `getNextTCert`, there's no problem.

levinkwong (Fri, 17 Feb 2017 08:36:11 GMT):
Hi all, I am working with fabric-ca-client@0.1.2, when I tried to register client to ca-server, I keep receive error "No Authorization header was found" , any idea ? I have succeed enroll the pre-defined admin user

levinkwong (Fri, 17 Feb 2017 09:21:09 GMT):
Seems I have to turn of authentication in fabric-ca server until the sdk implements the token authen???

levinkwong (Fri, 17 Feb 2017 09:21:14 GMT):
off*

tdietter (Fri, 17 Feb 2017 14:33:21 GMT):
Has joined the channel.

tdietter (Fri, 17 Feb 2017 14:34:16 GMT):
I am having a problem with one of my peers in the v0.6 blockchain, who do I contact for that?

tdietter (Fri, 17 Feb 2017 14:44:59 GMT):
I'm having this problem running my workload:

tdietter (Fri, 17 Feb 2017 14:45:00 GMT):
stdout: LPAR:id=0:3, Constant Freq: 1000 ms LPAR:id=0:3, transactions start= 1487339296432, ending= 1487404096432 stderr: /root/performance/node-sdk-v06/node_modules/hfc/lib/stats.js:77 throw Error("started twice without stopping"); ^ Error: started twice without stopping at Error (native) at ResponseTime.start (/root/performance/node-sdk-v06/node_modules/hfc/lib/stats.js:77:19) at TCertGetter.getTCerts (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:1705:35) at TCertGetter.getNextTCert (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:1659:18) at Member.getNextTCert (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:862:28) at TransactionContext.getMyTCert (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:1175:21) at TransactionContext.query (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:1041:14) at Member.query (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:825:12) at SendConstant (/root/performance/node-sdk-v06/perf-execRequest.js:852:28) at Timeout._onTimeout (/root/performance/node-sdk-v06/perf-execRequest.js:869:21)

tdietter (Fri, 17 Feb 2017 14:45:20 GMT):
Any ideas?

tdietter (Fri, 17 Feb 2017 14:58:24 GMT):
This is using example2

greg.haskins (Fri, 17 Feb 2017 18:07:43 GMT):
@jimthematrix ping

greg.haskins (Fri, 17 Feb 2017 18:08:14 GMT):
Wanted to ask you about a comment you made on https://gerrit.hyperledger.org/r/#/c/5977/

greg.haskins (Fri, 17 Feb 2017 18:08:28 GMT):
specifically about this log entry:

greg.haskins (Fri, 17 Feb 2017 18:08:33 GMT):
```2017-02-17 00:49:58.726 UTC [dockercontroller] Start -> ERRO 388 start-could not start container API error (404): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"/opt/gopath/bin/end2end\\\": stat /opt/gopath/bin/end2end: no such file or directory\"\n"}```

greg.haskins (Fri, 17 Feb 2017 18:09:01 GMT):
can you tell me about what you know about whats happening in this scenario?

greg.haskins (Fri, 17 Feb 2017 18:09:21 GMT):
If I didnt know any better, I would guess that is coming from the peer?

tdietter (Fri, 17 Feb 2017 18:13:24 GMT):
@jimthematrix I am having an issue with v0.6 fabric using example2.. one of my peers is failing with

tdietter (Fri, 17 Feb 2017 18:13:29 GMT):
stderr: /root/performance/node-sdk-v06/node_modules/hfc/lib/stats.js:77 throw Error("started twice without stopping"); ^ Error: started twice without stopping at Error (native) at ResponseTime.start (/root/performance/node-sdk-v06/node_modules/hfc/lib/stats.js:77:19) at TCertGetter.getTCerts (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:1705:35) at TCertGetter.getNextTCert (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:1659:18) at Member.getNextTCert (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:862:28) at TransactionContext.getMyTCert (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:1175:21) at TransactionContext.query (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:1041:14) at Member.query (/root/performance/node-sdk-v06/node_modules/hfc/lib/hfc.js:825:12) at SendConstant (/root/performance/node-sdk-v06/perf-execRequest.js:852:28) at Timeout._onTimeout (/root/performance/node-sdk-v06/perf-execRequest.js:869:21)

tdietter (Fri, 17 Feb 2017 18:14:13 GMT):
@jimthematrix I have saved the log from that peer if you want it.

greg.haskins (Fri, 17 Feb 2017 18:14:47 GMT):
@tdietter i think that is an SDK-level error, not peer

greg.haskins (Fri, 17 Feb 2017 18:15:02 GMT):
and I think it might be related to a reentrancy problem on the v0.6 SDK

tdietter (Fri, 17 Feb 2017 18:15:28 GMT):
@greg.haskins How do I resolve?

greg.haskins (Fri, 17 Feb 2017 18:15:44 GMT):
I ran into this as well when I had implemented a sliding window protocol using clojurescript go routines

greg.haskins (Fri, 17 Feb 2017 18:16:03 GMT):
i solved it by setting my window to 1, preventing more than one txn/query to be outstanding at a time

greg.haskins (Fri, 17 Feb 2017 18:16:37 GMT):
basically you just want to ensure you are not calling Member.query() et. al. multiple times before it returns

tdietter (Fri, 17 Feb 2017 18:16:45 GMT):
Okay, great.

tdietter (Fri, 17 Feb 2017 18:16:48 GMT):
Thanks

greg.haskins (Fri, 17 Feb 2017 18:16:50 GMT):
its a bug in the SDK clearly, but that is a workaround

tdietter (Fri, 17 Feb 2017 18:17:31 GMT):
Thanks

greg.haskins (Fri, 17 Feb 2017 18:17:52 GMT):
not sure how to cleanly solve it in native nodejs, but you effectively want to slap a mutex in front of the SDK calls that send a transaction

tdietter (Fri, 17 Feb 2017 18:18:14 GMT):
I'm hoping this gets fixed; is there a bug open that you know of?

greg.haskins (Fri, 17 Feb 2017 18:18:41 GMT):
im not sure, but also note that the v0.6 SDK and v1.0 SDK are completely different code bases

greg.haskins (Fri, 17 Feb 2017 18:18:53 GMT):
so, on a positive note, its not likely to have the same issue in v1.0

tdietter (Fri, 17 Feb 2017 18:18:57 GMT):
Yes, I know.

greg.haskins (Fri, 17 Feb 2017 18:19:05 GMT):
on a bad note, you arent likely to get much interest in fixing v0.6

tdietter (Fri, 17 Feb 2017 18:19:13 GMT):
:(

firas.qutishat (Fri, 17 Feb 2017 21:12:29 GMT):
Has joined the channel.

jimthematrix (Sat, 18 Feb 2017 03:59:36 GMT):
@greg.haskins the error `stat /opt/gopath/bin/end2end: no such file or directory` was indeed from the peer during the chaincode instantiation call, but it only happens to a particular commit level and it's since been fixed

greg.haskins (Sat, 18 Feb 2017 03:59:48 GMT):
ah, ok

greg.haskins (Sat, 18 Feb 2017 04:00:11 GMT):
the reason I was asking was because I had made some changes within the peer w.r.t. how it builds chaincode containers

greg.haskins (Sat, 18 Feb 2017 04:00:19 GMT):
i wanted to make sure it was not related

greg.haskins (Sat, 18 Feb 2017 04:02:16 GMT):
hope you had a nice trip

greg.haskins (Sat, 18 Feb 2017 04:02:21 GMT):
enjoy the weekend

jimthematrix (Sat, 18 Feb 2017 04:05:06 GMT):
also, thanks for explaining the `started twice without stopping`, it's indeed a known problem with v0.6 node sdk and similar to the sliding window issue, basically (as far as I recall) an internal timer was trying to keep track of tcert download time (for performance logging i guess, since I didn't write that code) and it was active when successive requests for transactions came in so the error was thrown when the 2nd (and subsequent) tx were requested

jimthematrix (Sat, 18 Feb 2017 04:05:27 GMT):
always enjoy visiting UK ;-)

jimthematrix (Sat, 18 Feb 2017 04:05:27 GMT):
always enjoy visiting UK, was even treated with beautiful sunshine on Friday ;-)

jimthematrix (Sat, 18 Feb 2017 04:05:35 GMT):
have a nice weekend yourself

Jacco (Sat, 18 Feb 2017 09:08:37 GMT):
Hi all, I'm having trouble saving and retreiving a TCert from the keyValueStore.. What's the best way to achieve this?

jimthematrix (Sat, 18 Feb 2017 17:28:00 GMT):
@cdaughtr @bretharrison when testing PR 5977 did you have to modify the docker-compose.yaml? using the current content in test/fixtures the orderer exits with the following error: ``` Could not find genesis.yaml in paths of [/etc/hyperledger/fabric ]. Try setting ORDERER_CFG_PATH, PEER_CFG_PATH, or GOPATH correctly ```

cdaughtr (Sat, 18 Feb 2017 17:33:11 GMT):
@jimthematrix This is a new problem with today's fabric.

cdaughtr (Sat, 18 Feb 2017 17:33:11 GMT):
@jimthematrix This is a new problem with today's fabric. I asked Jason in the fabric channel and he has a fix pending: https://gerrit.hyperledger.org/r/#/c/6171

cdaughtr (Sat, 18 Feb 2017 17:33:11 GMT):
@jimthematrix This is a new problem with today's fabric. I asked Jason in the fabric channel and he has a fix pending: https://gerrit.hyperledger.org/r/#/c/6171 Prior to today, I was using our same docker compose that hasn't changed in a while.

jimthematrix (Sat, 18 Feb 2017 17:36:49 GMT):
ok, looks like it's being reviewed

rameshthoomu (Sat, 18 Feb 2017 17:37:52 GMT):
@jimthematrix I have tested end-to-end on latest commits modifying volume in orderer service in Jenkins https://github.com/rameshthoomu/fabric-sdk-node/blob/master/test/fixtures/docker-compose.yml#L26

rameshthoomu (Sat, 18 Feb 2017 17:38:45 GMT):
everything worked as expected https://jenkins.hyperledger.org/sandbox/job/FIT-node-x86_64/7/console

jimthematrix (Sat, 18 Feb 2017 17:41:48 GMT):
@Jacco the `privateKey` argument of the TCert constructor must be a ec keypair object, see: https://github.com/hyperledger/fabric/blob/v0.6/sdk/node/src/hfc.ts#L2651 https://github.com/hyperledger/fabric/blob/v0.6/sdk/node/src/crypto.ts#L132

jimthematrix (Sat, 18 Feb 2017 17:55:34 GMT):
@cdaughtr @bretharrison the end-to-end.js now has a sleep() call for 5 seconds after the install request returns. why is that needed? is the backend still doing asych processing after the HTTP response is received?

jimthematrix (Sat, 18 Feb 2017 17:55:45 GMT):
@muralisr see question above

bretharrison (Sat, 18 Feb 2017 17:56:07 GMT):
I was having lots of problems, that may not be needed

jimthematrix (Sat, 18 Feb 2017 17:56:47 GMT):
ok, good to hear ;-)

jimthematrix (Sat, 18 Feb 2017 17:56:57 GMT):
please double check when you get a chance, thanks!

bretharrison (Sat, 18 Feb 2017 17:57:38 GMT):
need to have https://gerrit.hyperledger.org/r/#/c/6171/5 merged, kinda dead in the water here

muralisr (Sat, 18 Feb 2017 17:58:29 GMT):
looking at https://gerrit.hyperledger.org/r/#/c/6171 @bretharrison @cdaughtr @jimthematrix

bretharrison (Sat, 18 Feb 2017 17:58:38 GMT):
great, thanks

cdaughtr (Sat, 18 Feb 2017 17:58:48 GMT):
@jimthematrix @bretharrison Bin pinged me and they are getting ready to merge the txId change. I'm going to submit a WIP to test with.

bretharrison (Sat, 18 Feb 2017 17:59:16 GMT):
that is not a good idea

bretharrison (Sat, 18 Feb 2017 17:59:35 GMT):
it may block NodeSDK

cdaughtr (Sat, 18 Feb 2017 17:59:54 GMT):
I will block NodeSDK.

cdaughtr (Sat, 18 Feb 2017 18:00:34 GMT):
Angelo didn't respond to yesterday's post so Bin is asking Elli to look at it.

bretharrison (Sat, 18 Feb 2017 18:00:47 GMT):
ok

muralisr (Sat, 18 Feb 2017 18:08:20 GMT):
merged 6171 @bretharrison

bretharrison (Sat, 18 Feb 2017 18:25:07 GMT):
thanks

cdaughtr (Sat, 18 Feb 2017 18:42:17 GMT):
@jimthematrix @bretharrison I have pushed the TxId change https://gerrit.hyperledger.org/r/#/c/6213/ . There's only enough currently implemented to run end-to-end.js step1. Have been having problems with fabric today, so have not gotten very far.

jimthematrix (Sat, 18 Feb 2017 18:43:02 GMT):
thanks @cdaughtr I'll review it in a bit

bretharrison (Sat, 18 Feb 2017 18:55:22 GMT):
Do we need to add some new settings to Docker Compose file to run new orderer, still not running

bretharrison (Sat, 18 Feb 2017 18:55:35 GMT):
@muralisr

muralisr (Sat, 18 Feb 2017 18:56:44 GMT):
@bretharrison what do you see when you run just the orderer viw docker-compose ?

muralisr (Sat, 18 Feb 2017 18:57:00 GMT):
as in `docker-compose .... up orderer` ?

bretharrison (Sat, 18 Feb 2017 19:01:29 GMT):
orderer_1 | 2017-02-18 19:00:25.453 UTC [msp] getPemMaterialFromDir -> DEBU 05c Reading directory msp/sampleconfig/cacerts orderer_1 | 2017-02-18 19:00:25.453 UTC [common/configtx/tool/provisional] New -> CRIT 05d Error loading MSP configuration for org SampleOrg: Could not load a valid ca certificate from directory msp/sampleconfig/cacerts, err Could not read directory open msp/sampleconfig/cacerts: no such file or directory, err msp/sampleconfig/cacerts orderer_1 | panic: Error loading MSP configuration for org SampleOrg: Could not load a valid ca certificate from directory msp/sampleconfig/cacerts, err Could not read directory open msp/sampleconfig/cacerts: no such file or directory, err msp/sampleconfig/cacerts orderer_1 | orderer_1 | goroutine 1 [running]: orderer_1 | panic(0xa23320, 0xc42036ffd0) o

cdaughtr (Sat, 18 Feb 2017 19:26:58 GMT):
I'm asking Jason about that on fabric channel

dselman (Sat, 18 Feb 2017 22:48:02 GMT):
Has joined the channel.

Jacco (Sun, 19 Feb 2017 13:21:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2oji37gsRQygYSbrj) @jimthematrix Thanks!

jimthematrix (Sun, 19 Feb 2017 16:03:50 GMT):
looks like in the latest fabric the orderer still crashes: https://chat.hyperledger.org/channel/fabric-consensus?msg=M5H9vP3RBwMgWsngC

muralisr (Sun, 19 Feb 2017 18:43:32 GMT):
@jimthematrix need to use `ORDERER_GENERAL_GENESISPROFILE=SampleInsecureSolo` in docker compose . https://gerrit.hyperledger.org/r/#/c/6159 has the fix in `Dockerfile.in`

muralisr (Sun, 19 Feb 2017 18:44:28 GMT):
https://gerrit.hyperledger.org/r/#/c/6159 is a easy one to review @jimthematrix (not so subtle hint :-) )

muralisr (Sun, 19 Feb 2017 18:44:48 GMT):
@jyellick ^^^ in case you want to add anything

jyellick (Sun, 19 Feb 2017 18:44:48 GMT):
Has joined the channel.

jyellick (Sun, 19 Feb 2017 18:45:18 GMT):
I think it is ready to go

jimthematrix (Sun, 19 Feb 2017 19:53:10 GMT):
let me give it a quick try

jimthematrix (Sun, 19 Feb 2017 20:55:48 GMT):
@cdaughtr @bretharrison @muralisr I'm able to verify 6213 with latest fabric (as of 6be8f63c7417e12a143449213c1aa9461050572a), so I'm going to merge it (title already updated to remove WIP)

cdaughtr (Sun, 19 Feb 2017 20:57:47 GMT):
ok, great!

jimthematrix (Sun, 19 Feb 2017 21:05:34 GMT):
@cdaughtr or @bretharrison can you remind me where we are with the create/join channels? it seems @jyellick has recently checked in tools to generate the genesis block given the msp materials for the chain (orderer, anchor peers, ca roots, etc.), it seems that'll be the main source of information for the SDK to create/join channels. is that understanding consistent with your understanding?

jimthematrix (Sun, 19 Feb 2017 21:05:34 GMT):
@cdaughtr or @bretharrison can you remind me where we are with the create/join channels? it seems @jyellick has recently checked in tools to generate the genesis block given the msp materials for the chain (orderer, anchor peers, ca roots, etc.), it seems that'll be the main source of information for the SDK to create/join channels. is that consistent with your understanding?

bretharrison (Sun, 19 Feb 2017 21:06:21 GMT):
yes

bretharrison (Sun, 19 Feb 2017 21:06:41 GMT):
we will remove where we build those objects

jyellick (Sun, 19 Feb 2017 21:07:00 GMT):
@jimthematrix Note that at the moment, the tool only generates a genesis block, and what you need is a config transaction (what is embedded in that block)

jyellick (Sun, 19 Feb 2017 21:07:05 GMT):
But that is pending

bretharrison (Sun, 19 Feb 2017 21:07:06 GMT):
the app will have to read in that info and pass to SDK

jyellick (Sun, 19 Feb 2017 21:07:20 GMT):
My understanding is that for tomorrow we will be leveraging the bdd output

jyellick (Sun, 19 Feb 2017 21:07:29 GMT):
But this tool will replace the bdd as the source of the material

jimthematrix (Sun, 19 Feb 2017 21:09:50 GMT):
@jyellick right that's what i expect as well, that given the genesis block the app/sdk will need to dig out the information needed to construct the config transaction. we can start with doing that in test code, aka expecting apps to do that and pass to the SDK as some sort of JSON object.

jimthematrix (Sun, 19 Feb 2017 21:10:00 GMT):
(as Bret said)

jimthematrix (Sun, 19 Feb 2017 21:10:55 GMT):
once this works we can provide help in the SDK to lighten the app's burden

bretharrison (Sun, 19 Feb 2017 21:25:46 GMT):
@jimthematrix we are seeing the peer crash, when did you pull your fabric

jimthematrix (Sun, 19 Feb 2017 22:04:16 GMT):
@bretharrison ``` commit 6be8f63c7417e12a143449213c1aa9461050572a Author: Jason Yellick Date: Sat Feb 18 11:16:43 2017 -0500 ```

jimthematrix (Sun, 19 Feb 2017 22:05:04 GMT):
docker for Mac version: ``` Version 1.13.1-beta42 (15350) Channel: beta 2ffb2b4915 ```

jimthematrix (Sun, 19 Feb 2017 22:11:17 GMT):
i'm pulling the latest and giving it another try

bretharrison (Sun, 19 Feb 2017 22:15:06 GMT):
We found the issue just now

bretharrison (Sun, 19 Feb 2017 22:16:09 GMT):
transaction proto changed, the removal of fields must have cased the unmarshall on fabric side to not find the transaction action

jimthematrix (Sun, 19 Feb 2017 23:35:26 GMT):
yes I'm seeing the crash as well after updating to the latest fabric. i also had to modify the end-to-end.js to use the new tx id generation

jimthematrix (Sun, 19 Feb 2017 23:36:01 GMT):
so guess you'll be checking in the fix together with the update to e2e to use the new gen method right?

bretharrison (Sun, 19 Feb 2017 23:47:04 GMT):
https://gerrit.hyperledger.org/r/#/c/6265/ for proto changes and change to end-to-end to use new trans_id

jimthematrix (Sun, 19 Feb 2017 23:52:52 GMT):
cool, checking out to give it a go

bretharrison (Mon, 20 Feb 2017 00:02:39 GMT):
just added a change to it to for step1 not stopping

bretharrison (Mon, 20 Feb 2017 00:02:45 GMT):
if run by step

muralisr (Mon, 20 Feb 2017 01:16:00 GMT):
@jimthematrix when you merge the above can you also review https://gerrit.hyperledger.org/r/#/c/6263/ please (this was the crash that the mismatched proto caused)

rameshthoomu (Mon, 20 Feb 2017 03:01:59 GMT):
end-to-end tests are working as expected on latest commits.. Build Reference # https://jenkins.hyperledger.org/view/FIT/job/FIT-node-x86_64/

levinkwong (Mon, 20 Feb 2017 08:47:56 GMT):
Hi all, I tried to send a deployment proposal by the sdk (fabric-client), but get the error `Error: Failed to deserialize creator identity, err MSP DEFAULT is unknown` Any idea how to fix this ?

levinkwong (Mon, 20 Feb 2017 08:50:27 GMT):
My source code : `let deployRequest = { chaincodePath: chaincodePath, chaincodeId: configFile.config.vehicle_id, fcn: functionName, args: args, chainId: configFile.config.vehicle_chain, txId: tx_id, nonce: nonce }; tracing.create('INFO', 'deployChaincode', 'deployRequest: ' + JSON.stringify(deployRequest)); return chain.sendDeploymentProposal(deployRequest); `

levinkwong (Mon, 20 Feb 2017 08:50:27 GMT):
My source code : `let deployRequest = { chaincodePath: chaincodePath, chaincodeId: configFile.config.vehicle_id, fcn: functionName, args: args, chainId: configFile.config.vehicle_chain, txId: tx_id, nonce: nonce }; tracing.create('INFO', 'deployChaincode', 'deployRequest: ' + JSON.stringify(deployRequest)); return chain.sendDeploymentProposal(deployRequest);`

levinkwong (Mon, 20 Feb 2017 08:51:34 GMT):
My source code : ``` ```

levinkwong (Mon, 20 Feb 2017 08:51:34 GMT):
My source code : ``` ```

levinkwong (Mon, 20 Feb 2017 08:51:34 GMT):
My source code : ``` let deployRequest = { chaincodePath: chaincodePath, chaincodeId: configFile.config.vehicle_id, fcn: functionName, args: args, chainId: configFile.config.vehicle_chain, txId: tx_id, nonce: nonce }; tracing.create('INFO', 'deployChaincode', 'deployRequest: ' + JSON.stringify(deployRequest)); return chain.sendDeploymentProposal(deployRequest); ```

jimthematrix (Mon, 20 Feb 2017 10:29:42 GMT):
@levinkwong unless you have created the vehicle_chain channel using the CLI (peer command) successfully, you will get the error listed above. try "testchainid" instead

levinkwong (Mon, 20 Feb 2017 10:31:05 GMT):
@jimthematrix Thanks! Can I create channel through SDK (now or future)?

jimthematrix (Mon, 20 Feb 2017 10:31:27 GMT):
yes we are working on that at the moment

levinkwong (Mon, 20 Feb 2017 10:31:49 GMT):
Thanks

levinkwong (Mon, 20 Feb 2017 10:38:10 GMT):
Also I can only register user to fabric-ca when I turn of authentication in fabric-ca server, is that because the token authentication is under development?

dRand (Mon, 20 Feb 2017 11:10:01 GMT):
Has joined the channel.

dRand (Mon, 20 Feb 2017 11:13:20 GMT):
HI all. I am trying to enroll WebAppAdmin with "chain.enroll()", but the callback never gets fired, even though I see the WebAppAdmin successfully enrolled (DEBUG=hfc) .. any idea? hfc@6.5.0 , node@6.9.5, npm@4.3.0

dRand (Mon, 20 Feb 2017 11:13:39 GMT):
``` static enrollRegistrar = (chain, username, secret) => { return new Promise((resolve, reject) => { chain.enroll(username, secret, (err, registrar) => { console.log('PRINT ME') if (!err) { console.log('[I] (Init) Registrar successfully enrolled') resolve(registrar) } else { console.log('[W] (Init) Failed to enroll registrar') reject(err) } }) }) } ```

dRand (Mon, 20 Feb 2017 11:15:26 GMT):
code inside callaback is never reached

AnupamVijayvergia (Mon, 20 Feb 2017 13:12:43 GMT):
Has joined the channel.

bobbiejc (Mon, 20 Feb 2017 15:23:16 GMT):
Has joined the channel.

AnupamVijayvergia (Mon, 20 Feb 2017 15:55:07 GMT):
Hey is there any documentation for node-sdk to start with? I've set up a local setup with 4 validating peers and one ca and able to deploy contracts using command line. I've used hfc with bluemix..but not able to configure it for local node. (Since for blumix service credentials are readily available) If anyone can guide on that would be great. Thanks in advance.

beckmann (Mon, 20 Feb 2017 19:12:45 GMT):
Has joined the channel.

beckmann (Mon, 20 Feb 2017 19:13:38 GMT):
does anyone have the fabric-client npm package working on windows?

beckmann (Mon, 20 Feb 2017 19:13:38 GMT):
does anyone have the fabric-client npm package working on windows 7?

weeds (Tue, 21 Feb 2017 01:57:42 GMT):
@AnupamVijayvergia What version are you using? Version 0.6 or Version 1.0?

weeds (Tue, 21 Feb 2017 01:58:03 GMT):
i assume version 0.6 if bluemix right now

Ying (Tue, 21 Feb 2017 02:06:07 GMT):
Has joined the channel.

Ying (Tue, 21 Feb 2017 02:36:40 GMT):
@beckmann I'm using master working on win7

Ying (Tue, 21 Feb 2017 02:42:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ceCxNd3qBJYTEDaSb) @beckmann @beckmann I'm using master working on win7

mastersingh24 (Tue, 21 Feb 2017 08:29:05 GMT):
@beckmann - what error are you seeing?

mastersingh24 (Tue, 21 Feb 2017 08:30:22 GMT):
generally, when node packages use modules with native code, you need to install the windows build tools - https://github.com/felixrieseberg/windows-build-tools

AnupamVijayvergia (Tue, 21 Feb 2017 08:39:06 GMT):
@weeds yes 0.6

dRand (Tue, 21 Feb 2017 09:03:20 GMT):
Hello there. I am getting `can't load package: package build-chaincode: no buildable Go source files in /opt/gopath/src/build-chaincode` while trying to deploy chaincode via hfc

dRand (Tue, 21 Feb 2017 09:03:34 GMT):
any idea of what may cause this?

dRand (Tue, 21 Feb 2017 09:03:34 GMT):
any idea of what may cause this?

dRand (Tue, 21 Feb 2017 09:03:34 GMT):
any idea of what may cause this? I am not running node on a container (like f.e. the carlease-demo), so may be a dir structures/naming issue?

dRand (Tue, 21 Feb 2017 09:03:34 GMT):
any idea of what may cause this? I am not running node on a container (like f.e. the carlease-demo), so may be a directory structures/naming issue?

dRand (Tue, 21 Feb 2017 09:03:34 GMT):
any idea of what may cause this? I am not running node on a container (like f.e. the carlease-demo), so may be a directory structure/naming issue?

pospi (Tue, 21 Feb 2017 09:57:18 GMT):
hey @all can anyone tell me where to find the source for `hfc` 0.6.5 as published on NPM? The latest in the 0.6 branch in the main `fabric` repo is 0.6.3 and the versioning system seems to have changed on fabric-sdk-node :/

levinkwong (Tue, 21 Feb 2017 09:58:35 GMT):
I would just get from npm

pospi (Tue, 21 Feb 2017 09:59:05 GMT):
I am trying to fix issues we're having with GRPC and need to make a fork, the version used in hfc 0.6.5 seems to hang indefinitely when run inside docker images based on Debian

levinkwong (Tue, 21 Feb 2017 09:59:10 GMT):
And don't at all

pospi (Tue, 21 Feb 2017 09:59:14 GMT):
fair enough, thats probably easier

pd93 (Tue, 21 Feb 2017 10:01:18 GMT):
@pospi Please use `@all` sparingly... it sends a notifcation to everyone in this channel...

pospi (Tue, 21 Feb 2017 10:01:33 GMT):
yeah sorry, my bad

mastersingh24 (Tue, 21 Feb 2017 10:11:35 GMT):
@pospi - are you looking to upgrade the grpc package to 1.1.x?

mastersingh24 (Tue, 21 Feb 2017 10:11:49 GMT):
I'm actually looking at something similar to get into an update

pospi (Tue, 21 Feb 2017 10:12:07 GMT):
yeah that's right. I have just taken `hfc` from npm and made a git repo out of it, I'll let you know how it goes

pospi (Tue, 21 Feb 2017 10:12:13 GMT):
will push to github when done if you want

mastersingh24 (Tue, 21 Feb 2017 10:12:33 GMT):
we might actually need to push a new hfc version due to some stability issues with grpc 1.0.0

pospi (Tue, 21 Feb 2017 10:13:03 GMT):
the issue I'm having is that I get to the `hfc [MemberServicesImpl.enroll] [Contact ECA]` log line and then it justs hangs indefinitely. Works fine in host OS on both Ubuntu & OSX but doesn't run inside a docker container on any of the base images I've tried, which is super weird

pospi (Tue, 21 Feb 2017 10:13:21 GMT):
but the hang seems to be within GRPC or the `ca` protobuf so really hard to debug it

mastersingh24 (Tue, 21 Feb 2017 10:13:55 GMT):
ok - can you enter a JIRA item explaining the issue(s) and tag me there as well? Just for tracking purposes

aliblackwell (Tue, 21 Feb 2017 10:14:35 GMT):
will do @mastersingh24

aliblackwell (Tue, 21 Feb 2017 10:14:42 GMT):
any thoughts in the meantime?

pospi (Tue, 21 Feb 2017 10:15:22 GMT):
RE JIRA @aliblackwell is on it (:

sword_linux (Tue, 21 Feb 2017 10:16:25 GMT):
Has joined the channel.

mastersingh24 (Tue, 21 Feb 2017 10:24:47 GMT):
well one thing to do while running to to enable GRPC debugging - have you tried that yet?

aliblackwell (Tue, 21 Feb 2017 10:24:55 GMT):
Here's the issue @mastersingh24 https://jira.hyperledger.org/browse/FAB-2401

aliblackwell (Tue, 21 Feb 2017 10:25:07 GMT):
great thinking, how do we do that sorry?

aliblackwell (Tue, 21 Feb 2017 10:25:51 GMT):
we tried putting comments in the source code but it hangs from within the native code

mastersingh24 (Tue, 21 Feb 2017 10:28:10 GMT):
`GRPC_VERBOSITY=DEBUG GRPC_TRACE=all node your app.js`

mastersingh24 (Tue, 21 Feb 2017 10:28:10 GMT):
`GRPC_VERBOSITY=DEBUG GRPC_TRACE=all node yourapp.js`

aliblackwell (Tue, 21 Feb 2017 10:32:13 GMT):
:+1: we will debug and update the issue

pospi (Tue, 21 Feb 2017 10:35:49 GMT):
it actually looks to be as simple as a hostname resolution problem

pospi (Tue, 21 Feb 2017 10:35:58 GMT):
still unsure why it's not getting a hostname though...

mastersingh24 (Tue, 21 Feb 2017 10:36:46 GMT):
yeah - I was thinking that might be the issue

aliblackwell (Tue, 21 Feb 2017 10:36:49 GMT):
this is the new output

mastersingh24 (Tue, 21 Feb 2017 10:37:03 GMT):
so how are you running your peers / membersrvcs ? also in Docker?

pospi (Tue, 21 Feb 2017 10:37:09 GMT):
first line of output from GRPC has `host=(null)` in it

aliblackwell (Tue, 21 Feb 2017 10:38:23 GMT):
updated bug w/ output: https://jira.hyperledger.org/browse/FAB-2401

pospi (Tue, 21 Feb 2017 10:38:32 GMT):
@mastersingh24 yeah... ``` root@fff66d5f00d6:/app# nmap -p 7054 membersrvc Starting Nmap 6.40 ( http://nmap.org ) at 2017-02-21 10:38 UTC Nmap scan report for membersrvc (172.17.0.2) Host is up (0.000062s latency). PORT STATE SERVICE 7054/tcp open unknown MAC Address: 02:42:AC:11:00:02 (Unknown) Nmap done: 1 IP address (1 host up) scanned in 0.52 seconds ```

pospi (Tue, 21 Feb 2017 10:39:04 GMT):
but it looks like it must be config related if it's saying host=null :/

aliblackwell (Tue, 21 Feb 2017 10:40:55 GMT):
we've got a big docker compose setup / orchestration

pospi (Tue, 21 Feb 2017 10:45:23 GMT):
@mastersingh24 it looks like it might be a quoting issue! Can confirm we are calling `chain.setMemberServicesUrl('grpc://"membersrvc:7054"');`, which doesn't seem correct. Should those double quotes be there?

mastersingh24 (Tue, 21 Feb 2017 10:46:18 GMT):
no - you only need single or double quotes around the whole thing - so you can remove the internal double quotes

aliblackwell (Tue, 21 Feb 2017 10:47:31 GMT):
ha it's always the simplest things!!

pospi (Tue, 21 Feb 2017 10:47:55 GMT):
yeah I thought so! So we were just interpreting the docker-compose docs wrong when it comes to setting env vars :p

pospi (Tue, 21 Feb 2017 10:49:22 GMT):
wow that was days of my life wasted on two errant characters >< Thanks so much @mastersingh24 couldn't have tracked it down without your help & those GRPC env vars!

mastersingh24 (Tue, 21 Feb 2017 10:49:33 GMT):
glad it worked and glad it was not a low-level networking issue - those are very hard to debug

pospi (Tue, 21 Feb 2017 10:49:55 GMT):
Do you get these kinds of bug reports often? should add a note to the SDK docs about hung code & debugging GRPC maybe

mastersingh24 (Tue, 21 Feb 2017 10:49:55 GMT):
(I've wasted more time than that on simpler issues ;) )

mastersingh24 (Tue, 21 Feb 2017 10:50:07 GMT):
yeah and yeah we should

mastersingh24 (Tue, 21 Feb 2017 10:50:47 GMT):
one of my jobs is overall responsibility for running IBM's blockchain service in the cloud - so we get things like this all the time

mastersingh24 (Tue, 21 Feb 2017 10:51:12 GMT):
but agree we need to document this / make this more clear in terms of how to troubleshoot

pospi (Tue, 21 Feb 2017 10:55:31 GMT):
I vote we blame google :p

mastersingh24 (Tue, 21 Feb 2017 10:57:48 GMT):
we should

mastersingh24 (Tue, 21 Feb 2017 10:58:04 GMT):
I am going to blame google for the everything

jessilb (Tue, 21 Feb 2017 11:40:36 GMT):
Has joined the channel.

weeds (Tue, 21 Feb 2017 12:27:54 GMT):
@nickgaski this is an interesting comment about hung code and debugging GRPC. I know you are writing documentation, maybe you can add in ? Good idea from @pospi

Rymd (Tue, 21 Feb 2017 13:17:18 GMT):
Has joined the channel.

pd93 (Wed, 22 Feb 2017 14:15:04 GMT):
``` vp1 | 14:05:01.018 [chaincode] processStream -> ERRO 02e Got error: Failed to create user, [strconv.ParseUint: parsing "": invalid syntax] vp1 | 14:05:01.018 [chaincode] Launch -> ERRO 02f sending init failed(Error initializing container 2e72f006b95c9f93e65de1e0a5d78ec802770d7d0c5e1354f3d228756c3684fd: Failed to create user, [strconv.ParseUint: parsing "": invalid syntax]) vp1 | 14:05:01.113 [chaincode] processStream -> ERRO 030 Error handling chaincode support stream: stream error: code = 1 desc = "context canceled" vp1 | 14:05:01.269 [consensus/pbft] execDoneSync -> INFO 031 Replica 1 finished execution 1, trying next ``` I don't suppose anyone has seen this before? I've spend a great deal of time trying to debug with to no avail :( It happens when trying to deploy chaincode via HFC (Fab 0.6 and HFC 0.6.5)

kletkeman (Wed, 22 Feb 2017 14:27:04 GMT):
@pd93 I've worked on chaincode with v0.5 and v0.6 extensively, and I would personally avoid trying advanced tricks like deploying using HFC on that stream. There has been virtually no development activity on v0.6 for many months, and thus there is no way to get a response to issues such as the one you are running into. It has been mentioned in these channels that HFC on v0.6 is not the same as HFC on v1 (entirely different code bases I have read) because of the dramatic client protocol changes. I take that to mean that time invested in HFC on v0.6 is not well spent. The v1 HFC is evolving rapidly in lock step (sort of) with the fabric itself and so you should have far better luck there. Of course, the overall environment is not quite stable yet, so there will be other pain points and they could change often. For me, just getting to know chaincode should be done using REST and POSTMAN on v0.6 (e.g. in Bluemix). The pain of porting onto v1 can be delayed a bit in that instance. However, if working on client code that is meant for v1, then the pain should probably be taken now using docker compose and thus the lack of similarity between client protocols in v0.6 and client protocols in v1 is not a factor.

pd93 (Wed, 22 Feb 2017 14:33:29 GMT):
@kletkeman I'm under a really tight schedule which is why I've not upgraded to v1 yet. However, I get the feeling that the pain of 0.6 is going to catch up with me v soon... I can only assume the upgrade process is as simple as using the latest docker images and fabric-client as opposed to HFC. Is there anything else I should be aware of if I attempt this?

pd93 (Wed, 22 Feb 2017 14:40:07 GMT):
@kletkeman btw I'm also using bluemix for production.. which is still on 0.6 :/

kletkeman (Wed, 22 Feb 2017 15:00:49 GMT):
@pd93 We are caught in the same conundrum. But we are not using v0.6 in production, so I am free to port our client against docker images and wait for the arrival of v1 on Bluemix. I apologize, but I have no guess as to the best path through the versioning minefield when you factor in production use of Bluemix.

psa (Wed, 22 Feb 2017 15:57:05 GMT):
Has joined the channel.

sloveland (Wed, 22 Feb 2017 16:21:35 GMT):
Has joined the channel.

mrkiouak (Wed, 22 Feb 2017 19:42:20 GMT):
Has joined the channel.

mrkiouak (Wed, 22 Feb 2017 19:42:53 GMT):
this is likey a dumb question, so I apologize but: how can I get hfc to log debug level statements?

mrkiouak (Wed, 22 Feb 2017 19:46:01 GMT):
its log4js, but e.g. in the v1 alpha getting started, how would I get node deploy.js to log at the debug level (it only appears to be logging info statements-- I think... by default)

mrkiouak (Wed, 22 Feb 2017 20:56:42 GMT):
or even how to set the HFC_Logging env variable? the example { 'debug':'console'} isn't parsing though I may be setting it in appropriately... (have tried most combinations of escape chars, quotes.....

mrkiouak (Wed, 22 Feb 2017 21:01:47 GMT):
eg. HFC_LOGGGING="{\'debug\':\'console\'}" fails to parse

mrkiouak (Wed, 22 Feb 2017 21:03:16 GMT):
ah.. all double quotes did work "{\"debug\":\"console\"}"

ibmamnt (Thu, 23 Feb 2017 01:31:51 GMT):
Try '{"debug": "console"}'.

jimthematrix (Thu, 23 Feb 2017 05:04:42 GMT):
@mrkiouak as @ibmamnt said, use the single quote on the outside. this may seem clunky but then it makes it possible to do something like this: HFC_LOGGING='{"debug": "console", "error":"/tmp/hfc/error.log"}'

ibmamnt (Thu, 23 Feb 2017 05:43:22 GMT):
This may be better (cited from end-to-end.js in test/integration dir.) . ```process.env.HFC_LOGGING = '{"debug": "console"}';``` Put this line in deploy.js

RezwanKabir (Thu, 23 Feb 2017 07:01:10 GMT):
Has joined the channel.

RezwanKabir (Thu, 23 Feb 2017 07:01:46 GMT):
in 1.0 install or instantiate there is -version. what is the purpose of this version ?

RezwanKabir (Thu, 23 Feb 2017 07:02:07 GMT):
can i communicate with previous version from latest version ?

RezwanKabir (Thu, 23 Feb 2017 07:07:34 GMT):
and is there any documentation for version from where i get some help

Rymd (Thu, 23 Feb 2017 08:48:36 GMT):
is there a way to upload a new version of a chaincode?

Rymd (Thu, 23 Feb 2017 08:48:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=H2bJZjzrHWEyZcHpp) @RezwanKabir Yes im using that example. But how do i provide the version? I get `Error: Chaincode exists mycc` when i try to upgrade with deploy.js

o.o. (Thu, 23 Feb 2017 09:04:41 GMT):
Has joined the channel.

davidkel (Thu, 23 Feb 2017 09:46:28 GMT):
I'm trying to get to grips with the new V1 way of deploying and instantiating chaincode. The examples in the Node SDK have a deploy.js that just invokes instantiate but looking at the chain source that doesn't appear to upload the chaincode to the peer. However the install proposal does. I have tried the install proposal and that appears to put a single file into /var/hyperledger/production/chaincodes (although I don't know what this file is) but I haven't been able to send the proposal response to the orderer as the returned endorsements are null. So do you need to send an install proposal to the orderer as it appears to have put something into the peer ?

Jonas.Hedin (Thu, 23 Feb 2017 09:55:49 GMT):
Has joined the channel.

MartinC (Thu, 23 Feb 2017 09:59:58 GMT):
Has joined the channel.

RezwanKabir (Thu, 23 Feb 2017 12:57:53 GMT):
@Rymd yes you can upgrade chaincode providing the version. or go back to previous version. But all existing data will be there. Get example from http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup/

Rymd (Thu, 23 Feb 2017 13:13:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=H2bJZjzrHWEyZcHpp) @RezwanKabir But how do i provide a version? When i try to upgrade i get `Error: Chaincode exists mycc`

RezwanKabir (Thu, 23 Feb 2017 13:22:58 GMT):
suppose you have install and instantiate v1 for mycc you have to provide v2 for mycc to upgrade like this peer chaincode instantiate -v 1.0 -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/getset1 -c '{"Args":[]}' peer chaincode install -v 2.0 -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/getset1 -c '{"Args":[]}' peer chaincode upgrade -v 2.0 -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/getset1 -c '{"Args":[]}'

mrkiouak (Thu, 23 Feb 2017 14:20:47 GMT):
thanks @ibmamnt and @jimthematrix. FOr finding examples of something like the process.env.HFC_LOGGING example (though that's just vanilla node/js that I probably should have though of) are there good resources for HFC specific settings? Appreciate the help greatly!

aambati (Thu, 23 Feb 2017 15:15:51 GMT):
Has joined the channel.

pascallouis (Thu, 23 Feb 2017 17:18:13 GMT):
Has joined the channel.

pascallouis (Thu, 23 Feb 2017 17:20:22 GMT):
hi there! hoping someone can help me with what may be a very simple issue. When interacting with my newly deployed business network, I'm getting `Failed to load connector module "composer-connector-hlf" for connection profile "defaultProfile"`

pascallouis (Thu, 23 Feb 2017 17:20:39 GMT):
upon trying to connect.

dselman (Thu, 23 Feb 2017 18:30:56 GMT):
@pascallouis this is a Fabric Composer question, please post to #fabric-composer

pascallouis (Thu, 23 Feb 2017 19:16:11 GMT):
will do @dselman

greg.haskins (Fri, 24 Feb 2017 02:57:56 GMT):
@jimthematrix three critical patches for v1.0: https://gerrit.hyperledger.org/r/#/c/5429/

greg.haskins (Fri, 24 Feb 2017 02:58:25 GMT):
https://gerrit.hyperledger.org/r/#/c/6423/

greg.haskins (Fri, 24 Feb 2017 02:58:34 GMT):
well, two critical and a cleanup

greg.haskins (Fri, 24 Feb 2017 02:58:46 GMT):
https://gerrit.hyperledger.org/r/#/c/6425/

jimthematrix (Fri, 24 Feb 2017 03:37:30 GMT):
@greg.haskins I'm reviewing

jimthematrix (Fri, 24 Feb 2017 04:01:01 GMT):
5429 is ready to merge as soon as 6423 and 6425 are merged. I have comments on the latter two (which are trivial to address). thanks!

greg.haskins (Fri, 24 Feb 2017 04:18:55 GMT):
@jimthematrix thanks for the fast review. I made the changes you requested

jimthematrix (Fri, 24 Feb 2017 04:39:15 GMT):
all merged, thanks @greg.haskins !

grapebaba (Fri, 24 Feb 2017 07:07:12 GMT):
@jimthematrix @greg.haskins I asked @muralisr that if we still need chaincode path for instantiate, he tested and reply it needed right now, i am implementing python SDK per node SDK, would you like help to check

jimthematrix (Fri, 24 Feb 2017 11:55:59 GMT):
@grapebaba I tried with the following commit level and the path wasn't needed. will double check with Murali today

jimthematrix (Fri, 24 Feb 2017 11:55:59 GMT):
@grapebaba I tried with the following commit level and the path wasn't needed. will double check with Murali today ```commit 4013cb6130842c5866600bafc9dc91ced8d63f40 Author: Jason Yellick Date: Wed Feb 22 12:17:34 2017 -0500 [FAB-2432] Encode anchor peers from configtx.yaml```

grapebaba (Fri, 24 Feb 2017 12:00:38 GMT):
Thanks, as I also feel don't need

muralisr (Fri, 24 Feb 2017 12:44:13 GMT):
@grapebaba @jimthematrix +1 that ... but I ran into something (could be unrelated) I want to check first

greg.haskins (Fri, 24 Feb 2017 13:21:09 GMT):
@grapebaba @jimthematrix I was just talking to @muralisr yesterday...technically the chaincode protos are in desperate need of an overhaul

greg.haskins (Fri, 24 Feb 2017 13:21:40 GMT):
theres a bunch of stuff that just grew organically over the last 18 months that no longer makes sense, and I think its confusing clients such as the SDKs

greg.haskins (Fri, 24 Feb 2017 13:22:00 GMT):
now the question is: tackle before v1.0 or not

greg.haskins (Fri, 24 Feb 2017 13:22:31 GMT):
heres an example: the TYPE really only makes sense for install(), but its used everywhere

greg.haskins (Fri, 24 Feb 2017 13:22:53 GMT):
another example: install doesn't take args[]

greg.haskins (Fri, 24 Feb 2017 13:22:55 GMT):
etc etc

greg.haskins (Fri, 24 Feb 2017 13:23:02 GMT):
theres a bunch of things like that

muralisr (Fri, 24 Feb 2017 13:25:08 GMT):
@greg.haskins I was thinking about your suggestion to flatten the structures into an invocation and deployement structure

greg.haskins (Fri, 24 Feb 2017 13:25:34 GMT):
@muralisr and I am not married to that topology per se, just in the general notion that it needs to be rethought

muralisr (Fri, 24 Feb 2017 13:25:50 GMT):
right

greg.haskins (Fri, 24 Feb 2017 13:25:54 GMT):
that was just my first stab at cleaning it up

greg.haskins (Fri, 24 Feb 2017 13:26:27 GMT):
heres a couple of areas that I didnt address in the prototype I shared yesterday

greg.haskins (Fri, 24 Feb 2017 13:26:53 GMT):
we need a clear understanding of "installed image id" and "active chaincode instance id"

greg.haskins (Fri, 24 Feb 2017 13:27:29 GMT):
were install only deals with the former, invoke only deals with the latter, and instantiate deals with both

greg.haskins (Fri, 24 Feb 2017 13:27:29 GMT):
where install only deals with the former, invoke only deals with the latter, and instantiate deals with both

greg.haskins (Fri, 24 Feb 2017 13:27:56 GMT):
right now we kind of lump them both in as "chaincodeID.Name"

muralisr (Fri, 24 Feb 2017 13:28:16 GMT):
The name is the unique user specified identified

muralisr (Fri, 24 Feb 2017 13:28:16 GMT):
The name is the unique user specified identifier

greg.haskins (Fri, 24 Feb 2017 13:28:34 GMT):
understood, but there are two domains

greg.haskins (Fri, 24 Feb 2017 13:28:40 GMT):
thats all I am getting at

greg.haskins (Fri, 24 Feb 2017 13:28:55 GMT):
im also trying to think ahead of a hierarchical namespace ;)

greg.haskins (Fri, 24 Feb 2017 13:28:55 GMT):
im also trying to think ahead to a hierarchical namespace ;)

ray (Fri, 24 Feb 2017 14:31:14 GMT):
Has joined the channel.

cdaughtr (Fri, 24 Feb 2017 19:57:17 GMT):
@jimthematrix @jyellick With today's fabric commit 536a3fd632c0d38bde41563db3997148350bdcc2 Merge "Gossip- Don't log sending to empty slice of peers" end-to-end step1 is getting a different error and see a post in fabric channel about this error also, but no resolution: ```[Peer.js]: GRPC client got an error response from the peer. Error: The creator's signature over the proposal is not valid, err The signature is invalid at /Users/cdaughtr/code/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:417:17```

jyellick (Fri, 24 Feb 2017 19:58:22 GMT):
@cdaughtr please see #fabric-consensus to confirm if this is the same or different issue

cdaughtr (Fri, 24 Feb 2017 20:02:54 GMT):
@jyellick I don't see this issue on fabric-concensus, but do see it on today's fabric https://chat.hyperledger.org/channel/fabric?msg=P5877L6TCtvpCHLdg

jyellick (Fri, 24 Feb 2017 20:03:53 GMT):
@cdaughtr I mean the issue reported by @rickr via https://jira.hyperledger.org/browse/FAB-2463 (which is currently being discussed (slowly) in #fabric-consensus )

jyellick (Fri, 24 Feb 2017 20:04:33 GMT):
Essentially, I believe that this is all related to the fact that the lifecycle system chaincode recently started requiring that the admin policy be satisfied

cdaughtr (Fri, 24 Feb 2017 20:04:34 GMT):
yes, it's the same, thanks

pmullaney (Fri, 24 Feb 2017 23:17:43 GMT):
anyone having issues like the following:

pmullaney (Fri, 24 Feb 2017 23:17:47 GMT):
error: [Peer.js]: GRPC client got an error response from the peer. Error: The creator's signature over the proposal is not valid, err The signature is invalid at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17

pmullaney (Fri, 24 Feb 2017 23:18:46 GMT):
I updated to the latest fabric, fabric-sdk-node and fabric-ca

pmullaney (Fri, 24 Feb 2017 23:19:45 GMT):
fabric-ca's docker image was broken(fabric-ca did not start) so I went back to sha 18babf81a771b53dcd86d3149f4eb888bb80a7c7, starts but gets the above error

rickr (Fri, 24 Feb 2017 23:37:42 GMT):
https://jira.hyperledger.org/browse/FAB-2463

cdaughtr (Sat, 25 Feb 2017 15:36:35 GMT):
@pmullaney The topic is being worked on #fabric, but so far no updates today.

muralisr (Sat, 25 Feb 2017 15:39:44 GMT):
@pmullaney I'll be trying this out soon

vdods (Sat, 25 Feb 2017 19:26:59 GMT):
Has joined the channel.

vdods (Sat, 25 Feb 2017 19:30:24 GMT):
Hey all, I'm getting up to speed on the use of fabric 1.0 and fabric-sdk-node (which I believe corresponds to the latest state of fabric and fabric-ca 1.0), and am trying to run the unit tests. I noticed that the docker-compose.yml executes `fabric-ca server ...` but the executables in the current `hyperledger/fabric-ca` docker image are `fabric-ca-server` and `fabric-ca-client`. Is this a known discrepancy? Or is the current state of `fabric-sdk-node` to be run against an older version of `fabric-ca`?

vdods (Sat, 25 Feb 2017 19:34:39 GMT):
Hmm.. just found the v1.0-alpha branch. Maybe that's what I'm looking for!

vdods (Sat, 25 Feb 2017 20:05:20 GMT):
Should this be run against `fabric` master branch, or v1.0.0-preview?

vdods (Sat, 25 Feb 2017 20:05:20 GMT):
Should this be run against `fabric` master branch, or v1.0.0-preview? Same question for `fabric-ca`.

wisam.mohammed (Sun, 26 Feb 2017 03:07:01 GMT):
Has joined the channel.

jimthematrix (Sun, 26 Feb 2017 07:15:29 GMT):
@pmullaney http://gerrit.hyperledger.org/r/6541 for a fix to the fabric-ca docker launch problem. `fabric-ca` no longer exists in the latest docker images for fabric-ca

RezwanKabir (Sun, 26 Feb 2017 08:14:58 GMT):
can anyone give an example link on how to enroll new user using grpc.

vdods (Mon, 27 Feb 2017 01:39:56 GMT):
@RezwanKabir Create a new account? The terms used here are a little confusing. That would be "register" a new user. "enroll" should be thought of as logging in an existing user.

vdods (Mon, 27 Feb 2017 01:41:37 GMT):
I'm still learning v1.0, but there should be "register member" and "enroll member" functions in the fabric-ca-client node.js module.

vdods (Mon, 27 Feb 2017 02:20:32 GMT):
Which fabric-sdk-node tests are expected to pass right now? I'm looking to find examples of using the CA and transacting on the peer network from which I can start writing an app

vdods (Mon, 27 Feb 2017 02:30:12 GMT):
I'm running from fabric-sdk-node/test/fixtures `docker-compose up` to start the peer network, orderer, and CA, and then in a separate terminal, from fabric-sdk-node/ running `node test/integration/end-to-end.js` (among others), and I keep getting the error `error: [Peer.js]: GRPC client got an error response from the peer. Error: The creator's signature over the proposal is not valid, err The signature is invalid`

vdods (Mon, 27 Feb 2017 02:33:34 GMT):
My thought is that maybe there's a mismatch in the built-in certs the tests in fabric-sdk-node and in the fabric-peer, fabric-ca docker images -- but that's assuming the tests are expected to pass.

vdods (Mon, 27 Feb 2017 03:33:27 GMT):
N/m -- https://jira.hyperledger.org/browse/FAB-2463

jimthematrix (Mon, 27 Feb 2017 04:38:35 GMT):
@cdaughtr @bretharrison @rickr https://chat.hyperledger.org/channel/fabric-pr-review?msg=xpbagBsJ4EFoZfPCi

uber.twin (Mon, 27 Feb 2017 10:50:08 GMT):
Has joined the channel.

uber.twin (Mon, 27 Feb 2017 10:52:32 GMT):
hi, is there such a thing as a javadoc style API documentation for the fabric-sdk-node?

weeds (Mon, 27 Feb 2017 13:28:34 GMT):
@uber.twin They jave a Java SDK that they are working as part of the base now. I would suggest asking your question on fabric-sdk-java as the developers working on Java are quite active there.

weeds (Mon, 27 Feb 2017 13:29:32 GMT):
This is relative to version 1.0. There is also a new project called composer that you are able to model/program against the fabric at a higher level construct. IE defining participants, asset, asset properties. For questions on that you can see the channel fabric-composer

uber.twin (Mon, 27 Feb 2017 14:43:04 GMT):
sure, but I meant to look for a Node sdk API doc, similarly how a Java API doc exists for any Java library:)

uber.twin (Mon, 27 Feb 2017 14:47:30 GMT):
I guess there is no such thing as a standard API doc for a node module

jimthematrix (Mon, 27 Feb 2017 16:44:35 GMT):
@uber.twin if you run `gulp doc` in the fabric-sdk-node project it'll produce the documentation html, we are looking at publishing it somewhere for easy access

jimthematrix (Mon, 27 Feb 2017 16:50:56 GMT):
@pmullaney note that BlockMetadataIndex.TRANSACTIONS_FILTER in the block has been changed from bit array to byte array (so that reason code for rejection can be set in that byte)

jimthematrix (Mon, 27 Feb 2017 16:52:12 GMT):
https://jira.hyperledger.org/browse/FAB-2017

greg.haskins (Mon, 27 Feb 2017 21:05:15 GMT):
@jimthematrix second phase complete: https://gerrit.hyperledger.org/r/#/c/6583/

greg.haskins (Mon, 27 Feb 2017 21:27:39 GMT):
```error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: The proposal does not comply with the channel writers for channel testchainid, error Failed to reach implicit threshold of 1 sub-policies, required 1 remaining```

greg.haskins (Mon, 27 Feb 2017 21:27:46 GMT):
any idea what this new error means?

mastersingh24 (Mon, 27 Feb 2017 21:55:30 GMT):
@jimthematrix - what are the plan for the "create channel" API in the SDK? Right now I see that it takes as input a serialized structure (basically the output of the configtx tool).

mastersingh24 (Mon, 27 Feb 2017 21:55:50 GMT):
will we be able to actually create that structure in the SDK itself?

jimthematrix (Mon, 27 Feb 2017 21:57:26 GMT):
@mastersingh24 i'd like to do that at some point, like using the yaml but trouble is you'd have to organize an army of files (.pem files in myriad of folders) in order to generate the right binary

mastersingh24 (Mon, 27 Feb 2017 21:58:06 GMT):
ok - so let's say I was to start working on something like that - would that be ok?

mastersingh24 (Mon, 27 Feb 2017 21:58:13 GMT):
meaning no one else is on it?

jimthematrix (Mon, 27 Feb 2017 21:58:13 GMT):
that being said, this is exactly what I'm trying to figure out so hopefully we'll have a "configtx" folder in test/fixtures that at least gives an example of how this may get done

jimthematrix (Mon, 27 Feb 2017 21:58:31 GMT):
oh yes please ;-) by all means

mastersingh24 (Mon, 27 Feb 2017 21:59:11 GMT):
ok - I already built a parser for the serialized version so I could see what the heck was in it

mastersingh24 (Mon, 27 Feb 2017 21:59:46 GMT):
I'm also almost done with a Go-based tool which generates all the crypto needed to spin up a variable network

mastersingh24 (Mon, 27 Feb 2017 22:00:19 GMT):
you tell it how many members (e.g. root CAs), how many peers per member, etc

mastersingh24 (Mon, 27 Feb 2017 22:00:54 GMT):
and it generates all the crypto needed - and puts it in nice MSP folder structure

mastersingh24 (Mon, 27 Feb 2017 22:01:14 GMT):
(basically, doing this was the only way I could understand how it all actually works) ;)

jimthematrix (Mon, 27 Feb 2017 22:03:18 GMT):
does it also generate the admincerts and policies etc? that's an area i'm still not too clear about yet...

jimthematrix (Mon, 27 Feb 2017 22:03:18 GMT):
does it also generate the admincerts and policies etc? that's an area i'm still not too clear about yet... (as far as how it's supposed to work)

greg.haskins (Mon, 27 Feb 2017 22:04:18 GMT):
@jimthematrix @cdaughtr this seems to be the commit with the broken logic: fa135f37

greg.haskins (Mon, 27 Feb 2017 22:04:33 GMT):
do we know why chaincodePath was re-added to the instantiate?

greg.haskins (Mon, 27 Feb 2017 22:04:49 GMT):
I suspect I know, but want to confirm

jimthematrix (Mon, 27 Feb 2017 22:05:12 GMT):
@greg.haskins without the chaincodePath we get a docker build error

greg.haskins (Mon, 27 Feb 2017 22:05:56 GMT):
ok, i need to investigate further, but I think that is papering over a peer bug

cdaughtr (Mon, 27 Feb 2017 22:05:56 GMT):
@greg.haskins in instantiate, I’m getting `[Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Error starting container: Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL cannot be empty`. If I add the path to the request, the error goes away.

greg.haskins (Mon, 27 Feb 2017 22:06:30 GMT):
@cdaughtr yes, ok...we should fix the peer...adding it to the SDK doesnt make sense...ill see what I can do

jimthematrix (Mon, 27 Feb 2017 22:06:40 GMT):
agree

jimthematrix (Mon, 27 Feb 2017 22:07:08 GMT):
we fixed it over the weekend since it wasn't easy to coordinate the right fix

greg.haskins (Mon, 27 Feb 2017 22:07:15 GMT):
understood

jimthematrix (Mon, 27 Feb 2017 22:07:21 GMT):
but i agree not having that for instantiate makes more sense

greg.haskins (Mon, 27 Feb 2017 22:07:39 GMT):
yeah, really, the entire proto for chaincode needs an overhaul

greg.haskins (Mon, 27 Feb 2017 22:07:45 GMT):
this is just one more example

greg.haskins (Mon, 27 Feb 2017 22:08:03 GMT):
not sure I will tackle that just yet, though

jimthematrix (Mon, 27 Feb 2017 22:08:31 GMT):
needs an overhaul - :scream:

greg.haskins (Mon, 27 Feb 2017 22:08:49 GMT):
yeah, but we either do it now or never

greg.haskins (Mon, 27 Feb 2017 22:08:52 GMT):
so thats the question

greg.haskins (Mon, 27 Feb 2017 22:09:06 GMT):
as an example though, it makes no sense to send a DeploymentSpec to instantiate

greg.haskins (Mon, 27 Feb 2017 22:09:25 GMT):
nor does it make sense to send args to an install(), etc etc

greg.haskins (Mon, 27 Feb 2017 22:25:43 GMT):
@jimthematrix @cdaughtr I put this in for now: https://gerrit.hyperledger.org/r/#/c/6591/1/fabric-client/lib/Chain.js

greg.haskins (Mon, 27 Feb 2017 22:26:41 GMT):
@jimthematrix but now I am right back to the proto problem, investigating

jimthematrix (Mon, 27 Feb 2017 22:27:49 GMT):
thanks, looks good for now, java chaincode is still being investigated by @sanchezl so we'll see... but limiting this to golang right now sounds good

muralisr (Mon, 27 Feb 2017 22:28:11 GMT):
@jum

muralisr (Mon, 27 Feb 2017 22:28:11 GMT):
@jimthematrix was working with @sanchezl on java chaincode

greg.haskins (Mon, 27 Feb 2017 22:28:17 GMT):
@jimthematrix early result so far, but I _think_ the error I am seeing has to do with the proposal

greg.haskins (Mon, 27 Feb 2017 22:28:57 GMT):
```< error: [Peer.js]: GRPC client got an error response from the peer. Error: Transaction returned with failure: Incorrect number of arguments. Expecting 4 < at /Users/ghaskins/sandbox/git/chaintool/examples/example02/client/nodejs/node_modules/grpc/src/node/src/client.js:434:17 exception in node_modules/fabric-client/lib/Peer.js:191 Error: Error: Transaction returned with failure: Incorrect number of arguments. Expecting 4 189 if (err) { 190 logger.error('GRPC client got an error response from the peer. %s', err.stack ? err.stack : err); >191 reject(new Error(err)); 192 } else { 193 if (proposalResponse) { backtrace #0 Peer.js:191:6 #1 client.js:437:14```

muralisr (Mon, 27 Feb 2017 22:29:17 GMT):
will leave it to @sanchezl to update but I think we are on track to get something working there

jimthematrix (Mon, 27 Feb 2017 22:30:30 GMT):
Greg what proposal are you sending that resulted in the error above?

jimthematrix (Mon, 27 Feb 2017 22:30:44 GMT):
instantiate, invoke?

jimthematrix (Mon, 27 Feb 2017 22:31:07 GMT):
seems an error from the chaincode

greg.haskins (Mon, 27 Feb 2017 22:33:48 GMT):
instantiate

greg.haskins (Mon, 27 Feb 2017 22:34:42 GMT):
it could very well be in the chaincode, its not clear

greg.haskins (Mon, 27 Feb 2017 22:35:00 GMT):
ill probably have to dlv the peer

greg.haskins (Mon, 27 Feb 2017 22:35:46 GMT):
ah, the error is reported on the peer side too, good call

grapebaba (Tue, 28 Feb 2017 01:58:14 GMT):
@jimthematrix @greg.haskins @muralisr Would you like tell me which peer version/commt level while you are testing?

grapebaba (Tue, 28 Feb 2017 01:59:17 GMT):
I prepare do first chaicode installment test recently, since we refer to the latest code of node SDK

Ying (Tue, 28 Feb 2017 03:17:30 GMT):
hi, anybody knows roadmap of channel api in node sdk? It would be great if we can control the creating of channel via sdk... Thanks for any information.

grapebaba (Tue, 28 Feb 2017 05:45:34 GMT):
@Ying it seems there is already a createChannel API. You can check https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/new-chain.js

Ying (Tue, 28 Feb 2017 05:51:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=P5xngF9kJC3oQQRXx) Thanks! @grapebaba I'm checking...

Ying (Tue, 28 Feb 2017 06:05:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XPE4d2tmx3ji5LSx2) @grapebaba Do you mean fabric-client/lib/Chain.js:initializeChain() creates a channel? I cannot find how it pass channelID to peers, like CLI does in peer channel create -c myc2. Would you advice more? Thank you very much.

Ying (Tue, 28 Feb 2017 06:09:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XPE4d2tmx3ji5LSx2) @grapebaba , got it~~ I need pull updates. Thank you very much.

nharshita (Tue, 28 Feb 2017 09:29:03 GMT):
Has joined the channel.

uber.twin (Tue, 28 Feb 2017 09:46:56 GMT):
@jimthematrix thank you for the doc generation advice

uber.twin (Tue, 28 Feb 2017 09:48:56 GMT):
could anybody have a clue why my git is unable to connect to repositories when is launched by npm?

uber.twin (Tue, 28 Feb 2017 09:49:24 GMT):
it works fine when I use it directly

Vadim (Tue, 28 Feb 2017 09:55:47 GMT):
@uber.twin probably it cannot authenticate itself

Vadim (Tue, 28 Feb 2017 09:56:29 GMT):
how do you specify the connection string in package.json?

uber.twin (Tue, 28 Feb 2017 09:57:59 GMT):
it is the standard fabric-sdk-node package.json

uber.twin (Tue, 28 Feb 2017 09:58:34 GMT):
it fails to clone dependencies when I do npm install

Vadim (Tue, 28 Feb 2017 09:59:20 GMT):
why do you think it needs git?

uber.twin (Tue, 28 Feb 2017 09:59:32 GMT):
npm ERR! git submodule -q update --init --recursive: fatal: unable to connect to github.com: npm ERR! git submodule -q update --init --recursive: github.com[0: 192.30.253.112]: errno=Connection refused npm ERR! git submodule -q update --init --recursive: github.com[1: 192.30.253.113]: errno=Connection refused npm ERR! git submodule -q update --init --recursive: npm ERR! git submodule -q update --init --recursive: fatal: clone of 'git://github.com/davepacheco/javascriptlint.git' into submodule path 'deps/javascriptlint' failed

Vadim (Tue, 28 Feb 2017 10:00:13 GMT):
seems like some proxy error

Vadim (Tue, 28 Feb 2017 10:00:35 GMT):
for me it works

uber.twin (Tue, 28 Feb 2017 10:57:17 GMT):
I did all the proxy settings and it still didn't work

uber.twin (Tue, 28 Feb 2017 10:58:00 GMT):
it was a firewall issue(git:// protocol didn't go through)

uber.twin (Tue, 28 Feb 2017 10:58:10 GMT):
git config --global url.https://github.com/.insteadOf git://github.com/

uber.twin (Tue, 28 Feb 2017 10:58:18 GMT):
this thing solved it

davidkel (Tue, 28 Feb 2017 12:56:56 GMT):
I've pulled the latest docker images and the latest sdk-node but I still cannot invoke instantiate as it fails with the following error still (install has always worked) ``` {"message":"Error: The creator's signature over the proposal is not valid, err The signature is invalid","stack":"Error: Error: The creator's signature over the proposal is not valid, err The signature is invalid\n at Object.callback (/home/vagrant/fabric-sdk-node/fabric-client/lib/Peer.js:191:13)\n at /home/vagrant/fabric-sdk-node/fabric-client/node_modules/grpc/src/node/src/client.js:437:14"}$ Error: Error: The creator's signature over the proposal is not valid, err The signature is invalid ``` I've tried my own channel and testchainid but no difference. In the code we first issue an install and when we get a good response back we then issue instantiate. Any suggestions on how I might investigate further ? I would like to be able to get this going as it is a fundamental feature to be able to install and instantiate

Vadim (Tue, 28 Feb 2017 12:57:58 GMT):
you tried if it works from the command line?

davidkel (Tue, 28 Feb 2017 13:03:33 GMT):
hi @Vadim I haven't, but in our case it has to work through the node sdk

Vadim (Tue, 28 Feb 2017 13:04:13 GMT):
I understand, but if you try this in command line and it has the same error message, you should probably ask on the #fabric channel

davidkel (Tue, 28 Feb 2017 13:21:32 GMT):
Thanks @Vadim I gave it a try and didn't get the same error but it looks like the chaincode was not actually installed into the peer. ``` Error: Error endorsing chaincode: rpc error: code = 2 desc = open /var/hyperledger/production/chaincodes/digitalproperty-network.1.0: no such file or directory ``` I didn't get an error from the node sdk to say the install failed.

davidkel (Tue, 28 Feb 2017 13:21:32 GMT):
Thanks @Vadim I gave it a try and didn't get the same error but it looks like the chaincode was not actually installed into the peer. ``` Error: Error endorsing chaincode: rpc error: code = 2 desc = open /var/hyperledger/production/chaincodes/digitalproperty-network.1.0: no such file or directory ``` I wasn't checking the responses from the peers properly after the install. The code fails to install now for the same reasons as the instantiate. The signature isn't valid

davidkel (Tue, 28 Feb 2017 14:21:01 GMT):
solved it, it looks like there is a change still outstanding for the node sdk and by changing the default.json in the config dir to use SHA3 instead of SHA2 allows me to do an install and instantiate proposal.

greg.haskins (Tue, 28 Feb 2017 15:59:48 GMT):
@jimthematrix im back to looking at a problem i touched upon yesterday

greg.haskins (Tue, 28 Feb 2017 15:59:55 GMT):
I am getting this error in the latest code

greg.haskins (Tue, 28 Feb 2017 16:00:12 GMT):
```Error: Illegal value for [object Object] of type message: object (object expected)```

greg.haskins (Tue, 28 Feb 2017 16:00:38 GMT):
it happens in the sendTransaction()

greg.haskins (Tue, 28 Feb 2017 16:00:45 GMT):
here is the bt

greg.haskins (Tue, 28 Feb 2017 16:01:10 GMT):
```Error: Illegal value for [object Object] of type message: object (object expected) 1799 var self = this; 1800 function fail(val, msg) { >1801 throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); 1802 } 1803 switch (this.type) { backtrace #0 protobuf.js:1801:17 #1 ProtoBuf.Reflect.ElementPrototype.verifyValue protobuf.js:1897:25 #2 ProtoBuf.Reflect.FieldPrototype.verifyValue protobuf.js:3455:43 #3 setter protobuf.js:2564:77 #4 Chain.js:1535:27 #5 util.js:45:22 #6 module.exports.processResponse util.js:89:14 #7 chain.sendInstallProposal.then client.js:95:26```

greg.haskins (Tue, 28 Feb 2017 16:01:13 GMT):
where

greg.haskins (Tue, 28 Feb 2017 16:01:51 GMT):
line 18 here: http://pastebin.com/QuzVJgPG

greg.haskins (Tue, 28 Feb 2017 16:02:00 GMT):
is the same as Chain.js:1535:27

greg.haskins (Tue, 28 Feb 2017 16:02:15 GMT):
I _think_ whats happening is that there are no endorsements

greg.haskins (Tue, 28 Feb 2017 16:02:36 GMT):
thus "var endorsements = []" is left untouched

greg.haskins (Tue, 28 Feb 2017 16:02:45 GMT):
thats kind of a guess

greg.haskins (Tue, 28 Feb 2017 16:03:05 GMT):
ring any bells?

greg.haskins (Tue, 28 Feb 2017 16:03:40 GMT):
@muralisr my guess is this may touch upon your domain too

greg.haskins (Tue, 28 Feb 2017 16:03:51 GMT):
e.g. why am I not getting endorsements for an install()

greg.haskins (Tue, 28 Feb 2017 16:04:21 GMT):
ill dump out the proposal response next for insights

muralisr (Tue, 28 Feb 2017 16:07:55 GMT):
@greg.haskins right. Install being a "peer only" operation is not submitted as a transaction to be committed (nothing to commit). We *could* do endorsement too if there's value in that ...

greg.haskins (Tue, 28 Feb 2017 16:08:13 GMT):
@muralisr ah!

greg.haskins (Tue, 28 Feb 2017 16:08:16 GMT):
bingo, ty

greg.haskins (Tue, 28 Feb 2017 16:08:21 GMT):
that makes sense

greg.haskins (Tue, 28 Feb 2017 16:08:45 GMT):
(sorry, porting my clients from old deploy to new install/instantiate, so I just duplicated the deploy function

muralisr (Tue, 28 Feb 2017 16:09:01 GMT):
not at all... thank you for raising these!

greg.haskins (Tue, 28 Feb 2017 16:09:13 GMT):
so basically if the installProposal comes back, i am good to go?

muralisr (Tue, 28 Feb 2017 16:09:27 GMT):
with a 0 or 200 (ie, no error)

greg.haskins (Tue, 28 Feb 2017 16:09:31 GMT):
right, ok

muralisr (Tue, 28 Feb 2017 16:09:33 GMT):
right

greg.haskins (Tue, 28 Feb 2017 16:09:45 GMT):
I wonder if the SDK should not call it "proposal" then

greg.haskins (Tue, 28 Feb 2017 16:09:49 GMT):
just sendInstall()

muralisr (Tue, 28 Feb 2017 16:12:27 GMT):
don't want to derail that ^^^ but let me add one other thing about the install please as it is apropos... this makes it all the more important to package the install properly so its properly linkable from a ownership/administration/ACL point of view to the later instantiate... will propose a JIRA for that @greg.haskins ...been saying that for a while but haven't gotten to tthat yet

greg.haskins (Tue, 28 Feb 2017 16:13:17 GMT):
cool...I _think_ I know what you are saying...i would add to that as a related tangent: we should think about stuffing those into a db, not the fs

greg.haskins (Tue, 28 Feb 2017 16:13:31 GMT):
even if we just open a new leveldb in /var/hyperledger

muralisr (Tue, 28 Feb 2017 16:13:38 GMT):
good point

muralisr (Tue, 28 Feb 2017 16:13:47 GMT):
agreed

greg.haskins (Tue, 28 Feb 2017 16:14:06 GMT):
just from an atomicity perspective, etc, but it would also be convenient for the packaging metadata you are talking about now

muralisr (Tue, 28 Feb 2017 16:14:32 GMT):
absolutely... its also nice these are orthogonal

greg.haskins (Tue, 28 Feb 2017 16:14:38 GMT):
right

muralisr (Tue, 28 Feb 2017 16:14:38 GMT):
we can do this in steps

greg.haskins (Tue, 28 Feb 2017 16:14:42 GMT):
yep

greg.haskins (Tue, 28 Feb 2017 16:15:06 GMT):
btw: that did solve my install() errors, so thanks for the hint

muralisr (Tue, 28 Feb 2017 16:15:30 GMT):
(ok will shut up now ... and roll up the stack to `I wonder if the SDK should not call it "proposal" then just sendInstall()` )

greg.haskins (Tue, 28 Feb 2017 16:15:40 GMT):
ill file a bug against the SDK that it should probably handle 0-endorsements gracefully ;)

tzipih0 (Tue, 28 Feb 2017 16:16:09 GMT):
Hi I am working with the SDK node and have two questions:

tzipih0 (Tue, 28 Feb 2017 16:16:21 GMT):
can we un-deploy a chaincode or deploy a chaincode over a running one, without having to taking resetting the fabric?

tzipih0 (Tue, 28 Feb 2017 16:16:40 GMT):
Also, is there a way to ensure that a proposal needs to be signed by multiple endorsers? Currently it seems that a single endorsement is sufficient and I have not found a way to ask for multiple endorsements.

tzipih0 (Tue, 28 Feb 2017 16:16:43 GMT):
Thanks!

muralisr (Tue, 28 Feb 2017 16:17:17 GMT):
let me take the `can we un-deploy a chaincode or deploy a chaincode over a running one, without having to taking resetting the fabric?` part @jimthematrix @greg.haskins

muralisr (Tue, 28 Feb 2017 16:18:25 GMT):
@tzipih0 there's an upgrade operation supported in the fabric that should be used for this purpose... assume this will be in SDK (if its not already there at some point)

tzipih0 (Tue, 28 Feb 2017 16:19:45 GMT):
so I can un-deploy from one terminal and deploy from another one at the same time and this will work?

muralisr (Tue, 28 Feb 2017 16:20:14 GMT):
you can deploy in one and upgrade in another

muralisr (Tue, 28 Feb 2017 16:20:43 GMT):
there are details of course, but the bottomline is you cannot "remove" a chaincode state from the ledger

tzipih0 (Tue, 28 Feb 2017 16:21:12 GMT):
OK. So how do I upgrade the other one?

tzipih0 (Tue, 28 Feb 2017 16:23:21 GMT):
can I un-deploy it (take it down)? Is this considered an upgrade?

muralisr (Tue, 28 Feb 2017 16:24:07 GMT):
The chaincode once instantiated on a channel cannot be removed from the ledger...

greg.haskins (Tue, 28 Feb 2017 16:24:13 GMT):
@muralisr @jimthematrix https://jira.hyperledger.org/browse/FAB-2538

tzipih0 (Tue, 28 Feb 2017 16:25:25 GMT):
OK. But when I make chances I re-deploy. so the currently deployed one can continue being deployed as well?

greg.haskins (Tue, 28 Feb 2017 16:25:35 GMT):
@muralisr not sure whats possible today, but I would think that "undeploy" in general could at least be supported in the sense of destroying the instance-id at that point in time and forward

greg.haskins (Tue, 28 Feb 2017 16:25:35 GMT):
@muralisr not sure whats possible today, but I would think that "undeploy" in general could at least be supported in the sense of destroying the instance-id as a valid endpoint at that point in time and forward

greg.haskins (Tue, 28 Feb 2017 16:26:06 GMT):
obviously the history of the chaincode being on the ledger would persist, but that isnt the same thing as having the code be an active endpoint

tzipih0 (Tue, 28 Feb 2017 16:28:09 GMT):
OK, I will try to re-deploy from another terminal. Thanks.

tzipih0 (Tue, 28 Feb 2017 16:28:43 GMT):
regarding my other question - is there a way to ensure that a proposal needs to be signed by multiple endorsers? Currently it seems that a single endorsement is sufficient and I have not found a way to ask for multiple endorsements.

tzipih0 (Tue, 28 Feb 2017 16:29:12 GMT):
I know this is in the 1.0 spec but looked at the code and was not sure the support is implemented already

tzipih0 (Tue, 28 Feb 2017 16:31:41 GMT):
can anyone chime in on this? This is central to my app. and I am trying to figure out if I can already use this feature or wait for the implementation Thanks!

tzipih0 (Tue, 28 Feb 2017 16:35:19 GMT):
Thanks for the help :) FAB-2538 talks about 0 endorsers. I would like to ensure at least two endorsers have to endorse in order to validate.

greg.haskins (Tue, 28 Feb 2017 16:43:02 GMT):
@tzipih0 sorry, FAB-2538 was not in response to your questions

greg.haskins (Tue, 28 Feb 2017 16:43:05 GMT):
parallel conversation

greg.haskins (Tue, 28 Feb 2017 16:43:31 GMT):
your question about endorsers makes sense to me, but I dont know the answer

tzipih0 (Tue, 28 Feb 2017 16:44:30 GMT):
Do you know who is working on this?

muralisr (Tue, 28 Feb 2017 16:50:44 GMT):
@greg.haskins `but I would think that "undeploy" in general could at least be supported in the sense of destroying the instance-id as a valid endpoint at that point in time and forward` - that would be doable ... basically via a state in LCCC.

muralisr (Tue, 28 Feb 2017 16:51:33 GMT):
@tzipih0 multiple endorsement's is supported in the fabric... but I guess your question is about the availability in SDK ?

tzipih0 (Tue, 28 Feb 2017 16:54:01 GMT):
also in SDK

tzipih0 (Tue, 28 Feb 2017 16:54:14 GMT):
is it already supported in the fabric? I looked at the code and was not sure

muralisr (Tue, 28 Feb 2017 16:56:30 GMT):
to have multiple endorsements, you send the code to multiple peers

muralisr (Tue, 28 Feb 2017 16:56:30 GMT):
to have multiple endorsements, you send the code to multiple peers from SDK

tzipih0 (Tue, 28 Feb 2017 16:56:54 GMT):
I want the transaction not to be approved if 2 peers do not endorse it

tzipih0 (Tue, 28 Feb 2017 16:57:00 GMT):
so if I send it to 1 peer it is rejected

muralisr (Tue, 28 Feb 2017 16:57:03 GMT):
yes

tzipih0 (Tue, 28 Feb 2017 16:57:05 GMT):
to specify such a policy

muralisr (Tue, 28 Feb 2017 16:57:24 GMT):
the peer supports the ability to specify such a policy

muralisr (Tue, 28 Feb 2017 16:58:29 GMT):
at the time of instantiating a chaincode on a channel you can also specify the endorsment policy

muralisr (Tue, 28 Feb 2017 16:58:43 GMT):
the default is 1 signature

tzipih0 (Tue, 28 Feb 2017 16:59:21 GMT):
great.

tzipih0 (Tue, 28 Feb 2017 16:59:43 GMT):
so how do I specify it? from the SDK?

tzipih0 (Tue, 28 Feb 2017 17:02:25 GMT):
I know it is described in section 3.3 in the spec

tzipih0 (Tue, 28 Feb 2017 17:02:38 GMT):
is there an example somewhere that implements this?

tzipih0 (Tue, 28 Feb 2017 17:03:14 GMT):
preferably from the sdk or just any example?

tzipih0 (Tue, 28 Feb 2017 17:23:58 GMT):
Thanks for all the help :) I appreciate it...

greg.haskins (Tue, 28 Feb 2017 21:34:29 GMT):
@jimthematrix what is the best way to make the SDK less chatty?

greg.haskins (Tue, 28 Feb 2017 21:34:55 GMT):
that said, it seems much of the "info" chatter should probably be "debug"

greg.haskins (Tue, 28 Feb 2017 21:35:07 GMT):
(I mean w.r.t. the log, not the protocol)

jimthematrix (Tue, 28 Feb 2017 21:50:18 GMT):
hi Greg, I believe we have been trying to be discreet about the info() statements, reserving to constructors

jimthematrix (Tue, 28 Feb 2017 21:50:42 GMT):
if you see info messages that should have been debug, feel free to submit a CR.

jimthematrix (Tue, 28 Feb 2017 21:51:06 GMT):
on the other hand, most of the tests turn on debug, which I personally think is an overkill

l1nux (Tue, 28 Feb 2017 22:46:07 GMT):
Has joined the channel.

greg.haskins (Wed, 01 Mar 2017 01:33:30 GMT):
@jimthematrix I guess I am not sure...all I know is that my application is a bit chatty with SDK logs, perhaps that was what was intended though

greg.haskins (Wed, 01 Mar 2017 01:33:48 GMT):
on a different note, CR6641 and CR6583 are ready for your re-review

greg.haskins (Wed, 01 Mar 2017 01:34:24 GMT):
@jimthematrix is there a way (say with an envvar) to change it to WARN or something along those lines?

jimthematrix (Wed, 01 Mar 2017 03:06:38 GMT):
@greg.haskins HFC_LOGGING='{"warn":"console"}'

greg.haskins (Wed, 01 Mar 2017 05:26:00 GMT):
ty

antitoine (Wed, 01 Mar 2017 10:39:49 GMT):
Has joined the channel.

uber.twin (Wed, 01 Mar 2017 11:10:29 GMT):
hi, is there any standard mechanism for user authorization in regard with granting access only on certain chaincode routines?

uber.twin (Wed, 01 Mar 2017 11:15:44 GMT):
I mean something like a role based access schema

dselman (Wed, 01 Mar 2017 11:52:58 GMT):
@uber.twin slightly off-topic, but #fabric-composer has ACLs: https://fabric-composer.github.io/reference/acl_language.html

dselman (Wed, 01 Mar 2017 11:53:21 GMT):
Different programming model though -- higher level than writing Go chaincode.

uber.twin (Wed, 01 Mar 2017 12:24:07 GMT):
@dselman Go ain't particularly appealing to me anyway and this thing looks great, I'll give it a try, thanks a lot.

Donald Liu (Thu, 02 Mar 2017 01:27:46 GMT):
Has joined the channel.

bh4rtp (Thu, 02 Mar 2017 06:23:12 GMT):
Has joined the channel.

warm3snow (Thu, 02 Mar 2017 08:30:07 GMT):
Has joined the channel.

bh4rtp (Thu, 02 Mar 2017 08:31:44 GMT):
hi everyone. is there a web client example using node.js sdk which demonstrates a simple hyperledger appliation including complete components of nodes deployment and client development?

bh4rtp (Thu, 02 Mar 2017 08:31:44 GMT):
hi everyone. is there a web client example using node.js sdk which demonstrates a simple hyperledger application including complete components of nodes deployment and client development?

antitoine (Thu, 02 Mar 2017 08:38:19 GMT):
Hi, I'm currently reading the marbles example here https://github.com/ibm-blockchain/marbles/tree/v3.0 and following the tutorial here https://github.com/IBM-Blockchain/marbles/blob/v3.0/docs/tutorial_part1.md maybe is what you need ?

antitoine (Thu, 02 Mar 2017 08:38:19 GMT):
@bh4rtp Hi, I'm currently reading the marbles example here https://github.com/ibm-blockchain/marbles/tree/v3.0 and following the tutorial here https://github.com/IBM-Blockchain/marbles/blob/v3.0/docs/tutorial_part1.md maybe is what you need ?

bh4rtp (Thu, 02 Mar 2017 08:45:20 GMT):
@antitoine thanks!

RezwanKabir (Thu, 02 Mar 2017 08:46:19 GMT):
Can anyone suggest me what I am missing form the debug console

RezwanKabir (Thu, 02 Mar 2017 08:46:19 GMT):
C:\Docker\fabric-sdk-node\test\integration>node fabric-ca-services-tests.js info: Returning a new winston logger with default configurations TAP version 13 # FabricCAServices: Test enroll() With Dynamic CSR info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"C:\\Users\\Rez1\\.hfc-key-store"}} ok 1 Successfully enrolled 'admin'. # /CN=admin ok 2 Subject should be /CN=admin ok 3 Successfully imported public key from the resulting enrollment certificate not ok 4 Error: Register failed with errors [[{"code":400,"message":"authorization failure"}]] at IncomingMessage. (C:\Docker\fabric-sdk-node\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:413:22) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) --- operator: fail at: cop.enroll.then.then.then.then.then.then.then.then.then.then.then (C:\Docker\fabric-sdk-node\test\integration\fabric-ca-services-tests.js:142:6) ... ok 5 Successfully enrolled "webAdmin" ok 6 Successfully rejected attempt to register a user of invalid role. TypeError: Cannot read property 'key' of undefined not ok 7 TypeError: Cannot read property '_certificate' of null at Function.generateAuthToken (C:\Docker\fabric-sdk-node\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:445:46) at C:\Docker\fabric-sdk-node\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:388:36 at FabricCAClient.post (C:\Docker\fabric-sdk-node\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:381:10) at C:\Docker\fabric-sdk-node\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:325:16 at FabricCAClient.register (C:\Docker\fabric-sdk-node\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:317:10) at FabricCAServices.register (C:\Docker\fabric-sdk-node\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:95:31) at cop.enroll.then.then.then.then.then.then.then.then.then.then.then.then.then.then (C:\Docker\fabric-sdk-node\test\integration\fabric-ca-services-tests.js:159:15) at process._tickCallback (internal/process/next_tick.js:103:7) --- operator: fail at: cop.enroll.then.then.then.then.then.then.then.then.then.then.then.then.then.then.then.catch (C:\Docker\fabric-sdk-node\test\integration\fabric-ca-services-tests.js:164:6) ... # FabricCAClient: Test enroll With Static CSR # Sending enroll request for user testUser with enrollment secret undefined not ok 8 Failed to enroll 'testUser'. Error: Enrollment failed with errors [[{"code":0,"message":"Incorrect username/password provided"}]] --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... 1..8 # tests 8 # pass 5 # fail 3

DannyWong (Thu, 02 Mar 2017 08:56:48 GMT):
seems quite clear that it shows # Sending enroll request for user testUser with enrollment secret undefined not ok 8 Failed to enroll 'testUser'. Error: Enrollment failed with errors [[{"code":0,"message":"Incorrect username/password provided"}]]

noyonthe1 (Thu, 02 Mar 2017 10:45:15 GMT):
Has joined the channel.

noyonthe1 (Thu, 02 Mar 2017 10:46:22 GMT):
When I run gulp test, I got this below error. Any help around it? $ gulp test [16:08:29] Using gulpfile C:\Hyperledger\fabric-sdk-node\gulpfile.js [16:08:30] Starting 'lint'... [16:08:30] Starting 'pre-test'... C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\config\plugins.js:137 throw err; ^ Error: Failed to load plugin react: Cannot find module 'eslint-plugin-react' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.load (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\config\plugins.js:129:26) at Array.forEach (native) at Object.loadAll (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\config\plugins.js:151:21) at Object.load (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\config\config-file.js:511:21) at loadConfig (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\config.js:63:33) at getPersonalConfig (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\config.js:84:22) at getLocalConfig (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\config.js:155:32) at Config.getConfig (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\config.js:260:26) at processText (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\cli-engine.js:224:33) at CLIEngine.executeOnText (C:\Hyperledger\fabric-sdk-node\node_modules\eslint\lib\cli-engine.js:754:26) at verify (C:\Hyperledger\fabric-sdk-node\node_modules\gulp-eslint\index.js:20:25) at Transform.util.transform [as _transform] (C:\Hyperledger\fabric-sdk-node\node_modules\gulp-eslint\index.js:70:17)

bh4rtp (Thu, 02 Mar 2017 11:14:16 GMT):
@antitoine have you set up the environments and run the example successfully?

antitoine (Thu, 02 Mar 2017 12:10:52 GMT):
@bh4rtp I haven't succeeded with the version 3.0 and after many hours I read this issue https://github.com/IBM-Blockchain/marbles/issues/65, so I switch to the version 2.0 of marbles but I haven't done yet

bh4rtp (Thu, 02 Mar 2017 14:07:09 GMT):
@antitoine thanks for your sharing experiences.

pd93 (Thu, 02 Mar 2017 14:23:17 GMT):
..000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

RyanElliott (Thu, 02 Mar 2017 22:07:11 GMT):
Has joined the channel.

bh4rtp (Fri, 03 Mar 2017 12:30:49 GMT):
hi everyone. to install HFC, i clone the latest v1-alaph branch. and then go to fabric-sdk-node root path, execute command npm install hfc. is this ok?

bh4rtp (Fri, 03 Mar 2017 12:30:49 GMT):
hi everyone. to install hfc, i clone the latest v1-alpha branch. and then go to fabric-sdk-node root path, execute command npm install hfc. is this ok?

Vadim (Fri, 03 Mar 2017 12:31:36 GMT):
I think it should be just "npm install"

bh4rtp (Fri, 03 Mar 2017 12:47:49 GMT):
@Vadim ok. let me have a try.

bh4rtp (Fri, 03 Mar 2017 12:51:52 GMT):
@Vadim it seems not correctly installed. i run node test/unit/couchdb-fabriccop-tests.js and there are 2 fails: info: Returning a new winston logger with default configurations CouchDBClient IP address:port = http://localhost:5984 Key Value Store = ./impl/CouchDBKeyValueStore.js TAP version 13 # Use FabricCAServices with a CouchDB KeyValueStore # Cleanup of existing member_db returned true # Initilize the CouchDB KeyValueStore info: [CouchDBKeyValueStore.js]: No member_db found, creating member_db info: [CouchDBKeyValueStore.js]: Created member_db database # Setting client keyValueStore to: [object Object] ok 1 Successfully set CouchDB KeyValueStore for client # Initialize the CA server connection and KeyValueStore info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} ADD: copService - FabricCAServices : {hostname: localhost, port: 7054} ok 2 Successfully initialized the Fabric CA service. # Set cryptoSuite on client # Begin copService.enroll not ok 3 Failed to enroll admin2 with CA server. Error: Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054] --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... info: [CouchDBKeyValueStore.js]: getValue: admin2, Entry does not exist info: [Client.js]: Failed to load user "admin2" from local key value store not ok 4 Failed to load the user from key value store --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... 1..4 # tests 4 # pass 2 # fail 2

Vadim (Fri, 03 Mar 2017 12:52:24 GMT):
Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]

Vadim (Fri, 03 Mar 2017 12:52:30 GMT):
you have fabric-ca running?

bh4rtp (Fri, 03 Mar 2017 12:54:41 GMT):
@Vadim yes, i have it running. root@ubuntu:/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6edfc64601c6 hyperledger/fabric-ca:latest "/bin/sh -c 'fabri..." 38 seconds ago Up 37 seconds 7054/tcp my-ca a2d16100454a hyperledger/fabric-couchdb:latest "tini -- /docker-e..." 18 minutes ago Up 18 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp my-couchdb

Vadim (Fri, 03 Mar 2017 12:55:04 GMT):
well the sdk cannot reach it

bh4rtp (Fri, 03 Mar 2017 12:58:59 GMT):
@Vadim why cannnot reach it? need i add some configuration?

Vadim (Fri, 03 Mar 2017 12:59:33 GMT):
how did you run fabric-ca in the first place?

bh4rtp (Fri, 03 Mar 2017 13:01:05 GMT):
docker run -d --name my-ca hyperledger/fabric-ca:latest

Vadim (Fri, 03 Mar 2017 13:05:35 GMT):
docker run -d -p 7054:7054 --name my-ca hyperledger/fabric-ca:latest

Vadim (Fri, 03 Mar 2017 13:05:35 GMT):
try docker run -d -p 7054:7054 --name my-ca hyperledger/fabric-ca:latest

Vadim (Fri, 03 Mar 2017 13:05:35 GMT):
try `docker run -d -p 7054:7054 --name my-ca hyperledger/fabric-ca:latest`

bh4rtp (Fri, 03 Mar 2017 13:05:54 GMT):
ok, just a minute.

bh4rtp (Fri, 03 Mar 2017 13:09:31 GMT):
it shows differences now. # Begin copService.enroll not ok 3 Failed to enroll admin2 with CA server. Error: Error: Enrollment failed with errors [[{"code":400,"message":"authorization failure"}]] --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... info: [CouchDBKeyValueStore.js]: getValue: admin2, Entry does not exist info: [Client.js]: Failed to load user "admin2" from local key value store not ok 4 Failed to load the user from key value store --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... 1..4 # tests 4 # pass 2 # fail 2

bh4rtp (Fri, 03 Mar 2017 13:09:31 GMT):
it shows differences now. # Begin copService.enroll not ok 3 Failed to enroll admin2 with CA server. Error: Error: Enrollment failed with errors [[{"code":400,"message":"authorization failure"}]] --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... info: [CouchDBKeyValueStore.js]: getValue: admin2, Entry does not exist info: [Client.js]: Failed to load user "admin2" from local key value store not ok 4 Failed to load the user from key value store --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... 1..4 # tests 4 # pass 2 # fail 2

Vadim (Fri, 03 Mar 2017 13:10:23 GMT):
you probably need to disable tls when running fabric

Vadim (Fri, 03 Mar 2017 13:17:32 GMT):
I don't know how to do it in the image itself, so you can ask that in #fabric-ca. But you can clone the fabric-ca repo and build it and run natively, there it can be disabled quite easily.

bh4rtp (Fri, 03 Mar 2017 13:23:48 GMT):
@Vadim thanks. i am looking for tlsca.cert file and copy it to my-couchdb.

jje (Fri, 03 Mar 2017 13:45:25 GMT):
Has joined the channel.

jje (Fri, 03 Mar 2017 13:49:23 GMT):
Hi, I'm new to the Node SDK, just running an existing application. When making a transmission request I get the following error message>:

jje (Fri, 03 Mar 2017 13:49:27 GMT):
[2017-03-03 12:17:44.575] [ERROR] Supplychain Demo App - [Peer.js]: GRPC client got an error response from the peer. Error: Transaction is not valid. Got [46020875], expected [8164193ba9f9da4996827ef6e42c53d0aab1bb393f078c981425a4c55631aa0d] at /home/ubuntu/work/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 [2017-03-03 12:17:44.576] [ERROR] Supplychain Demo App - [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Transaction is not valid. Got [46020875], expected [8164193ba9f9da4996827ef6e42c53d0aab1bb393f078c981425a4c55631aa0d] at Object.callback (/home/ubuntu/work/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:191:13) at /home/ubuntu/work/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:437:14 [2017-03-03 12:17:44.576] [DEBUG] Supplychain Demo App - [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Transaction is not valid. Got [46020875], expected [8164193ba9f9da4996827ef6e42c53d0aab1bb393f078c981425a4c55631aa0d]

jje (Fri, 03 Mar 2017 13:49:48 GMT):
Can anybody help me to fix this?

bretharrison (Fri, 03 Mar 2017 14:20:21 GMT):
@jje your transaction ID is not built correctly, you may wish to use the utility method on `Chain.buildTransactionID(nonce, userContext)`

bretharrison (Fri, 03 Mar 2017 14:20:53 GMT):
@jje See the end-to-end.js

rameshthoomu (Fri, 03 Mar 2017 14:29:16 GMT):
@bretharrison @jimthematrix observed end-to-end (node) tests are failing consistently in CI... Please refer FAB-2621 (https://jira.hyperledger.org/browse/FAB-2621) for log details and error message.

bretharrison (Fri, 03 Mar 2017 14:30:13 GMT):
looks like the network is not running

rameshthoomu (Fri, 03 Mar 2017 14:39:22 GMT):
looks like end-to-end execution instructions are changed in patch https://gerrit.hyperledger.org/r/#/c/6777/

bh4rtp (Fri, 03 Mar 2017 14:40:19 GMT):
i copy ca-cert.pem from my-ca container to fabric-sdk-node root path. but it also outputs Failed to enroll admin2 with CA server. Error: Error: Enrollment failed with errors [[{"code":400,"message":"authorization failure"}]] when running node test/unit/couchdb-fabriccop-tests.js

jimthematrix (Fri, 03 Mar 2017 15:01:00 GMT):
@rameshthoomu I already caught that earlier this morning and duplicated 2621 to 2619, CR is https://gerrit.hyperledger.org/r/#/c/6789/

rameshthoomu (Fri, 03 Mar 2017 15:16:24 GMT):
cool.. Thanks jim.. let me know if any changes required in CI script..

jje (Fri, 03 Mar 2017 16:03:43 GMT):
Thanks for the hints, will check end-to-end.js

bh4rtp (Sat, 04 Mar 2017 02:01:09 GMT):
run node test/unit/end-to-end.js, an error will occur, i.e. info: [Client.js]: Failed to load user "admin2" from local key value store. need i do something about user "admin2"? i don't know where to find and modify the configuration file. i have a fabric-ca and a fabric-couchdb containers running.

rikmoedt (Sat, 04 Mar 2017 12:47:08 GMT):
Has joined the channel.

rrader (Sat, 04 Mar 2017 12:54:21 GMT):
Has joined the channel.

rrader (Sat, 04 Mar 2017 12:54:45 GMT):
Error loading the chaincode or network https://github.com/IBM-Blockchain/marbles/issues/67

saism (Sun, 05 Mar 2017 19:50:03 GMT):
Has joined the channel.

obernin (Sun, 05 Mar 2017 21:00:42 GMT):
Has joined the channel.

gauthampamu (Mon, 06 Mar 2017 00:17:47 GMT):
Has joined the channel.

jansony1 (Mon, 06 Mar 2017 02:29:00 GMT):
Has joined the channel.

jansony1 (Mon, 06 Mar 2017 03:11:10 GMT):
Hi team:

jansony1 (Mon, 06 Mar 2017 03:11:58 GMT):
I wonder why the node-sdk treat query as a "invoke"?Or it just used for test purpose

jansony1 (Mon, 06 Mar 2017 03:12:45 GMT):
As mentioned in chain.js * Sends a proposal to one or more endorsing peers that will be handled by the chaincode. * This request will be presented to the chaincode 'invoke' and must understand * from the arguments that this is a query request. The chaincode must also return * results in the byte array format and the caller will have to be able to decode * these results * * @param {Object} request A JSON object with the following *
targets : An array or single Endorsing {@link Peer} objects as the targets of the request *
chaincodeId : The id of the chaincode to perform the query *
`args` : an array of arguments specific to the chaincode 'innvoke' * that represent a query invocation on that chaincode * @returns {Promise} A Promise for an array of byte array results from the chaincode on all Endorsing Peers */ queryByChaincode(request) {

davidkel (Mon, 06 Mar 2017 15:16:42 GMT):
@jimthematrix Is there any outlook on when npm modules will be published with the latest node-sdk ? https://jira.hyperledger.org/browse/FAB-2592 might have some bearing on this as well

jimthematrix (Mon, 06 Mar 2017 15:57:24 GMT):
@bh4rtp based on the file path you are running a fairly old version of the node sdk, would encourage you to try this again with the latest fabric, fabric-ca and fabric-sdk-node. also note that the new end to end should be used: test/integration/e2e.js

RyanElliott (Mon, 06 Mar 2017 18:46:11 GMT):
I'm just getting started with Fabric, and I have seen reverences to two npm client libraries. The fabric-client (in the Fabric's Getting Started Guide) and hfc (In the Hyperledger Fabric Client SDK for Node installation documentation). Can someone tell me the relationship between these libraries? Are they complementary, does one replace the other? Does one layer on top of the other?

RyanElliott (Mon, 06 Mar 2017 18:46:11 GMT):
I'm just getting started with Fabric, and I have seen references to two npm client libraries. The fabric-client (in the Fabric's Getting Started Guide) and hfc (In the Hyperledger Fabric Client SDK for Node installation documentation). Can someone tell me the relationship between these libraries? Are they complementary, does one replace the other? Does one layer on top of the other?

jimthematrix (Mon, 06 Mar 2017 19:26:35 GMT):
********* I just published an update of fabric-client and fabric-ca-client to npm, both versioned `0.2.0`. the readme is still to be enhanced but you can try out the updated code by referencing the code in our tests, especially: https://github.com/hyperledger/fabric-sdk-node/tree/master/test/integration/e2e *********

jimthematrix (Mon, 06 Mar 2017 19:26:59 GMT):
@davidkel @sstone1 ^^^

kletkeman (Mon, 06 Mar 2017 21:17:58 GMT):
@jimthematrix I'm getting a bit twisted up by the fact that there are several docs that say different things about how to work with the fabric and the ca and so on. I was originally following the build and install_instantiate docs, which orient to vagrant. Now I am following the node-sdk readme as I am on the final mile, but it seems to suggest building natively on the Mac. Since I had successfully launched a 2 peer plus orderer network inside vagrant I thought I'd try to run it inside vagrant anyway and ran into the issue that has plagued the vagrant environment for some time, which is that only fabric is mapped in there. So my question is: should I be building and running the fabric, fabric-ca, and sdk-node projects natively? Is that how you do it? I'd like to stop swimming upstream and just copy what works. Thanks.

jimthematrix (Mon, 06 Mar 2017 21:21:59 GMT):
@kletkeman i know guys that work in either environment for setting up the fabric and fabric-ca, i personally have not touched vagrant for a long time and build natively on mac with docker for mac. so in summary both native and vagrant based environment are legit. given what you described is your current set up, I would recommend to keep your fabric and fabric-ca where they are (in vagrant) and map the ports out to your host, and run node sdk apps from your host

jimthematrix (Mon, 06 Mar 2017 21:21:59 GMT):
@kletkeman i know guys that work in either environment for setting up the fabric and fabric-ca, i personally have not touched vagrant for a long time and build natively on mac with docker for mac. so in summary both native and vagrant based environment are legit. given what you described is your current set up, I would recommend to keep your fabric and fabric-ca where they are (in vagrant) and map the ports out to your host (Vagrantfile), and run node sdk apps from your host

jimthematrix (Mon, 06 Mar 2017 21:23:48 GMT):
for node sdk I have heard ppl telling it's difficult to get it to work in vagrant but I haven't spent any time investigate what the issues are, because for the sdk there's no reason to use vagrant at all

kletkeman (Mon, 06 Mar 2017 21:26:31 GMT):
@jimthematrix Thanks. Vagrant just does not map everything at the gopath for some reason. I can't use the cli on my own chaincode for that reason, and have no time to hack the environment. Since you are working without vagrant, that's good enough for me.

dselman (Mon, 06 Mar 2017 22:07:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rYeirftxxbzSZMwn7) @jimthematrix Thanks!

bh4rtp (Tue, 07 Mar 2017 00:52:11 GMT):
@jimthematrix thanks!

Ying (Tue, 07 Mar 2017 02:35:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rYeirftxxbzSZMwn7) @jimthematrix Great~

bh4rtp (Tue, 07 Mar 2017 02:58:07 GMT):
@jimthematrix i updated fabric-sdk-node. run node test/integration/e2e.js resulting failure: Error: Cannot find module './api.js'

kletkeman (Tue, 07 Mar 2017 03:10:26 GMT):
@bh4rtp I rebooted my computer and then ran the builds in the readme for fabric-sdk-node. All was well. But ... I got 4 fails starting at test 5:

jimthematrix (Tue, 07 Mar 2017 03:12:41 GMT):
@bh4rtp you need to run `gulp watch` first (it's in the readme) ;-)

bh4rtp (Tue, 07 Mar 2017 03:13:55 GMT):
@jimthematrix yes. it is ok now. thank you again!

jimthematrix (Tue, 07 Mar 2017 03:15:04 GMT):
@kletkeman what was the error you are seeing?

kletkeman (Tue, 07 Mar 2017 03:16:05 GMT):
@jimthematrix I sent that accidentally ... the error started at 5: debug: [Chain.js]: getPeers - list size: 2. not ok 5 Error: Verifying MSPs not found in the chain object, make sure "intialize()" is called first. at Chain._buildDefaultEndorsementPolicy (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Chain.js:1984:10) at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Chain.js:1658:14 at process._tickCallback (internal/process/next_tick.js:103:7) --- operator: fail at: promise.then.then (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/test/integration/end-to-end.js:272:7) ... [2017-03-06 22:06:19.330] [INFO] E2E - Disconnecting the event hub [2017-03-06 22:06:19.330] [INFO] E2E - Disconnecting the event hub

kletkeman (Tue, 07 Mar 2017 03:16:36 GMT):
I had rebootyed and forgot to start gulp watch again, which I have started now

kletkeman (Tue, 07 Mar 2017 03:16:58 GMT):
the reboot was needed to get the fixtures to come up because ports were allocated by a different yaml

jimthematrix (Tue, 07 Mar 2017 03:17:00 GMT):
which test was this from?

kletkeman (Tue, 07 Mar 2017 03:17:04 GMT):
e2e

kletkeman (Tue, 07 Mar 2017 03:17:14 GMT):
in the sdk node readme

kletkeman (Tue, 07 Mar 2017 03:17:20 GMT):
trying to follow all the way down

kletkeman (Tue, 07 Mar 2017 03:17:55 GMT):
i just realized that I skipped coucndb-fabricca-tests

kletkeman (Tue, 07 Mar 2017 03:18:46 GMT):
But it fails too: # Initilize the CouchDB KeyValueStore error: [couchdb-fabricca]: Error: Error creating member_db database to store membership data: Error: connect ECONNREFUSED 127.0.0.1:5984 at Object.exports._errnoException (util.js:1026:11) at exports._exceptionWithHostPort (util.js:1049:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14) not ok 1 Error initializing CouchDB KeyValueStore. Exiting. --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7)

jimthematrix (Tue, 07 Mar 2017 03:18:58 GMT):
the existing end-to-end.js doesn't work at the moment, you should run the new test like this: - cd test/fixtures/channel - docker-compose up - cd back to project root - node test/integration/e2e.js

jimthematrix (Tue, 07 Mar 2017 03:19:50 GMT):
couchdb tests require a couchdb docker image

kletkeman (Tue, 07 Mar 2017 03:20:21 GMT):
tried it: ok 7 Successfully enrolled user 'admin' error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7051". Error: Failed to deserialize creator identity, err Expected MSP ID DEFAULT, received Org1MSP at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Failed to deserialize creator identity, err Expected MSP ID DEFAULT, received Org1MSP at Object.callback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:192:13) at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:437:14 error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7056". Error: Failed to deserialize creator identity, err Expected MSP ID DEFAULT, received Org1MSP at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Failed to deserialize creator identity, err Expected MSP ID DEFAULT, received Org1MSP at Object.callback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:192:13) at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:437:14 info: [join-channel]: Join Channel R E S P O N S E : [{"error":"Error: Error: Failed to deserialize creator identity, err Expected MSP ID DEFAULT, received Org1MSP"},{"error":"Error: Error: Failed to deserialize creator identity, err Expected MSP ID DEFAULT, received Org1MSP"}]

jimthematrix (Tue, 07 Mar 2017 03:20:46 GMT):
you can do `docker pull couchdb` then `docker run couchdb`

jimthematrix (Tue, 07 Mar 2017 03:21:09 GMT):
I guess you started the network using test/fixtures/docker-compose.yaml?

kletkeman (Tue, 07 Mar 2017 03:21:15 GMT):
yes

kletkeman (Tue, 07 Mar 2017 03:21:20 GMT):
as per instructions

kletkeman (Tue, 07 Mar 2017 03:21:39 GMT):
ok, couchdb running

jimthematrix (Tue, 07 Mar 2017 03:21:39 GMT):
the new e2e.js needs to work with a network started by test/fixtures/channel/docker-compose.yaml

kletkeman (Tue, 07 Mar 2017 03:21:44 GMT):
will that fix the e2e

jimthematrix (Tue, 07 Mar 2017 03:21:57 GMT):
as I posted above

jimthematrix (Tue, 07 Mar 2017 03:22:06 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-node?msg=shDt7ugugZyvxLkpd

jimthematrix (Tue, 07 Mar 2017 03:22:59 GMT):
it's frustrating that I've got outstanding CRs in gerrit that address most of these issues, but they are not getting reviewed and merged soon enough ;-(

kletkeman (Tue, 07 Mar 2017 03:23:25 GMT):
ok, it's up

kletkeman (Tue, 07 Mar 2017 03:24:59 GMT):
ok 3 Successfully read file error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:242:12)" not ok 4 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:117:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:242:12) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:93:5) ... ok 5 Successfully waited to make sure new channel was created. # ***** End-to-end flow: join channel *****

kletkeman (Tue, 07 Mar 2017 03:25:33 GMT):
wait ... these are reporting errors but passing the tests

kletkeman (Tue, 07 Mar 2017 03:26:28 GMT):
8 and 9 look suspicious though ... ok 7 Successfully enrolled user 'admin' error: [Orderer.js]: sendDeliver - on error code 14: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12)" error: [Chain.js]: joinChannel - Failed Proposal. Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:236:23) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12) not ok 8 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:236:23) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/join-channel.js:122:5) ... ok 9 Successfully joined peers in organization "peerOrg1" to the channel

kletkeman (Tue, 07 Mar 2017 03:27:04 GMT):
@jimthematrix this seems to still be failing ...

kletkeman (Tue, 07 Mar 2017 03:27:33 GMT):
1..32 # tests 32 # pass 21 # fail 11

jimthematrix (Tue, 07 Mar 2017 03:28:39 GMT):
I think I know exactly what the problem is. did you build the fabric docker from today's commit levels?

kletkeman (Tue, 07 Mar 2017 03:28:51 GMT):
yes ...

jimthematrix (Tue, 07 Mar 2017 03:29:08 GMT):
there was a breaking change that got merged today or yesterday that caused the orderer to crash on start

kletkeman (Tue, 07 Mar 2017 03:30:41 GMT):
is there a stable release somewhere that I should be using?

jimthematrix (Tue, 07 Mar 2017 03:30:42 GMT):
two files need to be updated

kletkeman (Tue, 07 Mar 2017 03:31:10 GMT):
updated by editing?

jimthematrix (Tue, 07 Mar 2017 03:37:30 GMT):
they are binary files so you need to regenerate them, Rocker.Chat doesn't seem to allow attachments so i can't send them here

jimthematrix (Tue, 07 Mar 2017 03:37:41 GMT):
but you can regenerate them rather easily:

bh4rtp (Tue, 07 Mar 2017 03:40:03 GMT):
@jimthematrix do you mean get the latest fabric using command like this: git clone https://github.com/hyperledger/fabric.git?

jimthematrix (Tue, 07 Mar 2017 03:40:26 GMT):
- in fabric: `make configtxgen` - copy the file fabric-sdk-node/test/fixtures/channel/configtx.yaml to fabric/common/configtx/tool and override the existing file there - fix up the file paths in the configtx.yaml file that are marked with `FIXME` - `build/bin/configtxgen -outputBlock twoorgs.orderer.block -profile TwoOrgs` - `build/bin/configtxgen -outputCreateChannelTx mychannel.tx -profile TwoOrgs -channelID mychannel`

jimthematrix (Tue, 07 Mar 2017 03:41:15 GMT):
then copy these two files `twoorgs.orderer.block` and `mychannel.tx` from the current folder to fabric-sdk-node/test/fixtures/channel

jimthematrix (Tue, 07 Mar 2017 03:41:31 GMT):
@bh4rtp yes

kletkeman (Tue, 07 Mar 2017 03:41:33 GMT):
I've got a very familiar error ... many have reported it: mbpkim:fabric kim$ make configtxgen build/bin/configtxgen CGO_CFLAGS=" " GOBIN=/Users/kim/DEV/src/github.com/hyperledger/fabric/build/bin go install -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=0.7.0-snapshot-3000b25 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.0 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric" github.com/hyperledger/fabric/common/configtx/tool/configtxgen # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 vendor/github.com/miekg/pkcs11/pkcs11.go:29:10: fatal error: 'ltdl.h' file not found #include ^ 1 error generated. make: *** [build/bin/configtxgen] Error 2 mbpkim:fabric kim$

kletkeman (Tue, 07 Mar 2017 03:41:46 GMT):
unfortunately, I must step out for about 15m ... will be back

jimthematrix (Tue, 07 Mar 2017 03:41:50 GMT):
need to update go compiler

jimthematrix (Tue, 07 Mar 2017 03:42:04 GMT):
i think it needs to be 1.7 at the minimum

jimthematrix (Tue, 07 Mar 2017 03:42:09 GMT):
i'm at 1.8

kletkeman (Tue, 07 Mar 2017 03:59:16 GMT):
I'm at 1.7,3

jimthematrix (Tue, 07 Mar 2017 04:27:33 GMT):
@kletkeman https://gerrit.hyperledger.org/r/#/c/6945/ has the updated files

kletkeman (Tue, 07 Mar 2017 04:28:34 GMT):
thanks ... I have been trying to find a way to install that include file ... this is where things work better in vagrant because Linux has all that stuff

kletkeman (Tue, 07 Mar 2017 04:28:45 GMT):
I suppose the people who build those files use vagrant

kletkeman (Tue, 07 Mar 2017 04:36:50 GMT):
@jimthematrix 2 fewer failures after pulling the patch ... ok 7 Successfully enrolled user 'admin' error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7051". Error: The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at Object.callback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:192:13) at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:437:14 error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7056". Error: The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at Object.callback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:192:13) at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:437:14 info: [join-channel]: Join Channel R E S P O N S E : [{"error":"Error: Error: The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority"},{"error":"Error: Error: The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority"}] not ok 8 Failed to join channel

kletkeman (Tue, 07 Mar 2017 04:37:18 GMT):
do I need to rebuild everything perhaps?

kletkeman (Tue, 07 Mar 2017 04:37:23 GMT):
I did launch with force recreate

jimthematrix (Tue, 07 Mar 2017 04:38:23 GMT):
make sure you delete the key value stores from previous runs

jimthematrix (Tue, 07 Mar 2017 04:38:39 GMT):
they are /tmp/hfc-test-kvs*

jimthematrix (Tue, 07 Mar 2017 04:39:25 GMT):
the new tests require different enrollment certs (signed by specific fabric-ca's trusted by the network)

kletkeman (Tue, 07 Mar 2017 04:47:25 GMT):
I shut down the peers, blew away the key stores, started them with force recreate, now down to 7 failures

kletkeman (Tue, 07 Mar 2017 04:48:12 GMT):
ok 22 Successfully enrolled user 'admin' error: [Chain.js]: TypeError: Cannot read property 'type' of null at Chain.loadConfigEnvelope (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Chain.js:787:103) at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Chain.js:138:10 at process._tickCallback (internal/process/next_tick.js:103:7) not ok 23 Failed to initialize the chain

jimthematrix (Tue, 07 Mar 2017 04:55:24 GMT):
this is a known problem, the same change that caused the orderer crash earlier also requires an update in node sdk, @bretharrison is working on that: https://gerrit.hyperledger.org/r/#/c/6935/

jimthematrix (Tue, 07 Mar 2017 04:56:25 GMT):
if you download this CR it should get you past this error

DannyWong (Tue, 07 Mar 2017 05:00:21 GMT):
Got a question on the "addPeer" method in the node sdk

DannyWong (Tue, 07 Mar 2017 05:00:47 GMT):
do a client need to have the addresses of all peers up front?

DannyWong (Tue, 07 Mar 2017 05:02:29 GMT):
e.g. There is 3 orgs (OrgA, OrgB, and OrgC) in the v1.0 network, and I belong to orgA. When i want to make a tx, I build my TxProposal and send it to the endorser peer in OrgA

DannyWong (Tue, 07 Mar 2017 05:03:30 GMT):
do i know need to send the proposal explicitly to Endorser of OrgB and OrgC?... I am a little bit confused after reading the TX-flow in http://hyperledger-fabric.readthedocs.io/en/latest/txflow.html

kletkeman (Tue, 07 Mar 2017 05:03:37 GMT):
yes, that got me by that error ... but 6 remain ... ok 22 Successfully enrolled user 'admin' error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:8051". Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at Object.callback (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:192:13) at /Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:437:14 info: [install-chaincode]: instantiate proposal was good info: [install-chaincode]: instantiate proposal was good ok 23 Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0E!�Г���wo�雮�%sf�޽�'b1�y�p� q>^���Λ�c���RuC �%���RVp�G� info: [join-channel]: Join Channel R E S P O N S E : [{"version":0,"timestamp":null,"response":{"status":200,"message":"","payload":{"type":"Buffer","data":[]}},"payload":{"type":"Buffer","data":[]},"endorsement":null},{"version":0,"timestamp":null,"response":{"status":200,"message":"","payload":{"type":"Buffer","data":[]}},"payload":{"type":"Buffer","data":[]},"endorsement":null}] ok 24 Successfully joined channel. not ok 25 Failed to send instantiate transaction and get notifications within the timeout period. --- operator: fail at: Promise.all.then.catch (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/instantiate-chaincode.js:197:7) ... not ok 26 Error: Failed to send instantiate transaction and get notifications within the timeout period. at Promise.all.then.catch (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/instantiate-chaincode.js:198:11) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then.then (/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/instantiate-chaincode.js:221:5) ...

kletkeman (Tue, 07 Mar 2017 05:30:55 GMT):
@jimthematrix Thanks very much for giving so much of your time this evening. It's much appreciated. I'm done for the night and will continue tomorrow.

DannyWong (Tue, 07 Mar 2017 05:33:58 GMT):
@here Got a question on the "addPeer" / "setPrimaryPeer" method in the node sdk do a client need to have the addresses of all peers up front? e.g. There is 3 orgs (OrgA, OrgB, and OrgC) in the v1.0 network, and I belong to orgA. When i want to make a tx, I build my TxProposal and send it to the endorser peer in OrgA do i know need to send the proposal explicitly to Endorser of OrgB and OrgC?..

Ying (Tue, 07 Mar 2017 05:45:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XHynridenLpQLQ65A) @jimthematrix , cannot obtain admin key in win7 and enroll user admin failed. Key copied from linux works.

Tasdgt (Tue, 07 Mar 2017 06:09:52 GMT):
Has joined the channel.

Tasdgt (Tue, 07 Mar 2017 06:14:52 GMT):
[ERROR] DEPLOY - TypeError: chain.queryInstalledChaincodes is not a function

bretharrison (Tue, 07 Mar 2017 09:54:45 GMT):
@DannyWong we are moving toward having the network fully defined by `addPeer` , `addOrderer`, `setPrimaryPeer` before making requests. Upcoming changes will check that the `targets` request parameter has peers that are actually on the Channel or throw an error.

AbhilekhSingh (Tue, 07 Mar 2017 10:06:17 GMT):
Has joined the channel.

AbhilekhSingh (Tue, 07 Mar 2017 10:07:25 GMT):
Hi I'm following these instructions for setting up fabric

AbhilekhSingh (Tue, 07 Mar 2017 10:07:26 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html

AbhilekhSingh (Tue, 07 Mar 2017 10:07:35 GMT):
but when I run deploy.js

AbhilekhSingh (Tue, 07 Mar 2017 10:07:50 GMT):
info: Returning a new winston logger with default configurations info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Peer.js]: Peer.const - url: grpc://localhost:8055 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Peer.js]: Peer.const - url: grpc://localhost:8056 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Client.js]: Failed to load user "admin" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":8054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/home/ubuntu/.hfc-key-store"}}

AbhilekhSingh (Tue, 07 Mar 2017 10:07:57 GMT):
It stuck on this

AbhilekhSingh (Tue, 07 Mar 2017 10:08:16 GMT):
I'm able to use the docker cli

AbhilekhSingh (Tue, 07 Mar 2017 10:08:26 GMT):
but not with node sdk

AbhilekhSingh (Tue, 07 Mar 2017 10:09:08 GMT):
Do I need to add keyvalue store? If yes how

AbhilekhSingh (Tue, 07 Mar 2017 10:22:20 GMT):
Failed to load user "admin" from local key value store How do I store admin user ?

DannyWong (Tue, 07 Mar 2017 10:31:22 GMT):
@bretharrison ok.... so we need to have a list of all endorser addresses (in that channel) upfront in order to avoid exception...? How come this is not abstracted at Fabric level?

bretharrison (Tue, 07 Mar 2017 10:31:53 GMT):
No just the ones you wish to use

DannyWong (Tue, 07 Mar 2017 10:41:46 GMT):
let me make sure I dun misunderstand. 1) If there is a channel for a smart contract among 3 orgs (orgA, B, and C)... Say i belong to Org A, i just need to submit tx to OrgA peer, which is one of the endorser from SDK?

DannyWong (Tue, 07 Mar 2017 10:42:00 GMT):
Do i need to send to Org B and Org C endorser?

bretharrison (Tue, 07 Mar 2017 10:44:14 GMT):
You will need to send to as many peers as the endorsing policy requires

DannyWong (Tue, 07 Mar 2017 10:44:23 GMT):
omg...

DannyWong (Tue, 07 Mar 2017 10:44:24 GMT):
ic

DannyWong (Tue, 07 Mar 2017 10:45:01 GMT):
this is the current state of design, but do you think it is kinda strange?

bretharrison (Tue, 07 Mar 2017 10:46:11 GMT):
No, If I am moving money between two banks, I would want both banks to endorse

DannyWong (Tue, 07 Mar 2017 10:46:33 GMT):
yes... agreed... but why not handle in Fabric level

DannyWong (Tue, 07 Mar 2017 10:46:39 GMT):
as a client

DannyWong (Tue, 07 Mar 2017 10:47:23 GMT):
as endorsement policy defined during deployment is kinda.... specified the endorsers needed

DannyWong (Tue, 07 Mar 2017 10:47:57 GMT):
like transferring money, i as client dun need to talk to both banks

DannyWong (Tue, 07 Mar 2017 10:48:43 GMT):
i agreed we need to let all endorsers to "agree" the tx, but shouldn't be the responsibility for the client to "coordinate" all this

bretharrison (Tue, 07 Mar 2017 10:49:41 GMT):
I agree

DannyWong (Tue, 07 Mar 2017 10:51:05 GMT):
umm... at least we concluded that this is the current design

bretharrison (Tue, 07 Mar 2017 10:51:34 GMT):
Yes, right now, things change all the time

DannyWong (Tue, 07 Mar 2017 10:51:47 GMT):
in blockchain, we often talk about the "secure execution of all the tx"

DannyWong (Tue, 07 Mar 2017 10:52:02 GMT):
if everything is coordinate in the client side

DannyWong (Tue, 07 Mar 2017 10:52:06 GMT):
but not fabric level

DannyWong (Tue, 07 Mar 2017 10:52:21 GMT):
the whole "trust" execution chain is broken

DannyWong (Tue, 07 Mar 2017 10:52:51 GMT):
and seems that it is client responsibility to send the tx to Orderer too....

DannyWong (Tue, 07 Mar 2017 10:53:26 GMT):
so... even I get all different results from different endorsers.... I as client can abuse the SDK and send the tx to orderer...

DannyWong (Tue, 07 Mar 2017 10:53:59 GMT):
the orderer don't have *BFT at this moment, they just order the txs.... so... they will distribute invalid tx...

bretharrison (Tue, 07 Mar 2017 10:54:02 GMT):
no, it will all be checked on fabric side

DannyWong (Tue, 07 Mar 2017 10:54:07 GMT):
oh!

bretharrison (Tue, 07 Mar 2017 10:54:33 GMT):
yes, the committing peers will check

bretharrison (Tue, 07 Mar 2017 10:54:57 GMT):
must have the right endorsements

DannyWong (Tue, 07 Mar 2017 10:55:43 GMT):
ic.. let me double check the code, thanks @bretharrison

DannyWong (Tue, 07 Mar 2017 10:56:28 GMT):
ah yes

DannyWong (Tue, 07 Mar 2017 10:56:30 GMT):
The blocks of transactions are “delivered” to all peers on the channel. The transactions within the block are validated to ensure endorsement policy is fulfilled and to ensure that there have been no changes to ledger state for read set variables since the read set was generated by the transaction execution. Transactions in the block are tagged as being valid or invalid.

DannyWong (Tue, 07 Mar 2017 10:56:39 GMT):
doc and code matched... i misunderstood this part

DannyWong (Tue, 07 Mar 2017 10:56:43 GMT):
thanks!!

jimthematrix (Tue, 07 Mar 2017 12:07:38 GMT):
@kletkeman that error (Org1MSP unknown) will be fixed shortly, what's happening is peer2 in org2 has not done processing the joinChannel request but the test has moved on to attempt to send a proposal to it for instantiate. the fix is to listen for the transaction event from the joinChannel call so be sure the new channel has been finalized on the peer

mraikwar (Tue, 07 Mar 2017 12:36:38 GMT):
Has joined the channel.

kletkeman (Tue, 07 Mar 2017 14:56:45 GMT):
@jimthematrix Are you making a change to e2e.js to fix that? Or is there something deeper in the SDK that needs changing? Thx.

jimthematrix (Tue, 07 Mar 2017 15:15:31 GMT):
@kletkeman it's a change in the e2e.js (aka application code) for the most part if not all of it

bh4rtp (Tue, 07 Mar 2017 15:22:20 GMT):
@jimthematrix hi, i did as you told step by step, run node test/integration/e2e.js and failed with errors: ok 12 Successfully enrolled user 'admin' info: [packager/Golang.js]: packaging GOLANG from github.com/example_cc info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at cryptoPrimitives.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:234:11) error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at cryptoPrimitives.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:234:11) not ok 13 Error: Private key missing from key store. Can not establish the signing identity for user admin at cryptoPrimitives.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:234:11)

kletkeman (Tue, 07 Mar 2017 16:29:23 GMT):
@bh4rtp That looks similar to one of the errors I had around midnight last night ... (scroll up to see the conversation) ... for every test run, I found that it works best if you shut down the fabric, remove the key repo, and then start the fabric again before rerunning the e2e.js test. Repo commands: rm -rf /tmp/hfc-* rm -rf ~/.hfc-key-store Of course, you also need to apply the two fixes that @jimthematrix mentioned last night: https://gerrit.hyperledger.org/r/#/c/6945/ https://gerrit.hyperledger.org/r/#/c/6935/ But this only got me to the point of having 6 remaining failure. Jim mentioned this morning that there are fixes coming. I am waiting to find out if they will be committed and pushed to the mirror today.

MartinMateev (Tue, 07 Mar 2017 16:32:47 GMT):
guy where can I find the node SDK web-app example app ?

MartinMateev (Tue, 07 Mar 2017 16:32:47 GMT):
guys where can I find the node SDK web-app example app ?

MartinMateev (Tue, 07 Mar 2017 16:32:57 GMT):
the link on this page is broken: http://fabric-sdk-node.readthedocs.io/en/latest/sample-web-app/#nodejs-web-application

MartinMateev (Tue, 07 Mar 2017 16:33:21 GMT):
I get a 404 at https://raw.githubusercontent.com/hyperledger/fabric/master/examples/sdk/node/web-app.js

MartinMateev (Tue, 07 Mar 2017 16:35:20 GMT):
is this stuff pretty out-of-date ?

jimthematrix (Tue, 07 Mar 2017 16:37:14 GMT):
@MartinMateev at the moment we only have sample command line apps, no web apps yet

MartinMateev (Tue, 07 Mar 2017 16:43:08 GMT):
The Getting Started links here also throw 404s: https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer

bh4rtp (Tue, 07 Mar 2017 16:43:22 GMT):
i reboot the vm and fails decrease. but still have 12 fails (29 tests). ok 12 Successfully enrolled user 'admin' info: [packager/Golang.js]: packaging GOLANG from github.com/example_cc error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7051". Error: Error installing chaincode code end2end:v0(chaincode /var/hyperledger/production/chaincodes/end2end.v0 exists) at /home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Error installing chaincode code end2end:v0(chaincode /var/hyperledger/production/chaincodes/end2end.v0 exists) at Object.callback (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:192:13) at /home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:437:14 error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7056". Error: Error installing chaincode code end2end:v0(chaincode /var/hyperledger/production/chaincodes/end2end.v0 exists) at /home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Error installing chaincode code end2end:v0(chaincode /var/hyperledger/production/chaincodes/end2end.v0 exists) at Object.callback (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:192:13) at /home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:437:14 error: [install-chaincode]: install proposal was bad error: [install-chaincode]: install proposal was bad

MartinMateev (Tue, 07 Mar 2017 16:43:41 GMT):
@jimthematrix where can I find the sample command line apps?

bh4rtp (Tue, 07 Mar 2017 16:45:13 GMT):
@kletkeman thanks. it is too late and i will test tomorrow.

kletkeman (Tue, 07 Mar 2017 16:46:15 GMT):
@MartinMateev Not sure what you mean by "sample command line apps", but the command line is used here: https://github.com/hyperledger/fabric/blob/master/docs/source/install_instantiate.rst

jimthematrix (Tue, 07 Mar 2017 16:46:28 GMT):
@MartinMateev fabric-sdk-node/test/integration/e2e

kletkeman (Tue, 07 Mar 2017 16:46:48 GMT):
Ah ... we're talking about node commands lol

kletkeman (Tue, 07 Mar 2017 16:47:02 GMT):
I assumed command line meant cli :-)

jimthematrix (Tue, 07 Mar 2017 16:47:02 GMT):
"sample command line" in that they don't stay up like a web server does

kletkeman (Tue, 07 Mar 2017 16:47:30 GMT):
yes, it is what I am trying to work on as well ... once I have that working I will port into our web app, which does stay up.

MartinMateev (Tue, 07 Mar 2017 16:48:05 GMT):
I have a simple web app that I want to slowly integrate with fabric via the Node SDK

kletkeman (Tue, 07 Mar 2017 16:48:05 GMT):
@jimthematrix By the way, I would like to retry the e2e once the various issues have found their way to the mirror ... any thoughts on what that might be?

kletkeman (Tue, 07 Mar 2017 16:48:05 GMT):
@jimthematrix By the way, I would like to retry the e2e once the various issues have found their way to the mirror ... any thoughts on when that might be?

MartinMateev (Tue, 07 Mar 2017 16:48:22 GMT):
simple stuff like deplouy a chaincode, enroll users and interact with CouchDB

MartinMateev (Tue, 07 Mar 2017 16:48:22 GMT):
simple stuff like deploy a chaincode, enroll users and interact with CouchDB

bh4rtp (Tue, 07 Mar 2017 16:48:48 GMT):
@kletkeman have you tested e2e_cli in fabric/examples? i have just passed this test. so my environments should be ok:)

kletkeman (Tue, 07 Mar 2017 16:49:29 GMT):
@bh4rtp Are you up to date as of today?

jimthematrix (Tue, 07 Mar 2017 16:53:03 GMT):
@kletkeman https://gerrit.hyperledger.org/r/#/c/6935/ just got merged and it should allow the e2e.js run to completion

kletkeman (Tue, 07 Mar 2017 16:53:46 GMT):
I use github desktop and so have to use it from the mirror

jimthematrix (Tue, 07 Mar 2017 16:54:03 GMT):
you may still see the following error due to timing but it doesn't affect the scenario because the default policy only requires one valid signature

jimthematrix (Tue, 07 Mar 2017 16:54:10 GMT):
```error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:8051". Error: Failure while looking up the ledger mychannel```

jimthematrix (Tue, 07 Mar 2017 16:54:32 GMT):
and this will be fixed using the event listener I mentioned earlier

kletkeman (Tue, 07 Mar 2017 16:54:44 GMT):
is that one one tagged "update with latest proto?"

jimthematrix (Tue, 07 Mar 2017 16:54:51 GMT):
yes

kletkeman (Tue, 07 Mar 2017 16:54:52 GMT):
it just arrived oin the mirror

kletkeman (Tue, 07 Mar 2017 16:55:01 GMT):
excellent ... wow, fast propagation :-)

kletkeman (Tue, 07 Mar 2017 16:55:29 GMT):
I am rebuilding the fabric up to the moment and so will be testing within 10 minutes or so

kletkeman (Tue, 07 Mar 2017 16:56:28 GMT):
should I be following yesterday's instructions? as in using the yaml from /channel, using e2e.js rather than end-2-end

jimthematrix (Tue, 07 Mar 2017 16:56:37 GMT):
correct

MartinMateev (Tue, 07 Mar 2017 16:56:41 GMT):
@jimthematrix and what is the meaning and purpose of the channel - that's been introduced recently so I'm not sure what exactly it is and how/why it's being used

jimthematrix (Tue, 07 Mar 2017 16:57:27 GMT):
@MartinMateev https://docs.google.com/document/d/1eRNxxQ0P8yp4Wh__Vi6ddaN_vhN2RQHP-IruHNUwyhc/edit

kletkeman (Tue, 07 Mar 2017 16:58:02 GMT):
@here TADA! 1..35 # tests 35 # pass 35 # ok

MartinMateev (Tue, 07 Mar 2017 16:58:13 GMT):
@jimthematrix thanks

kletkeman (Tue, 07 Mar 2017 16:58:15 GMT):
Time to rock and roll

kletkeman (Tue, 07 Mar 2017 16:58:36 GMT):
@jimthematrix Many thanks for your patience

jimthematrix (Tue, 07 Mar 2017 16:58:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DEJrksas6wdepDTRc) @kletkeman indeed!

MartinMateev (Tue, 07 Mar 2017 16:58:49 GMT):
@jimthematrix I'm looking at: fabric-sdk-node/test/integration/e2e

jimthematrix (Tue, 07 Mar 2017 16:59:09 GMT):
yw, you are welcome to continue to give us feedback

MartinMateev (Tue, 07 Mar 2017 16:59:19 GMT):
there's a lot of the SDK functionality - can I suggest whoever is writing the tests to write a simple boiler plate example/skeleton

jimthematrix (Tue, 07 Mar 2017 16:59:20 GMT):
always welcome the brave early adopters

MartinMateev (Tue, 07 Mar 2017 16:59:37 GMT):
deploy a chaincode, enroll a user or two and interact with a datastore (CouchDB)

kletkeman (Tue, 07 Mar 2017 16:59:43 GMT):
@jimthematrix The ones with no choice LOL

jimthematrix (Tue, 07 Mar 2017 16:59:58 GMT):
;-)

MartinMateev (Tue, 07 Mar 2017 17:01:24 GMT):
also as a side note - I want to illustrate for demo purposes the transaction/block creation - so what APIs can I use to show block and transaction infos

jimthematrix (Tue, 07 Mar 2017 17:01:54 GMT):
@MartinMateev yes we have that in the queue. the e2e tests do show the main APIs (create channel, join channel, install chaincode, instantiate chaincode, enroll user, invoke transaction and query) but we could use a more elaborate sample app to show off more features

jimthematrix (Tue, 07 Mar 2017 17:02:58 GMT):
you should use the block event listener to get notified of block commits, and you have chain.queryInfo() method to get chain height

jimthematrix (Tue, 07 Mar 2017 17:03:12 GMT):
there's various other query methods available on the Chain.js class

MartinMateev (Tue, 07 Mar 2017 17:16:23 GMT):
@jimthematrix that's awesome! Thanks!

kletkeman (Tue, 07 Mar 2017 17:17:29 GMT):
@jimthematrix Event listeners were already gRPC, so I imagine that they have not really changed in v1, would that be correct?

kofman.alex@gmail.com (Tue, 07 Mar 2017 17:24:12 GMT):
Has joined the channel.

jimthematrix (Tue, 07 Mar 2017 17:32:59 GMT):
Kim yes the underlying mechanism to hook up an event listener is by and large the same

MartinMateev (Tue, 07 Mar 2017 17:59:03 GMT):
@jimthematrix I read the 'channel' google doc and my head hurts

MartinMateev (Tue, 07 Mar 2017 17:59:15 GMT):
I this stuff supposed to go into the ver.1 land ?

jimthematrix (Tue, 07 Mar 2017 18:00:13 GMT):
sorry to hear that, we welcome any feedback, yes it's a landmark feature of the v1.0 world ;-)

MartinMateev (Tue, 07 Mar 2017 18:01:14 GMT):
when is the target date for rolling out stable ver1.0

MartinMateev (Tue, 07 Mar 2017 18:01:46 GMT):
I thought it was March

MartinMateev (Tue, 07 Mar 2017 18:07:29 GMT):
I'm eager to use some of this stuff but it's so hard to find up-to-date examples, tutorials and how-tos

MartinMateev (Tue, 07 Mar 2017 18:07:51 GMT):
there are bits and pieces there but what I think is missing a 'putting it all together' in real-life example

MartinMateev (Tue, 07 Mar 2017 18:07:51 GMT):
there are bits and pieces there but what I think is missing a 'putting it all together' in real-life examples

MartinMateev (Tue, 07 Mar 2017 18:07:51 GMT):
there are bits and pieces there but what I think is missing a 'putting it all together' docs for real-life examples

MartinMateev (Tue, 07 Mar 2017 18:07:51 GMT):
there are bits and pieces there but what I think is missing is a 'putting it all together' docs for real-life examples

MartinMateev (Tue, 07 Mar 2017 18:07:51 GMT):
there are bits and pieces there but what I think is missing is a 'putting it all together' doc for real-life examples

MartinMateev (Tue, 07 Mar 2017 18:10:15 GMT):
I also see lots of broken links and out-of-date tutorials and examples

MartinMateev (Tue, 07 Mar 2017 18:10:50 GMT):
I've had a similar experience with Ethereum where it turns out that 80% of the available docs and examples are no longer relevant

MartinMateev (Tue, 07 Mar 2017 18:11:06 GMT):
it makes it really hard for new-comers to get going

MartinMateev (Tue, 07 Mar 2017 18:11:26 GMT):
I do believe you guys are doing a great job but I thought I'd share some feedback

MartinMateev (Tue, 07 Mar 2017 18:11:27 GMT):
: )

MartinMateev (Tue, 07 Mar 2017 18:28:38 GMT):
now when I think about it - this stack is much more complicated than the Internet(TCP/IP) stack

MartinMateev (Tue, 07 Mar 2017 18:29:12 GMT):
I wonder how many people can really wrap their heads around all the concepts here

MartinMateev (Tue, 07 Mar 2017 18:29:50 GMT):
which is an exciting thing because it's new and promising tech

MartinMateev (Tue, 07 Mar 2017 18:53:32 GMT):
ok - more broken links here: https://github.com/hyperledger/fabric/blob/master/docs/source/install_instantiate.rst

MartinMateev (Tue, 07 Mar 2017 18:53:55 GMT):
"setting up the development environment" link points to a 404

MartinMateev (Tue, 07 Mar 2017 18:55:51 GMT):
"The Getting Started" links here also throw 404s: https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer

kletkeman (Tue, 07 Mar 2017 20:30:50 GMT):
@MartinMateev Until 3 or 4 days ago, those were all references to *.md files ... not they are *.rst files and in a subfolder ... hopefully, someone will go through and update those using an automated replacement ...

kletkeman (Tue, 07 Mar 2017 20:30:50 GMT):
@MartinMateev Until 3 or 4 days ago, those were all references to \*.md files ... not they are \*.rst files and in a subfolder ... hopefully, someone will go through and update those using an automated replacement ...

kletkeman (Tue, 07 Mar 2017 20:31:35 GMT):
lol ... forgot how to escape in markdown

kletkeman (Tue, 07 Mar 2017 21:19:40 GMT):
@jimthematrix I'm confused (and yes, I realize that this is probably an axiom). When reading the SDK code to help me plan my adaptation of the test suite to out monitor UI, I am seeing a large amount of code that looks like it belongs in a fabric based server of some sort. I.e. there is a protocol shown for joining a channel that includes a long block of building in some sort of "seek" facility related to the genesis block, and that is defined in the SDK code itself (specifically chain.js). I imagine that every language adaptation will have to have essentially identical chunks of code in order that clients and fabrics and smoothly interoperate. Is this meant to eventually be pushed into the fabric itself? Of will we always be tied to the SDK because of its intimate knowledge of fabric internals?

jimthematrix (Tue, 07 Mar 2017 21:41:03 GMT):
@kletkeman so there are 3 options to interact with the fabric (specifically peers and orderers): sdks, grpc and REST. using the sdk is the easiest and yes it does require quite intimate knowledge of the fabric but none of that knowledge is internal, the SDKs only use public fabric (protobuf-based) APIs.

jimthematrix (Tue, 07 Mar 2017 21:42:46 GMT):
you can certainly use the grpc APIs directly which means you have to deal with the protobufs payload both ways yourself, plus managing the signing credentials, etc. can be done for sure but would require a non-trivial amount of effort

jimthematrix (Tue, 07 Mar 2017 21:44:20 GMT):
there's also work in the queue to revive the v0.6-era REST APIs, although they will never be put back on the peers or orderers themselves but will instead be built in an outside layer and likely be based on the SDKs

kletkeman (Tue, 07 Mar 2017 22:01:12 GMT):
@jimthematrix I am aware of REST work, and while that would help us, it is not coming soon enough. Doing gRPC would be my preference, but in looking at chain.js, I cannot decipher the long blocks of code that work with binary data for genesis blocks and such (stuff called seek etc) ... so if that kind of thing is necessary, then we would need some pretty great documentation. I think that leaves the SDK, so I just need to find some production grade samples so that I don't have to try to tease the test harness out myself. Could you point me to something like that? Thanks.

jimthematrix (Tue, 07 Mar 2017 22:04:19 GMT):
"production grade samples" is definitely a goal before we can claim v1.0 production ready, but at this point we just got the whole end to end working so unfortunately the test hardness is the best source to illustrate the mainstream APIs

kletkeman (Tue, 07 Mar 2017 22:05:19 GMT):
ok, thx ...

bh4rtp (Wed, 08 Mar 2017 03:26:31 GMT):
@kletkeman @jimthematrix i updated fabric-sdk-node and removed the key repo. now node test/integration/e2e.js runs ok. it prints 1..42 # tests 42 # pass 42 # ok

bh4rtp (Wed, 08 Mar 2017 03:27:15 GMT):
it is really exciting! thanks

jimthematrix (Wed, 08 Mar 2017 03:27:19 GMT):
@bh4rtp very cool, thanks for letting us know!

RyanElliott (Wed, 08 Mar 2017 05:29:48 GMT):
@jimthematrix fyi, I have been quietly following along with all the patching/rebuilding you walked kletkeman through this morning. I now have all 42 tests passing. I just wanted you to know that you have been helping more people than you realize.

RyanElliott (Wed, 08 Mar 2017 05:32:47 GMT):
And I would echo the feedback from @kletkeman that the disappearing documentation has been a source of frustration for me over the last week. I have been keeping my browser window open on several tutorials for fear that they might turn into 404 errors at any moment :relaxed:

RyanElliott (Wed, 08 Mar 2017 05:35:19 GMT):
I realize it's a product under construction, so I'm not complaining. Please take it as positive feedback that all the material out there was being used.

jimthematrix (Wed, 08 Mar 2017 05:40:48 GMT):
@RyanElliott great to know, thanks for sharing that!

bh4rtp (Wed, 08 Mar 2017 05:58:02 GMT):
hi all. would you like to test the marbles demo (https://github.com/IBM-Blockchain/marbles)? let's do and share it.:blush:

bh4rtp (Wed, 08 Mar 2017 05:58:02 GMT):
hi all. would you like to test the marbles demo (https://github.com/IBM-Blockchain/marbles)? let's do and share it. :blush:

Jonas.Hedin (Wed, 08 Mar 2017 08:12:56 GMT):
Has left the channel.

bh4rtp (Wed, 08 Mar 2017 09:11:43 GMT):
I have thought it is difficult to make marbles running. but beyond my expectations, i get it run in a few minutes. i'm just doubted why i find no docker container running?

Vadim (Wed, 08 Mar 2017 09:12:19 GMT):
@bh4rtp try to query or invoke it

bh4rtp (Wed, 08 Mar 2017 09:12:58 GMT):
@Vadim from the web browser side?

Vadim (Wed, 08 Mar 2017 09:13:40 GMT):
the chaincode container is not started right after deployment, only when you query or invoke it

Vadim (Wed, 08 Mar 2017 09:14:03 GMT):
send to it some transaction, either browser or cli, I don't know your setup

bh4rtp (Wed, 08 Mar 2017 09:14:36 GMT):
ok, that makes me confused. i go on testing. thanks.

bh4rtp (Wed, 08 Mar 2017 09:19:05 GMT):
@Vadim i noticed at the right up corn of the web page, there is an error message says "This application cannot run without the blockchain network :(". i have not docker-compose up.

Rymd (Wed, 08 Mar 2017 09:19:36 GMT):
Has left the channel.

Vadim (Wed, 08 Mar 2017 09:20:19 GMT):
@bh4rtp I never used that one, I'd also encourage you to work with v1, the example you are trying is an old design (v0.6)

bh4rtp (Wed, 08 Mar 2017 09:24:10 GMT):
but the documentation says marbles - branch v3.0 (experimental) works with hyperledger fabric v1.0 - hackfest images

bh4rtp (Wed, 08 Mar 2017 09:26:08 GMT):
yes i find the difference. branch v3.0 should be cloned, not the master branch.

Vadim (Wed, 08 Mar 2017 09:26:21 GMT):
did not know that, then it's fine

Ying (Wed, 08 Mar 2017 11:00:22 GMT):
@jimthematrix , I tested in win7 os and got a bug about path style. To fix it, modify fabric-client/lib/packager/Golang.js:function findSource(goPath, filePath) line 100-101 as: //- name: path.relative(goPath, entry.path), //- fqp: entry.path name: path.relative(goPath, entry.path).replace(/\\/g,"\/"), fqp: entry.path.replace(/\\/g,"\/")

bh4rtp (Wed, 08 Mar 2017 11:50:46 GMT):
very insteresting. i got marbles running. but cann not login with admin. info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - %j protocol=http, hostname=127.0.0.1, port=9054 info: [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store /root/.hfc-key-store Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:9054] at ClientRequest. (/home/allen/gopath/src/github.com/hyperledger/marbles/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:402:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1278:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) Failed to enroll admin Error: Failed to enrolled admin at ca_client.enroll.then.then.then.catch (/home/allen/gopath/src/github.com/hyperledger/marbles/app.js:286:12) at process._tickCallback (internal/process/next_tick.js:103:7) broadcasting to client 1 app_state

bh4rtp (Wed, 08 Mar 2017 11:52:08 GMT):
sfhacktest images and marbles v3.0 are used.

jimthematrix (Wed, 08 Mar 2017 12:26:45 GMT):
@Ying my guess is that you passed in the "chaincodePath" value using back-slashed? you really need to use forward slashes even for windows for node.js apps to work properly in a cross-platform way

jimthematrix (Wed, 08 Mar 2017 12:26:45 GMT):
@Ying my guess is that you passed in the "chaincodePath" value using back-slashes? you really need to use forward slashes even for windows for node.js apps to work properly in a cross-platform way

jimthematrix (Wed, 08 Mar 2017 12:28:32 GMT):
@bh4rtp so the fabric and sdk are still bleeding edge at this point, as a result the various sample apps have not been properly caught up yet

jimthematrix (Wed, 08 Mar 2017 12:29:13 GMT):
that being said, using the hackfest image should work with the marbles app, you may want to contact @dshuffma about that

dshuffma (Wed, 08 Mar 2017 12:29:13 GMT):
Has joined the channel.

Ying (Wed, 08 Mar 2017 12:30:04 GMT):
[ ] (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=onHLBdMvfDK48XZSr) @jimthematrix I tried both, but packager converts it into win style by

Ying (Wed, 08 Mar 2017 12:30:10 GMT):
path

Ying (Wed, 08 Mar 2017 12:30:30 GMT):
By path.join

jimthematrix (Wed, 08 Mar 2017 12:31:06 GMT):
hmm interesting, can you please submit a jira bug and we'll investigate?

AbhilekhSingh (Wed, 08 Mar 2017 12:31:07 GMT):
ubuntu@ip-172-31-31-186:~/go/fabric-sdk-node/examples/balance-transfer$ node deploy.js info: Returning a new winston logger with default configurations info: [Chain.js]: Constructed Chain instance: name - fabric-client1, securityEnabled: true, TCert download batch size: 10, network mode: true info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Peer.js]: Peer.const - url: grpc://localhost:8055 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Peer.js]: Peer.const - url: grpc://localhost:8056 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store /home/ubuntu/.hfc-key-store info: [Client.js]: Successfully loaded user "admin" from local key value store [2017-03-08 12:30:38.346] [INFO] Helper - Successfully loaded member from persistence [2017-03-08 12:30:38.347] [INFO] DEPLOY - Successfully obtained enrolled user to deploy the chaincode [2017-03-08 12:30:38.347] [INFO] DEPLOY - Executing Deploy [2017-03-08 12:30:38.353] [ERROR] DEPLOY - TypeError: chain.sendInstantiateProposal is not a function at /home/ubuntu/go/fabric-sdk-node/examples/balance-transfer/deploy.js:79:16

jimthematrix (Wed, 08 Mar 2017 12:31:58 GMT):
@AbhilekhSingh yes like I said above: https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8kApPucv5hiqx6E24

Ying (Wed, 08 Mar 2017 12:33:05 GMT):
[ ](https://ch at.hyperledger.org/channel/fabric-sdk-node?msg=L8CZdheaxb65ZCMhc) @jimthematrix ok, I'll submit tomorrow (it's night now). Thanks.

bh4rtp (Wed, 08 Mar 2017 13:13:59 GMT):
@jimthematrix thank you. i thought the hackfest is sfhacktest.

jimthematrix (Wed, 08 Mar 2017 13:16:30 GMT):
yes typo, sfhackfest images should work with the marbles app so @dshuffma to get help

bh4rtp (Wed, 08 Mar 2017 13:26:08 GMT):
@dshuffma can you give some advice to run marbles?

AbhilekhSingh (Wed, 08 Mar 2017 13:30:39 GMT):
How can I see ledger blocks data?

AbhilekhSingh (Wed, 08 Mar 2017 13:30:48 GMT):
I don't see any option in peer cli

Suma (Wed, 08 Mar 2017 15:44:37 GMT):
Has joined the channel.

debrajo (Wed, 08 Mar 2017 16:51:19 GMT):
Has joined the channel.

davidkel (Wed, 08 Mar 2017 17:29:27 GMT):
@jimthematrix Hi. I see that some changes went in to the node sdk where one of the protobufs has been changed. Will there be new npm modules to reflect these changes be published ?

jimthematrix (Wed, 08 Mar 2017 17:36:06 GMT):
@AbhilekhSingh node sdk chain.queryBlock(), returns the raw block that you need to decode using protobuf (see test/integration/query.js for sample code)

jimthematrix (Wed, 08 Mar 2017 17:37:15 GMT):
@davidkel once we have a verified commit level we can publish again, right now the fabric and sdk are going through some churn but should wrap up soon

kletkeman (Wed, 08 Mar 2017 17:41:43 GMT):
Update to the latest SDK on mirror ... still 42 for 42 ...

davidkel (Wed, 08 Mar 2017 17:46:14 GMT):
@jimthematrix is it possible to get continuous publishes to npm as unstable and then publish the stable verified commit level ?

jimthematrix (Wed, 08 Mar 2017 17:48:00 GMT):
possible, need to work with Ramesh on that... haven't had a chance to do that yet

jimthematrix (Wed, 08 Mar 2017 17:48:00 GMT):
possible, need to work with Ramesh on that... using an 'unstable' tag in npm publish as we discussed on Monday definitely makes sense, just haven't had a chance to do that yet

davidkel (Wed, 08 Mar 2017 17:50:14 GMT):
@jimthematrix ok, thanks Jim. Appreciate that there is never enough time for everything :-)

jimthematrix (Wed, 08 Mar 2017 17:51:02 GMT):
:-)

jimthematrix (Wed, 08 Mar 2017 17:57:50 GMT):
https://jira.hyperledger.org/browse/FAB-2698

kletkeman (Wed, 08 Mar 2017 18:00:56 GMT):
@jimthematrix A discussion on chaincode-dev led to the revelation that the getTXTimestamp stub call (or whatever the signature is) returns nil. Since we are now setting the TXID and Nonce in the SDK, presumably it makes sense to set the TX Timestamp as well? Is that designed into HFC at this time?

kletkeman (Wed, 08 Mar 2017 18:01:51 GMT):
If we set it in the SDK, we can guaranter the same timestamp on all peers.

kletkeman (Wed, 08 Mar 2017 18:01:51 GMT):
If we set it in the SDK, we can guarantee the same timestamp on all peers.

jimthematrix (Wed, 08 Mar 2017 18:03:31 GMT):
@kletkeman yes good idea, we were discussing this with @dave.enyeart yesterday, it's the right thing to do

dave.enyeart (Wed, 08 Mar 2017 18:03:31 GMT):
Has joined the channel.

kletkeman (Wed, 08 Mar 2017 18:03:40 GMT):
but of course if we want coordinated time we would need a time service that is global

kletkeman (Wed, 08 Mar 2017 18:04:14 GMT):
with the push to start sending to all endorsers in parallel, it is even more important for the SDK to set the time

jimthematrix (Wed, 08 Mar 2017 18:05:02 GMT):
only reason it hasn't been done yet is the mismatch b/w protobuf's definition of timestamp (epoch=1 A.D.) vs. well everywhere else (epoch=1970), or something like that

jimthematrix (Wed, 08 Mar 2017 18:05:10 GMT):
@bretharrison knows the details

kletkeman (Wed, 08 Mar 2017 18:06:09 GMT):
ah ... yes ... the big G has struck again

jimthematrix (Wed, 08 Mar 2017 18:06:34 GMT):
another approach being investigated in parallel (longer term) is a coordinated time among the orderers so it can be set on the block when it's produced

kletkeman (Wed, 08 Mar 2017 18:06:44 GMT):
if we were to set the timestamp in the SDK ourselves, would it be propagated?

kletkeman (Wed, 08 Mar 2017 18:07:08 GMT):
yes, but we need stable time at endorsement because we store it ...

jimthematrix (Wed, 08 Mar 2017 18:07:10 GMT):
unfortunately know, it's not exposed through the apis yet

jimthematrix (Wed, 08 Mar 2017 18:07:10 GMT):
unfortunately no it's not exposed through the apis yet

kletkeman (Wed, 08 Mar 2017 18:07:19 GMT):
that was why the stub exposed txn timestamp in the first place

kletkeman (Wed, 08 Mar 2017 18:07:58 GMT):
for IoT apps, this is a major issue ... we will need stable and accurate time that is the same on all peers at execution time

bretharrison (Wed, 08 Mar 2017 18:08:14 GMT):
So should the timestamp be set by the Application ?

kletkeman (Wed, 08 Mar 2017 18:08:24 GMT):
the client could set it as stop gap ... but better that the endorsers get it from a service

kletkeman (Wed, 08 Mar 2017 18:08:41 GMT):
@bretharrison not yet ... the APIs are not there

jimthematrix (Wed, 08 Mar 2017 18:08:46 GMT):
until the orderer sets it (won't happen any time soon) the app will have to set it

kletkeman (Wed, 08 Mar 2017 18:08:48 GMT):
and there is an epoch mismatch

kletkeman (Wed, 08 Mar 2017 18:09:11 GMT):
the orderer gets involved too late for chaincode to use the timestampt

bretharrison (Wed, 08 Mar 2017 18:09:19 GMT):
SDK it setting it to current time on client before sending,

kletkeman (Wed, 08 Mar 2017 18:09:50 GMT):
or can the endorsers get a timestamp from the orderer perhaps, so that the endorsers all get the same time before executing chaincode

kletkeman (Wed, 08 Mar 2017 18:10:03 GMT):
@brt

kletkeman (Wed, 08 Mar 2017 18:10:21 GMT):
@bretharrison it was mentioned on chaincode dev that v1 returns nil for timestamp inside chaincode

bretharrison (Wed, 08 Mar 2017 18:10:51 GMT):
fabric side is not using it yet

kletkeman (Wed, 08 Mar 2017 18:11:04 GMT):
our chaincode uses timestamp and has for 8 months

jimthematrix (Wed, 08 Mar 2017 18:12:53 GMT):
@bretharrison doesn't the code below result in a time skew? ``` function buildCurrentTimestamp() { logger.debug('buildCurrentTimestamp - building'); var now = new Date(); var timestamp = new _timestampProto.Timestamp(); timestamp.setSeconds(now.getTime() / 1000); timestamp.setNanos((now.getTime() % 1000) * 1000000); return timestamp; } ```

jimthematrix (Wed, 08 Mar 2017 18:13:03 GMT):
of 1790 years?

jimthematrix (Wed, 08 Mar 2017 18:13:03 GMT):
of 1970 years?

dave.enyeart (Wed, 08 Mar 2017 18:13:48 GMT):
>v1 returns nil for timestamp inside chaincode

dave.enyeart (Wed, 08 Mar 2017 18:13:52 GMT):
which api are you talking about?

bretharrison (Wed, 08 Mar 2017 18:15:19 GMT):
We will see, depends on how fabric uses the time, notice that the timestamp is just seconds and nanos, so it can be used with any epoch

kletkeman (Wed, 08 Mar 2017 18:15:45 GMT):
@dave.enyeart It was reported by someone else, but he presumably meant this API: stub.GetTxTimestamp()

jimthematrix (Wed, 08 Mar 2017 18:17:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mu6FHDhMoz5trd4vy) @bretharrison ok makes sense

dave.enyeart (Wed, 08 Mar 2017 18:18:13 GMT):
```func (stub *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error) { return nil, nil }```

dave.enyeart (Wed, 08 Mar 2017 18:18:18 GMT):
I think I see the problem :)

kletkeman (Wed, 08 Mar 2017 18:18:38 GMT):
Hmmm ... there might be a bit if a bug there ... lol

kletkeman (Wed, 08 Mar 2017 18:19:05 GMT):
interesting that there is real code in there in v0.6 ... someone had to delete it ...

dave.enyeart (Wed, 08 Mar 2017 18:19:14 GMT):
i will look into it

kletkeman (Wed, 08 Mar 2017 18:19:57 GMT):
thx ... meanwhile, we still need to set it ... but Google timestamp protos has lots of conversions in the comments, so should not be too tough if there is a place to put it in the request

kletkeman (Wed, 08 Mar 2017 18:21:48 GMT):
@bretharrison Took me a minute to get what you meant ... but I see it now. Google can define it how they want, but we can store Unix epoch instead so long as both ends agree on that ... sdk and fabric

kletkeman (Wed, 08 Mar 2017 18:22:38 GMT):
however, automated Googley tools would fail to understand should they want to display it

kletkeman (Wed, 08 Mar 2017 18:23:41 GMT):
a simple fix would be to use HLtimestamp custom proto and not worry about it ...

bkvellanki (Wed, 08 Mar 2017 18:29:52 GMT):
Has joined the channel.

bkvellanki (Wed, 08 Mar 2017 18:29:58 GMT):
Any sample on how to capture the events when a transaction is submitted in smart contract. How do we also capture those events from Node.js

bkvellanki (Wed, 08 Mar 2017 18:30:58 GMT):
I want to generate a uniqueid when i submit a transaction to smart contract and update my database

bkvellanki (Wed, 08 Mar 2017 18:31:31 GMT):
with the transaction id and uniqueid

dave.enyeart (Wed, 08 Mar 2017 18:36:01 GMT):
@muralisr Would it be possible for chaincode shim GetTxTimestamp() to pull the timestamp from the proposal header?

dave.enyeart (Wed, 08 Mar 2017 18:36:34 GMT):
It is not currently implemented:

dave.enyeart (Wed, 08 Mar 2017 18:36:38 GMT):
```func (stub *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error) { return nil, nil }```

dave.enyeart (Wed, 08 Mar 2017 18:37:48 GMT):
In 0.6 it was the peer timestamp (not common). In v1 it can be a common timestamp from the proposal

dave.enyeart (Wed, 08 Mar 2017 18:38:15 GMT):
(of course, it would only be as reliable as the client that submits it)

kletkeman (Wed, 08 Mar 2017 18:46:11 GMT):
@dave.enyeart @muralisr @jimthematrix For IoT contracts, the time is especially critical. I have created an issue for this in order to emphasize its importance to us: https://jira.hyperledger.org/browse/FAB-2701

kletkeman (Wed, 08 Mar 2017 18:47:54 GMT):
@bkvellanki chaincode events are emitted when a transaction is committed to a block ... look for EventHub in the SDK

dave.enyeart (Wed, 08 Mar 2017 18:49:17 GMT):
only thing that could be done in v1 is to use the submitter's timestamp, is that an acceptable interim solution?

dave.enyeart (Wed, 08 Mar 2017 18:49:17 GMT):
only thing that could be done in v1 is to use the proposal submitter's timestamp, is that an acceptable interim solution?

dave.enyeart (Wed, 08 Mar 2017 18:49:36 GMT):
wasnt clear from FAB-2701

kletkeman (Wed, 08 Mar 2017 19:19:34 GMT):
@dave.enyeart I added clarification to https://jira.hyperledger.org/browse/FAB-2701 ... so I think the answer is yes, as that would meet our criteria, if the timestamp submitted became the timestamp for the transaction as well (i.e. once set, it is the timestamp for the entire transaction on all peers)

kletkeman (Wed, 08 Mar 2017 19:20:38 GMT):
note that this is severely flawed in a real global system, since clients are free to set whatever time they want ... but to get to the point where a real time service is available to set the TX time at endorsement / proposal time, this would do

dave.enyeart (Wed, 08 Mar 2017 19:20:53 GMT):
agreed

kletkeman (Wed, 08 Mar 2017 19:21:05 GMT):
many thanks

kletkeman (Wed, 08 Mar 2017 19:21:18 GMT):
(in advance :-) )

muralisr (Wed, 08 Mar 2017 19:33:11 GMT):
@kletkeman will look soon... need to look at the history of changes a bit

kletkeman (Wed, 08 Mar 2017 19:36:58 GMT):
@muralisr thanks.

bkvellanki (Wed, 08 Mar 2017 19:39:22 GMT):
@kletkeman thanks

Basug (Thu, 09 Mar 2017 01:19:35 GMT):
Hi - is it possible to deploy java chain code using node sdk ?

Ying (Thu, 09 Mar 2017 02:41:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=49JPBkoDurqGtrmvN) @jimthematrix Reported https://jira.hyperledger.org/browse/FAB-2711

greg.haskins (Thu, 09 Mar 2017 02:50:58 GMT):
@Basug I recently augmented the SDK so that it supported CAR in addition to GOLANG....unless someone furthered that work and added JAVA to the mix, I i think the answer is not (not yet)

greg.haskins (Thu, 09 Mar 2017 02:50:58 GMT):
@Basug I recently augmented the SDK so that it supported CAR in addition to GOLANG....unless someone furthered that work and added JAVA to the mix, I i think the answer is no (not yet)

greg.haskins (Thu, 09 Mar 2017 02:50:58 GMT):
@Basug I recently augmented the SDK so that it supported CAR in addition to GOLANG....unless someone furthered that work and added JAVA to the mix, I think the answer is no (not yet)

jimthematrix (Thu, 09 Mar 2017 03:16:59 GMT):
now you can run `gulp test` that launches the entire test suite including both headless (those that don't require a target network) and integration (those that do), which would get you the following results: 1..487 # tests 487 # pass 487 # ok ====== Coverage summary ====== Statements : 76.08% ( 2150/2826 ) Branches : 61.9% ( 741/1197 ) Functions : 67.73% ( 298/440 ) Lines : 76.36% ( 2142/2805 )

jimthematrix (Thu, 09 Mar 2017 03:18:21 GMT):
as usual, make sure to launch the target network with test/fixtures/channel/docker-compose.yaml, and clean up the state store (/tmp/hfc-test-kvs*)

jimthematrix (Thu, 09 Mar 2017 03:21:03 GMT):
@Basug for java chaincode support still some foundational work need to be completed first (java shim to be caught up with the latest fabric, for the most part), @sanchezl has been working on that along with @satheeshk

satheeshk (Thu, 09 Mar 2017 03:21:03 GMT):
Has joined the channel.

Basug (Thu, 09 Mar 2017 03:22:16 GMT):
@jimthematrix - thank you. If I do need to do a POC with Java, should I just go back to 0.6 and try ?

Basug (Thu, 09 Mar 2017 03:22:24 GMT):
something on the lines of https://github.com/hyperledger/fabric/blob/0c07573430f11c50dae713a0add596f3e9959633/docs/source/Setup/JAVAChaincode.rst

jimthematrix (Thu, 09 Mar 2017 03:25:54 GMT):
it'd be a question better asked on the #fabric-java-chaincode channel

Basug (Thu, 09 Mar 2017 03:26:29 GMT):
ok, thanks !

Willson (Thu, 09 Mar 2017 06:34:38 GMT):
Has joined the channel.

bh4rtp (Thu, 09 Mar 2017 09:14:46 GMT):
@jimthematrix are there any changes in fabric-sdk-node yesterday?

bh4rtp (Thu, 09 Mar 2017 09:14:46 GMT):
@jimthematrix are there any changes in fabric-sdk-node in latest 24 hours?

bh4rtp (Thu, 09 Mar 2017 09:17:00 GMT):
i cloned fabric-sdk-node last night

jimthematrix (Thu, 09 Mar 2017 13:33:02 GMT):
yes one change on tests was merged, it's fairly big but all on the test code

jimthematrix (Thu, 09 Mar 2017 15:07:57 GMT):
All, just updated both fabric-ca and fabric-ca-client in *npm*, both tagged `unstable` and versioned `0.2.1`

jimthematrix (Thu, 09 Mar 2017 15:08:27 GMT):
@davidkel @sstone1 @dselman ^^^

sstone1 (Thu, 09 Mar 2017 15:09:02 GMT):
Great, thanks @jimthematrix !

jimthematrix (Thu, 09 Mar 2017 15:09:36 GMT):
(this is still done manually at this point)

pd93 (Thu, 09 Mar 2017 15:23:03 GMT):
Hey, does anyone know what the equivalent of `CORE_PEER_LOCALMSPID` is in the node-sdk? I'm trying to transact on the e2e_cli example in `fabric` via the node sdk

pd93 (Thu, 09 Mar 2017 15:23:03 GMT):
Hey, does anyone know what the equivalent of `CORE_PEER_LOCALMSPID` is in the node-sdk? I'm trying to transact on the e2e_cli example in `fabric` via the node sdk, but I keep getting `Failed to deserialize creator identity, err MSP DEFAULT is unknown`

pd93 (Thu, 09 Mar 2017 15:23:03 GMT):
Hey, does anyone know what the equivalent of `CORE_PEER_LOCALMSPID` is in the node-sdk? I'm trying to transact on the e2e_cli example in `fabric` via the node sdk, but I keep getting `Failed to deserialize creator identity, err MSP DEFAULT is unknown` *-- edit --* This appears to be solved by adding `admin.mspImpl._id = "Org0MSP";` However, I'm now getting `The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority`

qingdu (Thu, 09 Mar 2017 15:55:31 GMT):
Has joined the channel.

qingdu (Thu, 09 Mar 2017 15:57:56 GMT):
Failed to receive transaction notification within the timeout period i was running the node example,anyone see the same condition?

raj (Thu, 09 Mar 2017 16:21:45 GMT):
Has joined the channel.

RyanElliott (Thu, 09 Mar 2017 16:58:28 GMT):
Can anyone get me pointed in the right direction for building the API reverence documentation? The instructions here (https://github.com/hyperledger/fabric-sdk-node/blob/master/docs/app-developer-env-setup.md) just say ``

RyanElliott (Thu, 09 Mar 2017 17:15:44 GMT):
OK, I think I answered my own question: I found fabric-sdk-node/build/tasks/doc.js, so I took a wild guess and ran `gulp doc`, which generated some html files under `/fabric-sdk-node/docs/gen`. If anyone has any tweaks to make this better, please let me know.

bkvellanki (Thu, 09 Mar 2017 17:56:20 GMT):
Any sample code node to submit a proposal, capture proposal response, and capture the events when a transaction is submitted in smart contract.

jimthematrix (Thu, 09 Mar 2017 18:20:21 GMT):
@pd93 yes you found the temporary workaround (until https://gerrit.hyperledger.org/r/7063 gets merged) :thumbsup:. the "signed by unknown authority" error is saying that the ca that signs the app's ecert is not trusted by the peer, if you are just switching to using the test/fixtures/channel/docker-compose.yaml to launch the target network, you should make sure to delete the old ecerts (/tmp/hfc-test-kvs/*)

jimthematrix (Thu, 09 Mar 2017 18:20:21 GMT):
@pd93 yes you found the temporary workaround (until https://gerrit.hyperledger.org/r/7063 gets merged) :thumbsup:. the "signed by unknown authority" error is saying that the ca that signs the app's ecert is not trusted by the peer, if you are just switching to using the test/fixtures/channel/docker-compose.yaml to launch the target network, you should make sure to delete the old ecerts (/tmp/hfc-test-kvs/*), so that they get re-issued by the fabric-ca that's been configured to have the peer's trust

bsmita (Thu, 09 Mar 2017 21:20:51 GMT):
Has joined the channel.

davidkel (Thu, 09 Mar 2017 21:43:49 GMT):
@jimthematrix thanks, really appreciated

jimthematrix (Thu, 09 Mar 2017 22:14:21 GMT):
@RyanElliott you asked _If anyone has any tweaks to make this better, please let me know_, anything wrong with `gulp doc`?

jimthematrix (Thu, 09 Mar 2017 22:15:13 GMT):
@bkvellanki see https://github.com/hyperledger/fabric-sdk-node/tree/master/test/integration/e2e

kuangchao (Fri, 10 Mar 2017 01:53:37 GMT):
Has joined the channel.

RyanElliott (Fri, 10 Mar 2017 03:26:44 GMT):
@jimthematrix Nothing wrong at all.

berserkr (Fri, 10 Mar 2017 06:59:40 GMT):
Has joined the channel.

ibmamnt (Fri, 10 Mar 2017 07:57:07 GMT):
@jimthematrix Sorry about the question for hfc@0.6.5. gRPC client seems to become IDLE when 5 minutes passed (based on gRPC spec on connection status). https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md So if node.js application became idle for 5 minutes, gRPC connection to peer(s) become IDLE. Then, if some try to invoke gRPC, then it returns the code = 14 ( https://github.com/grpc/grpc-go/blob/master/codes/codes.go) Unavailable Code = 14. This means, service is in a transient status. The code states to try. However, SDK does not handle the case correctly. I checked that v1.0 also did not check for health status. If there is no trivial solution, I can raise as issue in JIRA.

Ying (Fri, 10 Mar 2017 11:32:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hqe4aZxAM9idHDiGJ) Hi @jimthematrix, I got the similar error as @pd93 said, except my error is reported by peer during the discovery and causes 'peer start' panic exit. I tried: remove old certs by 'rm -rf /tmp/hfc-* && rm -rf ~/.hfc-key-store'; remove old certs by 'rm crypto-config/peerOrganizations/peerOrg1/ca/peerOrg1-cert.pem'; regenerate all certs by './generateCfgTrx.sh mycc-jd'. But the error persists. How can I get more trace info from fabric when it validates identity in gossip.newCertStore? Thanks for your kindly help. 2017-02-19 19:40:09.177 UTC [msp] Validate -> INFO 03e MSP Org1MSP validating identity 2017-02-19 19:40:09.177 UTC [gossip/gossip#▒+!▒r▒9▒▒#▒▒U▒ ERRO 03f Failed associating self PKIID to cert: The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid panic: Failed associating self PKIID to cert: The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid

MartinMateev (Fri, 10 Mar 2017 12:56:02 GMT):
@jimthematrix can I suggest creating a FAQ page for v1.0 NodeSDK with links to relevant/up-to-date resources to drop barriers to entry for new-commers ?

Ying (Fri, 10 Mar 2017 13:04:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mgqoNNXHvkkgxLZYy) Is it correct that admincerts/peerOrg1-cert.pem with 'subject: C=US, ST=California, L=San Francisco, O=peerOrg1, CN=peerOrg1' instead of 'admin'?

weeds (Fri, 10 Mar 2017 13:25:18 GMT):
@MartinMateev I think that's a great suggestion. @markparz is helping on documentation- Mark - maybe you can get input from Martin to see how we improve our documentation? I know we are just now trying to get all the pieces in the doc, but maybe Martin could tell us the places they got hung up.

MartinMateev (Fri, 10 Mar 2017 14:04:59 GMT):
@markparz I'll be happy to help!

MartinMateev (Fri, 10 Mar 2017 14:11:01 GMT):
for example: https://www.npmjs.com/package/hfc

MartinMateev (Fri, 10 Mar 2017 14:11:27 GMT):
the "Hyperledger Fabric SDK documentation page" link goes to a 404

MartinMateev (Fri, 10 Mar 2017 14:13:16 GMT):
as pretty much all the .js links

MartinMateev (Fri, 10 Mar 2017 14:14:58 GMT):
seems like there was some SDK folder structure migration which broke all external links to examples, docs, etc...

bkvellanki (Fri, 10 Mar 2017 15:15:58 GMT):
@jimthematrix thanks

kletkeman (Fri, 10 Mar 2017 15:27:01 GMT):
@jimthematrix I was browsing some samples other than the e2e, and noticed that each one seems to use a slightly differing format for the config,json file, which is really a fabric definition. Should this be a standardized format so that the SDK and applications can all rely on the info? Or maybe it is and I just misread?

JatinderBali (Fri, 10 Mar 2017 15:46:50 GMT):
Has joined the channel.

MT (Fri, 10 Mar 2017 16:03:14 GMT):
Has joined the channel.

markparz (Fri, 10 Mar 2017 16:27:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bbFx8WZ7otXJ9DfTq) @MartinMateev you are right... 404... sheesh... will have to fix that. Yes, when the we switched over to the new table of contents and styling changes it looks like some of these externals broke.. thanks... would like to keep chatting on things you find along with your experience in the doc with @raissaxie

raissaxie (Fri, 10 Mar 2017 16:27:26 GMT):
Has joined the channel.

MartinMateev (Fri, 10 Mar 2017 21:59:11 GMT):
I also want to report broken links at: http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html under "Building the fabric"

RyanElliott (Fri, 10 Mar 2017 23:53:22 GMT):
Does anyone know of an example for how to create a channel from the Node SDK? The integration test (https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/create-channel.js) shows how to do it, but passes in a pre-baked binary configuration. A few days ago, @jimthematrix described how to build the binary configuration using `build/bin/configtxgen`, but I was wondering if there was a way to do this using Node.js code instead.

zakir2k (Sat, 11 Mar 2017 06:53:46 GMT):
Has joined the channel.

mastersingh24 (Sat, 11 Mar 2017 12:10:41 GMT):
@RyanElliott - not at this point. work in progress (aka I personally started on it but for now you are stuck with configtx )

MartinMateev (Sat, 11 Mar 2017 13:14:49 GMT):
ok fabric, round #2

RyanElliott (Sat, 11 Mar 2017 15:28:14 GMT):
@mastersingh24 Ok, thanks. Sounds like I'm currently on the path of least resistance. :slight_smile:

MartinMateev (Sat, 11 Mar 2017 19:58:42 GMT):
ok giving up ...

MartinMateev (Sat, 11 Mar 2017 19:58:59 GMT):
will come back in two weeks to see if I can get anything up and running : ((

JasonD (Sun, 12 Mar 2017 06:13:39 GMT):
Has joined the channel.

JasonD (Sun, 12 Mar 2017 06:20:40 GMT):
hi, i saw this code: hfc.getChain(), it says "Get a Chain instance from the state storage" , but what does it mean? I know channel, chaincode, peer, etc. But Chain instance ?

levinkwong (Sun, 12 Mar 2017 09:54:40 GMT):
Hi all, I had an app using fabric-client 0.1.2 and fabric-ca-client 0.1.0 with hackfest docker images (from getting start). After I update fabric-client and fabric-ca-client to 0.2.1, the user registration failed, it says: ``` Error: Invalid parameter. Must have a valid mspId. ```

levinkwong (Sun, 12 Mar 2017 09:54:48 GMT):
Any idea?

kletkeman (Sun, 12 Mar 2017 22:25:23 GMT):
@JasonD A chain is the same as a channel. There is an option (I've seen it mentioned in the code) to use a "default chain", which of course would be a channel that the system creates for you, thus acting a lot like v0.6. It follows that "chain instance" is an alias for "channel". I've also seen "sub chain" used, and of course just "chain" ... This is evolving fast enough that standardized language is going to lag.

JasonD (Mon, 13 Mar 2017 01:08:59 GMT):
@kletkeman thanks

mastersingh24 (Mon, 13 Mar 2017 02:21:43 GMT):
@MartinMateev - https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/end-to-end.rst

jimthematrix (Mon, 13 Mar 2017 04:12:41 GMT):
if anybody have successfully connected a node.js program to a golang program running inside docker via TLS, I could use some help

jimthematrix (Mon, 13 Mar 2017 04:13:54 GMT):
node sdk is still not able to connect to the orderer (or peer) via TLS, using @mastersingh24's 7141 CR

jimthematrix (Mon, 13 Mar 2017 04:14:20 GMT):
the latest code I've been experimenting with is in https://gerrit.hyperledger.org/r/#/c/7135/

jimthematrix (Mon, 13 Mar 2017 04:15:16 GMT):
start the network with test/fixtures/docker-compose.yaml, and run test/integration/e2e/create-channel.js

jimthematrix (Mon, 13 Mar 2017 04:15:33 GMT):
you get the following error: ```jimzhang:fabric-sdk-node jimzhang$ node test/integration/e2e/create-channel.js info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: create channel ***** info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/jimzhang/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' ok 3 Successfully read file E0312 23:09:44.429632000 123145312870400 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E0312 23:09:44.431319000 123145312870400 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/jimzhang/workspace/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/jimzhang/workspace/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/jimzhang/workspace/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12)" not ok 4 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/jimzhang/workspace/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:117:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/jimzhang/workspace/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/jimzhang/workspace/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/jimzhang/workspace/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12) --- operator: fail at: testUtil.readFile.then.then.then.then.then (/Users/jimzhang/workspace/fabric-sdk-node/test/integration/e2e/create-channel.js:97:5) ... ok 5 Successfully waited to make sure new channel was created. 1..5 # tests 5 # pass 4 # fail 1 ```

levinkwong (Mon, 13 Mar 2017 04:53:10 GMT):
May I know what fabric environment does the integration tests under fabric-sdk-node test with? Any docker images available?

levinkwong (Mon, 13 Mar 2017 04:54:13 GMT):
Since after upgrade to 0.2.0, the hackfest seems not workable anymore

bh4rtp (Mon, 13 Mar 2017 06:00:19 GMT):
@jimthematrix see fabric [FAB-2745] Update e2e_cli to work with TLS, maybe help. the update was committed 10 hours ago.

JasonD (Mon, 13 Mar 2017 06:13:00 GMT):
Hi everyone, here is the thing, I create a channel name MyChain, and I want to authorize userA to read the channel's data but cannot write, is it possible with fabric-node sdk ? or I should write the system by my own ?

mastersingh24 (Mon, 13 Mar 2017 11:32:52 GMT):
@jimthematrix - https://gerrit.hyperledger.org/r/#/c/7135/2/test/fixtures/docker-compose.yaml@36 - you have the wrong environment variables set :( You just need to change `PEER` to `GENERAL` (so basically TLS is not enabled on the orderer and that's why you are getting that error)

jjohnst (Mon, 13 Mar 2017 12:35:44 GMT):
Has joined the channel.

jimthematrix (Mon, 13 Mar 2017 12:39:29 GMT):
@mastersingh24 thanks for catching that, so after fixing that I'm getting over the handshake problem. I also need to set `GRPC_SSL_CIPHER_SUITES='ECDHE-ECDSA-AES128-GCM-SHA256'`. now seeing this in the orderer log: ```orderer | 2017/03/13 12:31:02 transport: http2Server.HandleStreams failed to receive the preface from client: EOF```

jimthematrix (Mon, 13 Mar 2017 12:39:29 GMT):
@mastersingh24 thanks for catching that, so after fixing that I'm getting over the handshake problem. I also need to set `GRPC_SSL_CIPHER_SUITES='ECDHE-ECDSA-AES128-GCM-SHA256'` on the client side. now seeing this in the orderer log: ```orderer | 2017/03/13 12:31:02 transport: http2Server.HandleStreams failed to receive the preface from client: EOF```

jimthematrix (Mon, 13 Mar 2017 12:39:33 GMT):
@jyellick

jimthematrix (Mon, 13 Mar 2017 12:39:33 GMT):
@jyellick ^^^

mastersingh24 (Mon, 13 Mar 2017 12:43:49 GMT):
@jimthematrix - you should copy what we did for hfc@0.6 - https://github.com/hyperledger/fabric/blob/v0.6/sdk/node/src/hfc.ts#L46

mastersingh24 (Mon, 13 Mar 2017 12:44:06 GMT):
sets up a good set of RSA and EC suites for TLSv1.2

jimthematrix (Mon, 13 Mar 2017 12:45:26 GMT):
yes i took the first ecdsa value from that list ;-)

mastersingh24 (Mon, 13 Mar 2017 12:45:41 GMT):
(I created that list ;) )

jimthematrix (Mon, 13 Mar 2017 12:45:41 GMT):
let me try using the entire list

mastersingh24 (Mon, 13 Mar 2017 12:46:02 GMT):
not sure if that's the issue, but we should do it anyway

jimthematrix (Mon, 13 Mar 2017 12:59:58 GMT):
still the same error, so it must be something else (but do agree we need to set the env variable in the code. it is a little annoying because it's a subset of what node's `tls` module supports as the ssl cipher suites, but seems like grpc is not taking advantage of that)

mastersingh24 (Mon, 13 Mar 2017 13:35:11 GMT):
I'll take a look after the scrum call

mastersingh24 (Mon, 13 Mar 2017 13:35:37 GMT):
needed a break from TLS for 12 hours ;)

mastersingh24 (Mon, 13 Mar 2017 13:35:43 GMT):
so now I can take a look again

mastersingh24 (Mon, 13 Mar 2017 13:43:40 GMT):
@jimthematrix - you want me to fix fabric-ca-client to work with the latest farbic-ca?

mastersingh24 (Mon, 13 Mar 2017 13:43:40 GMT):
@jimthematrix - you want me to fix fabric-ca-client to work with the latest fabric-ca?

mastersingh24 (Mon, 13 Mar 2017 13:44:04 GMT):
guess I should do TLS there as well :(

harsha (Mon, 13 Mar 2017 14:14:05 GMT):
Has joined the channel.

MartinMateev (Mon, 13 Mar 2017 14:47:15 GMT):
@levinkwong I believe it has to do with the orderer piece

MartinMateev (Mon, 13 Mar 2017 14:49:18 GMT):
try this: https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/end-to-end.rst

MartinMateev (Mon, 13 Mar 2017 14:49:21 GMT):
it worked out for me

MartinMateev (Mon, 13 Mar 2017 14:49:42 GMT):
unfortunately I wasn't able to bring CouchDB into the picture

MartinMateev (Mon, 13 Mar 2017 14:50:24 GMT):
that's why I wish there was a guide/how-to install, configure and run the various pieces (peer, ca, orderer, etc...) one by one on the command line(osx/linux)

MartinMateev (Mon, 13 Mar 2017 14:50:58 GMT):
I understand docker images and vagrant make it easy to get going but they add another layer of complexity to a software that's already way too complex for new comers

DannyWong (Mon, 13 Mar 2017 15:11:21 GMT):
haha, right, it takes us a lot of effort to explain to new comers!

jwalt (Mon, 13 Mar 2017 15:14:17 GMT):
Has joined the channel.

jimthematrix (Mon, 13 Mar 2017 15:24:54 GMT):
@mastersingh24 thanks for offering to fix fabric-ca-client :thumbsup:

jimthematrix (Mon, 13 Mar 2017 15:25:28 GMT):
on the TLS front, the error I pasted above seems to be exactly this one: https://github.com/grpc/grpc/issues/10062

yacovm (Mon, 13 Mar 2017 15:37:33 GMT):
This ^ remind me of:

yacovm (Mon, 13 Mar 2017 15:37:33 GMT):
This ^ remind me of: https://xkcd.com/979/

yacovm (Mon, 13 Mar 2017 15:37:42 GMT):

Message Attachments

firas.qutishat (Mon, 13 Mar 2017 15:41:38 GMT):
Hi all I tried to run deployment of chaincode from node.sdk but I received this error GRPC client got an error response from the peer "grpc://localhost:7056". Error: Illegal file detected in payload: "src\github.com\example_cc\example_cc.go" at c:\goprojects\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:434:17

firas.qutishat (Mon, 13 Mar 2017 15:41:38 GMT):
Hi all I tried to run deployment of chaincode from node.sdk in Windows but I received this error GRPC client got an error response from the peer "grpc://localhost:7056". Error: Illegal file detected in payload: "src\github.com\example_cc\example_cc.go" at c:\goprojects\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:434:17

greg.haskins (Mon, 13 Mar 2017 16:01:48 GMT):
@firas.qutishat are you using the most recent version of the SDK code?

greg.haskins (Mon, 13 Mar 2017 16:02:48 GMT):
@jimthematrix quick guess, I bet the issue is the "\" vs "/"

greg.haskins (Mon, 13 Mar 2017 16:03:23 GMT):
I think the peer validation logic is using a regex with the forward slash, not backwards

greg.haskins (Mon, 13 Mar 2017 16:04:19 GMT):
@firas.qutishat nm my question, I think I see what is happening

jimthematrix (Mon, 13 Mar 2017 16:04:24 GMT):
@greg.haskins I would guess the same, @firas.qutishat please try replacing the "\" in chaincodePath value with "/", node.js prefers "/" on all platforms

firas.qutishat (Mon, 13 Mar 2017 16:04:46 GMT):
I will try replacing

greg.haskins (Mon, 13 Mar 2017 16:05:08 GMT):
@jimthematrix ah, I didnt realize you might have a choice there

greg.haskins (Mon, 13 Mar 2017 16:05:44 GMT):
I am fine fixing the peer validation logic if it makes sense to allow both...but if you think we only want to support / we could validate it on the sdk side

greg.haskins (Mon, 13 Mar 2017 16:05:51 GMT):
i am fine either way

jimthematrix (Mon, 13 Mar 2017 16:06:24 GMT):
yeah i think node.js allows for both, but since the tar zip is being sent to a different platform, the sdk could do more to make the resulting paths inside more cross-platform

greg.haskins (Mon, 13 Mar 2017 16:06:36 GMT):
right, ok, this makes sense

jimthematrix (Mon, 13 Mar 2017 16:06:56 GMT):
i think it'd be a helpful thing to do on the backend to tolerate "\" as well

jimthematrix (Mon, 13 Mar 2017 16:07:10 GMT):
for those who don't use the sdks

greg.haskins (Mon, 13 Mar 2017 16:07:31 GMT):
since we know, by definition, (because of docker/ccenv) that the target is linux, I suppose we could argue that the "spec" should target linux

greg.haskins (Mon, 13 Mar 2017 16:07:57 GMT):
what will happen if we try to expand the "\" on linux though?

greg.haskins (Mon, 13 Mar 2017 16:08:02 GMT):
does it do the right thing?

firas.qutishat (Mon, 13 Mar 2017 16:11:55 GMT):
The chaincode path in node.js is already represented by / and didn't work. So I think the change should happen in peer validation logic

firas.qutishat (Mon, 13 Mar 2017 16:17:02 GMT):
I have another question about deployment in node.js there is method sendInstantiateProposal I tried to find it in fabric SDK design (https://docs.google.com/document/d/1R5RtIBMW9fZpli37E5Li5_Q9ve3BnQ4q3gWmGZj6Sv4/edit#heading=h.cxemmeu15ub) but is not there is the spec behind from node.js

jimthematrix (Mon, 13 Mar 2017 16:27:28 GMT):
@firas.qutishat yes the design spec is lagging the implementation, needs an update at some point

jimthematrix (Mon, 13 Mar 2017 16:27:28 GMT):
@firas.qutishat yes the design spec is lagging behind the implementation, needs an update at some point

antoniovassell (Mon, 13 Mar 2017 16:28:39 GMT):
Has joined the channel.

firas.qutishat (Mon, 13 Mar 2017 16:33:44 GMT):
@jimthematrix Should I follow the node.sdk design

jimthematrix (Mon, 13 Mar 2017 16:50:07 GMT):
@firas.qutishat are you writing applications or another sdk implementation?

jimthematrix (Mon, 13 Mar 2017 16:50:27 GMT):
in fact in both cases you should use the node sdk impl as a better reference than the design spec

firas.qutishat (Mon, 13 Mar 2017 16:50:43 GMT):
ok thanks

kletkeman (Mon, 13 Mar 2017 17:38:40 GMT):
@jimthematrix I am getting a pretty basic error that I can't figure out how to get around. npm rebuild and npm update don't help ... tried both fabric-sdk-node and my own app and just can't get past this. Have you seen it, and is there a known fix? mbpkim:cli kim$ node cli module.js:598 return process.dlopen(module, path._makeLong(filename)); ^ Error: The module '/Users/kim/DEV/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/grpc_node.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 48. This version of Node.js requires NODE_MODULE_VERSION 51. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or`npm install`).

kletkeman (Mon, 13 Mar 2017 17:39:26 GMT):
Are we welded onto a specific version of node? That is an issue with the serial port node module and I just realized that this is a binary ...

jimthematrix (Mon, 13 Mar 2017 17:43:41 GMT):
@kletkeman node sdk requires 6.9.x at this point, suggest updating the node.js engine and delete node-modules and 'npm install' again (grpc is re-compiled during install)

kletkeman (Mon, 13 Mar 2017 17:44:34 GMT):
@jimthematrix So this is unacceptable? mbpkim:cli kim$ node -v v7.6.0

kletkeman (Mon, 13 Mar 2017 17:44:44 GMT):
Well, I guess that's obvious :-)

kletkeman (Mon, 13 Mar 2017 17:44:56 GMT):
I'll need to downgrade ...

jimthematrix (Mon, 13 Mar 2017 17:53:21 GMT):
we actually had to specifically exclude 7.x because of grpc issues

kletkeman (Mon, 13 Mar 2017 17:57:40 GMT):
ok, thx

yedendra (Mon, 13 Mar 2017 18:02:31 GMT):
For every transaction with node client, there is a transaction uuid created. Is this transaction id related to block id by anyway? if not related, how to retrieve or return block id of an invoke operation?

yedendra (Mon, 13 Mar 2017 18:02:31 GMT):
For every transaction using node client, there is a transaction uuid created. Is this transaction id related to block id by anyway? if not related, how to retrieve or return block id of an invoke operation?

kletkeman (Mon, 13 Mar 2017 18:06:23 GMT):
@yedendra Transaction IDs uniquely identify a transaction. That used to be assigned in the fabric, but the SDK generates one for v1. A set of transactions will be ordered and then committed to a block. The block ID is simply a number, and it increases monotonically for the entire fabric (every peer has an identical copy of all channels / chains (same thing). You can retrieve a block by its ID using and SDK service, and you can retrieve and transaction by its ID through a similar service.

kletkeman (Mon, 13 Mar 2017 18:07:51 GMT):
Also, when you retrieve a block, you will be able to crawl the array of transactions inside and the transaction ID will be there. So if you listen for block events on your channel.

kletkeman (Mon, 13 Mar 2017 18:09:29 GMT):
There is one very subtle issue that I have not yet tested: A transaction can fail at endorsement, which probably does not generate a rejection event, and at commit time, which should generate a rejection event. The reason here is that the SDK knows that the endorsement failed, because that is part od the client app's responsibility (to fail the transaction if the endorsements are no good.)

kletkeman (Mon, 13 Mar 2017 18:10:30 GMT):
In the case of a late failure, the client does not know that it happened because it is a flow control issue. Two transactions in the same block MUST NOT change the same key, and so the second and any susequent transactions that touch an already changed key will be failed.

yedendra (Mon, 13 Mar 2017 18:11:25 GMT):
@kletkeman thanks for clarify. So client transaction id is only used by SDK is used to track the flow control. is this right?

kletkeman (Mon, 13 Mar 2017 18:12:59 GMT):
Txn ID is a permanent ID in the chain, so a txn is forever identifiable. This is very important for the chain to function. Txns live in blocks and so there is also a permanent relationship between txn ID and block ID. The SDK assigns txn IDs, but the orderer chooses the blockID into which the txn goes ... the committer decides if the txn gets a late failure (which the is the application's fault) ...

yedendra (Mon, 13 Mar 2017 18:12:59 GMT):
currently, im using 0.6, is there a way to query by blockId and see what key was changed and retrieve its value?

kletkeman (Mon, 13 Mar 2017 18:13:18 GMT):
v0.6 is a piece of cake by comparison ... sorry, I thought you were looking at 1.0 ...

kletkeman (Mon, 13 Mar 2017 18:13:44 GMT):
I use REST commands ... https://peeraddr:port/chain gets youthe height

kletkeman (Mon, 13 Mar 2017 18:13:44 GMT):
https://peeraddr:port/chain/blocks/blockid

kletkeman (Mon, 13 Mar 2017 18:14:03 GMT):
gets you the block

kletkeman (Mon, 13 Mar 2017 18:14:18 GMT):
and there is a transaction API as well ...

yedendra (Mon, 13 Mar 2017 18:14:47 GMT):
im not using rest in our solution, since it is going to go away. Can you point me to the transaction API

yedendra (Mon, 13 Mar 2017 18:14:49 GMT):
docs

yedendra (Mon, 13 Mar 2017 18:15:03 GMT):
or i can jump in to the hfc.js

kletkeman (Mon, 13 Mar 2017 18:15:06 GMT):
https://github.com/hyperledger/fabric/blob/v0.6/docs/API/CoreAPI.md#rest-endpoints

kletkeman (Mon, 13 Mar 2017 18:15:50 GMT):
well, the SDK in v0.6 and v1 is not the same to my knowledge ... I'm not sure that your code will port forward easily ... but perhaps it will

kletkeman (Mon, 13 Mar 2017 18:16:57 GMT):
in v0.6 you submit a single REST command to send a txn ... in v1 you talk to endorsers and then submit the txn to the network to get ordered and committed ... a whole different level of processing

kletkeman (Mon, 13 Mar 2017 18:17:12 GMT):
so I prefer the simplicity of REST for the stopgap solution, but it is of course your call

yedendra (Mon, 13 Mar 2017 18:17:19 GMT):
right, more eager about v1. since we will move there.

yedendra (Mon, 13 Mar 2017 18:18:18 GMT):
i will use REST in 0.6. For v1, is there a documentation on Transaction API

kletkeman (Mon, 13 Mar 2017 18:18:39 GMT):
I linked it above

yedendra (Mon, 13 Mar 2017 18:19:39 GMT):
https://github.com/hyperledger/fabric/tree/v1.0.0-preview/docs ?

kletkeman (Mon, 13 Mar 2017 18:19:51 GMT):
https://github.com/hyperledger/fabric/blob/v0.6/docs/API/CoreAPI.md#rest-endpoints

kletkeman (Mon, 13 Mar 2017 18:20:12 GMT):
you can't look at v1 stuff ... v0.6 is extremely different

kletkeman (Mon, 13 Mar 2017 18:20:20 GMT):
much more mature, but soon to be irrelevant

kletkeman (Mon, 13 Mar 2017 18:20:42 GMT):
there is a branch for v0.6

kletkeman (Mon, 13 Mar 2017 18:20:54 GMT):
v1 is at head

yedendra (Mon, 13 Mar 2017 18:22:56 GMT):
ok good. I will use rest endpoints for v0.6. v1.0 is quite different when i switched branch on git. I will read through the docs further. thanks for confirming the relationship between txId and blockid. I think this will stay as same for v1.0 as well.

emir888 (Mon, 13 Mar 2017 18:24:12 GMT):
Has joined the channel.

kletkeman (Mon, 13 Mar 2017 18:46:58 GMT):
yes, txn and block relationship will not change significantly

yedendra (Mon, 13 Mar 2017 19:02:22 GMT):
Thanks @kletkeman !

kletkeman (Mon, 13 Mar 2017 19:30:01 GMT):
not quite sure which transaction docs you mean ... but the REST is where I linked earlier, and the SDK for v0.6 is here: https://github.com/hyperledger/fabric/tree/v0.6/sdk/node

mastersingh24 (Mon, 13 Mar 2017 23:47:34 GMT):
@jimthematrix - if you are still working on it (hopefully not), I've got TLS working with the node-sdk and the orderer

mastersingh24 (Mon, 13 Mar 2017 23:56:59 GMT):
by the way, all I did was add the cipher suites to the environment: ``` process.env.GRPC_SSL_CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES ? process.env.GRPC_SSL_CIPHER_SUITES : 'ECDHE-RSA-AES128-GCM-SHA256:' + 'ECDHE-RSA-AES128-SHA256:' + 'ECDHE-RSA-AES256-SHA384:' + 'ECDHE-RSA-AES256-GCM-SHA384:' + 'ECDHE-ECDSA-AES128-GCM-SHA256:' + 'ECDHE-ECDSA-AES128-SHA256:' + 'ECDHE-ECDSA-AES256-SHA384:' + 'ECDHE-ECDSA-AES256-GCM-SHA384' ; ```

mastersingh24 (Mon, 13 Mar 2017 23:57:20 GMT):
and make sure that I could reach the orderer by the hostname in its server cert

jimthematrix (Tue, 14 Mar 2017 00:23:05 GMT):
`reach the orderer by the hostname in its server cert` - wow that was the magic key ;-) I've been setting the `ssl-target-name-override` to localhost, but once changing that to `orderer0` as in the CN name of the certificate, i'm able to connect

jimthematrix (Tue, 14 Mar 2017 00:24:05 GMT):
@mastersingh24 thanks man! i can sleep tonight now ;-)

RyanElliott (Tue, 14 Mar 2017 00:36:23 GMT):
Hello all. I'm trying to Instantiate some chain code, and when I call chain.initialize() I get an error like this: `error: [Chain.js]: TypeError: Cannot read property 'type' of null`. When I created this channel, I used the `SampleInsecureSolo` profile from https://github.com/hyperledger/fabric/blob/master/common/configtx/tool/configtx.yaml. Is it possible that the SampleInsecureSolo profile was a bad choice?

RyanElliott (Tue, 14 Mar 2017 01:20:24 GMT):
The api docs for chain.initialize state that this function pulls information about the MSP from the Orderer. The docker-compose file for integration testing (https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/channel/docker-compose.yaml) passes two environment vars to the orderer (ORDERER_GENERAL_LOCALMSPID & ORDERER_GENERAL_LOCALMSPDIR), are these the values that chain.initialize() is looking for? I tried adding them to the docker-compose file I am running (https://github.com/hyperledger/fabric/blob/master/test/docker-compose.yml), so now it looks like this: ```... - ORDERER_GENERAL_LOCALMSPID=SampleOrg - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/mspdir/ volumes: - ../msp/sampleconfig:/etc/hyperledger/mspdir ...``` Anyone have a guess as to what I might have missed?

RyanElliott (Tue, 14 Mar 2017 01:20:24 GMT):
The api docs for chain.initialize state that this function pulls information about the MSP from the Orderer. The docker-compose file for integration testing (https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/channel/docker-compose.yaml) passes two environment vars to the orderer (ORDERER_GENERAL_LOCALMSPID & ORDERER_GENERAL_LOCALMSPDIR), are these the values that chain.initialize() is looking for? I tried adding them to the docker-compose file I am running (https://github.com/hyperledger/fabric/blob/master/test/docker-compose.yml), so now it looks like this: ``` ... - ORDERER_GENERAL_LOCALMSPID=SampleOrg - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/mspdir/ volumes: - ../msp/sampleconfig:/etc/hyperledger/mspdir ... ``` Anyone have a guess as to what I might have missed?

antoniovassell (Tue, 14 Mar 2017 01:27:57 GMT):
Hey guys, quick question. I am seeing the code sample from here http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html is using the npm package fabric-client

antoniovassell (Tue, 14 Mar 2017 01:28:35 GMT):
while other places i see references of the npm package hfc

antoniovassell (Tue, 14 Mar 2017 01:29:15 GMT):
eg here: https://github.com/hyperledger/fabric-sdk-node/blob/master/docs/node-sdk-indepth.md#installing-only-the-sdk

antoniovassell (Tue, 14 Mar 2017 01:29:46 GMT):
which package "should" be used going forward?

JasonD (Tue, 14 Mar 2017 05:24:54 GMT):
Hey, I'm getting a error, Error: /usr/src/app/node_modules/hfc/node_modules/grpc/src/node/extension_binary/grpc_node.node: invalid ELF header

JasonD (Tue, 14 Mar 2017 05:25:03 GMT):
anyone seen this error ? know how to fix it ?

jimthematrix (Tue, 14 Mar 2017 07:43:57 GMT):
ok, so even after the technical hurdle was overcome, there's just A LOT OF work in connecting all the dots to get the e2e working from the node sdk. I've so far got create channel and join channel working. but I think the rest of the steps should be faster, now that all the crypto materials, docker-compose variables, and app configs are lined up. I updated what I've done so far to https://gerrit.hyperledger.org/r/#/c/7135/

yoheiueda (Tue, 14 Mar 2017 07:46:57 GMT):
Has joined the channel.

dselman (Tue, 14 Mar 2017 08:26:19 GMT):
@jimthematrix hang in there Jim! You're kicking ass. :muscle:

mastersingh24 (Tue, 14 Mar 2017 11:34:37 GMT):
@jimthematrix - I'm updating the fabric-ca-client to support TLS - so I'll take https://jira.hyperledger.org/browse/FAB-1552

jtrayfield (Tue, 14 Mar 2017 12:21:00 GMT):
does HFC v0.6 offer any way to access the transaction log?

jimthematrix (Tue, 14 Mar 2017 13:27:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hmpmqNv3qn4vPmnnX) @dselman :sunglasses:

jimthematrix (Tue, 14 Mar 2017 13:27:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Kyc6rg2JWs3fyNq4a) @mastersingh24 :thumbsup:

kletkeman (Tue, 14 Mar 2017 13:48:14 GMT):
@jtrayfield 1. To get the chain height: https://eb36bcc0f1ce4e54938f6a294722c2de-vp0.us.blockchain.ibm.com:5003 {"height":1533320,"currentBlockHash":"dWF65o2GJvAnqZKml1fcn9VS3Blab+73uyvJc4YaI7P28SGNxRRGsJd+K5X1yA36herT8J7NIdir/8snZDCNeQ==","previousBlockHash":"b+Syn2O/7cFLt0X88nGxCMA9zgSphSo1SXXjYNN8Id1zmcVwwLV4tnxmMScGMwBGs5XbRCbWNcWHnP/SiysWOw=="} 2. To get a block: https://eb36bcc0f1ce4e54938f6a294722c2de-vp0.us.blockchain.ibm.com:5003/chain/blocks/1000000 {"transactions":[{"type":2,"chaincodeID":"EoABMDJkMjMwOWJjNmIxNjk4YjJmMDVhODY2ZmUxOWMxNDdkOTc1NGY4ZjVmMWNjYjcwMmRkM2Y0OGMzYTlhNWY3NTgyMDM4NjUyN2YzYTg4MzcyZmEzYzRjZDE5MWY3YzRlYThkYjIwZmZiMTJiYmU3NWE0OWI3NmIyMWIxOTgxNWI=","payload":"CpIDCAESgwESgAEwMmQyMzA5YmM2YjE2OThiMmYwNWE4NjZmZTE5YzE0N2Q5NzU0ZjhmNWYxY2NiNzAyZGQzZjQ4YzNhOWE1Zjc1ODIwMzg2NTI3ZjNhODgzNzJmYTNjNGNkMTkxZjdjNGVhOGRiMjBmZmIxMmJiZTc1YTQ5Yjc2YjIxYjE5ODE1YhqHAgoWdXBkYXRlQXNzZXRTdXJnaWNhbEtpdArsAXsic2Vuc29ycyI6eyJlbmRsb2NhdGlvbiI6eyJsYXRpdHVkZSI6NDUuNzE1NjA1ODM2MzYxNjUsImxvbmdpdHVkZSI6LTgxLjAzNjAwMTQ4MDE4NDV9fSwic3VyZ2ljYWxraXQiOnsiY29tbW9uIjp7ImxvY2F0aW9uIjp7ImxhdGl0dWRlIjo0NS43MTU2MDU4MzYzNjE2NSwibG9uZ2l0dWRlIjotODEuMDM2MDAxNDgwMTg0NX19LCJza2l0SUQiOiIwMDAwMyJ9LCJtYXhnZm9yY2UiOjMuNjYsIm1heHRpbHQiOjg5LjB9","txid":"4ffdcbb0-e87d-4093-99b2-555b1658ab52","timestamp":{"seconds":1488723157,"nanos":406947581},"nonce":"g2Ma9wJsuMmwArAWsTh8+JsGwjerQTuS","cert":"MIICQjCCAeigAwIBAgIRAJhg9s9rHkFypYiM/Dz4Qv8wCgYIKoZIzj0EAwMwKTELMAkGA1UEBhMCVVMxDDAKBgNVBAoTA0lCTTEMMAoGA1UEAxMDdGNhMB4XDTE3MDMwNTE0MTEwMVoXDTE3MDYwMzE0MTEwMVowPTELMAkGA1UEBhMCVVMxDDAKBgNVBAoTA0lCTTEgMB4GA1UEAxMXVHJhbnNhY3Rpb24gQ2VydGlmaWNhdGUwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASYTHAxh5BYLtxMzyey+Z+P4UmJt/ly9q9bBCadpikdVk5wXZDa/0fPiH5Y1JA5M9qfd4aJ7KT2u0pK6KhB2EI1o4HcMIHZMA4GA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMA0GA1UdDgQGBAQBAgMEMA8GA1UdIwQIMAaABAECAwQwTQYGKgMEBQYHAQH/BEB55XY8grCVNxSlZsYG07o0uS9TGMhygtqAMKqH+PWi8OqVktaJ/hvq3SUm//wxmSXHyDpcxgIT4VcSs2OH61irMEoGBioDBAUGCARAnDYIjpincmBV16Xuu+DxvEzPiaNc6lxDE5VnDs+MalGTWOuBJEvy4Y6Q7+KqD8w8mYhsTHd9FYaN9O/r3dKa/jAKBggqhkjOPQQDAwNIADBFAiEA5TSar5PlO+TAYGgOeWte+UAy+ebXPiFtMs+XF/Lrz0QCIHmFAu+tjmIyFTTW1rdj6/xlOQNzwwVvQGzX8Ro2WhGn","signature":"MEQCIDOJAg2oQs0o3XN9QeCxD2AQ1qPEBaDnYTB5tw6iXklEAiAsAN/RAHNdmb0YQ8MVTPVwW+3/mky+eBKl4j8m9PElVQ=="},{"type":2,"chaincodeID":"EoABMDJkMjMwOWJjNmIxNjk4YjJmMDVhODY2ZmUxOWMxNDdkOTc1NGY4ZjVmMWNjYjcwMmRkM2Y0OGMzYTlhNWY3NTgyMDM4NjUyN2YzYTg4MzcyZmEzYzRjZDE5MWY3YzRlYThkYjIwZmZiMTJiYmU3NWE0OWI3NmIyMWIxOTgxNWI=","payload":"CpQDCAESgwESgAEwMmQyMzA5YmM2YjE2OThiMmYwNWE4NjZmZTE5YzE0N2Q5NzU0ZjhmNWYxY2NiNzAyZGQzZjQ4YzNhOWE1Zjc1ODIwMzg2NTI3ZjNhODgzNzJmYTNjNGNkMTkxZjdjNGVhOGRiMjBmZmIxMmJiZTc1YTQ5Yjc2YjIxYjE5ODE1YhqJAgoWdXBkYXRlQXNzZXRTdXJnaWNhbEtpdAruAXsic2Vuc29ycyI6eyJlbmRsb2NhdGlvbiI6eyJsYXRpdHVkZSI6NDUuMzcxNTE4MjUyODgzMTEsImxvbmdpdHVkZSI6LTgwLjM1ODQ3NTgyMDM5NDIzfX0sInN1cmdpY2Fsa2l0Ijp7ImNvbW1vbiI6eyJsb2NhdGlvbiI6eyJsYXRpdHVkZSI6NDUuMzcxNTE4MjUyODgzMTEsImxvbmdpdHVkZSI6LTgwLjM1ODQ3NTgyMDM5NDIzfX0sInNraXRJRCI6IjAwMDA4In0sIm1heGdmb3JjZSI6NS4wLCJtYXh0aWx0IjotOTEuMH0=","txid":"95a7f44a-596b-4f7c-9d51-3942fff5d2da","timestamp":{"seconds":1488723157,"nanos":843467478},"nonce":"t4t6ucAR+hspgA7RMMIXGy6Jgbxk5Po4","cert":"MIICQTCCAeegAwIBAgIQf4HYr//qTLS7F8vh2LpVzTAKBggqhkjOPQQDAzApMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMQwwCgYDVQQDEwN0Y2EwHhcNMTcwMzA1MTQxMTAxWhcNMTcwNjAzMTQxMTAxWjA9MQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMSAwHgYDVQQDExdUcmFuc2FjdGlvbiBDZXJ0aWZpY2F0ZTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCzt3jgjV7aufGA5yClT5/UFo8JYEpRqpXfgVqxFoW7gQP2kDC3hBKKmDKsAuQtT68KY3ODoEsO/y4TDgn/AR9WjgdwwgdkwDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwDQYDVR0OBAYEBAECAwQwDwYDVR0jBAgwBoAEAQIDBDBNBgYqAwQFBgcBAf8EQOxW+w9Pln1UOyWIhCUQqEZp5axHDcUgQeWQ3vueF/ULvgbwjFnJCIuoV58P90yFQuBwnIEqYTSqULJ5QoIV59MwSgYGKgMEBQYIBEA6UqSk8EKuJx/hKO20Bj0J9P+StHX2fNbUrUaNt2qfCyyz09FQoVSzJ5MvUyyYV7eCzP8UEwZFljgcAkDychRbMAoGCCqGSM49BAMDA0gAMEUCIESt4Qp60kBvVyVXX+ZSbOeiRlE3sZVJH8krEONmsjFaAiEAsYduWUcUCR/Tm7uh//JkY7ElrtPEMQ9cgLl0zkhsxjU=","signature":"MEUCIQCYtWWv/XuVaHAyCNlWiVnUBn95EUeO8UjbX4Yr0De7vQIgYgz48wVdwPe0i4VvLVj0Gpnjcx4phNIPt6jxqIvQvq8="}],"stateHash":"N66DcUzoSGuYXgDZHRIIxOljAIB6y3vJ6FC9yx9gQauQGUNm2nxkYwGtzkmslotYfiy+2ZKD9H8k3bJokqy2fA==","previousBlockHash":"RLjfc582Qq6C1EapyCLX+RoNQ3kiIY/1eIWv+tTPSnG56iL9Y1Z6rW9YZOweFhr8HPHtoGXJQ/6El/v/u1EpnA==","consensusMetadata":"CMOEPQ==","nonHashData":{"localLedgerCommitTimestamp":{"seconds":1488723158,"nanos":435988800},"chaincodeEvents":[{"chaincodeID":"02d2309bc6b1698b2f05a866fe19c147d9754f8f5f1ccb702dd3f48c3a9a5f75820386527f3a88372fa3c4cd191f7c4ea8db20ffb12bbe75a49b76b21b19815b","txID":"4ffdcbb0-e87d-4093-99b2-555b1658ab52","eventName":"EVT.IOTCP.INVOKE.RESULT","payload":"eyJzdGF0dXMiOiJPSyJ9"},{"chaincodeID":"02d2309bc6b1698b2f05a866fe19c147d9754f8f5f1ccb702dd3f48c3a9a5f75820386527f3a88372fa3c4cd191f7c4ea8db20ffb12bbe75a49b76b21b19815b","txID":"95a7f44a-596b-4f7c-9d51-3942fff5d2da","eventName":"EVT.IOTCP.INVOKE.RESULT","payload":"eyJzdGF0dXMiOiJPSyJ9"}]}}

wwendy (Tue, 14 Mar 2017 13:50:00 GMT):
Has joined the channel.

antoniovassell (Tue, 14 Mar 2017 14:28:22 GMT):
hmmm

antoniovassell (Tue, 14 Mar 2017 14:28:35 GMT):
https://github.com/hyperledger/fabric-sdk-node/commit/add5598de150ae6e3370dbce24462ef39e01a0a6#diff-3f620c7db9b6f6a585f57c3dce5efd45R337

antoniovassell (Tue, 14 Mar 2017 14:28:58 GMT):
last night this was returning the secret in just .result

antoniovassell (Tue, 14 Mar 2017 14:29:15 GMT):
not .credential or .secret

antoniovassell (Tue, 14 Mar 2017 14:43:30 GMT):
going to test changes and see if there were any difference

mastersingh24 (Tue, 14 Mar 2017 14:54:17 GMT):
@antoniovassell - not sure what you are seeing? register should be working fine now

mastersingh24 (Tue, 14 Mar 2017 17:07:13 GMT):
https://gerrit.hyperledger.org/r/#/c/7207/ - add support for TLS when communicating with the fabric-ca

mrkiouak (Tue, 14 Mar 2017 18:19:32 GMT):
common cause of: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin? just running example app against fabric/test compose nodes.

vdods (Tue, 14 Mar 2017 23:01:10 GMT):
Hi all, I'm curious what the status of retrieval and usage of transaction certs by fabric-sdk-node is currently. In particular, I'm interested in the non-linkability properties described in the doc https://github.com/hyperledger-archives/fabric/blob/master/docs/protocol-spec.md (which I'm assuming is still current -- correct me if I'm wrong, please!)

vdods (Tue, 14 Mar 2017 23:01:50 GMT):
Failing that, I'm also interested in enrollment-cert-encrypted transactions

bh4rtp (Wed, 15 Mar 2017 01:07:48 GMT):
hi all, once git repo has updates, i will pull it. need i execute the whole installation procedure, such as npm install, gulp ca, gulp doc again?

bh4rtp (Wed, 15 Mar 2017 01:07:48 GMT):
hi all, once git repo has updates, i will pull them. need i execute the whole installation procedure, such as npm install, gulp ca, gulp doc again?

Basug (Wed, 15 Mar 2017 01:16:17 GMT):
All - is there a sample on how to work with multiple participants in 0.6 - looking for something like car lease demo in Java

JasonD (Wed, 15 Mar 2017 04:14:42 GMT):
is any detailed documentation for HFC, api level ?

JasonD (Wed, 15 Mar 2017 04:18:42 GMT):
is there any detailed documentation for hfc, api level ?

antoniovassell (Wed, 15 Mar 2017 04:22:20 GMT):
from what i understand no

antoniovassell (Wed, 15 Mar 2017 04:22:35 GMT):
not "detailed detailed"

antoniovassell (Wed, 15 Mar 2017 04:22:37 GMT):
@JasonD

antoniovassell (Wed, 15 Mar 2017 04:23:09 GMT):
but for fabric-client and fabric-ca-client the test cases can be your best friend

antoniovassell (Wed, 15 Mar 2017 04:23:23 GMT):
https://github.com/hyperledger/fabric-sdk-node

antoniovassell (Wed, 15 Mar 2017 04:24:42 GMT):
am looking through the integration tests

antoniovassell (Wed, 15 Mar 2017 04:24:43 GMT):
https://github.com/hyperledger/fabric-sdk-node/tree/master/test/integration

JasonD (Wed, 15 Mar 2017 04:25:38 GMT):
ok then, i guess i have to look through the source code

JasonD (Wed, 15 Mar 2017 04:25:41 GMT):
@antoniovassell thanks

praveennagpal (Wed, 15 Mar 2017 05:38:41 GMT):
Has joined the channel.

Xie.YZ (Wed, 15 Mar 2017 08:13:51 GMT):
Has joined the channel.

mastersingh24 (Wed, 15 Mar 2017 09:29:03 GMT):
@JasonD - you can run `gulp doc` and generate the API documentation for both fabric-client and fabric-ca-client

JasonD (Wed, 15 Mar 2017 09:45:52 GMT):
@mastersingh24 thanks

ecn (Wed, 15 Mar 2017 10:12:20 GMT):
Has joined the channel.

mastersingh24 (Wed, 15 Mar 2017 10:17:03 GMT):
I think once we publish the actual pacakges to npm we'll be able to publish the docs as well

MartinMateev (Wed, 15 Mar 2017 10:38:08 GMT):
I'm not sure familiar with node js but it sounds like I won't be able to integrate my PHP-based web app with the JS SDK...?

MartinMateev (Wed, 15 Mar 2017 10:38:08 GMT):
I'm not very familiar with node js but it sounds like I won't be able to integrate my PHP-based web app with the JS SDK...?

MartinMateev (Wed, 15 Mar 2017 10:39:36 GMT):
the JS SDK needs to be integrated with a node-based app ...correct ?

Vadim (Wed, 15 Mar 2017 10:44:17 GMT):
@MartinMateev that's right

MartinMateev (Wed, 15 Mar 2017 10:46:53 GMT):
I guess PHP apis are not in the cards right now ...

MartinMateev (Wed, 15 Mar 2017 10:46:53 GMT):
I guess PHP SDK is not in the cards right now ...

Vadim (Wed, 15 Mar 2017 10:56:56 GMT):
@MartinMateev I guess the possible option would be for you a nodejs app which provides some REST interface to your PHP app

JasonD (Wed, 15 Mar 2017 12:19:36 GMT):
hey, I'm reading this source code: https://github.com/IBM-Blockchain/car-lease-demo/blob/master/Server_Side/configurations/startup/CRUD/create.js, and there is a function: `enrolledMember.deploy(deployRequest);`. In my understanding, this function send out a request to one peer, for example vp0, and vp0 create another Docker run the specific chaincode, am I right ?

JasonD (Wed, 15 Mar 2017 12:22:11 GMT):
but check this project, the chaincode.go is in the car-lease-demo project, how can vp0 know where the source code is ? I mean car-lease-demo is running in a Docker, vp0 is another Docker, how can vp0 get the sourcecode of the chaincode ?

mastersingh24 (Wed, 15 Mar 2017 12:22:17 GMT):
@JasonD - so that was written using v0.6 of the fabric and hfc@0.6.x (node sdk for fabric 0.6). But yes - that's basically correct. the `deploy` function will submit the transaction to a single peer which will then submit that transaction to the other peers for consensus. Assuming that consensus is reached, each peer will then process the transaction and spin up an instance of the chaincode

mastersingh24 (Wed, 15 Mar 2017 12:23:00 GMT):
part of the deployRequest actually has a path to the source code on your local machine

mastersingh24 (Wed, 15 Mar 2017 12:23:21 GMT):
that gets packaged up in a tarball and submitted as part of the transaction from the sdk

JasonD (Wed, 15 Mar 2017 12:29:59 GMT):
oh, i get it.

JasonD (Wed, 15 Mar 2017 12:30:03 GMT):
thanks @mastersingh24

mychewcents (Wed, 15 Mar 2017 12:30:05 GMT):
Has joined the channel.

JasonD (Wed, 15 Mar 2017 12:31:47 GMT):
ok, then when i use `enrollMember.deploy)`, i get this error, any idea?

JasonD (Wed, 15 Mar 2017 12:31:51 GMT):
```

JasonD (Wed, 15 Mar 2017 12:31:53 GMT):
vp0_1 | 10:47:38.777 [dockercontroller] deployImage -> ERRO 0b1 Error building images: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/ve ndor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/52874955af3db23c9a5ea8ae194d233a27711d80a0116f5cfb08f626578a2db7' returne d a non-zero code: 1 vp0_1 | 10:47:38.777 [dockercontroller] deployImage -> ERRO 0b2 Image Output: vp0_1 | ******************** vp0_1 | Step 1 : FROM hyperledger/fabric-baseimage vp0_1 | ---> 21cb00fb27f4 vp0_1 | Step 2 : COPY . $GOPATH/src/build-chaincode/ vp0_1 | ---> Using cache vp0_1 | ---> d93016c0bcf2 vp0_1 | Step 3 : WORKDIR $GOPATH vp0_1 | ---> Using cache vp0_1 | ---> 896ae960e307 vp0_1 | Step 4 : RUN go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chai ncode $GOPATH/bin/52874955af3db23c9a5ea8ae194d233a27711d80a0116f5cfb08f626578a2db7 vp0_1 | ---> Running in a33c57eb46e5 vp0_1 | cp: cannot stat 'src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml': No such file or directory vp0_1 | vp0_1 | ******************** vp0_1 | 10:47:38.777 [container] unlockContainer -> DEBU 0b3 container lock deleted(dev-vp0-52874955af3db23c9a5ea8ae194d233a27711d80a0116f5cfb08f626578a2db7) vp0_1 | 10:47:38.777 [chaincode] Launch -> ERRO 0b4 launchAndWaitForRegister failed Error starting container: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/52874955af3db23c9a5ea8ae194d233a27711d80a0116f5cfb 08f626578a2db7' returned a non-zero code: 1

JasonD (Wed, 15 Mar 2017 12:31:54 GMT):
```

mychewcents (Wed, 15 Mar 2017 12:33:18 GMT):
@JasonD I guess the Dockerfile while creating the image cannot access the file core.yaml. You might want to have a look at that part.

mastersingh24 (Wed, 15 Mar 2017 12:35:54 GMT):
@JasonD - https://github.com/hyperledger/fabric/blob/v0.6/docs/nodeSDK/node-sdk-indepth.md#chaincode-deployment

mastersingh24 (Wed, 15 Mar 2017 12:36:04 GMT):
check out the part on "vendoring"

mastersingh24 (Wed, 15 Mar 2017 12:36:34 GMT):
unfortunately, in v0.6 you need to vendor the fabric chaincode dependencies with your chaincode src

JasonD (Wed, 15 Mar 2017 12:37:19 GMT):
so you mean v1.0 don't need it ?

JasonD (Wed, 15 Mar 2017 12:53:58 GMT):
finally, deploy! @mastersingh24 thanks

kuangchao (Wed, 15 Mar 2017 13:06:38 GMT):
where are fabric-python-sdk?

mastersingh24 (Wed, 15 Mar 2017 13:27:09 GMT):
#fabric-sdk-python

chrispoole (Wed, 15 Mar 2017 15:12:15 GMT):
Has joined the channel.

jimthematrix (Wed, 15 Mar 2017 16:06:42 GMT):
@bmos299 @rameshthoomu just put out http://gerrit.hyperledger.org/r/7225 that I believe should fix the build error in z390 CI job

Lin-YiTang (Wed, 15 Mar 2017 16:14:54 GMT):
Has joined the channel.

jimthematrix (Wed, 15 Mar 2017 16:41:49 GMT):
@rameshthoomu the s390 build is failing with the following error: ```not ok 388 Failed to enroll user 'admin'. Error: Failed to find "mspid" in the deserialized state object for the user. Likely due to an outdated state store```

jimthematrix (Wed, 15 Mar 2017 16:42:26 GMT):
isn't the test environment cleaned up before every run? it seems it's hanging onto some old state stores from previous runs

rameshthoomu (Wed, 15 Mar 2017 16:56:17 GMT):
We clean workspace after every build.. let me check this closely..

rameshthoomu (Wed, 15 Mar 2017 16:56:54 GMT):
Same issue observed in Power

czar0 (Wed, 15 Mar 2017 22:24:43 GMT):
Has joined the channel.

vdods (Thu, 16 Mar 2017 01:57:55 GMT):
Is there some particular fabric and fabric-ca commit to run fabric-sdk-node tests against? I just pulled all the latest and I'm getting 58/352 tests failing.

SriramaSharma (Thu, 16 Mar 2017 05:11:33 GMT):
Has joined the channel.

JasonD (Thu, 16 Mar 2017 06:04:14 GMT):
Hey, everyone. after I enrollAndRegistrar user, for example userA, is there any api I can use to fetch the userA ?

JasonD (Thu, 16 Mar 2017 06:36:11 GMT):
just read soruce code, there is a function called getMember in hfc.js. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ippiY3jEzqcSo4a7K) @JasonD

JasonD (Thu, 16 Mar 2017 08:04:18 GMT):
anyone seen this? I docker compose up ca and vp0, then I use `npm start` to start project like car-lease-demo, then I got this:

JasonD (Thu, 16 Mar 2017 08:04:23 GMT):
```

JasonD (Thu, 16 Mar 2017 08:04:24 GMT):
EventTransactionError { error: { Error: sql: no rows in result set at /Users/david/Desktop/work/code/gopath/src/github.com/jasoncodingnow/datachain_supply_demo1/node_modules/grpc/src/node/src/client.js:417:17 code: 2, metadata: Metadata { _internal_repr: {} } }, msg: 'Error: sql: no rows in result set' }

JasonD (Thu, 16 Mar 2017 08:04:26 GMT):
```

JasonD (Thu, 16 Mar 2017 08:05:17 GMT):
``` EventTransactionError { error: { Error: sql: no rows in result set at /Users/david/Desktop/work/code/gopath/src/github.com/jasoncodingnow/datachain_supply_demo1/node_modules/grpc/src/node/src/client.js:417:17 code: 2, metadata: Metadata { _internal_repr: {} } }, msg: 'Error: sql: no rows in result set' } ```

JasonD (Thu, 16 Mar 2017 08:05:54 GMT):
it happened after this function: ` let tx = enrolledMember.deploy(deployRequest); `

JasonD (Thu, 16 Mar 2017 08:10:52 GMT):
but if I run this project using Docker, it runs well.

JasonD (Thu, 16 Mar 2017 09:08:23 GMT):
here is another question, when I invoke this function: `chain.registerAndEnroll(user)`, and user.enrollmentID is 'acb', then get a wrong message: `[TypeError: Cannot set property 'acb' of undefined]`

JasonD (Thu, 16 Mar 2017 09:16:37 GMT):
:confounded: stuck here for about 3 hours

Vadim (Thu, 16 Mar 2017 09:18:52 GMT):
@JasonD is there are reason why you use v0.6? The development on it is abandoned and a lot of people moved to v1, so it's much easier to get support for v1.

JasonD (Thu, 16 Mar 2017 09:20:13 GMT):
i know. so right now v1 is stable enough ?

JasonD (Thu, 16 Mar 2017 09:20:42 GMT):
@Vadim

Vadim (Thu, 16 Mar 2017 09:21:07 GMT):
yes

JasonD (Thu, 16 Mar 2017 09:22:03 GMT):
ok, gonna have a try. and v1, you mean fabric v1 and node-sdk v1? @Vadim

Vadim (Thu, 16 Mar 2017 09:22:13 GMT):
yes

JasonD (Thu, 16 Mar 2017 09:22:23 GMT):
ok thanks @Vadim

Vadim (Thu, 16 Mar 2017 09:22:24 GMT):
there are tutorials how to get it running

JasonD (Thu, 16 Mar 2017 09:23:24 GMT):
@Vadim really helpful, thanks

Vadim (Thu, 16 Mar 2017 09:24:42 GMT):
@JasonD https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/end-to-end.rst

pd93 (Thu, 16 Mar 2017 10:56:29 GMT):
I'm getting `Could not parse enrollment response` when trying to enroll with the SDK. Anyone seen this before?

mastersingh24 (Thu, 16 Mar 2017 11:38:38 GMT):
@pd93 - you likely need to make sure you update to both the latest SDK and latest fabric-ca

mastersingh24 (Thu, 16 Mar 2017 11:38:56 GMT):
I updated the SDK earlier this week to support the latest fabric-ca APIs

mastersingh24 (Thu, 16 Mar 2017 11:38:56 GMT):
We updated the SDK earlier this week to support the latest fabric-ca APIs

pd93 (Thu, 16 Mar 2017 11:39:49 GMT):
Have these changes been published to npm? or should I just use the SDK repo

pd93 (Thu, 16 Mar 2017 11:39:49 GMT):
@mastersingh24 Thanks, Do you know if these changes been published to npm? or should I just use the SDK repo

mastersingh24 (Thu, 16 Mar 2017 11:43:20 GMT):
hmm - I thought that we published to npm all the time as "unstable" but not sure. the repo stuff definitely works with the latest fabric-ca (or at least it did yesterday ;) )

pd93 (Thu, 16 Mar 2017 11:43:43 GMT):
Ok cool, I'll try it out :P Thanks

mastersingh24 (Thu, 16 Mar 2017 11:45:02 GMT):
looks like fabric-ca-client was published 18 hours ago so might have just missed the update

pd93 (Thu, 16 Mar 2017 11:51:47 GMT):
@mastersingh24 I just tried out the latest `fabric-sdk-node` commit and I'm getting an error thrown here: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-ca-client/lib/FabricCAClientImpl.js#L65 It appears the method that it's calling (`newCryptoSuite()`) no longer exists in `fabric-ca-client/lib/utils.js`

pd93 (Thu, 16 Mar 2017 11:51:47 GMT):
@mastersingh24 I just tried out the latest `fabric-sdk-node` commit and I'm getting an error thrown here: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-ca-client/lib/FabricCAClientImpl.js#L65 It appears the method that it's calling `newCryptoSuite()` no longer exists in `fabric-ca-client/lib/utils.js`

pd93 (Thu, 16 Mar 2017 11:51:47 GMT):
@mastersingh24 I just tried out the latest `fabric-sdk-node` commit and I'm getting an error thrown here: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-ca-client/lib/FabricCAClientImpl.js#L65 It appears the method that it's calling `newCryptoSuite()` no longer exists in `fabric-ca-client/lib/utils.js` *-- edit --* I'm fairly sure changing L65 to `getCryptoSuite()` instead fixes it?

mastersingh24 (Thu, 16 Mar 2017 12:09:06 GMT):
you may need to run `gulp ca` to update the dependencies

mastersingh24 (Thu, 16 Mar 2017 12:09:27 GMT):
utils.js actually comes from fabric-client

mastersingh24 (Thu, 16 Mar 2017 12:09:39 GMT):
gulp ca should copy over the latest files

pd93 (Thu, 16 Mar 2017 12:12:30 GMT):
Ohhh... I didn't rebuild after running gulp ca never mind :P

czar0 (Thu, 16 Mar 2017 15:10:57 GMT):
hey guys, i am following the examples in hackfest and marbles on how to enroll the `admin` user. all the network is up and running, no errors from the containers, but i got some issues in enrolling the `admin` user: ``` info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":8054} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":8054} info: [Client.js]: Failed to load user "admin" from local key value store (node:62921) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'isEnrolled' of null ``` I guess something wrong with the keyValStore, my `/tmp/fabric-client-kvs` is empty. When are the keys created?

mastersingh24 (Thu, 16 Mar 2017 16:50:03 GMT):
what version of the fabric-client do you have?

mastersingh24 (Thu, 16 Mar 2017 16:50:03 GMT):
@czar0 - what version of the fabric-client do you have?

mastersingh24 (Thu, 16 Mar 2017 16:52:38 GMT):
you might want to do an `npm install --save fabric-client@0.2`

mastersingh24 (Thu, 16 Mar 2017 16:52:38 GMT):
you might want to do an `npm install --save fabric-client@0.2` and `npm install --save fabric-ca-client@0.2`

czar0 (Thu, 16 Mar 2017 17:08:16 GMT):
@mastersingh24 I am using versions `0.2.2`

czar0 (Thu, 16 Mar 2017 17:10:56 GMT):
`admin` user should be already registered into the `ca`, but I don't know when and how to retrieve its private key. The set keyValStorePath is empty. Is this error meaningful to you? `info: [Client.js]: Failed to load user "admin" from local key value store`

czar0 (Thu, 16 Mar 2017 17:12:21 GMT):
oh no sorry I am talking about registering, but the key is assigned only when the user is enrolled

czar0 (Thu, 16 Mar 2017 17:40:14 GMT):
now I have an error in parsing the certificate ``` info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/Cesare/.hfc-key-store"}} error: Error: Could not parse enrollment response [{"success":true,"result":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJaVENDQVFxZ0F3SUJBZ0lVYnFDV0p0Vm4rNVZUbHVPNlBxeGJqcS81cEFJd0NnWUlLb1pJemowRUF3SXcKRXpFUk1BOEdBMVVFQXd3SWNHVmxjazl5WnpBd0hoY05NVGN3TXpFMk1UY3pNakF3V2hjTk1UZ3dNakV6TURFegpNakF3V2pBUU1RNHdEQVlEVlFRREV3VmhaRzFwYmpCWk1CTUdCeXFHU000OUFnRUdDQ3FHU000OUF3RUhBMElBCkJKU3dBWjJMRndvOEJOY2ZZRDhkZUNCOW5jL212clZacGR5L0dsTHF3RTFBMGtaQitMMmJuR0FmODA2WjdkV28KbEFOSktaQlI5ZzFIeDZ4KzcwQUwzVHFqUHpBOU1BNEdBMVVkRHdFQi93UUVBd0lDQkRBTUJnTlZIUk1CQWY4RQpBakFBTUIwR0ExVWREZ1FXQkJSNXhTbnYyMmk2M3dVQ2hmMG96OExWelcyU0l6QUtCZ2dxaGtqT1BRUURBZ05KCkFEQkdBaUVBK3JhU29aMHh2SUhaSEVKaGRsT3BhakpWeWNaT1NzaGduSXpmL1VIVzZYRUNJUURrTWZEdFRKemUKZGRSK1M1RUtYMHBrUlZ0d1l1cVhld1pTaHBsM2RZOXY1Zz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K","errors":[],"messages":[]} ] as JSON due to error [TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.] at IncomingMessage. (/Users/Cesare/Documents/hyperledger/digital-securities/server/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:560:14) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) error: Error: Failed to obtain an enrolled user at cop.enroll.then.then.then.catch (/Users/Cesare/Documents/hyperledger/digital-securities/server/dist/blockchain/Blockchain.js:153:27) at process._tickCallback (internal/process/next_tick.js:103:7) ``` any idea?

mastersingh24 (Thu, 16 Mar 2017 18:18:11 GMT):
what version of fabric-ca-client do you have?

mastersingh24 (Thu, 16 Mar 2017 18:19:03 GMT):
Looking at this and the prior message I think that might be your issue. ``` info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":8054} ```

mastersingh24 (Thu, 16 Mar 2017 18:19:19 GMT):
I just added that to fabric-ca-client on Mon or Tues

mastersingh24 (Thu, 16 Mar 2017 18:19:53 GMT):
and the fabric-ca APIs today are different from the ones used in the hackfest images

czar0 (Thu, 16 Mar 2017 18:24:54 GMT):
but still i am able to enroll the user with the hackfest code

czar0 (Thu, 16 Mar 2017 18:25:15 GMT):
``` info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":8054} info: [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store /Users/Cesare/.hfc-key-store [2017-03-16 19:20:07.469] [INFO] Helper - Successfully enrolled user 'admin' info: [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store /Users/Cesare/.hfc-key-store [2017-03-16 19:20:07.484] [INFO] DEPLOY - Successfully obtained enrolled user to deploy the chaincode [2017-03-16 19:20:07.484] [INFO] DEPLOY - Executing Deploy ```

czar0 (Thu, 16 Mar 2017 18:31:12 GMT):
ok, i see. you are right about the versions. that does not work anymore with version 0.2.x. the hackfest example is using 0.1.x

mastersingh24 (Thu, 16 Mar 2017 18:48:51 GMT):
ah - sorry about that ;) I was trying to figure out the right dates

mastersingh24 (Thu, 16 Mar 2017 21:05:26 GMT):
@jimthematrix - been messing around with docs a bit in my copious spare time

mastersingh24 (Thu, 16 Mar 2017 21:05:44 GMT):
this was just a simple test, but what do you think: http://singh-docs.readthedocs.io/en/latest/ca/

jimthematrix (Thu, 16 Mar 2017 21:35:25 GMT):
hey Gari, was this generated from some tool? i think the read the docs styling is pretty hopeless. do you like the pages generated by `gulp doc`? we've been trying to explore how to publish them via CI (but haven't found a good place that hosts web resources in LF)

jimthematrix (Thu, 16 Mar 2017 21:35:58 GMT):
on the other hand, if your tool generates .md then i think it could be interesting since we can style that many different ways

dselman (Thu, 16 Mar 2017 22:54:12 GMT):
Message I received earlier from @davidkel earlier regarding the latest alpha docker images: "They work, car auction deployed and auctioneer added" -- well done guys! We're getting closer!

dselman (Thu, 16 Mar 2017 22:54:12 GMT):
Message I received this evening from @davidkel and @sstone1 regarding the latest alpha docker images: "They work, car auction deployed and auctioneer added" -- well done guys! We're getting closer!

jimthematrix (Thu, 16 Mar 2017 22:56:41 GMT):
@dselman cool! thanks for sharing that, nice work composer team chasing the updates :thumbsup:

dselman (Thu, 16 Mar 2017 22:57:23 GMT):
It's a team sport, right!? ;-)

jimthematrix (Thu, 16 Mar 2017 23:04:33 GMT):
indeed ;-)

mastersingh24 (Thu, 16 Mar 2017 23:13:00 GMT):
@jimthematrix - yeah - ideally I wanted to publish the docs generated by `gulp doc` but as you said there does not seem to be a place to publish them. I've been messing around with a bunch of different jsdoc tools for converting to various formats. Minimally this works well for at least embedded the API doc along with the package in npm

mastersingh24 (Thu, 16 Mar 2017 23:16:03 GMT):
I've tried jsdoc3-sphinx, jsdoc-to-markdown, doxdox and am looking at the jsdoctoolkit which seems to support generating rst docs as well

praveennagpal (Fri, 17 Mar 2017 02:28:49 GMT):
surely the specs can be published on read-thedocs rather than everybody needing to generate them

RahulBagaria (Fri, 17 Mar 2017 04:00:09 GMT):
Has joined the channel.

andyxf1029 (Fri, 17 Mar 2017 06:08:51 GMT):
Has joined the channel.

saism (Fri, 17 Mar 2017 07:00:54 GMT):
e2e tests have passed, although I had to do npm install fabric-client and fabric-ca-client since package json looking at the dir

jerry10301 (Fri, 17 Mar 2017 07:06:13 GMT):
Has joined the channel.

JasonD (Fri, 17 Mar 2017 07:35:16 GMT):
hey, there is function `emrollMember.invoke`, but this function only return txId,since it's asynchronous, it cannot return the result of chaincode execution. So how can i get the result ?

Vadim (Fri, 17 Mar 2017 08:00:32 GMT):
@JasonD not sure if I understood the question correctly, but you should use javascript promises to chain async calls. Check out the example: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/create-channel.js

JasonD (Fri, 17 Mar 2017 08:03:32 GMT):
here is my code: ```let tx = user.invoke(invoke); tx.on('submitted', function (data) { console.log('submitted'); console.log(data); }); tx.on('complete', function (data) { console.log('complete'); console.log(data); resolve(data.result); }); tx.on('error', function (err) { if (err instanceof hfc.EventTransactionError) { reject(new Error(err.msg)); } else { reject(err); } });```

JasonD (Fri, 17 Mar 2017 08:04:09 GMT):
here is my code

JasonD (Fri, 17 Mar 2017 08:04:16 GMT):
``` let tx = user.invoke(invoke); tx.on('submitted', function (data) { console.log('submitted'); console.log(data); }); tx.on('complete', function (data) { console.log('complete'); console.log(data); resolve(data.result); }); tx.on('error', function (err) { if (err instanceof hfc.EventTransactionError) { reject(new Error(err.msg)); } else { reject(err); } }); ```

JasonD (Fri, 17 Mar 2017 08:04:50 GMT):
but in my chaincode, here is return value ` return []byte("OK"), nil `

Vadim (Fri, 17 Mar 2017 08:05:07 GMT):
is this v1 sdk?

Vadim (Fri, 17 Mar 2017 08:05:28 GMT):
seems like you use v0.6

JasonD (Fri, 17 Mar 2017 08:05:33 GMT):
oh, no ... Ok, i get it. haven't change to v1 yet

Vadim (Fri, 17 Mar 2017 08:05:48 GMT):
sorry, cant comment that one, never used it

JasonD (Fri, 17 Mar 2017 08:06:20 GMT):
sitll thanks @Vadim

antoniovassell (Fri, 17 Mar 2017 08:06:26 GMT):
hey @Vadim quick question if you have a minute.

antoniovassell (Fri, 17 Mar 2017 08:07:04 GMT):
trying to run the integration tests for fabric-sdk-node, specifically the ca services tests with

antoniovassell (Fri, 17 Mar 2017 08:07:08 GMT):
`node test/integration/fabric-ca-services-tests.j`

antoniovassell (Fri, 17 Mar 2017 08:07:17 GMT):
have about 7 failures

antoniovassell (Fri, 17 Mar 2017 08:07:34 GMT):
```Failed to enroll 'testUser'. Error: Could not parse enrollment response [{"success":false,"result":null,"errors":[{"code":400,"message":"Authorization failure"}],"messages":[]} ] as JSON due to error [TypeError: Cannot read property 'errors' of undefined] --- ```

antoniovassell (Fri, 17 Mar 2017 08:07:47 GMT):
mostly about that ^

antoniovassell (Fri, 17 Mar 2017 08:08:09 GMT):
`Authorization failure`

antoniovassell (Fri, 17 Mar 2017 08:08:26 GMT):
Do you know how to resolve this?

Vadim (Fri, 17 Mar 2017 08:10:49 GMT):
I could guess that the fabric-ca does not know about this user, so it fails

Vadim (Fri, 17 Mar 2017 08:11:01 GMT):
it is probably run with the wrong config

Vadim (Fri, 17 Mar 2017 08:12:34 GMT):
I think by default the fabric-ca image in docker is run with https://github.com/hyperledger/fabric-ca/blob/master/testdata/server-config.json, but there is no testUser there

antoniovassell (Fri, 17 Mar 2017 08:12:56 GMT):
okay

Vadim (Fri, 17 Mar 2017 08:12:59 GMT):
you need this one: https://github.com/hyperledger/fabric-ca/blob/master/testdata/testconfig.json

antoniovassell (Fri, 17 Mar 2017 08:13:10 GMT):
so an admin would be valid right?

Vadim (Fri, 17 Mar 2017 08:13:15 GMT):
should be

antoniovassell (Fri, 17 Mar 2017 08:13:30 GMT):
and an admin should be able to register a user, correct?

Vadim (Fri, 17 Mar 2017 08:13:38 GMT):
yes

antoniovassell (Fri, 17 Mar 2017 08:13:41 GMT):
register a user that is outside of the config

antoniovassell (Fri, 17 Mar 2017 08:13:48 GMT):
right, so that's failing

antoniovassell (Fri, 17 Mar 2017 08:15:46 GMT):
the images am using are the ones that were published to docker hub recently

antoniovassell (Fri, 17 Mar 2017 08:16:11 GMT):
```hyperledger/fabric-orderer:x86_64-1.0.0-alpha hyperledger/fabric-peer:x86_64-1.0.0-alpha hyperledger/fabric-javaenv:x86_64-1.0.0-alpha hyperledger/fabric-ccenv:x86_64-1.0.0-alpha hyperledger/fabric-couchdb:x86_64-1.0.0-alpha hyperledger/fabric-zookeeper:x86_64-1.0.0-alpha hyperledger/fabric-kafka:x86_64-1.0.0-alpha hyperledger/fabric-ca:x86_64-1.0.0-alpha```

antoniovassell (Fri, 17 Mar 2017 08:16:28 GMT):
as mentioned in #fabric-ci

antoniovassell (Fri, 17 Mar 2017 08:16:54 GMT):
checked out the latest fabric-sdk-node code

antoniovassell (Fri, 17 Mar 2017 08:17:15 GMT):
and am using this docker file config here: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/docker-compose.yaml

antoniovassell (Fri, 17 Mar 2017 08:17:48 GMT):
updated the image tags of course with `:x86_64-1.0.0-alpha`

antoniovassell (Fri, 17 Mar 2017 08:18:58 GMT):
then ran the tests

czar0 (Fri, 17 Mar 2017 10:14:00 GMT):
hi all, i have updated all the images to the latest `x86_64-1.0.0-alpha` tag version and using the `docker-compose.yaml` (and mounted volumes and files) mentioned above (and everything is up and running without errors). When I am attempting to enroll the user `admin` I receive the following from my node application (using example from hackfest): ``` info: User not yet registered info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/Cesare/.hfc-key-store"}} (node:76772) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Invalid parameter. Must have a valid mspId. error: uncaughtException: {"created":"@1489745048.891213000","description":"Endpoint read failed","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1851,"grpc_status":14,"occurred_during_write":0,"referenced_errors":[{"created":"@1489745048.891205000","description":"Socket closed","fd":21,"file":"../src/core/lib/iomgr/tcp_posix.c","file_line":249,"target_address":"ipv6:[::1]:7053"}]} ``` Does it look familiar? Where should I add the `mspId` ?

MartinMateev (Fri, 17 Mar 2017 10:22:49 GMT):
any update on the couchDB docker image and e2e tests ?

Vadim (Fri, 17 Mar 2017 10:26:45 GMT):
@MartinMateev https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/docker-compose.yaml it has some comments on how to enable couchdb

MartinMateev (Fri, 17 Mar 2017 10:28:37 GMT):
ok it seems like that's been merged - I will give it a try

bretharrison (Fri, 17 Mar 2017 14:03:01 GMT):
@czar0 Have a look at the new e2e tests (under `/test/integration.e2e` )on getting to the fabric-ca and

bretharrison (Fri, 17 Mar 2017 14:03:01 GMT):
@czar0 Have a look at the new NodeSDK e2e tests (under `/test/integration.e2e` )on getting to the fabric-ca

jimthematrix (Fri, 17 Mar 2017 14:04:59 GMT):
all, please note that as part of the Fabric v1.0 alpha release, along with the 1.0.0-alpha version of the docker images in https://hub.docker.com/r/hyperledger/, the node SDK npm has also been updated to `1.0.0-alpha`

jimthematrix (Fri, 17 Mar 2017 14:06:52 GMT):
in your application make sure to use the `-alpha` suffix in order to pull in this version, because as per semver semantics, these suffix indicate unstable stream (which alpha is because we may still have further changes breaking APIs) so you have to specifically request for it by using a version range like `~1.0.0-alpha`

jimthematrix (Fri, 17 Mar 2017 14:06:52 GMT):
in your application make sure to use the `-alpha` suffix in order to pull in this version, because as per semver semantics, these suffix indicate unstable stream (which alpha is because we may still have further changes breaking APIs) so you have to specifically request for it by using a version range like `~1.0.0-alpha`. a range like `~1.0.0` will NOT get you the alpha version

jimthematrix (Fri, 17 Mar 2017 14:08:16 GMT):
also note that when we upgrade to another release in the future, which could be 1.0.0-beta or 1.0.0 (official release), then you must update the version range again in order to pull in those newer version

jimthematrix (Fri, 17 Mar 2017 14:10:14 GMT):
this may sound like a pain but it's by design (per semver policies) so as to allow application developers to clearly state their intention (stay on stable stream vs. stay up-to-date on the bleeding edge)

Asara (Fri, 17 Mar 2017 17:15:31 GMT):
Has joined the channel.

czar0 (Fri, 17 Mar 2017 17:53:28 GMT):
thanks @jimthematrix for noticing that. now i am able to enroll the `admin` user and to send the `installChaincodeProposal` to `peer0` (i can see in the logs it has been notified), but i got the following error in return: ``` info: [packager/Golang.js]: packaging GOLANG from ../../../blockchain/src/build-chaincode <--- Last few GCs ---> 186625 ms: Mark-sweep 1383.6 (1434.1) -> 1383.5 (1434.1) MB, 1641.2 / 0.0 ms [allocation failure] [GC in old space requested]. 188086 ms: Mark-sweep 1383.5 (1434.1) -> 1383.5 (1434.1) MB, 1461.4 / 0.0 ms [allocation failure] [GC in old space requested]. 189469 ms: Mark-sweep 1383.5 (1434.1) -> 1385.0 (1416.1) MB, 1383.0 / 0.0 ms [last resort gc]. 190856 ms: Mark-sweep 1385.0 (1416.1) -> 1386.6 (1416.1) MB, 1386.5 / 0.0 ms [last resort gc]. <--- JS stacktrace ---> ==== JS stack trace ========================================= Security context: 0x2c82b2ecfb51 1: stylize(aka stylizeWithColor) [util.js:~238] [pc=0xfbcdc4da55c] (this=0x2b01bcf16b19 ,str=0x3a7385a27d71 ,styleType=0x2c82b2e05301 ) 2: formatProperty(aka formatProperty) [util.js:~769] [pc=0xfbcdc4dfb4f] (this=0x2c82b2e04381 ,ctx=0x2b01bcf16b19 ,value=0x12fbe0f04... FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [/usr/local/bin/node] 2: node::FatalException(v8::Isolate*, v8::Local, v8::Local) [/usr/local/bin/node] 3: v8::Utils::ReportApiFailure(char const*, char const*) [/usr/local/bin/node] 4: v8::Utils::ApiCheck(bool, char const*, char const*) [/usr/local/bin/node] 5: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node] 6: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [/usr/local/bin/node] 7: v8::internal::Factory::NewStringFromOneByte(v8::internal::Vector, v8::internal::PretenureFlag) [/usr/local/bin/node] 8: v8::internal::Factory::NumberToString(v8::internal::Handle, bool) [/usr/local/bin/node] 9: v8::internal::Runtime_NumberToStringSkipCache(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node] 10: 0xfbcdc0092a7 Abort trap: 6 ```

jimthematrix (Fri, 17 Mar 2017 18:22:59 GMT):
@czar0 hmm i haven't had a node.js crash from OOME before, what content exist at the src/build-chaincode folder? any large files there?

davidkel (Fri, 17 Mar 2017 19:02:04 GMT):
You could try increasing nodes heap size (it's default is about 1.8Gb) using the option `--max_old_space_size=` where size is in Mb to see if it get's you passed the problem for now. I have seen OOM in node before just running mocha tests

czar0 (Fri, 17 Mar 2017 19:12:06 GMT):
there are multiple `.go` files, `vendor.yml` and `vendor` directory (for a total of 80mb approximately)

mastersingh24 (Fri, 17 Mar 2017 20:19:34 GMT):
@czar0 - what exactly is your chaincode doing? ;)

czar0 (Sat, 18 Mar 2017 13:41:55 GMT):
not starting nuclear weapons for sure :D

yacovm (Sat, 18 Mar 2017 13:42:53 GMT):
Yeah, that's what they all said in the cold war

czar0 (Sat, 18 Mar 2017 13:43:36 GMT):
haha

czar0 (Sat, 18 Mar 2017 13:45:53 GMT):
but i see..the problem is related to the `vendor` directory. removing it the procedure of packing is going ahead and i receive a `proposalResponse`. here new issue :) ``` (node:10028) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Illegal value for endorsementsvalue element of type message: object (object expected) ``` i guess because of the `endorsment` value is `null`: ``` debug: { proposalResponses: [ { version: 0, timestamp: null, response: { status: 200, message: '', payload: { '0': 79, '1': 75 } }, payload: {}, endorsement: null }, { version: 0, timestamp: null, response: { status: 200, message: '', payload: { '0': 79, '1': 75 } }, payload: { '$ref': '$["proposalResponses"][0]["payload"]' }, endorsement: null } ], proposal: ... ``` where can i define the policies?

mmani99 (Sat, 18 Mar 2017 16:24:20 GMT):
Has joined the channel.

bkvellanki (Sat, 18 Mar 2017 17:02:37 GMT):
Any node sample app that shows how to connect, endorse, deploy and invoke chaincode?

rickr (Sat, 18 Mar 2017 20:21:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KgeB7KEBNRYspoENA) A *chain reaction* I dear say!

rickr (Sat, 18 Mar 2017 20:21:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KgeB7KEBNRYspoENA) A *chain reaction* I dare say!

jimthematrix (Sun, 19 Mar 2017 01:46:25 GMT):
@bkvellanki see test/integration/e2e/*.js

jimthematrix (Sun, 19 Mar 2017 01:50:02 GMT):
All, now that 1.0.0-alpha has been published, and repository has been tagged with v1.0.0-alpha, the master branch is open for business again. Going forward, we have adopted a continuous publishing strategy (per suggestion by the Composer team) that allows teams interested in staying on the bleeding edge to get up-to-the-minute update: every gerrit merge will cause the master HEAD be published to npm as `1.0.0-snapshot.n`, where `n` is an ever-increasing integer.

bkvellanki (Sun, 19 Mar 2017 01:52:09 GMT):
Thanks Jim

jimthematrix (Sun, 19 Mar 2017 01:52:42 GMT):
if you want to stay abreast of the SDK updates, and understand the consequences, set your dependency range for both packages (fabric-client and fabric-ca-client) to `~1.0.0-snapshot` and you'll pick up all the changes. This process is described in details in https://jira.hyperledger.org/browse/FAB-2802

jimthematrix (Sun, 19 Mar 2017 01:53:42 GMT):
```jimzhang:fabric-sdk-node jimzhang$ npm show fabric-client { name: 'fabric-client', description: 'This package encapsulates the APIs to interact with Peers and Orderers of the Fabric network to install and instantiate chaincodes, send transaction invocations and perform chaincode queries. There is a separate package that interacts with the Fabric memb', 'dist-tags': { latest: '1.0.0-alpha', unstable: '1.0.0-snapshot.2' }, versions: [ '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '1.0.0-alpha', '1.0.0-snapshot', '1.0.0-snapshot.1', '1.0.0-snapshot.2' ], ```

Xie.YZ (Sun, 19 Mar 2017 06:04:40 GMT):
hi, when I run sfhackfest example, node deploy.js info: [Client.js]: Failed to load user "admin" from local key value store [INFO] Helper - Successfully enrolled user 'admin' [ERROR] DEPLOY - TypeError: chain.sendInstantiateProposal is not a function at /root/src/go/src/github.com/hyperledger/fabric/examples/sfhackfest/deploy.js:79:16 I'm not familiar with js anybody know why? git clone fabric-sdk-node then npm install ?

AbhilekhSingh (Sun, 19 Mar 2017 07:20:24 GMT):
node test/integration/e2e/create-channel.js info: Returning a new winston logger with default configurations module.js:471 throw err; ^ Error: Cannot find module './api.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:19:11) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

davidkel (Sun, 19 Mar 2017 09:42:51 GMT):
@AbhilekhSingh There are some steps required to setup the node sdk in order for it to work. I think the instructions are in the readme for the sdk, but for your particular problem it's because the fabric-ca-client needs some files to be copied from fabric-client. the command `gulp ca` in the root of node sdk will do this

AbhilekhSingh (Sun, 19 Mar 2017 10:15:50 GMT):
thanks

aberfou (Mon, 20 Mar 2017 09:18:23 GMT):
Has joined the channel.

aberfou (Mon, 20 Mar 2017 09:22:18 GMT):
Hi, I am facing a problem with hyperledger 0.6.1-preview and hfc 0.6.5. I have a running blockchain with pbft and 4 valdiating nodes. On the the nodejs side I have a registered an event for new blocks. Which works quite good if there are some transactions, I receive every time a new block event. But if the blockchain runs more than 3 days without a transaction and I send once again a transaction my nodejs does not receive any new block events. The transaction gets executed and produces a state change. Does anyone observed something similar? Thx in advance!

aberfou (Mon, 20 Mar 2017 09:24:08 GMT):
Is it a timeout issue on the peer or a missed configuration ??

shanlusun (Mon, 20 Mar 2017 10:58:28 GMT):
Has joined the channel.

moeentariq (Mon, 20 Mar 2017 11:17:46 GMT):
Has joined the channel.

moeentariq (Mon, 20 Mar 2017 11:18:19 GMT):
node deploy.js command not working Error: Connect Failed at ClientDuplexStream._emitStatusIfDone (/home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:201:19) at ClientDuplexStream._readsDone (/home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:242:12)

dannysun85 (Mon, 20 Mar 2017 12:19:14 GMT):
Has joined the channel.

jrosmith (Mon, 20 Mar 2017 16:11:02 GMT):
Has joined the channel.

jrosmith (Mon, 20 Mar 2017 16:12:20 GMT):
@aberfou that happens to be sometimes, are you getting an error along the lines of "Connection reset by peer?"

jrosmith (Mon, 20 Mar 2017 16:12:41 GMT):
@moeentariq that's a gRPC connection error, sounds like your app server isn't connecting to the peer

moeentariq (Mon, 20 Mar 2017 16:13:19 GMT):
how can i resolve this ?

jrosmith (Mon, 20 Mar 2017 16:14:46 GMT):
make sure that when you initialize your session youre properly setting your peer and ca

jrosmith (Mon, 20 Mar 2017 16:15:00 GMT):
are you calling chan.addPeer and chain.setMemberServicesURL?

jrosmith (Mon, 20 Mar 2017 16:18:56 GMT):
anybody know if theres a way to query a peer to check and see which chaincode is deployed on a peer? Looking for the ability to get more details than the hash, namely a name and version

Godwin (Tue, 21 Mar 2017 05:17:41 GMT):
Has joined the channel.

anand.fast (Tue, 21 Mar 2017 05:23:19 GMT):
Has joined the channel.

anand.fast (Tue, 21 Mar 2017 05:31:06 GMT):
Hi, I'm trying to enroll a user with fabric-client (1.0.0-alpha) and have found out that User.setEnrollment function has got a new required parameter - mspId. Can someone explain me what I should pass in this parameter?

AbhilekhSingh (Tue, 21 Mar 2017 09:12:59 GMT):
Hi I'm trying e2e_cli example on alpha release ===================== Channel "mychannel" is created successfully ===================== CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peer/peer0/localMspConfig/cacerts/peerOrg0.pem CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peer/peer0/localMspConfig/keystore/peer0Signer.pem CORE_PEER_LOCALMSPID=Org0MSP CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peer/peer0/localMspConfig/signcerts/peer0Signer.pem CORE_PEER_ADDRESSAUTODETECT=true CORE_PEER_TLS_ENABLED=true CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peer/peer0/localMspConfig CORE_PEER_ID=cli CORE_LOGGING_LEVEL=DEBUG CORE_PEER_GOSSIP_IGNORESECURITY=true CORE_PEER_ADDRESS=peer0:7051 CORE_PEER_ENDORSER_ENABLED=true CORE_NEXT=true 2017-03-21 09:10:47.225 UTC [logging] InitFromViper -> DEBU 001 Setting default logging level to DEBUG for command 'channel' 2017-03-21 09:10:47.225 UTC [msp] GetLocalMSP -> DEBU 002 Returning existing local MSP 2017-03-21 09:10:47.225 UTC [msp] GetDefaultSigningIdentity -> DEBU 003 Obtaining default signing identity 2017-03-21 09:10:47.229 UTC [msp] Sign -> DEBU 004 Sign: plaintext: 0A84050A4E08012A4064333562376234...83CAA1F063441A080A000A000A000A00 2017-03-21 09:10:47.229 UTC [msp] Sign -> DEBU 005 Sign: digest: 9E1819730615D0F5BE94FC2F94E8658D6D27FFEE525778148000008108D913E3 Error: proposal failed (err: rpc error: code = 2 desc = Block number should have been 1 but was 0) Usage: peer channel join [flags] Global Flags: -b, --blockpath string Path to file containing genesis block --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint -c, --chain string In case of a newChain command, the chain ID to create. -f, --file string Configuration transaction file generated by a tool such as configtxgen for submitting to orderer --logging-level string Default logging level and overrides, see core.yaml for full syntax -o, --orderer string Ordering service endpoint --test.coverprofile string Done (default "coverage.cov") --tls Use TLS when communicating with the orderer endpoint -v, --version Display current version of fabric peer server Getting this error on cli Anyone has any idea why it is happening?

AbhilekhSingh (Tue, 21 Mar 2017 12:49:24 GMT):
I want to retrieve the certificate of the caller in the chaincode. adminCert, err := stub.GetCallerMetadata() But it showing empty. I'm using 0.6 version. I'm trying to deploy chaincode with this. https://github.com/hyperledger/fabric-sdk-node/blob/v1.0-alpha/examples/balance-transfer/deploy.js

moeentariq (Tue, 21 Mar 2017 13:47:03 GMT):
info: Returning a new winston logger with default configurations info: [Chain.js]: Constructed Chain instance: name - fabric-client1, securityEnabled: true, TCert download batch size: 10, network mode: true info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Peer.js]: Peer.const - url: grpc://localhost:8055 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Peer.js]: Peer.const - url: grpc://localhost:8056 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store /home/ds/.hfc-key-store info: [Client.js]: Successfully loaded user "admin" from local key value store [2017-03-21 13:46:07.043] [INFO] Helper - Successfully loaded member from persistence [2017-03-21 13:46:07.044] [INFO] DEPLOY - Successfully obtained enrolled user to deploy the chaincode [2017-03-21 13:46:07.044] [INFO] DEPLOY - Executing Deploy error: [Peer.js]: GRPC client got an error response from the peer. Error: Failed to deserialize creator identity, err MSP DEFAULT is unknown at /home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Failed to deserialize creator identity, err MSP DEFAULT is unknown at Object.callback (/home/ds/blockchain/hackfest/node_modules/fabric-client/lib/Peer.js:191:13) at /home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:437:14 error: [Peer.js]: GRPC client got an error response from the peer. Error: Failed to deserialize creator identity, err MSP DEFAULT is unknown at /home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Failed to deserialize creator identity, err MSP DEFAULT is unknown at Object.callback (/home/ds/blockchain/hackfest/node_modules/fabric-client/lib/Peer.js:191:13) at /home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:437:14 error: [Peer.js]: GRPC client got an error response from the peer. Error: Failed to deserialize creator identity, err MSP DEFAULT is unknown at /home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Failed to deserialize creator identity, err MSP DEFAULT is unknown at Object.callback (/home/ds/blockchain/hackfest/node_modules/fabric-client/lib/Peer.js:191:13) at /home/ds/blockchain/hackfest/node_modules/grpc/src/node/src/client.js:437:14 [2017-03-21 13:46:07.090] [INFO] DEPLOY - Successfully obtained proposal responses from endorsers [2017-03-21 13:46:07.090] [ERROR] Helper - deploy proposal was bad [2017-03-21 13:46:07.091] [ERROR] Helper - deploy proposal was bad [2017-03-21 13:46:07.091] [ERROR] Helper - deploy proposal was bad [2017-03-21 13:46:07.091] [ERROR] Helper - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-03-21 13:46:07.091] [ERROR] DEPLOY - Error: Problems happened when examining proposal responses at Object.module.exports.processProposal (/home/ds/blockchain/hackfest/helper.js:98:9) at /home/ds/blockchain/hackfest/deploy.js:85:17 at process._tickCallback (internal/process/next_tick.js:103:7)

moeentariq (Tue, 21 Mar 2017 13:47:16 GMT):
GOPATH=$PWD node deploy.js

moeentariq (Tue, 21 Mar 2017 13:49:08 GMT):
anyone here to solve this issue .

DannyWong (Tue, 21 Mar 2017 15:31:21 GMT):
@here, there is no tcert support in Node SDK yet!?!?!

Lin-YiTang (Tue, 21 Mar 2017 17:40:37 GMT):
Use node sdk Must have ca and set msp, tls?

vdods (Tue, 21 Mar 2017 21:08:33 GMT):
@here What is the intended status of the fabric-sdk-node tests? I'm getting massive failures, and the tests are apparently not even hitting the peers run by the test/fixtures/docker-compose.yaml file

cdaughtr (Tue, 21 Mar 2017 21:09:47 GMT):
which tests are you running?

vdods (Tue, 21 Mar 2017 21:14:47 GMT):
@cdaughtr `gulp test`, but I've also tried `node test/fixtures/e2e.js`

vdods (Tue, 21 Mar 2017 21:15:23 GMT):
This is after `npm install`, `gulp ca`, deleting the temp dirs created by the tests, and running a fresh docker-compose

cdaughtr (Tue, 21 Mar 2017 21:15:28 GMT):
do you have ``gulp watch`` running?

vdods (Tue, 21 Mar 2017 21:15:42 GMT):
hmm.. no. good point

vdods (Tue, 21 Mar 2017 21:15:59 GMT):
what exactly does that do?

cdaughtr (Tue, 21 Mar 2017 21:17:28 GMT):
it copies the dependencies into the node_modules. even if you are not making changes, you need to do this at least one time or nothing will work.

vdods (Tue, 21 Mar 2017 21:17:45 GMT):
Ok. More tests passed. There were 22 failures instead of 58

cdaughtr (Tue, 21 Mar 2017 21:17:56 GMT):
Leave gulp watch running in it's own window if you are making changes.

vdods (Tue, 21 Mar 2017 21:19:17 GMT):
One of my goals is to use the e2e test as an example for implementing my own app (I have no other working starting point in v1.0). Presumably a normal `npm install` with a correct packages.json file in my own project would suffice -- I wouldn't need this `gulp watch` business?

cdaughtr (Tue, 21 Mar 2017 21:20:17 GMT):
if you are developing, you need to use `gulp watch`

cdaughtr (Tue, 21 Mar 2017 21:21:38 GMT):
the files that are actually running are not the ones you are working on. the running files are in node_modules and are copied there by `gulp watch`

cdaughtr (Tue, 21 Mar 2017 21:22:49 GMT):
well, if you don't need to change anything in node sdk, you won't have to run it except one time after the npm install and gulp ca

vdods (Tue, 21 Mar 2017 21:25:20 GMT):
Ok, thanks. Are all tests expected to pass right now? I'm getting 100% failure if I run `node test/integration/e2e.js` against the docker-compose services

cdaughtr (Tue, 21 Mar 2017 21:25:58 GMT):
you are on latest fabric an fabric-ca?

vdods (Tue, 21 Mar 2017 21:26:09 GMT):
It looks like it's probably some formatting mismatch -- info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/home/vdods/.hfc-key-store"}} not ok 1 Error: Could not parse enrollment response [{"success":true,...

vdods (Tue, 21 Mar 2017 21:26:22 GMT):
Yes, just rebuilt the peer, orderer, and ca

cdaughtr (Tue, 21 Mar 2017 21:28:37 GMT):
I'm working on levels from last week and all are passing.

cdaughtr (Tue, 21 Mar 2017 21:29:18 GMT):
So intent is for `gulp test` to pass 100%

vdods (Tue, 21 Mar 2017 21:29:42 GMT):
hmm.. maybe I should delete node_modules and try again

vdods (Tue, 21 Mar 2017 21:29:54 GMT):
when in doubt, nuke stuff

cdaughtr (Tue, 21 Mar 2017 21:30:31 GMT):
yes, that is recommended to do each time you re-install

yedendra (Tue, 21 Mar 2017 21:51:35 GMT):
Like EventHub, is there a plan to provide a MessageQueue (Kafka or RabbitMQ) to consume events from chaincode for SDK clients? Currently, if the nodejs client dies, it misses the event stream from chaincode

vdods (Tue, 21 Mar 2017 21:53:18 GMT):
@cdaughtr I'm still getting 22 failures out of 409 tests.

vdods (Tue, 21 Mar 2017 21:57:38 GMT):
The first failing test: ```** TEST ** orderer via member missing orderer not ok 388 Error: Could not parse enrollment response [{"success":true,"result":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUIzVENDQVlTZ0F3SUJBZ0lVS21 ...```

vdods (Tue, 21 Mar 2017 21:58:41 GMT):
```... as JSON due to error [TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.]```

vdods (Tue, 21 Mar 2017 22:07:50 GMT):
and actually all 22 test failures stem from that one issue

vdods (Tue, 21 Mar 2017 22:08:05 GMT):
Seems like it's only a formatting issue. I'll see if I can fix it.

cdaughtr (Tue, 21 Mar 2017 23:03:41 GMT):
I'll update my fabric & ca tomorrow and let you know if I have the same issue.

jimthematrix (Tue, 21 Mar 2017 23:09:31 GMT):
@anand.fast on your question about the new "mspid" parameter in User.setEnrollment() method, this is the value corresponding to your organization's unique id in the channel's configuration. In the case of "testchainid", which is the default channel all peer have (unless turned off from a command line switch), the value is "DEFAULT"

jimthematrix (Tue, 21 Mar 2017 23:10:25 GMT):
if you are using the set up in test/fixtures/docker-compose.yaml then it's either "Org1MSP" or "Org2MSP" depending on your user's organization

jimthematrix (Tue, 21 Mar 2017 23:11:02 GMT):
if you are setting up your own channel, this value should be the same as the one for your organization that you are adding to the channel's configuration

jimthematrix (Tue, 21 Mar 2017 23:11:13 GMT):
hope that helps

anand.fast (Tue, 21 Mar 2017 23:11:55 GMT):
@jimthematrix Thanks Jim. I will try this out.

smallX (Wed, 22 Mar 2017 01:52:04 GMT):
Has joined the channel.

JoseHerrera (Wed, 22 Mar 2017 04:44:09 GMT):
Has joined the channel.

JoseHerrera (Wed, 22 Mar 2017 04:47:49 GMT):
Hello guys, my team and I are currently building a blockchain voting system on hyperledger fabric 0.6, and currently are doing load testing. We're having some difficulty achieving server stability under heavy loads. We believe that this is due to 0.6's lack of concurrency during chaincode execution, so we're limiting concurrency using the node module "express-queue" set to 1. However, we still get this error during load testing: APP/0 at Object.callback (/home/vcap/app/node_modules/hfc/lib/hfc.js:1807:42)Mar 21, 2017 8:43:51 PM APP/0 at TransactionContext.emit (events.js:163:17)Mar 21, 2017 8:43:51 PM APP/0 at /home/vcap/app/node_modules/grpc/src/node/src/client.js:422:14

JoseHerrera (Wed, 22 Mar 2017 04:48:16 GMT):
So my question is, how can I scale an app on fabric 0.6? (I know that 1.0 has solved this issue)

Ying (Wed, 22 Mar 2017 05:24:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GakkBjK6jb24jH5LE) Met the same issue as @Rymd mentioned. Any way of upgrading an instantiated chaincode via our SDK? I found updateChain() is still TODO. Thanks.

Rymd (Wed, 22 Mar 2017 05:24:44 GMT):
Has joined the channel.

Ying (Wed, 22 Mar 2017 05:26:41 GMT):
Met the same issue as @Rymd mentioned. Any way of upgrading an instantiated chaincode via our SDK? I tried install and instantiate but got 'Error: Chaincode exists'. Thanks.

bkvellanki (Wed, 22 Mar 2017 06:20:52 GMT):
node fabric/instantiate.js info: Returning a new winston logger with default configurations info: [Peer.js]: Peer.const - url: grpcs://localhost:7051 options grpc.ssl_target_name_override=peer0, grpc.default_authority=peer0 info: [Client.js]: Failed to load user "admin" from local key value store Failed to enroll user 'admin'. Error: Failed to load key or certificate and save to local stores. unsupported object nor format Failed to initialize the chain

bkvellanki (Wed, 22 Mar 2017 06:29:28 GMT):
I am having an issue when i am trying instantiate the chaincode..using the getSubmitter from util.js

bkvellanki (Wed, 22 Mar 2017 06:45:50 GMT):
info: Returning a new winston logger with default configurations info: [Peer.js]: Peer.const - url: grpcs://localhost:7051 options grpc.ssl_target_name_override=peer0, grpc.default_authority=peer0 Failed to enroll user 'admin'. TypeError: client.getUserContext is not a function Failed to initialize the chain

bkvellanki (Wed, 22 Mar 2017 06:46:36 GMT):
I had an issue with the path, but now i am seeing the getUserContext is not a fucntion

bkvellanki (Wed, 22 Mar 2017 06:51:32 GMT):
Do anyone have the fabric node sdk sample code for install,deploy,instantiate, invoke for v1.0 using balance transfer or other. I am having an issue when I try the v1.0 on e2e integration.Any help appreciated.

adc (Wed, 22 Mar 2017 07:56:34 GMT):
Has joined the channel.

adc (Wed, 22 Mar 2017 07:57:11 GMT):
@jimthematrix, does the node-sdk allow to specify the endorsement policy?

yhelal (Wed, 22 Mar 2017 08:52:41 GMT):
Has joined the channel.

aberfou (Wed, 22 Mar 2017 11:38:44 GMT):
@jrosmith Thx for the input. I dont know as I said the blockchain runs for several days. It seems that either the peer or the client closes the connection... I added a workaround I always check with chain.getEventHub().isconnected() is the connection available and it always says true, although I dont receive any new block events

aberfou (Wed, 22 Mar 2017 11:44:31 GMT):
@jrosmith you said that happens to be sometimes, do you have a workaround?

aberfou (Wed, 22 Mar 2017 11:44:31 GMT):
@jrosmith you said that happens to be sometimes, do you have a workaround? My plan was to check if there is noc connection then reconnect but chain.getEventHub().isconnected() returns alsways true...

aberfou (Wed, 22 Mar 2017 11:44:31 GMT):
@jrosmith you said that happens to be sometimes, do you have a workaround? My plan was to check if there is no connection then reconnect but chain.getEventHub().isconnected() returns alsways true...

Vadim (Wed, 22 Mar 2017 12:08:08 GMT):
@aberfou it does not do what you expect, it is basically telling that you called connect() on an eventhub instance

Vadim (Wed, 22 Mar 2017 12:08:45 GMT):
at least in current implementation

aberfou (Wed, 22 Mar 2017 12:09:33 GMT):
@Vadim yes I checked it also in the hfc source code. But how should I handle this issue... Is there any workaround it seems that it is a known issue...

jrosmith (Wed, 22 Mar 2017 13:22:01 GMT):
@aberfou the only way I've been to deal with it is to disconnect and then reconnect :/

aberfou (Wed, 22 Mar 2017 13:36:18 GMT):
@jrosmith ok :frowning2: thats bad, do you knwo why this happens... timeout issues?

jrosmith (Wed, 22 Mar 2017 13:37:12 GMT):
@aberfou honestly no clue. it only happens to me locally. when they system is deployed to aws theres no issues so i haven't dug too deep

aberfou (Wed, 22 Mar 2017 13:40:10 GMT):
@jrosmith hmm my application is also deplyoed in aws. Well, I have to find out, otherwise reconnect everytime

aberfou (Wed, 22 Mar 2017 13:41:10 GMT):
But as I said this happens only if the blockchain runs more than 3 days and there were no transactions

bretharrison (Wed, 22 Mar 2017 13:43:23 GMT):
@ying NodeSDK will support an upgrade to chaincode soon. The process to upgrade will be to install an new version of the chaincode using existing api then call a new API to perform the `upgrade` endorsement with the new chaincode version. And then to use the existing API to submit the transaction with the endorsed proposal to the orderer.

Vadim (Wed, 22 Mar 2017 13:44:27 GMT):
@bretharrison how is it defined who can upgrade chaincodes?

jrosmith (Wed, 22 Mar 2017 13:46:18 GMT):
@aberfou i just checked a deploy thats been up for several days without transactions and i can still get blockevents, can you show me the error?

aberfou (Wed, 22 Mar 2017 13:47:43 GMT):
@jrosmith I dont get any error, I log in into my web application and send a transaction and I am wating for a new block event to update my view. I can see that the transaction goes through the blockchain...

aberfou (Wed, 22 Mar 2017 13:48:10 GMT):
But I dont receive a new block event

jrosmith (Wed, 22 Mar 2017 13:56:46 GMT):
@aberfou definitely strange, i don't know why that'd be happening, sorry man :(

aberfou (Wed, 22 Mar 2017 14:00:43 GMT):
@jrosmith no problem. Thanks a lot :)

agiledeveloper (Wed, 22 Mar 2017 15:48:52 GMT):
Has joined the channel.

jimthematrix (Wed, 22 Mar 2017 15:56:16 GMT):
@adc not yet, we are working on it https://jira.hyperledger.org/browse/FAB-2685. right now only generates a default policy of "oneof (org1, org2, ...)"

adc (Wed, 22 Mar 2017 16:10:14 GMT):
thanks @jimthematrix :)

isramos (Wed, 22 Mar 2017 18:51:32 GMT):
it seems the fabric-sdk-node/examples/balance-transfer no longer works :( anyone planning on working on that anytime soon?

isramos (Wed, 22 Mar 2017 18:55:53 GMT):
balance transfer only working with node sdk 0.1.x. Not working with the 1.0.0 alpha release. I saw you have same issue @bkvellanki

isramos (Wed, 22 Mar 2017 18:57:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bq94mPfRCJsrYCbmt) @vdods were you able to fix that format issue?

bkvellanki (Wed, 22 Mar 2017 19:28:29 GMT):
ok thanks

fbenhamo (Wed, 22 Mar 2017 19:37:42 GMT):
Has joined the channel.

jimthematrix (Wed, 22 Mar 2017 20:05:11 GMT):
@isramos you are right, that sample needs to be updated. would welcome any help from the community. @Ratnakar originally wrote it but i'm not sure how soon he can get to updating it

CarlXK (Thu, 23 Mar 2017 01:39:42 GMT):
Has joined the channel.

Willson (Thu, 23 Mar 2017 03:28:18 GMT):
Has left the channel.

kletkeman (Thu, 23 Mar 2017 06:20:45 GMT):
@jimthematrix The e2e tests have changed fairly significantly with the new TLS code and the addition of the ca_certs on all peers in the config.json fabric definition. Do you feel that this is the main source of issues with the sample, or are there other changes that you anticipate would be a problem?

kletkeman (Thu, 23 Mar 2017 06:20:45 GMT):
@jimthematrix The e2e tests have changed fairly significantly with the new TLS code and the addition of the ca_certs on all peers in the config.json fabric definition. Do you feel that this is the main source of issues with the sample, or are there other changes that you anticipate would be a problem with the balance-transfer sample application?

AbhilekhSingh (Thu, 23 Mar 2017 06:22:22 GMT):
Is there any example for v1.0 which has CA server and client also?

AbhilekhSingh (Thu, 23 Mar 2017 06:22:37 GMT):
I check e2e_cli example it doesn't have that

Rymd (Thu, 23 Mar 2017 07:52:38 GMT):
Has left the channel.

anik (Thu, 23 Mar 2017 08:51:40 GMT):
Has joined the channel.

xuzhao103389 (Thu, 23 Mar 2017 10:39:13 GMT):
Has joined the channel.

xuzhao103389 (Thu, 23 Mar 2017 10:40:25 GMT):
Is there any document that I can start to build and test the SDK? thanks

xuzhao103389 (Thu, 23 Mar 2017 10:41:04 GMT):
For hyperledger V1.0

mbwhite (Thu, 23 Mar 2017 11:26:34 GMT):
Has joined the channel.

mbwhite (Thu, 23 Mar 2017 11:40:34 GMT):
I'm starting to debug a segmentation error with the nodejs sdk on Windows 10; before I get too far - are is anybody aware of any issues? I can't find anything in the google searches I've done so far

mbwhite (Thu, 23 Mar 2017 12:02:13 GMT):
```## Stack Trace: native!v8::Value::QuickIsString native!v8::Value::IsString native!v8_value_hash::operator()+0x5e native!std::_Uhash_compare > *,v8_value_hash,v8_value_equal_to>::operator()+0x9 native!std::_Hash > *,Nan::Persistent > *,std::_Uhash_compare > *,v8_value_hash,v8_value_equal_to>,std::allocator > * const,Nan::Persistent > *> >,0> >::_Hashval+0x9 native!std::_Hash > * __ptr64,Nan::Persistent > * __ptr64,std::_Uhash_compare > * __ptr64,v8_value_hash,v8_value_equal_to>,std::allocator > * __ptr64 const,Nan::Persistent > * __ptr64> >,0> >::erase+0x23 native!HashTable::Remove+0x238 native!Nan::imp::FunctionCallbackWrapper+0x9c node!v8::experimental::FastAccessorBuilder::Call+0x4768a node!v8::Testing::DeoptimizeAll+0x193202 node!v8::Testing::DeoptimizeAll+0x18c5c3 node!v8::Testing::DeoptimizeAll+0x18c534 ``` For reference that's the stack trace from node...nothing found on line...

smallX (Thu, 23 Mar 2017 12:05:37 GMT):
@mbwhite from fabric 1.0 or 0.6?

xuzhao103389 (Thu, 23 Mar 2017 12:10:36 GMT):
I am dong npm test

xuzhao103389 (Thu, 23 Mar 2017 12:10:45 GMT):
for favric V1.0

xuzhao103389 (Thu, 23 Mar 2017 12:10:58 GMT):
ok 400 User constructor test 2: new User cfg getRoles was successful ok 401 User class setEnrollment() test 1..401 # tests 401 # pass 398 # fail 3 -------------------------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -------------------------------|----------|----------|----------|----------|----------------| fabric-ca-client/lib/ | 58.6 | 69.39 | 51.35 | 58.6 | | FabricCAClientImpl.js | 58.6 | 69.39 | 51.35 | 58.6 |... 568,571,572 | fabric-client/lib/ | 42.8 | 43.26 | 41.28 | 42.95 | | Chain.js | 29.05 | 32.79 | 36.61 | 29.1 |... 8,2367,2369 | Client.js | 69.75 | 70.59 | 60 | 69.75 |... 314,315,383 | Config.js | 94.29 | 83.33 | 100 | 94.29 | 116,133 | EventHub.js | 26.98 | 5.88 | 21.05 | 27.73 |... 322,323,331 | Orderer.js | 25.78 | 18 | 33.33 | 25.78 |... 253,254,257 | Packager.js | 90 | 81.82 | 100 | 90 | 53,54 | Peer.js | 65.91 | 22.22 | 37.5 | 65.91 |... 217,219,220 | Remote.js | 100 | 96.88 | 100 | 100 | | User.js | 69.74 | 61.36 | 57.14 | 69.74 |... 260,272,276 | api.js | 100 | 100 | 0 | 100 | | hash.js | 46.27 | 0 | 15.79 | 46.27 |... 139,140,151 | utils.js | 72.63 | 69.15 | 67.86 | 72.63 |... 427,428,430 | fabric-client/lib/impl/ | 52.45 | 44.19 | 56.58 | 52.82 | | CouchDBKeyValueStore.js | 76.92 | 60 | 93.33 | 77.63 |... 171,184,185 | CryptoKeyStore.js | 100 | 92.86 | 100 | 100 | | CryptoSuite_ECDSA_AES.js | 81.87 | 78.16 | 75 | 81.87 |... 404,421,427 | FileKeyValueStore.js | 87.18 | 71.43 | 100 | 87.18 | 55,56,57,59,83 | bccsp_pkcs11.js | 14.61 | 16.97 | 9.68 | 14.89 |... 925,929,932 | fabric-client/lib/impl/aes/ | 11.11 | 0 | 0 | 11.11 | | pkcs11_key.js | 11.11 | 0 | 0 | 11.11 |... 52,56,60,64 | fabric-client/lib/impl/ecdsa/ | 64.84 | 37.88 | 57.14 | 65.56 | | key.js | 100 | 96.15 | 100 | 100 | | pkcs11_key.js | 11.11 | 0 | 0 | 11.43 |... 85,89,90,92 | fabric-client/lib/msp/ | 86.81 | 85.19 | 73.08 | 86.71 | | identity.js | 92 | 95 | 76.92 | 92 | 69,87,105,212 | msp-manager.js | 85.42 | 80 | 100 | 85.11 |... 8,89,90,132 | msp.js | 82.61 | 78.57 | 50 | 82.61 |... 126,127,144 | fabric-client/lib/packager/ | 89.66 | 75 | 83.33 | 89.66 | | Car.js | 60 | 100 | 0 | 60 | 22,23 | Golang.js | 92.45 | 75 | 100 | 92.45 |124,138,163,183 | -------------------------------|----------|----------|----------|----------|----------------| All files | 49.2 | 46.53 | 47.09 | 49.38 | | -------------------------------|----------|----------|----------|----------|----------------| =============================== Coverage summary =============================== Statements : 49.2% ( 1449/2945 ) Branches : 46.53% ( 590/1268 ) Functions : 47.09% ( 210/446 ) Lines : 49.38% ( 1445/2926 ) ================================================================================ [05:09:33] Finished 'test-headless' after 4.09 s npm ERR! Test failed. See above for more details.

xuzhao103389 (Thu, 23 Mar 2017 12:11:07 GMT):
the test failed

xuzhao103389 (Thu, 23 Mar 2017 12:11:14 GMT):
who can help figure it out

xuzhao103389 (Thu, 23 Mar 2017 12:11:18 GMT):
thanks

xuzhao103389 (Thu, 23 Mar 2017 12:11:36 GMT):
I am using this link ; https://github.com/hyperledger/fabric-sdk-node

xuzhao103389 (Thu, 23 Mar 2017 12:12:10 GMT):
3 test case failed , looks like

xuzhao103389 (Thu, 23 Mar 2017 12:13:19 GMT):
IncomingMessage.g (events.js:291:16) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickDomainCallback (internal/process/next_tick.js:122:9) --- operator: fail at: cs._getKeyStore.then.catch (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/unit/cryptosuite-ecdsa-aes.js:199:6) ... #

xuzhao103389 (Thu, 23 Mar 2017 12:13:33 GMT):
IncomingMessage.g (events.js:291:16) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickDomainCallback (internal/process/next_tick.js:122:9) --- operator: fail at: cs._getKeyStore.then.catch (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/unit/cryptosuite-ecdsa-aes.js:222:6) ...

mbwhite (Thu, 23 Mar 2017 12:20:01 GMT):
@smallX 0.6

xuzhao103389 (Thu, 23 Mar 2017 13:29:02 GMT):
I do : run docker-compose up --force-recreate to launch the network

xuzhao103389 (Thu, 23 Mar 2017 13:29:23 GMT):
and then I do node test/integration/e2e/create-channel.js

xuzhao103389 (Thu, 23 Mar 2017 13:29:42 GMT):
got the error

xuzhao103389 (Thu, 23 Mar 2017 13:29:42 GMT):
info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: create channel ***** info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12)" not ok 3 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:96:5) ... ok 4 Successfully waited to make sure new channel was created. 1..4 # tests 4 # pass 3 # fail 1

xuzhao103389 (Thu, 23 Mar 2017 13:52:17 GMT):
I am reading https://github.com/hyperledger/fabric-sdk-node

xuzhao103389 (Thu, 23 Mar 2017 13:52:39 GMT):
but I got a lot of test cases failed

pmullaney (Thu, 23 Mar 2017 14:19:20 GMT):
@xuzhao103389: barring a new bug, my guess is your not connecting to the orderer for some reason - are you running docker-compose up in test/fixtures? Also, make sure that previous docker containers are stopped/removed

xuzhao103389 (Thu, 23 Mar 2017 14:35:22 GMT):
@pmullaney yes, I am running docker-compose up in test/fixtures

xuzhao103389 (Thu, 23 Mar 2017 14:35:35 GMT):
I removed all the other docker containers

xuzhao103389 (Thu, 23 Mar 2017 14:35:57 GMT):
docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES root@ruts1:/hyperledger/src/github.com/hyperledger/fabric-ca#

xuzhao103389 (Thu, 23 Mar 2017 14:36:15 GMT):
now there is no containers at all

xuzhao103389 (Thu, 23 Mar 2017 14:36:18 GMT):
then I run

xuzhao103389 (Thu, 23 Mar 2017 14:36:31 GMT):
root@ruts1:/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/fixtures# docker-compose up --force-recreate

bmos299 (Thu, 23 Mar 2017 14:38:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JhJRfQbgJFrPp6tet) @jimthematrix @Ratnakar is actively working on updating the helloworld sample for the node sdk.

xuzhao103389 (Thu, 23 Mar 2017 14:40:32 GMT):
btw, this time I received a different error: # ***** End-to-end flow: create channel ***** info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:260:11) error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:260:11) not ok 1 Failed to enroll user 'admin'. Error: Private key missing from key store. Can not establish the signing identity for user admin --- operator: fail at: hfc.newDefaultKeyValueStore.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:82:5) ... not ok 2 Failed to create the channel. --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:92:6) ... ok 3 Successfully waited to make sure new channel was created. 1..3 # tests 3 # pass 1 # fail 2

pmullaney (Thu, 23 Mar 2017 14:43:50 GMT):
what changed? Looks like your having issues with fabric-ca now.

xuzhao103389 (Thu, 23 Mar 2017 14:44:59 GMT):
yes

xuzhao103389 (Thu, 23 Mar 2017 14:45:10 GMT):
I just restart the docker-compose

xuzhao103389 (Thu, 23 Mar 2017 14:45:29 GMT):
and then do the node test/integration/e2e/create-channel.js

xuzhao103389 (Thu, 23 Mar 2017 14:46:06 GMT):
I did "rm -rf /tmp/hfc-*, rm -rf ~/.hfc-key-store"

xuzhao103389 (Thu, 23 Mar 2017 14:46:20 GMT):
is that the reason?

pmullaney (Thu, 23 Mar 2017 14:49:18 GMT):
you might want to: 1. docker-compose down 2) "rm -rf /tmp/hfc-*, rm -rf ~/.hfc-key-store" 3) docker-compose up --force-recreate

pmullaney (Thu, 23 Mar 2017 14:49:34 GMT):
if you didn't follow that order

pmullaney (Thu, 23 Mar 2017 14:50:11 GMT):
then run the create-channel test

xuzhao103389 (Thu, 23 Mar 2017 14:51:35 GMT):
yes, I followed your steps

xuzhao103389 (Thu, 23 Mar 2017 14:51:41 GMT):
but still got the same error

xuzhao103389 (Thu, 23 Mar 2017 14:51:53 GMT):
root@ruts1:/hyperledger/src/github.com/hyperledger/fabric-sdk-node# node test/integration/e2e/create-channel.js info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: create channel ***** info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:260:11) error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:260:11) not ok 1 Failed to enroll user 'admin'. Error: Private key missing from key store. Can not establish the signing identity for user admin --- operator: fail at: hfc.newDefaultKeyValueStore.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:82:5) ... not ok 2 Failed to create the channel. --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:92:6) ... ok 3 Successfully waited to make sure new channel was created. 1..3 # tests 3 # pass 1 # fail 2

xuzhao103389 (Thu, 23 Mar 2017 14:52:13 GMT):
I was following this order: 1. docker-compose down 2) "rm -rf /tmp/hfc-*, rm -rf ~/.hfc-key-store" 3) docker-compose up --force-recreate

xuzhao103389 (Thu, 23 Mar 2017 14:52:32 GMT):
and then run node test/integration/e2e/create-channel.js

xuzhao103389 (Thu, 23 Mar 2017 14:54:07 GMT):
the problem is

xuzhao103389 (Thu, 23 Mar 2017 14:54:17 GMT):
I did not see private key under the dir

xuzhao103389 (Thu, 23 Mar 2017 14:54:18 GMT):
# fail 2 root@ruts1:/hyperledger/src/github.com/hyperledger/fabric-sdk-node# ll /root/.hfc-key-store total 12 drwxr-xr-x 2 root root 4096 Mar 23 07:51 ./ drwx------ 8 root root 4096 Mar 23 07:51 ../ -rw-r--r-- 1 root root 182 Mar 23 07:53 47c8722fa3aa4c99c63235ddbf1626d14883101c9cf4565b5bec4604dd55b59f-pub

xuzhao103389 (Thu, 23 Mar 2017 14:54:31 GMT):
there is only 1 pub file

xuzhao103389 (Thu, 23 Mar 2017 14:55:56 GMT):
I think that is why I got this error

xuzhao103389 (Thu, 23 Mar 2017 14:55:57 GMT):
info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin

xuzhao103389 (Thu, 23 Mar 2017 15:17:05 GMT):
ok , I got the reason

xuzhao103389 (Thu, 23 Mar 2017 15:17:22 GMT):
rm -rf /tmp/hfc-* can not really remove all the dirs

xuzhao103389 (Thu, 23 Mar 2017 15:17:39 GMT):
I manually remove that folders

xuzhao103389 (Thu, 23 Mar 2017 15:17:58 GMT):
now the error is : info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: create channel ***** info: [Client.js]: Failed to load user "admin" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":7054} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} ok 1 Successfully enrolled user 'admin' info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} ok 2 Successfully enrolled user 'admin' error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12)" not ok 3 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/hyperledger/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:96:5) ... ok 4 Successfully waited to make sure new channel was created. 1..4 # tests 4 # pass 3 # fail 1

xuzhao103389 (Thu, 23 Mar 2017 15:18:05 GMT):
much better:)

pd93 (Thu, 23 Mar 2017 15:20:16 GMT):
I just received this distinctly unhelpful error from GRPC when trying to invoke a transaction via the Node SDK ``` error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7000". Error: Unknown error at /home/pete/dev/go/src/gitlab.com/eqdlt/DLT-001-EQ-Trader/app/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Unknown error at /home/pete/dev/go/src/gitlab.com/eqdlt/DLT-001-EQ-Trader/app/node_modules/grpc/src/node/src/client.js:434:17 ``` If I do a `GRPC_TRACE=all GRPC_VERBOSITY=DEBUG node app` I also get the following output: ``` I0323 15:19:14.020290073 30951 parsing.c:456] HTTP:3:HDR:CLI: :status: 200 I0323 15:19:14.020295025 30951 parsing.c:456] HTTP:3:HDR:CLI: content-type: application/grpc I0323 15:19:14.020302088 30951 parsing.c:456] HTTP:3:HDR:CLI: grpc-status: 2 I0323 15:19:14.020308312 30951 parsing.c:456] HTTP:3:HDR:CLI: grpc-message: Unknown error ``` I don't understand how it can output a 200 status *and* fail at the same time :(

pmullaney (Thu, 23 Mar 2017 15:27:55 GMT):
@xuzhao103389: the next thing I would try is attempt to connect to the orderer at port 7050 with something like telnet - just to verify that its running and available

isramos (Thu, 23 Mar 2017 15:34:46 GMT):
Good / bug news: I was able to run node-sdk in Cloud Foundry ( Bluemix runtime) !!! Woohoo!!! One issue however: had to replace 'hashtable' package with 'hashtable-js'. That's because 'hashtable' required gcc and you can't (easily) install it in CF. I opened an JIRA issue FAB-2864

isramos (Thu, 23 Mar 2017 15:34:46 GMT):
Good / bug news: I was able to run node-sdk in Cloud Foundry ( Bluemix runtime) !!! Woohoo!!! One issue however: had to replace 'hashtable' package with 'hashtable-js'. That's because 'hashtable' required gcc and you can't (easily) install it in CF. I opened an JIRA issue FAB-2864s

isramos (Thu, 23 Mar 2017 15:34:46 GMT):
Good / bug news: I was able to run node-sdk in Cloud Foundry ( Bluemix runtime) !!! Woohoo!!! One issue however: had to replace 'hashtable' package with 'hashtable-js'. That's because 'hashtable' requires gcc and you can't (easily) install it in CF. I opened an JIRA issue FAB-2864.

isramos (Thu, 23 Mar 2017 15:34:46 GMT):
Good / bug news: I was able to run node-sdk in Cloud Foundry ( Bluemix runtime) !!! Woohoo!!! One issue however: had to replace 'hashtable' package with 'hashtable-js'. That's because 'hashtable' requires gcc and you can't (easily) install it in CF. I opened an JIRA issue FAB-2864. @jimthematrix

latitiah (Thu, 23 Mar 2017 16:31:58 GMT):
Has joined the channel.

davidkel (Thu, 23 Mar 2017 16:58:24 GMT):
@isramos when I've pushed nodejs applications to bluemix any native modules required as part of the npm dependencies are compiled and expected and in one example that was hashtable. Maybe it was something related to the buildpack you were using ?

davidkel (Thu, 23 Mar 2017 16:58:24 GMT):
@isramos when I've pushed nodejs applications to bluemix any native modules required as part of the npm dependencies are compiled as expected and in one example that was hashtable. Maybe it was something related to the buildpack you were using ?

davidkel (Thu, 23 Mar 2017 16:58:24 GMT):
@isramos when I've pushed nodejs applications to bluemix any native modules required as part of the npm dependencies are compiled as expected and in one example that was hashtable. Maybe it was something related to the buildpack you were using ? that gave an error ?

isramos (Thu, 23 Mar 2017 17:06:01 GMT):
@davidkel using the default buildpack gives out that error. And I imagine that's what most people would use, so that's why I recommend looking into moving to 'hashtable-js'

davidkel (Thu, 23 Mar 2017 17:06:54 GMT):
@isramos that's really odd as we use the default node buildpack and hashtable compiles for us no problem

firas.qutishat (Thu, 23 Mar 2017 17:16:40 GMT):
Hi, We notice in the sdk-node there is method called isValidPeer() used to verify if the peer is part of the chain list of peers. This method exist in sendInstallProposal and sendInstantiateProposal but not exist in sendTransactionProposal is there reason for that.

davidkel (Thu, 23 Mar 2017 17:25:04 GMT):
@isramos so just tried hashtable with the default nodejs build pack and it compiled it ok for me.

isramos (Thu, 23 Mar 2017 17:28:55 GMT):
let me double check

Wenyang Liu (Thu, 23 Mar 2017 18:11:16 GMT):
Has joined the channel.

isramos (Thu, 23 Mar 2017 18:15:57 GMT):
@davidkel - hashtable just worked for me on a fresh default nodejs buildpack as well. Maybe I had something corrupt / misconfigured before. :confused:

davidkel (Thu, 23 Mar 2017 18:32:21 GMT):
@isramos that's good news that you got it to work. :thumbsup:

bobbiejc (Thu, 23 Mar 2017 23:06:40 GMT):
Is there any preferred nodejs test framework working with hyperledger applications?

antoniovassell (Fri, 24 Mar 2017 05:50:44 GMT):
@here is it possible to get a list of all channels currently initialize from the sdk?

balakrishna.devasani (Fri, 24 Mar 2017 11:10:30 GMT):
Hi All, is there any signin/signout kind of functionality available with membersrvc with Fabric-V0.6 ? For me it seems once the user is enrolled he get the capability to fire invokes and queries and cannot be logged out.

balakrishna.devasani (Fri, 24 Mar 2017 11:11:42 GMT):
is there any example of such login/logout feature in repository ?

balakrishna.devasani (Fri, 24 Mar 2017 11:12:43 GMT):
using HFC node-sdk

mastersingh24 (Fri, 24 Mar 2017 11:34:42 GMT):
@balakrishna.devasani - we never implemented the ability to revoke enrollment certificates in v0.6

joe-alewine (Fri, 24 Mar 2017 13:59:55 GMT):
Has joined the channel.

enidz (Fri, 24 Mar 2017 14:00:39 GMT):
Hi I'm having trouble with the test /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/couchdb-fabricca-tests.js ``` node test/integration/couchdb-fabricca-tests.js info: Returning a new winston logger with default configurations info: [couchdb-fabricca]: couchdb Key Value Store = fabric-client/lib/impl/CouchDBKeyValueStore.js info: [couchdb-fabricca]: couch keyValStorePath: http://localhost:5984 TAP version 13 # Use FabricCAServices with a CouchDB KeyValueStore # Cleanup of existing member_db returned false # Initilize the CouchDB KeyValueStore info: [CouchDBKeyValueStore.js]: No member_db found, creating member_db error: [couchdb-fabricca]: Error: Failed to create member_db database due to error: Error: You are not a server admin. at Request._callback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/nano/lib/nano.js:248:15) at Request.self.callback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:1060:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage. (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:980:12) at IncomingMessage.g (events.js:291:16) not ok 1 Error initializing CouchDB KeyValueStore. Exiting. --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... ``` do you know how can I fix this error ```Error: Failed to create member_db database due to error: Error: You are not a server admin.``` and perform this test ? thx

enidz (Fri, 24 Mar 2017 14:00:39 GMT):
Hi I'm having trouble with the test /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/couchdb-fabricca-tests.js ``` node test/integration/couchdb-fabricca-tests.js info: Returning a new winston logger with default configurations info: [couchdb-fabricca]: couchdb Key Value Store = fabric-client/lib/impl/CouchDBKeyValueStore.js info: [couchdb-fabricca]: couch keyValStorePath: http://localhost:5984 TAP version 13 # Use FabricCAServices with a CouchDB KeyValueStore # Cleanup of existing member_db returned false # Initilize the CouchDB KeyValueStore info: [CouchDBKeyValueStore.js]: No member_db found, creating member_db error: [couchdb-fabricca]: Error: Failed to create member_db database due to error: Error: You are not a server admin. at Request._callback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/nano/lib/nano.js:248:15) at Request.self.callback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:1060:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage. (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:980:12) at IncomingMessage.g (events.js:291:16) not ok 1 Error initializing CouchDB KeyValueStore. Exiting. --- operator: fail at: process._tickCallback (internal/process/next_tick.js:103:7) ... ``` do you know how can I fix this error ```Error: Failed to create member_db database due to error: Error: You are not a server admin.``` and perform this test ? thx

cdaughtr (Fri, 24 Mar 2017 14:29:02 GMT):
@enidz I don't know what changed to create that error, but I have fixed it and the fix is merged. In the test/fixtures/docker-compose.yaml, I removed the user and password from the couchdb.

enidz (Fri, 24 Mar 2017 14:52:19 GMT):
ok thx !

jtrayfield (Fri, 24 Mar 2017 17:49:18 GMT):
Has anybody seen this error? emdall:fabric-client jtray$ npm i > hashtable@2.0.2 install /Users/jtray/git/xxx/node_modules/fabric-sdk-node/fabric-client/node_modules/hashtable > node-gyp configure build gyp ERR! UNCAUGHT EXCEPTION gyp ERR! stack Error: Cannot find module 'block-stream' gyp ERR! stack at Function.Module._resolveFilename (module.js:469:15) gyp ERR! stack at Function.Module._load (module.js:417:25) gyp ERR! stack at Module.require (module.js:497:17) gyp ERR! stack at require (internal/module.js:20:19) gyp ERR! stack at Object. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js:7:19) gyp ERR! stack at Module._compile (module.js:570:32) gyp ERR! stack at Object.Module._extensions..js (module.js:579:10) gyp ERR! stack at Module.load (module.js:487:32) gyp ERR! stack at tryModuleLoad (module.js:446:12) gyp ERR! stack at Function.Module._load (module.js:438:3) gyp ERR! System Darwin 15.6.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /Users/jtray/git/xxx/node_modules/fabric-sdk-node/fabric-client/node_modules/hashtable gyp ERR! node -v v6.10.1 gyp ERR! node-gyp -v v3.4.0 gyp ERR! This is a bug in `node-gyp`. gyp ERR! Try to update node-gyp and file an Issue if it does not help: gyp ERR!

mastersingh24 (Fri, 24 Mar 2017 19:26:01 GMT):
@jtrayfield - have not seen this error before - but you might want to look at http://stackoverflow.com/questions/23619924/node-gyp-errors-on-cannot-find-module

jtrayfield (Fri, 24 Mar 2017 19:35:22 GMT):
@mastersingh24 npm install -g npm fixed it, thanks

jtrayfield (Fri, 24 Mar 2017 19:38:34 GMT):
var client = new hfc(); console.dir(client); chain = client.newChain("chain-network");

jtrayfield (Fri, 24 Mar 2017 19:38:46 GMT):
2017-03-24T19:37:06.993Z - error: /Users/jtray/git/theseam/app.js() Problem initializing server: TypeError: hfc.newChain is not a function

jtrayfield (Fri, 24 Mar 2017 19:38:57 GMT):
how are you supposed to do it?

jtrayfield (Fri, 24 Mar 2017 20:09:00 GMT):
nevermind I've gotten it

jtrayfield (Fri, 24 Mar 2017 20:39:42 GMT):
how does one create a Peer?

jtrayfield (Fri, 24 Mar 2017 21:08:53 GMT):
I did this: Peer = require('fabric-sdk-node/fabric-client/lib/Peer'), let me know if there is a better solution

sachikoy (Sat, 25 Mar 2017 01:17:36 GMT):
Hi, we are encountering the network timeout problem as described in https://jira.hyperledger.org/browse/FAB-2787 . It seems there is `chaincode.keepalive` option to keep connection between peer and chaincode. Do we have similar option in HFC 0.6?

vdods (Sat, 25 Mar 2017 03:15:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pB5FDdk4FGkzRjxWM) @isramos No, I looked at it for a while but wasn't able to effect a change in the amount of time I was willing to spend.

StevenLanders (Sat, 25 Mar 2017 19:12:20 GMT):
Has joined the channel.

StevenLanders (Sat, 25 Mar 2017 19:34:44 GMT):
Is there a smart way to deal with chaincode errors (non-200 responses) when calling `chain.sendTransactionProposal(request)` ? It appears to just log the error within Peer.js..then resolves empty respone objects...

StevenLanders (Sat, 25 Mar 2017 19:34:44 GMT):
Is there a smart way to deal with chaincode errors (non-200 responses) when calling `chain.sendTransactionProposal(request)` ? It appears to just log the error within Peer.js..then resolves empty response objects...

StevenLanders (Sat, 25 Mar 2017 20:43:36 GMT):
Ah I see it now - I was using `JSON.stringify` to see what the items were, and it turns out an Error object shows up as `{}` when stringified.

jongeun.park (Mon, 27 Mar 2017 07:36:13 GMT):
Has joined the channel.

clydedacruz (Mon, 27 Mar 2017 08:58:14 GMT):
I'm using v1.0.0-alpha. after doing a setUserContext() to save the enrolled user to local store, i had a look at the saved credential object. seems like the the function does not persist data like enrollmentSecret, roles, affiliation to the persisted member credential object

clydedacruz (Mon, 27 Mar 2017 08:58:14 GMT):
I'm using v1.0.0-alpha. After doing a setUserContext() to save the enrolled user to local store, I had a look at the saved credential object. seems like the the function does not persist data like enrollmentSecret, roles, affiliation to the persisted member credential object

clydedacruz (Mon, 27 Mar 2017 08:59:50 GMT):
is that the expected behavior ?

RezwanKabir (Mon, 27 Mar 2017 13:45:49 GMT):
In fabric-sdk-node\test\integration I didn't find any policy related code .. like this user of this org can have only 'reader/writer/admins' permission. Can anyone tell me where can I get an example

isramos (Mon, 27 Mar 2017 15:57:22 GMT):
rat

rameshthoomu (Mon, 27 Mar 2017 18:13:04 GMT):
@jimthematrix CI published node sdk API docs to https://fabric-sdk-node.github.io/

rameshthoomu (Mon, 27 Mar 2017 18:14:09 GMT):
CI publish API docs on every node-sdk merge commit

kletkeman (Mon, 27 Mar 2017 18:59:37 GMT):
@rameshthoomu forgive me for being dense ... what does "CI" stand for?

rameshthoomu (Mon, 27 Mar 2017 19:00:14 GMT):
oh I mean Jenkins

rameshthoomu (Mon, 27 Mar 2017 19:00:14 GMT):
oh I mean Jenkins jobs

rameshthoomu (Mon, 27 Mar 2017 19:00:35 GMT):
Continuous Integration

kletkeman (Mon, 27 Mar 2017 19:00:36 GMT):
ok ... so it is auto updated on every commit

rameshthoomu (Mon, 27 Mar 2017 19:00:50 GMT):
yes on every merge commit

kletkeman (Mon, 27 Mar 2017 19:01:12 GMT):
and presumably this is the official site and takes over from the jimthematrix.github.io site where this stuff was over the weekend

rameshthoomu (Mon, 27 Mar 2017 19:02:07 GMT):
yes

kletkeman (Mon, 27 Mar 2017 19:02:19 GMT):
thx

rjones (Mon, 27 Mar 2017 20:12:28 GMT):
Has joined the channel.

rjones (Mon, 27 Mar 2017 20:13:35 GMT):
@jimthematrix @rameshthoomu this is the kind of thing I was talking about. If you look here at the link to the log files: https://jenkins.hyperledger.org/job/fabric-sdk-node-verify-x86_64/736/ that link is broken because the user name is a protected string (it links to https://logs.hyperledger.org/jobbuilder/vex-yul-hyp-jenkins-1/********-verify-x86_64/736 which is invalid)

rjones (Mon, 27 Mar 2017 20:13:44 GMT):
there will be other things like this.

rjones (Mon, 27 Mar 2017 20:14:45 GMT):
for instance if you look at the log here: https://logs.hyperledger.org/jobbuilder/vex-yul-hyp-jenkins-1/fabric-sdk-node-verify-x86_64/736/console-timestamp.log.gz

jimthematrix (Mon, 27 Mar 2017 20:14:52 GMT):
ah I see, didn't realize the scope of the log masking

jimthematrix (Mon, 27 Mar 2017 20:15:10 GMT):
can that be updated to it doesn't mask the user name?

rjones (Mon, 27 Mar 2017 20:15:11 GMT):
the job names and repo names are all `********`

rjones (Mon, 27 Mar 2017 20:15:21 GMT):
not really?

jimthematrix (Mon, 27 Mar 2017 20:16:09 GMT):
"not really" as in this can't be done or this shouldn't be done?

rjones (Mon, 27 Mar 2017 20:16:22 GMT):
you could define the username in your build job, but that's brittle

jimthematrix (Mon, 27 Mar 2017 20:16:49 GMT):
why is username considered a sensitive information that needs masking...

rjones (Mon, 27 Mar 2017 20:17:06 GMT):
because it's store in the credential storage

rjones (Mon, 27 Mar 2017 20:17:06 GMT):
because it's stored in the credential storage

jimthematrix (Mon, 27 Mar 2017 20:17:36 GMT):
oh ok so that's all based on what's in the credential storage

rjones (Mon, 27 Mar 2017 20:18:39 GMT):
yes

jimthematrix (Mon, 27 Mar 2017 20:18:54 GMT):
guess then we'd have to find a different user name for publishing to github.io

rjones (Mon, 27 Mar 2017 20:19:25 GMT):
let me try something I'm not thrilled about

mastersingh24 (Mon, 27 Mar 2017 20:19:43 GMT):
we will allow it @rjones

jimthematrix (Mon, 27 Mar 2017 20:19:54 GMT):
guess another option is not put username for this publish in the credential storage

jimthematrix (Mon, 27 Mar 2017 20:20:04 GMT):
since it's not really gonna change, probably OK?

rjones (Mon, 27 Mar 2017 20:20:06 GMT):
which is what I just did

jimthematrix (Mon, 27 Mar 2017 20:20:43 GMT):
i'd propose we go with this if it works

rjones (Mon, 27 Mar 2017 20:20:51 GMT):
the downside is it is injected into every build's environment, not supplied on request if the job needs it.

rjones (Mon, 27 Mar 2017 20:21:20 GMT):
have you published to github.io yet?

jimthematrix (Mon, 27 Mar 2017 20:21:20 GMT):
it's really nice to have the symmetry: fabric-sdk-node.github.io, github.com/hyperledger/fabric-sdk-node

rjones (Mon, 27 Mar 2017 20:21:24 GMT):
via this process

jimthematrix (Mon, 27 Mar 2017 20:21:32 GMT):
yes it's been publishing

rameshthoomu (Mon, 27 Mar 2017 20:21:33 GMT):
yes

rameshthoomu (Mon, 27 Mar 2017 20:21:56 GMT):
Today morning it published docs to github.io

rjones (Mon, 27 Mar 2017 20:21:59 GMT):
yes, the symmetry is nice, but there's no reason the _username_ has to match the _repo_ name, is there?

jimthematrix (Mon, 27 Mar 2017 20:22:25 GMT):
for github.io to work, that actually is the requirement

jimthematrix (Mon, 27 Mar 2017 20:22:35 GMT):
"the _username_ has to match the _repo_ name"

rameshthoomu (Mon, 27 Mar 2017 20:22:46 GMT):
that's correct

rjones (Mon, 27 Mar 2017 20:22:53 GMT):
the requirement is that a user of that name has that repo, not that _that user_ is the user we push from

rjones (Mon, 27 Mar 2017 20:23:32 GMT):
unless the github.io repos don't allow you to give other people commit access

jimthematrix (Mon, 27 Mar 2017 20:23:36 GMT):
hmm, interesting, that may be the case, Ramesh can you investigate?

rjones (Mon, 27 Mar 2017 20:23:39 GMT):
in which case, I'm stumped

rameshthoomu (Mon, 27 Mar 2017 20:25:08 GMT):
That's a good point @ry.. will try that now..

rjones (Mon, 27 Mar 2017 20:29:05 GMT):
if it works make rjones-lf an owner of the repo and I'll add either add or create a CI account for it

divyank (Mon, 27 Mar 2017 20:59:08 GMT):
Is the createChannel() API expected to change?

divyank (Mon, 27 Mar 2017 21:01:33 GMT):
It currently takes in a marshalled envelope for channel configuration. How is a user expected to generate this?

farhan3 (Mon, 27 Mar 2017 21:33:22 GMT):
Has joined the channel.

mastersingh24 (Mon, 27 Mar 2017 21:34:24 GMT):
@divyank - right now you can create it using the configtxgen tool - I believe the docs will be updated shortly although you can find some details in the e2e_cli example README

farhan3 (Mon, 27 Mar 2017 21:36:03 GMT):
@mastersingh24 Hi - Quick question... is there some sample code for the node sdk that performs tasks similar to the e2e_cli example

kletkeman (Mon, 27 Mar 2017 21:39:10 GMT):
@mastersingh24 e2e_cli does not have a readme

kletkeman (Mon, 27 Mar 2017 21:39:47 GMT):
ah ... it has an rst in it ... that must be what you meant, thx

mastersingh24 (Mon, 27 Mar 2017 21:40:09 GMT):
yeah - although it does not really go into the details

kletkeman (Mon, 27 Mar 2017 21:40:12 GMT):
a rename would be good there

mastersingh24 (Mon, 27 Mar 2017 21:41:21 GMT):
https://github.com/hyperledger/fabric/blob/master/docs/source/configtxgen.rst

mastersingh24 (Mon, 27 Mar 2017 21:41:36 GMT):
that's a better resource

kletkeman (Mon, 27 Mar 2017 21:41:53 GMT):
it tells us enough about how to run the script ... but there are no details on what options we have for material ... best we can do is mimic what is in the example crypto

mastersingh24 (Mon, 27 Mar 2017 21:41:57 GMT):
should make it into readthedocs soon

mastersingh24 (Mon, 27 Mar 2017 21:43:23 GMT):
I also created https://github.com/hyperledger/fabric/tree/master/common/tools/cryptogen which you can use to create the MSP stuff for any number of organizations if you like

kletkeman (Mon, 27 Mar 2017 21:45:00 GMT):
does it take the same inputs as the script? the doc you mention above shows an object that appears to be an output but might be an input

mastersingh24 (Mon, 27 Mar 2017 21:49:06 GMT):
fabric/common/configtx/tool/configtx.yaml is the file you need to create / modify as input to configtxgen

JasonD (Tue, 28 Mar 2017 01:39:55 GMT):
anyone build up docker compose, include ca, orderer, 4 peers, cli? and deploy program using node sdk ? v1.0 alpha

JasonD (Tue, 28 Mar 2017 01:39:59 GMT):
and with couchdb ?

JasonD (Tue, 28 Mar 2017 03:26:42 GMT):
can I use fabric 1.0 alpha with node sdk master branch?

kletkeman (Tue, 28 Mar 2017 03:30:27 GMT):
@JasonD https://github.com/hyperledger/fabric-sdk-node/tree/master/test Docker compose is under fixtures, e2e.js is under integration

JasonD (Tue, 28 Mar 2017 05:15:54 GMT):
@kletkeman check this file, you only copy part of fabric-client to node_modules, for example, https://github.com/hyperledger/fabric-sdk-node/blob/master/test/unit/chain.js, this file `require('fabric-client/lib/Packager.js')`, and in the https://github.com/hyperledger/fabric-sdk-node/blob/master/build/tasks/ca.js, you don't copy Packager.js to node_modules, so it will get error

JasonD (Tue, 28 Mar 2017 05:16:36 GMT):
@kletkeman oh, sorry, are you one of the maintainers?

JasonD (Tue, 28 Mar 2017 06:05:28 GMT):
I docker compose this file, https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/docker-compose-marbles.yml, then run gulp ca, gulp test, but so many bugs. Maybe I should try v1.0 branch instead of master branch...

JasonD (Tue, 28 Mar 2017 06:08:29 GMT):
v1.0 alpha

JasonD (Tue, 28 Mar 2017 07:53:55 GMT):
check this file: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/install-chaincode.js

JasonD (Tue, 28 Mar 2017 07:54:08 GMT):
``` chain.addOrderer( new Orderer( ORGS.orderer.url, { 'pem': caroots, 'ssl-target-name-override': ORGS.orderer['server-hostname'] } ) ); ```

JasonD (Tue, 28 Mar 2017 07:54:23 GMT):
what does pem file for? provide this file to orderer so orderer can check if this addOrderer request is legal?

Vadim (Tue, 28 Mar 2017 07:55:10 GMT):
@JasonD it's for TLS encryption

JasonD (Tue, 28 Mar 2017 07:56:22 GMT):
thanks

ZionTam (Tue, 28 Mar 2017 08:15:19 GMT):
Has joined the channel.

PushpalathaHiremath (Tue, 28 Mar 2017 12:07:29 GMT):
Has joined the channel.

PushpalathaHiremath (Tue, 28 Mar 2017 12:07:47 GMT):
Can anyone please help me with this error: {"send_metadata":true,"send_message":true,"client_close":true,"metadata":{},"read":null,"status":{"code":2,"details":"Failed to deploy chaincode spec(Error creating image: %!s())","metadata":{"_internal_repr":{}}}}

kletkeman (Tue, 28 Mar 2017 13:21:39 GMT):
@JasonD No, I am but a lowly application / chaincode developer for IoT ... :-)

kletkeman (Tue, 28 Mar 2017 14:19:45 GMT):
@mastersingh24 @jimthematrix So as far as I can tell, the yaml file for configtxgen models the entire fabric. Is this mandatory? I am concerned for the practical scenario once we are developing against fabrics that we don't control, nor even understand. So as a client in an Org, I would perhaps be given an orderer address and a list of endorser request and event addresses (with ports of course), I would somehow acquire the certs for these peers, and my app could then talk to them (I think). But if I want to create channels, I have to run configtxgen and generate a genesis block and a tx envelope. The question there is whether I need to model the entire network in the yaml file, or whether just modeling what is in my purview is acceptable? And will we need to run configtxgen for every channel? Or just once and reuse the genesis block and tx envelope for all channel creations? Thx.

kletkeman (Tue, 28 Mar 2017 14:24:16 GMT):
@mastersingh24 @jimthematrix Could this yaml file not be used directly for channel creation? I.e. that info is consumed in the application space by the configtxgen app ... instead, why would we not send the info as a JSON object and have that info converted to the genesis block and the tx envelope on the other end, alleviating this complexity entirely?

jimthematrix (Tue, 28 Mar 2017 14:39:30 GMT):
@kletkeman my understanding is that for running configtxgen the yaml only needs to specify the subset of peer orgs involved in the channel, plus all the orderer orgs

jimthematrix (Tue, 28 Mar 2017 14:40:13 GMT):
that's how it should be anyway (haven't dived in the code to see if that's indeed the case)

kletkeman (Tue, 28 Mar 2017 14:40:17 GMT):
Thanks, that makes sense .... now if only the app did not have to keep a copy of configtxgen in its working folders

jimthematrix (Tue, 28 Mar 2017 14:41:37 GMT):
right, @mastersingh24 was working on integrating that into the sdk (or something like that) so you don't need to get that separate binary dependency

jimthematrix (Tue, 28 Mar 2017 14:42:59 GMT):
in fact at one point @bretharrison was doing this in the sdk but wasn't using the yaml file as input. it makes sense to use that as the input to a new API in the sdk

kletkeman (Tue, 28 Mar 2017 14:44:06 GMT):
I am a fan of staying in human readable form as long as possible ... system level conversions to binary should not really be part of the sdk ... but I understand that policy is to push everything into the client these days

kletkeman (Tue, 28 Mar 2017 14:45:59 GMT):
also, if we used JSON instead of yaml, we would not need tools like js-yaml or whatever and could just do 'require' ...

kletkeman (Tue, 28 Mar 2017 14:46:47 GMT):
but I suppose that the configtxgen program will read yaml directly and spit out binary files ... this is all pretty complex by comparison to firing off a JSON object ...

kletkeman (Tue, 28 Mar 2017 14:47:24 GMT):
anyway, thanks ... so for now we just run everything manually ... or leave channel creation to admins with cli ...

rameshthoomu (Tue, 28 Mar 2017 15:09:03 GMT):
@PushpalathaHiremath seems your environment is missing hyperledger/fabric-ccenv docker images

rameshthoomu (Tue, 28 Mar 2017 15:09:41 GMT):
Could you please check this

kletkeman (Tue, 28 Mar 2017 16:09:27 GMT):
Sorry ... had these in the wrong channel ... @jimthematrix I just thought of something ... if I want to add a newly added peer to a channel, can I even do that? Meaning that the genesis block did not know about that peer, and neither does my tx config envelope ... Were I to update the YAML file and regenerate the genesis block and envelope, would I be able to do something with that to upgrade the channel? kletkeman 12:02 PM @jimthematrix Another question ... since the cli does not appear to need the YAML file, nor do we have to run configtxgen to use the cli, why does the SDK require all this overhead to create channels?

bkvellanki (Tue, 28 Mar 2017 17:21:17 GMT):
info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":7054} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/bvellanki/.hfc-key-store"}} [2017-03-28 12:20:19.494] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: Parse Error] at ClientRequest. (/Users/bvellanki/install/workspace/node-workspace/vellanki-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:568:12)

bkvellanki (Tue, 28 Mar 2017 17:23:00 GMT):
@here when i execute the examples from test/integration the tests work fine. But when I try to create the channel, I get this error/...Any inputs..I use the same code from examples

bobbiejc (Tue, 28 Mar 2017 17:43:17 GMT):
@bkvellanki Can you give a bit more context for above?

bkvellanki (Tue, 28 Mar 2017 17:53:18 GMT):
Sure. In this case, I am trying to create a channel using the basic configuration from the test examples. The only change here is that I am using my own create channel script. I use the same admin creds for creating the channel. The first issue is the path to hfc-key-store, I tried to set that to different directory, but it still picks up the .hfc_key_store under home directory. Second issue : I get the above error when I try to make a call to create channel using the end point. We can clearly see the endpoint above.

bkvellanki (Tue, 28 Mar 2017 17:56:08 GMT):
Here is the config ..

bkvellanki (Tue, 28 Mar 2017 17:56:11 GMT):
{ "network-config": { "orderer": { "url": "grpcs://localhost:7050", "server-hostname": "orderer0", "tls_cacerts": "./config/tls/orderer/ca-cert.pem" }, "org1": { "name": "peerOrg1", "mspid": "Org1MSP", "ca": "http://localhost:7054", "peer1": { "requests": "grpcs://localhost:7051", "events": "grpcs://localhost:7053", "server-hostname": "peer0", "tls_cacerts": "./config/tls/peers/peer0/ca-cert.pem" }, "peer2": { "requests": "grpcs://localhost:7056", "events": "grpcs://localhost:7058", "server-hostname": "peer1", "tls_cacerts": "./config/tls/peers/peer1/ca-cert.pem" } }, "org2": { "name": "peerOrg2", "mspid": "Org2MSP", "ca": "http://localhost:8054", "peer1": { "requests": "grpcs://localhost:8051", "events": "grpcs://localhost:8053", "server-hostname": "peer2", "tls_cacerts": "./config/tls/peers/peer2/ca-cert.pem" }, "peer2": { "requests": "grpcs://localhost:8056", "events": "grpcs://localhost:8058", "server-hostname": "peer3", "tls_cacerts": "./config/tls/peers/peer3/ca-cert.pem" } } } }

jimthematrix (Tue, 28 Mar 2017 20:22:37 GMT):
@bkvellanki i'm pretty sure the fabric-ca images are now enabled with tls by default

jimthematrix (Tue, 28 Mar 2017 20:23:26 GMT):
however you are referring to them with http://. check out the latest sdk test code that talks to fabric-ca over https

rslu2000 (Wed, 29 Mar 2017 01:53:58 GMT):
Has joined the channel.

ZionTam (Wed, 29 Mar 2017 07:36:43 GMT):
anyone can run fabric-sdk-node test? as the official docs,got errors ``` Error: Cannot find module './api.js' ``` after check the code `fabric-ca-client/lib/FabricCAC lientImpl.js` found line 19 `var api = require('./api.js');` but no api.js indeed,can anyone explain why?thanks

ZionTam (Wed, 29 Mar 2017 07:36:43 GMT):
anyone can run fabric-sdk-node test? as the official docs,got errors ``` Error: Cannot find module './api.js' ``` after check the code `fabric-ca-client/lib/FabricCAClientImpl.js` found line 19 `var api = require('./api.js');` but no api.js indeed,can anyone explain why?thanks

JasonD (Wed, 29 Mar 2017 07:51:02 GMT):
run `gulp ca`

JasonD (Wed, 29 Mar 2017 07:51:09 GMT):
@ZionTam

JasonD (Wed, 29 Mar 2017 07:51:41 GMT):
this script will copy specific files from fabric-client to fabric-ca-client

JasonD (Wed, 29 Mar 2017 07:51:48 GMT):
include api.js

JasonD (Wed, 29 Mar 2017 08:21:09 GMT):
can anyone explain this method `sendDeliver(envelope)` ? and if response.type equals NOT FOUND, what does it mean?

JasonD (Wed, 29 Mar 2017 08:21:12 GMT):
in this file: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Orderer.js

JasonD (Wed, 29 Mar 2017 08:21:41 GMT):
sorry, response.status equals NOT FOUND

xuzhao103389 (Wed, 29 Mar 2017 09:11:39 GMT):
I am using node-sdk on Vagrant

xuzhao103389 (Wed, 29 Mar 2017 09:11:52 GMT):
but "npm install" failed

xuzhao103389 (Wed, 29 Mar 2017 09:14:20 GMT):
vagrant@hyperledger-devenv:v0.3.0-51b7e85:/opt/gopath/src/github.com/hyperledger/fabric-sdk-node$ npm -v 3.10.10 vagrant@hyperledger-devenv:v0.3.0-51b7e85:/opt/gopath/src/github.com/hyperledger/fabric-sdk-node$ node -v v6.9.4 vagrant@hyperledger-devenv:v0.3.0-51b7e85:/opt/gopath/src/github.com/hyperl

xuzhao103389 (Wed, 29 Mar 2017 09:14:24 GMT):
the error is

xuzhao103389 (Wed, 29 Mar 2017 09:14:37 GMT):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! Linux 4.4.0-59-generic npm ERR! argv "/home/vagrant/.nvm/versions/node/v6.9.4/bin/node" "/home/vagrant/.nvm/versions/node/v6.9.4/bin/npm" "install" npm ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! path /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/node_modules/node-pre-gyp/node_modules/mkdirp/bin/cmd.js npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall chmod npm ERR! enoent ENOENT: no such file or directory, chmod '/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/node_modules/node-pre-gyp/node_modules/mkdirp/bin/cmd.js' npm ERR! enoent ENOENT: no such file or directory, chmod '/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/node_modules/node-pre-gyp/node_modules/mkdirp/bin/cmd.js' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/npm-debug.log

mastersingh24 (Wed, 29 Mar 2017 11:03:13 GMT):
[ it means the channel does not exist](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=R9dSxtnuPAe7Kn7eH) @JasonD

jimthematrix (Wed, 29 Mar 2017 12:57:51 GMT):
@xuzhao103389 so far nobody as far as i'm aware has been able to get node sdk working in vagrant, but we also haven't really tried

kletkeman (Wed, 29 Mar 2017 13:42:24 GMT):
@jimthematrix There is probably some confusion where the node sdk's dislike of vagrant is concerned, because -- as one example -- the e2e_cli document contains these lines: #Run the end-to-end test manually with Docker From your vagrant environment exit the currently running containers: docker rm -f $(docker ps -aq) So most instructions are written from the vagrant perspective. And while it is true that this example is CLI oriented and does not mention the SDK, it is also true that most of the instructions written so far are that way, and they mostly assume vagrant. And it is further true that the CLI is still by far the easiest way to get setup to try to get invokes and queries running. So the conflict between instruction sets just adds to the confusion.

davidkel (Wed, 29 Mar 2017 22:07:09 GMT):
@jimthematrix @xuzhao103389 if you are trying to use a xenial (16.04) vagrant box then you will have to install python 2 and ensure python cmd is linked to the python 2 version. node-gyp requires python 2 to work. You can so this easily in your vagrant box by typing `sudo apt-get install -y python-minimal` this could be the cause of the problem being seen

davidkel (Wed, 29 Mar 2017 22:07:09 GMT):
@jimthematrix @xuzhao103389 if you are trying to use a xenial (16.04) vagrant box then you will have to install python 2 and ensure python cmd is linked to the python 2 version. node-gyp requires python 2 to work. You can do this easily in your vagrant box by typing `sudo apt-get install -y python-minimal` this could be the cause of the problem being seen

kraemer (Wed, 29 Mar 2017 22:25:50 GMT):
Has joined the channel.

kraemer (Wed, 29 Mar 2017 22:34:42 GMT):
When using a custom key value store for the user enrollment the User.js tries to stringify the KVSImplClass in this._kvsCryptoOpts, which of course does not work - a function cannot be stringified. This results in an error when retrieving the private key, because KVSImplClass is not set and it tries to read from the default FileKeyValueStore. I also opened a bug for that: https://jira.hyperledger.org/browse/FAB-2923

jimthematrix (Wed, 29 Mar 2017 23:52:05 GMT):
@davidkel thanks for the tip. @xuzhao103389 can you let us know if that got your past the error? this could be useful to all

jimthematrix (Thu, 30 Mar 2017 00:00:33 GMT):
@kraemer ah yes makes sense, i'll fix it and adding a test to load the user back from kvstore

kraemer (Thu, 30 Mar 2017 00:01:39 GMT):
@jimthematrix it would also be great to have a consistent way to set the state store in diffenrent classes

jimthematrix (Thu, 30 Mar 2017 00:04:02 GMT):
note that the KVSImplClass is not for the state store, but for the crypto key store to save/load the private keys, it's the underlying kvstore used by the CryptoKeyStore class

kraemer (Thu, 30 Mar 2017 00:10:51 GMT):
OK, thats true, but I think for users it might be confusing if for one kind of store they have to pass an instance and for the other they just pass the class and it is instantiated by the CryptoKeyStore

MatsUy (Thu, 30 Mar 2017 09:06:18 GMT):
Has joined the channel.

xuzhao103389 (Thu, 30 Mar 2017 09:29:44 GMT):
@davidkel I get rid of the error: I have a physical machine, I can do npm install on the physical machine, and then I copied the node_module dir to the vagrant, then all passed

xuzhao103389 (Thu, 30 Mar 2017 09:31:10 GMT):
and vagrant@hyperledger-devenv:v0.3.0-51b7e85:/opt/gopath/src/github.com/hyperledger$ sudo apt-get install -y python-minimal Reading package lists... Done Building dependency tree Reading state information... Done python-minimal is already the newest version (2.7.11-1). python-minimal set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 99 not upgraded.

xuzhao103389 (Thu, 30 Mar 2017 09:31:51 GMT):
my vagrant problem is not related to `sudo apt-get install -y python-minimal`, I still hit the npm issue

davidkel (Thu, 30 Mar 2017 09:43:34 GMT):
@xuzhao103389 other problems I have had with node in a vagrant box is if I am using synced folders where the source exists on the host and I have used sync folders to expose it in the vagrant box and then tried to do node install on the vagrant box. But that doesn't sound like your scenario

xuzhao103389 (Thu, 30 Mar 2017 09:46:30 GMT):
@davidkel after I copied the folders to vagrant, then I do not do "npm install"

xuzhao103389 (Thu, 30 Mar 2017 09:46:49 GMT):
I start to run the test cases without error

xuzhao103389 (Thu, 30 Mar 2017 09:48:00 GMT):
I have some finding for the nodejs test cases: 1 test/integration/fabric-ca-services-tests.js is not repeatable, if I run it more than once, I got error, "user XXX already enrolled"

xuzhao103389 (Thu, 30 Mar 2017 09:48:51 GMT):
2 rm -rf /tmp/hfc-* cant delete all the hfc-* folders , i have to manually remove then hfc-* folders under /tmp dir

bh4rtp (Thu, 30 Mar 2017 09:58:14 GMT):
@jimthematrix hi, gulp test run failed. would you please give me some advice?

bh4rtp (Thu, 30 Mar 2017 09:58:14 GMT):
@jimthematrix hi, gulp test runs failed. would you please give me some advice?

bh4rtp (Thu, 30 Mar 2017 09:58:18 GMT):
info: Returning a new winston logger with default configurations info: [cloudant-fabricca]: cloudant Key Value Store = fabric-client/lib/impl/CouchDBKeyValueStore.js info: [couchdb-fabricca]: couchdb Key Value Store = fabric-client/lib/impl/CouchDBKeyValueStore.js info: [couchdb-fabricca]: couch keyValStorePath: http://localhost:5984 events.js:160 throw er; // Unhandled 'error' event ^ TypeError: client.newOrderer is not a function at Object. (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/events.js:48:9) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Object.Module._extensions.(anonymous function) [as .js] (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/istanbul/lib/hook.js:109:37) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at module.exports (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/require-uncached/index.js:28:9) at /home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/gulp-tape/index.js:36:9 at Array.forEach (native) at DestroyableTransform.flush [as _flush] (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/gulp-tape/index.js:35:13) at DestroyableTransform. (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:115:49) at DestroyableTransform.g (events.js:291:16) at emitNone (events.js:86:13) at DestroyableTransform.emit (events.js:185:7)

bh4rtp (Thu, 30 Mar 2017 10:21:35 GMT):
i use the latest fabric built by myself.

xuzhao103389 (Thu, 30 Mar 2017 11:20:26 GMT):
if I re-run test/integration/fabric-ca-services-tests.js , I got errors like : not ok 6 Error: fabric-ca request register failed with errors [[{"code":0,"message":"User 'testUserX' is already registered"}]] at IncomingMessage. (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:450:22) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) --- operator: fail at: caService.enroll.then.then.then.then.then.then.then (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/fabric-ca-services-tests.js:146:6)

sitomani (Thu, 30 Mar 2017 11:39:16 GMT):
Has joined the channel.

mastersingh24 (Thu, 30 Mar 2017 12:11:11 GMT):
@bh4rtp - did you run `gulp ca` before running the tests?

mastersingh24 (Thu, 30 Mar 2017 12:12:42 GMT):
@xuzhao103389 - that's expected as the default for fabric-ca is that a user can only enroll once. so if you want to re-run the tests you need to bring down and back up the compose setup

xuzhao103389 (Thu, 30 Mar 2017 12:19:04 GMT):
@mastersingh24 I stop the network , and then I do Clear out your previous key value stores that may have cached user enrollment certificates (rm -rf /tmp/hfc-*, rm -rf ~/.hfc-key-store, rm $GOPATH/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/fabricca/tlsOrg1/fabric-ca-server.db, rm $GOPATH/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/fabricca/tlsOrg2/fabric-ca-server.db)

xuzhao103389 (Thu, 30 Mar 2017 12:19:29 GMT):
after that I re-run docker-compose up --force-recreate to launch the network

xuzhao103389 (Thu, 30 Mar 2017 12:19:49 GMT):
and then do "node test/integration/fabric-ca-services-tests.js"

xuzhao103389 (Thu, 30 Mar 2017 12:20:01 GMT):
and then hit those errors

xuzhao103389 (Thu, 30 Mar 2017 12:20:09 GMT):
1..13 # tests 13 # pass 6 # fail 7

bh4rtp (Thu, 30 Mar 2017 13:00:55 GMT):
@mastersingh24 yes, you are right. now 36 test, 27 pass, 9 fail.

simsc (Thu, 30 Mar 2017 16:19:34 GMT):
Has joined the channel.

jimthematrix (Thu, 30 Mar 2017 17:58:07 GMT):
@bh4rtp there have been code refactoring in the past couple of days, you should delete node_modules and re-install npm modules, also make sure to run `gulp ca` after npm install

scottz (Thu, 30 Mar 2017 20:41:34 GMT):
Has joined the channel.

bkvellanki (Thu, 30 Mar 2017 22:38:55 GMT):
@jimthematrix I just did that I still have the problem..running e2e.js

bkvellanki (Thu, 30 Mar 2017 22:39:17 GMT):
here is the issue -debug: [Client.js]: saveUserToStateStore, begin promise stateStore.setValue debug: [ecdsa/key.js]: ECDSA curve param X: bbb0093aea98f1425542c5b66e10feb988872b77320bbc61335fe62692667882 debug: [ecdsa/key.js]: ECDSA curve param Y: 92364d7b7dbc0dff8ad2ecf72ad066684549f4ebd4f0bbfd53ebd3810e15b5aa debug: [FileKeyValueStore.js]: FileKeyValueStore -- setValue debug: [Client.js]: saveUserToStateStore, store.setValue, result = {"name":"admin","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"7d08e3f8f9074871d30818093f4128caba26176e2910909e77a42b290fcbff14","identity":{"id":"testIdentity","certificate":"-----BEGIN CERTIFICATE-----\nMIIB3jCCAYSgAwIBAgIUPu9lBOjNR2NvPVjDbkYy5tIvF6gwCgYIKoZIzj0EAwIw\nYDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh\nbiBGcmFuY2lzY28xETAPBgNVBAoTCHBlZXJPcmcxMREwDwYDVQQDEwhwZWVyT3Jn\nMTAeFw0xNzAzMzAyMjMyMDBaFw0xODAyMjcwNjMyMDBaMBAxDjAMBgNVBAMTBWFk\nbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEu7AJOuqY8UJVQsW2bhD+uYiH\nK3cyC7xhM1/mJpJmeIKSNk17fbwN/4rS7Pcq0GZoRUn069Twu/1T69OBDhW1qqNs\nMGowDgYDVR0PAQH/BAQDAgIEMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKO83qMm\nWUYmOLJlYMZosDFV1Ey2MCsGA1UdIwQkMCKAINils8rBuCH25LSHzq8f0jnNz8MQ\niUFQkIuQ8F6ReVVqMAoGCCqGSM49BAMCA0gAMEUCIQDmw0jpVbpK7bg82mLtlyOH\nR5BGQtD6MO17aXOh5Nz24AIgW5zQUYYJGJkNChukk0RmGSYLDjfBVeRK1OrfFOtp\nuOo=\n-----END CERTIFICATE-----\n"}}} ok 21 Successfully loaded member from persistence ok 22 Successfully enrolled user 'admin' debug: [Chain.js]: getChannelConfig - start for channel mychannel debug: [Chain.js]: buildTransactionID - start debug: [Chain.js]: buildTransactionID - transaction_id 86cb5e5e6b0c35a57b553c3956dfad30a8ff036a36224fa823fd322be319180f debug: [Chain.js]: buildChannelHeader - type 5 chain_id mychannel tx_id NaN epoch % chaincode_id undefined debug: [Chain.js]: buildCurrentTimestamp - building debug: [crypto_ecdsa_aes]: ecdsa signature: negative=0, words=[45881585, 4117818, 63713750, 21561061, 13301346, 50570224, 61806462, 8211307, 38291326, 215193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, negative=0, words=[38487596, 36775694, 12067177, 8481806, 23842111, 62913715, 40683193, 43643908, 60215180, 43203], length=10, red=null, recoveryParam=1 debug: [Orderer.js]: sendDeliver - start debug: [Orderer.js]: sendDeliver - sent envelope debug: [Orderer.js]: sendDeliver - on data error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND error: [Chain.js]: getChannelConfig - Failed Proposal. Error: Error: Invalid results returned ::NOT_FOUND at ClientDuplexStream. (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:197:22) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:245:14) error: [Chain.js]: Error: Invalid results returned ::NOT_FOUND at ClientDuplexStream. (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:197:22) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:245:14) not ok 23 Failed to initialize the chain

bkvellanki (Thu, 30 Mar 2017 22:39:31 GMT):
ot ok 34 checking query results are correct that user b has 300 now after the move --- operator: equal expected: |- '300' actual: |- 'Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown' at: hfc.newDefaultKeyValueStore.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/query.js:104:7) ... not ok 35 checking query results are correct that user b has 300 now after the move --- operator: equal expected: |- '300' actual: |- 'Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown' at: hfc.newDefaultKeyValueStore.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/query.js:104:7) ... 1..35 # tests 35 # pass 22 # fail 13

bkvellanki (Thu, 30 Mar 2017 22:42:59 GMT):
@jimthematrix @mastersingh24 I just the steps following the steps.. Also there is also an error in the fixtures docker-compose.yml --> couchdb --> it is loading the image from hyperledger/fabric-couchdb..The image manifest was not found..So, it corrected it to just couchdb and it brings the peers and couch up..Please correct that as well

bh4rtp (Fri, 31 Mar 2017 03:38:27 GMT):
Hi, to run gulp test, need i launch fabric network using docker-compose? or does gulp test start the needed network automatically by itself?

jimthematrix (Fri, 31 Mar 2017 04:29:55 GMT):
@bkvellanki the "NOT_FOUND" error was on the getChannelConfig() so I would guess the create channel step had error

jimthematrix (Fri, 31 Mar 2017 04:31:01 GMT):
also the change to fabric-couchdb was intentional (so it'll work on s390 architecture) but i neglected to update the README: you need to run `make couchdb` in fabric in addition to `make docker`

jimthematrix (Fri, 31 Mar 2017 04:32:22 GMT):
@bh4rtp you need to launch the network using docker-compose manually, as described in the README

bkvellanki (Fri, 31 Mar 2017 04:32:35 GMT):
@jimthematrix ok.. But I just took the pristine sdk and it threw me these errors

bkvellanki (Fri, 31 Mar 2017 04:40:38 GMT):
Thanks will do and try

fennelD7 (Fri, 31 Mar 2017 06:09:39 GMT):
Has joined the channel.

bh4rtp (Fri, 31 Mar 2017 06:37:49 GMT):
@jimthematrix All tests passed except gulp test. Thanks.

fennelD7 (Fri, 31 Mar 2017 06:46:13 GMT):
Have anyone encountered these errors in `gulp test` and `node ./test/integration/e2e.js` and can give me some advices?

fennelD7 (Fri, 31 Mar 2017 06:46:13 GMT):
Have anyone encountered these errors in `gulp test` and `node ./test/integration/e2e.js` and can give me some advices?

fennelD7 (Fri, 31 Mar 2017 06:46:32 GMT):
```# gulp test [14:34:12] Using gulpfile /opt/fabric-sdk-node/gulpfile.js [14:34:12] Starting 'lint'... [14:34:12] Starting 'pre-test'... [14:34:16] Finished 'pre-test' after 3.89 s [14:34:18] Finished 'lint' after 5.48 s [14:34:18] Starting 'test'... info: Returning a new winston logger with default configurations events.js:160 throw er; // Unhandled 'error' event ^ Error: Cannot find module './build/Release/pkcs11.node' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/opt/fabric-sdk-node/node_modules/pkcs11js/index.js:1:80) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Object.Module._extensions.(anonymous function) [as .js] (/opt/fabric-sdk-node/node_modules/istanbul/lib/hook.js:109:37) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/opt/fabric-sdk-node/node_modules/fabric-client/lib/impl/bccsp_pkcs11.js:9:648) at Module._compile (module.js:570:32) at Object.Module._extensions.(anonymous function) [as .js] (/opt/fabric-sdk-node/node_modules/istanbul/lib/hook.js:107:24)```

fennelD7 (Fri, 31 Mar 2017 06:46:51 GMT):
```#node e2e ... ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' debug: [Client.js]: createChannel - start debug: [Client.js]: createChannel - about to send envelope debug: [Orderer.js]: sendBroadcast - start debug: [Orderer.js]: sendBroadcast - sent message node: symbol lookup error: /opt/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/grpc_node.node: undefined symbol: SSL_CTX_set_alpn_protos ...```

fennelD7 (Fri, 31 Mar 2017 06:48:32 GMT):
I'm using `nodejs v6.9.4` and all images are `x86_64-1.0.0-alpha`

JasonD (Fri, 31 Mar 2017 08:09:46 GMT):
I'm running e2e integration, and when I run `node install-chaincode.js`, everything is fine, but then i run `node instantiate-chaincode.js `, get this error `error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND`

JasonD (Fri, 31 Mar 2017 09:17:11 GMT):
how to fix this? source code is here, never changed: https://github.com/hyperledger/fabric-sdk-node/tree/master/test/integration

JasonD (Fri, 31 Mar 2017 09:17:23 GMT):
https://github.com/hyperledger/fabric-sdk-node/tree/master/test/integration/e2e

JasonD (Fri, 31 Mar 2017 09:21:53 GMT):
@jimthematrix

JasonD (Fri, 31 Mar 2017 10:17:02 GMT):
maybe that's master branch's problem, gonna try v1.0

mastersingh24 (Fri, 31 Mar 2017 12:19:59 GMT):
[ I assume this is after you've run `npm install` ? did you get any errors running `npm install`](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=n9QXxgLxuwYMsraHs) @fennelD7

bkvellanki (Fri, 31 Mar 2017 12:40:02 GMT):
@mastersingh24 @fennelD7 @JasonD I got the errors last night when I tried to run e2e. Yes that is after we run all including npm install. Jason what are the results of v1.0.

kletkeman (Fri, 31 Mar 2017 15:00:10 GMT):
@here So I performed a docker compose up on a freshly built fabric using the integration test folder under the node sdk project, and couchdb is now whinging about some kind of shards issue: couchdb | [error] 2017-03-31T14:58:25.740134Z nonode@nohost emulator -------- Error in process <0.939.0> with exit value: couchdb | {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]} couchdb | p Anyone know whether this actually matters? Is there a fix today, as in do I have to rebuild the world again?

kletkeman (Fri, 31 Mar 2017 15:03:32 GMT):
there is no commit for this, so perhaps I can do something about it or ignore it?

mastersingh24 (Fri, 31 Mar 2017 15:04:00 GMT):
are you guys all spinning things up with this compose file: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/docker-compose.yaml

mastersingh24 (Fri, 31 Mar 2017 15:04:17 GMT):
I just ran the fabric-ca tests against it without any issues

kletkeman (Fri, 31 Mar 2017 15:04:19 GMT):
yes

kletkeman (Fri, 31 Mar 2017 15:04:31 GMT):
does yours spit counchdb errors?

kletkeman (Fri, 31 Mar 2017 15:04:31 GMT):
does yours spit couchdb errors?

mastersingh24 (Fri, 31 Mar 2017 15:05:29 GMT):
I did not see any - but was not really looking for them. I saw those errors before when running a stand-alone couch container - but not sure if I've seen them again

mastersingh24 (Fri, 31 Mar 2017 15:06:55 GMT):
@kletkeman - just started the couch container and I do still see those errors - although does not seem to affect anything

bkvellanki (Fri, 31 Mar 2017 15:07:34 GMT):
https://github.com/hyperledger/fabric-sdk-node/tree/master/test/fixtures

bkvellanki (Fri, 31 Mar 2017 15:07:55 GMT):
@mastersingh24 I am pulling it from there

bkvellanki (Fri, 31 Mar 2017 15:08:08 GMT):
I mean the above link

kletkeman (Fri, 31 Mar 2017 15:14:34 GMT):
@mastersingh24 Thanks very much Gari, I will proceed then with the e2e tests.

Asara (Fri, 31 Mar 2017 15:18:36 GMT):
Hey guys, is there a way to 'expire' or delete a user from member services in 0.6 using the sdk?

mastersingh24 (Fri, 31 Mar 2017 15:21:20 GMT):
@Asara - basically no

bkvellanki (Fri, 31 Mar 2017 16:16:17 GMT):
@mastersingh24 I am having the same issue still - I think in the one of the e2e.js, the path of the mychanel.tx is messed up

bkvellanki (Fri, 31 Mar 2017 16:16:18 GMT):
debug: [Client.js]: saveUserToStateStore, store.setValue, result = {"name":"admin","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"51b184cbaa1b397609a72fae62689c3544424bcba7c8ceebc5927ea84629db7e","identity":{"id":"testIdentity","certificate":"-----BEGIN CERTIFICATE-----\nMIIB3TCCAYSgAwIBAgIUH0oQvfFg/2mCdACKvIxaFQ0fMV0wCgYIKoZIzj0EAwIw\nYDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh\nbiBGcmFuY2lzY28xETAPBgNVBAoTCHBlZXJPcmcxMREwDwYDVQQDEwhwZWVyT3Jn\nMTAeFw0xNzAzMzExNTM0MDBaFw0xODAyMjcyMzM0MDBaMBAxDjAMBgNVBAMTBWFk\nbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmCN9G1dTvQmOTDcHl2BkFTQY\nTFRhTt9nVHALw8PfwUOrZvLg1Jy0p0w8AeLTjHV/+l6XQFEZQmqE8amGs66OXqNs\nMGowDgYDVR0PAQH/BAQDAgIEMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFOxShojD\nrB9tGKFGKlsf0TCIROmDMCsGA1UdIwQkMCKAINils8rBuCH25LSHzq8f0jnNz8MQ\niUFQkIuQ8F6ReVVqMAoGCCqGSM49BAMCA0cAMEQCIDlE1NzndHLbtRwHkzZIIc3o\no/2mRLeTN1gY2AkVSvSqAiApmE75blOjtNaVsLDswzMbU2D8oRzOZ7DgIXiTFFdd\nTQ==\n-----END CERTIFICATE-----\n"}}} ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' not ok 3 Error: ENOENT: no such file or directory, open './test/fixtures/channel/mychannel.tx' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at hfc.newDefaultKeyValueStore.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:74:13) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:106:5) ...

barath (Fri, 31 Mar 2017 18:39:00 GMT):
Has joined the channel.

jimthematrix (Fri, 31 Mar 2017 20:12:44 GMT):
@bkvellanki please try running the test from the fabric-sdk-node project root folder. the path handling in the test code may not be robust enough to run from other locations

bkvellanki (Fri, 31 Mar 2017 20:13:01 GMT):
ok got it figured out

bkvellanki (Fri, 31 Mar 2017 20:13:05 GMT):
thanks

bkvellanki (Fri, 31 Mar 2017 20:15:08 GMT):
thank you very much jim

pd93 (Fri, 31 Mar 2017 20:43:42 GMT):
What's the best way of checking if the network is running? If I try to run my app when the network is not up, I get `events.js:160 throw er; // Unhandled 'error' event` when it tries to create the key/val store and I can't seem to catch the error

yacovm (Fri, 31 Mar 2017 21:00:17 GMT):
probe the port?

pd93 (Fri, 31 Mar 2017 21:01:40 GMT):
Yeah that'd work. It'd be nice if there was a connection test for the peer/orderer/ca etc that I could run from the sdk.

JasonD (Sat, 01 Apr 2017 00:55:02 GMT):
@bkvellanki v1.0 has other errors

JasonD (Sat, 01 Apr 2017 01:35:38 GMT):
this is weird, I check the source code: https://github.com/hyperledger/fabric-sdk-node/blob/v1.0-alpha/fabric-client/lib/Chain.js, v1.0.0-alpha do have this method `sendDeploymentProposal`, but in my project, npm dependencies is `"fabric-client": "^1.0.0-alpha",`, but I cannot find this method

JasonD (Sat, 01 Apr 2017 01:42:46 GMT):
anyone can install and instantiate successfully using v1.0 alpha ?

JasonD (Sat, 01 Apr 2017 02:46:55 GMT):
so many bugs

fennelD7 (Sat, 01 Apr 2017 03:38:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xZZ7RKNSuJxgAqEYL) @mastersingh24

fennelD7 (Sat, 01 Apr 2017 03:38:16 GMT):
Hello mastersingh24. Yes, I've done `npm install` before running the tests. Succeeded with two warnings, saying that in centos some packages are not needed, may be this error is with linux versions.

JasonD (Sat, 01 Apr 2017 03:54:47 GMT):
after install cc, and did success. then `chain.initialize()`, get this error: `[Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND`

JasonD (Sat, 01 Apr 2017 04:01:18 GMT):
so this is v1.0 alpha https://github.com/hyperledger/fabric-sdk-node/tree/v1.0-alpha, but it's not the same with v1.0 alpha from npm, why ???

JasonD (Sat, 01 Apr 2017 04:44:30 GMT):
turns out v1.0.0 is not v1.0

mastersingh24 (Sat, 01 Apr 2017 10:59:02 GMT):
[ v1.0-alpha really should have been "hackfest"](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7Y5Xok96TBmnnaqja) @JasonD

jimthematrix (Mon, 03 Apr 2017 03:15:22 GMT):
@JasonD thanks for reporting this, this is unexpected: the v1.0-alpha branch has already been deleted from gerrit but for some reason the deletion was not replicated to github. I have not noticed this until now. @rjones any advice on this issue?

jimthematrix (Mon, 03 Apr 2017 03:15:22 GMT):
@JasonD thanks for reporting this, this is unexpected: the v1.0-alpha has already been deleted from gerrit but for some reason the deletion was not replicated to github. I have not noticed this until now. @rjones any comment about this issue?

jimthematrix (Mon, 03 Apr 2017 03:15:22 GMT):
@JasonD thanks for reporting this, this is unexpected: the v1.0-alpha branch has already been deleted from gerrit but for some reason the deletion was not replicated to github. I have not noticed this until now. @rjones any comment about this issue?

jimthematrix (Mon, 03 Apr 2017 03:18:14 GMT):
the `v1.0-alpha` branch was deleted as part of releasing the v1.0.0-alpha tag exactly so that there won't be confusion, but i totally didn't expect that the deletion would fail to replicate from gerrit to github

rjones (Mon, 03 Apr 2017 03:20:54 GMT):
no idea. In general deleting branches is a bad idea

jimthematrix (Mon, 03 Apr 2017 03:23:05 GMT):
https://chat.hyperledger.org/channel/fabric-maintainers?msg=qZjwpT3PGCbLh2cbt

jimthematrix (Mon, 03 Apr 2017 03:23:05 GMT):
https://chat.hyperledger.org/channel/fabric-maintainers?msg=CinTf9A8GxfnpZszN

jimthematrix (Mon, 03 Apr 2017 03:24:40 GMT):
@rjones understood, that branch has really no use (nothing was published from it), anyway to delete that from github?

rjones (Mon, 03 Apr 2017 03:26:59 GMT):
the github UI says it's 8 commits ahead of master

AbhilekhSingh (Mon, 03 Apr 2017 06:42:10 GMT):
Hi, I'm trying t install chaincode using this node test/integration/e2e/install-chaincode.js

AbhilekhSingh (Mon, 03 Apr 2017 06:42:48 GMT):
My chaincode requires some packages which I have added in vendor folder inside chaincode folder

AbhilekhSingh (Mon, 03 Apr 2017 06:43:02 GMT):
with peer cli it's working fine

AbhilekhSingh (Mon, 03 Apr 2017 06:43:18 GMT):
but with this node test/integration/e2e/install-chaincode.js it's not installing them

AbhilekhSingh (Mon, 03 Apr 2017 06:43:26 GMT):
How can I achieve this?

AbhilekhSingh (Mon, 03 Apr 2017 06:47:22 GMT):
my bad I created the symbolic link

AbhilekhSingh (Mon, 03 Apr 2017 06:47:35 GMT):
It requires actual folder

AbhilekhSingh (Mon, 03 Apr 2017 06:47:41 GMT):
ignore the question

wwendy (Mon, 03 Apr 2017 09:00:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=27EttNXhM6kXsi55S) @davidkel have you worked around this scenario, I also met this problem.

jimthematrix (Mon, 03 Apr 2017 11:26:11 GMT):
@rjones I just reviewed the commit log on the v1.0-alpha branch, they were either merges from master or specific to the hackfest. the branch can be safely deleted.

mastersingh24 (Mon, 03 Apr 2017 12:17:38 GMT):
[ yes - let's get rid of this - we've seen some confusion already](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MvZLACyNi5voxoRbu) @jimthematrix

rjones (Mon, 03 Apr 2017 20:35:31 GMT):
@jimthematrix @mastersingh24 deleted

jongeun.park (Tue, 04 Apr 2017 01:58:12 GMT):
404 Error curl -OOOOOO https://raw.githubusercontent.com/hyperledger/fabric-sdk-node/v1.0-alpha/examples/balance-transfer/{config.json,deploy.js,helper.js,invoke.js,query.js,package.json}

AbhishekSeth (Tue, 04 Apr 2017 06:25:37 GMT):
Has joined the channel.

AbhishekSeth (Tue, 04 Apr 2017 07:04:49 GMT):
hii all, I am trying to deploy the example_cc chaincode using NodeSdk using deploy.js file given already. This is giving me this error:

AbhishekSeth (Tue, 04 Apr 2017 07:04:50 GMT):

Message Attachments

AbhishekSeth (Tue, 04 Apr 2017 07:05:34 GMT):
while deployment and invocation happen successfully using cli commands..

AbhishekSeth (Tue, 04 Apr 2017 07:05:45 GMT):
Any help is appreciated!!

mychewcents (Tue, 04 Apr 2017 07:10:40 GMT):
Hi, the latest NodeJS package for Fabric is HFC 0.6.5, correct? I am trying to build an app which connects to the already deployed blockchain network at the backend. I guess this is the correct way to send the requests?

JasonD (Tue, 04 Apr 2017 07:13:18 GMT):
@mychewcents fabric-client and fabric-ca-client 1.0 alpha

mychewcents (Tue, 04 Apr 2017 07:14:30 GMT):
Oh Got it. Thanks. Was searching for this only. One more question, when I run my network, do I need to run the CLI image if I'm using the NodeJs SDK? Like deploying and all functions

wwendy (Tue, 04 Apr 2017 07:21:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fbCxmGjhiESYCWa6X) @JasonD alpha seems already been deleted

mychewcents (Tue, 04 Apr 2017 07:24:32 GMT):
No, I did download the package and it is showing on the npm site too.

JasonD (Tue, 04 Apr 2017 07:41:11 GMT):
@wwendy https://www.npmjs.com/search?q=fabric-client, not deleted yet

JasonD (Tue, 04 Apr 2017 07:41:52 GMT):
@mychewcents don't need CLI

mychewcents (Tue, 04 Apr 2017 08:13:19 GMT):
Thanks @JasonD .

PushpalathaHiremath (Tue, 04 Apr 2017 09:03:34 GMT):
HI All, I am facing following issue when try to run any examples other than example_cc. Any idea? This is using deploy.js/invoke.js and query.js [2017-04-04 12:52:24.521] [INFO] DEPLOY - Successfully obtained enrolled user to deploy the chaincode [2017-04-04 12:52:24.521] [INFO] DEPLOY - Executing Deploy =================================================================================== {"chaincodePath":"github.com/example_cc","chaincodeId":"mycc4","fcn":"init","args":["a","100","b","200"],"chainId":"myc1","txId":{"type":"Buffer","data":[34,185,140,219,7,209,206,144,87,57]},"nonce":{"type":"Buffer","data":[133,114,148,189,74,154,103,143,93,70,20,205,67,109,14,243,88,190,85,145,34,98,32,4]},"dockerfile-contents":"from hyperledger/fabric-ccenv\n COPY . $GOPATH/src/build-chaincode/\n WORKDIR $GOPATH\n\n RUN go install build-chaincode && mv $GOPATH/bin/build-chaincode $GOPATH/bin/%s"} =================================================================================== Response is here{"send_metadata":true,"send_message":true,"client_close":true,"metadata":{},"read":null,"status":{"code":2,"details":"Failed to deploy chaincode spec(Error creating image: %!s())","metadata":{"_internal_repr":{}}}} error: [Peer.js]: GRPC client got an error response from the peer. Error: Failed to deploy chaincode spec(Error creating image: %!s()) at /Users/Pushpalatha/go/FABRIC_V1.0/hackfest/node_modules/grpc/src/node/src/client.js:435:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error: Failed to deploy chaincode spec(Error creating image: %!s()) at Object.callback (/Users/Pushpalatha/go/FABRIC_V1.0/hackfest/node_modules/fabric-client/lib/Peer.js:191:13) at /Users/Pushpala

Vadim (Tue, 04 Apr 2017 09:04:10 GMT):
@PushpalathaHiremath you have a compile error in your chaincode

smallant (Tue, 04 Apr 2017 10:50:32 GMT):
Has joined the channel.

mychewcents (Tue, 04 Apr 2017 11:31:01 GMT):
Guys, where can I find the documentation of all the functions in the fabric-client SDK, because I don't see any complete documentation out there.

Vadim (Tue, 04 Apr 2017 11:41:03 GMT):
@mychewcents https://fabric-sdk-node.github.io/

mychewcents (Tue, 04 Apr 2017 11:46:49 GMT):
Thanks @Vadim

jimthematrix (Tue, 04 Apr 2017 11:57:17 GMT):
@AbhishekSeth the deploy.js inside "examples/balance_transfer" only works with the hackfest images, doesn't work with anything later than that. @Ratnakar is working on updating that

Ratnakar (Tue, 04 Apr 2017 14:38:48 GMT):
@AbhishekSeth for time being you can refer the sample given here https://github.com/asararatnakar/fabric_v1_nodesample, while I am working on the webapp sample

sthomas (Tue, 04 Apr 2017 14:58:44 GMT):
Has joined the channel.

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

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

jeffgarratt (Tue, 04 Apr 2017 20:39:38 GMT):
Has joined the channel.

reoim10 (Wed, 05 Apr 2017 01:20:28 GMT):
Has joined the channel.

AmberZhang (Wed, 05 Apr 2017 02:47:23 GMT):
Has joined the channel.

mychewcents (Wed, 05 Apr 2017 05:17:58 GMT):
Hi guys, I'm getting an error of 'getIdentity' of null. I guess I know why I'm getting the error but don't know how to work around that problem. All I'm trying to do is, use SDK to create a new channel and add some peers and orderers too and deploy/ instantiate my chaincode. Here are all the commands I have followed: var HFC = require('fabric-client'); var Orderer = require('fabric-client/lib/Orderer.js'); var Peer = require('fabric-client/lib/Peer.js'); var client = new HFC(); var chain = client.newChain('myc1'); chain.addOrderer(new Orderer('grpc://localhost:8050')); chain.addPeer(new Peer('grpc://localhost:8051')); var request = { ... chaincodePath: 'github.com/hyperledger/bookApplication', ... chaincodeId: 'lib1', ... chaincodeVersion: '1', ... chainId: 'mycc1', ... txId: '1', ... nonce: 100, ... args: ['100'] }; chain.initialize(); Well, I know I should be passing some config here but don't know what to pass. Could anyone help me out here please?

mychewcents (Wed, 05 Apr 2017 05:17:58 GMT):
Hi guys, I'm getting an error of 'getIdentity' of null. I guess I know why I'm getting the error but don't know how to work around that problem. All I'm trying to do is, use SDK to create a new channel and add some peers and orderers too it and deploy/ instantiate my chaincode. Here are all the commands I have followed: var HFC = require('fabric-client'); var Orderer = require('fabric-client/lib/Orderer.js'); var Peer = require('fabric-client/lib/Peer.js'); var client = new HFC(); var chain = client.newChain('myc1'); chain.addOrderer(new Orderer('grpc://localhost:8050')); chain.addPeer(new Peer('grpc://localhost:8051')); var request = { ... chaincodePath: 'github.com/hyperledger/bookApplication', ... chaincodeId: 'lib1', ... chaincodeVersion: '1', ... chainId: 'mycc1', ... txId: '1', ... nonce: 100, ... args: ['100'] };

mychewcents (Wed, 05 Apr 2017 05:17:58 GMT):
Hi guys, I'm getting an error of 'getIdentity' of null. I guess I know why I'm getting the error but don't know how to work around that problem. All I'm trying to do is, use SDK to create a new channel and add some peers and orderers too it and deploy/ instantiate my chaincode. Here are all the commands I have followed: var HFC = require('fabric-client'); var Orderer = require('fabric-client/lib/Orderer.js'); var Peer = require('fabric-client/lib/Peer.js'); var client = new HFC(); var chain = client.newChain('myc1'); chain.addOrderer(new Orderer('grpc://localhost:8050')); chain.addPeer(new Peer('grpc://localhost:8051')); var request = { ... chaincodePath: 'github.com/hyperledger/bookApplication', ... chaincodeId: 'lib1', ... chaincodeVersion: '1', ... chainId: 'mycc1', ... txId: '1', ... nonce: 100, ... args: ['100'] }; chain.initialize(); Well, I know I should be passing some config here but don't know what to pass. Could anyone help me out here please?

Vadim (Wed, 05 Apr 2017 07:05:55 GMT):
@mychewcents which command produces that error?

mychewcents (Wed, 05 Apr 2017 07:06:26 GMT):
The last command @Vadim . chain.initialize()

Vadim (Wed, 05 Apr 2017 07:06:42 GMT):
@mychewcents you need to enroll a user first

mychewcents (Wed, 05 Apr 2017 07:07:15 GMT):
I'm running images from the hackfest. So, will enrolling admin:adminpw be enough?

Vadim (Wed, 05 Apr 2017 07:08:27 GMT):
@mychewcents I'm not sure the images with hackfest (which are too old as far as I know) will work with the node-sdk that you use (which is new)

Vadim (Wed, 05 Apr 2017 07:08:53 GMT):
and you need to enroll admin over sdk, not over command line

mychewcents (Wed, 05 Apr 2017 07:09:04 GMT):
I meant that can I use already running Blockchain Network.

mychewcents (Wed, 05 Apr 2017 07:09:11 GMT):
Oh, I get it.

mychewcents (Wed, 05 Apr 2017 07:09:24 GMT):
So, I need to start from scratch kind of.

Vadim (Wed, 05 Apr 2017 07:09:48 GMT):
@mychewcents I mean that you might be facing the incompatibility problem between the node-sdk and your blockchain network, which is based on the old images

Vadim (Wed, 05 Apr 2017 07:09:56 GMT):
you should switch to 1.0.0-alpha

Vadim (Wed, 05 Apr 2017 07:10:38 GMT):
as for enrolling, check the tests: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/e2eUtils.js#L221

Vadim (Wed, 05 Apr 2017 07:10:59 GMT):
you need to trace back to what the `testUtil.getSubmitter(client, t, org);` is doing

mychewcents (Wed, 05 Apr 2017 07:13:06 GMT):
Oh. Ok. I'm using latest images only. And the latest SDK and Fabric API. I need to try it with a newer network then. Also, if I'm using this node-sdk in my application, it asks for peer and orderer endpoint. Now, when I start my network, it auto enrolls some keys from the sampleconfig dir, will that not create a hinderance? I'll surely look into the link thanks. And one more stuff, I want to start using Node-SDK in my application which I'm building from scratch. So, can you lay out a brief overview of what all steps I need to go through? It is pretty confusing. If we have any sample application that does the same, the link would be great.

AbhilekhSingh (Wed, 05 Apr 2017 07:16:14 GMT):
@mychewcents you can start with this docker compose file: https://github.com/hyperledger/fabric-sdk-node/tree/master/test/fixtures

AbhilekhSingh (Wed, 05 Apr 2017 07:16:42 GMT):
then try to run test cases described in README.md https://github.com/hyperledger/fabric-sdk-node

AbhilekhSingh (Wed, 05 Apr 2017 07:17:11 GMT):
https://github.com/hyperledger/fabric-sdk-node/tree/master/test/integration/e2e

mychewcents (Wed, 05 Apr 2017 07:18:17 GMT):
Thanks a lot @Vadim and @AbhilekhSingh. I'll head over to these docs and commands.

AmberZhang (Wed, 05 Apr 2017 07:31:46 GMT):
@AbhilekhSingh When I tried to run 'docker-compose up --force-recreate' to start the network, I always got error "orderer0 | 2017-04-04 14:18:17.966 UTC [orderer/main] main -> ERRO 001 Failed to return new GRPC server: secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true". Similar error happened on peer

AmberZhang (Wed, 05 Apr 2017 07:32:48 GMT):
I had to set UseTLS as false for order/ca/peer, then start them successfully.

AmberZhang (Wed, 05 Apr 2017 07:33:26 GMT):
@AbhilekhSingh My question is: How to run the network with UseTls as true?

Vadim (Wed, 05 Apr 2017 07:34:08 GMT):
@AmberZhang which docker-compose are you using?

Vadim (Wed, 05 Apr 2017 07:34:08 GMT):
@AmberZhang which docker-compose file are you using?

AmberZhang (Wed, 05 Apr 2017 07:44:23 GMT):
@Vadim how to check the docker-compose file?

Vadim (Wed, 05 Apr 2017 07:44:48 GMT):
which example network are you running?

Vadim (Wed, 05 Apr 2017 07:44:58 GMT):
is this e2e_cli?

AmberZhang (Wed, 05 Apr 2017 07:45:11 GMT):
https://github.com/hyperledger/fabric-sdk-node

Vadim (Wed, 05 Apr 2017 07:45:42 GMT):
which directory are you running docker-compose up from?

AmberZhang (Wed, 05 Apr 2017 07:45:43 GMT):
fabric-sdk-node/test/fixtures

Vadim (Wed, 05 Apr 2017 07:46:18 GMT):
well the TLS is configured there

Vadim (Wed, 05 Apr 2017 07:46:55 GMT):
you should bash into running container and check whether you see cert and key files in the =/etc/hyperledger/tls

Vadim (Wed, 05 Apr 2017 07:46:55 GMT):
you should bash into running container and check whether you see cert and key files in the /etc/hyperledger/tls

AmberZhang (Wed, 05 Apr 2017 07:46:59 GMT):
yeah, TLS is enalbed on docker-compose.yaml

AmberZhang (Wed, 05 Apr 2017 07:48:20 GMT):
if enabled TLS, the orderer/peer contain will fail and exit with 1

Vadim (Wed, 05 Apr 2017 07:49:22 GMT):
given the error message you have, it seems that peer does not find the cert/key file for some reason

AmberZhang (Wed, 05 Apr 2017 07:49:38 GMT):
peer0 exited with code 1 peer2 exited with code 1 peer3 | 2017-04-04 14:05:55.456 UTC [kvledger] NewProvider -> INFO 003 ledger provider Initialized peer3 | 2017-04-04 14:05:55.456 UTC [ledgermgmt] initialize -> INFO 004 ledger mgmt initialized peer3 | 2017-04-04 14:05:55.458 UTC [nodeCmd] serve -> INFO 005 Security enabled status: true peer3 | Error: secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true peer3 | Usage: peer3 | peer node start [flags] peer3 | peer3 | Flags: peer3 | -o, --orderer string Ordering service endpoint (default "orderer:7050") peer3 | --peer-chaincodedev Whether peer in chaincode development mode peer3 | --peer-defaultchain Whether to start peer with chain testchainid (default true) peer3 | peer3 | Global Flags: peer3 | --logging-level string Default logging level and overrides, see core.yaml for full syntax peer3 | --test.coverprofile string Done (default "coverage.cov") peer3 | -v, --version Display current version of fabric peer server peer3 | peer3 | Failed to return new GRPC server: secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true peer1 exited with code 1 peer3 exited with code 1

AmberZhang (Wed, 05 Apr 2017 07:57:30 GMT):
root@ddb3777c76e2:/opt/gopath/src/github.com/hyperledger/fabric# ls /etc/hyperledger/tls/ ca-cert.pem cert.pem key.pem root@ddb3777c76e2:/opt/gopath/src/github.com/hyperledger/fabric# ls /etc/hyperledger/ fabric/ msp/ tls/

AmberZhang (Wed, 05 Apr 2017 07:57:58 GMT):
looks that the key and cert is generated on the peer container

Vadim (Wed, 05 Apr 2017 08:01:32 GMT):
@AmberZhang no, the cert files are mounted from the host

AmberZhang (Wed, 05 Apr 2017 08:38:25 GMT):
@Vadim Now I started the network with UseTLS disabled. When run the test/integration/e2e/create-channel.js, get error below.

AmberZhang (Wed, 05 Apr 2017 08:39:02 GMT):
debug: [Chain.js]: createChannel - start debug: [Chain.js]: createChannel - about to send envelope debug: [Orderer.js]: sendBroadcast - start debug: [Orderer.js]: sendBroadcast - sent message E0405 16:36:27.480000000 140736837305280 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E0405 16:36:27.485535000 140736837305280 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12)" debug: [Chain.js]: createChannel - rejecting with Error: SERVICE_UNAVAILABLE not ok 3 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:99:5) ... ok 4 Successfully waited to make sure new channel was created. 1..4 # tests 4 # pass 3 # fail 1

Vadim (Wed, 05 Apr 2017 08:40:59 GMT):
@AmberZhang the tests expect that the tls is enabled

AmberZhang (Wed, 05 Apr 2017 08:41:56 GMT):
ok, let me stop the network and restart it with UseTLS enabled again

AmberZhang (Wed, 05 Apr 2017 08:47:16 GMT):
@Vadim Still get error when UseTLS enabled

AmberZhang (Wed, 05 Apr 2017 08:47:18 GMT):
Attaching to ca_peerOrg2, orderer0, couchdb, ca_peerOrg1, peer0, peer2, peer1, peer3 ca_peerOrg2 | 2017/04/05 08:44:56 [INFO] Configuration file location: /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml ca_peerOrg2 | 2017/04/05 08:44:56 Initialize BCCSP [SW] orderer0 | 2017-04-05 08:44:57.284 UTC [orderer/main] main -> ERRO 001 Failed to return new GRPC server: secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true ca_peerOrg2 | 2017/04/05 08:44:56 [INFO] The CA key and certificate files already exist ca_peerOrg2 | 2017/04/05 08:44:56 [INFO] Key file location: /etc/hyperledger/fabric-ca-server-config/96bdb57f4efbdcf201a269899eb47e2a73fbb728ae14d47d0d5afb75ddea71de_sk ca_peerOrg1 | 2017/04/05 08:44:57 [INFO] Configuration file location: /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml couchdb | **************************************************** ca_peerOrg2 | 2017/04/05 08:44:56 [INFO] Certificate file location: /etc/hyperledger/fabric-ca-server-config/peerOrg2-cert.pem couchdb | WARNING: CouchDB is running in Admin Party mode.

AmberZhang (Wed, 05 Apr 2017 08:48:26 GMT):
peer2 | 2017-04-05 08:44:59.798 UTC [nodeCmd] serve -> INFO 005 Security enabled status: true couchdb | to set it in "docker run". ca_peerOrg1 | 2017/04/05 08:44:57 [INFO] Initialized sqlite3 data base at /etc/hyperledger/fabric-ca-server/fabric-ca-server.db peer0 | 2017-04-05 08:44:59.412 UTC [kvledger.util] logDirStatus -> DEBU 009 After creating dir - [/var/hyperledger/production/ledgersData/chains/index/] exists peer2 | Error: secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true couchdb | **************************************************** ca_peerOrg1 | 2017/04/05 08:44:57 [INFO] Listening at https://0.0.0.0:7054 peer2 | Usage: peer0 | 2017-04-05 08:44:59.521 UTC [kvledger] NewProvider -> DEBU 00a Constructing leveldb VersionedDBProvider couchdb | Apache CouchDB 1.6.1 (LogLevel=info) is starting. peer2 | peer node start [flags]

Vadim (Wed, 05 Apr 2017 08:48:32 GMT):
you built your own images?

AmberZhang (Wed, 05 Apr 2017 08:49:01 GMT):
yeah, I run 'make docker' in my local machine

AmberZhang (Wed, 05 Apr 2017 08:49:19 GMT):
peer2 | Failed to return new GRPC server: secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true

Vadim (Wed, 05 Apr 2017 08:49:28 GMT):
yes, I saw that

AmberZhang (Wed, 05 Apr 2017 08:49:34 GMT):
peer2 exited with code 1 peer0 exited with code 1

Vadim (Wed, 05 Apr 2017 08:49:36 GMT):
can you try with e2e_cli?

AmberZhang (Wed, 05 Apr 2017 08:49:57 GMT):
how to try e2e_cli?

Vadim (Wed, 05 Apr 2017 08:50:14 GMT):
https://github.com/hyperledger/fabric/tree/master/examples/e2e_cli

AmberZhang (Wed, 05 Apr 2017 08:50:41 GMT):
ok

AmberZhang (Wed, 05 Apr 2017 08:51:21 GMT):
clone the master branch?

Vadim (Wed, 05 Apr 2017 08:52:49 GMT):
well don't you have it already? YOu said you run `make docker` somewhere

AmberZhang (Wed, 05 Apr 2017 08:55:27 GMT):
I run it under the directory hyperledger/fabric

Vadim (Wed, 05 Apr 2017 08:55:47 GMT):
so then you should have there examples/e2e_cli

AmberZhang (Wed, 05 Apr 2017 08:56:29 GMT):
zhangxqs-mbp:examples zhangxq$ pwd /Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric-sdk-node/examples zhangxqs-mbp:examples zhangxq$ ls balance-transfer zhangxqs-mbp:examples zhangxq$ ls -l total 0 drwxr-xr-x 9 zhangxq staff 306 Mar 28 09:17 balance-transfer zhangxqs-mbp:examples zhangxq$ cd balance-transfer/ zhangxqs-mbp:balance-transfer zhangxq$ ls README.md config.json deploy.js helper.js invoke.js package.json query.js

AmberZhang (Wed, 05 Apr 2017 08:56:39 GMT):
don't see e2e_cli

Vadim (Wed, 05 Apr 2017 08:56:53 GMT):
in hyperledger/fabric, not fabric-sdk-node

Vadim (Wed, 05 Apr 2017 08:57:04 GMT):
just go there and run `./network_setup.sh up `

AmberZhang (Wed, 05 Apr 2017 08:58:34 GMT):
Creating network "e2ecli_default" with the default driver Creating orderer Creating peer0 ERROR: for peer0 Cannot create container for service peer0: Conflict. The container name "/peer0" is already in use by container 69f542fe9463d63ae6d158158c71300641b585ce69abe873101054efbf395c58. You have to remove (or rename) that container to be able to reuse that name. ERROR: Encountered errors while bringing up the project. ERROR !!!! Unable to pull the images

AmberZhang (Wed, 05 Apr 2017 08:58:53 GMT):
should I remove the peer container firstly?

Vadim (Wed, 05 Apr 2017 08:59:38 GMT):
yes

Vadim (Wed, 05 Apr 2017 08:59:47 GMT):
put down your old network

AmberZhang (Wed, 05 Apr 2017 09:01:22 GMT):
zhangxqs-mbp:e2e_cli zhangxq$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6fb96eb30325 hyperledger/fabric-orderer "orderer" 2 minutes ago Up 2 minutes 0.0.0.0:7050->7050/tcp orderer

AmberZhang (Wed, 05 Apr 2017 09:01:49 GMT):
only orderer is up when run 'network_setup.sh up'

Vadim (Wed, 05 Apr 2017 09:02:22 GMT):
and what is the error message?

Vadim (Wed, 05 Apr 2017 09:02:51 GMT):
docker logs peer0

AmberZhang (Wed, 05 Apr 2017 09:03:35 GMT):
2017-04-05 08:44:59.665 UTC [nodeCmd] serve -> INFO 015 Security enabled status: true Error: secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true Failed to return new GRPC server: secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true Usage: peer node start [flags] Flags: -o, --orderer string Ordering service endpoint (default "orderer:7050") --peer-chaincodedev Whether peer in chaincode development mode --peer-defaultchain Whether to start peer with chain testchainid (default true) Global Flags: --logging-level string Default logging level and overrides, see core.yaml for full syntax --test.coverprofile string Done (default "coverage.cov") -v, --version Display current version of fabric peer server

Vadim (Wed, 05 Apr 2017 09:05:34 GMT):
well, in this case, you can try: 1) run make clean in fabric 2) pull the latest fabric 3) run make docker

Vadim (Wed, 05 Apr 2017 09:05:50 GMT):
maybe also update your docker

AmberZhang (Wed, 05 Apr 2017 09:06:22 GMT):
ok

AmberZhang (Wed, 05 Apr 2017 09:06:46 GMT):
Docker version 17.03.1-ce, build c6d412e

AmberZhang (Wed, 05 Apr 2017 09:11:06 GMT):
I failed to build all

AmberZhang (Wed, 05 Apr 2017 09:11:08 GMT):
zhangxqs-mbp:fabric zhangxq$ make make[1]: Entering directory '/opt/gopath/src/github.com/hyperledger/fabric/gotools' Building github.com/golang/lint/golint -> golint package golang.org/x/tools/go/gcexportdata: unrecognized import path "golang.org/x/tools/go/gcexportdata" (https fetch: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.58.197.49:443: i/o timeout) make[1]: *** [gotool.golint] Error 1 Makefile:47: recipe for target 'gotool.golint' failed make[1]: Leaving directory '/opt/gopath/src/github.com/hyperledger/fabric/gotools' make: *** [/opt/gotools/obj/gopath/bin/golint] Error 2 Makefile:52: recipe for target '/opt/gotools/obj/gopath/bin/golint' failed make: *** [build/docker/gotools] Error 2

AmberZhang (Wed, 05 Apr 2017 09:11:35 GMT):
so I build them one by one

Vadim (Wed, 05 Apr 2017 09:11:52 GMT):
you need to get golint

AmberZhang (Wed, 05 Apr 2017 09:12:33 GMT):
ok. Trying to run 'make docker' now

AmberZhang (Wed, 05 Apr 2017 09:26:33 GMT):
@Vadim how to fix the make error?

AmberZhang (Wed, 05 Apr 2017 09:26:34 GMT):
zhangxqs-mbp:fabric zhangxq$ make docker mkdir -p build/image/ccenv/payload cp build/docker/gotools/bin/protoc-gen-go build/bin/chaintool build/goshim.tar.bz2 build/image/ccenv/payload cp: build/docker/gotools/bin/protoc-gen-go: No such file or directory make: *** [build/image/ccenv/payload] Error 1 zhangxqs-mbp:fabric zhangxq$ make docker orderer mkdir -p build/image/ccenv/payload cp build/docker/gotools/bin/protoc-gen-go build/bin/chaintool build/goshim.tar.bz2 build/image/ccenv/payload cp: build/docker/gotools/bin/protoc-gen-go: No such file or directory make: *** [build/image/ccenv/payload] Error 1

Vadim (Wed, 05 Apr 2017 09:30:50 GMT):
is your $GOPATH set? is your fabric located in $GOPATH/src/github.com/hyperledger/fabric?

AmberZhang (Wed, 05 Apr 2017 09:31:47 GMT):
zhangxqs-mbp:fabric zhangxq$ echo $GOPATH /Users/zhangxq/BlkChainPro zhangxqs-mbp:fabric zhangxq$ pwd /Users/zhangxq/BlkChainPro/src/github.com/hyperledger/fabric

AmberZhang (Wed, 05 Apr 2017 09:32:09 GMT):
it is set correctly. I think

Vadim (Wed, 05 Apr 2017 09:32:10 GMT):
well then I don't knpw

Vadim (Wed, 05 Apr 2017 09:32:10 GMT):
well then I don't know

Vadim (Wed, 05 Apr 2017 09:32:20 GMT):
try doing that in vagrant

AmberZhang (Wed, 05 Apr 2017 09:34:55 GMT):
thank you for your help@Vadim

AmberZhang (Wed, 05 Apr 2017 09:38:40 GMT):
@Vadim the protoc-gen-go can be found under ./vendor

AmberZhang (Wed, 05 Apr 2017 09:38:42 GMT):
cp ./vendor/github.com/golang/protobuf/protoc-gen-go/protoc-gen-go build/docker/gotools/bin/

AmberZhang (Wed, 05 Apr 2017 09:39:00 GMT):
the problem can be solved.

Vadim (Wed, 05 Apr 2017 09:39:18 GMT):
I think make should do that itself

Vadim (Wed, 05 Apr 2017 09:39:43 GMT):
well if it's solved, then it's good

AmberZhang (Wed, 05 Apr 2017 09:40:28 GMT):
'make docker' under './fabric' directory is running

JasonD (Wed, 05 Apr 2017 10:00:21 GMT):
hi, i have a question. after `chain.sendInstantiateProposal(request)`, I saw this error in console: `E0405 17:58:41.903487000 140735105217280 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly.`

JasonD (Wed, 05 Apr 2017 10:00:47 GMT):
`E0405 17:58:41.903783000 140735105217280 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR`

Vadim (Wed, 05 Apr 2017 10:03:23 GMT):
@JasonD I also saw this, but everything worked. So I guess this happens when the server closes connection and sends EOF (hence 0), and client awaits more data. But this only happens on the grpc layer and does not break the app communication. Sometimes you also see similar in orderer/peer logs, like `[orderer/common/deliver] Handle -> WARN 4cc Error reading from stream: EOF`

JasonD (Wed, 05 Apr 2017 10:05:02 GMT):
@Vadim this is so weird. Last time I run the code, everything was fine. But today, got this error. after that, I got this error: `GRPC client got an error response from the peer "grpcs://localhost:7051". Error: Timeout expired while starting chaincode events:v0(networkid:dev,peerid:peer0,tx:1f591fa0369602bc4efc60528dfd17bb9f501cc38f905e79bbd19ece98027306)`

JasonD (Wed, 05 Apr 2017 10:09:23 GMT):
and I received 2 proposals, one is good, one is bad.

JasonD (Wed, 05 Apr 2017 10:14:05 GMT):
then my chaincode didn't start

JasonD (Wed, 05 Apr 2017 10:20:52 GMT):
I find this on my console log:

JasonD (Wed, 05 Apr 2017 10:20:55 GMT):
``` peer0 | 2017-04-05 10:19:20.044 UTC [chaincode] launchAndWaitForRegister -> DEBU 3df stopping due to error while launching Timeout expired while starting chaincode events:v0(networkid:dev,peerid:peer0,tx:8f3170f4de2797494bb05373e350bf35d908f30a44d26b8c31fa6ce8f37bb8d2) peer0 | 2017-04-05 10:19:20.045 UTC [container] lockContainer -> DEBU 3e0 waiting for container(dev-peer0-events-v0) lock peer0 | 2017-04-05 10:19:20.045 UTC [container] lockContainer -> DEBU 3e1 got container (dev-peer0-events-v0) lock peer0 | 2017-04-05 10:19:20.052 UTC [dockercontroller] stopInternal -> DEBU 3e2 Stop container dev-peer0-events-v0(Container not running: dev-peer0-events-v0) peer0 | 2017-04-05 10:19:20.054 UTC [dockercontroller] stopInternal -> DEBU 3e3 Kill container dev-peer0-events-v0 (API error (500): {"message":"Cannot kill container dev-peer0-events-v0: Container b52868715f94ab3ba0a390569a2aef793e1ee21c1e04fb361f566d092fcfdd33 is not running"} peer0 | ) peer0 | 2017-04-05 10:19:20.100 UTC [dockercontroller] stopInternal -> DEBU 3e4 Removed container dev-peer0-events-v0 peer0 | 2017-04-05 10:19:20.100 UTC [container] unlockContainer -> DEBU 3e5 container lock deleted(dev-peer0-events-v0) peer0 | 2017-04-05 10:19:20.100 UTC [chaincode] Launch -> ERRO 3e6 launchAndWaitForRegister failed Timeout expired while starting chaincode events:v0(networkid:dev,peerid:peer0,tx:8f3170f4de2797494bb05373e350bf35d908f30a44d26b8c31fa6ce8f37bb8d2) peer0 | 2017-04-05 10:19:20.100 UTC [lockbasedtxmgr] Done -> DEBU 3e7 Done with transaction simulation / query execution [9c4fb49b-9d50-48a3-be9b-4fbbcabcb403] peer0 | 2017-04-05 10:19:20.107 UTC [eventhub_producer] deRegisterHandler -> DEBU 3e8 deRegisterHandler BLOCK peer0 | 2017-04-05 10:19:20.108 UTC [eventhub_producer] Chat -> DEBU 3e9 Received EOF, ending Chat ```

JasonD (Wed, 05 Apr 2017 10:21:18 GMT):
anone can help ?

achraf17 (Wed, 05 Apr 2017 10:44:17 GMT):
Has joined the channel.

antoniovassell (Wed, 05 Apr 2017 11:33:25 GMT):
@JasonD does re-deploying solves this (re-creating channel, joining, deploying chaincode, instantiating...)

antoniovassell (Wed, 05 Apr 2017 11:33:29 GMT):
?

antoniovassell (Wed, 05 Apr 2017 11:35:47 GMT):
i see this a few times, a couple days after I deploy, it will be giving errors like this, have to restart

JasonD (Wed, 05 Apr 2017 12:02:14 GMT):
no, re-deploying doesn't solve this problem

JasonD (Wed, 05 Apr 2017 12:02:18 GMT):
@antoniovassell

JasonD (Wed, 05 Apr 2017 12:13:40 GMT):
then I try `node test/integration/e2e.js`

JasonD (Wed, 05 Apr 2017 12:14:04 GMT):
it stop here `ok 26 Successfully enrolled user 'admin'` then never jump to next step

JasonD (Wed, 05 Apr 2017 12:14:24 GMT):
here is docker's log

JasonD (Wed, 05 Apr 2017 12:14:28 GMT):
``` peer0 | 2017-04-05 12:11:19.767 UTC [container] lockContainer -> DEBU 38b waiting for container(dev-peer0-end2end-v0) lock peer0 | 2017-04-05 12:11:19.767 UTC [container] lockContainer -> DEBU 38c got container (dev-peer0-end2end-v0) lock peer0 | 2017-04-05 12:11:19.767 UTC [dockercontroller] Start -> DEBU 38d Cleanup container dev-peer0-end2end-v0 peer0 | 2017-04-05 12:11:19.783 UTC [dockercontroller] stopInternal -> DEBU 38e Stop container dev-peer0-end2end-v0(No such container: dev-peer0-end2end-v0) peer0 | 2017-04-05 12:11:19.801 UTC [dockercontroller] stopInternal -> DEBU 38f Kill container dev-peer0-end2end-v0 (No such container: dev-peer0-end2end-v0) peer0 | 2017-04-05 12:11:19.805 UTC [dockercontroller] stopInternal -> DEBU 390 Remove container dev-peer0-end2end-v0 (No such container: dev-peer0-end2end-v0) peer0 | 2017-04-05 12:11:19.805 UTC [dockercontroller] Start -> DEBU 391 Start container dev-peer0-end2end-v0 peer0 | 2017-04-05 12:11:19.806 UTC [dockercontroller] getDockerHostConfig -> DEBU 392 docker container hostconfig NetworkMode: fixtures_default peer0 | 2017-04-05 12:11:19.808 UTC [dockercontroller] createContainer -> DEBU 393 Create container: dev-peer0-end2end-v0 peer0 | 2017-04-05 12:11:20.040 UTC [dockercontroller] createContainer -> DEBU 394 Created container: dev-peer0-end2end-v0 peer0 | 2017-04-05 12:11:20.813 UTC [dockercontroller] Start -> DEBU 395 Started container dev-peer0-end2end-v0 peer0 | 2017-04-05 12:11:20.814 UTC [container] unlockContainer -> DEBU 396 container lock deleted(dev-peer0-end2end-v0) ```

JasonD (Wed, 05 Apr 2017 12:57:20 GMT):
I guess this is another bug we don't know when will be fixed...

JasonD (Wed, 05 Apr 2017 13:09:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bGa7RRWSDjjjRuoaz) @JasonD then this error: `GRPC client got an error response from the peer "grpcs://localhost:8051". Error: Timeout expired while starting chaincode end2end`

rliu (Wed, 05 Apr 2017 13:19:07 GMT):
Has joined the channel.

JasonD (Wed, 05 Apr 2017 13:57:00 GMT):
but in node-sdk master branch, everything is fine

JasonD (Wed, 05 Apr 2017 15:00:04 GMT):
I switch to master branch, then docker compose, than switch to v1.0 alpha, problem solved! don't know why

rliu (Wed, 05 Apr 2017 15:19:48 GMT):
Hi, I set up a network following instruction here http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html. I also deployed the marble example. Now I try to query the marbles using node SDK. I followed the example here https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/query.js, but it run into errors. I notice my network does not have CA. Does anyone here know how to use node SDK with a network without CA? i'm very new to blockchain. Here are the errors I got:

rliu (Wed, 05 Apr 2017 15:19:51 GMT):
info: Returning a new winston logger with default configurations info: [Chain.js]: Constructed Chain instance: name - fabric-marbles, securityEnabled: true, TCert download batch size: 10, network mode: true info: [Peer.js]: Peer.const - url: grpc://localhost:7051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca info: [Client.js]: Failed to load user "admin" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric COP service client: endpoint - {"protocol":"http","hostname":"localhost","port":8054} info: [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store /Users/rliu/.hfc-key-store [2017-04-05 10:58:30.800] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:8054] at ClientRequest. (/Users/rliu/gospace/hackfest/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:304:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1278:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) [2017-04-05 10:58:30.801] [ERROR] QUERY - Error: Failed to obtain an enrolled user at ca_client.enroll.then.then.then.catch (/Users/rliu/gospace/hackfest/helper.js:59:12) at process._tickCallback (internal/process/next_tick.js:103:7)

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

greg.haskins (Wed, 05 Apr 2017 21:47:02 GMT):
@jimthematrix did the SDK make it to npmjs.org for the alpha?

greg.haskins (Wed, 05 Apr 2017 21:47:12 GMT):
not seeing it, but I might be looking in the wrong place

rameshthoomu (Wed, 05 Apr 2017 21:52:35 GMT):
@greg.haskins check this https://www.npmjs.com/package/fabric-client

greg.haskins (Wed, 05 Apr 2017 21:58:04 GMT):
@rameshthoomu ty

jansony1 (Thu, 06 Apr 2017 00:41:47 GMT):
HI there: The sample link is not work, anyone could fix it? http://fabric-sdk-node.readthedocs.io/en/master/sample-web-app/

bh4rtp (Thu, 06 Apr 2017 00:56:01 GMT):
does node sdk no longer support no-tls? i switch all tls enable ENV from true to false in docker-compose file, and e2e test will fail.

jansony1 (Thu, 06 Apr 2017 01:09:06 GMT):
@bh4rtp where is the e2e test for node sdk?

AmberZhang (Thu, 06 Apr 2017 01:16:03 GMT):
@jansony1 you can find it here ./fabric-sdk-node/test/integration/e2e

jansony1 (Thu, 06 Apr 2017 01:16:27 GMT):
I see thanks~

AmberZhang (Thu, 06 Apr 2017 01:17:35 GMT):
@bh4rtp same finding with you -- e2e test doesn't work when usetls is false. Have you started network with usetls enabled successfully?

bh4rtp (Thu, 06 Apr 2017 01:20:10 GMT):
@AmberZhang yes, tls enabled is ok.

AmberZhang (Thu, 06 Apr 2017 01:27:57 GMT):
@bh4rtp I follow the guide on https://github.com/hyperledger/fabric-sdk-node. When run 'docker-compose up --force-recreate', get error

AmberZhang (Thu, 06 Apr 2017 01:28:17 GMT):
zhangxqs-mbp:fixtures zhangxq$ docker-compose up --force-recreate Recreating fec796595a71_fec796595a71_fec796595a71_orderer0 Recreating 2d09a87ff5c8_2d09a87ff5c8_2d09a87ff5c8_ca_peerOrg1 Recreating 222a9eee89fd_222a9eee89fd_222a9eee89fd_ca_peerOrg2 Recreating couchdb ERROR: for ca1 No such image: sha256:610c2258ba06f49ca9c8f10a3359acb53fddb73cbc8f9736b110cb1fccb477d7 ERROR: for ca0 No such image: sha256:610c2258ba06f49ca9c8f10a3359acb53fddb73cbc8f9736b110cb1fccb477d7 ERROR: for orderer0 No such image: sha256:78fc82bc250b0254fbb6d93bfefc9e25ccdb14ffb81f7a4a412bea74cbd39069 ERROR: Encountered errors while bringing up the project.

AmberZhang (Thu, 06 Apr 2017 01:29:09 GMT):
zhangxqs-mbp:fixtures zhangxq$ docker image ls|grep ca hyperledger/fabric-couchdb x86_64-1.0.0-snapshot-cacb292 e46831863030 11 hours ago 1.51 GB hyperledger/fabric-kafka x86_64-1.0.0-snapshot-cacb292 f09c0970680b 11 hours ago 1.3 GB hyperledger/fabric-zookeeper x86_64-1.0.0-snapshot-cacb292 bc6787377823 11 hours ago 1.31 GB hyperledger/fabric-testenv x86_64-1.0.0-snapshot-cacb292 e292b416c17d 11 hours ago 1.37 GB hyperledger/fabric-orderer x86_64-1.0.0-snapshot-cacb292 256102f2eed7 11 hours ago 182 MB hyperledger/fabric-peer x86_64-1.0.0-snapshot-cacb292 5bad6c483fab 11 hours ago 185 MB hyperledger/fabric-javaenv x86_64-1.0.0-snapshot-cacb292 a3ed4392f323 11 hours ago 1.42 GB hyperledger/fabric-ccenv x86_64-1.0.0-snapshot-cacb292 c57fff3cc44e 11 hours ago 1.3 GB hyperledger/fabric-ca latest f4d4c5546ea6 15 hours ago 240 MB hyperledger/fabric-ca x86_64-1.0.0-snapshot-77dc0ce f4d4c5546ea6 15 hours ago 240 MB hyperledger/fabric-buildenv x86_64-1.0.0-snapshot-cacb292 8e67f52cd9a8 15 hours ago 1.28 GB hyperledger/fabric-ca x86_64-1.0.0-snapshot-894b7e4 319172dbc8f9 9 days ago 240 MB hyperledger/fabric-ca x86_64-0.7.0-snapshot-c9fb04e 0ae1e80cd742 4 weeks ago 237 MB hyperledger/fabric-ca x86_64-0.7.0-snapshot-f18b6b7 0ae1e80cd742 4 weeks ago

AmberZhang (Thu, 06 Apr 2017 01:29:35 GMT):
fabric-ca image is there

AmberZhang (Thu, 06 Apr 2017 01:32:11 GMT):
Who has any idea about it?

bh4rtp (Thu, 06 Apr 2017 01:49:34 GMT):
@AmberZhang edit docker-compose.yaml and delete all suffix at the end of each image line, such as x86_64-1.0.0-alpha. changing it to be latest should be preferred.

bh4rtp (Thu, 06 Apr 2017 01:50:03 GMT):
or keep null

rameshthoomu (Thu, 06 Apr 2017 01:59:03 GMT):
@AmberZhang @bh4rtp you can execute this script to pull alpha docker images from hyperledger docker hub and re-tag it as latest https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/download-dockerimages.sh

rameshthoomu (Thu, 06 Apr 2017 01:59:15 GMT):
no need to modify docker-compose file

rameshthoomu (Thu, 06 Apr 2017 02:00:03 GMT):
just execute it as `./download-dockerimages.sh -c x86_64-1.0.0-alpha -f x86_64-1.0.0-alpha`

AmberZhang (Thu, 06 Apr 2017 02:12:19 GMT):
@rameshthoomu let me try. The script is running.

yong (Thu, 06 Apr 2017 03:15:37 GMT):
Has joined the channel.

AmberZhang (Thu, 06 Apr 2017 05:50:03 GMT):
@rameshthoomu No good luck! still encounter error when starting network with useTLS enabled after run 'download-dockerimages.sh'

AmberZhang (Thu, 06 Apr 2017 05:50:07 GMT):
zhangxqs-mbp:fixtures zhangxq$ docker-compose up --force-recreate Recreating fec796595a71_fec796595a71_fec796595a71_fec796595a71_fec796595a71_orderer0 Recreating 2d09a87ff5c8_2d09a87ff5c8_2d09a87ff5c8_2d09a87ff5c8_2d09a87ff5c8_ca_peerOrg1 Recreating couchdb Recreating 222a9eee89fd_222a9eee89fd_222a9eee89fd_222a9eee89fd_222a9eee89fd_ca_peerOrg2 ERROR: for ca1 No such image: sha256:610c2258ba06f49ca9c8f10a3359acb53fddb73cbc8f9736b110cb1fccb477d7 ERROR: for ca0 No such image: sha256:610c2258ba06f49ca9c8f10a3359acb53fddb73cbc8f9736b110cb1fccb477d7 ERROR: for orderer0 No such image: sha256:78fc82bc250b0254fbb6d93bfefc9e25ccdb14ffb81f7a4a412bea74cbd39069 ERROR: Encountered errors while bringing up the project.

AbhishekSeth (Thu, 06 Apr 2017 05:58:49 GMT):
hey all, I am running in "dev mode" of fabric 1.0. I want to test my chaincodes using nodeSDK. My question is can I bypass the security thing and do the txns in security_disabled mode? I tried making "security_enabled" to be "false" in the chain.js inside "lib" folder of "fabric-client" but while deploying it is still calling "getIdentity" kind of APIs. @mastersingh24, any clue sir? Any help is highly appreciated!!

Vadim (Thu, 06 Apr 2017 06:54:19 GMT):
@AbhishekSeth if I correctly understood you (pls provide more info), the getIdentity() errors have nothing to do with security. They just tell that you haven't enrolled any user before calling chain.initialize()

mychewcents (Thu, 06 Apr 2017 07:07:48 GMT):
I'm getting this error when calling function: processProposal. Error: Chaincode handler FSM cannot handle message (INIT) with payload size (22) while in state: established. Could someone help me out with this please.

mychewcents (Thu, 06 Apr 2017 07:08:29 GMT):
I copied the code example of balance_transfer from the fabric-sdk-node project.

lizhih (Thu, 06 Apr 2017 09:46:18 GMT):
Has joined the channel.

bh4rtp (Thu, 06 Apr 2017 11:31:48 GMT):
hi, what does this error message mean when creating channel?

bh4rtp (Thu, 06 Apr 2017 11:31:52 GMT):
error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST

PushpalathaHiremath (Thu, 06 Apr 2017 12:43:43 GMT):

Message Attachments

PushpalathaHiremath (Thu, 06 Apr 2017 12:44:51 GMT):
HI All, I'm trying to run the node sdk for the dev set up of fabric. Anyone know this issue? Please help. Thank you.

PushpalathaHiremath (Thu, 06 Apr 2017 12:44:51 GMT):
I'm using the admin/adminpw which is created while init of ca-server

Vadim (Thu, 06 Apr 2017 12:47:47 GMT):
@PushpalathaHiremath the your sdk user is not trusted by endorsers

Vadim (Thu, 06 Apr 2017 12:47:47 GMT):
@PushpalathaHiremath your sdk user is not trusted by endorsers

PushpalathaHiremath (Thu, 06 Apr 2017 12:52:16 GMT):
why is it not trusted? how do we know? I have the map folder copied under .hfc-key-store

Vadim (Thu, 06 Apr 2017 12:52:43 GMT):
@PushpalathaHiremath well, it's in your log that you posted here

Vadim (Thu, 06 Apr 2017 12:52:59 GMT):
"the creator certificate is not valid"

PushpalathaHiremath (Thu, 06 Apr 2017 12:53:47 GMT):
yes.. that's where i'm lost.. can u plz help me with the step.. what i might be missing?

Vadim (Thu, 06 Apr 2017 12:54:24 GMT):
which docker-compose did you use to start your network?

Vadim (Thu, 06 Apr 2017 12:54:24 GMT):
which docker-compose file did you use to start your network?

PushpalathaHiremath (Thu, 06 Apr 2017 12:54:39 GMT):
i'm running the fabric in dev mode

PushpalathaHiremath (Thu, 06 Apr 2017 12:55:06 GMT):
i.e. running the orderer, peer and ca separaely

Vadim (Thu, 06 Apr 2017 12:55:15 GMT):
you need to use the same CA certificate as root certificate for you fabric-ca as in the msp config of peers

PushpalathaHiremath (Thu, 06 Apr 2017 12:57:11 GMT):
sorry.. i couldn't get it... can u please elaborate...

Vadim (Thu, 06 Apr 2017 12:58:06 GMT):
the peers will trust only the certificates, which issued by CA that they know

PushpalathaHiremath (Thu, 06 Apr 2017 12:58:17 GMT):
ok

Vadim (Thu, 06 Apr 2017 12:58:21 GMT):
so which MSP config do you use?

PushpalathaHiremath (Thu, 06 Apr 2017 12:58:40 GMT):
file system..

PushpalathaHiremath (Thu, 06 Apr 2017 12:58:40 GMT):
file system.., the default one..

Vadim (Thu, 06 Apr 2017 13:00:37 GMT):
I unfortunately don't have any working sdk-to-fabric example at hand

Vadim (Thu, 06 Apr 2017 13:01:12 GMT):
maybe search in this channel for IBM marbles or something like that

PushpalathaHiremath (Thu, 06 Apr 2017 13:04:05 GMT):
okay... Let me see..

jansony1 (Thu, 06 Apr 2017 14:57:35 GMT):
Hi, in cloudant-fabricca-test.js file, there missed cryptoSetting parmas. In detail: In line 87 : return new FabricCAServices(fabricCAEndpoint, tlsOptions/*cryptoSettings*/, kvs/*KVSImplClass*/, {name: dbname, url: cloudantUrl}); So that in FabricCAServices constructor file it receive wrong params like below constructor(url, tlsOptions, cryptoSettings, KVSImplClass, opts) { var endpoint = FabricCAServices._parseURL(url); logger.info('What is cryptoSetting - %j', cryptoSettings) this.cryptoPrimitives = utils.newCryptoSuite(cryptoSettings, KVSImplClass, opts);

rliu (Thu, 06 Apr 2017 15:20:33 GMT):
@jimthematrix I was chatting with Dave Enyeart about how to call qscc APIs to get transactions or blocks. Dave suggested me to direct the question to you for help

rliu (Thu, 06 Apr 2017 15:21:38 GMT):
I used the API GetTransactionByID and GetBlockByNumber, but I got the error like this:

rliu (Thu, 06 Apr 2017 15:22:12 GMT):
Error: Failed to deserialize creator identity, err Expected MSP ID Org2MSP, received Org1MSP

rliu (Thu, 06 Apr 2017 15:22:53 GMT):
Do you have some examples to invoke qscc APIs by SDK?

rliu (Thu, 06 Apr 2017 15:23:01 GMT):
Here is the whole output:

rliu (Thu, 06 Apr 2017 15:24:13 GMT):
***** End-to-end flow: query chaincode ***** info: [Peer.js]: Peer.const - url: grpcs://localhost:7051 options grpc.ssl_target_name_override=peer0, grpc.default_authority=peer0 info: [Peer.js]: Peer.const - url: grpcs://localhost:8051 options grpc.ssl_target_name_override=peer2, grpc.default_authority=peer2 info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 1 Successfully loaded member from persistence Query request object : { chaincodeId: 'qscc', chaincodeVersion: 'v3', chainId: '', txId: '19a5956dd0c8398e45be47d252a1f98fbdbaf9cef531012b5ce202466d845a1b', nonce: , fcn: 'GetTransactionByID', args: [ 'mychannel', 'f0661ec69cd279cd1184188906966decdd35ddb1f41204ab07c4dccf89212f58' ] } error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:8051". Error: Failed to deserialize creator identity, err Expected MSP ID Org2MSP, received Org1MSP at /opt/fabric1_workspace/fabric-node-sdk/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err Expected MSP ID Org2MSP, received Org1MSP at /opt/fabric1_workspace/fabric-node-sdk/node_modules/grpc/src/node/src/client.js:434:17 info: [install-chaincode]: Printing each payload response : � � � k �������3" mychannel*@f0661ec69cd279cd1184188906966decdd35ddb1f41204ab07c4dccf89212f58: end2end� �

rliu (Thu, 06 Apr 2017 15:27:42 GMT):
@jimthematrix also, do you have any instruction to parse the content?

jimthematrix (Thu, 06 Apr 2017 15:44:29 GMT):
@rliu the error means you are using a user from org1 but are querying a peer from org2

jimthematrix (Thu, 06 Apr 2017 15:45:58 GMT):
@bretharrison can help you with how to parse returned objects which i believe are protobuf buffers that need decoding, or he's already done that from within the method before it's returned

rliu (Thu, 06 Apr 2017 15:48:31 GMT):
@jimthematrix i followed the sample code in the repository. could you point out which part can set the user correctly

bretharrison (Thu, 06 Apr 2017 16:00:55 GMT):
on `queryByChaincode` the caller must know how to decode the byte buffer when it comes back. The SDK returns bytes produced from the chain code.

bretharrison (Thu, 06 Apr 2017 16:08:32 GMT):
@rliu on `queryBlock` the results are decoded for the caller and a JSON Object is returned to the caller with the block fully decoded

rliu (Thu, 06 Apr 2017 16:14:16 GMT):
could you share sample code to use queryBlock?

bretharrison (Thu, 06 Apr 2017 16:14:46 GMT):
@rliu on`queryTransaction` the results are still protobuf objects and would required the caller to decode them using the protobuf definitions. There is a sample of how to do this in `/test/integration/query.js` see line 157 ``` }).then((processed_transaction) => { // set to be able to decode grpc objects var grpc = require('grpc'); var commonProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/common/common.proto').common; var transProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/peer/transaction.proto').protos; logger.info(' Chain queryTransaction() returned processed tranaction is valid='+processed_transaction.validationCode); t.equals(transProto.TxValidationCode.VALID,processed_transaction.validationCode,'got back ProcessedTransaction that is a valid transaction'); try { var payload = commonProto.Payload.decode(processed_transaction.transactionEnvelope.payload); var channel_header = commonProto.ChannelHeader.decode(payload.header.channel_header); logger.debug(' Chain queryTransaction - transaction ID :: %s:', channel_header.tx_id); } catch(err) { logger.error(err); throw new Error(err.stack ? err.stack : err); } ```

rliu (Thu, 06 Apr 2017 16:15:56 GMT):
@bretharrison thanks. will give a try

rliu (Thu, 06 Apr 2017 17:16:05 GMT):
@bretharrison I tried query.js, but failed at Step 4. ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' ok 3 Successfully initialized chain info: [Chain.js]: Primary peer was not set, using Peer : {url:grpcs://localhost:7051} info: [query]: Chain getBlock() returned block number=0 ok 4 checking query results are correct that we got zero block back info: [query]: getConfigSetting("E2E_TX_ID") = notfound # Did you set the E2E_TX_ID environment variable after running invoke-transaction.js ? # Failed 'Query chain working' with error: not ok 5 Error: Error: Could not get tx_id from ConfigSetting "E2E_TX_ID" at hfc.newDefaultKeyValueStore.then.then.then.then (/opt/fabric1_workspace/fabric-node-sdk/test/integration/query.js:141:10)

rliu (Thu, 06 Apr 2017 17:17:09 GMT):
@bretharrison do you have any idea about this error? We made a few transactions and can see them from gethistoryformarble

bretharrison (Thu, 06 Apr 2017 17:17:21 GMT):
that is normal if you have not set the environment variable to a know transaction ID

bretharrison (Thu, 06 Apr 2017 17:17:21 GMT):
that is normal if you have not set the environment variable to a known transaction ID

bretharrison (Thu, 06 Apr 2017 17:18:39 GMT):
do a export E2E_TX_ID='trans id here'

rliu (Thu, 06 Apr 2017 17:26:00 GMT):
@bretharrison Thanks. Step 4 passed, but got error at step 11: ok 5 Got tx_id from ConfigSetting "E2E_TX_ID" info: [query]: Chain queryTransaction() returned processed tranaction is valid=0 ok 6 got back ProcessedTransaction that is a valid transaction ok 7 got back blockchain info info: [query]: Chain queryInfo() returned block height=1 info: [query]: Chain queryInfo() returned block previousBlockHash=ByteBufferNB(offset=0,markedOffset=-1,limit=0,capacity=0) info: [query]: Chain queryInfo() returned block currentBlockHash=ByteBufferNB(offset=4,markedOffset=-1,limit=36,capacity=36) info: [query]: Chain queryBlockByHash() returned block number=0 ok 8 got back block number 0 # ---->>>>> Query chain failing: GetBlockByNumber <<<<<----- info: [query]: Executing GetBlockByNumber ok 9 Successfully loaded member from persistence ok 10 Successfully enrolled user 'admin' error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:7051". Error: Failed to get block number 9999999, error Entry not found in index at /opt/fabric1_workspace/fabric-node-sdk/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to get block number 9999999, error Entry not found in index at /opt/fabric1_workspace/fabric-node-sdk/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Failed Query block. Error: Error: Failed to get block number 9999999, error Entry not found in index at /opt/fabric1_workspace/fabric-node-sdk/node_modules/grpc/src/node/src/client.js:434:17 ok 11 Did not find a block with this number : {"code":2,"metadata":{"_internal_repr":{}}} # ---->>>>> Query chain failing: GetTransactionByID <<<<<-----

bretharrison (Thu, 06 Apr 2017 17:26:59 GMT):
those are error cases,,, so should fail

bretharrison (Thu, 06 Apr 2017 17:27:20 GMT):
notice that the test says `ok`

rliu (Thu, 06 Apr 2017 17:27:29 GMT):
sorry, i say "chain.queryBlock(9999999)"

DannyWong (Thu, 06 Apr 2017 17:27:30 GMT):
Error: Failed to get block number 9999999, error Entry not found in index

DannyWong (Thu, 06 Apr 2017 17:27:37 GMT):
expected to not found

rliu (Thu, 06 Apr 2017 17:27:53 GMT):
shall i modify 9999999?

bretharrison (Thu, 06 Apr 2017 17:29:55 GMT):
just change the test case to be `test.skip`

rliu (Thu, 06 Apr 2017 17:30:29 GMT):
if i want to see the content of a block, i just modify the parameter to something like 1, 2?

bretharrison (Thu, 06 Apr 2017 17:30:39 GMT):
sure

bretharrison (Thu, 06 Apr 2017 17:31:13 GMT):
do you have the latest NodeSDK

bretharrison (Thu, 06 Apr 2017 17:31:40 GMT):
a change was merged yesterday with the block decode

DannyWong (Thu, 06 Apr 2017 18:14:19 GMT):
hi, the main purpose of the key/value store in SDK is to store the eCert/tCert right?

rliu (Thu, 06 Apr 2017 18:23:25 GMT):
@bretharrison I got it working. Thanks! One more question. how to decode the data portion in payload:

rliu (Thu, 06 Apr 2017 18:23:26 GMT):
{ header: { channel_header: ByteBuffer { buffer: , offset: 11, markedOffset: -1, limit: 118, littleEndian: true, noAssert: false }, signature_header: ByteBuffer { buffer: , offset: 121, markedOffset: -1, limit: 871, littleEndian: true, noAssert: false } }, data: ByteBuffer { buffer: , offset: 874, markedOffset: -1, limit: 3593, littleEndian: true, noAssert: false } }

rliu (Thu, 06 Apr 2017 18:24:22 GMT):
@bretharrison I see the decode for channel_header: channel_header = commonProto.ChannelHeader.decode(payload.header.channel_header)

rliu (Thu, 06 Apr 2017 18:24:45 GMT):
@bretharrison but couldn't find similar function for [data]

bretharrison (Thu, 06 Apr 2017 18:26:11 GMT):
in channel header there is type field

bretharrison (Thu, 06 Apr 2017 18:26:18 GMT):
this will tell how to decode the data

bretharrison (Thu, 06 Apr 2017 18:26:58 GMT):
do you have latest NodeSDK

rliu (Thu, 06 Apr 2017 18:27:13 GMT):
not yet. checking now. thanks

bretharrison (Thu, 06 Apr 2017 18:27:30 GMT):
look at /lib/Block

bretharrison (Thu, 06 Apr 2017 18:27:45 GMT):
it decodes the entire block

rliu (Thu, 06 Apr 2017 18:29:03 GMT):
decodeBlockDataEnvelope?

bretharrison (Thu, 06 Apr 2017 18:31:10 GMT):
yes

rliu (Thu, 06 Apr 2017 20:43:45 GMT):
@bretharrison I installed the latest SDK. Could you tell how to modify this piece of code to get decoded transaction envelope:decodeBlockDataEnvelope

rliu (Thu, 06 Apr 2017 20:44:55 GMT):
}).then((processed_transaction) => { // set to be able to decode grpc objects var grpc = require('grpc'); var commonProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/common/common.proto').common; var transProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/peer/transaction.proto').protos; logger.info(' Chain queryTransaction() returned processed tranaction is valid='+processed_transaction.validationCode); t.equals(transProto.TxValidationCode.VALID,processed_transaction.validationCode,'got back ProcessedTransaction that is a valid transaction'); try { var payload = commonProto.Payload.decode(processed_transaction.transactionEnvelope.payload); var channel_header = commonProto.ChannelHeader.decode(payload.header.channel_header); logger.debug(' Chain queryTransaction - transaction ID :: %s:', channel_header.tx_id); } catch(err) { logger.error(err); throw new Error(err.stack ? err.stack : err); }

rliu (Thu, 06 Apr 2017 20:45:42 GMT):
@bretharrison I couldn't figure out. I'm quite new to the SDK

rliu (Thu, 06 Apr 2017 23:38:03 GMT):
I tried Block.decode(processed_transaction.transactionEnvelope.payload), but it returns error:

bkvellanki (Thu, 06 Apr 2017 23:38:06 GMT):
@here "Cannot read property 'buildTransactionID' of undefined" - I am getting this error when i am building the trasaction id for query..Is there a way to print obj.submitter?

rliu (Thu, 06 Apr 2017 23:38:18 GMT):
TypeError: Cannot read property 'getNumber' of null # Failed 'Query chain working' with error: not ok 10 Error: Error: TypeError: Cannot read property 'getNumber' of null at decodeBlockHeader (/opt/fabric_sp_new/fabric-sdk-node/node_modules/fabric-client/lib/Block.js:73:42) at Function.decode (/opt/fabric_sp_new/fabric-sdk-node/node_modules/fabric-client/lib/Block.js:64:18) at hfc.newDefaultKeyValueStore.then.then.then.then.then.then (/opt/fabric_sp_new/fabric-sdk-node/test/integration/query1.js:172:46) at process._tickCallback (internal/process/next_tick.js:103:7) at hfc.newDefaultKeyValueStore.then.then.then.then.then.then (/opt/fabric_sp_new/fabric-sdk-node/test/integration/query1.js:178:10) at process._tickCallback (internal/process/next_tick.js:103:7)

rliu (Thu, 06 Apr 2017 23:38:42 GMT):
@bretharrison this is the error I got

JasonD (Fri, 07 Apr 2017 04:07:53 GMT):
here is a very weird situation: we have docker compose file in this directory `test/fixtures/docker-compose.yaml`, so I run `docker-compose up`, then run test case `node test/integration/e2e.js`. But if we copy the directory to other directory, then `cd` to the directory, run `docker-compose up`, then `node test/integration/e2e.js`, will get this error:

JasonD (Fri, 07 Apr 2017 04:08:02 GMT):
`E0407 12:07:15.754791000 140735114543872 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR`

JasonD (Fri, 07 Apr 2017 04:08:18 GMT):
`[Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:8051". Error: failed to obtain cds for end2end - transaction not found end2end/mychannel at /Users/david/Desktop/work/code/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17`

JasonD (Fri, 07 Apr 2017 04:08:22 GMT):
``` [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:8051". Error: failed to obtain cds for end2end - transaction not found end2end/mychannel at /Users/david/Desktop/work/code/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 ```

AbhishekSeth (Fri, 07 Apr 2017 06:00:38 GMT):
I am running in "dev mode". Orderer, peer and ca server, all are up and running. I am using NodeSDK to deploy the chaincode in which user I am giving is "admin". But I am getting the following error:

AbhishekSeth (Fri, 07 Apr 2017 06:00:46 GMT):

Message Attachments

AbhishekSeth (Fri, 07 Apr 2017 06:00:55 GMT):
What all CA related things are required to successfully deploy the chainocde having user as "admin"?

mychewcents (Fri, 07 Apr 2017 06:15:20 GMT):
Guys, I'm getting this error when firing the sendDeploymentProposal request to deploy my chaincode.

mychewcents (Fri, 07 Apr 2017 06:15:23 GMT):
Error: Error: Failed to init chaincode(Error initializing container mycc1:0/myc2: [tS�oXf\W]Chaincode handler FSM cannot handle message (INIT) with payload size (11) while in state: established

kaz (Fri, 07 Apr 2017 06:46:20 GMT):
Has joined the channel.

bh4rtp (Fri, 07 Apr 2017 07:17:38 GMT):
is sendInstallProposal not a member function of class Chain?

norb1969 (Fri, 07 Apr 2017 07:51:10 GMT):
Has joined the channel.

amath0312 (Fri, 07 Apr 2017 08:57:00 GMT):
Has joined the channel.

NiketYende (Fri, 07 Apr 2017 10:31:09 GMT):
Has joined the channel.

NiketYende (Fri, 07 Apr 2017 10:55:57 GMT):
@bretharrison Which method from the Block.js helps in decoding the envelope payload? I am facing issues when Block.decode method internally invokes decodeBlockHeader(proto_block.getHeader()) and property 'getNumber' is found to be null.

NiketYende (Fri, 07 Apr 2017 10:55:57 GMT):
@bretharrison Which method from the Block.js helps in decoding the envelope payload? I am facing issues when Block.decode method which internally invokes decodeBlockHeader(proto_block.getHeader()) and property 'getNumber' is found to be null.

bretharrison (Fri, 07 Apr 2017 10:58:58 GMT):
@NiketYende do you mean the `getNumber` returns null or that the method is not there

NiketYende (Fri, 07 Apr 2017 10:59:52 GMT):
@bretharrison it basically throws out this error '[Error: Error: TypeError: Cannot read property 'getNumber' of null'

bretharrison (Fri, 07 Apr 2017 11:02:07 GMT):
@NiketYende that would mean your block has no header

NiketYende (Fri, 07 Apr 2017 11:07:36 GMT):
@bretharrison Thanks.. Can the header be manually set to empty in order to skip this error. I feel this property is required. Is this allowed 'block.header = '';' ?

NiketYende (Fri, 07 Apr 2017 11:07:36 GMT):
@bretharrison Thanks.. Can the header be manually set to empty in order to skip this error. I feel this property is required. Is this allowed 'block.header = '';' ?

bretharrison (Fri, 07 Apr 2017 11:12:03 GMT):
@NiketYende the header is a very important part of the block, I do not understand why it is not there. Is this a block that you have queried from fabric

NiketYende (Fri, 07 Apr 2017 11:22:27 GMT):
@bretharrison Yes it is part of the fabric. The case i tried was to use a transaction id of my invoke transactions, which was used to setup marbles invoke. One more important question, can any transaction be passed to to get block details?

NiketYende (Fri, 07 Apr 2017 11:22:27 GMT):
@bretharrison Yes it is part of the fabric. The case i tried was to use a transaction id of my invoke transactions, which was used to setup marbles invoke. One more important question, how can i convert transactionEnvelope.payload to bytes?

bretharrison (Fri, 07 Apr 2017 11:24:50 GMT):
@NiketYende I do not understand the question

NiketYende (Fri, 07 Apr 2017 11:38:28 GMT):
@bretharrison I have rephrased the question. The problem is decode method of Block.js is expecting block_bytes, but it receives ByteBuffer object. How can i convert this ByteBuffer object to bytes?

Vadim (Fri, 07 Apr 2017 11:39:25 GMT):
@NiketYende what are you trying to do? Maybe there is an easier way?

NiketYende (Fri, 07 Apr 2017 11:45:20 GMT):
@Vadim I am trying to decode envelope payload object of a block given a transaction id. Found an example in fabric-sdk-node under test/integration/query.js.

Vadim (Fri, 07 Apr 2017 11:46:46 GMT):
have you looked into Chain.queryBlock(blockNumber) and CHain.queryBlockByHash(blockHash)?

NiketYende (Fri, 07 Apr 2017 11:51:27 GMT):
Yes, i am currently using the same api to get the block "chain.queryBlock(0)"

NiketYende (Fri, 07 Apr 2017 11:51:27 GMT):
Yes, i am currently using the same api to get the block "chain.queryBlock(0)". Trying to use "chain.queryTransaction(tx_id)" to get transaction details.

Vadim (Fri, 07 Apr 2017 11:53:06 GMT):
but it uses the block.js internally to decode it

Vadim (Fri, 07 Apr 2017 11:53:12 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Chain.js#L1109

Vadim (Fri, 07 Apr 2017 11:53:19 GMT):
so you get already decoded block

bretharrison (Fri, 07 Apr 2017 12:58:47 GMT):
@NiketYende I will have some sample code soon for decoding a transaction

bretharrison (Fri, 07 Apr 2017 13:51:32 GMT):
Here is some sample code where I have updated the /test/integration/query.js test case with more decode on the query transaction results ``` }).then((processed_transaction) => { // set to be able to decode grpc objects var grpc = require('grpc'); var commonProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/common/common.proto').common; var transProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/peer/transaction.proto').protos; var proposalProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/peer/proposal.proto').protos; var proposalResponseProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/peer/proposal_response.proto').protos; var identityProto = grpc.load(__dirname + '/../../fabric-client/lib/protos/identity.proto').msp; logger.info(' Chain queryTransaction() returned processed tranaction is valid='+processed_transaction.validationCode); t.equals(transProto.TxValidationCode.VALID,processed_transaction.validationCode,'got back ProcessedTransaction that is a valid transaction'); /* * ProcessedTransaction * - int32 validationCode * - Envelope * - bytes Signature * - bytes Payload * - Header * - bytes SignatureHeader * - bytes ChannelHeader * - bytes data Transaction * - array TransationAction * - bytes header SignatureHeader * - bytes payload ChaincodeActionPayload * - bytes ChaincodeProposalPayload * - bytes ChaincodeProposalPayload * - bytes input args * - action ChaincodeEndorsedAction * - bytes proposal_response_payload * - array Endorsement * - bytes endorser - Identity * - mspid * - bytes IdBytes */ try { var payload = commonProto.Payload.decode(processed_transaction.transactionEnvelope.getPayload()); var channel_header = commonProto.ChannelHeader.decode(payload.header.getChannelHeader()); logger.info(' Chain queryTransaction - transaction ID :: %s', channel_header.tx_id); var transaction = transProto.Transaction.decode(payload.data); var actions = transaction.getActions(); if(actions) for(var i in actions) { let transaction_action = actions[i]; var transaction_action_header = commonProto.SignatureHeader.decode(transaction_action.getHeader()); var creator = identityProto.SerializedIdentity.decode(transaction_action_header.getCreator()); logger.info(' Creator mspid::%s',creator.getMspid()); var chaincode_action_payload = transProto.ChaincodeActionPayload.decode(transaction_action.getPayload()); var chaincode_proposal_payload = proposalProto.ChaincodeProposalPayload.decode(chaincode_action_payload.getChaincodeProposalPayload()); logger.info(' ===>>>>> proposal arguments :: ===>>>> %s',chaincode_proposal_payload.getInput().toString('utf8')); var chaincode_endorsed_action = chaincode_action_payload.getAction(); //ChaincodeEndorsedAction var endorsements = chaincode_endorsed_action.getEndorsements(); if(endorsements) for(var j in endorsements) { let endorsement = endorsements[j]; var endorser = identityProto.SerializedIdentity.decode(endorsement.getEndorser()); logger.info(' Endorser mspid::%s',endorser.getMspid()); logger.info(' Endorser id::%s',endorser.getIdBytes().toString('utf8')); } } } catch(err) { logger.error(err); throw new Error(err.stack ? err.stack : err); } ```

giridharg (Fri, 07 Apr 2017 14:51:45 GMT):
Has joined the channel.

PushpalathaHiremath (Fri, 07 Apr 2017 15:39:00 GMT):

Message Attachments

smallant (Fri, 07 Apr 2017 15:41:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ys7Gd56XhThAo22ij) @PushpalathaHiremath I think your docker-compose.yml file is not correctly formatted

PushpalathaHiremath (Fri, 07 Apr 2017 15:42:08 GMT):
@smallant : is it.. Let me check.

theathibm (Fri, 07 Apr 2017 15:45:32 GMT):
Thanks for the example code regarding decoding "processed_transaction" @bretharrison . Do you have ability to additionally extract/decode the read/write set for the same transaction??

PushpalathaHiremath (Fri, 07 Apr 2017 15:56:23 GMT):

Message Attachments

greg.haskins (Fri, 07 Apr 2017 16:05:38 GMT):
@jimthematrix Im getting bit by https://jira.hyperledger.org/browse/FAB-2713 / commit 378f37c0ee

greg.haskins (Fri, 07 Apr 2017 16:05:56 GMT):
its not clear to me how to obtain and/or provide an mspId

greg.haskins (Fri, 07 Apr 2017 16:06:00 GMT):
can you advise?

greg.haskins (Fri, 07 Apr 2017 16:13:02 GMT):
or, anyone that knows really

kpsid (Fri, 07 Apr 2017 16:26:37 GMT):
Has joined the channel.

kpsid (Fri, 07 Apr 2017 16:27:15 GMT):
Hi - I am trying to develop a client application using the node-sdk

kpsid (Fri, 07 Apr 2017 16:27:38 GMT):
Is there an API documentation available somewhere?

kpsid (Fri, 07 Apr 2017 16:27:57 GMT):
Apologies, if it should have been obviously found :-(

kpsid (Fri, 07 Apr 2017 16:28:21 GMT):
I am looking here - http://fabric-sdk-node.readthedocs.io/en/master/node-sdk-guide/#overview-and-deep-dive

kpsid (Fri, 07 Apr 2017 16:28:27 GMT):
http://fabric-sdk-node.readthedocs.io/en/master/node-sdk-guide/

kpsid (Fri, 07 Apr 2017 16:28:42 GMT):
But, the link to the sample webapp throws a 404

kpsid (Fri, 07 Apr 2017 16:28:58 GMT):
and I cannot find any API documentation

chrispoole (Fri, 07 Apr 2017 16:30:09 GMT):
Folks, a colleague and I are working on the design of a REST API for Fabric, using the node SDK. We're prototyping it at the moment. I've put the draft design document here: https://docs.google.com/document/d/1C-HG9qhg6Ya_S1qqBpWHFOMueEWkNI70zzzFDQSXMdI/edit?usp=sharing (This is being tracked by https://jira.hyperledger.org/browse/FAB-156.) Please do let us know what you think, with comments on the Word doc or in Jira.

chrispoole (Fri, 07 Apr 2017 16:30:48 GMT):
CC: @jimthematrix @mastersingh24

vdods (Fri, 07 Apr 2017 16:40:53 GMT):
@kpsid If you run `gulp doc` within the fabric-sdk-node directory, it should build the API docs.

vdods (Fri, 07 Apr 2017 16:41:19 GMT):
Other related instructions are in the README.md (visible from github.com/hyperledger/fabric-sdk-node

kpsid (Fri, 07 Apr 2017 16:41:48 GMT):
thank you @vdods - I have gone through the README - will try the gulp doc

bretharrison (Fri, 07 Apr 2017 16:54:34 GMT):
@theathibm Yes decode of the read write sets is possible see the proto files in https://gerrit.hyperledger.org/r/#/c/7303

holocron (Fri, 07 Apr 2017 17:59:06 GMT):
Has joined the channel.

bkvellanki (Fri, 07 Apr 2017 18:12:53 GMT):
info: [tfc] Going to enroll for mspId peer_urls=[grpcs://localhost:7051, grpcs://localhost:7056], channel_id=mychannel, uuid=mychannel-peer0, ca_url=https://localhost:7054, orderer_url=grpcs://localhost:7050, enroll_id=admin, enroll_secret=adminpw, msp_id=Org1MSP info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/bvellanki/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store info: [tfc] Successfully loaded member from persistence debug: added peer grpcs://localhost:7051 debug: added peer grpcs://localhost:7056 debug: added primary peer grpcs://localhost:7051 debug: [tfc] Successfully got enrollment mychannel-peer0 debug: Enrolled info: Admin Successfully enrolled debug: Calling install From App.js debug: [tfc] Installing Chaincode debug: [tfc] Sending install req chaincodePath=gitlab.com/trades-cc, chaincodeId=mychannel, chaincodeVersion=v0, txId=e4025b259987873a20731064300533f1ffec207910b10007bdc29c11da3c24d3, 0=40, 1=250, 2=103, 3=252, 4=96, 5=15, 6=16, 7=65, 8=3, 9=204, 10=181, 11=20, 12=201, 13=35, 14=92, 15=44, 16=77, 17=89, 18=218, 19=198, 20=135, 21=35, 22=54, 23=169 info: [packager/Golang.js]: packaging GOLANG from gitlab.com/v-cc-code debug: Done error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Connect Failed at /Users/bvellanki/install/workspace/node-workspace/trades-web/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Connect Failed at /Users/bvellanki/install/workspace/node-workspace/trades-web/node_modules/grpc/src/node/src/client.js:434:17 debug: Proposal Response isError: Connect Failed,Error: Connect Failed debug: Proposal is.protos.Proposal debug: header is.common.Header error: [fcw] Failed to obtain endorsement for transaction. code=14, , code=14, error: [tfc] Error in install catch block object code=14, , code=14,

bkvellanki (Fri, 07 Apr 2017 18:15:23 GMT):
Hi..I was able to execute the integration tests with the install scripts..But I am trying to use them with the application..I am getting a connection error...do you guys happen to know why would the connect fail..I tried looking in to logs..but very less info..where can we look

bkvellanki (Fri, 07 Apr 2017 18:17:35 GMT):
@here

greg.haskins (Fri, 07 Apr 2017 19:04:43 GMT):
does anyone have a suggestion on the mspip

greg.haskins (Fri, 07 Apr 2017 19:04:48 GMT):
mspId rather

greg.haskins (Fri, 07 Apr 2017 21:24:43 GMT):
anyone have any knowledge about chain.initialize()

kpsid (Sat, 08 Apr 2017 11:27:48 GMT):
Hi - I have been trying to use the sdk to create a channel - the createChannel call looks for an envelope of the marshalled channel - which I understand is created by the configtxgen tool

kpsid (Sat, 08 Apr 2017 11:28:15 GMT):
Must it be done through the configtxgen tool out of band through command line?

kpsid (Sat, 08 Apr 2017 11:28:24 GMT):
Is there a programmatic SDK way?

mastersingh24 (Sat, 08 Apr 2017 11:45:23 GMT):
[ Currently the SDK does not actual have the ability to create the same output as the configtxgen tool. There are a few changes coming related to config transactions so we've been holding off on that. I believe there is a JIRA entry open for this, but if not we'll create one](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QfDPpi3TxYRgxJHdv) @kpsid

kpsid (Sat, 08 Apr 2017 14:43:44 GMT):
Thank you @mastersingh24

Adeel Qureshi (Sat, 08 Apr 2017 15:10:46 GMT):
Has joined the channel.

saifulislamsaaif (Sun, 09 Apr 2017 07:17:57 GMT):
Has joined the channel.

nate94305 (Sun, 09 Apr 2017 08:01:22 GMT):
Has joined the channel.

samdeir (Sun, 09 Apr 2017 10:29:29 GMT):
Has joined the channel.

mychewcents (Sun, 09 Apr 2017 12:08:37 GMT):
Guys, I'm able to run my install_chaincode.js from the test/integratione2e folder with the path to my own chaincode files, but when I fire instantiate_chaincode.js, it is asking for 4 arguments in the init function, same as the example_cc. I don't have that kind of statement in my Go code, but still it is showing that error. Anyone knows what is happening here? and How can I work on that? It is kinda urgent as I'm on clock right now. Thanks

AbhilekhSingh (Sun, 09 Apr 2017 12:12:43 GMT):
what error u getting it?

mychewcents (Sun, 09 Apr 2017 12:37:23 GMT):
I'm getting "Incorrect number of arguments. Expecting 4"... This error is supposed to be in example_cc, but I'm installing my own chaincode.

AbhilekhSingh (Sun, 09 Apr 2017 13:13:00 GMT):
Have u modified the javascripts to run your chaincode?

AbhilekhSingh (Sun, 09 Apr 2017 13:13:33 GMT):
Can you paste init function and command u used ?

muralisr (Sun, 09 Apr 2017 13:46:28 GMT):
@mychewcents I wonder if an older image with the same name/version exists

muralisr (Sun, 09 Apr 2017 13:46:43 GMT):
can you try modifying the name of the chaincode on install and use that?

mychewcents (Sun, 09 Apr 2017 14:10:16 GMT):
Yes @AbhilekhSingh , I modified the util.js in unit folder, I changed the path variable to my custom path. Also, during installation, it read all the files and displayed the appropiate logs.

mychewcents (Sun, 09 Apr 2017 14:10:33 GMT):
Sure, @muralisr , I'm trying that now.

mychewcents (Sun, 09 Apr 2017 14:23:55 GMT):
Thanks a lot @muralisr , the code went working, but still I'm getting some error and the instantiate chaincode is not completing, the main problem being I'm not getting any logs. I don't know what is the error but it is exiting.

muralisr (Sun, 09 Apr 2017 14:26:21 GMT):
@mychewcents from what you say likely the peer is having trouble building the new chaincode

mychewcents (Sun, 09 Apr 2017 14:26:53 GMT):
So, anyway to check that?

muralisr (Sun, 09 Apr 2017 14:26:54 GMT):
`problem being I'm not getting any logs.` - did you try looking in peer log ?

mychewcents (Sun, 09 Apr 2017 14:28:39 GMT):
I see no error on the Peer logs. I've not used any endorsement policy, but that is optional, so no error on that part too.

muralisr (Sun, 09 Apr 2017 14:30:41 GMT):
can you share the peer log ?

mychewcents (Sun, 09 Apr 2017 14:31:04 GMT):
I can share the screenshot. Give me a sec.

muralisr (Sun, 09 Apr 2017 14:31:20 GMT):
`but still I'm getting some error` - what error do you get

muralisr (Sun, 09 Apr 2017 14:31:24 GMT):
ok

mychewcents (Sun, 09 Apr 2017 14:31:51 GMT):

Message Attachments

mychewcents (Sun, 09 Apr 2017 14:32:03 GMT):
I don't get any error but it is the custom error that I print. The code is failing on chain.sendInstantitateProposal. I cannot past that.

mychewcents (Sun, 09 Apr 2017 14:33:04 GMT):
Is this what you were asking?

muralisr (Sun, 09 Apr 2017 14:33:10 GMT):
the error i'm thinking of would have happened much early on than the screen shot time

mychewcents (Sun, 09 Apr 2017 14:33:32 GMT):
Let me look up. Wait a min. I'll see if I can find something and post it here.

muralisr (Sun, 09 Apr 2017 14:33:57 GMT):
i typically do `docker logs peer0 1>/tmp/peer.log 2>&1` and search

mychewcents (Sun, 09 Apr 2017 14:35:33 GMT):
By running this command it gives me no result. Also, in the orderer, I have one warning but no error. The screenshot is coming up.

mychewcents (Sun, 09 Apr 2017 14:36:00 GMT):

Message Attachments

mychewcents (Sun, 09 Apr 2017 14:39:47 GMT):
There are no signs of error in the logs, I don't understand what went wrong. It took my chaincode finally, because it gave me my error when I passed in wrong arguments. So, it is definite that it is able to run the code, no error on code side.

mychewcents (Sun, 09 Apr 2017 14:52:44 GMT):
I guess I need to look at the node code. I moved one step further by just editing one line of mistake. Will get back, if any other pops up. Thanks @muralisr .

muralisr (Sun, 09 Apr 2017 14:53:03 GMT):
ok

muralisr (Sun, 09 Apr 2017 14:53:46 GMT):
glad you were able to get closer @mychewcents

mychewcents (Sun, 09 Apr 2017 15:52:21 GMT):
I got it @muralisr , It comes out I made some error in declaring some variables and stuff, silly mistakes. Thanks for the help.

muralisr (Sun, 09 Apr 2017 15:52:48 GMT):
been there, done that @mychewcents :-)

mychewcents (Sun, 09 Apr 2017 16:19:52 GMT):
Now finally I could use your help @muralisr , I'm now running the invoke_transaction.js for my own code. It gives me an error of "Error: Missing Peer objects in Transaction Proposal". But, even in the code provided in the test/integration/e2e, there is no error like this.

mychewcents (Sun, 09 Apr 2017 16:39:53 GMT):
It's working. again my bad.

vizkits (Sun, 09 Apr 2017 16:53:47 GMT):
Has joined the channel.

choas (Sun, 09 Apr 2017 21:40:52 GMT):
Has joined the channel.

king3000 (Mon, 10 Apr 2017 01:50:32 GMT):
Has joined the channel.

sangramkhaire (Mon, 10 Apr 2017 09:06:29 GMT):
Has joined the channel.

PushpalathaHiremath (Mon, 10 Apr 2017 09:54:46 GMT):
Hi All, What is the recommended way to get the fabric-sdk code? I used gerrit ( git clone http://gerrit.hyperledger.org/r/fabric-sdk-node). I see there are many things missing in the fabric-client and fabric-ca-client which gets loaded. Can anyone please suggest.

NiketYende (Mon, 10 Apr 2017 10:09:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NqXQPjrixh3tSdFTS) @bretharrison I tried to run the sample code. Could you give an example of the 'block_bytes' object passed to Block.decode(block_bytes) method? Also, i was not able to get an time-stamp related data from ProcessedTransaction object. Is there any api to fetch transaction timestamp?

NiketYende (Mon, 10 Apr 2017 10:09:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NqXQPjrixh3tSdFTS) @bretharrison I tried to run the sample code. Could you give an example of the 'block_bytes' object that gets passed to Block.decode(block_bytes) method? Also, i was not able to get an time-stamp related data from ProcessedTransaction object. Is there any api to fetch transaction timestamp?

NiketYende (Mon, 10 Apr 2017 10:09:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NqXQPjrixh3tSdFTS) @bretharrison I tried to run the sample code. Could you give an example of the 'block_bytes' object that gets passed to Block.decode(block_bytes) method? Also, i was not able to get any time-stamp related data from ProcessedTransaction object. Is there any api to fetch transaction timestamp?

PushpalathaHiremath (Mon, 10 Apr 2017 12:16:02 GMT):
HI All, Which is the user we need to use to register orderer? 2017/04/10 17:39:55 [DEBUG] Getting user admin from the database 2017/04/10 17:39:55 [DEBUG] Registration of 'orderer1' failed: User 'admin' may not register type 'orderer' 2017/04/10 17:39:55 [INFO] [::1]:54934 - "POST /register" 0 2017/04/10 17:40:51 [DEBUG] Received request POST /enroll

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

bkvellanki (Mon, 10 Apr 2017 16:10:01 GMT):
debug: [Orderer.js]: sendDeliver - on error debug: [Orderer.js]: sendDeliver - on status:{"code":11,"details":"EOF","metadata":{"_internal_repr":{}}} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/bvellanki/.hfc-key-store"}} debug: [FileKeyValueStore.js]: FileKeyValueStore.js - constructor E0410 11:01:47.097855000 140735919436736 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0410 11:01:47.097870000 140735919436736 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0410 11:01:47.097891000 140735919436736 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0410 11:01:47.097896000 140735919436736 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0410 11:01:47.099984000 140735919436736 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0410 11:01:47.099999000 140735919436736 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0410 11:01:47.102205000 140735919436736 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0410 11:01:47.102221000 140735919436736 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0410 11:01:47.102241000 140735919436736 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0410 11:01:47.102246000 140735919436736 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0410 11:01:47.102263000 140735919436736 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0410 11:01:47.102271000 140735919436736 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR

bkvellanki (Mon, 10 Apr 2017 16:10:50 GMT):
I am getting this error when I execute the e2e tests on sdk. Is this known issue..Some of the tests are failing

greg.haskins (Mon, 10 Apr 2017 16:14:25 GMT):
@jimthematrix can you tell me how you are testing these days?

bkvellanki (Mon, 10 Apr 2017 16:22:15 GMT):
Balas-MacBook-Pro:fabric-sdk-node bvellanki$ node test/integration/e2e.js path.js:1142 cwd = process.cwd(); ^ Error: ENOENT: no such file or directory, uv_cwd at Error (native) at Object.resolve (path.js:1142:25) at startup (bootstrap_node.js:127:32) at bootstrap_node.js:509:3 Balas-MacBook-Pro:fabric-sdk-node bvellanki$ node test/integration/e2e.js path.js:1142 cwd = process.cwd(); ^ Error: ENOENT: no such file or directory, uv_cwd at Error (native) at Object.resolve (path.js:1142:25) at startup (bootstrap_node.js:127:32) at bootstrap_node.js:509:3

bkvellanki (Mon, 10 Apr 2017 16:22:54 GMT):
With couchdb while executing end to end sdk test..I am getting this error..I pulled the latest code today

bkvellanki (Mon, 10 Apr 2017 16:24:18 GMT):
Ignore previous one

bkvellanki (Mon, 10 Apr 2017 16:24:35 GMT):
Wrong directory

simcan (Mon, 10 Apr 2017 16:34:51 GMT):
Has joined the channel.

simcan (Mon, 10 Apr 2017 16:35:20 GMT):
hi can any one help me install the marbel project locally on my PC ?

norb1969 (Mon, 10 Apr 2017 16:35:29 GMT):
Hi All. I'm trying to get up and running with the fabric-node-sdk. I'm using the https://github.com/IBM-Blockchain/SDK-Demo example as a base for my service as I have a dev blockchain instance running in bluemix. I seem to having an issue with SSL, getting Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED Is this likely to be an issue with the cert itself or perhaps a config issue with my cert store. I get the same issue whether I'm running on Linux or Windows. Any pointers much appreciated. Thanks!

bkvellanki (Mon, 10 Apr 2017 16:45:16 GMT):
error: [Chain.js]: getChannelConfig - Failed Proposal. Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/bvellanki/install/workspace/node-workspace/trades-web/node_modules/fabric-client/lib/Orderer.js:234:23) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/bvellanki/install/workspace/node-workspace/trades-web/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/bvellanki/install/workspace/node-workspace/trades-web/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/bvellanki/install/workspace/node-workspace/trades-web/node_modules/grpc/src/node/src/client.js:229:12) (node:27237) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: SERVICE_UNAVAILABLE error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Connect Failed at /Users/bvellanki/install/workspace/node-workspace/trades-web/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Connect Failed at /Users/bvellanki/install/workspace/node-workspace/trades-web/node_modules/grpc/src/node/src/client.js:434:17 debug: Proposal Response isError: Connect Failed,Error: Connect Failed debug: Proposal is.protos.Proposal debug: header is.common.Header error: [fcw] Failed to obtain endorsement for transaction. code=14, , code=14, error: [tfc] Error in install catch block object code=14, , code=14, E0410 11:43:38.534414000 140735919436736 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0410 11:43:38.536642000 140735919436736 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0410 11:43:58.573323000 140735919436736 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0410 11:43:58.579762000 140735919436736 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0410 11:44:18.541821000 140735919436736 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0410 11:44:18.578046000 140735919436736 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

bkvellanki (Mon, 10 Apr 2017 16:46:07 GMT):
I am getting the same error when i am running the app locally on my laptop.. as different application

bkvellanki (Mon, 10 Apr 2017 16:46:19 GMT):
debug: Printing Get Peers Peer : {url:grpcs://localhost:7051}, Peer : {url:grpcs://localhost:7056} debug: Printing Get Orderer Orderer : {url:grpcs://localhost:7050}

bkvellanki (Mon, 10 Apr 2017 16:46:57 GMT):
Here is the orderer log --

bkvellanki (Mon, 10 Apr 2017 16:46:57 GMT):
orderer0 | 2017/04/10 16:45:45 grpc: Server.Serve failed to complete security handshake from "172.22.0.1:41798": EOF orderer0 | 2017/04/10 16:45:45 grpc: Server.Serve failed to complete security handshake from "172.22.0.1:41800": EOF peer0 | 2017-04-10 16:45:49.316 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 842 Sleeping 5s peer0 | 2017-04-10 16:45:54.318 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 843 Sleeping 5s peer0 | 2017-04-10 16:45:59.320 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 844 Sleeping 5s peer0 | 2017-04-10 16:46:04.297 UTC [gossip/discovery#peer0:7051] periodicalReconnectToDead -> DEBU 845 Sleeping 25s peer0 | 2017-04-10 16:46:04.322 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 846 Sleeping 5s peer0 | 2017-04-10 16:46:09.323 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 847 Sleeping 5s peer0 | 2017-04-10 16:46:14.325 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 848 Sleeping 5s peer0 | 2017-04-10 16:46:19.327 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 849 Sleeping 5s peer0 | 2017-04-10 16:46:24.329 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 84a Sleeping 5s orderer0 | 2017/04/10 16:46:27 grpc: Server.Serve failed to complete security handshake from "172.22.0.1:41834": EOF orderer0 | 2017/04/10 16:46:27 grpc: Server.Serve failed to complete security handshake from "172.22.0.1:41836": EOF

bkvellanki (Mon, 10 Apr 2017 16:58:42 GMT):
Any thoughts

subbu165 (Mon, 10 Apr 2017 17:46:42 GMT):
Hi, If I'm running the orderer, peer, etc., in Dev Mode outside of vagrant and want to execute the chaincode through Node SDK, is it possible to run it with Security Disabled? If so where should I set that flag?

anbu22 (Mon, 10 Apr 2017 18:46:56 GMT):
Has joined the channel.

greg.haskins (Mon, 10 Apr 2017 20:25:07 GMT):
@bkvellanki what I typically do for that kind of scenario is vet my setup with nmap

greg.haskins (Mon, 10 Apr 2017 20:25:23 GMT):
e.g. "nmap localhost -p7050-7054"

greg.haskins (Mon, 10 Apr 2017 20:25:45 GMT):
and usually, what I find is that some service that I thought was available, isnt

bkvellanki (Mon, 10 Apr 2017 20:26:15 GMT):
aah..that might be true too..let me check..thanks greg

bkvellanki (Mon, 10 Apr 2017 20:29:16 GMT):
I tried it without security enabled and it works..With the basic TLS certifcates for two orgs and two peers and security enabled.. it fails..I am assuming,there is some certificate issue with the orderer as well..Please check it out..In the mean time and i will try what u suggested as well

greg.haskins (Mon, 10 Apr 2017 20:29:43 GMT):
reading the logs, it does look like you have an incongruence in your TLS setup

vdods (Mon, 10 Apr 2017 20:37:11 GMT):
Hi there, I'm trying to adapt the e2e.js integration test to be a minimal app to use HLF 1.0, and after recursively copying package.json and the test subdir to my own project dir, removing references to gulp, and changing the paths of the fabric-client and fabric-ca-client devDependencies within package.json to point to $GOPATH/src/github.com/hyperledger/fabric-sdk-node/fabric-client and ..../fabric-ca-client respectively. Then after I start the test/fixtures/docker-compose.yaml services and run (from project root) `node test/integration/e2e.js`, I get ```/home/vdods/files/gopath/src/github.com/d-rams/LedgerDomain/prototypes/hlf-1.0-minimal-web-app-00/node_modules/grpc/src/node/index.js:124 return loadObject(builder.ns, options); ^ TypeError: Cannot read property 'ns' of null at Object.load (/home/vdods/files/gopath/src/github.com/d-rams/LedgerDomain/prototypes/hlf-1.0-minimal-web-app-00/node_modules/grpc/src/node/ind ...```

vdods (Mon, 10 Apr 2017 20:38:43 GMT):
My question is -- I deleted the usage of gulp, notably the parts documented in the fabric-sdk-node readme saying to run `gulp ca` and `gulp watch`, because those shouldn't be steps for an application developer. What is missing here, and how do I set up my package.json dependencies correctly?

vdods (Mon, 10 Apr 2017 21:33:17 GMT):
Let me rephrase -- I want to use fabric-client and fabric-ca-client from an actual node.js app. How do I correctly specify fabric-client and fabric-ca-client as dependencies in my package.json? It looks like https://www.npmjs.com/package/fabric-client is old, and I'd rather use master HEAD commit

greg.haskins (Mon, 10 Apr 2017 22:40:31 GMT):
@vdods the way I have done it in the past is to use "npm pack"

greg.haskins (Mon, 10 Apr 2017 22:40:52 GMT):
See chaintool before the last commit

greg.haskins (Mon, 10 Apr 2017 22:41:31 GMT):
I just converted from a tarball to the alpha release on npm, basically doing the opposite of what I think you are looking for

geminatea (Mon, 10 Apr 2017 22:42:17 GMT):
Has joined the channel.

greg.haskins (Mon, 10 Apr 2017 22:44:42 GMT):
https://github.com/hyperledger/fabric-chaintool/blob/0fc1a531b92966608969f9d89e9bef6fd9a6dc4d/examples/example02/client/nodejs/package.json

geminatea (Mon, 10 Apr 2017 22:45:57 GMT):
e2e test failure: I'm on the latest docker images for fabric and fabric-ca and up-to-date on the repos. I'm seeing a series of test failures in fabric-sdk-node/test/integration/e2e.js which are part of the upgade flow:

geminatea (Mon, 10 Apr 2017 22:46:20 GMT):
```... debug: [Peer.js]: Peer.sendProposal - Start debug: [Orderer.js]: sendDeliver - on error debug: [Orderer.js]: sendDeliver - on status:{"code":11,"details":"EOF","metadata":{"_internal_repr":{}}} debug: [Peer.js]: Received proposal response from: grpcs://localhost:7051 status: Error: chaincode not found default error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: chaincode not found default at /Users/drams/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 debug: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: chaincode not found default error: [E2E testing]: upgrade proposal was bad not ok 51 Failed to send upgrade Proposal or receive valid response. Response null or status is not 200. exiting... --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then (/Users/drams/go/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:350:6) ... not ok 52 Error: Failed to send upgrade Proposal or receive valid response. Response null or status is not 200. exiting... at hfc.newDefaultKeyValueStore.then.then.then.then (/Users/drams/go/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:351:10) at process._tickCallback (internal/process/next_tick.js:103:7) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then.then (/Users/drams/go/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:369:5) ... not ok 53 Failed to upgrade chaincode ```

vdods (Mon, 10 Apr 2017 23:59:12 GMT):
Is it known how many working, external applications are using the current incarnation of fabric-sdk-node, if any? And if so, are any open source?

JeetMukesh (Tue, 11 Apr 2017 06:51:39 GMT):
Has joined the channel.

normand (Tue, 11 Apr 2017 09:02:43 GMT):
Has joined the channel.

bretharrison (Tue, 11 Apr 2017 11:26:01 GMT):
@NiketYende After running the full e2e.js test, you will be able to use the query.js to find blocks and transactions available on your fabric network. I will investigate the timestamp issue later this week.

greg.haskins (Tue, 11 Apr 2017 12:30:28 GMT):
so is the only working example we have right now the e2e?

greg.haskins (Tue, 11 Apr 2017 12:30:45 GMT):
it looks like the balance-transfer example has not been ported to the latest changes, IIUC

AbhishekSeth (Tue, 11 Apr 2017 12:45:58 GMT):
hello... I have one doubt. I am running in Production mode using docker-images. I am deploying using NodeSDK. When I tried deploying the given balance_transfer/example_cc chaincode, It happened successfully. But when I try deploying my own chaincode, This is the error I am getting:

AbhishekSeth (Tue, 11 Apr 2017 12:46:11 GMT):

Message Attachments

PushpalathaHiremath (Tue, 11 Apr 2017 13:22:52 GMT):

Message Attachments

AbhilekhSingh (Tue, 11 Apr 2017 13:35:40 GMT):
you can increase the timeout in javascript or call it again

PushpalathaHiremath (Tue, 11 Apr 2017 13:43:22 GMT):
@AbhilekhSingh : Thank you Abhilekh. But increasing the timeout is not really helping me. I still face the same issue.

AbhilekhSingh (Tue, 11 Apr 2017 13:46:16 GMT):
Check peer logs then

AbhilekhSingh (Tue, 11 Apr 2017 13:46:45 GMT):
normally running the file resolve timeout issue

AbhilekhSingh (Tue, 11 Apr 2017 13:47:00 GMT):
first time it created the docker container for chaincode

AbhilekhSingh (Tue, 11 Apr 2017 13:47:06 GMT):
Can you also check that?

MikeMayori (Tue, 11 Apr 2017 15:49:52 GMT):
Has joined the channel.

bkvellanki (Tue, 11 Apr 2017 17:02:57 GMT):
Is there an c sdk/api all to find out all the smartcontracts installed on a channel for a user?

bkvellanki (Tue, 11 Apr 2017 17:03:05 GMT):
@here Is there an c sdk/api all to find out all the smartcontracts installed on a channel for a user?

greg.haskins (Tue, 11 Apr 2017 17:11:30 GMT):
@bkvellanki There are SDKs in node/python/java/golang, but no C

greg.haskins (Tue, 11 Apr 2017 17:12:13 GMT):
also not sure if the contract inventory is currently queryable (it might be, just not sure)

bkvellanki (Tue, 11 Apr 2017 17:14:46 GMT):
@greg.haskins I went through the node sdk, got it... queryInstalledChaincodes(peer)

bkvellanki (Tue, 11 Apr 2017 17:14:54 GMT):
@greg.haskins thanks

greg.haskins (Tue, 11 Apr 2017 17:15:00 GMT):
cool

mrkiouak (Tue, 11 Apr 2017 17:47:18 GMT):
just got home

mrkiouak (Tue, 11 Apr 2017 17:47:56 GMT):
will check template works with built new env (probably still need to figure out what I have to clean out from configtx.. that was causing me issues eearlier), then will push that template I mentioned

greg.haskins (Tue, 11 Apr 2017 18:17:13 GMT):
cool

pmullaney (Tue, 11 Apr 2017 19:43:37 GMT):
anyone seeing this when running the docker-compose in test/fixtures:

pmullaney (Tue, 11 Apr 2017 19:43:58 GMT):
couchdb | {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,331}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,87}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}

mastersingh24 (Tue, 11 Apr 2017 21:06:38 GMT):
yeah - have yet to figure out why

mastersingh24 (Tue, 11 Apr 2017 21:06:52 GMT):
maybe @dave.enyeart and team can take a look?

dave.enyeart (Tue, 11 Apr 2017 21:08:58 GMT):
@pmullaney @mastersingh24 will be fixed in https://jira.hyperledger.org/browse/FAB-3094

pmullaney (Tue, 11 Apr 2017 21:25:56 GMT):
@mastersingh24 @dave.enyeart : thanks! I think it turns out that the test/fixtures/docker-compose.yaml spins up a container with couchdb but then does not use it

pmullaney (Tue, 11 Apr 2017 21:26:22 GMT):
taking it out seems to have no negative impact

dave.enyeart (Tue, 11 Apr 2017 21:26:32 GMT):
what is test/fixtures?

pmullaney (Tue, 11 Apr 2017 21:27:31 GMT):
it contains that docker-compose.yaml for the integration/unit test environment

pmullaney (Tue, 11 Apr 2017 21:28:05 GMT):
fabric-sdk-node/test/fixtures/docker-compose.yaml

dave.enyeart (Tue, 11 Apr 2017 21:32:43 GMT):
ok, we do spin up a couchdb container for the fabric CI environment, but not needed for sdk test env

mastersingh24 (Tue, 11 Apr 2017 23:27:32 GMT):
@dave.enyeart - the couchdb that gets spun up for the Node SDK is actually to test the Couch-based keystore

mastersingh24 (Tue, 11 Apr 2017 23:27:44 GMT):
we just chose to use the fabric-couchdb image for that as well

dave.enyeart (Wed, 12 Apr 2017 01:47:01 GMT):
@mastersingh24 In that case maybe we should pre-create the system tables in the image, rather than creating them upon peer startup. what do you think?

dave.enyeart (Wed, 12 Apr 2017 01:47:01 GMT):
@mastersingh24 In that case maybe we should pre-create the system databases in the image, rather than creating them upon peer startup. what do you think?

PushpalathaHiremath (Wed, 12 Apr 2017 04:59:21 GMT):
Hi All, How can we delete/remove a channel permanently ? Is there a way? Plz let me know if anyone has any idea.

AmberZhang (Wed, 12 Apr 2017 05:43:05 GMT):
@PushpalathaHiremath there is no delete channel api in node sdk now. https://fabric-sdk-node.github.io/Client.html#queryChannels

PushpalathaHiremath (Wed, 12 Apr 2017 06:21:36 GMT):
@AmberZhang : Do we have any manual CLI commands to do that?

AmberZhang (Wed, 12 Apr 2017 07:26:01 GMT):
@PushpalathaHiremath I think no so far. Maybe it's being developed. Let me check with somebody.

JasonD (Wed, 12 Apr 2017 08:23:08 GMT):
anyone seen this error?

JasonD (Wed, 12 Apr 2017 08:23:13 GMT):
``` E0412 16:21:07.645958000 140735114543872 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0412 16:21:07.646213000 140735114543872 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR ```

JasonD (Wed, 12 Apr 2017 08:23:28 GMT):
this happens when I try to invoke chaincode using node sdk

PushpalathaHiremath (Wed, 12 Apr 2017 08:59:07 GMT):
@AmberZhang : Sure. Please.

normand (Wed, 12 Apr 2017 12:40:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zfpGoJzkCw45ae8LC) got this error too... mb it happens because of wrong certificate used for grpcs communication? i get those errors when i try to enroll user from node sdk to v1.0 local hyperledger

JasonD (Wed, 12 Apr 2017 13:54:36 GMT):
@normand though it seems like we can ignore the errors because everthing works fine

JasonD (Wed, 12 Apr 2017 13:55:29 GMT):
here is another question: I just finished persistent data setting, including install my chaincode, run chainocde to generate some data. then I docker rm all container, then run docker compose file, all works fine. so after peer all start, I need to create channel, join channel, install chaincode, instantiate chaincode, right? or how do I instantiate my own chaincode?

JasonD (Wed, 12 Apr 2017 13:57:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=E3ncbGH8r8CphSXMj) @JasonD and I got this error `[Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:7051". Error: Block number should have been 4 but was 0`

mychewcents (Wed, 12 Apr 2017 13:59:27 GMT):
@JasonD , this is when you are trying to re install chaincode. Bring down your whole network and start again. It will work. I have this error when I try to re instantiate the same chaincode. Also, if you are running your own chaincode logic, then you might want to change the name of the chaincode from the default one.

mychewcents (Wed, 12 Apr 2017 14:00:33 GMT):
or probably the join-channel maybe creating this error. I cannot really point out the exact error location, but the solution works for me.

JasonD (Wed, 12 Apr 2017 14:01:25 GMT):
@mychewcents but after I start the whole network, all I have is ca, peer, orderer, not my chaincode, so I have to somehow start my chaincode

JasonD (Wed, 12 Apr 2017 14:02:00 GMT):
and this error occurs in join-channel process

mychewcents (Wed, 12 Apr 2017 14:02:10 GMT):
yes correct.

mychewcents (Wed, 12 Apr 2017 14:02:51 GMT):
but if you start your network again, you shouldn't have this error when joining, because it is totally new network for the peers.

mychewcents (Wed, 12 Apr 2017 14:03:02 GMT):
Are you completing removing the images are just shutting them down?

mychewcents (Wed, 12 Apr 2017 14:03:11 GMT):
You need to remove the containers too.

JasonD (Wed, 12 Apr 2017 14:04:52 GMT):
but the thing is, I don't want a new network, I had set persistent storage setting

mychewcents (Wed, 12 Apr 2017 14:05:33 GMT):
Then you must skip the join channel commands, because your peers are already joined

mychewcents (Wed, 12 Apr 2017 14:05:46 GMT):
Try installing your chaincode with a different chaincodeId

mychewcents (Wed, 12 Apr 2017 14:05:47 GMT):
it should work.

JasonD (Wed, 12 Apr 2017 14:06:01 GMT):
ok, I will try

mychewcents (Wed, 12 Apr 2017 14:06:21 GMT):
Cool. let me know if you get any error still. I think you shouldn't

Souvik.Dey (Wed, 12 Apr 2017 14:13:13 GMT):
Has joined the channel.

Souvik.Dey (Wed, 12 Apr 2017 14:13:37 GMT):
I am facing problem to create channel using create-channel.js . Please help Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140711575160704:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794: ] at ClientRequest. (/home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:662:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:309:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at onwriteError (_stream_writable.js:344:10) at onwrite (_stream_writable.js:362:5) at fireErrorCallbacks (net.js:471:13) at TLSSocket.Socket._destroy (net.js:512:3) --- operator: fail at: cop.enroll.then.then.then.catch (/home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/test/unit/util.js:125:8) ... 1..1 # tests 1 # pass 0 # fail 1 my username--->admin password--> adminpw ERROR FROM util.js error is :>Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140222123341696:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794: if (!loadFromConfig) { // need to enroll it with CA server var cop = new copService(caUrl, tlsOptions); console.log("**************************************************************"); console.log("username--->"+username+" password "+password); var member; return cop.enroll({ enrollmentID: username, enrollmentSecret: password }).then((enrollment) => { t.pass('Successfully enrolled user \'' + username + '\''); member = new User(username); return member.setEnrollment(enrollment.key, enrollment.certificate, ORGS[userOrg].mspid); }).then(() => { return client.setUserContext(member); }).then(() => { return resolve(member); }).catch((err) => { console.log("error ---------------->"+err); t.fail('Failed to enroll and persist user. Error: ' + err.stack ? err.stack : err); t.end(); });

Souvik.Dey (Wed, 12 Apr 2017 14:13:37 GMT):
please help

JasonD (Wed, 12 Apr 2017 14:27:26 GMT):
so there is no way I can start my original chaincode while I re start the whole network?

JasonD (Wed, 12 Apr 2017 14:28:16 GMT):
@mychewcents

mychewcents (Wed, 12 Apr 2017 14:31:03 GMT):
You can start it. Actually it is already up and running, but you are joining your peers again and that is why it is giving you error. Don't try to join the peers again and try invoking it.

JasonD (Wed, 12 Apr 2017 14:35:56 GMT):
ok, I see. So right now I just simplify change my chaincodeId, but I get other error:`Failed to send instantiate transaction and get notifications within the timeout period`

JasonD (Wed, 12 Apr 2017 14:36:25 GMT):
install is fine

JasonD (Wed, 12 Apr 2017 14:36:36 GMT):
it happens when I try to instantiate

JasonD (Wed, 12 Apr 2017 14:37:06 GMT):
and the proposal of instantiate is fine too

mychewcents (Wed, 12 Apr 2017 14:37:39 GMT):
So, if you have changed your chaincode Id, then you need re install the chaincode again.

JasonD (Wed, 12 Apr 2017 14:38:23 GMT):
yes, and the result of install is fine

JasonD (Wed, 12 Apr 2017 14:39:27 GMT):
one question, I can name what I want to chaincodeId, right? or it should be related to something?

mychewcents (Wed, 12 Apr 2017 14:39:39 GMT):
It can be any XYZ stuff

mychewcents (Wed, 12 Apr 2017 14:41:09 GMT):
I would suggest you to bring the network again, according to my experience as I don't know what is causing the error. All I knew was join peers is creating problem because of already being joined on the same channel. It is tiresome I know, but do it. Go for re-bringing up your network.

JasonD (Wed, 12 Apr 2017 14:43:55 GMT):
that's one good option. the reason I did it this way is that sometimes shit just happens, you build up the whole network on your server, and somehow the network or the server crash, you have to restore the service without losing data

JasonD (Wed, 12 Apr 2017 14:44:40 GMT):
i guess I can just let it go right now and re bring up the network

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

Souvik.Dey (Wed, 12 Apr 2017 17:19:50 GMT):
git checkout v1.0.0-alpha is not working error HEAD is now at 196d048... Release v1.0.0-alpha

Souvik.Dey (Wed, 12 Apr 2017 17:20:18 GMT):
what is current head??

Souvik.Dey (Wed, 12 Apr 2017 17:52:50 GMT):
I am facing problem to create join-channel using node-sdk # Calling peers in organization "org1" to join the channel info: [Peer.js]: Peer.const - url: grpcs://localhost:7051 options grpc.ssl_target_name_override=peer0, grpc.default_authority=peer0 info: [Peer.js]: Peer.const - url: grpcs://localhost:7056 options grpc.ssl_target_name_override=peer1, grpc.default_authority=peer1 E0412 17:48:12.080447301 14905 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E0412 17:48:12.080653038 14905 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. events.js:160 throw er; // Unhandled 'error' event ^ Error: Connect Failed

Souvik.Dey (Wed, 12 Apr 2017 17:53:52 GMT):
please help

assasinx93 (Wed, 12 Apr 2017 18:41:32 GMT):
Has joined the channel.

assasinx93 (Wed, 12 Apr 2017 18:42:54 GMT):
Guys, is there any way to get the list of blocks as in the IBM-blockchain car lease demo using Node sdk

assasinx93 (Wed, 12 Apr 2017 18:42:55 GMT):
?

mastersingh24 (Wed, 12 Apr 2017 20:39:06 GMT):
@Souvik.Dey - you should not need to checkout / clone the fabric-sdk-node repo

mastersingh24 (Wed, 12 Apr 2017 20:39:13 GMT):
you should just so a npm install

mastersingh24 (Wed, 12 Apr 2017 20:39:13 GMT):
you should just do `npm install fabric-client@1.0.0-alpha ` and `npm install fabric-ca-client@1.0.0-alpha`

mastersingh24 (Wed, 12 Apr 2017 20:40:40 GMT):
and what setup are you using for your fabric?

izelpii (Wed, 12 Apr 2017 22:05:15 GMT):
Has joined the channel.

JasonD (Thu, 13 Apr 2017 01:03:22 GMT):
@mychewcents hi, do you know how to upgrade chaincode without down and up the whole chaincode?

JasonD (Thu, 13 Apr 2017 01:03:33 GMT):
hi, do you know how to upgrade chaincode without down and up the whole network?

JasonD (Thu, 13 Apr 2017 01:44:02 GMT):
hi, one question, I have upgrade chaincode, so there are 2 chaincode dockers, then I should remove one, right? after that, I tried to invoke chaincode function, but get this error:

JasonD (Thu, 13 Apr 2017 01:44:16 GMT):
``` error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST Error: Error: BAD_REQUEST ```

JasonD (Thu, 13 Apr 2017 01:44:55 GMT):
``` not ok 1 TypeError: Cannot read property 'stack' of undefined --- operator: error expected: |- undefined actual: |- [TypeError: Cannot read property 'stack' of undefined] at: process.onetime (/Users/david/Desktop/work/code/gopath/src/datachain/data-asset-demo/node_modules/onetime/index.js:22:12) ```

greg.haskins (Thu, 13 Apr 2017 01:48:27 GMT):
@Souvik.Dey check your grpc/grpcs specs

greg.haskins (Thu, 13 Apr 2017 01:48:49 GMT):
it looks like an SSL mismatch problem: is the endpoint you are connecting to running without TLS?

greg.haskins (Thu, 13 Apr 2017 01:49:39 GMT):
@JasonD I am not sure if upgrade is fully functional..that might be why you are struggling

greg.haskins (Thu, 13 Apr 2017 01:50:01 GMT):
we need to ask @muralisr for status, but he is OOO for a bit

greg.haskins (Thu, 13 Apr 2017 01:53:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dvtG64XDTQZYZERgC) @mastersingh24 note that I think the ca might be tagged 1.0.0-alpha.0

JasonD (Thu, 13 Apr 2017 01:59:10 GMT):
@greg.haskins thanks. It's not fully functional, so I guess just let it go and wait

JasonD (Thu, 13 Apr 2017 01:59:21 GMT):
already tested it

greg.haskins (Thu, 13 Apr 2017 01:59:55 GMT):
it sounds like that is the issue...i think its intended to support what you are asking (restart chaincode without restarting network) but its just perhaps not fully baked

JasonD (Thu, 13 Apr 2017 02:01:45 GMT):
@greg.haskins ok, thanks

greg.haskins (Thu, 13 Apr 2017 02:03:09 GMT):
follow up with @muralisr when he returns

JasonD (Thu, 13 Apr 2017 02:59:17 GMT):
anyone seen this error:

JasonD (Thu, 13 Apr 2017 02:59:21 GMT):
``` Error: Error: Failed to enroll user 'admin'. Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140387388635008:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794: ] at ClientRequest. (/data/repos/data-asset-demo/node_modules/._fabric-ca-client@1.0.0-alpha.0@fabric-ca-client/lib/FabricCAClientImpl.js:568:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at onwriteError (_stream_writable.js:345:10) at onwrite (_stream_writable.js:363:5) at WritableState.onwrite (_stream_writable.js:89:5) at fireErrorCallbacks (net.js:468:13) at hfc.newDefaultKeyValueStore.then.then (/data/repos/data-asset-demo/server/chaincode/create-channel.js:56:10) ```

JasonD (Thu, 13 Apr 2017 02:59:37 GMT):
how to fix it?

JasonD (Thu, 13 Apr 2017 03:28:54 GMT):
another question, I have my own chaincode, name assets_cc, dependency is `github.com/op/logging`, then I put this logging project to `{chaincodesrc}/vendor`. and everything works fine on my Mac. But when I deployed to server and started to instantiate this chaincode, got this error:

JasonD (Thu, 13 Apr 2017 03:28:58 GMT):
``` error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:7051". Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/assets_cc/assets_cc.go:11:2: cannot find package "github.com/op/go-logging" in any of: /opt/go/src/github.com/op/go-logging (from $GOROOT) /chaincode/input/src/github.com/op/go-logging (from $GOPATH) /opt/gopath/src/github.com/op/go-logging ```

AmberZhang (Thu, 13 Apr 2017 03:32:21 GMT):
@PushpalathaHiremath I checked with Fabric team. there is no dev plan for 'channel deletion' temporarily because the channel is immutable. But I understand it's inconvenient for testing purpose. Do you have any strong business reason for channel deletion'?

muralisr (Thu, 13 Apr 2017 04:22:03 GMT):
@JasonD there's a bit of committer side work left for Upgrade ... but that's mainly for validation and transaction filtering. Upgrade should be functional

muralisr (Thu, 13 Apr 2017 04:22:57 GMT):
^^^^ at least from CLI .... not sure about status in SDK

PushpalathaHiremath (Thu, 13 Apr 2017 04:27:47 GMT):
@AmberZhang : Thank you for the info. No. As of now i do not have any business scenario. I needed it for my testing purpose only..

assasinx93 (Thu, 13 Apr 2017 04:54:18 GMT):
Hi, is there any way to get the block data using the node sdk?

mychewcents (Thu, 13 Apr 2017 05:18:25 GMT):
Yes @assasinx93 , I just did it. But I'm not able to convert that to string, it is still in buffer format. you can use chain.queryInfo() to get the latest height of the chain and then use chain.queryBlock(number) to get Block's data. Hope it helps.

assasinx93 (Thu, 13 Apr 2017 05:18:48 GMT):
So queryBlock(number)

assasinx93 (Thu, 13 Apr 2017 05:18:53 GMT):
The number is 1,2,3?

mychewcents (Thu, 13 Apr 2017 05:19:00 GMT):
yes. Crt

mychewcents (Thu, 13 Apr 2017 05:19:43 GMT):
But the data is in Buffer. I don't know how to convert that to human readable string. I'm still struggling with that. Because it gives me unreadable form when I convert it in string of utf8 format

assasinx93 (Thu, 13 Apr 2017 05:20:00 GMT):
The method is in the chain.js file right?

mychewcents (Thu, 13 Apr 2017 05:20:06 GMT):
Crt.

assasinx93 (Thu, 13 Apr 2017 05:20:23 GMT):
Ok let me see what I can do. I'll post here if I find the answer to the buffer problem

mychewcents (Thu, 13 Apr 2017 05:20:47 GMT):
Definitely would be a great help. And please do tag me in that case.

assasinx93 (Thu, 13 Apr 2017 05:22:21 GMT):
I think my package.json is outdated

assasinx93 (Thu, 13 Apr 2017 05:22:32 GMT):
What should the new version of the client be?

assasinx93 (Thu, 13 Apr 2017 05:22:38 GMT):
@mychewcents

mychewcents (Thu, 13 Apr 2017 05:22:56 GMT):
v1.0.0-alpha I suppose

assasinx93 (Thu, 13 Apr 2017 05:30:56 GMT):
@mychewcents So after updating the fabric-client and fabric-ca packages, I'm getting the following error error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Failed to find "mspid" in the deserialized state object for the user. Likely due to an outdated state store.

assasinx93 (Thu, 13 Apr 2017 05:31:12 GMT):
Can you share your package.json with me please?

mychewcents (Thu, 13 Apr 2017 05:31:28 GMT):
Sure. wait a min.

mychewcents (Thu, 13 Apr 2017 05:33:16 GMT):
{ "name": "fabric-sdk-node", "version": "0.0.2", "main": "index.js", "repository": { "type": "gerrit", "url": "http://gerrit.hyperledger.org/r/fabric-sdk-node" }, "scripts": { "test": "gulp test-headless" }, "engines": { "node": ">=4.5.0", "npm": ">=2.15.9" }, "engine-strict": true, "engineStrict": true, "devDependencies": { "bn.js": "^4.11.6", "bunyan": "^1.8.1", "cloudant": "^1.7.0", "elliptic": "^6.3.2", "fabric-ca-client": "file:./fabric-ca-client", "fabric-client": "file:./fabric-client", "fs-extra": "^2.0.0", "gulp": "^3.9.1", "gulp-debug": "^3.0.0", "gulp-eslint": "^3.0.1", "gulp-istanbul": "^1.1.1", "gulp-jsdoc3": "^0.3.0", "gulp-tape": "0.0.9", "gulp-watch": "^4.3.11", "gunzip-maybe": "^1.3.1", "intercept-stdout": "^0.1.2", "jsrsasign": "6.2.2", "log4js": "^0.6.38", "mock-couch": "https://github.com/jimthematrix/mock-couch.git", "nano": "^6.2.0", "require-dir": "^0.3.0", "rewire": "^2.5.2", "tap-colorize": "^1.2.0", "tape": "^4.5.1", "tape-promise": "^1.1.0", "tar-fs": "^1.13.0", "winston": "^2.2.0" }, "license": "Apache-2.0", "licenses": [ { "type": "Apache-2.0", "url": "https://github.com/hyperledger/fabric/blob/master/LICENSE" } ] }

assasinx93 (Thu, 13 Apr 2017 05:37:46 GMT):
@mychewcents This is weird. I realized I was using an outdated sdk version. Once I updated it and restarted my docker container. I get the error: Error: Failed to obtain an enrolled user at ca_client.enroll.then.then.then.catch

assasinx93 (Thu, 13 Apr 2017 05:38:03 GMT):
Using latest files from the balance-transfer example.

mychewcents (Thu, 13 Apr 2017 05:38:26 GMT):
I'm using the ones in the test/integration/e2e files.

mychewcents (Thu, 13 Apr 2017 05:38:32 GMT):
Try that once.

assasinx93 (Thu, 13 Apr 2017 05:43:56 GMT):
Okay working on it

mychewcents (Thu, 13 Apr 2017 05:50:30 GMT):
guys, how is it possible that the currentHashValue and previousHashValue returned from chain.queryInfo() be same ?? That is not possible right?

mychewcents (Thu, 13 Apr 2017 05:50:38 GMT):
But, I'm getting same.

mychewcents (Thu, 13 Apr 2017 06:00:14 GMT):
@assasinx93 , got the ans. The byte buffer is to be converted to hex string and not utf-8. Thats why it wasnt showing a human readable form.

assasinx93 (Thu, 13 Apr 2017 06:01:04 GMT):
Ohh I already found that out while trying to get the TransactionId generated by utils.js. Sorry, I thought you were talking about the queryInfo() part

assasinx93 (Thu, 13 Apr 2017 06:01:43 GMT):
I ran into another problem, I was working on the older version of node sdk and the new one doesnt seem to be compatible with the docker images that I have.

assasinx93 (Thu, 13 Apr 2017 06:02:11 GMT):
Gotta spend some time in compiling docker images.

assasinx93 (Thu, 13 Apr 2017 06:02:30 GMT):
@mychewcents Thanks for the info though

mychewcents (Thu, 13 Apr 2017 06:03:40 GMT):
No Problem. @here , I need to understand why my chain.queryInfo() gives me same block hash value for previous block and the current block. Any helo will be appreciated.

mychewcents (Thu, 13 Apr 2017 06:29:17 GMT):
Found the solution, I'm writing it here so that anyone facing this error can find the answer. So, when we fire chain.queryInfo(), we get an object with CurrentHash and PreviousHash values. Now, in Fabric, both the hash values are concatenated into one byte buffer and pasted in both these values. They have given the offset to access the hash values, but I saw it just now the inportance for those. So, currentBlockHash is from 4 to 36 and previousBlockHash is from 38->70.

PushpalathaHiremath (Thu, 13 Apr 2017 08:30:05 GMT):
Hi All, i'm trying to use e2e scripts for running my custom code. For this Changing only the chain code id with channel-mychannel whichever custom chain code i run, looks like it still refers to the example_cc only.. So i tried changing the channel name as well. Which gives me : error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST debug: [Client.js]: createChannel - rejecting with Error: BAD_REQUEST error: [E2E create-channel]: Error: BAD_REQUEST at ClientDuplexStream. (/Users/Pushpalatha/go/FABRIC_V1.0/hackfest/src/github.com/hyperledger/fabric-sdk-github/node_modules/fabric-client/lib/Orderer.js:93:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/Users/Pushpalatha/go/FABRIC_V1.0/hackfest/src/github.com/hyperledger/fabric-sdk-github/node_modules/grpc/src/node/src/client.js:245:14) info: [E2E create-channel]: Successfully waited to make sure new channel was created. Do we need to update : ./test/fixtures/channel/mychannel.tx ?? I see there is some command like : configtxgen -profile peerOrg1 -outputCreateChannelTx mychannel20.tx -channelID mychannel20. Is this for that only?

mastersingh24 (Thu, 13 Apr 2017 09:21:44 GMT):
@PushpalathaHiremath - what exactly is your issue? You are trying to deploy your own chaincode and communicate with it via fabric-client?

PushpalathaHiremath (Thu, 13 Apr 2017 09:22:20 GMT):
yes...

PushpalathaHiremath (Thu, 13 Apr 2017 09:22:33 GMT):
and using the e2e scripts provided...

mychewcents (Thu, 13 Apr 2017 11:13:37 GMT):
Guys, if I want to incorporate the functionality of enrolling and registering new users in my web-application, so using fabric-ca-client pakage is enough? I have the CA Server running on a different machine.

giridharg (Thu, 13 Apr 2017 12:31:04 GMT):
Hi all, I am trying to setup node sdk in my local pc and peer containers are not starting after docker-compose up command. I have tried to bring peer containers up individually using ‘peer node start’ command but hit with same issue. Following are the log messages found in peer logs. giridhars-mbp:fixtures giridhar$ docker logs peer1 Error: unknown flag: --peer-defaultchain Usage: peer node start [flags] Flags: --peer-chaincodedev Whether peer in chaincode development mode Global Flags: --logging-level string Default logging level and overrides, see core.yaml for full syntax --test.coverprofile string Done (default "coverage.cov") -v, --version Display current version of fabric peer server It seems ‘peer node start’ command in docker-compose.yaml uses flag —peer-defaultchain which is obsolete now (a possibility). Since I am not aware what do ’—peer-defaultchain’ do, I am not able to decide which flag to use. Could anyone help in this regard.

MikeMayori (Thu, 13 Apr 2017 16:16:58 GMT):
Mr. @mastersingh24 , Hi.. do you happend to experiment with the api calls chain, network and so on , using the new HFC ??? or perhaps directly to the 0.0.0.0:7050 api

MikeMayori (Thu, 13 Apr 2017 16:16:58 GMT):
Mr. @mastersingh24 , Hi.. do you happend to experiment with the api calls chain, network and so on , using the new HFC ??? or perhaps directly to the 0.0.0.0:7050 api ?

rliu (Thu, 13 Apr 2017 17:18:58 GMT):
@jimthematrix @dave.enyeart Hi Dave and Jim, following the discussion yesterday, could you be a little more specific about how to get read/write set from transactions in the ledger? I followed bretharrison's sample code to get transaction action payload, proposal payload, and proposal response payload, but don't see anything related to read/write sets in these payloads. Where is the read/write set located? How can I retrieve it? Thanks. try { var payload = commonProto.Payload.decode(processed_transaction.transactionEnvelope.getPayload()); var channel_header = commonProto.ChannelHeader.decode(payload.header.getChannelHeader()); logger.info(' Chain queryTransaction - transaction ID :: %s', channel_header.tx_id); var transaction = transProto.Transaction.decode(payload.data); var actions = transaction.getActions(); if(actions) for(var i in actions) { let transaction_action = actions[i]; var transaction_action_header = commonProto.SignatureHeader.decode(transaction_action.getHeader()); var creator = identityProto.SerializedIdentity.decode(transaction_action_header.getCreator()); logger.info(' Creator mspid::%s',creator.getMspid()); var chaincode_action_payload = transProto.ChaincodeActionPayload.decode(transaction_action.getPayload()); var chaincode_proposal_payload = proposalProto.ChaincodeProposalPayload.decode(chaincode_action_payload.getChaincodeProposalPayload()); logger.info(' ===>>>>> proposal arguments :: ===>>>> %s',chaincode_proposal_payload.getInput().toString('utf8')); } } catch(err) { logger.error(err); throw new Error(err.stack ? err.stack : err); }

dave.enyeart (Thu, 13 Apr 2017 18:24:33 GMT):
@rliu It is a little complicated... ProposalResponsePayload has a an 'extension' which is a serialized 'ChaincodeAction'. ChaincodeAction has a 'results' which is a serialized 'TxReadWriteSet'. TxReadWriteSet has N 'rwset' which is a serialized 'KVRWSet'. You can grep /fabric/protos directory to find more details on each of these structures. This being said, you are probably better off waiting for SDK to provide a utility function that returns the TxReadWriteSet, or better yet, the N KVRWSets (so that client doesn't have to deserialize them). @jimthematrix @rickr @bretharrison

dave.enyeart (Thu, 13 Apr 2017 18:31:11 GMT):
I've created Jira item for this: https://jira.hyperledger.org/browse/FAB-3150

assasinx93 (Fri, 14 Apr 2017 03:28:38 GMT):
@mychewcents Hey, so I got the fabric node sdk 1.0.0 alpha up and running. I used chain.queryInfo() and got an [object Promise] back if I use toString(). How do I extract the height from the response?

JasonD (Fri, 14 Apr 2017 07:32:24 GMT):
`chain.queryInfo().then((result) => {})`

JasonD (Fri, 14 Apr 2017 07:32:55 GMT):
@assasinx93 try it

normand (Fri, 14 Apr 2017 11:23:45 GMT):
Hi guys! Can someone help me with an error from v1.0 alpha (deployment via fabric-sdk-node, environment built from /test/fixtures/docker-compose.yaml)?

normand (Fri, 14 Apr 2017 11:23:58 GMT):
'debug: [Peer.js]: Received proposal response from: grpcs://localhost:7051 status: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/example_cc/example_cc.go:24:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT) /chaincode/input/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim chaincode/input/src/github.com/example_cc/example_cc.go:25:2: cannot find package "github.com/hyperledger/fabric/protos/peer" in any of: /opt/go/src/github.com/hyperledger/fabric/protos/peer (from $GOROOT) /chaincode/input/src/github.com/hyperledger/fabric/protos/peer (from $GOPATH) /opt/gopath/src/github.com/hyperledger/fabric/protos/peer "'

normand (Fri, 14 Apr 2017 11:23:58 GMT):
debug: [Peer.js]: Received proposal response from: grpcs://localhost:7051 status: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/example_cc/example_cc.go:24:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT) /chaincode/input/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim chaincode/input/src/github.com/example_cc/example_cc.go:25:2: cannot find package "github.com/hyperledger/fabric/protos/peer" in any of: /opt/go/src/github.com/hyperledger/fabric/protos/peer (from $GOROOT) /chaincode/input/src/github.com/hyperledger/fabric/protos/peer (from $GOPATH) /opt/gopath/src/github.com/hyperledger/fabric/protos/peer "

simcan (Fri, 14 Apr 2017 13:11:11 GMT):
@normand maybe u should have these files under $GOPATH/github.com/hyperledger/fabric/core/chaincode/shim: chaincode.go inprocstream.go mockstub.go shim_test.go chaincode.go.save interfaces.go mockstub_test.go handler.go java response.go

bretharrison (Fri, 14 Apr 2017 13:51:33 GMT):
@NiketYende here is a change to allow for easier conversion of the timestamp which has seconds and nano seconds to a Date object --- https://gerrit.hyperledger.org/r/#/c/8041/

bretharrison (Fri, 14 Apr 2017 13:52:32 GMT):
Notice the where is it used on the channel header timestamp in the query.js test

bretharrison (Fri, 14 Apr 2017 13:52:32 GMT):
Notice where it is used on the channel header timestamp in the query.js test

assasinx93 (Fri, 14 Apr 2017 16:55:44 GMT):
@JasonD Thanks a lot. I'm new to node.js so didn't pick that up directly. It works now. I'm using the fields from the protos files. Should be applicable to queryBlockByHash() too

assasinx93 (Fri, 14 Apr 2017 16:56:09 GMT):
Also, another question, is it possible to get the details of the previous transactions that happened?

assasinx93 (Fri, 14 Apr 2017 17:32:03 GMT):
@here Is there any way to attach a peer to an already existing ledger while joining a channel? I wanted to kill a docker image and then using the e2e example.. 1. Create channel 2. Join channel But join channel gives an error : LedgerId already exists

mastersingh24 (Fri, 14 Apr 2017 20:09:11 GMT):
@assasinx93 - you'll need to actually delete your peer container and create a new one of you want to re-run things like the join command. If the peer container was already part of the channel and the same ordering service still exists, then you should just need to restart them and not run the create / join channel commands again

assasinx93 (Fri, 14 Apr 2017 20:37:50 GMT):
@mastersingh24 Thanks. I'll try that out. So basically what you're saying is just run docker-compose kill, then docker-compose up -d and everything should still be the same right? And directly run invoke-transaction.js?

mastersingh24 (Fri, 14 Apr 2017 20:39:54 GMT):
correct

assasinx93 (Fri, 14 Apr 2017 20:41:07 GMT):
All right. Thanks

arunkarthikeyan (Sat, 15 Apr 2017 00:53:31 GMT):
Has joined the channel.

assasinx93 (Sat, 15 Apr 2017 16:38:48 GMT):
@here What information does the queryBlockNumber() method give. I was going through Block.js and the protos file but I couldn't find any information about the transaction in there. Is there a way to get transaction details back from the ledger?

Ratnakar (Sat, 15 Apr 2017 16:40:50 GMT):
@assasinx93 please check the sdk documention https://fabric-sdk-node.github.io/Chain.html#queryBlock

assasinx93 (Sat, 15 Apr 2017 16:43:27 GMT):
Yes, I have seen that. But what exactly would the block object contain. The block.js file is like a maze and I sort of got lost. I'm new to development and still learning. If you could gimme some pointers it would be appreciated.

assasinx93 (Sat, 15 Apr 2017 16:43:32 GMT):
@Ratnakar

mychewcents (Sat, 15 Apr 2017 18:16:21 GMT):
@assasinx93 , so try result.height or result.currentBlockHash.... you will get the number and buffer in the second case. That is what we are trying to find.

mychewcents (Sat, 15 Apr 2017 18:18:01 GMT):
I'm having one doubt. I want to build a UI, where when I press at the current block hash value, I should be able to get the transaction details, something like key and value used for that block. I've been in and out of chain.queryBlockByHash, chain.queryBlock(number), but couldn't find any suitable answer. It would be helpful, if someone could answer it. It is a bit urgent too.

mychewcents (Sat, 15 Apr 2017 18:28:38 GMT):
Also, what is transaction number in chain.queryTransaction... I cannot find anything on that too.

assasinx93 (Sat, 15 Apr 2017 18:42:37 GMT):
I think the transaction number should be transaction ID which is a hex string

assasinx93 (Sat, 15 Apr 2017 18:42:39 GMT):
@mychewcents

mychewcents (Sat, 15 Apr 2017 18:43:14 GMT):
No @assasinx93 , it asks for a number. Not a hex string. I tried that.

assasinx93 (Sat, 15 Apr 2017 18:44:02 GMT):
I need the same answer as you. How exactly do we get transaction details from a block? Please tag me if someone answers your question

mychewcents (Sat, 15 Apr 2017 18:44:17 GMT):
Sure @assasinx93

adeelqureshi (Sun, 16 Apr 2017 17:19:49 GMT):
Has joined the channel.

mochechan (Mon, 17 Apr 2017 02:27:50 GMT):
Has joined the channel.

mochechan (Mon, 17 Apr 2017 02:28:01 GMT):
https://github.com/hyperledger/fabric-sdk-node I have built a Fabric 1.0 environment according the previous document. My built environment passes all tests, but cannot run examples/balance-transfer. The error message is described as follows: GOPATH=$PWD/../../test/fixtures node deploy.js info: Returning a new winston logger with default configurations info: [Chain.js]: Constructed Chain instance: name - fabric-client1, securityEnabled: true, TCert download batch size: 10, network mode: true /home/a/.go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/utils.js:294 throw new Error('PEM encoded certificate is required.'); ^ Error: PEM encoded certificate is required. at new (/home/a/.go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/utils.js:294:11) at Orderer.Remote (/home/a/.go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Remote.js:72:20) at Orderer (/home/a/.go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:44:3) at init (/home/a/.go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/deploy.js:47:19) at Object. (/home/a/.go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/deploy.js:43:1) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) The problem cannot be solved after adding the PEM {pem: "xxx"} as the second parameter. How to solve this problem?

AbhilekhSingh (Mon, 17 Apr 2017 07:30:33 GMT):
As per doc transaction must have tcert in it's header

AbhilekhSingh (Mon, 17 Apr 2017 07:30:50 GMT):
But I still see ecert attached to the transaction

AbhilekhSingh (Mon, 17 Apr 2017 07:31:09 GMT):
Is tcert not implemented in SDK ?

AbhilekhSingh (Mon, 17 Apr 2017 07:31:26 GMT):
I do see tcert-batch-size property but don't see it's usage

ssaddem (Mon, 17 Apr 2017 08:32:04 GMT):
hi in open network (without CA) how can i query chaincode without enroll user ?

PushpalathaHiremath (Mon, 17 Apr 2017 08:49:03 GMT):
Hi All, As in fabric 0.6 version hfc we had build-chaincode where the chain code used to get copied , where will it be in v1.0? I'm using some static configuration files in my chain code, so i want to know the chiaincode's path.

mastersingh24 (Mon, 17 Apr 2017 09:46:16 GMT):
@PushpalathaHiremath - in v1.0.0 we are much more strict in terms of chaincode packaging so you cannot rely on configuration files as part of the actual chaincode itself

PushpalathaHiremath (Mon, 17 Apr 2017 09:58:27 GMT):
@mastersingh24 : Okay.. So only way is to store the data is ledger? Hmm..

PushpalathaHiremath (Mon, 17 Apr 2017 09:58:27 GMT):
@mastersingh24 : Okay.. So only way is to store the data is ledger? Hmm.. We do have very large and frequently changing config files.. That's why we used static files instead storing into ledger.. Anyways, if we do not have any other option may be we need to store into ledger / store into off block / may be we need to have it in application layer only ..

ssaddem (Mon, 17 Apr 2017 10:13:19 GMT):
@here hi in open network (without CA) how can i query chaincode without enroll user ?

AbhilekhSingh (Mon, 17 Apr 2017 10:31:49 GMT):
Can anyone answer this question please?

AbhilekhSingh (Mon, 17 Apr 2017 10:31:50 GMT):
As per doc transaction must have tcert in it's header But I still see ecert attached to the transaction Is tcert not implemented in SDK ? I do see tcert-batch-size property but don't see it's usage

Souvik.Dey (Mon, 17 Apr 2017 12:29:48 GMT):
Hi guys! Can someone help me with an error from v1.0 alpha error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Failed to find "mspid" in the deserialized state object for the user. Likely due to an outdated state store. at User.fromString (/home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/fabric-client/lib/User.js:225:10) at /home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/fabric-client/lib/Client.js:299:22 error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Failed to find "mspid" in the deserialized state object for the user. Likely due to an outdated state store. at User.fromString (/home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/fabric-client/lib/User.js:225:10) at /home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/fabric-client/lib/Client.js:299:22 [2017-04-17 11:18:24.794] [ERROR] DEPLOY - Error: Failed to find "mspid" in the deserialized state object for the user. Likely due to an outdated state store. at User.fromString (/home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/fabric-client/lib/User.js:225:10) at /home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/fabric-client/lib/Client.js:299:22 ------Please help

Souvik.Dey (Mon, 17 Apr 2017 13:11:30 GMT):
current state of the member of User.js is

Souvik.Dey (Mon, 17 Apr 2017 13:11:32 GMT):
state---------{"name":"admin","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"8ea630f629f6cf251d7744ee35c6fee0f6d1240d4ffcadd553e1eb8cc18c2a14","identity":{"id":"testIdentity","certificate":"-----BEGIN CERTIFICATE-----\nMIIBZTCCAQqgAwIBAgIUXbpkjSgdr4HmozbebBP0QbcW0NMwCgYIKoZIzj0EAwIw\nEzERMA8GA1UEAwwIcGVlck9yZzAwHhcNMTcwNDEyMDU0OTAwWhcNMTgwMzExMTM0\nOTAwWjAQMQ4wDAYDVQQDEwVhZG1pbjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBP7oIEIN1he/pjuT3pDUdzq/Y3fUmtqZ86sfPY1sWzKIKkuxsVo3Qo9fdlhrQfFH\nASAJpTp0fQ/tuuorb2T1aiejPzA9MA4GA1UdDwEB/wQEAwICBDAMBgNVHRMBAf8E\nAjAAMB0GA1UdDgQWBBT3C36LQG9lX7rk1fMsEKXjd6qJgzAKBggqhkjOPQQDAgNJ\nADBGAiEA1hXODUlplHrZRVXHrCz8PfeojfWGsEySf3vUEezXPfwCIQDXIg0hl33A\nR2DzUFaHghufoaFHtiSEpSH8+J5CssQZDw==\n-----END CERTIFICATE-----\n"}}}

Souvik.Dey (Mon, 17 Apr 2017 13:12:42 GMT):
state.mspid is missing in state object.

Souvik.Dey (Mon, 17 Apr 2017 13:12:56 GMT):
What change do we need for that??

net0410 (Mon, 17 Apr 2017 13:30:30 GMT):
Has joined the channel.

Souvik.Dey (Mon, 17 Apr 2017 13:48:04 GMT):
what value state.mspid expected in User.js

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

ssaddem (Mon, 17 Apr 2017 15:29:17 GMT):
GRPC client got an error response from the peer. Error: Transaction is not valid. Got [��H*�ѐ�], expected [e79fb03a1e44fb55358cc4adcdf91c0d3627fe36f64c60f9691f04e07c7a7c5c]

ssaddem (Mon, 17 Apr 2017 15:29:28 GMT):
i got this error

ssaddem (Mon, 17 Apr 2017 15:29:37 GMT):
any one can help me please ?

jtrayfield (Mon, 17 Apr 2017 19:44:44 GMT):
Hi, I have been trying to call chain.sendInstantiateProposal(request) I'm getting back this error: error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: open /var/hyperledger/production/chaincodes/theseam13.1.02: no such file or directory at /Users/jtray/git/theseam/node_modules/grpc/src/node/src/client.js:434:17

jtrayfield (Mon, 17 Apr 2017 19:45:21 GMT):
I tried creating /var/hyperledger... but it didn't help

Souvik.Dey (Mon, 17 Apr 2017 19:56:28 GMT):
error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7051". Error: Received unknown invoke function name - 'invoke' at /home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Received unknown invoke function name - 'invoke' at /home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:8051". Error: Received unknown invoke function name - 'invoke' at /home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Received unknown invoke function name - 'invoke' at /home/ubuntu/ibm_hyperledger_1/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 not ok 2 checking query results are correct that user b has 300 now after the move

Souvik.Dey (Mon, 17 Apr 2017 19:56:59 GMT):
what is function for invoke??

Souvik.Dey (Mon, 17 Apr 2017 19:56:59 GMT):
I just follow the document

jtrayfield (Mon, 17 Apr 2017 20:09:45 GMT):
@Souvik.Dey func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response {

jtrayfield (Mon, 17 Apr 2017 20:09:49 GMT):
try capital I

assasinx93 (Mon, 17 Apr 2017 21:47:51 GMT):
@here Is there anyone who knows how to decode the read-write sets of a block?

net0310 (Mon, 17 Apr 2017 23:54:25 GMT):
Has joined the channel.

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

Ratnakar (Tue, 18 Apr 2017 00:47:12 GMT):
@jtrayfield seems like your chaincode `theseam13` is not installed on that peer. make sure the chaincode is installed on that peer

jtrayfield (Tue, 18 Apr 2017 00:51:30 GMT):
@Ratnakar I tried installing it first, the install response contains: resp { version: 0, timestamp: null, response: { status: 200, message: '', payload: }, payload: , endorsement: null } checking response checking status resp { version: 0, timestamp: null, response: { status: 200, message: '', payload: }, payload: , endorsement: null } checking response checking status

jtrayfield (Tue, 18 Apr 2017 00:54:11 GMT):
what do I call next after install? If I call instantiateChaincode(), it never returns

jtrayfield (Tue, 18 Apr 2017 00:54:50 GMT):
am I supposed to call sendTransaction() with the install result?

Ratnakar (Tue, 18 Apr 2017 00:59:51 GMT):
@jtrayfield Not sure which sample you are referring. If you see e2e.js Unit tests you will see the below flow Once you receive the response for `chain.sendInstallProposal` you need to follow the below steps as per e2e unit tests flow ``` chain.initialize(); chain.sendInstantiateProposal(request); chain.sendTransaction(request) ```

Ratnakar (Tue, 18 Apr 2017 00:59:51 GMT):
@jtrayfield Not sure which sample you are referring. If you see e2e.js Unit tests you will see the below flow Once you receive the response for `chain.sendInstallProposal` you need to follow these steps as per e2e unit tests flow ``` chain.initialize(); chain.sendInstantiateProposal(request); chain.sendTransaction(request) ```

jtrayfield (Tue, 18 Apr 2017 01:00:32 GMT):
@Ratnakar thanks!

Ratnakar (Tue, 18 Apr 2017 01:02:55 GMT):
I would check the below links for complete flow https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e.js https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/e2eUtils.js

jtrayfield (Tue, 18 Apr 2017 01:03:33 GMT):
thanks

shibo.lin (Tue, 18 Apr 2017 01:12:28 GMT):
Has joined the channel.

net0310 (Tue, 18 Apr 2017 05:35:19 GMT):
https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer

net0310 (Tue, 18 Apr 2017 05:35:26 GMT):
it seems does not work any more. any idea?

net0310 (Tue, 18 Apr 2017 05:35:44 GMT):
``` error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Failed to find "mspid" in the deserialized state object for the user. Likely due to an outdated state store. at User.fromString (/Users/simon/test/node_modules/fabric-client/lib/User.js:225:10) at /Users/simon/test/node_modules/fabric-client/lib/Client.js:299:22 error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Failed to find "mspid" in the deserialized state object for the user. Likely due to an outdated state store. at User.fromString (/Users/simon/test/node_modules/fabric-client/lib/User.js:225:10) at /Users/simon/test/node_modules/fabric-client/lib/Client.js:299:22 [2017-04-18 14:31:02.646] [ERROR] DEPLOY - Error: Failed to find "mspid" in the deserialized state object for the user. Likely due to an outdated state store. at User.fromString (/Users/simon/test/node_modules/fabric-client/lib/User.js:225:10) at /Users/simon/test/node_modules/fabric-client/lib/Client.js:299:22 ```

mochechan (Tue, 18 Apr 2017 05:40:50 GMT):
I just follow the document. https://github.com/hyperledger/fabric-sdk-node/blob/master/README.md All tests can pass if 1) fabric commit is 397f5de8a7787b4ce2a52a81448fd35258ab610e 2) fabric-ca commit is f0f86b7e122569604bfdfbbb482da01458213442 3) fabric-sdk-node commit is fba8834b241a5f8941de6ad130f1ff9156ad5074. However, most tests fail if I checkout the latest commit now. Any suggest is welcome. I like the latest commit.

assasinx93 (Tue, 18 Apr 2017 05:52:44 GMT):
Yeah the latest commit is not compliant with v1.0.0-alpha

assasinx93 (Tue, 18 Apr 2017 05:53:32 GMT):
@net0310 I'm using the e2e example under test/integration and that works fine Built my chaincode using the .js programs from there

net0310 (Tue, 18 Apr 2017 05:54:20 GMT):
@assasinx93 thanks

ssaddem (Tue, 18 Apr 2017 08:07:04 GMT):
hi i have some problem with utils.buildTransactionID is not a function there is any alternatives ?

ssaddem (Tue, 18 Apr 2017 08:07:08 GMT):
tx

ssaddem (Tue, 18 Apr 2017 08:07:08 GMT):
thx :)

Souvik.Dey (Tue, 18 Apr 2017 08:54:27 GMT):
error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7051". Error: Received unknown invoke function name - 'invoke' at /home/ubuntu/hyperledger_1/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Received unknown invoke function name - 'invoke' at /home/ubuntu/hyperledger_1/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:8051". Error: Received unknown invoke function name - 'invoke' at /home/ubuntu/hyperledger_1/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Received unknown invoke function name - 'invoke' at /home/ubuntu/hyperledger_1/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 not ok 2 checking query results are correct that user b has 300 now after the move --- operator: equal expected: |- '300' actual: |- 'Error: Received unknown invoke function name - \'invoke\'' at: hfc.newDefaultKeyValueStore.then.then.then (/home/ubuntu/hyperledger_1/fabric-sdk-node/test/integration/e2e/query.js:106:7) ... not ok 3 checking query results are correct that user b has 300 now after the move

Souvik.Dey (Tue, 18 Apr 2017 08:55:16 GMT):
I just follow the document http://fabric-rtd.readthedocs.io/en/latest/marbles.html

Souvik.Dey (Tue, 18 Apr 2017 08:55:59 GMT):
and try to run node test/integration/e2e/query.js

Souvik.Dey (Tue, 18 Apr 2017 08:56:10 GMT):
Please provide any solution for that

sangramkhaire (Tue, 18 Apr 2017 11:19:35 GMT):
@bretharrison Hi, I am trying to get transaction details using event hub, I am getting proposalRespPayload.extension.results as empty buffer. Below is the json form of extension objet

sangramkhaire (Tue, 18 Apr 2017 11:19:37 GMT):
{ results: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false }, events: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false }, response: { status: 200, message: '', payload: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } } }

sangramkhaire (Tue, 18 Apr 2017 11:22:12 GMT):
I am using following snippet

sangramkhaire (Tue, 18 Apr 2017 11:22:13 GMT):
EventHub.prototype.txCallback = function(block){ logger.debug('txCallback block=%s', block.header.number); var eh = this; var txStatusCodes = block.metadata.metadata[_common.BlockMetadataIndex.TRANSACTIONS_FILTER]; for (var index=0; index < block.data.data.length; index++) { logger.debug('txCallback - trans index=%s',index); try { var env = _common.Envelope.decode(block.data.data[index]); var payload = _common.Payload.decode(env.payload); var channel_header = _common.ChannelHeader.decode(payload.header.channel_header); var tx = _transProto.Transaction.decode(payload.data); var chaincodeActionPayload = _ccTransProto.ChaincodeActionPayload.decode(tx.actions[0].payload); var propRespPayload = _responseProto.ProposalResponsePayload.decode(chaincodeActionPayload.action.proposal_response_payload); //logger.info(util.inspect(chaincodeActionPayload)); var chaincode_proposal_payload = _ccProposalProto.ChaincodeProposalPayload.decode(chaincodeActionPayload.getChaincodeProposalPayload()); logger.info(' ===>>>>> proposal arguments :: ===>>>> %s',chaincode_proposal_payload.getInput().toString('utf8')); //logger.info(util.inspect(tx)); var caPayload = _ccProposalProto.ChaincodeAction.decode(propRespPayload.extension); logger.info(util.inspect( caPayload)); //var data = _common.Payload.decode(caPayload.response.payload) logger.info(caPayload.response.payload.toString('utf8')); logger.info(caPayload.results.toString('utf8')); //var ccEvent = _ccEventProto.ChaincodeEvent.decode(caPayload.events); //logger.info(util.inspect(ccEvent)); //var cbtable = eh.chaincodeRegistrants.get(ccEvent.chaincode_id); } catch (err) { logger.error('Error unmarshalling transaction from block=', err); break; } //var val_code = convertValidationCode(txStatusCodes[index]); logger.debug('txCallback - txid=%s ', channel_header.tx_id); var cb = eh.txRegistrants.get(channel_header.tx_id); if (cb){ logger.debug('txCallback - about to call the transaction call back for code=%s tx=%s', val_code, channel_header.tx_id); cb(channel_header.tx_id, val_code); }

sangramkhaire (Tue, 18 Apr 2017 11:24:05 GMT):
I can get non empty result buffer if I iterate through block using query.js

sangramkhaire (Tue, 18 Apr 2017 11:26:37 GMT):
Is there any difference in result buffer of extension object for eventhub when compared with query.js ?

bretharrison (Tue, 18 Apr 2017 11:49:04 GMT):
@sangramkhaire looks like you may be decoding the same byte data twice in the area of chaincode proposal payload. Keep in mind with these protobuf's that you can only call the decode once on byte data. There is only one byte buffer and all child byte buffers of inner objects are located within the parent buffer.

bretharrison (Tue, 18 Apr 2017 11:50:27 GMT):
Work your way down the objects decoding and never try to call decode on a parent again.

pd93 (Tue, 18 Apr 2017 13:34:52 GMT):
When I run chain.queryInfo(), I get the following object returned to me: ``` { height: Long { low: 4, high: 0, unsigned: true }, currentBlockHash: ByteBuffer { buffer: , offset: 4, markedOffset: -1, limit: 36, littleEndian: true, noAssert: false }, previousBlockHash: ByteBuffer { buffer: , offset: 38, markedOffset: -1, limit: 70, littleEndian: true, noAssert: false } } ``` I can extract the height by doing `result.height.toString();` But I'm struggling to extract the current/previousBlockHash from their respective bytebuffer objects. How should I be going about this?

pd93 (Tue, 18 Apr 2017 13:34:52 GMT):
When I run chain.queryInfo(), I get the following object returned to me: ``` { height: Long { low: 4, high: 0, unsigned: true }, currentBlockHash: ByteBuffer { buffer: , offset: 4, markedOffset: -1, limit: 36, littleEndian: true, noAssert: false }, previousBlockHash: ByteBuffer { buffer: , offset: 38, markedOffset: -1, limit: 70, littleEndian: true, noAssert: false } } ``` I can extract the height by doing `result.height.toString();` But I'm struggling to extract the current/previousBlockHash from their respective bytebuffer objects. How should I be going about this? I've tried `result.currentBlockHash.toBuffer()` Which correctly outputs a buffer obj, but I can't get this to turn into a utf-8 encoded string

binhn (Tue, 18 Apr 2017 14:10:18 GMT):
I merged https://gerrit.hyperledger.org/r/#/c/8113 very late last night and didn't think straight that it would impact SDK. The CR changes the life-cycle system chaincode from LCCC to LSCC

assasinx93 (Tue, 18 Apr 2017 14:50:18 GMT):
@Souvik.Dey You are using marbles chaincode whereas the e2e test is for the example_cc chaincode (balance transfer). Please do not perform the step where you delete the chaincode and replace it with marbles chaincode.

assasinx93 (Tue, 18 Apr 2017 14:51:44 GMT):
@pd93 You can use result.height to print the height. You can use .toString('hex') to convert hash to string.

pd93 (Tue, 18 Apr 2017 14:56:45 GMT):
@assasinx93 Thanks, that seems to work. I didn't realise that the hex in the buffer would decode directly to the same hex string. I assumed there was some encoding involved :)

jtrayfield (Tue, 18 Apr 2017 15:46:36 GMT):
@Ratnakar got install/instantiate to work, thanks for the help. I'm using libraries, but if I specify the root directory in the install, the instantiate fails with 'no buildable go source'. if I specify the go src directory, it can't find the libraries

jtrayfield (Tue, 18 Apr 2017 15:47:05 GMT):
so I put all the libraries in the vendor subdirectory under the go source. Is there a better solution?

Ratnakar (Tue, 18 Apr 2017 17:03:59 GMT):
@jtrayfield I would check the below to understand more on GOPATH and chaincodePath https://github.com/hyperledger/fabric-sdk-node/blob/master/test/unit/util.js#L48 https://github.com/hyperledger/fabric-sdk-node/blob/master/test/unit/util.js#L31 It is recommended to set the GOPATH (To the chaincode folder) explicitly in your Node program, and pass the chaincodePath as shown in above

wlahti (Tue, 18 Apr 2017 18:18:17 GMT):
Has joined the channel.

rangak (Tue, 18 Apr 2017 20:12:00 GMT):
Has joined the channel.

silentspark (Wed, 19 Apr 2017 07:24:09 GMT):
Has joined the channel.

silentspark (Wed, 19 Apr 2017 08:25:46 GMT):
@here Seems currently SDK has not supported getting tcert from fabric-ca and using it to sign transaction. May I know when this feature will be available? Thx

yacovm (Wed, 19 Apr 2017 09:36:29 GMT):
@silentspark ask in #fabric-crypto

kuangchao (Wed, 19 Apr 2017 09:58:58 GMT):
sudo npm install not work! long time

kuangchao (Wed, 19 Apr 2017 09:59:00 GMT):

Message Attachments

choas (Wed, 19 Apr 2017 10:09:35 GMT):
@kuangchao which node version are you using?

PushpalathaHiremath (Wed, 19 Apr 2017 11:00:34 GMT):
Anyone know the issue - error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7051". Error: Failed to execute transaction (Timeout expired while executing transaction) at /Users/Pushpalatha/Code/chainwalk/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to execute transaction (Timeout expired while executing transaction) at /Users/Pushpalatha/Code/chainwalk/node_modules/grpc/src/node/src/client.js:434:17 [2017-04-19 16:17:01.968] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-04-19 16:17:01.968] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-04-19 16:17:01.969] [ERROR] instantiate-chaincode - Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at InstantiateChaincode.hfc.newDefaultKeyValueStore.then.then.then.then (/Users/Pushpalatha/Code/chainwalk/chainwalker/sdk/instantiate-chaincode.js:205:10) at process._tickCallback (internal/process/next_tick.js:109:7) (node:16951) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at InstantiateChaincode.hfc.newDefaultKeyValueStore.then.then.then.then (/Users/Pushpalatha/Code/chainwalk/chainwalker/sdk/instantiate-chaincode.js:205:10) at process._tickCallback (internal/process/next_tick.js:109:7)

nadejdaceban (Wed, 19 Apr 2017 12:43:46 GMT):
Has joined the channel.

jtrayfield (Wed, 19 Apr 2017 16:22:34 GMT):
@Ratnakar I think the difference between what the example does and what I'm doing is that I'm using libraries other than hyperledger fabric....

rameshthoomu (Wed, 19 Apr 2017 19:05:56 GMT):
@jimthematrix matrix I see node e2e tests are failing on latest sdk-node commits.. Seems there is some problem in ca configuration file.. check this ``` Attaching to ca_peerOrg2, orderer0, ca_peerOrg1, couchdb, peer0, peer2, peer1, peer3 ca_peerOrg2 | 2017/04/19 18:51:45 [INFO] Configuration file location: /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml ca_peerOrg2 | Error: ca.name property is required but is missing from the configuration file ca_peerOrg2 | Usage ```

rameshthoomu (Wed, 19 Apr 2017 19:05:56 GMT):
@jimthematrix I see node e2e tests are failing on latest sdk-node commits.. Seems there is some problem in ca configuration file.. check this ``` Attaching to ca_peerOrg2, orderer0, ca_peerOrg1, couchdb, peer0, peer2, peer1, peer3 ca_peerOrg2 | 2017/04/19 18:51:45 [INFO] Configuration file location: /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml ca_peerOrg2 | Error: ca.name property is required but is missing from the configuration file ca_peerOrg2 | Usage ```

jimthematrix (Wed, 19 Apr 2017 20:00:44 GMT):
@rameshthoomu I've been trying to get this CR verified which has the fix: https://gerrit.hyperledger.org/r/#/c/7909/

jimthematrix (Wed, 19 Apr 2017 20:01:22 GMT):
but as discussed on #fabric-ci channel the builds are very slow (gets stuck for a long time after test is complete)

MikeMoreira (Wed, 19 Apr 2017 20:16:03 GMT):
Has joined the channel.

MikeMoreira (Wed, 19 Apr 2017 20:18:03 GMT):
Hi guys, we are trying to use the vNext implementation in Blockchain and in our tests we are getting this error " Handshaker factory creation failed with TSI_INVALID_ARGUMENT.". Do you got some like this?

dave.enyeart (Wed, 19 Apr 2017 20:30:57 GMT):
@jimthematrix @bretharrison Peer CSCC has APIs for GetChannels() and GetConfigBlock() for a channel. Can you confirm whether Node SDK exposes these?

jimthematrix (Wed, 19 Apr 2017 20:34:18 GMT):
@rameshthoomu @rjones both x86 and s390 builds for https://gerrit.hyperledger.org/r/#/c/7909/ have successfully completed the test phase, but have been stuck for the past 30min

bretharrison (Wed, 19 Apr 2017 20:36:32 GMT):
@dave.enyeart We expose the GetChannels() but not the getConfigBlock()

vdods (Wed, 19 Apr 2017 21:31:24 GMT):
Can anyone point me to an example app using fabric-client and fabric-ca-client, that isn't an integration test? I'm finding it hard to turn e2e code into code that makes sense for a web app. In particular, every procedure (e.g. instantiate, install, invoke, etc) reconstructing all the client/chain/orderer structures and re-reading the certs and other crypto material. I'm trying to create my own chopped down version of e2e that is minimal in some sense.

vdods (Wed, 19 Apr 2017 21:39:35 GMT):
My goal really is a minimal example web app

vdods (Wed, 19 Apr 2017 21:39:48 GMT):
Without all the extra possible configuration

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

ada-wang (Thu, 20 Apr 2017 01:56:56 GMT):
Has joined the channel.

Lin-YiTang (Thu, 20 Apr 2017 02:06:17 GMT):
latest sdk-node on fabric latest can't work?

JasonD (Thu, 20 Apr 2017 04:42:36 GMT):
hi, I have one question, since data stored in blocks, how to connnect data with block? for example, `data := stub.GetState(key)`, how to know which block Fabric save `data`?

JasonD (Thu, 20 Apr 2017 05:56:11 GMT):
anyone seen this? `[invoke-chaincode]: The balance transfer transaction was invalid, code = MVCC_READ_CONFLICT`

Stones2017 (Thu, 20 Apr 2017 08:04:54 GMT):
Has joined the channel.

ZengLingYou (Thu, 20 Apr 2017 09:26:24 GMT):
Has joined the channel.

JasonD (Thu, 20 Apr 2017 10:01:29 GMT):
another question: `chain.queryBlock(height)`, this function will return block info, like this `{header: {XXX}, previous_hash: {aaa}, data: {GGG}}`

JasonD (Thu, 20 Apr 2017 10:03:03 GMT):
`previous_hash` include `buffer, offset, markedOffset...` so how to convert previous_hash to a string like `VDSXD3LZC7GROBOFVMPJEIHKP0OJOUDBJ`

JasonD (Thu, 20 Apr 2017 10:06:32 GMT):
oh, just use toString('base64')

JasonD (Thu, 20 Apr 2017 10:10:39 GMT):
and how to get a block's timestamp ?

kuangchao (Thu, 20 Apr 2017 10:41:03 GMT):
@choas node 6.9.5

kuangchao (Thu, 20 Apr 2017 10:45:21 GMT):

Message Attachments

Ying (Thu, 20 Apr 2017 12:15:59 GMT):
Recent commits make transactions becoming slower and slower :worried:. Any plan to accelerate?

mastersingh24 (Thu, 20 Apr 2017 13:22:48 GMT):
[ Did not want this to go unanswered. I'd say right now there is not a great answer and I've seen others struggle as well. I also don't think people should nor should have to look into the e2e tests to create samples. Would you mind creating JIRA ticket for the node skd component (probably make it an improvement) and write up your struggle and the types of samples you like to see?](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ofsdzkwAhQidRraCS) @vdods

davidkel (Thu, 20 Apr 2017 14:29:52 GMT):
I've been using the latest docker images published with latest node-sdk levels (which include the signed event code). I'm failling to perform an instantiate proposal and the error I get back is ``` Error: Received message larger than max (7633274 vs. 4194304) at /home/vagrant/src/fabric-composer/packages/composer-connector-hlfv1/node_modules/grpc/src/node/src/client.js:434:17 ``` I can't see anything obvious in the peer logs so it looks like it's the client that is complaining. grpc has a 4Mb limit by default so this may be the issue or the message is unnecessarily big ?

davidkel (Thu, 20 Apr 2017 14:29:52 GMT):
I've been using the latest docker images published with latest node-sdk levels (which include the signed event code). I'm failing to perform an instantiate proposal and the error I get back is ``` Error: Received message larger than max (7633274 vs. 4194304) at /home/vagrant/src/fabric-composer/packages/composer-connector-hlfv1/node_modules/grpc/src/node/src/client.js:434:17 ``` I can't see anything obvious in the peer logs so it looks like it's the client that is complaining. grpc has a 4Mb limit by default so this may be the issue or the message is unnecessarily big ?

davidkel (Thu, 20 Apr 2017 14:58:14 GMT):
I have a code workaround for now. I updated the Remote.js constructor with the following line ``` ```

davidkel (Thu, 20 Apr 2017 14:58:14 GMT):
I have a code workaround for now. I updated the Remote.js constructor with the following line ``` this._options['grpc.max_receive_message_length'] = 20*1024*1024; ```

pd93 (Thu, 20 Apr 2017 16:18:14 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?

MikeMayori (Thu, 20 Apr 2017 16:23:07 GMT):
info: [Chain.js]: Primary peer was not set, using Peer : {url:grpcs://localhost:7051} , how i can set the

MikeMayori (Thu, 20 Apr 2017 16:24:22 GMT):
thanks to Ying: chain.setPrimaryPeer(peer)

david_dornseifer (Thu, 20 Apr 2017 18:29:03 GMT):
Has joined the channel.

david_dornseifer (Thu, 20 Apr 2017 18:30:26 GMT):
Hi guys, just wondering, is there a easy way to replace the certs in the node js integration test with my own generated certs? Is there a script to generate new certs with openssl?

pd93 (Thu, 20 Apr 2017 18:55:31 GMT):
@david_dornseifer You can use the cryptogen tool in the fabric repo `/common/tools/cryptogen`

assasinx93 (Thu, 20 Apr 2017 19:06:53 GMT):
Guys I'm getting an error while running join channel.js Error: 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 Org2MSP]]

assasinx93 (Thu, 20 Apr 2017 19:07:09 GMT):
I checked that the org name passed everywhere is 'org1'

assasinx93 (Thu, 20 Apr 2017 19:07:25 GMT):
I'm using the latest version of node sdk and fabric

assasinx93 (Thu, 20 Apr 2017 19:08:06 GMT):
@here If anyone has used the latest version and it works for them please let me know

assasinx93 (Thu, 20 Apr 2017 19:12:11 GMT):
I also found an error in the file fabric-ca-server-config.yaml The DB.TLS.CERTFILES should be on a single line and not an array of elements prefixed with '-' everytime Eg: certfiles: db-server-cert.pem NOT certfiles: - db-server-cert.pem

MikeMayori (Thu, 20 Apr 2017 19:18:39 GMT):
One question???when i chain.queryBlockByHash the response object have header.number that has this { number: Long { low: 3, high: 0, unsigned: true }, then previous_hash, data_hash then data and metadata my question is ?? where i can learn about its contents or purpose??? or that properties

farhan3 (Thu, 20 Apr 2017 19:21:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-ledger?msg=48FzJhtPsXaZ7ik7N) Hi - I am looking for a way to add additional peers to a channel after the channel's initial creation. Is there an ETA for such a feature in the Node SDK?

david_dornseifer (Thu, 20 Apr 2017 20:33:10 GMT):
@pd93 thx

jimthematrix (Thu, 20 Apr 2017 21:08:32 GMT):
@assasinx93 this is due to gerrit CR 7905, which has a corresponding fix in node SDK and java from earlier today

jimthematrix (Thu, 20 Apr 2017 21:11:16 GMT):
@MikeMayori https://github.com/hyperledger/fabric/blob/master/protos/common/common.proto, specifically BlockHeader

jimthematrix (Thu, 20 Apr 2017 21:13:25 GMT):
@farhan3 we are working on that as we speak. It's very complex so it's hard to say when it'll get done. Btw I assume you meant to add new orgs to a channel. If you just want to add new peers of an org that's already part of the channel you can call joinChannel() any time

MikeMayori (Thu, 20 Apr 2017 21:14:05 GMT):
Thanks, I found some data missing the response... uint64 number = 1; // The position in the blockchain bytes previous_hash = 2; // The hash of the previous block header bytes data_hash = 3; // The hash of the BlockData, by MerkleTree

assasinx93 (Thu, 20 Apr 2017 23:04:44 GMT):
Hi, I'm using the secret key in /msp/local/keystore/admin.pem to register a new user. It is basically creating a new User object and passing it to the fabric-ca.register() service along with the request parameters. However, I get an error 400 unauthorized request. How exactly do we enroll a new user?

pd93 (Fri, 21 Apr 2017 09:14:15 GMT):
Does anyone know if it's possible to return an object from an invoke call in the node SDK? I can't find a way of doing this

AngelMilanov (Fri, 21 Apr 2017 09:23:11 GMT):
Has joined the channel.

AngelMilanov (Fri, 21 Apr 2017 09:40:50 GMT):
Does the Node SDK support blockchain networks with security turned *off*? Is there a code example I can use?

assasinx93 (Fri, 21 Apr 2017 16:52:52 GMT):
@pd93 A shim pb.response object is returned which either contains the error message using shim.Error or it will contain an array of bytes which could either be a message or a return value using shim.Success().

assasinx93 (Fri, 21 Apr 2017 17:13:27 GMT):
@mastersingh24 I'm using the admin credentials (admin.pem) as the User identity while calling cop.register(), however, it gives me an error authorization failure error 400. Is there any other registrar identity I should use to add new users?

pd93 (Fri, 21 Apr 2017 18:20:07 GMT):
@assasinx93 Yes, I'm aware of this and I'm using it in all of my query calls. Until now all my invoke calls have just returned `shim.Success(nil)`, but when I change this to `shim.Success(obj)` I don't seem to be able to access the returned object from the node SDK

pd93 (Fri, 21 Apr 2017 18:20:44 GMT):
It returns a `BroadcastResponse` but this doesn't seem to contain the returned object

pd93 (Fri, 21 Apr 2017 18:20:44 GMT):
It returns a `BroadcastResponse` but this doesn't seem to contain the returned object; Only a `SUCCESS` status

assasinx93 (Fri, 21 Apr 2017 18:22:41 GMT):
@pd93 The returned object has to be an array of bytes. Once you do that it returns it as a promise. which can be accessed as response_payloads[0].toString('utf8'). Please see the e2eUtils.js file in the e2e example.

pd93 (Fri, 21 Apr 2017 18:39:59 GMT):
@assasinx93 Ahhh I was doing everything right, I was trying to get the returned object from `sendTransaction()` not `sendTransactionProposal()`. Thanks :)

pd93 (Fri, 21 Apr 2017 18:41:26 GMT):
`response_payloads[0].toString('utf8')` would technically be for the query calls in the context of the `e2eUtils.js` file it works slightly differently for an invoke via `proposalResponses`

assasinx93 (Fri, 21 Apr 2017 19:21:45 GMT):
@pd93 Ohh yeah.. It would be slightly different. Haven't had the need to parse responses from invoke yet. The debug and info logs are sifficient for me.

assasinx93 (Fri, 21 Apr 2017 19:21:52 GMT):
sufficient*

pd93 (Fri, 21 Apr 2017 19:24:53 GMT):
For anyone else who ever comes across this.. returning `proposalResponses[0].response.payload.toString("utf-8")` (returned when calling `sendTransactionProposal()`) once you get a `SUCCESS` from `sendTransaction()`

pd93 (Fri, 21 Apr 2017 19:24:53 GMT):
For anyone else who ever comes across this.. returning `proposalResponses[0].response.payload.toString("utf-8")` (returned when calling `sendTransactionProposal()`) once you get a `SUCCESS` from `sendTransaction()` seems to work well

pd93 (Fri, 21 Apr 2017 19:24:53 GMT):
For anyone else who ever comes across this.. returning `proposalResponses[0].response.payload.toString("utf-8")` (which is returned when calling `sendTransactionProposal()`) once you get a `SUCCESS` from `sendTransaction()` seems to work well

akashmar (Fri, 21 Apr 2017 19:37:00 GMT):
Has joined the channel.

akashmar (Fri, 21 Apr 2017 19:39:33 GMT):
Hi there. I'm a little confused as to what I need to do in order to get permission to send transactions. Right now I'm getting a FORBIDDEN error from the orderer. If i have the msp configuration for a peer, how do I create a user in nodejs that has permission to connect?

akashmar (Fri, 21 Apr 2017 19:46:42 GMT):
My guess is that I have to register a user with the Fabric-ca server and then enroll it? Can someone provide details on this?

assasinx93 (Fri, 21 Apr 2017 19:59:06 GMT):
@akashmar Yes you have to register a user and then enroll it and set as user context. I am trying to do the same thing but I get an error when I use admin credentials to register a new user. Please tag me if you receive an answer to the question.

assasinx93 (Fri, 21 Apr 2017 19:59:41 GMT):
Error 400: Authorization Denied is what I get

assasinx93 (Fri, 21 Apr 2017 20:22:24 GMT):
@akashmar I think this link should solve our question. Check out code around line 79

assasinx93 (Fri, 21 Apr 2017 20:22:28 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/00e8ab87030eb8298ac46ad296333dfecbb4c8eb/test/integration/fabric-ca-services-tests.js

akashmar (Fri, 21 Apr 2017 20:23:47 GMT):
@assasinx93 I've been looking at that all day. That's why I'm confused.

assasinx93 (Sat, 22 Apr 2017 02:50:42 GMT):
@akashmar I got it working and successfully registered and then enrolled the new user while referring to the code in the link above.

assasinx93 (Sat, 22 Apr 2017 19:11:58 GMT):
Hi guys, how do we register a new user with credentials so that we can run invoke transaction with the new user??

assasinx93 (Sun, 23 Apr 2017 17:25:10 GMT):
@here Does anyone know what user attributes to set for a new user so that they can use invoke functions from the chaincode?

mastersingh24 (Sun, 23 Apr 2017 19:55:55 GMT):
[currently you don't need to set any attributes ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Df5FKHpF8HS6XJmh2) @assasinx93

assasinx93 (Sun, 23 Apr 2017 19:57:10 GMT):
@mastersingh24 I registered a new user. It said successfully enrolled. However, I can only query using that username and enrollment secret. If I use an invoke method apart from querying it gives an error authorization denied.

AmberZhang (Mon, 24 Apr 2017 01:07:59 GMT):
@assasinx93 could you please paste the error of authorization denied? my understanding is that you don't need set any attributes for invoking function.

bh4rtp (Mon, 24 Apr 2017 02:05:37 GMT):
hi, `node test/integration/e2e.js` failed after get the latest fabric and fabric-ca.

bh4rtp (Mon, 24 Apr 2017 02:06:26 GMT):
info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) not ok 1 Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:230:5) ... ok 2 Successfully waited to make sure new channel was created. # ***** End-to-end flow: join channel *****

bh4rtp (Mon, 24 Apr 2017 02:06:26 GMT):
info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) not ok 1 Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:230:5) ... ok 2 Successfully waited to make sure new channel was created. # ***** End-to-end flow: join channel ***** 1..40 # tests 40 # pass 7 # fail 33

bh4rtp (Mon, 24 Apr 2017 02:11:44 GMT):
i have done step by step as follows. 1. update fabric and build 2. update fabric-ca and build 3. update fabric-sdk-node 4. `rm -rf node_modules` 5. `rm -rf /root/.hfc-key-store` 6. `npm install` 7. `gulp ca` 8. `gulp doc` 9. `cd test/fixtures` and `docker-compose up -d` 10. go fabric-sdk-node home path and run `node test/integration/e2e.js`

assasinx93 (Mon, 24 Apr 2017 02:19:42 GMT):
@AmberZhang Well this is weird. I went to run it today and the user seems to have all the privileges. So now my question changes I guess. How can we restrict a user to only query operations?

lujiang (Mon, 24 Apr 2017 02:34:45 GMT):
Has joined the channel.

simcan (Mon, 24 Apr 2017 09:31:49 GMT):
Hi is there a clear documentation or a tutorial of how to use the fabric-node-sdk ?

jworthington (Mon, 24 Apr 2017 10:49:17 GMT):
I am also having issues with enrolling using admin. My ca is independent, i.e. not local. It works fine. Can register/enroll using fabric-ca-client from a different server, see the values in postgres. etc. But using node-sdk I am stuck at 'Error: Calling enrollment endpoint failed with error [Error: write EPROTO 101057795:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:openssl\ssl\ssl_lib'. node successfully creates clients and such and my caserver log shows TLS handshake error from my node machine ip so I know it is sending something. What cert file where do I need here? I see the enroll-csr (which is for the local docker not my ca-server I think). Do I need to generate a CSR to match my ca server or something? I did not need to using fabric-ca-client. Same result from either fabric-ca-services.js or e2e.js. Driving me crazy all weekend.

AbhilekhSingh (Mon, 24 Apr 2017 11:09:22 GMT):
I'm getting this error when instantiating chaincode 2017-04-24 11:02:53.495 UTC [chaincode] processStream -> ERRO 040 Error handling chaincode support stream: stream error: code = 1 desc = "context canceled"

AbhilekhSingh (Mon, 24 Apr 2017 11:09:33 GMT):
anyone has any idea about this?

NiketYende (Mon, 24 Apr 2017 12:12:10 GMT):
@bretharrison Using the latest code for node-sdk i get the following error:

NiketYende (Mon, 24 Apr 2017 12:12:22 GMT):
root@bcs-dev1:/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/test/integration/e2e# node create-channel.js info: Returning a new winston logger with default configurations info: [E2E create-channel]: >>>>>> Will create new channel with name :: mychannel <<<<<<< TAP version 13 # ***** SDK Built config update create flow ***** info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) not ok 1 Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/node_modules/fabric-client/lib/User.js:266:11) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then (/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/test/integration/e2e/create-channel.js:231:5) ... ok 2 Successfully waited to make sure new channel was created. 1..2 # tests 2 # pass 1 # fail 1

NiketYende (Mon, 24 Apr 2017 12:12:56 GMT):
Here are the set of containers:

NiketYende (Mon, 24 Apr 2017 12:12:57 GMT):
root@bcs-dev1:/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/test/integration/e2e# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2e54c3f87a06 hyperledger/fabric-peer "peer node start -..." 20 minutes ago Up 20 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0 c0df943fcc67 hyperledger/fabric-peer "peer node start -..." 20 minutes ago Up 20 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer2 9da4ea0cf25b hyperledger/fabric-orderer "orderer" 21 minutes ago Up 20 minutes 0.0.0.0:7050->7050/tcp orderer0 b54a171b9930 hyperledger/fabric-couchdb "tini -- /docker-e..." 21 minutes ago Up 20 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb0 38cea4d5f23a hyperledger/fabric-couchdb "tini -- /docker-e..." 21 minutes ago Up 21 minutes 4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp couchdb2

samuel_o (Mon, 24 Apr 2017 12:29:53 GMT):
Has joined the channel.

rmohta (Mon, 24 Apr 2017 13:51:08 GMT):
Has joined the channel.

mffrench (Mon, 24 Apr 2017 14:44:09 GMT):
Has joined the channel.

bretharrison (Mon, 24 Apr 2017 14:48:27 GMT):
@NiketYende Looks like you are missing the fabric-ca containers

mffrench (Mon, 24 Apr 2017 14:51:04 GMT):
Hi, I've one question regarding node fabric-cli SDK log management. Currently I setup the fabric-cli logger like this : ``` import * as HFC from 'fabric-client'; .... this.logger = new winston.Logger({ transports: [ new winston.transports.File({ level: 'warn', timestamp: true, filename: path.join(Config.getServerDirectory(), '../logs.log'), handleExceptions: true, json: true, maxsize: 5242880, //5MB maxFiles: 5, colorize: false }), new winston.transports.Console({ level: 'debug', timestamp: true, prettyPrint: true, handleExceptions: true, json: false, colorize: true }) ], exitOnError: false } ) HFC.setLogger(this.logger); ... ``` The console level is consequently defined as DEBUG and I also added timestamp. Unfortunately when looking the logs print it's like some class (like the fabric-cli packager/Golang.js package) are using another logger the one I defined : I don't see debug logs and timestamp. Any idea on what I'm missing ?

mffrench (Mon, 24 Apr 2017 14:58:34 GMT):
(note : I'm using fabric-cli v1.0.0.alpha)

akashmar (Mon, 24 Apr 2017 15:43:35 GMT):
When I issue an instantiate request using node sdk, I get the following error from the orderer ``` 2017-04-24 15:53:46.611 UTC [orderer/common/deliver] Handle -> WARN 032 Received unauthorized deliver request for channel dolphin1 ``` Any ideas why? Do I need to specify something in the channel configuration to allow orgs to read the channel?

mffrench (Mon, 24 Apr 2017 15:55:50 GMT):
@akashmar : you should get some look on the e2e example => https://github.com/hyperledger/fabric/tree/master/examples/e2e_cli

mffrench (Mon, 24 Apr 2017 15:56:21 GMT):
particularly how configuration is managed => https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/generateCfgTrx.sh

mffrench (Mon, 24 Apr 2017 15:57:32 GMT):
the template configuration file defining org and rights on channel is here : https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/configtx.yaml

akashmar (Mon, 24 Apr 2017 15:58:43 GMT):
@mffrench I've already generated the channel configuration file and I've tested it using the `peer chaincode invoke` command and it works fine. Now that I'm trying to instantiate chaincode using node sdk, it doesn't work.

akashmar (Mon, 24 Apr 2017 15:59:00 GMT):
I did use the same method in the e2e example

mffrench (Mon, 24 Apr 2017 15:59:39 GMT):
oh OK

mffrench (Mon, 24 Apr 2017 16:02:38 GMT):
is the user for the request enrolled successfully also ?

akashmar (Mon, 24 Apr 2017 16:03:20 GMT):
yes

akashmar (Mon, 24 Apr 2017 16:03:26 GMT):
registered and enrolled successfully

mffrench (Mon, 24 Apr 2017 16:06:28 GMT):
and with the good mspid according your conf ?

akashmar (Mon, 24 Apr 2017 16:07:14 GMT):
well I'm using an MSPID that is listed in the conf

mffrench (Mon, 24 Apr 2017 16:12:29 GMT):
and on the user registration maybe is there some missing stuff on the user role and/or other attribute ?

akashmar (Mon, 24 Apr 2017 16:13:25 GMT):
I read in the comments above that you don't need to set any attributes. As for roles, I tried 3 different roles: client, peer and user. None of them worked. I'm pretty sure I'm missing something. I just have to figure it out

mffrench (Mon, 24 Apr 2017 16:15:11 GMT):
yeah... I try to give you some inputs to check but this is mainly a (probably very little) conf issue here

mffrench (Mon, 24 Apr 2017 16:15:23 GMT):
not easy to find sometime

mffrench (Mon, 24 Apr 2017 16:20:23 GMT):
``` sf := sigfilter.New(policies.ChannelReaders, chain.PolicyManager()) result, _ := sf.Apply(envelope) if result != filter.Forward { if logger.IsEnabledFor(logging.WARNING) { logger.Warningf("Received unauthorized deliver request for channel %s", chdr.ChannelId) } return sendStatusReply(srv, cb.Status_FORBIDDEN) } ```

mffrench (Mon, 24 Apr 2017 16:39:17 GMT):
so I guess policy review could be good too

mffrench (Mon, 24 Apr 2017 16:39:18 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/policies.html

akashmar (Mon, 24 Apr 2017 17:35:00 GMT):
@mffrench thanks I appreciate it.

rliu (Mon, 24 Apr 2017 19:34:55 GMT):
@bretharrison @NiketYende Following Niket's experiment, I created a network with fabric-ca, `CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 748a5a1fa1a8 hyperledger/fabric-peer "peer node start -..." 2 hours ago Up 2 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer2 371c7a34f728 hyperledger/fabric-peer "peer node start -..." 2 hours ago Up 2 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0 56485e35e035 hyperledger/fabric-orderer "orderer" 2 hours ago Up 2 hours 0.0.0.0:7050->7050/tcp orderer0 5c793b7fc170 hyperledger/fabric-ca "sh -c 'fabric-ca-..." 2 hours ago Up 2 hours 0.0.0.0:7054->7054/tcp ca_peerOrg1 0dddb335fc69 hyperledger/fabric-couchdb "tini -- /docker-e..." 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb0 481c91a426af hyperledger/fabric-couchdb "tini -- /docker-e..." 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp couchdb2 bce0d122d866 hyperledger/fabric-ca "sh -c 'fabric-ca-..." 2 hours ago Up About an hour 0.0.0.0:8054->7054/tcp` However, when I tried to create channel, I got the following error: info: Returning a new winston logger with default configurations info: [E2E create-channel]: >>>>>> Will create new channel with name :: mychannel <<<<<<< TAP version 13 # ***** SDK Built config update create flow ***** info: [Client.js]: Failed to load user "admin" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"https","hostname":"localhost","port":7054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"https","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/rliu/.hfc-key-store"}} not ok 1 Error: Could not parse enrollment response [404 page not found ] as JSON due to error [SyntaxError: Unexpected token p in JSON at position 4] at IncomingMessage. (/Users/rliu/gospace/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:662:14) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) --- operator: fail at: cop.enroll.then.then.then.catch (/Users/rliu/gospace/fabric-sdk-node/test/unit/util.js:125:8) ... 1..1 # tests 1 # pass 0 # fail 1` Appreciate any help!

akashmar (Mon, 24 Apr 2017 19:41:32 GMT):
@rliu 404 page not found usually indicates that the target is not up

akashmar (Mon, 24 Apr 2017 19:41:46 GMT):
is the fabric-ca-server running

rliu (Mon, 24 Apr 2017 19:43:00 GMT):
@akashmar how to check if fabric-ca-server is running? using docker ps, I see CA container is running

akashmar (Mon, 24 Apr 2017 19:43:47 GMT):
is the port 7054 exposed in CA container?

rliu (Mon, 24 Apr 2017 20:14:47 GMT):
@akashmar from the log, it seems up: 2017/04/24 17:18:49 [INFO] Configuration file location: /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml 2017/04/24 17:18:49 Initialize BCCSP [SW] 2017/04/24 17:18:49 [INFO] generate received request 2017/04/24 17:18:49 [INFO] received CSR 2017/04/24 17:18:49 [INFO] generating key: ecdsa-256 2017/04/24 17:18:49 [INFO] encoded CSR 2017/04/24 17:18:49 [INFO] signed certificate with serial number 336716289215920282298075236278897842769737671567 2017/04/24 17:18:49 [INFO] The CA key and certificate files were generated 2017/04/24 17:18:49 [INFO] Key file location: /etc/hyperledger/fabric-ca-server-config/a22daf356b2aab5792ea53e35f66fccef1d7f1aa2b3a2b92dbfbf96a448ea26a_sk 2017/04/24 17:18:49 [INFO] Certificate file location: /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem 2017/04/24 17:18:49 [INFO] Initialized sqlite3 data base at /tmp/fabric-ca-server.db 2017/04/24 17:18:49 [INFO] Listening at https://0.0.0.0:7054 2017/04/24 19:09:07 http: TLS handshake error from 172.22.0.1:38424: tls: first record does not look like a TLS handshake 2017/04/24 19:09:07 http: TLS handshake error from 172.22.0.1:38426: tls: first record does not look like a TLS handshake 2017/04/24 19:09:07 http: TLS handshake error from 172.22.0.1:38428: tls: first record does not look like a TLS handshake

akashmar (Mon, 24 Apr 2017 20:15:25 GMT):
@rliu is the same port exposed in docker ?

rliu (Mon, 24 Apr 2017 20:15:55 GMT):
@akashmar yes. services: ca0: image: hyperledger/fabric-ca environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server ports: - "7054:7054" command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/a22daf356b2aab5792ea53e35f66fccef1d7f1aa2b3a2b92dbfbf96a448ea26a_sk -b admin:adminpw' -d volumes: - ./channel/crypto-config/peerOrganizations/peerOrg1/ca/:/etc/hyperledger/fabric-ca-server-config - ./fabricca/tlsOrg1:/etc/hyperledger/fabric-ca-server container_name: ca_peerOrg1

bretharrison (Mon, 24 Apr 2017 20:22:50 GMT):
@rliu looks like an old fabric ca, you may wish to re pull fabric-ca, make clean, then make docker

rliu (Mon, 24 Apr 2017 20:25:59 GMT):
@bretharrison i just clone fabric.git and then used download-dockerimages.sh build all images. Do you mean I need to clone fabric-ca.git and then build the image from there?

assasinx93 (Mon, 24 Apr 2017 20:33:47 GMT):
yeah you could clone fabric-ca and then run make docker

assasinx93 (Mon, 24 Apr 2017 20:33:53 GMT):
@rliu

jtrayfield (Mon, 24 Apr 2017 20:58:09 GMT):
anybody know what this means? error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error starting container: missing remote repository e.g. 'github.com/user/repo' at /home/server/git/theseam/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17

vdods (Mon, 24 Apr 2017 21:44:41 GMT):
Depending on what code caused that, it looks like maybe the chaincode that was packaged up and sent to the peer wasn't complete (perhaps the correct directory structure was not present)

vdods (Mon, 24 Apr 2017 21:44:41 GMT):
@jtrayfield Depending on what code caused that, it looks like maybe the chaincode that was packaged up and sent to the peer wasn't complete (perhaps the correct directory structure was not present)

jtrayfield (Mon, 24 Apr 2017 22:12:40 GMT):
@vdods I'm doing a chaincode upgrade with the same parameters as chaincode instantiate

jtrayfield (Mon, 24 Apr 2017 22:13:22 GMT):
I tried it with the "peer" command: Error: Error endorsing chaincode: rpc error: code = 2 desc = Error starting container: missing remote repository e.g. 'github.com/user/repo' Usage: peer chaincode upgrade [flags]

vdods (Mon, 24 Apr 2017 22:13:38 GMT):
Hmm.. I might not be much help then.. I'd assume an upgrade command with the same parameters as install should have no problem and have no change on the chaincode

jtrayfield (Mon, 24 Apr 2017 22:13:50 GMT):
only happening on linux docker; macos docker works fine

vdods (Mon, 24 Apr 2017 22:14:13 GMT):
But I might not be much help because I commented out the 'upgrade' part of the e2e test a while back when it was failing, and have been working with an old version of sdk

jtrayfield (Mon, 24 Apr 2017 22:14:37 GMT):
:-) thanks anyway

rliu (Tue, 25 Apr 2017 02:04:15 GMT):
@bretharrison I build all images and started the network following fabric-node-sdk instruction. I created a channel and also peers joined the channel. However, when i tried to install marbles chain code, I got the following error: ration/e2e# node install-chaincode.js info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: chaincode install ***** peer 0 tls cert path: /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/tls/peers/peer0/ca-cert.pem info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' info: [packager/Golang.js]: packaging GOLANG from github.com/marbles_cc error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: The creator certificate is not valid, err Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [E2E testing]: install proposal was bad not ok 3 Failed to send install Proposal or receive valid response. Response null or status is not 200. exiting... --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:131:6) ... ok 4 Successfully installed chaincode in peers of organization "org1" peer 2 tls cert path: /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/tls/peers/peer2/ca-cert.pem info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 5 Successfully loaded member from persistence ok 6 Successfully enrolled user 'admin' info: [packager/Golang.js]: packaging GOLANG from github.com/marbles_cc error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: The creator certificate is not valid, err Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [E2E testing]: install proposal was bad not ok 7 Failed to send install Proposal or receive valid response. Response null or status is not 200. exiting... --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:131:6) ... ok 8 Successfully installed chaincode in peers of organization "org2" 1..8 # tests 8 # pass 6 # fail 2 It complained "the creator certificate is not valid". Could you advice how to fix this error? Thanks

jtrayfield (Tue, 25 Apr 2017 03:16:58 GMT):
@vdods I upgraded node from 4.5.0 (last August) to 6.10.2 and that fixed the problem. go figure.....

AbhilekhSingh (Tue, 25 Apr 2017 06:28:45 GMT):
I'm facing the issue in node test/integration/e2e/install-chaincode.js

AbhilekhSingh (Tue, 25 Apr 2017 06:28:57 GMT):
: Chain-sendPeersProposal - Promise is rejected: Error: The creator certificate is not valid, err Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority

t-watana (Tue, 25 Apr 2017 07:53:18 GMT):
Has joined the channel.

AbhilekhSingh (Tue, 25 Apr 2017 08:17:21 GMT):
Can anyone please answer this?

t-watana (Tue, 25 Apr 2017 08:28:49 GMT):
Hi, all

t-watana (Tue, 25 Apr 2017 08:32:05 GMT):
I'd tried to build node-sdk(v1.0.0-alpha) on Windows7, I'm facing to this failure. ``` npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm ERR! git submodule -q update --init --recursive: fatal: Unable to look up github.com (port 9418) npm ERR! git submodule -q update --init --recursive: fatal: clone of 'git://github.com/davepacheco/javascriptlint.git' into submodule path 'C:/Users/test/AppData/Local/Temp/npm-10916-d0d9ed85/git-cache-aa18ec3b/c4adf56b1f51d790c87f3a381cce20bc3ef287d1/deps/javascriptlint' failed npm ERR! git submodule -q update --init --recursive: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! Windows_NT 6.1.7601 npm ERR! argv "D:\\11_devLang\\Nodist\\v-x64\\6.9.5\\node.exe" "D:\\11_devLang\\Nodist\\npmv\\3.10.10\\bin\\npm-cli.js" "install" npm ERR! node v6.9.5 npm ERR! npm v3.10.10 npm ERR! code 1 npm ERR! Command failed: git -c core.longpaths=true submodule -q update --init --recursive npm ERR! fatal: Unable to look up github.com (port 9418) npm ERR! fatal: clone of 'git://github.com/davepacheco/javascriptlint.git' into submodule path 'C:/Users/test/AppData/Local/Temp/npm-10916-d0d9ed85/git-cache-aa18ec3b/c4adf56b1f51d790c87f3a381cce20bc3ef287d1/deps/javascriptlint' failed ```

t-watana (Tue, 25 Apr 2017 08:33:51 GMT):
Installed build tools is as followed. * node runtime version 6.9.10 * npm tool version 3.10.10 * gulp command

t-watana (Tue, 25 Apr 2017 08:34:50 GMT):
Is it possible to build on Windows?

t-watana (Tue, 25 Apr 2017 08:44:14 GMT):
> * node runtime version 6.9.10 I've mistaken, correctly it is version 6.9.5

jworthington (Tue, 25 Apr 2017 09:06:19 GMT):
I have built node-sdk(v1.0.0-alpha) on Windows7 Pro. Using in Eclipse. Having issues with enrollment (prob me) but it built and runs, command line or Eclipse. I have those same first 4 WARNs on npm install. I have never seen that ERR. 6.9.1 (x64) and 3.10.8.

sivarajanrp (Tue, 25 Apr 2017 09:35:44 GMT):
Has joined the channel.

sivarajanrp (Tue, 25 Apr 2017 10:31:31 GMT):
for ref, following http://fabric-rtd.readthedocs.io/en/latest/marbles.html for marbles app local setup.. facing issue with instantiation of chaincode siv:fabric-sdk-node test$ node test/integration/e2e/instantiate-chaincode.js info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: instantiate chaincode ***** info: [Peer.js]: Peer.const - url: grpc://localhost:7051 options grpc.ssl_target_name_override=peer0, grpc.default_authority=peer0 info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options grpc.ssl_target_name_override=peer2, grpc.default_authority=peer2 info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/tcs/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:7051". Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/example_cc chaincode/input/src/github.com/example_cc/marbles.go:31: SimpleChaincode redeclared in this block previous declaration at chaincode/input/src/github.com/example_cc/example_cc.go:29 chaincode/input/src/github.com/example_cc/marbles.go:64: main redeclared in this block previous declaration at chaincode/input/src/github.com/example_cc/example_cc.go:208 chaincode/input/src/github.com/example_cc/marbles.go:75: (*SimpleChaincode).Init redeclared in this block previous declaration at chaincode/input/src/github.com/example_cc/example_cc.go:32 chaincode/input/src/github.com/example_cc/marbles.go:111: (*SimpleChaincode).Invoke redeclared in this block previous declaration at chaincode/input/src/github.com/example_cc/example_cc.go:77 chaincode/input/src/github.com/example_cc/marbles.go:148: (*SimpleChaincode).Query redeclared in this block previous declaration at chaincode/input/src/github.com/example_cc/example_cc.go:72

sivarajanrp (Tue, 25 Apr 2017 10:31:50 GMT):
any fix pls ?

NiketYende (Tue, 25 Apr 2017 10:37:00 GMT):
@bretharrison @rliu I am able to create and join channel, but it fails at install step. Also i have updated "e2eUtils.js" & "util.js" to handle the changed "marbles02" code which i copied from the latest version of fabric. Here is the error i receive:

NiketYende (Tue, 25 Apr 2017 10:37:01 GMT):
root@bcs-dev1:/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/test/integration/e2e# node install-chaincode.js info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: chaincode install ***** info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' info: [E2E testing]: installChaincode request object : targets=[grpc.ssl_target_name_override=peer0, grpc.default_authority=peer0, grpc.primary_user_agent=grpc-node/1.2.4, _url=grpcs://localhost:7051, addr=localhost:7051, , _request_timeout=60000, , _name=null, _roles=[]], chaincodePath=github.com/marbles02, chaincodeId=end2end, chaincodeVersion=v0, txId=71c04a2781b371f97f567c09b6ffeb3a1e42bba305358a387e8787e465f04f69, 0=41, 1=70, 2=242, 3=97, 4=81, 5=82, 6=217, 7=191, 8=198, 9=37, 10=218, 11=36, 12=154, 13=26, 14=131, 15=23, 16=99, 17=196, 18=146, 19=58, 20=219, 21=220, 22=235, 23=225 info: [packager/Golang.js]: packaging GOLANG from github.com/marbles02 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Authorization for INSTALL on # github.com/marbles02end2endv0 ���������.� at /opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [E2E testing]: install proposal was bad not ok 3 Failed to send install Proposal or receive valid response. Response null or status is not 200. exiting... --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/test/integration/e2e/e2eUtils.js:131:6) ... ok 4 Successfully installed chaincode in peers of organization "org1" info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 5 Successfully loaded member from persistence ok 6 Successfully enrolled user 'admin' info: [E2E testing]: installChaincode request object : targets=[grpc.ssl_target_name_override=peer2, grpc.default_authority=peer2, grpc.primary_user_agent=grpc-node/1.2.4, _url=grpcs://localhost:8051, addr=localhost:8051, , _request_timeout=60000, , _name=null, _roles=[]], chaincodePath=github.com/marbles02, chaincodeId=end2end, chaincodeVersion=v0, txId=7e1487ce03b596a4169d9f163444dda32b6c849a5d7ca99aefc66b31e6254bb9, 0=75, 1=247, 2=151, 3=227, 4=90, 5=175, 6=144, 7=166, 8=47, 9=170, 10=35, 11=75, 12=132, 13=176, 14=242, 15=204, 16=216, 17=181, 18=211, 19=249, 20=102, 21=229, 22=1, 23=71 info: [packager/Golang.js]: packaging GOLANG from github.com/marbles02 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Authorization for INSTALL on # github.com/marbles02end2endv0 ���������.� at /opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [E2E testing]: install proposal was bad not ok 7 Failed to send install Proposal or receive valid response. Response null or status is not 200. exiting... --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/opt/fabric1_workspace/fabric-node-master/fabric-sdk-node/test/integration/e2e/e2eUtils.js:131:6) ... ok 8 Successfully installed chaincode in peers of organization "org2" 1..8 # tests 8 # pass 6 # fail 2

NiketYende (Tue, 25 Apr 2017 10:39:19 GMT):
I had to modify request objects of "instantiateChaincode" & "invokeChaincode" methods in accordance with the marbles02 code. Please help me in this regard, if there are any other files which need to be modified let me know.

NiketYende (Tue, 25 Apr 2017 10:40:08 GMT):
Example : var request = { chaincodeId : e2e.chaincodeId, chaincodeVersion : version, fcn: 'initMarble', args: ['marble1', 'blue', '35', 'tom'], chainId: e2e.channel, txId: tx_id, nonce: nonce }; logger.info("invokeChaincode request object : ",request);

AbhilekhSingh (Tue, 25 Apr 2017 11:12:52 GMT):
Are the integration tests broken in fabric-sdk-node ?

AbhilekhSingh (Tue, 25 Apr 2017 11:13:25 GMT):
Failing on this: node test/integration/e2e/install-chaincode.js

AbhilekhSingh (Tue, 25 Apr 2017 11:13:34 GMT):
with error: Error: The creator certificate is not valid, err Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority

NiketYende (Tue, 25 Apr 2017 11:19:40 GMT):
@AbhilekhSingh Follow the same steps as in "https://github.com/hyperledger/fabric-sdk-node" including the building of images part. I had to remove the existing docker images to make it working till the join-channel step. My error at the install step is slightly different.

AbhilekhSingh (Tue, 25 Apr 2017 11:20:06 GMT):
yes I followed that

AbhilekhSingh (Tue, 25 Apr 2017 11:20:20 GMT):
ubuntu@blockchain-dev:/opt/gopath/src/github.com/hyperledger/fabric-sdk-node$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE hyperledger/openldap latest 96dbeef56348 49 minutes ago 1.52 GB hyperledger/openldap x86_64-1.0.0-snapshot-09107e7 96dbeef56348 49 minutes ago 1.52 GB hyperledger/fabric-ca latest 96bddee1326c 51 minutes ago 240 MB hyperledger/fabric-ca x86_64-1.0.0-snapshot-09107e7 96bddee1326c 51 minutes ago 240 MB dev-peer3-mycc-1.0 latest 00ce853d01c3 About an hour ago 176 MB dev-peer0-mycc-1.0 latest 95f13adf34c4 About an hour ago 176 MB dev-peer2-mycc-1.0 latest a1404fde99d7 About an hour ago 176 MB hyperledger/fabric-couchdb latest be445b44edcf About an hour ago 1.51 GB hyperledger/fabric-couchdb x86_64-1.0.0-snapshot-7f114bb be445b44edcf About an hour ago 1.51 GB hyperledger/fabric-kafka latest a68fd1a2ed24 About an hour ago 1.3 GB hyperledger/fabric-kafka x86_64-1.0.0-snapshot-7f114bb a68fd1a2ed24 About an hour ago 1.3 GB hyperledger/fabric-zookeeper latest 2c10e1de5a78 About an hour ago 1.31 GB hyperledger/fabric-zookeeper x86_64-1.0.0-snapshot-7f114bb 2c10e1de5a78 About an hour ago 1.31 GB hyperledger/fabric-testenv latest 576b8dd2cf5e About an hour ago 1.4 GB hyperledger/fabric-testenv x86_64-1.0.0-snapshot-7f114bb 576b8dd2cf5e About an hour ago 1.4 GB hyperledger/fabric-buildenv latest 4be70fc2d0d6 About an hour ago 1.31 GB hyperledger/fabric-buildenv x86_64-1.0.0-snapshot-7f114bb 4be70fc2d0d6 About an hour ago 1.31 GB hyperledger/fabric-orderer latest 0bfe52c8564c About an hour ago 182 MB hyperledger/fabric-orderer x86_64-1.0.0-snapshot-7f114bb 0bfe52c8564c About an hour ago 182 MB hyperledger/fabric-peer latest a39ff71b3941 About an hour ago 185 MB hyperledger/fabric-peer x86_64-1.0.0-snapshot-7f114bb a39ff71b3941 About an hour ago 185 MB hyperledger/fabric-javaenv latest 15b757337862 About an hour ago 1.43 GB hyperledger/fabric-javaenv x86_64-1.0.0-snapshot-7f114bb 15b757337862 About an hour ago 1.43 GB hyperledger/fabric-ccenv latest 92c0f60beb7a About an hour ago 1.29 GB hyperledger/fabric-ccenv x86_64-1.0.0-snapshot-7f114bb 92c0f60beb7a About an hour ago 1.29 GB hyperledger/fabric-baseimage x86_64-0.3.0 f4751a503f02 2 months ago 1.27 GB hyperledger/fabric-baseos x86_64-0.3.0 c3a4cf3b3350 2 months ago 161 MB

AbhilekhSingh (Tue, 25 Apr 2017 11:21:01 GMT):
Till join-channel it works fine

AbhilekhSingh (Tue, 25 Apr 2017 11:22:04 GMT):
I got it

AbhilekhSingh (Tue, 25 Apr 2017 11:22:13 GMT):
join-channel has this code for user

AbhilekhSingh (Tue, 25 Apr 2017 11:22:14 GMT):
return client.createUser({ username: 'channelAdmin', mspid: ORGS[org].mspid, cryptoContent: { privateKeyPEM: keyPEM.toString(), signedCertPEM: certPEM.toString() } });

AbhilekhSingh (Tue, 25 Apr 2017 11:22:32 GMT):
I guess install-chaincode test is not changes yet

AbhilekhSingh (Tue, 25 Apr 2017 11:22:32 GMT):
I guess install-chaincode test is not changed yet

JeetMukesh (Tue, 25 Apr 2017 11:23:31 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-ca-client/lib/FabricCAClientImpl.js still has this._baseAPI = '/api/v1/'; causing connection errors in fabricCaClient. Change this._baseAPI = '/'; and e2e tests will work fine

AbhilekhSingh (Tue, 25 Apr 2017 11:25:45 GMT):
yes it worked now

JeetMukesh (Tue, 25 Apr 2017 11:25:58 GMT):
well no only create_channel goes thro. join_channel .. still has errors on grpc

AbhilekhSingh (Tue, 25 Apr 2017 11:26:30 GMT):
create and join channel was working fine for me

AbhilekhSingh (Tue, 25 Apr 2017 11:27:01 GMT):
install chaincode was not I took the changes of user create and edit the installchainCode test

glotov (Tue, 25 Apr 2017 11:52:25 GMT):
Has joined the channel.

rmohta (Tue, 25 Apr 2017 14:46:36 GMT):
@AbhilekhSingh @JeetMukesh Were you able to get e2e testing working?

hugoB (Tue, 25 Apr 2017 15:28:37 GMT):
Has joined the channel.

walidsadou (Tue, 25 Apr 2017 15:30:47 GMT):
Has joined the channel.

jtrayfield (Tue, 25 Apr 2017 16:06:56 GMT):
2017-04-25T16:00:02.629Z - error: blockchain.js::invoke() Problem: TypeError: logger.warning is not a function at Chain.compareProposalResponseResults (/Users/jtray/git/bales/node_modules/fabric-client/lib/Chain.js:1772:12)

jtrayfield (Tue, 25 Apr 2017 16:07:14 GMT):
possible bug in Chain.js

bretharrison (Tue, 25 Apr 2017 16:12:39 GMT):
@jtrayfield Yes I think you are correct, that is an issue. For you should change `logger.warning` to `logger.error`

bretharrison (Tue, 25 Apr 2017 16:12:39 GMT):
@jtrayfield Yes I think you are correct, that is an issue. For now you should change `logger.warning` to `logger.error`

assasinx93 (Tue, 25 Apr 2017 16:58:28 GMT):
@here Hi guys, I wrote a simple chaincode based off the e2e example. Exercises multiple features of the node sdk (maybe not all) and sort of adapted to a business scenario. New comers who want to look at something a bit more than the e2e chaincode can have a look at this. Feedback appreciated. https://github.com/sujayv/basic-blockchain-app

jtrayfield (Tue, 25 Apr 2017 17:38:40 GMT):
@bretharrison https://jira.hyperledger.org/browse/FAB-3392

bretharrison (Tue, 25 Apr 2017 17:39:23 GMT):
@jtrayfield thanks

kletkeman (Tue, 25 Apr 2017 18:18:20 GMT):
@assasinx93 I took a look and it seems that each of the node commands you have remain tied into the test framework and is not an independent application. Or have I missed something?

akashmar (Tue, 25 Apr 2017 18:33:17 GMT):
I get the following error when I try to install chaincode using node sdk: ``` error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: The creator certificate is not valid, err Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority ``` Any ideas what I'm doing wrong?

akashmar (Tue, 25 Apr 2017 18:33:37 GMT):
The user is enrolled successfully with the proper mspID

rliu (Tue, 25 Apr 2017 18:52:17 GMT):
@JeetMukesh Could you clarify if you can install marble chain code? I see you mentioned "Change this._baseAPI = '/';". I'm not sure if this can solve my problem. I tried, but it didn't work. t got the same error when installing marble chain code as @akashmar

rliu (Tue, 25 Apr 2017 18:56:09 GMT):
@bretharrison Could you provide some advice on how to solve this problem? When I tried to install marbles chain code, I got this error: error. I saw quite a few people got the same error. Thanks! [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: The creator certificate is not valid, err Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [E2E testing]: install proposal was bad

assasinx93 (Tue, 25 Apr 2017 19:12:00 GMT):
@kletkeman Yeah it is still tied into the same test framework. Had a very short time to learn about fabric and code stuff too. It is part of my project for my course in Cryptocurrencies.

assasinx93 (Tue, 25 Apr 2017 19:13:43 GMT):
I'll work on getting the functionality separated from the test cases in the vacation when I have time

cshields (Tue, 25 Apr 2017 19:25:54 GMT):
Has joined the channel.

bretharrison (Tue, 25 Apr 2017 21:01:05 GMT):
@here @rliu You may wish to pull the latest NodeSDK, https://gerrit.hyperledger.org/r/#/c/8499/ was merged to help with Fabric side now requiring the signing user to have the "Admins" role. Should help with the auth problems folks have been seeing lately.

t-watana (Wed, 26 Apr 2017 00:17:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Kxagxd2NGo73tDCpe) @jworthington Thank you for the reply! I'll examine the other causes.

chunhui (Wed, 26 Apr 2017 02:10:40 GMT):
Has joined the channel.

rmohta (Wed, 26 Apr 2017 02:30:32 GMT):
@bretharrison the change [https://gerrit.hyperledger.org/r/#/c/8499] uses peerOrgAdmin as username. Where do we define that?

raghavsood (Wed, 26 Apr 2017 04:13:49 GMT):
Has joined the channel.

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

anbu22 (Wed, 26 Apr 2017 06:32:44 GMT):
@rmohta I guess if your qn is while running the e2e tests- you should look for a combination of unit/util.js and integration/e2e/e2eUtils.js. When you try to install chain code -- util function is called. and as of now util function creates the "peerOrgAdmin" and you dont have to create it manually. Am sure that you are aware of other config files where the MSP name, id are all set. If you use the cli - you should be able to create this user as well. (Disclaimer: Again i m only a user answering with my experience. Other subject matter experts may correct my answers).

swangbj (Wed, 26 Apr 2017 09:25:24 GMT):
Has joined the channel.

hayato (Wed, 26 Apr 2017 10:43:24 GMT):
Has joined the channel.

daijianw (Wed, 26 Apr 2017 12:40:51 GMT):
Has joined the channel.

MikeMayori (Wed, 26 Apr 2017 12:52:15 GMT):
Hi all, the problem in marbles , is the generation of the chainCfg.tx , and the generate the certs for the orgs and users.. Something I was wondering around asking who can help to undertand how to do that, i some way if you do not have that marbles will only be an example.. only

MikeMayori (Wed, 26 Apr 2017 12:52:15 GMT):
Hi all, the problem in marbles , is the generation of the chainCfg.tx , and the generate the certs for the orgs and users.. Something I was wondering around asking who can help to undertand how to do that, in some way if you do not have that config tx , genesis / nonce in marbles will only be an example.. only

jworthington (Wed, 26 Apr 2017 15:01:50 GMT):
I am getting dizzy from failing to understand or correct my issue for the last week. I have a stand-alone ca-server. Seems fine. I can register and enroll using the command line client from a separate machine. All I needed was the ca-cert and key from the ca server. But when I try node sdk I always get TSL handshake error EOF on the ca-server and 'SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing' in node. What cert do I need where for signing? Same running e2e or fabric-ca-services-tests. Surely it is something obvious and I am just an idiot.

rmohta (Wed, 26 Apr 2017 18:41:27 GMT):
@here Via *peer chaincode instantiate* we can pass --chainID. What's chaincode id? How do I get that info?

akashmar (Wed, 26 Apr 2017 18:42:28 GMT):
@rmohta whatever you used in your chaincode implementation of getChainId()

rmohta (Wed, 26 Apr 2017 18:46:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ovRCWpGY63WwXNkKt) @akashmar getChainId() is there in java-sdk. I don't see that in node-sdk. Also I don't see that method in go chaincode. Do you have a example I can look at?

akashmar (Wed, 26 Apr 2017 18:49:38 GMT):
@rmohta it must have been removed recently from go code. Anyways, you need to provide a name when you call `peer chaincode install`. You need to use that name

akashmar (Wed, 26 Apr 2017 18:51:35 GMT):
@rmohta Wait I got confused there for a bit, I think what you need is the channelID

rmohta (Wed, 26 Apr 2017 19:42:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HHiipgaui4fShLAnY) @akashmar Yeah. Looking at the nodejs-sdk code channel id should be passed. Let me try that

rmohta (Wed, 26 Apr 2017 19:57:13 GMT):
For anyone looking for more information, *channel_id: this is the value of -c argument in peer channel create* and *chaincode_id: this is the value of --name in peer chaincode install* command.

ansonlau3 (Thu, 27 Apr 2017 06:42:29 GMT):
Has joined the channel.

john2000 (Thu, 27 Apr 2017 07:55:04 GMT):
Has joined the channel.

Jay (Thu, 27 Apr 2017 08:55:02 GMT):
Has joined the channel.

mcao (Thu, 27 Apr 2017 09:43:36 GMT):
Has joined the channel.

mcao (Thu, 27 Apr 2017 10:06:04 GMT):
Hi everyone,

mcao (Thu, 27 Apr 2017 10:10:45 GMT):
Hi everyone, I am trying to use the fabric-sdk-node with my hyperledger. I started trying to run the e2e tests but I have some weird problems. When I run: *node test/integration/e2e.js* I got the following: ```events.js:160 throw er; // Unhandled 'error' event ^ Error: Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)" at ClientDuplexStream._emitStatusIfDone (/home/rhea/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19) at ClientDuplexStream._receiveStatus (/home/rhea/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:180:8) at /home/rhea/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:649:14``` At the same time, in my peer0 I got the following: ```peer0 | 2017-04-27 10:05:14.456 UTC [eventhub_producer] Chat -> ERRO 024 Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)"```` Any ideas? I am using hyperledger images built a few days ago from the github repository (master branch). Thanks in advance!!! :)

mcao (Thu, 27 Apr 2017 10:10:45 GMT):
Hi everyone, I am trying to use the fabric-sdk-node with my hyperledger. I started trying to run the e2e tests but I have some weird problems. When I run: *node test/integration/e2e.js* I got the following: ```events.js:160 throw er; // Unhandled 'error' event ^ Error: Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)" at ClientDuplexStream._emitStatusIfDone (/home/rhea/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19) at ClientDuplexStream._receiveStatus (/home/rhea/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:180:8) at /home/rhea/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:649:14``` At the same time, in my peer0 I got the following: ```peer0 | 2017-04-27 10:05:14.456 UTC [eventhub_producer] Chat -> ERRO 024 Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)"```` Any ideas? I am using hyperledger images built a few days ago from the github repository (master branch), i.e. v1.0. Thanks in advance!!! :)

kofman.alex@gmail.com (Thu, 27 Apr 2017 11:36:36 GMT):
Hi, most probably this has been asked and responded already but I cannot find that.... How to decode a transaction payload correctly? Right now I'm trying to do as follows: ```block.transactions[i].payload = Buffer.from(block.transactions[i].payload, 'base64').toString('ascii');``` But the resulting string contains some 'garbage' chars in it which I don't know how to filter out in a generic way. Any ideas? Thanks in advance!

kofman.alex@gmail.com (Thu, 27 Apr 2017 11:36:36 GMT):
Hi, most probably this has been asked and responded already but I cannot find that.... How to decode a transaction payload correctly? Right now I'm trying to do as follows: ```block.transactions[i].payload = Buffer.from(block.transactions[i].payload, 'base64').toString('ascii');``` But the resulting string contains some 'garbage' chars in it which I don't know how to filter out in a generic way. Any ideas? Thanks in advance! P.S. Hyperledger v0.6

dayubian (Thu, 27 Apr 2017 12:54:25 GMT):
Has joined the channel.

akashmar (Thu, 27 Apr 2017 14:04:06 GMT):
@mcao I'm seeing the same error you are. Got a solution yet?

mcao (Thu, 27 Apr 2017 14:11:20 GMT):
@akashmar unfortunately no... please let me know if you find it first! Are you using hyperledger v1.0 too? It may be possible that some communication mechanism/protocol was slightly changed?

akashmar (Thu, 27 Apr 2017 14:19:17 GMT):
yes i'm using 1.0. I was thinking it might be a version mismatch between fabric and node-sdk

mcao (Thu, 27 Apr 2017 14:25:25 GMT):
me too...but it seems that it is supposed to work on Hyperledger v1.0... let's see if somebody can shed some light into this! :S

mcao (Thu, 27 Apr 2017 14:26:37 GMT):
I am taking a look to the Jenkins jobs of fabric-sdk-node... and it seems to be for Hyperledger v1.0... :P

rameshthoomu (Thu, 27 Apr 2017 14:53:44 GMT):
@jimthematrix sdk-node e2e tests are failing.. https://jira.hyperledger.org/browse/FAB-3459

jimthematrix (Thu, 27 Apr 2017 15:20:30 GMT):
https://gerrit.hyperledger.org/r/#/c/8389/ needs to be finished

jimthematrix (Thu, 27 Apr 2017 15:20:30 GMT):
@rameshthoomu https://gerrit.hyperledger.org/r/#/c/8389/ needs to be finished

MikeMayori (Thu, 27 Apr 2017 15:41:48 GMT):
Hey All, one question any idea how to convert the block hash from hex to byte again?? and how to get the block number from the chain.queryInfo(); response ??

akashmar (Thu, 27 Apr 2017 15:42:43 GMT):
@mcao i used updated images of fabric-peer and that error went away

mcao (Thu, 27 Apr 2017 15:43:02 GMT):
yes...but now don't you have an error with the orderer?

mcao (Thu, 27 Apr 2017 15:43:39 GMT):
because they introduce changes in the channel...and the orderer crashs...

mcao (Thu, 27 Apr 2017 15:43:52 GMT):
XD

akashmar (Thu, 27 Apr 2017 15:45:58 GMT):
i'm not that up to date I guess. I am seeing a different error though: ``` error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error executing chaincode: a syscc should be running (it cannot be launched) lscc:1.0.0-snapshot-c5c60c3 ``` which i guess has to do with the ccenv image not available or something

mcao (Thu, 27 Apr 2017 15:46:35 GMT):
If I make it work, I let you know! =)

mcao (Thu, 27 Apr 2017 16:01:31 GMT):
ok... I give up for today...

mcao (Thu, 27 Apr 2017 16:03:35 GMT):
@akashmar , perhaps you are dealing with other problems...but today I found out that the last update of the fabric changed the channels, so that the orderer was failing to start (in the demo of test/fixtures). So I updated the configtx.yaml to the new changes.... but then the createChannel test does not work anymore. I suppose that as @jimthematrix said...this needs to be finished...

akashmar (Thu, 27 Apr 2017 16:04:07 GMT):
i'm not seeing these issues yet, i havent updated in a few days

MrMoneyChanger (Thu, 27 Apr 2017 16:54:27 GMT):
Has joined the channel.

feronti (Thu, 27 Apr 2017 18:48:15 GMT):
Has joined the channel.

feronti (Thu, 27 Apr 2017 18:49:06 GMT):
hi, I'm following this page to get fabric nodejs sdk http://fabric-sdk-node.readthedocs.io/en/latest/sample-standalone-app/

feronti (Thu, 27 Apr 2017 18:49:50 GMT):
but I can't understand what this line means: cd /opt/gopath/src/github.com/hyperledger/fabric

jogando (Thu, 27 Apr 2017 20:07:31 GMT):
Has joined the channel.

jogando (Thu, 27 Apr 2017 20:08:40 GMT):
i believe that page is not updated...the following step would be "Start the membership services and peer processes"... fabric v1.0.0 does no longer use membership services

feronti (Thu, 27 Apr 2017 20:14:16 GMT):
so, is there some node js examples to use with fabric 1.0?

feronti (Thu, 27 Apr 2017 20:14:48 GMT):
currently I have fabric deployed in docker with the example02 chaincode

jogando (Thu, 27 Apr 2017 20:19:29 GMT):
as far as i understand, for running the tests of the fabric-sdk-node repository, a fabric network should be deployed using the YAML file under /test/fixtures/docker-compose.yaml... but i'm getting an error when i run the command "docker-compose up --force-recreate"... the Orderer does not start

feronti (Thu, 27 Apr 2017 20:20:35 GMT):
ok, I will now with /test/fixtures/docker-compose.yaml

feronti (Thu, 27 Apr 2017 20:24:39 GMT):
I got this error in ca_peerOrg1:

feronti (Thu, 27 Apr 2017 20:25:26 GMT):
`ca_peerOrg1 | Error: Incorrect format in file '/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml': 1 error(s) decoding: ca_peerOrg1 | ca_peerOrg1 | * 'DB.TLS.CertFiles' expected type 'string', got unconvertible type '[]interface {}' ``

feronti (Thu, 27 Apr 2017 20:25:26 GMT):
``` ca_peerOrg1 | Error: Incorrect format in file '/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml': 1 error(s) decoding: ca_peerOrg1 | ca_peerOrg1 | * 'DB.TLS.CertFiles' expected type 'string', got unconvertible type '[]interface {}' ``

jogando (Thu, 27 Apr 2017 20:26:08 GMT):
clone the fabric-ca repository

jogando (Thu, 27 Apr 2017 20:26:15 GMT):
and run 'make docker'

jogando (Thu, 27 Apr 2017 20:26:23 GMT):
for rebuilding the fabric-ca image

feronti (Thu, 27 Apr 2017 20:26:26 GMT):
ok, I will

jogando (Thu, 27 Apr 2017 20:26:55 GMT):
and i perhaps you should also rebuild the fabric images

feronti (Thu, 27 Apr 2017 20:27:01 GMT):
cloning this https://github.com/hyperledger/fabric-ca

jogando (Thu, 27 Apr 2017 20:27:09 GMT):
by cloning the repository and 'make docker'

jogando (Thu, 27 Apr 2017 20:27:11 GMT):
yes

feronti (Thu, 27 Apr 2017 20:27:46 GMT):
master branch is ok? or branch v1.0.0-alpha-preview

jogando (Thu, 27 Apr 2017 20:27:53 GMT):
i'm using master

jogando (Thu, 27 Apr 2017 20:30:51 GMT):
perhaps you need to run 'make docker-clean' for cleaning the older docker images

MikeMayori (Thu, 27 Apr 2017 22:36:22 GMT):
Hey, All , when I am trying to get the block information by chain.queryByHash() or chain.queryBlock() . This two queries must return the same exactly block ?? Right

MikeMayori (Thu, 27 Apr 2017 22:37:37 GMT):
Seems like the data.data[0] for queryBlock comes empty and if not is of Type CONFIG will return and Error

MikeMayori (Thu, 27 Apr 2017 22:37:38 GMT):
// if(channel_header.type != _commonProto.HeaderType.CONFIG) { // return Promise.reject(new Error('Block must be of type "CONFIG"')); // }

wsh_bob (Fri, 28 Apr 2017 08:09:20 GMT):
Has joined the channel.

mcao (Fri, 28 Apr 2017 08:09:58 GMT):
@feronti There is a bug/type in the *fabric-ca-server-config.yaml* files. Open those configuration files and search for "certfiles". The configuration parameters for this field should be a list of items separated by a comma. In the files there is a dash (-).

vu3mmg (Fri, 28 Apr 2017 08:47:51 GMT):
Has joined the channel.

GururajL (Fri, 28 Apr 2017 09:00:26 GMT):
Has joined the channel.

GururajL (Fri, 28 Apr 2017 09:06:48 GMT):
hi!, i was trying to run the balance transfer app from here https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer

GururajL (Fri, 28 Apr 2017 09:07:03 GMT):
but it does not seem to be complete, some files are missing

GururajL (Fri, 28 Apr 2017 09:10:01 GMT):
https://github.com/asararatnakar/fabric_v1_nodesample is giving as error while calling createchannel [2017-04-28 14:39:44.091] [DEBUG] Create-Channel - ====== Creating Channel 'mychannel' ====== info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/gururaj/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store [2017-04-28 14:39:44.387] [INFO] Helper - Successfully loaded member from persistence [2017-04-28 14:39:44.388] [DEBUG] Create-Channel - Successfully enrolled user 'admin' [2017-04-28 14:39:44.391] [ERROR] Create-Channel - TypeError: _commonProto.Envelope.decode is not a function at /Users/gururaj/Source/bc/fabric_v1_nodesample/node_modules/fabric-client/lib/Chain.js:427:42 [2017-04-28 14:39:44.391] [DEBUG] Create-Channel - Successfully waited to make sure channel 'mychannel' was created. [2017-04-28 14:39:44.392] [DEBUG] Create-Channel - ====== Channel creation 'mychannel' completed ======

GururajL (Fri, 28 Apr 2017 09:10:27 GMT):
can anyone help with running a sample sdk-node app?

codeaddslife (Fri, 28 Apr 2017 09:53:57 GMT):
Has joined the channel.

GururajL (Fri, 28 Apr 2017 10:08:59 GMT):
btw, i am trying to run the node client code from mac osx

mffrench (Fri, 28 Apr 2017 10:10:50 GMT):
Hi, I plan to upgrade the current project using fabric 1.0.0-alpha to a newer version as I need the GO shim.chaincode.GetTxTimestamp method implementation (not implemented on 1.0.0-alpha|git rev fa3d88cde177750804c7175ae000e0923199735c). Reading the fabric-java-sdk README the recommended revision for last 'stable' fabric 1.0.0 is git rev b2a2b3b11481438639bf27ed10b99e490dd23b8c. This revision is OK for me as it contains the GO shim.chaincode.GetTxTimestamp implementation. But this is the recommended version from the java sdk team and so I'd like to get the recommendation from node sdk team. What are the last recommended fabric and fabric-node-sdk revision to get the chaincode.GetTxTimestamp implementation ? Thank you !

mffrench (Fri, 28 Apr 2017 10:10:50 GMT):
Hi, I plan to upgrade the current project I'm working on which is using fabric 1.0.0-alpha to a newer fabric version as I need the GO shim.chaincode.GetTxTimestamp method implementation (not implemented on 1.0.0-alpha|git rev fa3d88cde177750804c7175ae000e0923199735c). Reading the fabric-java-sdk README the recommended revision for last 'stable' fabric 1.0.0 is git rev b2a2b3b11481438639bf27ed10b99e490dd23b8c. This revision is OK for me as it contains the GO shim.chaincode.GetTxTimestamp implementation. But this is the recommended version from the java sdk team and so I'd like to get the recommendation from node sdk team. What are the last recommended fabric and fabric-node-sdk revision to get the chaincode.GetTxTimestamp implementation ? Thank you !

mffrench (Fri, 28 Apr 2017 10:10:50 GMT):
Hi, I plan to upgrade the current project I'm working on which is using fabric 1.0.0-alpha to a newer fabric version as I need the GO shim.chaincode.GetTxTimestamp method implementation (not implemented on 1.0.0-alpha|git rev `fa3d88cde177750804c7175ae000e0923199735c)`. Reading the fabric-java-sdk README the recommended revision for last 'stable' fabric 1.0.0 is git rev `b2a2b3b11481438639bf27ed10b99e490dd23b8c`. This revision is OK for me as it contains the GO shim.chaincode.GetTxTimestamp implementation. But this is the recommended version from the java sdk team and so I'd like to get the recommendation from node sdk team. What are the last recommended fabric and fabric-node-sdk revision to get the chaincode.GetTxTimestamp implementation ? Thank you !

sstone1 (Fri, 28 Apr 2017 10:52:05 GMT):
`fabric-client@1.0.0-alpha` appears to be broken at the moment as `grpc` has been updated to `1.3.0`, and it throws the following error: ``` ✖ Deploying business network definition. This may take a minute... TypeError: identityProto.SerializedIdentity is not a constructor Command failed ``` if we back it off to `grpc@1.2.4` it works OK but this is difficult to do

sstone1 (Fri, 28 Apr 2017 10:52:05 GMT):
`fabric-client@1.0.0-alpha` appears to be broken at the moment as `grpc` has been updated to `1.3.0`, and it throws the following error: ``` ✖ Deploying business network definition. This may take a minute... TypeError: identityProto.SerializedIdentity is not a constructor Command failed ``` if we back it off to `grpc@1.2.4` it works OK but this is difficult to do @jimthematrix FYI

houssemchebbi (Fri, 28 Apr 2017 11:40:15 GMT):
Has joined the channel.

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

mffrench (Fri, 28 Apr 2017 12:25:03 GMT):
looking both history of fabric and fabric-node-sdk, I think for fabric rev `b2a2b3b11481438639bf27ed10b99e490dd23b8c` I need to use fabric-node-sdk rev `caaf3c0dc78da7f6fa21521e872a4b0de752a292` (ie: up to [FAB-1738] Event registration requiring signature).

mffrench (Fri, 28 Apr 2017 12:25:12 GMT):
Let me know if you have better recommendations

jogando (Fri, 28 Apr 2017 12:39:28 GMT):
@mffrench what fabric-ca revision are you using?

mffrench (Fri, 28 Apr 2017 12:40:52 GMT):
currently I use the one recommend by the java sdk README too : `09107e7ba6fef7134c949a8edd5d036f9832398b`

mffrench (Fri, 28 Apr 2017 12:51:25 GMT):
unfortunately I've to move my current fabric rev as the peer is crashing when trying to connect on couchdb : ```

mffrench (Fri, 28 Apr 2017 12:51:25 GMT):
unfortunately I've to move my current fabric rev as the peer is crashing when trying to connect on couchdb : ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xaadd06] goroutine 1 [running]: panic(0xc70aa0, 0xc420010060) /opt/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/core/ledger/util/couchdb.(*CouchInstance).handleRequest(0xc4201319a0, 0xd53b79, 0x3, 0xc420226480, 0x17, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/util/couchdb/couchdb.go:1265 +0xad6 github.com/hyperledger/fabric/core/ledger/util/couchdb.(*CouchInstance).VerifyConnection(0xc4201319a0, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/util/couchdb/couchdb.go:337 +0x15d github.com/hyperledger/fabric/core/ledger/util/couchdb.CreateCouchInstance(0xc42000c06f, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4201ce9f0, ...) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/util/couchdb/couchdbutil.go:44 +0x245 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.NewVersionedDBProvider(0xc4201ce9f0, 0xc4202064d0, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:59 +0xc1 github.com/hyperledger/fabric/core/ledger/kvledger.NewProvider(0xc689e0, 0x0, 0xc42021f4d0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger_provider.go:90 +0x2bf github.com/hyperledger/fabric/core/ledger/ledgermgmt.initialize() /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledger_mgmt.go:59 +0x14e github.com/hyperledger/fabric/core/ledger/ledgermgmt.Initialize.func1() /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledger_mgmt.go:49 +0x14 sync.(*Once).Do(0x13b4dd0, 0xdd76a8) /opt/go/src/sync/once.go:44 +0xdb github.com/hyperledger/fabric/core/ledger/ledgermgmt.Initialize() /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledger_mgmt.go:50 +0x39 github.com/hyperledger/fabric/peer/node.serve(0xc4202366c0, 0x0, 0x1, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:95 +0x74 github.com/hyperledger/fabric/peer/node.glob..func1(0x135d900, 0xc4202366c0, 0x0, 0x1, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:83 +0x3f github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x135d900, 0xc4202366a0, 0x1, 0x1, 0x135d900, 0xc4202366a0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 +0x234 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x135e180, 0xf, 0xc4200120f5, 0x4) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 +0x367 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x135e180, 0x2b, 0xc4200120f5) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 +0x2b main.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:110 +0x545 ```

mffrench (Fri, 28 Apr 2017 12:51:25 GMT):
unfortunately I've to move my current fabric rev as the peer is crashing when trying to connect on couchdb : ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xaadd06] goroutine 1 [running]: panic(0xc70aa0, 0xc420010060) /opt/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/core/ledger/util/couchdb.(*CouchInstance).handleRequest(0xc4201319a0, 0xd53b79, 0x3, 0xc420226480, 0x17, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/util/couchdb/couchdb.go:1265 +0xad6 github.com/hyperledger/fabric/core/ledger/util/couchdb.(*CouchInstance).VerifyConnection(0xc4201319a0, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/util/couchdb/couchdb.go:337 +0x15d github.com/hyperledger/fabric/core/ledger/util/couchdb.CreateCouchInstance(0xc42000c06f, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4201ce9f0, ...) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/util/couchdb/couchdbutil.go:44 +0x245 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.NewVersionedDBProvider(0xc4201ce9f0, 0xc4202064d0, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:59 +0xc1 github.com/hyperledger/fabric/core/ledger/kvledger.NewProvider(0xc689e0, 0x0, 0xc42021f4d0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger_provider.go:90 +0x2bf github.com/hyperledger/fabric/core/ledger/ledgermgmt.initialize() ... ```

mffrench (Fri, 28 Apr 2017 12:52:20 GMT):
will look this subject on another channel

mffrench (Fri, 28 Apr 2017 12:52:22 GMT):
;)

rliu (Fri, 28 Apr 2017 16:46:46 GMT):

Message Attachments

rliu (Fri, 28 Apr 2017 16:50:03 GMT):

Message Attachments

rliu (Fri, 28 Apr 2017 16:50:09 GMT):
@bretharrison Following query.js in the SDK test, I am trying to get the input arguments using the sample code your provided as shown above, but there are strange characters in the input arguments. Do you have any idea how to remove these characters? I'm not sure how these input arguments are encoded in bytebuffer. Thanks.

ersudiplama (Fri, 28 Apr 2017 19:51:43 GMT):
Has joined the channel.

yedendra (Sat, 29 Apr 2017 01:25:40 GMT):
Why there is a limit on node version ~6.*? Recent Node 7.6.* and above releases have better features for dev

mychewcents (Sat, 29 Apr 2017 11:31:59 GMT):
I just pulled the repo from github.com and there seems to be an error in the test/fixtures/docker-compose.yaml file, the Orderer is giving an error: 2017-04-29 11:26:28.826 UTC [orderer/multichain] newLedgerResources -> CRIT 053 Error creating configtx manager and handlers: Error deserializing key ChainCreationPolicyNames for group /Channel/Orderer: Unexpected key ChainCreationPolicyNames does anyone know anything about it?

mcao (Sat, 29 Apr 2017 11:33:52 GMT):
Yes...this is because the fabric is being developed and they included new changes in the channels

mcao (Sat, 29 Apr 2017 11:34:46 GMT):
At least, this is what I discovered by myself these last days. I recommend you to checkout the v1.0.0-alpha from the repository.

mcao (Sat, 29 Apr 2017 11:35:30 GMT):
Otherwise, you have to update the configtx.yaml file with the "Consortiums" and re-create the channel.tx and genesis block

jogando (Sat, 29 Apr 2017 12:05:27 GMT):
is v1.0.0-alpha the same repository as the the v1.0.0-preview branch from github?

jogando (Sat, 29 Apr 2017 12:21:02 GMT):
because when i run the docker-compose from fabric-sdn-node/test/fixtures i get an error saying that the image fabric-couchdb was not found. I downloaded it from the Docker Hub, but then i got an error when launching the containers... the fabric-ca container fails because it can't find the "fabric-ca-server"

mychewcents (Sat, 29 Apr 2017 13:52:07 GMT):
@mcao , so what do you mean by "Consortiums"? What do I need to edit specifically, if you be a bit more explanatory.

mcao (Sat, 29 Apr 2017 13:55:40 GMT):
@mychewcents If you take a look to this sample file: https://github.com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml You will see the following lines inside the config file...it is jsut an example: ``` SampleInsecureSolo: Orderer: <<: *OrdererDefaults Application: <<: *ApplicationDefaults Consortiums: SampleConsortium: Organizations:``` If you compare this configtx.yaml with your own you will notice that there is a new variable called *Consortium*. That is the reason why I was recommending you to go the v1.0.0-alpha tag. ```git checkout tags/v1.0.0-alpha```

mcao (Sat, 29 Apr 2017 13:55:40 GMT):
@mychewcents If you take a look to this sample file: https://github.com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml You will see the following lines inside the config file...it is jsut an example: ``` SampleInsecureSolo: Orderer: <<: *OrdererDefaults Application: <<: *ApplicationDefaults Consortiums: SampleConsortium: Organizations:``` If you compare this configtx.yaml with your own you will notice that there is a new variable called *Consortium*. That is the reason why I was recommending you to go the v1.0.0-alpha tag which is more stable. ```git checkout tags/v1.0.0-alpha```

mcao (Sat, 29 Apr 2017 14:05:44 GMT):
@jimthematrix @sstone1 Thanks for the last fix of v1.0.0-alpha.1

jimthematrix (Sat, 29 Apr 2017 14:11:31 GMT):
@mcao glad to see that you've already noticed ;-)

jimthematrix (Sat, 29 Apr 2017 14:12:28 GMT):
thanks to @sstone1 for identifying and fixing the issue

mcao (Sat, 29 Apr 2017 14:13:08 GMT):
I notice it yesterday...it was driving me completely crazy...ahahaha

sstone1 (Sat, 29 Apr 2017 14:15:07 GMT):
no problem guys!

kouohhashi (Sat, 29 Apr 2017 16:23:21 GMT):
Has joined the channel.

jimthematrix (Sat, 29 Apr 2017 18:37:37 GMT):
`EVERYONE`: note that if you want to stay on the alpha stream (1.0.0-alpha, 1.0.0-alpha.1, so on) without picking up the dev stream (1.0.0-snapshot.1, 1.0.0-snapshot.2, so on), you should use a range like this: `>=1.0.0-alpha <1.0.0-alpha.10`

jimthematrix (Sat, 29 Apr 2017 18:37:37 GMT):
`EVERYONE`: note that if you want to stay on the alpha stream (1.0.0-alpha, 1.0.0-alpha.1, so on) without picking up the dev stream (1.0.0-snapshot.1, 1.0.0-snapshot.2, so on), you should use a range like this: `">=1.0.0-alpha <1.0.0-alpha.10"`

jimthematrix (Sat, 29 Apr 2017 18:38:32 GMT):
use this page to verify your semver string: https://semver.npmjs.com/

torresjeff (Sun, 30 Apr 2017 01:57:38 GMT):
Has joined the channel.

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

zjb0807 (Mon, 01 May 2017 10:14:28 GMT):
Does anyone know how this generate?

zjb0807 (Mon, 01 May 2017 10:15:10 GMT):
in fabric-sdk-node/test/fixtures, fabricca, msp

AbhilekhSingh (Mon, 01 May 2017 12:37:17 GMT):
Hi, I'm getting this error

AbhilekhSingh (Mon, 01 May 2017 12:37:17 GMT):
ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' not ok 3 Error: Invalid results returned ::FORBIDDEN at ClientDuplexStream. (/Users/asingh/go/src/github.com/DSTChain/dst/api-server/node_modules/fabric-client/lib/Orderer.js:199:22) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/Users/asingh/go/src/github.com/DSTChain/dst/api-server/node_modules/grpc/src/node/src/client.js:245:14) error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN error: [Chain.js]: joinChannel - Failed Proposal. Error: Error: Invalid results returned ::FORBIDDEN

AbhilekhSingh (Mon, 01 May 2017 12:37:46 GMT):
when using 1.0.0-alpha.1 version fabric-client and fabric-ca-client

AbhilekhSingh (Mon, 01 May 2017 12:38:05 GMT):
anyone has any idea about this?

AbhilekhSingh (Mon, 01 May 2017 12:42:43 GMT):
orderer logs eceived unauthorized deliver request for channel mychannel

AbhilekhSingh (Mon, 01 May 2017 12:42:43 GMT):
orderer logs received unauthorized deliver request for channel mychannel

RobHekkelman (Mon, 01 May 2017 13:35:39 GMT):
Has joined the channel.

akashmar (Mon, 01 May 2017 14:43:03 GMT):
@AbhilekhSingh you are using the wrong user for this transaction. Make sure you are using the Admin user

akashmar (Mon, 01 May 2017 14:44:04 GMT):
@here I get the following error when I try to instantiate java chaincode through node js: ``` 2017-05-01 14:32:59.993 UTC [dockercontroller] Start -> ERRO 05b Error creating image builder: Failed to generate a Dockerfile: Failed to generate platform-specific Dockerfile: Build file not found 2017-05-01 14:32:59.994 UTC [dockercontroller] deployImage -> ERRO 05c Error building images: missing remote repository e.g. 'github.com/user/repo' 2017-05-01 14:32:59.994 UTC [dockercontroller] deployImage -> ERRO 05d Image Output: ******************** ******************** 2017-05-01 14:32:59.994 UTC [chaincode] Launch -> ERRO 05e launchAndWaitForRegister failed Error starting container: missing remote repository e.g. 'github.com/user/repo' ``` Any ideas what I'm missing?

sanchezl (Mon, 01 May 2017 15:10:15 GMT):
@akashmar , start by looking at the value of chaincode.java.Dockerfile in your core.yml. By default this will have an in-line Dockerfile that points to an image that is versioned based on the HEAD commit. There might be some mismatch with what's actually in your local docker repository.

akashmar (Mon, 01 May 2017 15:13:59 GMT):
@sanchezl this is what's in the core.yaml file: ``` Dockerfile: | from $(DOCKER_NS)/fabric-javaenv:$(ARCH)-$(PROJECT_VERSION) ``` and these are the images I have deployed: ``` REPOSITORY TAG IMAGE ID CREATED SIZE hyperledger/fabric-peer latest b8b5d382650d 4 days ago 185 MB hyperledger/fabric-peer x86_64-1.0.0-snapshot-c5c60c3 b8b5d382650d 4 days ago 185 MB hyperledger/fabric-javaenv latest 7e8845b99852 4 days ago 1.43 GB hyperledger/fabric-javaenv x86_64-1.0.0-snapshot-c5c60c3 7e8845b99852 4 days ago 1.43 GB hyperledger/fabric-ccenv latest bd057596c9ea 4 days ago 1.29 GB hyperledger/fabric-ccenv x86_64-1.0.0-snapshot-c5c60c3 bd057596c9ea 4 days ago 1.29 GB hyperledger/fabric-peer x86_64-1.0.0-snapshot-a076bba db208b68ae03 2 weeks ago 185 MB hyperledger/fabric-javaenv x86_64-1.0.0-snapshot-a076bba ae9e0595a52c 2 weeks ago 1.43 GB hyperledger/fabric-ca x86_64-1.0.0-alpha 35311d8617b4 6 weeks ago 240 MB hyperledger/fabric-peer x86_64-1.0.0-alpha 784c5d41ac1d 6 weeks ago 184 MB hyperledger/fabric-javaenv x86_64-0.7.0-snapshot-d7920a9 07d19617528d 6 weeks ago 1.42 GB ```

sanchezl (Mon, 01 May 2017 15:14:29 GMT):
and output of `git rev-parse --short HEAD`

sanchezl (Mon, 01 May 2017 15:14:29 GMT):
and output of `git rev-parse --short HEAD`?

dhwang (Mon, 01 May 2017 15:15:21 GMT):
Has joined the channel.

akashmar (Mon, 01 May 2017 15:15:29 GMT):
usxxcucchjm1:fabric kashma1$ git rev-parse --short HEAD c5c60c3

sanchezl (Mon, 01 May 2017 15:16:38 GMT):
that matches you images, so now your Java cc itself, does it happen to have a Dockerfile within?

akashmar (Mon, 01 May 2017 15:17:42 GMT):
I don't think so. it's just a java project in eclipse.

akashmar (Mon, 01 May 2017 15:19:14 GMT):
let me rephrase that, it doesn't have a dockerfile.

sanchezl (Mon, 01 May 2017 15:31:44 GMT):
Only other thing that comes to mind is that the path you specified when deploying might not actually pointing to your Java chaincode (but it is pointing to an existing directory).

akashmar (Mon, 01 May 2017 16:05:15 GMT):
@sanchezl I'm using the same path I used for the install request

akashmar (Mon, 01 May 2017 16:05:55 GMT):
and I made sure the chaincode is installed because I tried running the install script again and it said the chaincode exists

sanchezl (Mon, 01 May 2017 16:07:38 GMT):
Try instantiate without specifying a path.

sanchezl (Mon, 01 May 2017 16:07:38 GMT):
Try instantiate without specifying a path. It should only be needed during install.

akashmar (Mon, 01 May 2017 16:10:57 GMT):
@sanchezl no luck. same error.

ersudiplama (Mon, 01 May 2017 17:58:08 GMT):
Hello guys,

ersudiplama (Mon, 01 May 2017 17:58:32 GMT):
I tried to run the marble code for V1 and it has error while running the node sdk

ersudiplama (Mon, 01 May 2017 18:00:46 GMT):

Message Attachments

ersudiplama (Mon, 01 May 2017 18:01:00 GMT):
Thank you in advance

ersudiplama (Mon, 01 May 2017 18:04:01 GMT):
I also got feedback as this error is due to update in node-sdk as same project with same configuration is running in my colleagues laptop but I got above error.

ersudiplama (Mon, 01 May 2017 18:11:18 GMT):
To make it more clear, I was working with IBM HSBN network and following the marble tutorials.

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

ankursam (Mon, 01 May 2017 18:43:11 GMT):
Has joined the channel.

JasonD (Tue, 02 May 2017 02:29:30 GMT):
I tried to enroll admin, but got this error:

JasonD (Tue, 02 May 2017 02:29:37 GMT):
``` not ok 1 Error: Error: Failed to enroll user 'admin'. Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140735200576256:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794: ] at ClientRequest. (/Users/david/Desktop/work/code/gopath/src/datachain/jutian-backend/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:568:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at onwriteError (_stream_writable.js:345:10) at onwrite (_stream_writable.js:363:5) at WritableState.onwrite (_stream_writable.js:89:5) at fireErrorCallbacks (net.js:468:13) at hfc.newDefaultKeyValueStore.then.then (/Users/david/Desktop/work/code/gopath/src/datachain/jutian-backend/server/chaincode/create-channel.js:56:10) at hfc.newDefaultKeyValueStore.then.then.then (/Users/david/Desktop/work/code/gopath/src/datachain/jutian-backend/server/chaincode/create-channel.js:68:10) ```

JasonD (Tue, 02 May 2017 02:29:48 GMT):
anyone seen this?

JasonD (Tue, 02 May 2017 02:30:35 GMT):
``` Error: Error: Failed to enroll user 'admin'. Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140735200576256:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794 ```

Ratnakar (Tue, 02 May 2017 03:32:02 GMT):
@akashmar are you able to compile your chaincode against the fabric code base commit level `c5c60c3`? Probably , you will see an exited chaincode container if there are chaincode build failures. can you confirm please ?

Ratnakar (Tue, 02 May 2017 03:40:56 GMT):
@ersudiplama Incase if you haven't figured out the issue yet. This is is a known issue .. `fabric-client@1.0.0-alpha` is broken as grpc module is getting updated to 1.3.0 which in turn causes the failure Please refer https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pdoppvfRGq4gPKcYy for more details. Installing *fabric-ca-client* and *fabric-client* to `1.0.0-alpha.1` would fix the issue

Lakshmipadmaja (Tue, 02 May 2017 05:01:01 GMT):
Has joined the channel.

AbhilekhSingh (Tue, 02 May 2017 06:00:56 GMT):
@sstone1 v1.0.0-alpha.x branch test cases are broken

AbhilekhSingh (Tue, 02 May 2017 06:01:09 GMT):
I'm trying to use it with docker images x86_64-1.0.0-alpha

sstone1 (Tue, 02 May 2017 06:54:32 GMT):
@AbhilekhSingh I know the CI tests failed because they were pulling in the latest version of fabric-ca instead of the alpha version, @jimthematrix had to force the changesi n

sstone1 (Tue, 02 May 2017 06:54:32 GMT):
@AbhilekhSingh I know the CI tests failed because they were pulling in the latest version of fabric-ca instead of the alpha version, @jimthematrix had to force the changes in

AbhilekhSingh (Tue, 02 May 2017 06:55:25 GMT):
one question which docker images I should use with latest v1.0.0-alpha.x

SyneBlockChainTeam (Tue, 02 May 2017 07:24:28 GMT):
Has joined the channel.

SotirisAlfonsos (Tue, 02 May 2017 08:42:21 GMT):
Has joined the channel.

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

AbhilekhSingh (Tue, 02 May 2017 11:42:21 GMT):
chain.initialize() failing when instantiating the chaincode

AbhilekhSingh (Tue, 02 May 2017 11:42:22 GMT):
error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN error: [Chain.js]: getChannelConfig - Failed Proposal. Error: Error: Invalid results returned ::FORBIDDEN

AbhilekhSingh (Tue, 02 May 2017 11:42:28 GMT):
I'm using admin user

ersudiplama (Tue, 02 May 2017 13:46:14 GMT):
@Ratnakar thankx

dbshah (Tue, 02 May 2017 13:46:25 GMT):
Has joined the channel.

akashmar (Tue, 02 May 2017 14:34:23 GMT):
@Ratnakar how do I do this exactly? [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9uCvuEE95HAbQukhk) @Ratnakar

Ratnakar (Tue, 02 May 2017 14:35:22 GMT):
@akashmar Can you confirm if you chaincode compiled on the fabric commit level `c5c60c3` ?

akashmar (Tue, 02 May 2017 14:36:06 GMT):
@Ratnakar how do I do that?

Ratnakar (Tue, 02 May 2017 14:41:56 GMT):
@akashmar I am not familiar with Java Chaincode. Probably the instructions here http://hyperledger-fabric.readthedocs.io/en/latest/Setup/JAVAChaincode.html will help you compiling and verifying from CLI

akashmar (Tue, 02 May 2017 14:52:06 GMT):
@Ratnakar that page is very out of date. I've tried to install the chaincode using CLI and I get the following error: ``` Error: Error endorsing chaincode: rpc error: code = 13 desc = transport is closing ```

dhwang (Tue, 02 May 2017 15:57:24 GMT):
I've been trying to get the e2e test working. I can't seem to be able to bring up all the docker successfully in fabric-sdk-node/test/fixtures using docker-compose. I've tried the latest master and alpha release and I got different errors. eg. orderer0 | 2017-05-02 15:51:30.468 UTC [orderer/multichain] newLedgerResources -> CRIT 06b Error creating configtx manager and handlers: Error deserializing key ChainCreationPolicyNames for group /Channel/Orderer: Unexpected key ChainCreationPolicyNames Is there a known stable commit that I can use?

jogando (Tue, 02 May 2017 16:25:28 GMT):
i would recommend you to use instead the docker compose file from examples/balance-transfer

pmullaney (Tue, 02 May 2017 17:08:41 GMT):
@jogando: I'm trying to get the e2e and other tests running as well and have been hitting multiple issues. Why would you use another docker-compose, the test instructions call for the one in test/fixtures?

pmullaney (Tue, 02 May 2017 17:10:23 GMT):
@dhwang: I had your error last night but pulled this morning, after fixing part of the orderer config, and there were fixes for that error

pmullaney (Tue, 02 May 2017 17:11:41 GMT):
now create-channel, join-channel and install-chaincode seem to work but instantiate-chaincode fails consistently with: ubuntu@hyperledger-devenv:48cd487:/opt/gopath/src/github.com/hyperledger/fabric-sdk-node$ node test/integration/e2e/instantiate-chaincode.js info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: instantiate chaincode ***** getsubmitter calling info: [Client.js]: Failed to load user "admin" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"caname":"ca-org1","protocol":"https","hostname":"localhost","port":7054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"https","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/home/ubuntu/.hfc-key-store"}} not ok 1 Error: Could not parse enrollment response [404 page not found ] as JSON due to error [SyntaxError: Unexpected token p in JSON at position 4] at IncomingMessage. (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:671:14) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) --- operator: fail at: cop.enroll.then.then.then.catch (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/unit/util.js:125:7) ... 1..1 # tests 1 # pass 0 # fail 1 ignore the getsubmitter log

jogando (Tue, 02 May 2017 17:13:12 GMT):
the fabric project is still in active development, so it's hard to run the e2e tests because things change every day and perhaps the fabric-sdk-node is not updated. If you just want to try the basic functionality (enroll user, create/join channel, install/invoke/query chaincode) i recommend you to use the examples/balance-transfer application, since it's based on v1.0.0-alpha

jogando (Tue, 02 May 2017 17:14:40 GMT):
the error you mentioned "Error deserializing key ChainCreationPolicyNames" for example is because you are using a channel block that is outdated. Check https://jira.hyperledger.org/browse/FAB-3298

akashmar (Tue, 02 May 2017 17:36:14 GMT):
@jogando do you know if java chaincode packaging is supported in node sdk?

jogando (Tue, 02 May 2017 17:36:52 GMT):
no, sorry, i do not know

greg.haskins (Tue, 02 May 2017 17:43:23 GMT):
@akashmar I do not believe it is, but let me confirm

greg.haskins (Tue, 02 May 2017 17:44:08 GMT):
@akashmar confirmed, java support is still missing

greg.haskins (Tue, 02 May 2017 17:44:39 GMT):
https://github.com/hyperledger/fabric-sdk-node/tree/8da372ea7d2b9d49d51f5a28aa9982470fed5fe3/fabric-client/lib/packager

greg.haskins (Tue, 02 May 2017 17:44:55 GMT):
there would be "Java.js" or something similar if it were implemented

akashmar (Tue, 02 May 2017 17:45:07 GMT):
@greg.haskins well that explains why I haven't been able to instantiate my java chaincode.

greg.haskins (Tue, 02 May 2017 17:45:36 GMT):
yep, though note I think this would only impact install() operations

akashmar (Tue, 02 May 2017 17:45:53 GMT):
sorry i meant install not instantiate

greg.haskins (Tue, 02 May 2017 17:45:58 GMT):
if you install it from CLI, or whatever, I think you should be able to instantiate/invoke(

greg.haskins (Tue, 02 May 2017 17:46:09 GMT):
ah, yes...i do not think install() will work

greg.haskins (Tue, 02 May 2017 17:46:19 GMT):
you could write the support though ;)

akashmar (Tue, 02 May 2017 17:46:26 GMT):
yeah I had no issue installing from CLI but I was hoping I could do it e2e from node

greg.haskins (Tue, 02 May 2017 17:46:34 GMT):
I added the abstraction and the Car.js support

akashmar (Tue, 02 May 2017 17:46:47 GMT):
do you know what it entails?

greg.haskins (Tue, 02 May 2017 17:47:06 GMT):
well, making a new driver in of itself is not hard

greg.haskins (Tue, 02 May 2017 17:47:21 GMT):
what might be non-trivial is meeting the requirements for packaging up the java chaincode project

greg.haskins (Tue, 02 May 2017 17:47:36 GMT):
you could reverse engineeer the packaging logic that the CLI uses however

greg.haskins (Tue, 02 May 2017 17:47:43 GMT):
i know where that is too

greg.haskins (Tue, 02 May 2017 17:47:45 GMT):
stand by

greg.haskins (Tue, 02 May 2017 17:48:17 GMT):
but as an example, here is the CAR driver: https://github.com/hyperledger/fabric-sdk-node/blob/8da372ea7d2b9d49d51f5a28aa9982470fed5fe3/fabric-client/lib/packager/Car.js

greg.haskins (Tue, 02 May 2017 17:48:33 GMT):
for car, the file is already pre-packaged so you only need to read it in: easy

greg.haskins (Tue, 02 May 2017 17:49:17 GMT):
for java, here is how the CLI does it

greg.haskins (Tue, 02 May 2017 17:49:19 GMT):
https://github.com/hyperledger/fabric/tree/f3c61e6cc3b04915081b15bbed000b377b53c4c1/core/chaincode/platforms/java

greg.haskins (Tue, 02 May 2017 17:49:44 GMT):
and here is CAR: https://github.com/hyperledger/fabric/tree/f3c61e6cc3b04915081b15bbed000b377b53c4c1/core/chaincode/platforms/car

greg.haskins (Tue, 02 May 2017 17:50:19 GMT):
note that the platform drivers in the fabric code base also deal with compiling and managing the chaincode container, so you wouldnt need to worry about that aspect

greg.haskins (Tue, 02 May 2017 17:50:26 GMT):
the SDK only needs to package the code

greg.haskins (Tue, 02 May 2017 17:51:19 GMT):
this is done here: https://github.com/hyperledger/fabric/blob/f3c61e6cc3b04915081b15bbed000b377b53c4c1/core/chaincode/platforms/java/platform.go#L96

greg.haskins (Tue, 02 May 2017 17:51:45 GMT):
basically that function is the CLI equivalent to what the SDK also would need to do

greg.haskins (Tue, 02 May 2017 17:52:48 GMT):
FYI, I think the fabric code that implements the java platform is a little stale..we cleaned up the golang/car drivers quite a bit but left the java codebase alone

greg.haskins (Tue, 02 May 2017 17:53:05 GMT):
so, you might want to study the other two for reference, as well

akashmar (Tue, 02 May 2017 17:55:04 GMT):
ok thanks @greg.haskins I'll see what I can put together

greg.haskins (Tue, 02 May 2017 17:55:42 GMT):
i forgot that some of my cleanup hasnt been merged yet: https://gerrit.hyperledger.org/r/#/c/6991/

greg.haskins (Tue, 02 May 2017 17:56:10 GMT):
not that CR6991 is directly applicable to java packaging...its pretty golang specific...but you can see how I cleaned up some of the platform driver in the process

greg.haskins (Tue, 02 May 2017 17:56:28 GMT):
i suspect java could use some love too

pmullaney (Tue, 02 May 2017 18:20:06 GMT):
@jogando: is the balance transfer is less exposed to things like orderer config? which is the cause of the above? I think you bring up a good point - I see a lot of struggles here because of the fabric changing while ongoing development is done on the sdk. Perhaps its time for the sdk to develop against snapshots of the fabric?(weekly?) SDK development that needs to develop against the latest can always choose to move to it manually. I suspect that something similar is happening anyway as people avoid updating for fear of breaking, its just less formal and more time consuming when there are issues like these.

greg.haskins (Tue, 02 May 2017 18:23:43 GMT):
@pmullaney what is the best example today of coding a client?

jogando (Tue, 02 May 2017 18:23:55 GMT):
i spent almost 2 weeks trying to make the test/fixtures and e2e tests work (without success). If you check the docker-compose.yaml found at examples/balance-transfer/artifacts, you will see that the docker-images refer to the x86_64-1.0.0-alpha tag. You don't need to build the fabric for getting them, docker will automatically pull them from docker hub... i believe this is more stable than manually building the fabric from github

greg.haskins (Tue, 02 May 2017 18:24:26 GMT):
one problem I have seen is that only the e2e gets maintained, but it isnt really structured well as a "best practices" example it seems

pmullaney (Tue, 02 May 2017 18:26:33 GMT):
@jogando : I see, ok its against alpha, which is great for users - but if you need any relatively recent to develop against - cutting those milestones is great but I'd like to address a shorter cycle

pmullaney (Tue, 02 May 2017 18:27:37 GMT):
@jogando : and thanks for doing/attempting that! I know its not easy

pmullaney (Tue, 02 May 2017 18:30:19 GMT):
@greg.haskins: I would have a hard time answering that. I have been working off e2e the last couple months because A) it uses the test fixture called for in the readme and I figured it would stand the greatest chance of working as it is in the test suite B) it covers channels and I needed that to work

pmullaney (Tue, 02 May 2017 18:57:44 GMT):
@dhwang: I have e2e working with fabric at 48cd4874a098cefc3697db070a052570d1f665e8 and the sdk at 8da372ea7d2b9d49d51f5a28aa9982470fed5fe3 and this diff:

pmullaney (Tue, 02 May 2017 18:57:53 GMT):
diff --git a/package.json b/package.json index b01f52c..8c108ad 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "fabric-ca-client": "file:./fabric-ca-client", "fabric-client": "file:./fabric-client", "fs-extra": "^2.0.0", + "grpc": ">=1.1.2 <1.3.0", "gulp": "^3.9.1", "gulp-debug": "^3.0.0", "gulp-eslint": "^3.0.1", diff --git a/test/integration/e2e/e2eUtils.js b/test/integration/e2e/e2eUtils.js index 3301c1e..9c25152 100644 --- a/test/integration/e2e/e2eUtils.js +++ b/test/integration/e2e/e2eUtils.js @@ -187,8 +187,9 @@ function instantiateChaincode(userOrg, chaincode_path, version, upgrade, t){ path: testUtil.storePathForOrg(orgName) }).then((store) => { + console.log("getsubmitter calling"); client.setStateStore(store); - return testUtil.getSubmitter(client, t, userOrg); + return testUtil.getSubmitter(client, t, true, userOrg); }).then((admin) => { @@ -424,7 +425,7 @@ function invokeChaincode(userOrg, version, t){ }).then((store) => { client.setStateStore(store); - return testUtil.getSubmitter(client, t, userOrg); + return testUtil.getSubmitter(client, t, true, userOrg); }).then((admin) => {

pmullaney (Tue, 02 May 2017 19:01:45 GMT):
@greg.haskins: I agree with you completely on e2e. I does seem to get updated most frequently for things like api changes. I do find it broken quite often though which is surprising given its the most maintained. I have been trying to write some examples that don't replicate all the the config reading etc., which muddies up what each example is trying to achieve. I have run into others doing this same work

greg.haskins (Tue, 02 May 2017 19:05:08 GMT):
anything you can share?

greg.haskins (Tue, 02 May 2017 19:05:54 GMT):
i basically want to port this: https://github.com/hyperledger/fabric-chaintool/blob/master/examples/example02/client/nodejs/client.js

greg.haskins (Tue, 02 May 2017 19:05:58 GMT):
to work with the latest

pmullaney (Tue, 02 May 2017 19:29:46 GMT):
I should be able to share something soon, now that I found a stable base

pmullaney (Tue, 02 May 2017 19:30:11 GMT):
I think its very much inline with what you have in your client

mrshah-ibm (Tue, 02 May 2017 21:35:28 GMT):
Has joined the channel.

bh4rtp (Wed, 03 May 2017 02:05:05 GMT):
@jimthematrix For almost three weeks, test/integration/e2e.js cannot run successfully. i keep fabric updated and built every day. can you pass e2e test?

bh4rtp (Wed, 03 May 2017 02:05:05 GMT):
@jimthematrix For almost three weeks, test/integration/e2e.js cannot run successfully. i keep fabric, ca and sdk updated and built every day. can you pass e2e test?

jimthematrix (Wed, 03 May 2017 02:30:40 GMT):
@bh4rtp e2e starts passing again as of https://gerrit.hyperledger.org/r/8823 which was merged earlier today

jimthematrix (Wed, 03 May 2017 02:32:53 GMT):
https://jenkins.hyperledger.org/view/FIT/job/FIT-node-x86_64/ runs node sdk e2e against latest everything 4 times a day, it's been failing from 4/26-5/2 but has 3 successful runs so far

bh4rtp (Wed, 03 May 2017 02:35:20 GMT):
@jimthematrix it seems github.com repos has not updated yet.

jimthematrix (Wed, 03 May 2017 02:36:12 GMT):
it has been updated

jimthematrix (Wed, 03 May 2017 02:36:22 GMT):
the `last update 11 days ago` was mis-leading

jimthematrix (Wed, 03 May 2017 02:36:40 GMT):
that's when the commit was first uploaded to gerrit

jimthematrix (Wed, 03 May 2017 02:37:02 GMT):
but `harrisob [FAB-3319] NodeSDK - add in Consortium` was the latest commit from today

bh4rtp (Wed, 03 May 2017 02:40:43 GMT):
@jimthematrix yes, i find the [FAB-3552] fix build breaks. but it still cannot pass all the tests.

bh4rtp (Wed, 03 May 2017 02:41:25 GMT):
1..27 # tests 27 # pass 16 # fail 11

jimthematrix (Wed, 03 May 2017 02:57:56 GMT):
how are they failing?

jimthematrix (Wed, 03 May 2017 02:58:15 GMT):
can you provide details?

kuangchao (Wed, 03 May 2017 04:28:29 GMT):

Message Attachments

bh4rtp (Wed, 03 May 2017 07:06:16 GMT):
@jimthematrix i paste the detailed log information here. :blush:

bh4rtp (Wed, 03 May 2017 07:07:59 GMT):
allen@ubuntu:~/gopath/src/github.com/hyperledger/fabric-sdk-node$ node test/integration/e2e.js info: Returning a new winston logger with default configurations info: [E2E create-channel]: >>>>>> Will create new channel with name :: mychannel <<<<<<< TAP version 13 # ***** SDK Built config update create flow ***** looking at file ::/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/example.com-cert.pem looking at file ::/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/example.com-tls-cert.pem looking at file ::/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/org1.example.com-cert.pem looking at file ::/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/org1.example.com-tls-cert.pem looking at file ::/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/org2.example.com-cert.pem looking at file ::/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/org2.example.com-tls-cert.pem looking at file ::/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem not ok 1 TypeError: client.newMSP is not a function --- operator: error expected: |- undefined actual: |- [TypeError: client.newMSP is not a function] at: Test.onetime [as end] (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/onetime/index.js:22:12) stack: |- TypeError: client.newMSP is not a function at /home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:234:19 at Test. (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape-promise/index.es5.js:21:13) at Test.bound [as _cb] (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:66:32) at Test.run (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:85:10) at Test.bound [as run] (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:66:32) at Immediate.next (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/results.js:71:15) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5) ... #

yangheping (Wed, 03 May 2017 07:13:40 GMT):
Has joined the channel.

bh4rtp (Wed, 03 May 2017 07:14:37 GMT):
the detailed 11 fails list here.

bh4rtp (Wed, 03 May 2017 07:15:57 GMT):
not ok 1 TypeError: client.newMSP is not a function not ok 3 TypeError: chain.getGenesisBlock is not a function at hfc.newDefaultKeyValueStore.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/join-channel.js:131:16) not ok 16 Error: Must provide the path to the directory to hold files for the store. not ok 17 Error: Must provide the path to the directory to hold files for the store. not ok 18 Error: Must provide the path to the directory to hold files for the store. not ok 25 Error: Must provide the path to the directory to hold files for the store. not ok 26 Error: Must provide the path to the directory to hold files for the store. not ok 27 Error: Must provide the path to the directory to hold files for the store.

bh4rtp (Wed, 03 May 2017 07:27:10 GMT):
@jimthematrix good news! i deleted node_modules and reinstall sdk as follows. 1. `rm -rf node_modules` 2. `rm -rf /root/.hfc*` 3. `rm -rf /tmp/hfc-*` 4. `npm install` 5. `gulp ca` and `node test/integration/e2e.js` passes.

dayubian (Wed, 03 May 2017 07:57:46 GMT):
@bh4rtp Great! :100:

Aleks-visser (Wed, 03 May 2017 09:12:20 GMT):
Im in need of a recomendation. I am trying to run the v1.0.0 version of the sdk but when running the tests it almost immediately fails with a ton of syntax errors, now i am assuming this has something to do with the lint version but how do i fix it ?

mcao (Wed, 03 May 2017 09:19:23 GMT):
@Aleks-visser normally when it fails during the instantiation of chaincode having these types of errors...I try to compile the go chaincode locally to see if I have the same errors

Aleks-visser (Wed, 03 May 2017 09:20:04 GMT):
it isnt failing during chaincode but during "npm test -headless"

mcao (Wed, 03 May 2017 09:20:27 GMT):
ups...then I don't know :P Sorry

Aleks-visser (Wed, 03 May 2017 09:20:42 GMT):
the chaincode error i have is due to a mismatch in the version i sent to it because iv no idea what the current version of fabric is

Aleks-visser (Wed, 03 May 2017 09:21:12 GMT):
355:9 error Expected indentation of 1 tab but found 8 spaces indent 356:9 error Expected indentation of 1 tab but found 8 spaces indent 357:9 error Expected indentation of 1 tab but found 8 spaces indent 359:9 error Expected indentation of 1 tab but found 8 spaces indent 360:13 error Expected indentation of 1 tab but found 12 spaces indent 361:17 error Expected indentation of 1 tab but found 16 spaces indent 363:13 error Expected indentation of 1 tab but found 12 spaces indent 364:17 error Expected indentation of 1 tab but found 16 spaces indent 365:13 error Expected indentation of 0 tabs but found 12 spaces indent 367:13 error Expected indentation of 1 tab but found 12 spaces indent 370:13 error Expected indentation of 1 tab but found 12 spaces indent 371:17 error Expected indentation of 1 tab but found 16 spaces indent 373:17 error Expected indentation of 1 tab but found 16 spaces indent 375:17 error Expected indentation of 1 tab but found 16 spaces indent 377:17 error Expected indentation of 1 tab but found 16 spaces indent 377:46 error Strings must use singlequote quotes 380:17 error Expected indentation of 1 tab but found 16 spaces indent 381:17 error Expected indentation of 1 tab but found 16 spaces indent 382:17 error Expected indentation of 1 tab but found 16 spaces indent 383:17 error Expected indentation of 1 tab but found 16 spaces indent 384:13 error Expected indentation of 0 tabs but found 12 spaces indent 385:17 error Expected indentation of 1 tab but found 16 spaces indent 386:13 error Expected indentation of 0 tabs but found 12 spaces indent 387:9 error Expected indentation of 0 tabs but found 8 spaces indent 388:5 error Expected indentation of 0 tabs but found 4 spaces indent 389:5 error Expected indentation of 1 tab but found 4 spaces indent ✖ 6324 problems (6324 errors, 0 warnings) [10:05:05] 'lint' errored after 5.86 s [10:05:05] ESLintError in plugin 'gulp-eslint' Message: Failed with 6324 errors

Aleks-visser (Wed, 03 May 2017 09:21:18 GMT):
to show a snippit

SyneBlockChainTeam (Wed, 03 May 2017 09:35:48 GMT):

Message Attachments

SyneBlockChainTeam (Wed, 03 May 2017 09:36:00 GMT):
@bh4rtp we followed your steps but it is giving error...

bh4rtp (Wed, 03 May 2017 09:38:20 GMT):
@SyneBlockChainTeam you can run `node test/integration/e2e.js` as root user.

Aleks-visser (Wed, 03 May 2017 11:12:05 GMT):
@bh4rtp it does infact work, pull from gerrit

Aleks-visser (Wed, 03 May 2017 11:12:27 GMT):
pulled from gerrit, reset docker rebuilt everything and then ran the tests, they worked fine

glotov (Wed, 03 May 2017 14:22:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hrXX2PfS4QmSTtv3M) @assasinx93, thank you for your basic-blockchain-app, it is really useful especially because it is working :) Do you know, why the `purchaseorder-v1` chaincode is instantiated only on peer0 (by your `instantiate-chaincode.js` script) and then instantiated on peer2 (by `initialize-default.js`)? I noted, that the orderer configuration says that peer0-1 belongs to Org0 and peer 2-3 to Org1. Is it some kind of "instantiate-on-demand" logic? Is it configured somewhere?

sergefdrv (Wed, 03 May 2017 14:40:26 GMT):
Has joined the channel.

sergefdrv (Wed, 03 May 2017 14:41:44 GMT):
Hi, I would like to start fiddling with node sdk using some minimalistic example. I am wondering if CA is really really required?

sergefdrv (Wed, 03 May 2017 14:44:10 GMT):
with peer cli one can install/instantiate/invoke/query with no enrolment. Is it possible to do the same with node sdk?

daijianw (Wed, 03 May 2017 14:47:15 GMT):
Not sure anyone asked this before. If I use 1.0.0-alpha fabric and fabric-ca, then the corresponding fabric-sdk-node version I should use is 1.0.0.-alpha.x, right?

assasinx93 (Wed, 03 May 2017 15:58:10 GMT):
@glotov I instantiate the chaincode on peer0 of organization 1, that is when dev-peer0 is created. I think the second one is created during the invoke-updateStatus.js. It's just a way of exercising the feature that if you instantiate on one peer, all other peers in the channel refer to the same version and instantiation of the chaincode.

assasinx93 (Wed, 03 May 2017 15:58:34 GMT):
Just to show that the ledger and world state is local to a channel

assasinx93 (Wed, 03 May 2017 16:02:03 GMT):
Also, thanks for the appreciation :D

bmatsuo (Wed, 03 May 2017 22:03:53 GMT):
Has joined the channel.

bh4rtp (Thu, 04 May 2017 02:10:30 GMT):
after updated the latest fabric, ca and node sdk, `node test/integration/e2e.js` runs with 5 fails. error: [Peer.js]: sendProposal - timed out after:60000 error: [Peer.js]: sendProposal - timed out after:60000 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:201:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Peer.js:201:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [E2E testing]: upgrade proposal was bad error: [E2E testing]: upgrade proposal was bad

cophey (Thu, 04 May 2017 08:30:58 GMT):
Has joined the channel.

linyuadam (Thu, 04 May 2017 09:40:16 GMT):
Has joined the channel.

luckydogchina (Thu, 04 May 2017 10:23:50 GMT):
Has joined the channel.

luckydogchina (Thu, 04 May 2017 10:25:07 GMT):
what is wrong with it?

luckydogchina (Thu, 04 May 2017 10:25:08 GMT):

Message Attachments

luckydogchina (Thu, 04 May 2017 10:27:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fhwhRhwttzm8vSSiZ) @luckydogchina the exception is throwsed when I run "npm test -headless"

marek.dapps (Thu, 04 May 2017 11:37:53 GMT):
Has joined the channel.

William.Z (Thu, 04 May 2017 13:05:43 GMT):
Has joined the channel.

akashmar (Thu, 04 May 2017 13:40:14 GMT):
@luckydogchina did you do 'npm install' first?

Amjadnz (Thu, 04 May 2017 14:29:10 GMT):
Has joined the channel.

Amjadnz (Thu, 04 May 2017 14:30:38 GMT):
@jimthematrix - can you please help me here. It is related to the NODE SDK setup. I cleared the directory as you suggested. Setup all the things as needed an now am enrolling the user through the SDK

Amjadnz (Thu, 04 May 2017 14:31:00 GMT):
```info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":7054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} info: [Client.js]: Failed to load user "Jim" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":7054} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/tts/src/github.com/hyperledger/fabric-sdk-node/examples/sc/node_modules/fabric-client/lib/User.js:260:11) error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/tts/src/github.com/hyperledger/fabric-sdk-node/examples/sc/node_modules/fabric-client/lib/User.js:260:11) [2017-05-04 18:17:21.789] [DEBUG] Helper - Jim failed to register [2017-05-04 18:17:21.790] [ERROR] Helper - Jim enrollment failed (node:25779) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot save null userContext. (node:25779) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property '_enrollmentSecret' of undefined```

Amjadnz (Thu, 04 May 2017 14:31:18 GMT):
```curl -s -X POST \ http://localhost:4000/users \ -H "cache-control: no-cache" \ -H "content-type: application/x-www-form-urlencoded" \ -d 'username=Jim&orgName=org1'```

Amjadnz (Thu, 04 May 2017 14:31:41 GMT):
Through the CLI and fabric-ca-client

Amjadnz (Thu, 04 May 2017 14:31:46 GMT):
```[root@bc-adx-node3 bin]# pwd /home/tts/src/github.com/hyperledger/fabric-ca/build/docker/bin```

Amjadnz (Thu, 04 May 2017 14:31:59 GMT):
```[root@bc-adx-node3 bin]# ./fabric-ca-client enroll -u http://admin:adminpw@localhost:7054 2017/05/04 18:23:23 [INFO] User provided config file: /tmp/client/fabric-ca-client-config.yaml 2017/05/04 18:23:23 [INFO] Configuration file location: /tmp/client/fabric-ca-client-config.yaml 2017/05/04 18:23:23 [INFO] generating key: &{A:ecdsa S:256} 2017/05/04 18:23:23 [INFO] encoded CSR 2017/05/04 18:23:23 [INFO] Stored client certificate at /tmp/client/msp/signcerts/cert.pem 2017/05/04 18:23:23 [INFO] Stored CA certificate chain at /tmp/client/msp/cacerts/localhost-7054.pem```

Amjadnz (Thu, 04 May 2017 14:32:09 GMT):
It seems to be enrolling fine - but not from SDK.

Amjadnz (Thu, 04 May 2017 14:32:51 GMT):
the SDK is expecting the ADMIN (from samples) and its key is not found in the .hfc-key-store (presumably as I deleted/cleared them_

Amjadnz (Thu, 04 May 2017 14:33:10 GMT):
Appreciate any help in this regard

mayerwa (Thu, 04 May 2017 14:51:31 GMT):
Has joined the channel.

paul.sitoh (Thu, 04 May 2017 14:52:26 GMT):
Has joined the channel.

robflowers212 (Thu, 04 May 2017 15:38:08 GMT):
Has joined the channel.

ishan.gulhane (Thu, 04 May 2017 17:57:52 GMT):
Has joined the channel.

jimthematrix (Thu, 04 May 2017 19:51:58 GMT):
@Amjadnz so this error would happen when the private key store (~/.hfc-key-store) is deleted but the state store that saves the user objects are preserved

jimthematrix (Thu, 04 May 2017 19:53:02 GMT):
as a result, when the SDK looks for a user, it finds it in the state store, then it needs to use the 'identity' value of the user object to resolve the private key, at which point you'll get the error above because the corresponding private key has been deleted

ishan.gulhane (Thu, 04 May 2017 21:03:43 GMT):
Please help me. I am trying to setup the NODE SDK . When I am trying to create a channel I am getting the following error ```info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/ishan/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "admin" from local key value store ok 1 Successfully loaded member from persistence ok 2 Successfully enrolled user 'admin' not ok 3 TypeError: _commonProto.Envelope.decode is not a function at /Users/ishan/Documents/node/marbles/fabric-sdk-node/node_modules/fabric-client/lib/Chain.js:427:42 --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then (/Users/ishan/Documents/node/marbles/fabric-sdk-node/test/integration/e2e/create-channel.js:96:5) ... ok 4 Successfully waited to make sure new channel was created. 1..4 # tests 4 # pass 3 # fail 1```

ishan.gulhane (Thu, 04 May 2017 21:13:46 GMT):

Message Attachments

Amjadnz (Thu, 04 May 2017 21:45:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=H4dgX9D9bmQzDPD7u) @jimthematrix - Ok thats the issue in my activity. But how do I clear the state store as well.

akashmar (Thu, 04 May 2017 21:52:32 GMT):
@Amjadnz I believe the state store is stored in /tmp/fabric-client-kvs.

akashmar (Fri, 05 May 2017 00:28:28 GMT):
@here when I try to invoke a transaction, I get the following error code: ENDORSEMENT_POLICY_FAILURE. I traced it to the peer logs and found this error: ``` 2017-05-05 00:26:19.139 UTC [txvalidator] VSCCValidateTx -> ERRO 03a VSCC check failed for transaction txid=e060d0a12f65dfa8cf78ad30c92a2cc689f017b43faf89a9b97aba0af0456a57, error VSCC error: policy evaluation failed, err Failed to authenticate policy 2017-05-05 00:26:19.140 UTC [txvalidator] Validate -> ERRO 03b VSCCValidateTx for transaction txId = e060d0a12f65dfa8cf78ad30c92a2cc689f017b43faf89a9b97aba0af0456a57 returned error VSCC error: policy evaluation failed, err Failed to authenticate policy 2017-05-05 00:26:19.140 UTC [statevalidator] ValidateAndPrepareBatch -> WARN 03c Block [2] Transaction index [0] marked as invalid by committer. Reason code [10] ``` I've got 4 endorsing peers and this error appears on all of them for the same transaction. I don't have any problems with the endorsements when I ru the instantiate transaction. Any idea what's going on here?

luckydogchina (Fri, 05 May 2017 01:53:21 GMT):

Message Attachments

luckydogchina (Fri, 05 May 2017 01:54:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zrzan47ie7cbQPL9H) @akashmar Thank you!!! this question is solved , but other exception is throwed,when I run "docker-compose up --force-create" :

jimthematrix (Fri, 05 May 2017 02:12:00 GMT):
@ishan.gulhane looks like you are running newer version tests against older versions of the code. make sure to refresh the `fabric-client` and `fabric-ca-client` modules under `node_modules`. i would just delete the whole node_modules folder and run `npm install` again

kuangchao (Fri, 05 May 2017 02:18:20 GMT):

Message Attachments

greg.haskins (Fri, 05 May 2017 02:31:02 GMT):
did the need to run 'gulp watch' go away recently?

greg.haskins (Fri, 05 May 2017 02:31:14 GMT):
I am not sure what I am doing wrong, but I am now getting this:

greg.haskins (Fri, 05 May 2017 02:31:20 GMT):
```ubuntu@hyperledger-devenv:ea91a99:/local-dev/git/fabric-sdk-node/fabric-client$ gulp watch [02:28:32] Local gulp not found in /local-dev/git/fabric-sdk-node [02:28:32] Try running: npm install gulp```

greg.haskins (Fri, 05 May 2017 02:38:49 GMT):
scratch this: i needed to refresh the npm-install at the top level

greg.haskins (Fri, 05 May 2017 02:38:52 GMT):
its workign now

akashmar (Fri, 05 May 2017 03:22:20 GMT):
@kuangchao that's caused by grpc 1.3.0. I think it was fixed in the latest from master. Otherwise, try overriding the grpc version in package.json to 1.2.4, delete your node_modules folder and run `npm install`

akashmar (Fri, 05 May 2017 03:23:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=99f7B4XyLaGkYANqx) @greg.haskins Have you seen this before?

kuangchao (Fri, 05 May 2017 03:26:33 GMT):
@akashmar yes This is master

Amjadnz (Fri, 05 May 2017 04:18:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZeQPrbDjHkJE6pZws) @akashmar The folders at client-kvs were not created still. Due to the admin user not being found.

Amjadnz (Fri, 05 May 2017 04:19:13 GMT):
Once I cleared the tmp folder I could get pass the admin user issue and the client-kvs folders got created.

Amjadnz (Fri, 05 May 2017 04:19:32 GMT):
Thanks for your info by the way.

Amjadnz (Fri, 05 May 2017 04:20:12 GMT):
So In case of USER not found with no file at /tmp/fabric-client-kvs - a general fabric-sdk-node/tmp folder clearance is fine.

Amjadnz (Fri, 05 May 2017 04:20:48 GMT):
Else we need to clear both /tmp/fabric-client-kvs* folders and fabric-sdk-node/tmp folders both.

Amjadnz (Fri, 05 May 2017 04:21:05 GMT):
Sharing - For someone who might need.

Amjadnz (Fri, 05 May 2017 04:48:54 GMT):
@jimthematrix and @akashmar can you guys please show more light on the following issue

Amjadnz (Fri, 05 May 2017 04:49:01 GMT):
```[2017-05-05 02:48:28.899] [DEBUG] SampleWebApp - ==================== QUERY ON CHAINCODE ================== [2017-05-05 02:48:28.900] [DEBUG] SampleWebApp - channelName : aj001 [2017-05-05 02:48:28.900] [DEBUG] SampleWebApp - chaincodeName : sc_userole [2017-05-05 02:48:28.900] [DEBUG] SampleWebApp - peer : peer2 [2017-05-05 02:48:28.901] [DEBUG] SampleWebApp - args : ["readItem","a-1","role-1","user-1","tr-1","1"] [2017-05-05 02:48:28.901] [DEBUG] SampleWebApp - chaincodeVersion : v1 [2017-05-05 02:48:28.901] [DEBUG] SampleWebApp - [ 'readItem', 'a-1', 'role-1', 'user-1', 'tr-1', '1' ] [2017-05-05 02:48:28.904] [DEBUG] SampleWebApp - User name : Ahmed [2017-05-05 02:48:28.905] [DEBUG] SampleWebApp - Org name : org2 info: [Peer.js]: Peer.const - url: grpcs://localhost:10051 options grpc.ssl_target_name_override=peer3, grpc.default_authority=peer3 info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":8054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":8054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "Ahmed" from local key value store [2017-05-05 02:48:28.926] [INFO] Helper - Successfully loaded member from persistence error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:10051". Error: Failed to deserialize creator identity, err MSP Org2MSP is unknown at /home/tts/src/github.com/hyperledger/fabric-sdk-node/examples/sc/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org2MSP is unknown at /home/tts/src/github.com/hyperledger/fabric-sdk-node/examples/sc/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17```

Amjadnz (Fri, 05 May 2017 04:49:23 GMT):
I'm trying to query the chaincode now from different peers.

Amjadnz (Fri, 05 May 2017 04:49:52 GMT):
So I enrolled a user "Ahmed" from Org2 and it registered fine. I got the bearer token too.

Amjadnz (Fri, 05 May 2017 04:50:10 GMT):
Now using the same token I am trying to invoke the query calls.

Amjadnz (Fri, 05 May 2017 04:50:18 GMT):
and I get the above details

Amjadnz (Fri, 05 May 2017 04:50:43 GMT):
``` fabric-ca-server-org1: image: hyperledger/fabric-ca container_name: fabric-ca-server ports: - "7054:7054" environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server volumes: - ./artifacts/crypto-config/peerOrganizations/peerOrg1/ca/:/etc/hyperledger/fabric-ca-server-config - "./fabric-ca-server:/etc/hyperledger/fabric-ca-server" command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/d8a5b3cac1b821f6e4b487ceaf1fd239cdcfc310894150908b90f05e9179556a_sk -b admin:adminpw' -d fabric-ca-server-org2: image: hyperledger/fabric-ca container_name: fabric-ca-server ports: - "8054:7054" environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server volumes: - ./artifacts/crypto-config/peerOrganizations/peerOrg2/ca/:/etc/hyperledger/fabric-ca-server-config - "./fabric-ca-server:/etc/hyperledger/fabric-ca-server" command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/peerOrg2-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/96bdb57f4efbdcf201a269899eb47e2a73fbb728ae14d47d0d5afb75ddea71de_sk -b admin:adminpw' -d```

Amjadnz (Fri, 05 May 2017 04:50:55 GMT):
My fabric CA configs from docker.yaml file

kuangchao (Fri, 05 May 2017 06:07:16 GMT):

Message Attachments

kuangchao (Fri, 05 May 2017 06:10:43 GMT):
@akashmar thanks

swangbj (Fri, 05 May 2017 06:18:01 GMT):
Hi ,anyone knows how to set timeout when instantiate chaincode

sujayv (Fri, 05 May 2017 06:30:21 GMT):
Has joined the channel.

glotov (Fri, 05 May 2017 07:42:26 GMT):
@ishan.gulhane, this error is because of the grpc is too new. Add `"grpc": "1.1.2",` to your main package.json, then try everything again from scratch (including npm install).

luckydogchina (Fri, 05 May 2017 08:23:21 GMT):
I make the dockers with the last version fabric, fabric-ca,and fabric-sdk-node on github,but I cannot pass all gulp tests. so which version did you build successful with?

mcao (Fri, 05 May 2017 08:25:07 GMT):
I used the v1.0.0-alpha and it works! :)

mcao (Fri, 05 May 2017 08:25:52 GMT):
fabric v1.0.0-alpha and fabric-node-sdk v1.0.0-alpha.x

luckydogchina (Fri, 05 May 2017 08:26:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NFWb3qFYZqJ86FiGW) @mcao what is the alpha git version?

mcao (Fri, 05 May 2017 08:29:07 GMT):
fabric-node-sdk: https://github.com/hyperledger/fabric-sdk-node/tree/v1.0.0-alpha.1

mcao (Fri, 05 May 2017 08:29:24 GMT):
fabric: https://github.com/hyperledger/fabric/tree/v1.0.0-alpha

luckydogchina (Fri, 05 May 2017 08:34:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SjMBtAzg7Bq2CA92J) @mcao Thanks!!!

glotov (Fri, 05 May 2017 09:23:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zusE8peaJXak4AP2X) @assasinx93, did you try to start your e2e_cli on different hosts? Will `purchaseorder-v1` chaincode gets instantiated by both peer0 and peer2, if these peers are on different hosts? Or they still continue to reference single instance?

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

akashmar (Fri, 05 May 2017 13:35:12 GMT):
@swangbj you can find that in the examples but here you go: ``` var hfc = require('fabric-client'); hfc.setConfigSetting('request-timeout', timeout); ```

akashmar (Fri, 05 May 2017 13:36:22 GMT):
@Amjadnz it says Org2MSP is unknown, Are you sure you're using the right mspId value? Is it possible peerOrg2 instead of Org2MSP?

sergefdrv (Fri, 05 May 2017 18:24:58 GMT):
`npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! hashtable@2.0.2 install: `node-gyp configure build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hashtable@2.0.2 install script 'node-gyp configure build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the hashtable package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp configure build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs hashtable npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls hashtable npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/fabric-sdk-node/npm-debug.log `

sergefdrv (Fri, 05 May 2017 18:24:58 GMT):
```npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! hashtable@2.0.2 install: `node-gyp configure build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hashtable@2.0.2 install script 'node-gyp configure build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the hashtable package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp configure build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs hashtable npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls hashtable npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/fabric-sdk-node/npm-debug.log ```

sergefdrv (Fri, 05 May 2017 18:26:02 GMT):
got this while trying `npm install` in the root directory of `fabric-sdk-node`

sergefdrv (Fri, 05 May 2017 18:26:45 GMT):
```npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! hashtable@2.0.2 install: `node-gyp configure build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hashtable@2.0.2 install script 'node-gyp configure build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the hashtable package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp configure build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs hashtable npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls hashtable npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/fabric-sdk-node/npm-debug.log ```

sergefdrv (Fri, 05 May 2017 18:26:45 GMT):
```it describe v1.0.0-alpha-62-gdc026c6 ```

sergefdrv (Fri, 05 May 2017 18:26:45 GMT):
```git describe v1.0.0-alpha-62-gdc026c6 ```

akashmar (Fri, 05 May 2017 18:37:08 GMT):
@sergefdrv I've run into the same issue, try adding this line to the devDependencies section of your package.json: ``` "hastable": "https://github.com/fabrice102/node-hashtable.git" ```

akashmar (Fri, 05 May 2017 18:37:32 GMT):
this is just a workaround though. not sure why the error happens

sergefdrv (Fri, 05 May 2017 18:46:09 GMT):
@akashmar thanks for suggestion, but that doesn't seem to work for me :(

sergefdrv (Fri, 05 May 2017 18:46:43 GMT):
_wondering if node sdk is stable enough..._

akashmar (Fri, 05 May 2017 18:47:40 GMT):
@sergefdrv sorry you're building fabric-sdk-node, not your own project. run this command in the fabric-sdk-node folder before running npm install: ``` sudo npm install "https://github.com/fabrice102/node-hashtable.git" ```

akashmar (Fri, 05 May 2017 18:47:59 GMT):
you might not need the sudo

sergefdrv (Fri, 05 May 2017 18:50:16 GMT):
@akashmar oh yeah, thanks, now I've got much more sensible error message: ```npm install "https://github.com/fabrice102/node-hashtable.git" > hashtable@2.0.2 install /home/ubuntu/fabric-sdk-node/node_modules/hashtable > node-gyp configure build gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. ... ```

sergefdrv (Fri, 05 May 2017 18:51:06 GMT):
_using vagrant VM _

sergefdrv (Fri, 05 May 2017 18:54:13 GMT):
```$ npm test > fabric-sdk-node@0.0.2 test /home/ubuntu/fabric-sdk-node > gulp test-headless [18:55:34] Using gulpfile ~/fabric-sdk-node/gulpfile.js [18:55:34] Starting 'lint'... [18:55:34] Starting 'pre-test'... [18:55:37] Finished 'pre-test' after 3.19 s [18:55:38] Finished 'lint' after 4.33 s [18:55:38] Starting 'test-headless'... events.js:160 throw er; // Unhandled 'error' event ^ Error: Cannot find module '/home/ubuntu/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/grpc_node.node' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/ubuntu/fabric-sdk-node/node_modules/grpc/src/node/src/grpc_extension.js:38:15) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Object.Module._extensions.(anonymous function) [as .js] (/home/ubuntu/fabric-sdk-node/node_modules/istanbul/lib/hook.js:109:37) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/ubuntu/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:55:12) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) npm ERR! Test failed. See above for more details. ```

akashmar (Fri, 05 May 2017 19:07:29 GMT):
@sergefdrv try deleting the node_modules folder and then run the 2 install commands

akashmar (Fri, 05 May 2017 19:07:56 GMT):
if you still get the same error, you'll have to download the grpc_node tar and extract it to that location

Amjadnz (Fri, 05 May 2017 20:08:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Dw35iszN7TX9TG2k4) @akashmar - I've got to a point where it is showing the "Cannot Verify Signature" error.

Amjadnz (Fri, 05 May 2017 20:08:45 GMT):
Right now I have the same setup to take the folder structure between my peers and orderer and node-sdk. Unfortunately - all seems to be throwing the same error of "create" cannot be verified. Is there any process/documentation where I restart the whole process and issue my own certificates - for PEERS/ORGANISATIONS and start afresh. We have a naming issue too in the fabric-node-sdk with Org1 and Org2 and in the e2e-cli it is Org0 and Org1 Is it a valid observation - any hints can help me push forward and close the last part of my case study (the NODE-SDK)

greg.haskins (Sat, 06 May 2017 03:00:44 GMT):
@jimthematrix is there a place to set the general MSPID to use?

greg.haskins (Sat, 06 May 2017 03:01:20 GMT):
im currently getting rejected during eventhub.connect() because the SDK is sending MSPID=DEFAULT, and its not clear where this is controlled

jimthematrix (Sat, 06 May 2017 03:03:24 GMT):
hi Greg, the signing identify gets its mspid from the user, and the user acquires it from the setEnrollment() method

greg.haskins (Sat, 06 May 2017 03:03:54 GMT):
so, client::setEnrollment(ID) -> CA -> SDK -> EH ?

jimthematrix (Sat, 06 May 2017 03:05:56 GMT):
user.setEnrollment(mspId) -> client.setUserContext() -> new EventHub(client)

greg.haskins (Sat, 06 May 2017 03:06:29 GMT):
ah, bingo

greg.haskins (Sat, 06 May 2017 03:06:31 GMT):
now I see it, thx

jimthematrix (Sat, 06 May 2017 03:06:45 GMT):
yw ;-)

greg.haskins (Sat, 06 May 2017 03:20:30 GMT):
@jimthematrix what I am seeing now is that the peer is rejecting the eh.connect() because it thinks the request was signed by the wrong MSP

greg.haskins (Sat, 06 May 2017 03:20:51 GMT):
can you talk about how those signatures are generated w.r.t. SDK vs CA

jimthematrix (Sat, 06 May 2017 03:21:33 GMT):
so a common CA needs to be used b/w peer and SDK

greg.haskins (Sat, 06 May 2017 03:21:34 GMT):
meaning, if I enroll with a CA in the same MSP as the peer, does that enrollment mean I am generating signatures in that MSP or does the MSP have to also be configured locally at the SDK level

jimthematrix (Sat, 06 May 2017 03:24:18 GMT):
peer uses local MSP (part of bootstrap) that has `cacerts`, it must represents either the key pair used to start the fabric-ca (you don't have to use fabric-ca) so fabric-ca will be signing enrollment certs with it, or it must be higher in the cert chain of trust

greg.haskins (Sat, 06 May 2017 03:24:23 GMT):
hmm, the cert I am sending looks odd

greg.haskins (Sat, 06 May 2017 03:24:43 GMT):
i have a feeling i have fabric-ca misconfigured

jimthematrix (Sat, 06 May 2017 03:25:21 GMT):
the mspId needs to be the same b/w what the SDK's userContext is set to, and the peer's local MSP

greg.haskins (Sat, 06 May 2017 03:25:36 GMT):
yeah, that appears to be the case

jimthematrix (Sat, 06 May 2017 03:26:01 GMT):
basically check that the user's e-cert and the peer's cacerts have a common root

greg.haskins (Sat, 06 May 2017 03:26:13 GMT):

Message Attachments

greg.haskins (Sat, 06 May 2017 03:26:29 GMT):
So you can see the "Org1MSP" going up, which is correct (I believe)

greg.haskins (Sat, 06 May 2017 03:26:54 GMT):
however, when i decode that cert, it doesnt look like its the issuer I would expect

greg.haskins (Sat, 06 May 2017 03:27:04 GMT):
thereby making me suspect the CA gave me bad info

jimthematrix (Sat, 06 May 2017 03:27:29 GMT):
ok, is this fabric-ca you are using?

greg.haskins (Sat, 06 May 2017 03:27:34 GMT):
yeah

greg.haskins (Sat, 06 May 2017 03:27:45 GMT):
i suspect I didnt launch/configure it properly

greg.haskins (Sat, 06 May 2017 03:27:52 GMT):
it def has the trusted root for Org1MSP

greg.haskins (Sat, 06 May 2017 03:28:03 GMT):
but its not generating certs for it, for some reason

jimthematrix (Sat, 06 May 2017 03:28:11 GMT):
easiest is take the peerOrg's ca signcert and key to start the fabric-ca server

jimthematrix (Sat, 06 May 2017 03:28:28 GMT):
ca.certfile, ca.keyfile

greg.haskins (Sat, 06 May 2017 03:28:31 GMT):
this is all cryptogen+/examples/cluster

greg.haskins (Sat, 06 May 2017 03:28:38 GMT):
it should be auto-coordinating it

greg.haskins (Sat, 06 May 2017 03:28:42 GMT):
obviously something is amiss

greg.haskins (Sat, 06 May 2017 03:28:47 GMT):
i probably dont have the CA config right

jimthematrix (Sat, 06 May 2017 03:29:49 GMT):
what's the exact error you got from the peer when trying to connect?

greg.haskins (Sat, 06 May 2017 03:30:07 GMT):
Error: event message must be properly signed by an identity from the same organization as the peer: [failed verifying the creator satisfies local MSP's [member] principal: [Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority]]

greg.haskins (Sat, 06 May 2017 03:30:26 GMT):
which makes sense when I decode the cert that the SDK presented

greg.haskins (Sat, 06 May 2017 03:30:45 GMT):
```$ openssl x509 -in cert -text Certificate: Data: Version: 3 (0x2) Serial Number: 21:75:2c:dd:5d:92:ba:1a:3f:f6:3f:78:ea:10:b8:2e:b9:28:12:96 Signature Algorithm: ecdsa-with-SHA256 Issuer: C=US, ST=California, L=San Francisco, O=Internet Widgets, Inc., OU=WWW, CN=example.com Validity Not Before: May 6 03:10:00 2017 GMT Not After : Apr 4 11:10:00 2018 GMT Subject: CN=admin Subject Public Key Info: Public Key Algorithm: id-ecPublicKey EC Public Key: pub: 04:da:66:68:2f:52:f5:96:95:8c:ff:8a:8d:a7:26: 84:67:38:fc:00:90:5a:32:89:02:89:a6:ea:a1:b4: 3d:5e:5a:e9:88:4b:78:17:09:27:2c:82:24:d1:19: 22:d4:69:50:4a:8f:ed:95:93:39:e7:b7:60:21:82: e0:cc:18:69:b7 ASN1 OID: prime256v1 X509v3 extensions: X509v3 Key Usage: critical Certificate Sign X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: F0:1D:A8:B7:86:D5:E3:BF:2C:B0:1E:88:26:49:26:83:D9:ED:49:D2 X509v3 Authority Key Identifier: keyid:17:67:42:3D:AA:9E:82:3F:C4:C5:1D:9F:5B:C3:99:D1:B5:9C:48:10 Signature Algorithm: ecdsa-with-SHA256 30:44:02:20:6e:a9:92:10:68:7b:bc:48:54:1c:f6:0d:ed:09: 04:9e:33:fc:9f:99:e7:c4:23:6d:bf:90:6f:47:43:ff:14:1c: 02:20:66:f0:f8:7d:7d:7f:64:b6:18:54:15:80:15:55:88:ef: ba:68:1f:6b:ab:89:02:65:71:9e:86:93:3a:99:1e:e6```

greg.haskins (Sat, 06 May 2017 03:30:53 GMT):
the issuer is wrong: it should be org1.net

greg.haskins (Sat, 06 May 2017 03:31:12 GMT):
im guessing I am getting served some default baked into the CA rather than what I thought I loaded

greg.haskins (Sat, 06 May 2017 03:32:07 GMT):
ill pick this up later with Keith/Jonathan

greg.haskins (Sat, 06 May 2017 03:32:16 GMT):
i think I just need to vet my CA config

greg.haskins (Sat, 06 May 2017 03:32:19 GMT):
thanks for the help!

Amjadnz (Sat, 06 May 2017 04:59:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oMsENKdkmt7ydGQne) @greg.haskins @jimthematrix - this is the same error I'm facing with "Verify()" error. My user is registered with "org1" and the peer and sdk are using the same certs for ca.

Amjadnz (Sat, 06 May 2017 05:00:10 GMT):
How do we capture the ecert of user like "admin" so that I can cross verify who signed it?

Amjadnz (Sat, 06 May 2017 05:23:02 GMT):
```error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:8051". Error: The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "peerOrg0")```

Amjadnz (Sat, 06 May 2017 05:23:48 GMT):
In my fabric I have 4 peers - 0 and 1 connected to ORG0 and 2 and 3 connected to ORG1

Amjadnz (Sat, 06 May 2017 05:24:28 GMT):
The CA certs for the ORG0 in fabric == the CA Cert for the ORG1 in SDK

Amjadnz (Sat, 06 May 2017 05:24:48 GMT):
The CA Certs for the ORG1 in fabric == the CA Cert for ORG2 in SDK

Amjadnz (Sat, 06 May 2017 05:26:28 GMT):
I register the user with the following command

Amjadnz (Sat, 06 May 2017 05:26:36 GMT):
```curl -s -X POST \ http://localhost:4000/users \ -H "cache-control: no-cache" \ -H "content-type: application/x-www-form-urlencoded" \ -d 'username=Amjad04&orgName=peerOrg0'```

Amjadnz (Sat, 06 May 2017 05:26:45 GMT):
the same error

Amjadnz (Sat, 06 May 2017 05:26:58 GMT):
```curl -s -X POST \ http://localhost:4000/users \ -H "cache-control: no-cache" \ -H "content-type: application/x-www-form-urlencoded" \ -d 'username=Amjad01&orgName=org1'```

Amjadnz (Sat, 06 May 2017 05:27:02 GMT):
the same error

greg.haskins (Sat, 06 May 2017 12:29:56 GMT):
@Amjadnz in my case, I wiresharked the communication, grabbed the x509, and then ran it through "openssl x509"

Amjadnz (Sat, 06 May 2017 12:30:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MFPTw3nWbvybkGHMt) @greg.haskins - I'm regenerating the entire set of CERTS now for my PEERS and users.

Amjadnz (Sat, 06 May 2017 12:31:09 GMT):
suspect being the mismatch between org certs - would update if needed any help or if I succeed.

jimthematrix (Sat, 06 May 2017 21:35:32 GMT):
@greg.haskins @Amjadnz can you verify that the ecert sent by the SDK are issued by the current fabric-ca? can you correlate the SDK's `enroll()` call to the fabric-ca logs showing the /enroll call and the issued cert? note the fabric-ca needs to be started with the ca.key and ca.certfile set to the respective files under `peerOrganizations/org1.example.com/ca/`

jimthematrix (Sat, 06 May 2017 21:36:05 GMT):
you can use fabric-sdk-node/test/fixtures/docker-compose.yaml as reference

himansri (Sun, 07 May 2017 21:33:22 GMT):
Has joined the channel.

luckydogchina (Mon, 08 May 2017 02:50:54 GMT):
not ok 477 queryInstantiatedChaincodes - did not find match for e2e operator: fail ...

luckydogchina (Mon, 08 May 2017 02:51:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RzEbiDtLPZjs6N4st) @luckydogchina Somebody in the same problem?

bh4rtp (Tue, 09 May 2017 02:40:01 GMT):
the latest node sdk can not pass e2e test. ```error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: chaincode instantiation policy violated(Failed to authenticate policy) at /home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: chaincode instantiation policy violated(Failed to authenticate policy) at /home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [E2E testing]: instantiate proposal was bad error: [E2E testing]: instantiate proposal was bad not ok 31 Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:355:6) ... not ok 32 Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at hfc.newDefaultKeyValueStore.then.then.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:356:10) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:374:5) ... not ok 33 Failed to instantiate chaincode --- operator: fail at: e2eUtils.instantiateChaincode.then (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/instantiate-chaincode.js:40:6) ... ```

praveennagpal (Tue, 09 May 2017 03:25:38 GMT):
I have a problem in importing fabric-ca-client in my meteor package.I am getting the error relating to it being not able to find grpc module.

praveennagpal (Tue, 09 May 2017 03:25:39 GMT):
W20170509-08:52:04.854(5.5)? (STDERR) /Users/praveennagpal/.meteor/packages/meteor-tool/.1.4.3_2.1bvf0xf++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280 W20170509-08:52:04.855(5.5)? (STDERR) throw(ex); W20170509-08:52:04.855(5.5)? (STDERR) ^ W20170509-08:52:04.856(5.5)? (STDERR) W20170509-08:52:04.856(5.5)? (STDERR) Error: Cannot find module 'grpc' W20170509-08:52:04.857(5.5)? (STDERR) at Function.Module._resolveFilename (module.js:325:15) W20170509-08:52:04.857(5.5)? (STDERR) at Function.Module._load (module.js:276:25) W20170509-08:52:04.857(5.5)? (STDERR) at Module.require (module.js:353:17) W20170509-08:52:04.858(5.5)? (STDERR) at require (internal/module.js:12:17) W20170509-08:52:04.858(5.5)? (STDERR) at Object. (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-ca-client/lib/Remote.js:19:12) W20170509-08:52:04.858(5.5)? (STDERR) at Module._compile (module.js:409:26) W20170509-08:52:04.859(5.5)? (STDERR) at Object.Module._extensions..js (module.js:416:10) W20170509-08:52:04.859(5.5)? (STDERR) at Module.load (module.js:343:32) W20170509-08:52:04.860(5.5)? (STDERR) at Function.Module._load (module.js:300:12) W20170509-08:52:04.860(5.5)? (STDERR) at Module.require (module.js:353:17) W20170509-08:52:04.861(5.5)? (STDERR) at require (internal/module.js:12:17) => Exited with code: 1

praveennagpal (Tue, 09 May 2017 03:30:45 GMT):
grpc is mentioned in Remote.js but it appears that its dependency is not mentioned in package.json

praveennagpal (Tue, 09 May 2017 03:30:45 GMT):
i installed npm install grpc separately to get this working. Is that required? Ideally should be defined as dependency in fabric-ca-client.

praveennagpal (Tue, 09 May 2017 03:30:45 GMT):
I did a npm install grpc separately to get this working. Is that required? Ideally should be defined as dependency in fabric-ca-client.

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

mutexing (Tue, 09 May 2017 04:36:26 GMT):
Has joined the channel.

luckydogchina (Tue, 09 May 2017 07:07:24 GMT):
newLedgerResources -> CRIT 06b Error creating configtx manager and handlers: Error deserializing key ChainCreationPolicyNames for group /Channel/Orderer: Unexpected key ChainCreationPolicyNames

luckydogchina (Tue, 09 May 2017 07:08:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mNK887A3ErwptHwB6) @luckydogchina when I run the docker-compose up, the orderer0 exit 1 and throws the error.

JasonD (Tue, 09 May 2017 09:14:05 GMT):
just write a simple chaincode demo, 4 peers, solo. My question is: it seems very slow when we invoke chaincode function ? maybe 0.4s, so is there any way I can do to make it faster ?

SotirisAlfonsos (Tue, 09 May 2017 12:46:58 GMT):
Hello everyone. Is there a way to create different channels with the balance-transfer example?

highway (Tue, 09 May 2017 14:13:05 GMT):
Has joined the channel.

highway (Tue, 09 May 2017 14:14:16 GMT):
@luckydogchina I have the same error at the orderer - did you find a solution?

highway (Tue, 09 May 2017 14:19:08 GMT):
and when I try to enroll the admin user I get `http: TLS handshake error from 172.23.0.1:57672: tls: oversized record received with length 21536` on the ca server

Vadim (Tue, 09 May 2017 14:20:56 GMT):
@highway are you using HTTP url to connect to the HTTPS-enabled fabric-ca?

highway (Tue, 09 May 2017 14:23:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RnnP39urQH25ria3J) @Vadim yes! thanks ;)

myqq0000 (Tue, 09 May 2017 15:09:53 GMT):
Has joined the channel.

myqq0000 (Tue, 09 May 2017 15:09:59 GMT):
😬Hi there. I'm trying to use node SDK. I read some documents about Hyperledger Fabric SDK. But they seem a little difficult for me. Is there any demos or tutorials that I can read to understand about how to use Fabric node SDK? Thanks a lot.

akash42145 (Tue, 09 May 2017 15:19:27 GMT):
Has joined the channel.

akash42145 (Tue, 09 May 2017 15:28:53 GMT):
Hello Everyone, I am running NODE-SDK https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer example.And Monitoring the CA Container logs. Observed Logs is updating only user registration and user enrollment, But Some where in hayledger fabric document I have read about tCert (Transaction certificate). There is no CA log update regarding tCert on chain code invocation. Could you please help me to know when the tcert is getting generated.

theofilis (Tue, 09 May 2017 20:37:08 GMT):
Has joined the channel.

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

indira.kalagara (Wed, 10 May 2017 05:58:08 GMT):
Has joined the channel.

albert.lacambra (Wed, 10 May 2017 07:57:33 GMT):
Has joined the channel.

akash42145 (Wed, 10 May 2017 08:48:59 GMT):
Hi All , Could you please help me know how endorsement is happening in Node-Sdk example "https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer" .

nharshita (Wed, 10 May 2017 13:08:05 GMT):
swagger

tomconte (Wed, 10 May 2017 15:58:16 GMT):
Has joined the channel.

greg.haskins (Wed, 10 May 2017 18:22:56 GMT):
@akash42145 endorsement would be visible to the client here: https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/app/invoke-transaction.js#L98

greg.haskins (Wed, 10 May 2017 18:23:27 GMT):
peer::invoke() -> proposalResponse -> orderer

greg.haskins (Wed, 10 May 2017 18:23:37 GMT):
the proposalResponse is what contains the endorsements

greg.haskins (Wed, 10 May 2017 18:24:11 GMT):
@jimthematrix do you have any guidance on that thing we talked about the other day w.r.t. createUser(keys)

jimthematrix (Wed, 10 May 2017 18:50:44 GMT):
@akash42145 also for your question on tcert, v1.0 fabric doesn't support tcert. it'll likely be shortly after 1.0

jimthematrix (Wed, 10 May 2017 18:51:04 GMT):
@greg.haskins can you remind me what that thing is?

greg.haskins (Wed, 10 May 2017 19:03:56 GMT):
@jimthematrix I would like to use my own cert/key rather than enrolling via fabric-ca-client

greg.haskins (Wed, 10 May 2017 19:04:20 GMT):
you had mentioned there was a way to do it but I wasnt clear on the details

greg.haskins (Wed, 10 May 2017 19:04:45 GMT):
(well, to be clear, it will be a cert/key that cryptogen is providing, not myself literally

jimthematrix (Wed, 10 May 2017 19:14:09 GMT):
@greg.haskins ah ok, that thing, see here for code snippet: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/unit/util.js#L141

jimthematrix (Wed, 10 May 2017 19:15:04 GMT):
this gets used the various steps in node SDK e2e like install-chaincode, instantiate chaincode that requires peer org admins

jimthematrix (Wed, 10 May 2017 19:15:41 GMT):
you can do the same with regular users that have been pre-provisioned (pre-generated key/cert)

greg.haskins (Wed, 10 May 2017 19:16:21 GMT):
exactly what I was looking for.. thanks @jimthematrix

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

William.Z (Thu, 11 May 2017 02:10:14 GMT):
Dear All, I have a question I would appreciate if you could help out with. How to make sense of block information which get from Chain.js?

William.Z (Thu, 11 May 2017 02:11:18 GMT):

Message Attachments

William.Z (Thu, 11 May 2017 02:12:20 GMT):
In the picture, How to make sense of buffer data of block information ?

William.Z (Thu, 11 May 2017 02:13:52 GMT):
appreciate your :regional_indicator_h::regional_indicator_e::regional_indicator_l::regional_indicator_p:

greg.haskins (Thu, 11 May 2017 03:01:59 GMT):
@jimthematrix working on a mod to examples/cluster which generates build/client.config like this

greg.haskins (Thu, 11 May 2017 03:02:06 GMT):
```ghaskins@hyperledger:~/sandbox/hyperledger/go/src/github.com/hyperledger/fabric/examples/cluster$ cat build/client.config ca: url: https://172.18.0.2:7054 certificate: | -----BEGIN CERTIFICATE----- MIICLjCCAdSgAwIBAgIRAM7sx/ivFZeosR/IrhPS544wCgYIKoZIzj0EAwIwYzEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG cmFuY2lzY28xETAPBgNVBAoTCG9yZzEubmV0MRQwEgYDVQQDEwtjYS5vcmcxLm5l dDAeFw0xNzA1MTEwMjUyMTBaFw0yNzA1MDkwMjUyMTBaMGMxCzAJBgNVBAYTAlVT MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMREw DwYDVQQKEwhvcmcxLm5ldDEUMBIGA1UEAxMLY2Eub3JnMS5uZXQwWTATBgcqhkjO PQIBBggqhkjOPQMBBwNCAAQBN1RTzXnnv2ly2N0R4dznc5OeshqefA3K2DA42lmZ kvyw2Jot81dDau35JtDl3MmA8H1bhVcX5+0Wvmr8UuUdo2kwZzAOBgNVHQ8BAf8E BAMCAaYwGQYDVR0lBBIwEAYEVR0lAAYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB /zApBgNVHQ4EIgQg9/gE26m73RSDiaVuaPa6yeDEp+6BMaVKS3Xi6bE+JaIwCgYI KoZIzj0EAwIDSAAwRQIhAN1uYqkgEW9XYO+whBJ+xZ7t5YDYCMCfePkozEuIJgdX AiBJFq5mwesKDBZr8eN6qZFwdN2VznuX1ORncmox1CNnNQ== -----END CERTIFICATE----- orderer: grpcs://172.18.0.3:7050 peers: - grpcs://172.18.0.4:7051 - grpcs://172.18.0.5:7051 - grpcs://172.18.0.6:7051 - grpcs://172.18.0.7:7051 identity: mspid: Org1MSP privatekey: | -----BEGIN PRIVATE KEY----- MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgIT9mKDY0i0bxVlMV Ra6Kmuurd0nEkMC6Jye0jb7czj2hRANCAARu15IhnrwNCkBbcBdSlYOQovQu2Cih OFSMNl66nO+YpD2aoOSWnudz4XCDV2o+CHTbS5dy+zEWNKn087hpBA0H -----END PRIVATE KEY----- certificate: | -----BEGIN CERTIFICATE----- MIICFjCCAb2gAwIBAgIRAJTYUw0Z1IFhXcTnXH3sMoAwCgYIKoZIzj0EAwIwYzEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG cmFuY2lzY28xETAPBgNVBAoTCG9yZzEubmV0MRQwEgYDVQQDEwtjYS5vcmcxLm5l dDAeFw0xNzA1MTEwMjUyMTBaFw0yNzA1MDkwMjUyMTBaMFMxCzAJBgNVBAYTAlVT MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRcw FQYDVQQDDA5BZG1pbkBvcmcxLm5ldDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA BG7XkiGevA0KQFtwF1KVg5Ci9C7YKKE4VIw2Xrqc75ikPZqg5Jae53PhcINXaj4I dNtLl3L7MRY0qfTzuGkEDQejYjBgMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAK BggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIPf4BNupu90Ug4ml bmj2usngxKfugTGlSkt14umxPiWiMAoGCCqGSM49BAMCA0cAMEQCIGufnHyKzo2I SqibC49xHQJhyB7axVozLmhTKmCZlK1PAiA7ZirR0Ls/SO+sTY5sTTPhcHVjxwMD LqdoRFJm4b093w== -----END CERTIFICATE-----```

greg.haskins (Thu, 11 May 2017 03:02:38 GMT):
im not quite sure how generally usable it will be, still need to experiment

greg.haskins (Thu, 11 May 2017 03:03:18 GMT):
but if it ends up being a helpful configuration format, we can work to try to get the SDK to work with it directly

greg.haskins (Thu, 11 May 2017 03:03:45 GMT):
(one thing that will need work is the orderer section...)

greg.haskins (Thu, 11 May 2017 03:04:29 GMT):
im actually hoping that eventually we can get to the point that the SDK only needs to connect to one peer within its MSP and the rest (including other peers/orgs/channels/orderers) are discovered dynamically

greg.haskins (Thu, 11 May 2017 03:04:35 GMT):
so I structured it with that in mind

greg.haskins (Thu, 11 May 2017 03:05:05 GMT):
(and yes, I understand I just posted a privatekey on the internet...its just an ephemeral cryptogen key

greg.haskins (Thu, 11 May 2017 03:05:47 GMT):
anyway, I chose YAML over JSON for the ease in including the PEM inline

jimthematrix (Thu, 11 May 2017 03:44:23 GMT):
@greg.haskins good idea, i like yaml also for its documentability. care to open a jira story so this can be slated to a future revision?

akash42145 (Thu, 11 May 2017 04:51:26 GMT):
@greg.haskins peer::invoke() -> proposalResponse -> orderer the proposalResponse is what contains the endorsements @jimthematrix also for your question on tcert, v1.0 fabric doesn't support tcert. it'll likely be shortly after 1.0 Thanks for your reply I have couple of questions: 1)In invoke-transaction.js invokeChaincode() method , peers are getting added in chains through "helper.setupPeers(chain, peers, targets)" . are those added peers are endorser peer. If I am adding only one peer then proposalResponse is containing only one endorsement and if two peers are added in chains then proposalResponse is containing two endorsements. So My question each invocation of invoke chaincode I can decide the endorser through adding peers in the chain using "helper.setupPeers(chain, peers, targets)". Is it correct. And is there any configuration is where I can define our endorsement policies or I need to add endorser through "helper.setupPeers(chain, peers, targets)" in chaincode invocation. 2) Invoke-transaction.js of fabric-sdk-node example in "https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/" and "https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer/app" are slightly different , earlier one is using chain.compareProposalResponseResults ,chain.verifyProposalResponse but in later one these methods are removes from node-modules\fabric-client\lib\chain.js . Kindly suggest which example I will take as base example because I have to build one POC project for my client

albert.lacambra (Thu, 11 May 2017 04:56:07 GMT):
hi

albert.lacambra (Thu, 11 May 2017 04:56:25 GMT):
I am running the ./testAPIs.sh script

albert.lacambra (Thu, 11 May 2017 04:56:57 GMT):
I am receiving the following message on the orderer

albert.lacambra (Thu, 11 May 2017 04:56:58 GMT):
2017-05-11 04:55:14.432 UTC [orderer/common/broadcast] Handle -> WARN 532 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Policy] /Channel/Application/Org1MSP/Admins to version 0, but key is at version 0

albert.lacambra (Thu, 11 May 2017 04:57:10 GMT):
does some know what it means

albert.lacambra (Thu, 11 May 2017 04:57:14 GMT):
how to fix it?

albert.lacambra (Thu, 11 May 2017 04:57:21 GMT):
Thanks gents

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

MadhavAchar (Thu, 11 May 2017 11:18:02 GMT):
Has joined the channel.

Gerard9494 (Thu, 11 May 2017 13:22:42 GMT):
Has joined the channel.

terrypst (Thu, 11 May 2017 13:25:43 GMT):
Has joined the channel.

terrypst (Thu, 11 May 2017 13:29:18 GMT):
Hi guys ! I'm trying to make chaincode query on my Hyperledger blockchain v1 deployed on bluemix. The problem is http protocole is no longer available on v1 so i can't make POST and GET request on a specific peer. I know i have to use the SDK but it's really hard to find documentation, is there anyone who knows how to do it ? Many thanks in advance !

chunhui (Fri, 12 May 2017 01:13:37 GMT):
Dear all, i'm using `8da372ea7d2b9d49d51f5a28aa9982470fed5fe3` commit of the sdk-node, but i'm getting a `404 Page not found` during the `enroll` operation, when i run the `e2e` test. Any idea why this is happening?? my fabric is `1acb65f2465b7fb504cfd2c8f297dee372c707c5` my fabric-ca is `v1.0.0-alpha`

chunhui (Fri, 12 May 2017 01:14:02 GMT):

Message Attachments

rmohta (Fri, 12 May 2017 04:58:32 GMT):
@here How do we make sure the certificate used by the client (using SDK) is talking to the right org-peer node? And is there a way to track transactions performed by a given client?

FengChen_1982 (Fri, 12 May 2017 08:53:32 GMT):
Has joined the channel.

FengChen_1982 (Fri, 12 May 2017 09:16:46 GMT):
Hello, everyone, after I've setup a sample(e2e) blockchain network, I want to use Node SDK to access the ChainCode(invoke&query)? Do I need to setup a CA server in the network first?

NiketYende (Fri, 12 May 2017 11:19:40 GMT):
@bretharrison I encountered an issue while running create-channel.js. I am using a config which comes from the configtx tool.

NiketYende (Fri, 12 May 2017 11:19:42 GMT):
Here are the steps which were followed: 1. Build configtxgen binary using "make configtxgen". 2. Use the binary to generate "channel.tx". 3. Copy "channel.tx" under fixtures/channel. 4. Uncomment the below piece of code: // use this when the config comes from the configtx tool data = fs.readFileSync(path.join(__dirname, '../../fixtures/channel/channel.tx')); var envelope = _commonProto.Envelope.decode(data); var payload = _commonProto.Payload.decode(envelope.getPayload().toBuffer()); var configtx = _configtxProto.ConfigUpdateEnvelope.decode(payload.getData().toBuffer()); config = configtx.getConfigUpdate().toBuffer(); logger.debug('\n***\n dump the configtx config \n***\n'); var chain = client.newChain('test'); chain.loadConfigUpdate(config); 5. Run the create-channel.js.

NiketYende (Fri, 12 May 2017 11:21:19 GMT):

Message Attachments

NiketYende (Fri, 12 May 2017 11:22:44 GMT):
Please help me in this regard. Let me know if there are any additional steps to be followed to get config from the one generated by configtx tool. @bretharrison

NiketYende (Fri, 12 May 2017 11:25:25 GMT):

Message Attachments

bretharrison (Fri, 12 May 2017 14:07:04 GMT):
@NiketYende Was your channel.tx generated from the same yaml as the boot up system channel genesis block that your Orderer was started with. BAD_REQUEST would indicate that there is a miss match in consortium name, version numbers, MSP ids, organization names, or something else between the two configs.

rliu (Fri, 12 May 2017 14:29:53 GMT):
@bretharrison @jimthematrix @NiketYende You are right. We should use configtx.yamL at fabric-sdk-node/test/fixtures/channel. Here are what I did : 1. Modify configtx.yaml at fabric-sdk-node/test/fixtures/channel to set BatchTimeout to 1200s. Copy this file to fabric/sampleconfig. 2. Use configtxgen tool to generate "channel.tx". 3. Copy "channel.tx" to fabric-sdk-node/test/fixtures/channel. 4. Uncomment the code in fabric-sdk-node/test/integration/e2e/create-channel.js to load channel.tx, i.e. : // use this when the config comes from the configtx tool data = fs.readFileSync(path.join(__dirname, '../../fixtures/channel/channel.tx')); .... I'm able to create a new channel. However, after I created two transactions using this new channel within 1 minute, I got 3 blocks. Each block still contains only one transaction. Here are the parameters I changed at configtx.yaml: BatchTimeout:1200s BatchSize: MaxMessageCount: 100 AbsoluteMaxBytes: 99 MB PreferredMaxBytes: 10 MB We'd like to test how to put multiple transactions to a block. Could you advice how to make this happen? Thanks!

bretharrison (Fri, 12 May 2017 14:36:52 GMT):
@rliu maybe post this question to fabric-peer-endorser-committer

rliu (Fri, 12 May 2017 14:38:42 GMT):
@bretharrison Thanks. I'll post it

jimthematrix (Fri, 12 May 2017 14:42:21 GMT):
@here we can use some help investigating a problem I'm seeing: I just noticed that the node SDK test coverage mysteriously went down, like in some cases from above 80% to now ~50%. when I checked, it seems a lot of code that clearly have been called during the tests are marked as not covered. to see this, run `gulp test` and open `fabric-sdk-node/coverage/lcov-report/fabric-client/lib/Chain.js.html`

l1nux (Fri, 12 May 2017 16:15:51 GMT):
Very confuse which channel to post this question, let me try this channel to see if I have better luck, here's my question : Referring to the the KeyValuStore interface to store application persistence data defined in the fabric sdk , the question is how many such store one can have for a chain? Or for a channel?

jimthematrix (Fri, 12 May 2017 16:34:34 GMT):
@l1nux short answer is as many as is needed by the application. but as far as what the SDK needs, typically two: one for persisting the user objects (enrollment cert, reference to the corresponding private key, mspid, etc.), and another for the crypto key store (specifically for saving private keys).

jimthematrix (Fri, 12 May 2017 16:38:02 GMT):
note that the above answer applies to node SDK that has this persistence support built-in. java SDK took a slightly different approach by making the User an interface which must be implemented by the application, and through the app's implementation the app does whatever is needed w.r.t persistence. in other words, java SDK doesn't specifically require a persistence store.

jimthematrix (Fri, 12 May 2017 16:38:02 GMT):
note that the above answer applies to node SDK that has this persistence support built-in. java SDK took a slightly different approach by making the User an interface (which encapsulates the crypto materials through the Enrollment interface) which must be implemented by the application, and through the app's implementation the app does whatever is needed w.r.t persistence. in other words, java SDK doesn't specifically require a persistence store.

l1nux (Fri, 12 May 2017 16:45:07 GMT):
@jimthematrix let me be very specify, say I create a persistence key/value store, say name store1 for a chain named mychain, this is my pseudocode : client = require('fabric-client');

l1nux (Fri, 12 May 2017 16:50:11 GMT):
.. continues : client.newChain('mychain'); //associate to a chain client.setStateStore(store1); //set the store ... do some read/write on store1 now if I want to write to different store say, store2, then do I simply use the setter to change to different store like : client.setStateStore(store2) ?? would this garantee 'mychain' has this two key/value stores? Do I really able to switch stores of a chain by using the 'setter'?

jimthematrix (Fri, 12 May 2017 17:10:32 GMT):
ah ok, no each chain instance only manages one state store

jimthematrix (Fri, 12 May 2017 17:11:09 GMT):
so each time you call that setter, you are replacing the existing one. so all the getUserContext() calls will now look inside store2

l1nux (Fri, 12 May 2017 17:12:16 GMT):
ok... so I can keep switching to different store ?

jimthematrix (Fri, 12 May 2017 17:12:29 GMT):
yes

jimthematrix (Fri, 12 May 2017 17:13:19 GMT):
this is how the end to end test does it because the same test are personating users from two different orgs

jimthematrix (Fri, 12 May 2017 17:13:19 GMT):
this is how the end to end test does it because the same test are impersonating users from two different orgs

jimthematrix (Fri, 12 May 2017 17:13:39 GMT):
each uses their own state store, but sharing the same client instance

l1nux (Fri, 12 May 2017 17:20:56 GMT):
ok.. now instead of using the setter to change from one store to another of this chain (mychain) can I create second client instance and do something like this : client2 = require('fabric-client'); client2.newChain('mychain'); client2.setStateStore(store2); does it make sense? when client2 call newChain, does this client is 'linking' to client1's same 'mychain

l1nux (Fri, 12 May 2017 17:21:58 GMT):
... continue... I meant when client2 call "newChain", does client2 is 'linking' to client1's same 'mychain' chain?

bkvellanki (Fri, 12 May 2017 17:24:49 GMT):
guys..is there an issue with e2e node sdk exec..I got the latest version on mac and trying to execute the e2e.js but ran in to couple of errors..

bkvellanki (Fri, 12 May 2017 17:24:49 GMT):
@here guys..is there an issue with e2e node sdk exec..I got the latest version on mac and trying to execute the e2e.js but ran in to couple of errors..

bkvellanki (Fri, 12 May 2017 17:24:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GkXHWnwwTaaHpMTzT) @bkvellanki looks like your fabric-ca is not available (404 page not found).

bkvellanki (Fri, 12 May 2017 17:24:51 GMT):
*** End-to-end flow: invoke transaction to move money ***** # getMember, name: admin, client.getUserContext(admin, true) info: [Client.js]: Failed to load user "admin" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"caname":"ca-org2","protocol":"https","hostname":"localhost","port":8054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"https","hostname":"localhost","port":8054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/hfc-test-kvs_peerOrg2"}} E0512 12:13:22.740773000 140736160572352 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0512 12:13:22.741045000 140736160572352 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0512 12:13:22.741073000 140736160572352 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0512 12:13:22.741078000 140736160572352 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0512 12:13:22.741721000 140736160572352 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0512 12:13:22.741734000 140736160572352 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0512 12:13:22.741752000 140736160572352 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0512 12:13:22.741756000 140736160572352 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0512 12:13:22.741771000 140736160572352 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0512 12:13:22.741775000 140736160572352 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR not ok 35 Error: Could not parse enrollment response [404 page not found ] as JSON due to error [SyntaxError: Unexpected token p in JSON at position 4] at IncomingMessage. (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:719:14) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) --- operator: fail at: cop.enroll.then.then.then.catch (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/unit/util.js:134:7) ... #

bkvellanki (Fri, 12 May 2017 17:25:03 GMT):
fo: [E2E testing]: create new peer grpcs://localhost:8051 info: [E2E testing]: create new eventhub grpcs://localhost:7053 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Transaction returned with failure: {"Error":"Did not find expected key "test" in the transient map of the proposal} at /Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Transaction returned with failure: {"Error":"Did not find expected key "test" in the transient map of the proposal} at /Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17

bkvellanki (Fri, 12 May 2017 17:25:43 GMT):
Did i miss any step..The v1 alpha works fine for me..Any suggestions..

SotirisAlfonsos (Fri, 12 May 2017 17:56:53 GMT):
Hello. I am using fabric-node-sdk and i have deployed a chaincode in a channel where two parties are performing transactions. Is it possible to identify within the chaincode what actor is performing each specific invocation, and restrict his access to certain values?

saism (Fri, 12 May 2017 20:08:12 GMT):
@bkvellanki try to check this._baseAPI variable at github.com/hyperledger/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js

saism (Fri, 12 May 2017 20:11:22 GMT):
should point to '/api/v1/', so either CA server is outdated or your lib

bkvellanki (Fri, 12 May 2017 21:17:28 GMT):
@saism thanks..I will check

Amjadnz (Sat, 13 May 2017 00:14:10 GMT):
@jimthematrix - can you help with this one?

Amjadnz (Sat, 13 May 2017 00:14:15 GMT):
```[2017-05-09 19:13:44.584] [DEBUG] SampleWebApp - ==================== QUERY ON CHAINCODE ================== [2017-05-09 19:13:44.584] [DEBUG] SampleWebApp - channelName : aj001 [2017-05-09 19:13:44.584] [DEBUG] SampleWebApp - chaincodeName : sc_userole [2017-05-09 19:13:44.585] [DEBUG] SampleWebApp - peer : peer2 [2017-05-09 19:13:44.585] [DEBUG] SampleWebApp - args : ["readItem","role-1","user-1"] [2017-05-09 19:13:44.586] [DEBUG] SampleWebApp - chaincodeVersion : v1 [2017-05-09 19:13:44.586] [DEBUG] SampleWebApp - [ 'readItem', 'role-1', 'user-1' ] [2017-05-09 19:13:44.591] [DEBUG] SampleWebApp - User name : User1 [2017-05-09 19:13:44.591] [DEBUG] SampleWebApp - Org name : org2 info: [Peer.js]: Peer.const - url: grpcs://localhost:9051 options grpc.ssl_target_name_override=peer0.org2.ttsme.com, grpc.default_authority=peer0.org2.ttsme.com info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"https","hostname":"localhost","port":8054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"https","hostname":"localhost","port":8054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "User1" from local key value store [2017-05-09 19:13:44.617] [INFO] Helper - Successfully loaded member from persistence error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:9051". Error: Received unknown function invocation at /home/tts/src/github.com/hyperledger/fabric-sdk-node/examples/sc/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Received unknown function invocation at /home/tts/src/github.com/hyperledger/fabric-sdk-node/examples/sc/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 [2017-05-09 19:13:44.817] [INFO] Query - User b now has Error: Received unknown function invocation after the move```

Amjadnz (Sat, 13 May 2017 00:14:43 GMT):
When I run the same query via the command line (CLI)

Amjadnz (Sat, 13 May 2017 00:15:33 GMT):
```CORE_PEER_ADDRESS=peer0.org2.ttsme.com:7051 CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.ttsme.com/peers/peer0.org2.ttsme.com CORE_PEER_LOCALMSPID="Org2MSP" CORE_PEER_TLS_ENABLED=true CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.ttsme.com/peers/peer0.org2.ttsme.com/signcerts/peer0.org2.ttsme.com-cert.pem CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.ttsme.com/peers/peer0.org2.ttsme.com/cacerts/org2.ttsme.com-cert.pem```

Amjadnz (Sat, 13 May 2017 00:15:33 GMT):
```CORE_PEER_ADDRESS=peer0.org2.ttsme.com:7051 CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.ttsme.com/peers/peer0.org2.ttsme.com CORE_PEER_LOCALMSPID="Org2MSP" CORE_PEER_TLS_ENABLED=true CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.ttsme.com/peers/peer0.org2.ttsme.com/signcerts/peer0.org2.ttsme.com-cert.pem CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.ttsme.com/peers/peer0.org2.ttsme.com/cacerts/org2.ttsme.com-cert.pem```

Amjadnz (Sat, 13 May 2017 00:15:51 GMT):
the command

Amjadnz (Sat, 13 May 2017 00:15:56 GMT):
```peer chaincode invoke -o orderer.ttsme.com:7050 -C aj001 -n sc_userole -c '{"Args":["initItem","a-1","role-1","user-1","tr-1","1"]}' --tls true --cafile ./crypto/ordererOrganizations/ttsme.com/ca/ttsme.com-cert.pem ```

Amjadnz (Sat, 13 May 2017 00:15:56 GMT):
```peer chaincode query -C aj001 -n sc_userole -c '{"Args":["readItem","role-1","user-1"]}' --tls true --cafile ./crypto/ordererOrganizations/ttsme.com/ca/ttsme.com-cert.pem ```

Amjadnz (Sat, 13 May 2017 00:16:55 GMT):
And the output as follows:

Amjadnz (Sat, 13 May 2017 00:17:34 GMT):
```2017-05-09 15:19:19.753 UTC [logging] InitFromViper -> DEBU 001 Setting default logging level to DEBUG for command 'chaincode' 2017-05-09 15:19:19.756 UTC [msp] GetLocalMSP -> DEBU 002 Returning existing local MSP 2017-05-09 15:19:19.756 UTC [msp] GetDefaultSigningIdentity -> DEBU 003 Obtaining default signing identity 2017-05-09 15:19:19.757 UTC [msp] Sign -> DEBU 004 Sign: plaintext: 0A95070A5B08032205616A3030312A40...0A06726F6C652D310A06757365722D31 2017-05-09 15:19:19.757 UTC [msp] Sign -> DEBU 005 Sign: digest: 0ECB1CA0A538385C437A5A1FFAEF274271163E94DB74E74F34B72C849BC33AEC Query Result: [{"Key":"a-1", "Record":{"roleId":"role-1","status":"1","userId":"user-1"}}] 2017-05-09 15:19:19.944 UTC [main] main -> INFO 006 Exiting..... ```

Amjadnz (Sat, 13 May 2017 00:33:07 GMT):
I tried with "config.json" by chaining the FunctionName to "invoke" and "query" but no result

Amjadnz (Sat, 13 May 2017 00:33:16 GMT):
but same result I mean :-)

Amjadnz (Sat, 13 May 2017 00:33:36 GMT):
`[2017-05-09 19:13:44.617] [INFO] Helper - Successfully loaded member from persistence error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:9051". Error: Received unknown function invocation`

Amjadnz (Sat, 13 May 2017 00:33:36 GMT):
```[2017-05-09 19:13:44.617] [INFO] Helper - Successfully loaded member from persistence error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:9051". Error: Received unknown function invocation```

Amjadnz (Sat, 13 May 2017 00:42:02 GMT):
But my method "readItem" is accessible over the CLI command set.

Amjadnz (Sat, 13 May 2017 00:42:42 GMT):
I'm using the samples from NODESDK folder. User registration and getting the token all turn out to to be fine.

Amjadnz (Sat, 13 May 2017 00:43:08 GMT):
Command for HTTP Get for NODE SDK is

Amjadnz (Sat, 13 May 2017 00:43:12 GMT):
```curl -s -X GET \ "http://localhost:4000/channels/aj001/chaincodes/sc_userole?peer=peer2&args=%5B%27readItem%27%2C%27role-1%27%2C%27user-1%27%5D&chaincodeVersion=v1" \ -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQzNDc2OTEsInVzZXJuYW1lIjoiVXNlcjEiLCJvcmdOYW1lIjoib3JnMiIsImlhdCI6MTQ5NDM0NDA5MX0.5yWGXV5UUru7zdEqLjJToPGPLP9uqOWQ7GhS2-b9e0Y" \ -H "cache-control: no-cache" \ -H "content-type: application/json" \ -H "x-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQzNDc2OTEsInVzZXJuYW1lIjoiVXNlcjEiLCJvcmdOYW1lIjoib3JnMiIsImlhdCI6MTQ5NDM0NDA5MX0.5yWGXV5UUru7zdEqLjJToPGPLP9uqOWQ7GhS2-b9e0Y"```

jimthematrix (Sat, 13 May 2017 02:40:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xnqFmzKSGtt52Q8uE) @l1nux I don't see any problems doing what your do above. except I'm not sure what necessitates using two separate state stores in your case? typically a client application is dedicated to a participating organization (each company will develop their own application to interact with the channels). you could certainly have a multi-tenant application serving more than one organization, for which you could use stores to isolate user persistence data. Just wondering what's the use case in your scenario.

jimthematrix (Sat, 13 May 2017 02:45:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fxKasRbrkEw2SZiRo) @bkvellanki as part of https://gerrit.hyperledger.org/r/#/c/9219/ for transient map support in proposals, there are negative tests that expect to receive errors like the above. as long as no failed tests then things are working as expected

jimthematrix (Sat, 13 May 2017 02:50:22 GMT):
@SotirisAlfonsos `stub.GetCreator()` returns a protobuf object https://github.com/hyperledger/fabric/blob/master/protos/msp/identities.proto#L27

jimthematrix (Sat, 13 May 2017 02:51:02 GMT):
that represents the submitter of the invocation

jimthematrix (Sat, 13 May 2017 03:00:04 GMT):
the MSPId tells you the submitter's organization, and IdBytes is the certificate that tells you the specific identity

jimthematrix (Sat, 13 May 2017 03:05:55 GMT):
@Amjadnz what do you set in the transaction proposal's `request.fcn` property? the proper value is `invoke` or (recommended) this property should be omitted from the request object altogether

jimthematrix (Sat, 13 May 2017 03:09:02 GMT):
never mind, i see you are using the sample web app REST API...

jimthematrix (Sat, 13 May 2017 03:11:29 GMT):
actually i think this is a bug in the sample app: try going to the config.json and changing the key name `invokeQueryFcnName` to `functionName`

jimthematrix (Sat, 13 May 2017 03:11:57 GMT):
that should fix it. please open a JIRA against component `fabric-sdk-node`

Amjadnz (Sat, 13 May 2017 06:32:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mHcWELspK9bn5wME3) @jimthematrix - Thanks would do so

Amjadnz (Sat, 13 May 2017 06:50:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mHcWELspK9bn5wME3) @jimthematrix - Changed it but issue is not resolved

Amjadnz (Sat, 13 May 2017 06:51:54 GMT):
Still getting the same function not found

Amjadnz (Sat, 13 May 2017 06:55:14 GMT):
```[2017-05-09 20:32:43.993] [DEBUG] SampleWebApp - ==================== QUERY ON CHAINCODE ================== [2017-05-09 20:32:43.994] [DEBUG] SampleWebApp - channelName : aj001 [2017-05-09 20:32:43.994] [DEBUG] SampleWebApp - chaincodeName : sc_userole [2017-05-09 20:32:43.995] [DEBUG] SampleWebApp - peer : peer2 [2017-05-09 20:32:43.995] [DEBUG] SampleWebApp - args : ['readItem','role-1','user-1'] [2017-05-09 20:32:43.995] [DEBUG] SampleWebApp - chaincodeVersion : v1 [2017-05-09 20:32:43.996] [DEBUG] SampleWebApp - [ 'readItem', 'role-1', 'user-1' ] [2017-05-09 20:32:43.999] [DEBUG] SampleWebApp - User name : User2 [2017-05-09 20:32:44.000] [DEBUG] SampleWebApp - Org name : org2 info: [Peer.js]: Peer.const - url: grpcs://localhost:9051 options grpc.ssl_target_name_override=peer0.org2.ttsme.com, grpc.default_authority=peer0.org2.ttsme.com info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"https","hostname":"localhost","port":8054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"https","hostname":"localhost","port":8054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "User2" from local key value store [2017-05-09 20:32:44.028] [INFO] Helper - Successfully loaded member from persistence error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:9051". Error: Received unknown function invocation at /home/tts/src/github.com/hyperledger/fabric-sdk-node/examples/sc/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Received unknown function invocation at /home/tts/src/github.com/hyperledger/fabric-sdk-node/examples/sc/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 [2017-05-09 20:32:44.084] [INFO] Query - User b now has Error: Received unknown function invocation after the move```

Amjadnz (Sat, 13 May 2017 06:55:38 GMT):
my config.json file in Node

Amjadnz (Sat, 13 May 2017 06:55:58 GMT):
```{ "host":"localhost", "port":"4000", "jwt_expiretime": "3600", "chaincodeId":"sc_userole", "channelName":"aj001", "chaincodeVersion": "v1", "GOPATH":"../../../test/fixtures", "chaincodePath":"github.com/hyperledger/fabric/examples/chaincode/go/tts/sc/v1/userrole", "keyValueStore":"/tmp/fabric-client-kvs", "orgsList": ["org1","org2"], "eventWaitTime":"30000", "functionName":"invoke", "orderer":"grpcs://localhost:7050", "users":[ { "username":"admin", "secret":"adminpw" } ] } ```

Amjadnz (Sat, 13 May 2017 09:19:05 GMT):
I'm trying now to avoid sending the request.fcn name altogether

Amjadnz (Sat, 13 May 2017 09:19:11 GMT):
Would update

Amjadnz (Sat, 13 May 2017 11:25:20 GMT):
```invoke is running invoke invoke did not find func: invoke```

Amjadnz (Sat, 13 May 2017 11:25:44 GMT):
This is the message from the container of my smart contract - I'm trying to query

Amjadnz (Sat, 13 May 2017 11:49:29 GMT):
@jimthematrix - I resolved it by and SDK is returning data as expected.

Amjadnz (Sat, 13 May 2017 11:49:34 GMT):
Changes done to make it work:

Amjadnz (Sat, 13 May 2017 11:49:41 GMT):
I changed the "functionName" to readItem and passed the same to the query.js `fcn` attribute all removed the `functionname` from the arguments so instead of `['readItem','role-1','user-1']` in CURL of CLI I gave `['role-1','user-1']` And all went fine

Amjadnz (Sat, 13 May 2017 11:50:02 GMT):
this is my Request message to NODE SDK

Amjadnz (Sat, 13 May 2017 11:50:08 GMT):
```curl -s -X GET \ "http://localhost:4000/channels/aj001/chaincodes/sc_userole?peer=peer0&args=%5B%27role-1%27%2C%27user-1%27%5D&chaincodeVersion=1" \ -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQzNjY3MjEsInVzZXJuYW1lIjoiVXNlcjEiLCJvcmdOYW1lIjoib3JnMSIsImlhdCI6MTQ5NDM2MzEyMX0.lo1U2VphDMDBQeoX4-vs5I0sCeJe5NIAaK4qPE5Opm4" \ -H "cache-control: no-cache" \ -H "content-type: application/json" \ -H "x-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQzNjY3MjEsInVzZXJuYW1lIjoiVXNlcjEiLCJvcmdOYW1lIjoib3JnMSIsImlhdCI6MTQ5NDM2MzEyMX0.lo1U2VphDMDBQeoX4-vs5I0sCeJe5NIAaK4qPE5Opm4"```

jimthematrix (Sat, 13 May 2017 16:36:18 GMT):
a readme for the examples/balance-transfer is overdue ;-) @Ratnakar ^^^

jimthematrix (Sat, 13 May 2017 16:36:18 GMT):
thanks for the update @Amjadnz . a readme for the examples/balance-transfer is overdue ;-) @Ratnakar ^^^

Abasifreke (Sun, 14 May 2017 04:20:05 GMT):
Has joined the channel.

Senthil1 (Sun, 14 May 2017 07:39:58 GMT):
Has joined the channel.

Senthil1 (Sun, 14 May 2017 07:44:43 GMT):
Currently, node sdk does not use tls created by cryptogen.. Java SDK uses the tls created by the latest cryptogen. The crypto-config directory present in `fabric-sdk-node/test/fixtures/channel/crypto-config/` is also created by the old cryptogen tool.. Can we expect a CR which makes the e2e to use tls created by cryptogen?

Senthil1 (Sun, 14 May 2017 07:45:10 GMT):
@jimthematrix ^^^ for alpha2?

lignyxg (Sun, 14 May 2017 07:56:51 GMT):
Has joined the channel.

rameshthoomu (Sun, 14 May 2017 14:48:31 GMT):
@jimthematrix successfully pushed + fabric-client@1.0.0-alpha2 and fabric-ca-client@1.0.0-alpha2 to npm..

Amjadnz (Sun, 14 May 2017 15:03:49 GMT):
@jimthematrix - can you please guide as to where we can find invoking user details in a go chaincode?

Amjadnz (Sun, 14 May 2017 15:04:32 GMT):
@here - can anyone please guide as to where we can find invoking user details in a go chaincode. Exactly I need the invoking user and its signing CA cert details.

Amjadnz (Sun, 14 May 2017 15:05:37 GMT):
Based on that i need to allow or disallow a particular transaction to continue. Had done this on 0.6 - need to be clear if anyone has attempted it on 1.0-alpha

Amjadnz (Sun, 14 May 2017 15:11:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ATZsSLjiyTHqzmSY3) @Amjadnz - Go the answer from your previous post @jimthematrix https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AwNL35wRWP5dmgDFP

Amjadnz (Sun, 14 May 2017 15:11:44 GMT):
I would try that - first

thomasmarckx (Sun, 14 May 2017 20:16:44 GMT):
Has joined the channel.

jimthematrix (Mon, 15 May 2017 02:46:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NiT97qzJkrYLYepPn) @Senthil1 node sdk has already been updated to use a single set of crypto materials for MSP and TLS. it uses a reasonably recent version of cryptogen tool (although not the latest) to demonstrate the usage. the latest version of the tool only makes cosmetic changes so no strong reason to update. anything specific you are looking for that's not there?

thomasmarckx (Mon, 15 May 2017 09:22:22 GMT):
@jimthematrix has this change been done recently, because I can't get the SDK working when I use new genereted crypto-config... ```[2017-05-14 21:50:09.133] [INFO] SampleWebApp - <<<<<<<<<<<<<<<<< C R E A T E C H A N N E L >>>>>>>>>>>>>>>>> [2017-05-14 21:50:09.133] [DEBUG] SampleWebApp - End point : /channels [2017-05-14 21:50:09.133] [DEBUG] SampleWebApp - Channel name : mychannel [2017-05-14 21:50:09.133] [DEBUG] SampleWebApp - channelConfigPath : ../network/channel.tx [2017-05-14 21:50:09.133] [DEBUG] SampleWebApp - User name : Jim [2017-05-14 21:50:09.133] [DEBUG] SampleWebApp - Org name : org1 [2017-05-14 21:50:09.134] [DEBUG] Create-Channel - ====== Creating Channel 'mychannel' ====== [2017-05-14 21:50:09.134] [DEBUG] Create-Channel - channelName: 'mychannel' [2017-05-14 21:50:09.134] [DEBUG] Create-Channel - channelConfigPath: '../network/channel.tx' [2017-05-14 21:50:09.134] [DEBUG] Create-Channel - username: 'Jim' [2017-05-14 21:50:09.134] [DEBUG] Create-Channel - orgName: 'org1' info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":7054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/marckx/.hfc-key-store"}} info: [Client.js]: Successfully loaded user "Jim" from local key value store [2017-05-14 21:50:09.139] [INFO] Helper - Successfully loaded member from persistence [2017-05-14 21:50:09.140] [DEBUG] Create-Channel - Successfully enrolled user 'Jim' [2017-05-14 21:50:09.140] [DEBUG] Create-Channel - TMX Envelope Path: '/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/network/channel.tx' E0514 21:50:09.153481000 140736122835904 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E0514 21:50:09.154953000 140736122835904 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:229:12)" [2017-05-14 21:50:09.158] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/fabric-client/lib/Orderer.js:117:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:229:12) (node:97161) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/fabric-client/lib/Orderer.js:117:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/marckx/go_workspace/src/bitbucket.org/levenslang-leren-poc/node_modules/grpc/src/node/src/client.js:229:12) E0514 21:50:29.152870000 140736122835904 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E0514 21:50:29.154799000 140736122835904 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number.```

SotirisAlfonsos (Mon, 15 May 2017 09:22:23 GMT):
@jimthematrix Thank you for the reply. I get the byte array from `stub.GetCreator()` and i tried to proto.Unmarshal it. But since there is no proto package inside the peer running the chaincode, this is not working. Is there another way to get the fields MSPId and IdBytes that you mentioned previously?

Vadim (Mon, 15 May 2017 09:24:01 GMT):
@SotirisAlfonsos you can include it over the vendor folder

SotirisAlfonsos (Mon, 15 May 2017 09:25:45 GMT):
@Vadim Tried it earlier and i got this : use of vendored package not allowed

Vadim (Mon, 15 May 2017 09:25:57 GMT):
works for me

Vadim (Mon, 15 May 2017 09:28:20 GMT):
@SotirisAlfonsos make sure the path is correct. Check out how this is done in Fabric: https://github.com/hyperledger/fabric/tree/master/vendor/github.com/golang/protobuf

Senthil1 (Mon, 15 May 2017 09:53:57 GMT):
@jimthematrix No problem as such. I had to create multi-host fabric setup for 4 orgs each containing 3 peers. I used latest cryptogen to create the crypto materials. As I start peer/orderer natively, I needed to set appropriate environment variables. I referred to docker-compose.yaml provided by node sdk and found the mismatch in the directory structure. Finally, I referred to e2e_cli to do the setup. Next, I need to make appropriate changes in node sdk e2e to run with latest crypto materials. As both java sdk and e2e_cli use latest crypto, I raised this question..

Senthil1 (Mon, 15 May 2017 09:53:57 GMT):
@jimthematrix No problem as such. I had to create multi-host fabric setup for 4 orgs each containing 3 peers. I used latest cryptogen to create the crypto materials. As I start peer/orderer natively, I needed to set appropriate environment variables. I referred to docker-compose.yaml provided by node sdk and found the mismatch in the crypto directory structure. Finally, I referred to e2e_cli to do the setup. Next, I need to make appropriate changes in node sdk e2e to run with latest crypto materials. As both java sdk and e2e_cli use latest crypto, I raised this question..

SoumyaP (Mon, 15 May 2017 15:22:03 GMT):
Has joined the channel.

SotirisAlfonsos (Mon, 15 May 2017 16:31:35 GMT):
Thank you @Vadim but i could not solve the problem. I am using the vendor package inside fabric, the one that you pointed me to. The path was correct, i updated the protobuf and removed some of my other fabric versions in case there was a conflict with similar vendor files in other folders, although i doubt it. I also tried moving the vendor file where the chaincode is but that was not a good idea either. I might try to opt for a different approach. If you have any ideas of what might be the issue i would be happy to hear.

svasilyev (Mon, 15 May 2017 18:18:51 GMT):
Has joined the channel.

MikeMayori (Mon, 15 May 2017 19:18:32 GMT):
@toAll Any Chance to know when alpha2 will be available???

jimthematrix (Mon, 15 May 2017 20:02:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fPe676mvd5HAYSSFw) @SotirisAlfonsos you have to have the `vendor` folder containing all your chaincode's dependencies (like github.com/golang/protobuf/proto) inside the chaincode path itself. in other words, the chaincode package must be self-contained: ``` path/to/chaincode/mychaincode.go path/to/chaincode/vendor path/to/chaincode/vendor/github.com/golang/protobuf/proto

SotirisAlfonsos (Mon, 15 May 2017 20:36:50 GMT):
@jimthematrix i used glide to create a vendor file based on my dependencies in the same folder as my chaincode. When i then tried to install the chaincode it took to long ( i guess it tried to send all the packaged files to the peers. the peer logs showed it was receiving messages ) and then it did not fail, but didn't succeed either. By the way i was using the balance transfer example. Thank you for the advice, I will try again tomorrow with the integration tests

SotirisAlfonsos (Mon, 15 May 2017 20:36:50 GMT):
@jimthematrix i used glide to create a vendor file based on my dependencies in the same folder as my chaincode. When i then tried to install the chaincode it took too long ( i guess it tried to send all the packaged files to the peers. the peer logs showed it was receiving messages ) and then it did not fail, but didn't succeed either. By the way i was using the balance transfer example. Thank you for the advice, I will try again tomorrow with the integration tests

JMAHHH (Tue, 16 May 2017 03:19:40 GMT):
Has joined the channel.

albert.lacambra (Tue, 16 May 2017 12:22:45 GMT):
does someone knows what does it means? transport: http2Server.HandleStreams failed to receive the preface from client: EOF it happens when trying to create a channel message comes from the orderer *transport: http2Server.HandleStreams failed to receive the preface from client: EOF

albert.lacambra (Tue, 16 May 2017 12:22:54 GMT):
*transport: http2Server.HandleStreams failed to receive the preface from client: EOF*

albert.lacambra (Tue, 16 May 2017 12:23:09 GMT):
*orderer0 | 2017/05/16 12:22:19 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 172.200.0.3:7050->172.18.90.174:65518: read: connection reset by peer*

albert.lacambra (Tue, 16 May 2017 15:46:53 GMT):
something about how to fix this using the sdk? orderer0 | 2017-05-16 15:32:28.023 UTC [orderer/common/broadcast] Handle -> WARN 0f8 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Values] /Channel/Application/Org1MSP/MSP to version 0, but key is at version 0

albert.lacambra (Tue, 16 May 2017 15:47:04 GMT):
I am trying to create a channel

ymchee (Tue, 16 May 2017 16:49:17 GMT):
Has joined the channel.

jimthematrix (Wed, 17 May 2017 02:09:19 GMT):
@albert.lacambra as I commented on the #fabric channel, using the JSON input to create channel is not a supported API. please use configtxgen to generate the channel config and use the SDK to create channel

greg.haskins (Wed, 17 May 2017 02:42:10 GMT):
@jimthematrix are there any known issues with TLS=true and eventhub?

jimthematrix (Wed, 17 May 2017 02:42:36 GMT):
no known issues related to this

greg.haskins (Wed, 17 May 2017 02:42:44 GMT):
seeing an issue where a client works totally fine in TLS=false mode, and _mostly_ works in TLS=true except I dont seem to get my events

greg.haskins (Wed, 17 May 2017 02:43:00 GMT):
could be in my client code, but I dont get why

jimthematrix (Wed, 17 May 2017 02:43:19 GMT):
are the peers getting the blocks delivered from the orderer?

greg.haskins (Wed, 17 May 2017 02:43:45 GMT):
is there an easy way to check? to be clear, I am failing on the instantiate

jimthematrix (Wed, 17 May 2017 02:43:57 GMT):
that seems to be a popular trap where the orderer's server cert's CN value does not match the orderer's host name

greg.haskins (Wed, 17 May 2017 02:44:00 GMT):
i suppose I can check if the chaincode looks like it was started

jimthematrix (Wed, 17 May 2017 02:44:13 GMT):
as a result the peers are not able to contact the orderer to get blocks

greg.haskins (Wed, 17 May 2017 02:44:15 GMT):
hmm, that could be the issue

greg.haskins (Wed, 17 May 2017 02:44:34 GMT):
where would the problem materialize?

greg.haskins (Wed, 17 May 2017 02:44:43 GMT):
client->orderer or peer->orderer?

jimthematrix (Wed, 17 May 2017 02:45:25 GMT):
you would see the orderer saying "notifying block has a successor [5], blah....", but peers are not saying "committing block [5]"

greg.haskins (Wed, 17 May 2017 02:45:34 GMT):
ok, let me check

jimthematrix (Wed, 17 May 2017 02:47:19 GMT):
peers would display errors like "Failed to dial orderer address", and orderers would display errors "peer failed to complete security handshake..."

greg.haskins (Wed, 17 May 2017 02:47:39 GMT):
right, i think I am past that part

greg.haskins (Wed, 17 May 2017 02:47:54 GMT):
i debugged that earlier (this is w.r.t. fabric.git/examples/cluster)

greg.haskins (Wed, 17 May 2017 02:48:09 GMT):
ok, i confirmed I see the blocks in TLS=false, let me retry with it on

jimthematrix (Wed, 17 May 2017 02:48:20 GMT):
ok

greg.haskins (Wed, 17 May 2017 02:49:35 GMT):
so, in the non-TLS run, I see block [2]

greg.haskins (Wed, 17 May 2017 02:49:43 GMT):
in TLS, I only see block [1]

greg.haskins (Wed, 17 May 2017 02:49:52 GMT):
im guessing the first block was the channel-create

greg.haskins (Wed, 17 May 2017 02:49:56 GMT):
and the second was the instantiate

greg.haskins (Wed, 17 May 2017 02:50:13 GMT):
so, the instantiate is not completing in TLS=true, but its not clear where the disconnect is

greg.haskins (Wed, 17 May 2017 02:50:27 GMT):
the fact that it got [1] implies the peer/orderer setup is ok

greg.haskins (Wed, 17 May 2017 02:55:19 GMT):
@jimthematrix I think I figured out what might be wrong

greg.haskins (Wed, 17 May 2017 02:59:58 GMT):
@jimthematrix I think the issue has nothing to do with SDK

greg.haskins (Wed, 17 May 2017 03:00:19 GMT):
(basically, the chaincode is failing to start properly under the TLS environment

greg.haskins (Wed, 17 May 2017 03:00:20 GMT):
TBD

greg.haskins (Wed, 17 May 2017 03:00:45 GMT):
but in any case, the timeout waiting for the event was simply because the event never fired

jimthematrix (Wed, 17 May 2017 03:46:31 GMT):
Greg, when you saw block [1] and [2], those are in the orderer's log or the peers?

jimthematrix (Wed, 17 May 2017 03:47:33 GMT):
if in the peers, then definitely would rule out peer/orderer communication problem

jimthematrix (Wed, 17 May 2017 03:48:41 GMT):
in any case, curious what you find out in the end...

DannyWong (Wed, 17 May 2017 06:04:56 GMT):
Hi Guys, one question I saw 3 impls CouchDBKeyValueStore, CryptoKeyStore and FileFileValueStore

DannyWong (Wed, 17 May 2017 06:05:26 GMT):
The CryptoKeyStore speaks by its name.

DannyWong (Wed, 17 May 2017 06:05:51 GMT):
It will "cache" eCert when we explicitly called setUserContext (after enrollment)

DannyWong (Wed, 17 May 2017 06:06:04 GMT):
so, how about Couch/File value store

DannyWong (Wed, 17 May 2017 06:06:29 GMT):
by design, what kind of stuffs are store there?

DannyWong (Wed, 17 May 2017 06:07:20 GMT):
E.g. if we are running multiple NodeJS middleware (all having the NodeJS SDK), should we use CouchDBKeyValueStore and configure all NodeJS pointing to it?

SanthoshKumarMK (Wed, 17 May 2017 06:29:33 GMT):
Has joined the channel.

LordGoodman (Wed, 17 May 2017 08:41:44 GMT):
Has joined the channel.

Gerard9494 (Wed, 17 May 2017 09:37:30 GMT):
Hi! The function setPrimaryPeer(peer) from Peer.js doc does not work. The comparison "if (this._peers[i] === peer)" always returns false, even though they are exactly equals. This function does not work even with the == operator. I just have made it work if I cpnvert the Peers to string (if (JSON.stringify(this._peers[i]) === JSON.stringify(peer)), but we know it's not the solution. Is there any Peer compare function? I don't know how to compare them correctly (maybe I should code a Peer compare function, just like we do in other languages overriding compare function). Thanks in advance

harsha (Wed, 17 May 2017 11:02:47 GMT):
Hello, I'm facing this issue whilst executing `balance-transfer` example on `x64_64` , the moment I open `localhost:4000` this is what is spread on my screen. ``` UnauthorizedError: No authorization token was found at middleware (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express-jwt/lib/index.js:76:21) at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express-unless/index.js:47:5 at Layer.handle [as handle_request] (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:317:13) at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:335:12) at next (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:275:10) at urlencodedParser (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/body-parser/lib/types/urlencoded.js:91:7) at Layer.handle [as handle_request] (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:317:13)```

harsha (Wed, 17 May 2017 11:02:47 GMT):
Hello, I'm facing this issue whilst executing `balance-transfer` example on `x64_64` , the moment I open `localhost:4000` this is what is splashed on my web-session. ``` UnauthorizedError: No authorization token was found at middleware (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express-jwt/lib/index.js:76:21) at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express-unless/index.js:47:5 at Layer.handle [as handle_request] (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:317:13) at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:335:12) at next (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:275:10) at urlencodedParser (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/body-parser/lib/types/urlencoded.js:91:7) at Layer.handle [as handle_request] (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/express/lib/router/index.js:317:13)```

JMAHHH (Wed, 17 May 2017 11:03:57 GMT):
@harsha are you sending a `jwt` token along with the api call?

harsha (Wed, 17 May 2017 11:04:54 GMT):
@JMAHHH Nope I'm not sending any tokens alongwith it.

JMAHHH (Wed, 17 May 2017 11:05:00 GMT):
you have to

JMAHHH (Wed, 17 May 2017 11:05:11 GMT):
or remove the checks from app.js

JMAHHH (Wed, 17 May 2017 11:05:34 GMT):
``` var token = req.body.token || req.query.token || req.headers[ 'x-access-token']; jwt.verify(token, app.get('secret'), function(err, decoded) { if (err) { res.send({ success: false, message: 'Failed to authenticate token.' }); } else { ```

JMAHHH (Wed, 17 May 2017 11:05:37 GMT):
this stuff...

harsha (Wed, 17 May 2017 11:10:42 GMT):
Can you tell me how to pass on the JWT token ?

harsha (Wed, 17 May 2017 11:10:42 GMT):
Can you tell me how to pass on the jwt token ?

JMAHHH (Wed, 17 May 2017 11:11:22 GMT):
see https://github.com/hyperledger/fabric-sdk-node/blob/c01f6c29459751a8dd10b61acde4fcdc97d65659/examples/balance-transfer/testAPIs.sh

JMAHHH (Wed, 17 May 2017 11:11:31 GMT):
for a basic approach

harsha (Wed, 17 May 2017 11:15:27 GMT):
:q

harsha (Wed, 17 May 2017 11:15:28 GMT):
git log

nhrishi (Wed, 17 May 2017 11:54:25 GMT):
Hi, I'm getting below error when trying to enroll a user in balance-transfer example. Error- "Cannot read property 'ca' of undefined. (error is from helper.js 181:40).. I'm running a Ca server as well.

JMAHHH (Wed, 17 May 2017 12:11:19 GMT):
when I install a chaincode I get: ``` 2017-05-17 12:07:51.197 UTC [ccprovider] NewCCContext -> DEBU 521 NewCCCC (chain=,chaincode=lccc,version=1.0.0-alpha,txid=ff56599011b604411c23c44dcd2b2313af8d8b451518594a73b426928b1656e4,syscc=true,proposal=0xc421784d70,canname=lccc:1.0.0-alpha ```

JMAHHH (Wed, 17 May 2017 12:11:37 GMT):
everything looks successful, note that `chain` appears to be empty

JMAHHH (Wed, 17 May 2017 12:12:06 GMT):
then when I try to instantiate, the SDK complains that there is no `chainId`

JMAHHH (Wed, 17 May 2017 12:12:56 GMT):
thing is I have no idea what chain I've deployed on AND the install logs all show `COMPLETED`

JMAHHH (Wed, 17 May 2017 12:14:13 GMT):
I don't know what `lccc` is either, it's definitely not my `chaincodeid`

JMAHHH (Wed, 17 May 2017 12:14:13 GMT):
I don't know what `lccc` is either, it's definitely not my `chaincodeId`

jimthematrix (Wed, 17 May 2017 13:57:39 GMT):
@DannyWong FileKeyValueStore and CouchKeyValueStore both implements the KeyValueStore interface, which is used to persist user objects (name, mspid, ecerts, and SKI pointers to the corresponding private keys)

jimthematrix (Wed, 17 May 2017 14:00:37 GMT):
using a database-backed implementation like CouchKeyValueStore is definitely meant to be used in an app clustering setup, so instances of the app can share user objects. although this would require saving the private keys in a database as well, which is up for debate whether that's a legitimate approach. the alternative is each app instance separately enrolls the same user (how many times a user can be enrolled can be set in fabric-ca) and use local storage for the user objects and private keys

jimthematrix (Wed, 17 May 2017 14:03:00 GMT):
@Gerard9494 using the `===` operation to compare is by design, because `setPrimaryPeer()` is meant to designate an existing peer on the chain as the primary peer for query purposes

jimthematrix (Wed, 17 May 2017 14:03:00 GMT):
@Gerard9494 using the `===` operation to compare is by design, because `setPrimaryPeer()` is meant to designate an existing peer on the chain as the primary peer for query purposes. so you would first add your list of peers, then designate one of them (the existing object itself) as the primary

jjjjibm (Wed, 17 May 2017 14:06:52 GMT):
Good morning. I am in the Pep Boys customer lounge. One of my tires split last night. They just told me about 1.5 hours to replace the tires, align, etc

DannyWong (Wed, 17 May 2017 14:14:29 GMT):
Thanks Matrix

jjjjibm (Wed, 17 May 2017 14:20:10 GMT):
OOOps wrong chat channel!

jimthematrix (Wed, 17 May 2017 14:27:09 GMT):
@JMAHHH note that chaincode install is "channel agnostic", it puts the chaincode file(s) on the target peers that's it. when you instantiate the chaincode, you need to decide which channel it'll be used in and make that the target channel

jimthematrix (Wed, 17 May 2017 14:27:44 GMT):
@jjjjibm ;-) no worries, hope your tire trouble gets squared away smoothly

jjjjibm (Wed, 17 May 2017 14:31:01 GMT):
@jimthematrix Thanks. I am just glad it didn't happen on I-85!

l1nux (Wed, 17 May 2017 14:35:05 GMT):
If I have a fabric client as follows : client1 = required('fabric-client'); chain = client1.newChain('mychain'); If I want to have a second fabric client named client2 to associate or 'link' to the same chain ('mychain'), what function call I should use for the second client to link to the same chain? is it getChain() as shown below or what?: client2=required('fabric-client'); client2.getChain('mychain');?????

Gerard9494 (Wed, 17 May 2017 14:49:45 GMT):
@jimthematrix Thanks for your answer. But i have it already added, the problem is that the === operator always return false, but if i print the two peers at the console are exactly the same, do you know which problem do I have? :/

Gerard9494 (Wed, 17 May 2017 14:49:45 GMT):
@jimthematrix Thanks for your answer. But i have it already added, the problem is that the === operator always return false, but if i print the two peers at the console are exactly the same, do you know which problem do I have?

JMAHHH (Wed, 17 May 2017 15:06:52 GMT):
@jimthematrix thanks for the clarification jim

mrkiouak (Wed, 17 May 2017 15:25:35 GMT):
I've forgotten the node sdk logging level env var-- could someone remind me?

jimthematrix (Wed, 17 May 2017 15:43:50 GMT):
@l1nux as documented here: https://fabric-sdk-node.github.io/Client.html#getChain__anchor , this call is client-side only and simply retrieves the chain object from the client object (in memory), so in your snippet above client2 doesn't know anything about 'mychain'

jimthematrix (Wed, 17 May 2017 15:46:43 GMT):
what you want to do is this: ``` var theChannel = client2.newChain('mychain'); // so you'll have another chain object representing that channel "mychain" theChannel.addOrderer(...); theChannel.initialize(); // this fetches the channel configuration from the orderer and initializes theChannel

jimthematrix (Wed, 17 May 2017 15:46:43 GMT):
what you want to do is this: ``` var theChannel = client2.newChain('mychain'); // so you'll have another chain object representing that channel "mychain" theChannel.addOrderer(...); theChannel.initialize(); // this fetches the channel configuration from the orderer and initializes theChannel with important data like MSPs

jimthematrix (Wed, 17 May 2017 15:49:44 GMT):
(hmm as I read the doc at the link above, it's not completely accurate. will need to be updated)

praveennagpal (Wed, 17 May 2017 16:13:58 GMT):
I20170517-21:38:13.366(5.5)? Orderer = Orderer : {url:grpc://localhost:7050} W20170517-21:38:13.419(5.5)? (STDERR) error: [Orderer.js]: sendDeliver - on error code 14: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:242:12)" W20170517-21:38:13.421(5.5)? (STDERR) error: [Chain.js]: getChannelConfig - Failed Proposal. Error: Error: SERVICE_UNAVAILABLE W20170517-21:38:13.422(5.5)? (STDERR) at ClientDuplexStream. (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/lib/Orderer.js:234:23) W20170517-21:38:13.422(5.5)? (STDERR) at emitOne (events.js:77:13) W20170517-21:38:13.422(5.5)? (STDERR) at ClientDuplexStream.emit (events.js:169:7) W20170517-21:38:13.423(5.5)? (STDERR) at ClientDuplexStream._emitStatusIfDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:204:12) W20170517-21:38:13.423(5.5)? (STDERR) at ClientDuplexStream._readsDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8) W20170517-21:38:13.423(5.5)? (STDERR) at readCallback (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:242:12) W20170517-21:38:13.430(5.5)? (STDERR) error: [Chain.js]: Failed buildChannelConfig. :: Error: SERVICE_UNAVAILABLE W20170517-21:38:13.430(5.5)? (STDERR) at ClientDuplexStream. (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/lib/Orderer.js:234:23) W20170517-21:38:13.431(5.5)? (STDERR) at emitOne (events.js:77:13) W20170517-21:38:13.431(5.5)? (STDERR) at ClientDuplexStream.emit (events.js:169:7) W20170517-21:38:13.431(5.5)? (STDERR) at ClientDuplexStream._emitStatusIfDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:204:12) W20170517-21:38:13.432(5.5)? (STDERR) at ClientDuplexStream._readsDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8) W20170517-21:38:13.432(5.5)? (STDERR) at readCallback (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:242:12)

praveennagpal (Wed, 17 May 2017 16:14:38 GMT):
I am getting the above error while trying to buildChannelConfig using node sdk

praveennagpal (Wed, 17 May 2017 16:14:55 GMT):
at client.buildChannelConfig(channelInput, orderer, msps)

praveennagpal (Wed, 17 May 2017 16:15:50 GMT):
The orderer is running at port 7050 so not sure what service is unavailable here

praveennagpal (Wed, 17 May 2017 16:16:32 GMT):
tried with both grpcs and grpc in the orderer url

praveennagpal (Wed, 17 May 2017 16:16:48 GMT):
has anybody encountered the same before?

mbwhite (Wed, 17 May 2017 16:18:28 GMT):
Hi; just cloned the fabric-sdk-node, npm install in the root then npm test gives. events.js:160 throw er; // Unhandled 'error' event ^ Error: Cannot find module './api.js' As I've not changed anything yet - is there some setup step I've missed?

l1nux (Wed, 17 May 2017 17:03:14 GMT):
Trying to revoke a CA user and got an error : "user does not have attribute 'hf.Revoker", any idea why and how to fix it?

greg.haskins (Wed, 17 May 2017 19:57:36 GMT):
@jimthematrix what drives this timeout

greg.haskins (Wed, 17 May 2017 19:57:47 GMT):
```error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ghaskins/sandbox/git/chaintool/examples/example02/client/nodejs/node_modules/fabric-client/lib/Peer.js:201:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ghaskins/sandbox/git/chaintool/examples/example02/client/nodejs/node_modules/fabric-client/lib/Peer.js:201:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ghaskins/sandbox/git/chaintool/examples/example02/client/nodejs/node_modules/fabric-client/lib/Peer.js:201:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ghaskins/sandbox/git/chaintool/examples/example02/client/nodejs/node_modules/fabric-client/lib/Peer.js:201:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error:bad result:Error: REQUEST_TIMEOUT,Error: REQUEST_TIMEOUT,Error: REQUEST_TIMEOUT,Error: REQUEST_TIMEOUT,.protos.Proposal,.common.Header```

greg.haskins (Wed, 17 May 2017 19:57:54 GMT):
?

greg.haskins (Wed, 17 May 2017 19:58:48 GMT):
I dont seem to specify the timeout myself, so it appears to be an SDK default

greg.haskins (Wed, 17 May 2017 19:58:59 GMT):
first question is whether it is configurable?

SotirisAlfonsos (Wed, 17 May 2017 20:17:50 GMT):
@greg.haskins I am not sure but could be this one fabric-sdk-node/fabric-client/config/default.json .

jimthematrix (Wed, 17 May 2017 20:30:48 GMT):
@praveennagpal noticing that your client is contacting the orderer at `grpc://`, is your orderer enabled for TLS?

jimthematrix (Wed, 17 May 2017 20:31:02 GMT):
@mbwhite run `gulp ca` first

jimthematrix (Wed, 17 May 2017 20:31:53 GMT):
@l1nux the user making the revoke call must be the admin user or anyone with the revoker role

greg.haskins (Wed, 17 May 2017 20:32:03 GMT):
@SotirisAlfonsos ty

greg.haskins (Wed, 17 May 2017 20:32:37 GMT):
@jimthematrix that parameter that @SotirisAlfonsos does indeed to seem to be a gross configuration option...but is there a way to set on a per call basis?

greg.haskins (Wed, 17 May 2017 20:33:00 GMT):
the problem I am having is that the instantiate can take over a minute to compile the chaincode

greg.haskins (Wed, 17 May 2017 20:33:29 GMT):
so I need to bump the timeout up, but I would prefer to not set them all to 90000

greg.haskins (Wed, 17 May 2017 20:33:38 GMT):
just the instantiateproposal, ideally

jimthematrix (Wed, 17 May 2017 20:34:46 GMT):
@greg.haskins `request-timeout` as @SotirisAlfonsos said, which can be set in any of the following ways: - provide a file to override defaults and add the file to the config setting (client.addConfigFile()) - programmatically set it: client.setConfigSetting('request-timeout', value) - environment variable: REQUEST_TIMEOUT= - program switch: --request-timeout

greg.haskins (Wed, 17 May 2017 20:35:06 GMT):
right, but that would set the timeout for all operations, right?

jimthematrix (Wed, 17 May 2017 20:35:30 GMT):
if you want it just for some calls, use the programmable way to do it would be ideal

greg.haskins (Wed, 17 May 2017 20:35:37 GMT):
is there a way I can do something like chain.sendInstantiateProposal(request, {request-timeout: 90000});

greg.haskins (Wed, 17 May 2017 20:36:01 GMT):
as in use client.setConfigSetting() wrapping the call?

jimthematrix (Wed, 17 May 2017 20:36:07 GMT):
yep

greg.haskins (Wed, 17 May 2017 20:36:32 GMT):
i think that will work in this case, but its not very reentrant

greg.haskins (Wed, 17 May 2017 20:36:40 GMT):
consider adding a tmo option to that call?

jimthematrix (Wed, 17 May 2017 20:37:38 GMT):
no re-entrant concerns with node (single thread)

greg.haskins (Wed, 17 May 2017 20:38:08 GMT):
well, re-entrant issues are not predicated on threading model

greg.haskins (Wed, 17 May 2017 20:38:17 GMT):
for instance, callbacks could fire ;)

jimthematrix (Wed, 17 May 2017 20:38:27 GMT):
understood

greg.haskins (Wed, 17 May 2017 20:38:30 GMT):
but I digress, I can work around this for now

greg.haskins (Wed, 17 May 2017 20:38:33 GMT):
thx

jimthematrix (Wed, 17 May 2017 20:38:43 GMT):
but in the same event cycle, this is unlikely to happen

greg.haskins (Wed, 17 May 2017 20:38:56 GMT):
i wouldnt assume that

jimthematrix (Wed, 17 May 2017 20:40:10 GMT):
the call path from sendInstantiateProposal to making the network request (where the timeout takes effect), I remember is all sync code

greg.haskins (Wed, 17 May 2017 20:40:18 GMT):
if I do setConfigSetting(90000); sendProposal(); setConfigSetting(45000), any number of callbacks may fire that issue more transactions in the meantime

jimthematrix (Wed, 17 May 2017 20:41:03 GMT):
but those call backs should be happening in a different event loop

greg.haskins (Wed, 17 May 2017 20:41:29 GMT):
you are saying the chain.setConfigSetting only effects the current?

jimthematrix (Wed, 17 May 2017 20:42:14 GMT):
unless the call paths from sendProposal() to _peerClient.send() contains async calls, it'll just happen in the same event cycle and nobody can interrupt

jimthematrix (Wed, 17 May 2017 20:43:25 GMT):
hmm, actually that's a good question, i need to think about that

jimthematrix (Wed, 17 May 2017 20:44:02 GMT):
before you can setConfigSetting(45000), another call may come in.

jimthematrix (Wed, 17 May 2017 20:44:02 GMT):
before you can setConfigSetting(45000) to revert, another call may come in.

jimthematrix (Wed, 17 May 2017 20:52:58 GMT):
i double checked the code again, the timeout is per peer instance

jimthematrix (Wed, 17 May 2017 20:53:37 GMT):
so I spoke too soon re: wrapping the sendProposal() call. unfortunately that won't work

jimthematrix (Wed, 17 May 2017 20:56:11 GMT):
given the code today, if you want to use a different timeout you need to specifically construct a peer instance just for that call and set the timeout like this: `new Peer(url, {request-timeout: 90000})`

davidkel (Wed, 17 May 2017 21:52:40 GMT):
@greg.haskins did you solve the problem where your instantiate fails with tls turned on ? I had something similar a while ago with instantiate not working when TLS was enabled with the first alpha release and the only solution I found was to ensure both peers were defined as gossip leaders. This is something I was going to relook at for alpha 2 to see if I could recreate the problem.

greg.haskins (Wed, 17 May 2017 21:55:09 GMT):
I did, in my case it was a bug in my examples/cluster tool

greg.haskins (Wed, 17 May 2017 21:55:22 GMT):
I'll be pushing the fix later

l1nux (Thu, 18 May 2017 11:51:16 GMT):
@jimthematrix Hi, any updates on my question regarding having second client link to the same chain?

jimthematrix (Thu, 18 May 2017 12:01:56 GMT):
@l1nux i have answered above: https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MKeCRcibjXsWidBEf

mbwhite (Thu, 18 May 2017 12:23:56 GMT):
yes

mbwhite (Thu, 18 May 2017 12:25:22 GMT):
@jimthematrix thanks for the gulp tip - it's all ok... I've got a change ready go locally - git review is giving me a long list of commits, and I can 't push them... something seems amiss.

l1nux (Thu, 18 May 2017 12:56:05 GMT):
@jimthematrix misunderstood your comment regarding something was inaccurate, I guess you meant the linked document. I check my version, there is no 'initialize()' method, what version of fabric client you were referring to?

jimthematrix (Thu, 18 May 2017 13:32:54 GMT):
@l1nux alpha2 was just published to npm last week, that's the recommended level and works with alpha2 docker images in docker hub

greg.haskins (Thu, 18 May 2017 14:01:29 GMT):
@jimthematrix I have a client that looks like

greg.haskins (Thu, 18 May 2017 14:01:36 GMT):
```function connect() { client = new hfc(); return utils.setStateStore(client, ".hfc-kvstore") .then(() => { chain = client.newChain(chainId); chain.addOrderer(client.newOrderer(config.orderer.url, { pem: config.orderer.ca, 'ssl-target-name-override': config.orderer.hostname })); for (var i in config.peers) { var p = config.peers[i] peer = client.newPeer(p.api, { pem: config.ca.certificate, 'ssl-target-name-override': p.hostname, 'request-timeout': 120000 }); peers.push(peer); chain.addPeer(peer); } var userSpec = { username: config.identity.principal, mspid: config.identity.mspid, cryptoContent: { privateKeyPEM: config.identity.privatekey, signedCertPEM: config.identity.certificate }}; return client.createUser(userSpec); }) .then((user) => { var peer1 = config.peers[0] eventhub = new EventHub(client); eventhub.setPeerAddr(peer1.events, { pem: config.ca.certificate, 'ssl-target-name-override': peer1.hostname }); eventhub.connect(); return chain.initialize() .then(() => { return user; }); }); } ```

greg.haskins (Thu, 18 May 2017 14:01:42 GMT):
yet I still see

greg.haskins (Thu, 18 May 2017 14:01:50 GMT):
info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/home/ghaskins/.hfc-key-store"}}

greg.haskins (Thu, 18 May 2017 14:01:57 GMT):
where does that come from?

greg.haskins (Thu, 18 May 2017 14:02:23 GMT):
(and how can I call setStateStore() early enough to get it to stop complaining

greg.haskins (Thu, 18 May 2017 14:02:57 GMT):
that utility function is

greg.haskins (Thu, 18 May 2017 14:03:01 GMT):
``` setStateStore: (client, path) => { return new Promise((resolve, reject) => { return hfc.newDefaultKeyValueStore({path: path}) .then((store) => { client.setStateStore(store); resolve(true); }); }); }, ```

jollen (Thu, 18 May 2017 14:45:59 GMT):
Has joined the channel.

ericmvaughn (Thu, 18 May 2017 15:02:04 GMT):
@greg.haskins I don't know if this helps but I've been able to change the key storage location by setting the cryptoSuite ``` user = new User(appUser.userName, client); var cryptoSuite = client.newCryptoSuite({path: config.keyPath}); user.setCryptoSuite(cryptoSuite); ```

jimthematrix (Thu, 18 May 2017 15:08:13 GMT):
@greg.haskins they are two separate persistence stores. the cryptosuite uses its own for private keys. what level of node.js SDK are you using because we just merged some changes in this area yesterday

greg.haskins (Thu, 18 May 2017 15:15:28 GMT):
im using the alpha2 release from NPM

jimthematrix (Thu, 18 May 2017 16:50:58 GMT):
ok, as of alpha2 the code path is something like this (note that it'll change a bit after alpha2, hopefully for the better): ``` var cs = client.newCryptoSuite({path: }); var myUser = new User('thename'); myUser.setCryptoSuite(cs); myUser.setEnrollment(privKey, cert, mspId);

praveennagpal (Thu, 18 May 2017 17:15:16 GMT):
@jimthematrix I actually tried grpcs and the orderer is TLS enabled but still getting the same error. What are the likely reasons for it and any checks that I can do?

jimthematrix (Thu, 18 May 2017 17:27:40 GMT):
@praveennagpal and you have configured the orderer object with tls ca certs, as demonstrated here: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/e2eUtils.js#L59?

levinkwong (Fri, 19 May 2017 02:31:46 GMT):
Hi all, may I ask how to disable TLS in fabric-client? For fabric-ca-client, I know that I can pass in a tlsOptions with `verify : false`

levinkwong (Fri, 19 May 2017 02:42:21 GMT):
Is that if I just set the endpoint for peer/orderer using protocol grpc instead of grpcs it will automatically not checking for TLS certs?

levinkwong (Fri, 19 May 2017 02:57:16 GMT):
I think I am correct, remove the question

praveennagpal (Fri, 19 May 2017 03:37:31 GMT):
@jimthematrix yes in fact, I have used the same code

jimthematrix (Fri, 19 May 2017 03:46:10 GMT):
@praveennagpal any errors in the Orderer? is the orderer instance still up? (seeing SERVICE_UNAVAILABLE in the stack trace when contacting orderer)

praveennagpal (Fri, 19 May 2017 03:46:56 GMT):
@jimthematrix yes the orderer instance is still up. How do I see the orderer logs?

praveennagpal (Fri, 19 May 2017 03:47:12 GMT):
@jimthematrix its running on port 7050

praveennagpal (Fri, 19 May 2017 03:47:24 GMT):
as I just did a docker ps

jimthematrix (Fri, 19 May 2017 03:47:32 GMT):
`docker ps` to get the orderer instance ID, then `docker logs `

praveennagpal (Fri, 19 May 2017 03:47:38 GMT):
ok

praveennagpal (Fri, 19 May 2017 03:51:19 GMT):
@jimthematrix i get these logs

praveennagpal (Fri, 19 May 2017 03:51:20 GMT):
2017/05/19 03:50:05 grpc: Server.Serve failed to complete security handshake from "172.20.0.1:38366": EOF 2017/05/19 03:50:05 grpc: Server.Serve failed to complete security handshake from "172.20.0.1:38368": EOF 2017/05/19 03:50:25 grpc: Server.Serve failed to complete security handshake from "172.20.0.1:38372": EOF 2017/05/19 03:50:25 grpc: Server.Serve failed to complete security handshake from "172.20.0.1:38374": EOF

praveennagpal (Fri, 19 May 2017 03:51:24 GMT):
on the orderer

praveennagpal (Fri, 19 May 2017 03:52:52 GMT):
seems to be trying to listen to some random ports

FengChen_1982 (Fri, 19 May 2017 08:11:38 GMT):
@here After I created a channel following the instructions in the e2e_cli sample. Do I have to build a CA server before I want to use my Node.js applcation to access the peer?

Vadim (Fri, 19 May 2017 08:14:07 GMT):
@FengChen_1982 it's not generally necessary, e2e example pre-generates a user, you can use him

Vadim (Fri, 19 May 2017 08:14:43 GMT):
if you want more users and want to dynamically generate and use them, then you need CA

paul.sitoh (Fri, 19 May 2017 08:15:14 GMT):
Anyone know how to get the keyvaluestore from fabric that is installed locally?

FengChen_1982 (Fri, 19 May 2017 08:15:22 GMT):
Thanks so much, could you please elaborate more on the "a user"?

paul.sitoh (Fri, 19 May 2017 08:15:54 GMT):
I mean the certs for the keyvalstore

Vadim (Fri, 19 May 2017 08:15:56 GMT):
well it's just a pub key + priv key that you can load into nodejs and use it

paul.sitoh (Fri, 19 May 2017 08:16:14 GMT):
where do i get it from

Vadim (Fri, 19 May 2017 08:16:37 GMT):
@paul.sitoh "I mean the certs for the keyvalstore" -> I think it should be in your $HOME/.hfc-key-store by default or something like that

FengChen_1982 (Fri, 19 May 2017 08:16:43 GMT):
@Vadim I think you mean the CORE_PEER_TLS_ROOTCERT_FILE org1.example.com-cert.pem, right?

Vadim (Fri, 19 May 2017 08:16:52 GMT):
no

paul.sitoh (Fri, 19 May 2017 08:17:08 GMT):
there is nothing when I start up fabric locally

paul.sitoh (Fri, 19 May 2017 08:17:14 GMT):
in the keyvalstore

paul.sitoh (Fri, 19 May 2017 08:17:28 GMT):
usually when you register user it should send the cert

paul.sitoh (Fri, 19 May 2017 08:17:34 GMT):
but nothing happening

Vadim (Fri, 19 May 2017 08:17:56 GMT):
@FengChen_1982 I don't have e2e installed at hand, but according to https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/crypto-config.yaml#L67, there should be a user cert generated

Vadim (Fri, 19 May 2017 08:18:24 GMT):
in e2e_cli/channel_artifacts somewhere

Vadim (Fri, 19 May 2017 08:18:53 GMT):
@paul.sitoh the certificates will appear there when you enroll user with a CA

Vadim (Fri, 19 May 2017 08:19:31 GMT):
e.g. you can run a test https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/fabric-ca-services-tests.js and then you will have some certificates there

FengChen_1982 (Fri, 19 May 2017 08:19:57 GMT):
@Vadim I found it: e2e/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/admincerts

Vadim (Fri, 19 May 2017 08:20:17 GMT):
@FengChen_1982 yes, it's probably than one

Vadim (Fri, 19 May 2017 08:20:17 GMT):
@FengChen_1982 yes, it's probably that one

Vadim (Fri, 19 May 2017 08:20:42 GMT):
you need his signcert and key

FengChen_1982 (Fri, 19 May 2017 08:21:34 GMT):
好的。

Vadim (Fri, 19 May 2017 08:22:51 GMT):
@FengChen_1982 this is how you can load him: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/unit/util.js#L160

FengChen_1982 (Fri, 19 May 2017 08:23:05 GMT):
Thank you so much.

FengChen_1982 (Fri, 19 May 2017 08:23:24 GMT):
That's a good start for me now.

SotirisAlfonsos (Fri, 19 May 2017 08:40:45 GMT):
Hi everyone, I have a question regarding identity checks. So i have a chaincode that checks the creator identity `getCreator` each time it is called. My question is what would be the best practice to validate this identity? What i mean is that i do not want to do `sId.Mspid == "Org1MSP"`. Is there a better way?

Vadim (Fri, 19 May 2017 08:42:25 GMT):
@SotirisAlfonsos GetCreator also returns a certificate, so you can check it too

SotirisAlfonsos (Fri, 19 May 2017 09:01:37 GMT):
@Vadim Yes but check it against what? Is it a good practice to search the filesystem, parse the actual certificate documents and check the path to derive the owner? Or maybe create a mapping between users and certs? Or ask the CA to tell me which user has the certificate i am holding, if i can do that. I do not know if what i am trying to say makes sense.

paul.sitoh (Fri, 19 May 2017 09:02:20 GMT):
Folks I am using the cryptogen to generate certs I ran ```cryptogen generate --configFile=./crypto-config.yaml``` but I got nothing

Vadim (Fri, 19 May 2017 09:02:35 GMT):
@SotirisAlfonsos The user is identified by that certificate, so the certificate has all info about the user. I'm not sure why you suggest to look up something in the file system.

paul.sitoh (Fri, 19 May 2017 09:03:43 GMT):
Anyone know where the generated certs are stored?

SotirisAlfonsos (Fri, 19 May 2017 09:11:49 GMT):
@Vadim Because somehow i want to map the certificate back to the user to see if he can change a certain value. Something to tell me that the sId i have belongs indeed to John.

Vadim (Fri, 19 May 2017 09:12:13 GMT):
@SotirisAlfonsos you mean a username? It's in the cert's CN field.

luckydogchina (Fri, 19 May 2017 09:21:14 GMT):
info: [query]: {"key":"10000001312","is_delete":false,"value":{"buffer":{"type":"Buffer","data":[10,157,22,10,130,6,10,229,5,10,7,79,114,103,50,77,83,80,18,217,5,45,45,45,45,45,66,69,71,73,78,32,67,69,82,84,73,70,73,67,65,84,69,45,45,45,45,45,10,77,73,73,66,55,106,67,67,65,90,83,103,65,119,73,66,65,103,73,85,65,107,119,67,88,57.... ........10,129,28]},"offset":970,"markedOffset":-1,"limit":1038,"littleEndian":true,"noAssert":false}}

luckydogchina (Fri, 19 May 2017 09:22:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3giPRKL3viQiyEXjS) @luckydogchina I query the transaction info by 'queryTransaction(transactionID)'

luckydogchina (Fri, 19 May 2017 09:24:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3giPRKL3viQiyEXjS) @luckydogchina is the format of result of value protobuf?

Vadim (Fri, 19 May 2017 09:25:11 GMT):
@luckydogchina seems like it's Buffer to me, try value.toString('utf-8') if it works

Vadim (Fri, 19 May 2017 09:25:11 GMT):
@luckydogchina seems like it's Buffer to me, try value.toString('utf8') if it works

Vadim (Fri, 19 May 2017 09:25:46 GMT):
or value.buffer.toString('utf8')

qsmen (Fri, 19 May 2017 09:31:03 GMT):
Has joined the channel.

luckydogchina (Fri, 19 May 2017 09:33:55 GMT):

Message Attachments

luckydogchina (Fri, 19 May 2017 09:34:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=q3rWggATL5QnPhSft) @Vadim Thanks , this is the string format value.

luckydogchina (Fri, 19 May 2017 09:34:56 GMT):

Message Attachments

Vadim (Fri, 19 May 2017 09:41:28 GMT):
@luckydogchina that looks like a protobuf

saptarshee (Fri, 19 May 2017 10:35:39 GMT):
Has joined the channel.

saptarshee (Fri, 19 May 2017 11:58:19 GMT):
Hiii... Is anybody aware of any alternate method to sendInstallProposal(request) ????? It seems this method no longer exist in the master version (was there in alpha)

prashiyn (Fri, 19 May 2017 12:34:27 GMT):
Pulled the master from github, and there is an implementation bug with Fab 3381 fix. Client.js ( line 1115) imports key from crypto suite return self._cryptoSuite.importKey(data.toString()); whereas in CryptoSuite_ECDSA implementation importKeys(raw, opts, storeKey) takes 2 other parameters and throws error if opts or storeKey is not provided. So client.createUser always fails.

jimthematrix (Fri, 19 May 2017 13:26:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=A7uk2kE4u5QqmN7GM) @praveennagpal the most typical cause of these errors is when the orderer's server certificate has a `CN` value that doesn't match the orderer's hostname. you need to set the orderer's service name in docker-compose to exactly match what's in that field in the tls cert.

jimthematrix (Fri, 19 May 2017 13:27:47 GMT):
use `openssl x509 -in -noout -text` to print the cert and find the value of the `CN` field. say `orderer0.example.com`, then make sure that's the name of the orderer service in docker-compose.yaml

shivann (Fri, 19 May 2017 14:54:51 GMT):
Has joined the channel.

greg.haskins (Fri, 19 May 2017 15:49:14 GMT):
@jimthematrix is it a known issue that chain.installChaincode() seems to still resolve the promise even when the call falls?

greg.haskins (Fri, 19 May 2017 15:49:20 GMT):
(as opposed to rejecting it)

greg.haskins (Fri, 19 May 2017 15:50:33 GMT):
or I should just say "is it known"...perhaps that was the intention

greg.haskins (Fri, 19 May 2017 15:51:36 GMT):
it seems that it always resolves, its just that you either get an error object back or a non-error object

jimthematrix (Fri, 19 May 2017 17:25:58 GMT):
hi @greg.haskins good question, short answer is "it's a bug". the reason for this behavior is that call uses _sendPeersProposal() under the cover that is designed for endorsement proposals. since failed endorsements don't mean failed proposals, the API always resolves. but I see installChaincode should be treated differently since it's not a endorsement call

jimthematrix (Fri, 19 May 2017 17:26:05 GMT):
mind filing a JIRA bug?

shivann (Fri, 19 May 2017 17:32:47 GMT):
Hi all, does any one faced error in establishing connection to peer from Node SDK, as below ..?

shivann (Fri, 19 May 2017 17:32:47 GMT):
Hi all, does any one faced error in establishing connection to peer from Node SDK, as below ..? Problem with TLS connection..

shivann (Fri, 19 May 2017 17:32:47 GMT):
Hi Jim, i am getting error in establishing connection to peer from Node SDK, as below, Problem with TLS connection. Can you kindly help me in this..

shivann (Fri, 19 May 2017 17:32:47 GMT):
Hi @jimthematrix , i am getting error in establishing connection to peer from Node SDK, as below, Problem with TLS connection. Can you kindly help me in this..

shivann (Fri, 19 May 2017 17:33:14 GMT):

Message Attachments

rliu (Fri, 19 May 2017 18:02:04 GMT):
@jimthematrix I'm trying to create a network with 3 peers, say org1, org2, org3 and then two channels, one for peers and the other for peers . The node SDK test case comes with a network with two peers. So I need to create an additional peer. Here are the steps I took: 1. Duplicated folder fabric-idk-node/test/fixtures/channel/cypto-config/peerOrganizations/org2.example.com to create org3.example.com, and modified file names accordingly 2. Changed docker-compose.yaml to add org3 and the network started successfully 3. Configured configtx.yaml accordingly for the channel between , and generate mychannel2.tx 4. Modify create-channel.js to use the mychannel2.tx and changed other configurations for peers accordingly However, when I run create-channel.js, I got the following error ------------- info: [Client.js]: loading user from files info: [utils.CryptoKeyStore]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/hfc/hfc-test-kvs_peerOrg1"}} ok 1 Successfully enrolled user 'admin' for orderer ok 2 Successfully built config update >>>> getting the org admin looking at file ::/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/keystore/9022d671ceedbb24af3ea69b5a8136cc64203df6b9920e26f48123fcfcb1d2e9_sk looking at file ::/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem info: [Client.js]: loading user from files info: [utils.CryptoKeyStore]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/hfc/hfc-test-kvs_peerOrg1"}} ok 3 Successfully enrolled user 'admin' for org1 ok 4 Successfully signed config update >>>> getting the org admin looking at file ::/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org3.example.com/users/Admin@org3.example.com/keystore/5a983ddcbefe52a7f9b8ee5b85a590c3e3a43c4ccd70c7795bec504e7f74848d_sk looking at file ::/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org3.example.com/users/Admin@org3.example.com/signcerts/Admin@org3.example.com-cert.pem info: [Client.js]: loading user from files info: [utils.CryptoKeyStore]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/hfc/hfc-test-kvs_peerOrg3"}} ok 5 Successfully enrolled user 'admin' for org3 ok 6 Successfully signed config update looking at file ::/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/keystore/ef8e88d28a86f23466ad378003d819561adbedc77fe90cc250424ce4de179a3c_sk looking at file ::/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/signcerts/Admin@example.com-cert.pem info: [Client.js]: loading user from files ok 7 Successfully enrolled user 'admin' for orderer ok 8 Successfully signed config update OK TEST error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST not ok 9 Error: BAD_REQUEST at ClientDuplexStream. (/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:93:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:245:14) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then.then.then.then.then (/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/test/integration/e2e/create-channel1.js:363:5) ... ok 10 Successfully waited to make sure new channel was created. 1..10 # tests 10 # pass 9 # fail 1 Jim, could you advice how to add more peers into the node SDK testing case? I'm able to create a channel for as usual. I guess there must be something wrong with the new peer I created. Thanks.

greg.haskins (Fri, 19 May 2017 18:12:22 GMT):
@jimthematrix sure thing

greg.haskins (Fri, 19 May 2017 18:12:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vfPwNcbyeMMAYtByJ) @jimthematrix sure thing

greg.haskins (Fri, 19 May 2017 18:12:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rjYKmeHgdroafosNH) @jimthematrix sure thing

greg.haskins (Fri, 19 May 2017 18:14:14 GMT):
@jimthematrix after I posed the question, I began to wonder if it was indeed intentional since you could have partial success

greg.haskins (Fri, 19 May 2017 18:14:29 GMT):
so to that point, what are your thoughts in general?

greg.haskins (Fri, 19 May 2017 18:15:00 GMT):
say I have 4 peers....something like installChaincode() should probably be considered failed if any 1 fails...but even still, I might want to know which failed

greg.haskins (Fri, 19 May 2017 18:15:22 GMT):
something like a regular invoke, 1 failure doesnt necessarily mean total failure

greg.haskins (Fri, 19 May 2017 18:16:09 GMT):
to use PBFT terms, and ignoring the complexities of endorsement policies, etc...if I had 10 nodes and 7 respond with a valid proposal and 3 fail, is this "failure" ?

greg.haskins (Fri, 19 May 2017 18:16:27 GMT):
or should I just forward the 7 good responses to the orderer

greg.haskins (Fri, 19 May 2017 18:17:23 GMT):
anyway, the main point for now is: it perhaps makes sense to resolve() most responses, at least in the case of partial success

greg.haskins (Fri, 19 May 2017 18:18:10 GMT):
I suppose its ok to reject() if its total failure, but it might make sense to retain the errors[] object to the user may report each individual error if they wish

greg.haskins (Fri, 19 May 2017 18:18:10 GMT):
I suppose its ok to reject() if its total failure, but it might make sense to retain the errors[] object so the user may report each individual error if they wish

prashiyn (Fri, 19 May 2017 18:30:29 GMT):
@jimthematrix I am using couchdb keyvaluestore (KVS). Now i need to provide couchdb KVS for both fabric-ca-client as well as the fabric-client. Do they have to be separate databases on couchdb?

rliu (Fri, 19 May 2017 18:32:29 GMT):
@jimthematrix For the question I posted, when I check the log, I saw the following: ------------- 2017-05-19 18:20:18.545 UTC [orderer/common/broadcast] Handle -> DEBU 1df Preprocessing CONFIG_UPDATE 2017-05-19 18:20:18.545 UTC [orderer/configupdate] Process -> DEBU 1e0 Processing channel creation request for channel mychannel2 2017-05-19 18:20:18.546 UTC [orderer/common/broadcast] Handle -> WARN 1e1 Rejecting CONFIG_UPDATE because: Attempted to include a member which is not in the consortium ------------- I modified configtx.yaml to let *Org1 to point to the right MSP definition (i.e. org3 in my network). Is there anything else I need to set up? Thanks.

graphen (Sat, 20 May 2017 11:38:17 GMT):
Has joined the channel.

graphen (Sat, 20 May 2017 11:39:22 GMT):
Hey guys! - I'm running the balance transfer example with the testAPI.sh script file on windows 10 and I'm getting a segmentation fault every time I try and instantiate the chaincode, I can install, enrol and all that just fine but just not instantiate, is there a fix for this?

praveennagpal (Sat, 20 May 2017 12:32:02 GMT):
@jimthematrix Praveens-MacBook-Pro:darwin-amd64 praveennagpal$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 96995e63c11c hyperledger/fabric-peer "peer node start -..." 50 minutes ago Up 50 minutes 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com 37fdd42cb548 hyperledger/fabric-peer "peer node start -..." 50 minutes ago Up 50 minutes 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com 1132c0f70e51 hyperledger/fabric-peer "peer node start -..." 50 minutes ago Up 50 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 48cb6548f5ee hyperledger/fabric-peer "peer node start -..." 50 minutes ago Up 50 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com f86393c7db7e hyperledger/fabric-ca "sh -c 'fabric-ca-..." 50 minutes ago Up 50 minutes 0.0.0.0:8054->7054/tcp ca_peerOrg2 201e9945e63b hyperledger/fabric-ca "sh -c 'fabric-ca-..." 50 minutes ago Up 50 minutes 0.0.0.0:7054->7054/tcp ca_peerOrg1 072665dd6493 hyperledger/fabric-couchdb "tini -- /docker-e..." 52 minutes ago Up 52 minutes 4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp couchdb1 00a6dd2ea71b hyperledger/fabric-couchdb "tini -- /docker-e..." 52 minutes ago Up 52 minutes 4369/tcp, 9100/tcp, 0.0.0.0:8984->5984/tcp couchdb3 c97a74999ec6 hyperledger/fabric-couchdb "tini -- /docker-e..." 52 minutes ago Up 52 minutes 4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp couchdb2 a394a3971059 hyperledger/fabric-couchdb "tini -- /docker-e..." 52 minutes ago Up 52 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb0 55af05e44736 hyperledger/fabric-orderer "orderer" 52 minutes ago Up 52 minutes 0.0.0.0:7050->7050/tcp orderer.example.com

praveennagpal (Sat, 20 May 2017 12:32:25 GMT):
as you can see the docker service is called orderer.example.com

praveennagpal (Sat, 20 May 2017 12:32:55 GMT):
when i goto /fabric-sample/release/darwin-amd64/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls

praveennagpal (Sat, 20 May 2017 12:33:14 GMT):
and then do a openssl x509 -in server.crt -noout -text

praveennagpal (Sat, 20 May 2017 12:33:35 GMT):
I get this certificate output

praveennagpal (Sat, 20 May 2017 12:33:37 GMT):
Praveens-MacBook-Pro:tls praveennagpal$ openssl x509 -in server.crt -noout -text Certificate: Data: Version: 3 (0x2) Serial Number: aa:fd:cd:d1:d0:76:ec:9c:ae:57:b8:33:4b:5d:9e:23 Signature Algorithm: ecdsa-with-SHA256 Issuer: C=US, ST=California, L=San Francisco, O=example.com, CN=ca.example.com Validity Not Before: May 20 11:37:41 2017 GMT Not After : May 18 11:37:41 2027 GMT Subject: C=US, ST=California, L=San Francisco, CN=orderer.example.com Subject Public Key Info: Public Key Algorithm: id-ecPublicKey EC Public Key: pub: 04:9b:18:f6:a6:dc:17:25:73:16:cf:15:16:f1:b6: 92:86:da:3f:d6:61:41:1d:0b:c6:c9:9a:3a:38:65: b2:ad:4f:9a:28:2f:e3:7e:40:2b:3a:23:a5:ca:0b: 39:ea:c7:54:39:bc:fb:f7:54:c9:37:fe:da:7b:b2: 51:03:ea:22:2f ASN1 OID: prime256v1 X509v3 extensions: X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication X509v3 Basic Constraints: critical CA:FALSE X509v3 Authority Key Identifier: keyid:D4:D1:DD:5B:FB:A6:7A:3F:76:F1:4F:70:CB:9A:5E:CF:67:EA:73:A3:35:A9:45:7C:27:39:24:E6:EA:DA:4C:CE X509v3 Subject Alternative Name: DNS:orderer.example.com, DNS:orderer Signature Algorithm: ecdsa-with-SHA256 30:45:02:21:00:cc:5c:ac:de:3b:50:07:1b:c9:e0:94:9f:f5: af:24:11:72:23:b4:e2:62:0c:ea:9a:97:4d:f3:d5:b0:21:97: a3:02:20:3e:0b:ba:fb:25:e1:82:4c:a0:1c:ac:2a:83:87:65: 96:c8:6f:18:bb:1b:f5:de:ac:9d:a1:fa:44:68:26:de:c6

praveennagpal (Sat, 20 May 2017 12:34:10 GMT):
as you can see the CN name is the same as orderer.example.com

praveennagpal (Sat, 20 May 2017 12:37:32 GMT):
i saw on some other channel that json input cannot be used for creating channel through the node sdk

kostas (Sat, 20 May 2017 12:37:38 GMT):
Has joined the channel.

praveennagpal (Sat, 20 May 2017 12:38:03 GMT):
as you can see from my code,, i am using json input in the buildChannelConfig API. Could that be the cause of this issue?

kostas (Sat, 20 May 2017 12:39:04 GMT):
Good morning. I am trying to follow along Greg's alpha challenge, but it seems like I've had an early failure when setting up the SDK client. I've opened up a JIRA here https://jira.hyperledger.org/browse/FAB-4070 pretty sure I'm missing something obvious. @jimthematrix

kostas (Sat, 20 May 2017 12:39:04 GMT):
Good morning. I am trying to follow along Greg's alpha-2 challenge, but it seems like I've had an early failure when setting up the SDK client. I've opened up a JIRA here https://jira.hyperledger.org/browse/FAB-4070 pretty sure I'm missing something obvious. @jimthematrix

kostas (Sat, 20 May 2017 12:39:04 GMT):
Good morning. I am trying to follow along Greg's alpha-2 challenge, but it seems like I've had an early failure when setting up the SDK client. I've opened up a JIRA here: https://jira.hyperledger.org/browse/FAB-4070 -- pretty sure I'm missing something obvious. @jimthematrix

praveennagpal (Sat, 20 May 2017 15:06:46 GMT):
@jimthematrix : Unfortunately, still the same error even without json input and just reading from configuration generated channel tx

jimthematrix (Sat, 20 May 2017 15:14:10 GMT):
@rliu to add a new organization you also need to add that to the consortium and re-generate the orderer genesis block

jimthematrix (Sat, 20 May 2017 15:19:57 GMT):
@greg.haskins yes that's the general thinking behind the design to resolve with an array of responses with possible mixture of success and failure. I was thinking the needed work is to make it easier to see the overall status: total success, partial success, partial failure, total failure.

jimthematrix (Sat, 20 May 2017 15:22:31 GMT):
@prashiyn they can share the same db, in fact in most cases you want the ca client and fabric client to share the same store so the users enrolled and persisted by fabric-ca client and be loaded by fabric client for signing requests

jimthematrix (Sat, 20 May 2017 15:24:00 GMT):
@graphen we are still working on testing the on win 10, please file a bug in jira and feel free to contribute a fix :slight_smile:

jimthematrix (Sat, 20 May 2017 15:53:38 GMT):
@kostas vagrant is not a supported platform for node sdk at this point

jimthematrix (Sat, 20 May 2017 16:00:02 GMT):
@praveennagpal container name is not the same as the service name used for dns lookup. Make sure in your docker-compose.yaml the value of the orderer service is orderer.example.com

prashiyn (Sat, 20 May 2017 19:42:39 GMT):
@jimthematrix while providing policies say 1-of 2 admins, how does one provide the signatures of the admins in config.json. I get the following error on order log `does not satisfy principal: The identity is a member of a different MSP (expected Org1MSP, got OrdererMSP)`

sachikoy (Sun, 21 May 2017 02:06:10 GMT):
Hi, I am trying fabric-sdk-node alpha2 following the instruction at https://github.com/hyperledger/fabric-sdk-node/tree/v1.0.0-alpha2 . When I go through e2e test one step at a time, I get the following error at `node test/integration/e2e/join-channel.js`. Can somebody suggest what could be wrong? ```ok 8 Successfully got the genesis block >>>> getting the org admin looking at file ::/Users/sachikoy/go/src/github.com/hyperledger.latest/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/keystore/5a983ddcbefe52a7f9b8ee5b85a590c3e3a43c4ccd70c7795bec504e7f74848d_sk looking at file ::/Users/sachikoy/go/src/github.com/hyperledger.latest/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/signcerts/Admin@org2.example.com-cert.pem info: [Client.js]: loading user from files info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/hfc-test-kvs_peerOrg2"}} ok 9 Successfully enrolled org:org2 'admin' events.js:160 throw er; // Unhandled 'error' event ^ Error: Connect Failed at ClientDuplexStream._emitStatusIfDone (/Users/sachikoy/go/src/github.com/hyperledger.latest/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19) at ClientDuplexStream._readsDone (/Users/sachikoy/go/src/github.com/hyperledger.latest/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/sachikoy/go/src/github.com/hyperledger.latest/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12) ```

jimthematrix (Sun, 21 May 2017 04:08:20 GMT):
@prashiyn see the test case code here as reference: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/unit/util.js#L160

praveennagpal (Sun, 21 May 2017 05:37:08 GMT):
@jimthematrix the container name is also the same in docker-compose

praveennagpal (Sun, 21 May 2017 05:37:09 GMT):
orderer.example.com: container_name: orderer.example.com image: hyperledger/fabric-orderer environment: - ORDERER_GENERAL_LOGLEVEL=debug - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_GENERAL_GENESISMETHOD=file - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp # enabled TLS - ORDERER_GENERAL_TLS_ENABLED=true - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: orderer volumes: - ../channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls ports: - 7050:7050

FengChen_1982 (Sun, 21 May 2017 08:44:44 GMT):
@Vadim is there any example of Node.js app access the e2e simple network without the CA Server?

paul.sitoh (Sun, 21 May 2017 09:09:30 GMT):
Folks, I am kind of lost with the fabric sdk. My requirement is basically to be able to invoke a chaincode in a particular channel and to read blocks in the channel. What are the steps involved in doing that?

paul.sitoh (Sun, 21 May 2017 09:13:07 GMT):
I am guessing it is a case of mounting a keyvalstore to the SDK, then when you invoke a chaincode function, you just need to call the submit proposal. And fulfil the promises from the proposal. Is that all that is required?

praveennagpal (Sun, 21 May 2017 11:11:02 GMT):
@jimthematrix , I have been able to get it working. Basically, there was a mismatch between the crypto config (orderer tls server certificate) generated by the tool and the one used within the app configuration by the node sdk

praveennagpal (Sun, 21 May 2017 11:26:21 GMT):
@jimthematrix : should the createChannel SDK API check if the channel of the same name exists or not? How can we handle that at the client? We just get a bad_request error on the SDK.

praveennagpal (Sun, 21 May 2017 11:30:15 GMT):
getting this error on the Orderer. 2017-05-21 08:31:37.198 UTC [common/configtx] addToMap -> DEBU 1820 Adding to config map: [Values] /Channel/Consortium 2017-05-21 08:31:37.198 UTC [orderer/common/broadcast] Handle -> WARN 1821 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1 Praveens-MacBook-Pro:GitHub praveennagpal$

jimthematrix (Sun, 21 May 2017 21:14:52 GMT):
@praveennagpal it's a multi-step process - check your peers for existing channels: Client.queryChannels(peer) - check the orderer for an existing channel by name: (pseudo code below) ``` var chain = Client.newChain('name'); chain.addOrderer(orderer); chain.getChannelConfig(); ```

jimthematrix (Sun, 21 May 2017 21:14:52 GMT):
@praveennagpal it's a multi-step process - check your peers for existing channels: Client.queryChannels(peer) - check the orderer for an existing channel by name: (pseudo code below) ``` var chain = client.newChain('name'); chain.addOrderer(orderer); chain.getChannelConfig(); ```

jimthematrix (Sun, 21 May 2017 21:17:30 GMT):
from the result of the `getChannelConfig()` call, which calls the orderer to discover the config of the channel `name`, you *should* be able to tell if the channel already exists or not

jimthematrix (Sun, 21 May 2017 21:18:34 GMT):
I said *should* because I'm not sure what the orderer returns in case the channel doesn't exist or the client has no authorization to access it. the orderer may not tell you *the channel exists but you can't access it* for privacy reasons

jimthematrix (Sun, 21 May 2017 21:19:23 GMT):
you can ask @jyellick what the expected orderer behavior is

rmohta (Sun, 21 May 2017 22:57:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dG9vJw5qKeSLQmwmP) @paul.sitoh Yes. Have a look at [this integration](https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/marbles.js) test from node-sdk.

rmohta (Sun, 21 May 2017 22:57:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dG9vJw5qKeSLQmwmP) @paul.sitoh Have a look at [this integration](https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/marbles.js) test from node-sdk. It should pretty much give your everything you need to get started with your requirement.

rmohta (Sun, 21 May 2017 22:58:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aGyoGkBaKBkxHxT9e) @FengChen_1982 You don't have one, but if you have pre-signed cert and keystore, then you can do that. It would look something like this

rmohta (Sun, 21 May 2017 22:58:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aGyoGkBaKBkxHxT9e) @FengChen_1982 I don't think there is one, but if you have pre-signed cert and keystore, then you can do that. It would look something like this (see unit test cases too)

rmohta (Sun, 21 May 2017 22:59:56 GMT):
```cryptoUtils.importKey(ecert.private_key).then( (privateKeyObj) => { logger.info(`imported key isPrivate: ${privateKeyObj.isPrivate()} and SKI: ${privateKeyObj.getSKI()}.`); if (!privateKeyObj.isPrivate()) { throw new Error(`Failed to import private key of user: ${enroll_id}`); } return self.user.setEnrollment(privateKeyObj, ecert.signed_cert, msp_id, null); }).then( () => { fabricClient.setUserContext(self.user); })``` Hope this helps @FengChen_1982

rmohta (Sun, 21 May 2017 22:59:56 GMT):
```cryptoUtils.importKey(ecert.private_key).then( (privateKeyObj) => { logger.info(`imported key isPrivate: ${privateKeyObj.isPrivate()} and SKI: ${privateKeyObj.getSKI()}.`); if (!privateKeyObj.isPrivate()) { throw new Error(`Failed to import private key of user: ${enroll_id}`); } return self.user.setEnrollment(privateKeyObj, ecert.signed_cert, msp_id, null); `` Hope this helps @FengChen_1982

rmohta (Sun, 21 May 2017 22:59:56 GMT):
```cryptoUtils.importKey(ecert.private_key).then( (privateKeyObj) => return user.setEnrollment(privateKeyObj, ecert.signed_cert, msp_id, null); ) ``` Hope this helps @FengChen_1982

FengChen_1982 (Sun, 21 May 2017 23:23:31 GMT):
OK, thank you so much. I'll try it myself and I can share it after I succeed.

sachikoy (Mon, 22 May 2017 00:15:55 GMT):
Hi, I'm trying to run the fabric-ca-services-test.js but it fails. It seems the reason is fabric-ca returns "404 Not Found". Does anybody have any idea how to fix it? ```$ cd fabric-sdk-node/test/fixtures $ docker-compose up --force-recreate -d $ cd ../.. $ node test/integration/fabric-ca-services-tests.js info: Returning a new winston logger with default configurations TAP version 13 # FabricCAServices: Test enroll() With Dynamic CSR info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"caname":"ca-org1","protocol":"https","hostname":"localhost","port":7054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"https","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/Users/sachikoy/.hfc-key-store"}} not ok 1 Error: Could not parse enrollment response [404 page not found ] as JSON due to error [SyntaxError: Unexpected token p in JSON at position 4] at IncomingMessage. (/Users/sachikoy/go/src/github.com/hyperledger.latest/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:719:14) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) --- operator: fail at: caService.enroll.then (/Users/sachikoy/go/src/github.com/hyperledger.latest/fabric-sdk-node/test/integration/fabric-ca-services-tests.js:95:6) ...```

rmohta (Mon, 22 May 2017 00:46:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7JBTSDX5CstNpzWG6) @sachikoy which version of fabric are you running? I think you're running alpha-1

sachikoy (Mon, 22 May 2017 00:47:12 GMT):
@rmohta I am running alpha2

rmohta (Mon, 22 May 2017 00:47:49 GMT):
from your machine, can you please show the output of `docker ps` @sachikoy

sachikoy (Mon, 22 May 2017 00:49:26 GMT):
@rmohta here it is ```sachikoy-MBA:signcerts sachikoy$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 33e9084c99ec hyperledger/fabric-peer "peer node start -..." About an hour ago Up About an hour 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com cf668c55c114 hyperledger/fabric-peer "peer node start -..." About an hour ago Up About an hour 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.org2.example.com 83953154dd7d hyperledger/fabric-ca "sh -c 'fabric-ca-..." About an hour ago Up About an hour 0.0.0.0:8054->7054/tcp ca_peerOrg2 914952719ef3 hyperledger/fabric-couchdb "tini -- /docker-e..." About an hour ago Up About an hour 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb 602a15450ada hyperledger/fabric-ca "sh -c 'fabric-ca-..." About an hour ago Up About an hour 0.0.0.0:7054->7054/tcp ca_peerOrg1 209f57b2d2c4 hyperledger/fabric-orderer "orderer" About an hour ago Up About an hour 0.0.0.0:7050->7050/tcp orderer.example.com a5701bbbef33 swaggerapi/swagger-editor "sh /usr/share/ngi..." 18 hours ago Up 18 hours 0.0.0.0:8080->8080/tcp epic_bhaskara sachikoy-MBA:signcerts sachikoy$ docker images | grep hyperledger/fabric-ca hyperledger/fabric-ca latest edf198220e32 8 weeks ago 240 MB hyperledger/fabric-ca x86_64-1.0.0-alpha2 edf198220e32 8 weeks ago 240 MB hyperledger/fabric-ca x86_64-1.0.0-snapshot-09107e7 edf198220e32 8 weeks ago 240 MB hyperledger/fabric-ca x86_64-1.0.0-snapshot-4651512 edf198220e32 8 weeks ago 240 MB hyperledger/fabric-ca x86_64-1.0.0-alpha 35311d8617b4 2 months ago 240 MB ```

sachikoy (Mon, 22 May 2017 00:49:58 GMT):
I think it should be running alpha2...

rmohta (Mon, 22 May 2017 00:52:10 GMT):
@sachikoy Yeah. hash for latest and alpha 2 match. So it should be. And these are running on same machine? node and docker? Coz I just ran my app, and it works fine.

sachikoy (Mon, 22 May 2017 00:53:10 GMT):
@rmohta yes, they are running on the same machine. May I see your docker images hash value for fabric-ca to compare with mine?

rmohta (Mon, 22 May 2017 00:53:21 GMT):
@sachikoy a quick check, this is what I see when I do `docker images | grep ca`

rmohta (Mon, 22 May 2017 00:53:43 GMT):
`hyperledger/fabric-ca x86_64-1.0.0-alpha2 86f4e4280690 6 days ago 241.3 MB`. See size

sachikoy (Mon, 22 May 2017 00:55:01 GMT):
@rmohta thank you. Looks like the hash and size are different. Let me try to pull a fresh image from docker hub to try again.

rmohta (Mon, 22 May 2017 00:55:42 GMT):
Yeah. This is the complete output for `docker images --no-trunc | grep fabric-ca` ------------------------------ `hyperledger/fabric-ca x86_64-1.0.0-alpha2 sha256:86f4e42806905640480a77650e4cef5187b108a07e61e2843525eac8ea314777 6 days ago 241.3 MB`

sachikoy (Mon, 22 May 2017 01:22:31 GMT):
@rmohta that fixed the problem. Thank you so much!

paul.sitoh (Mon, 22 May 2017 01:32:00 GMT):
Where is the chaincode for the balance transfer example located?

praveennagpal (Mon, 22 May 2017 02:32:51 GMT):
@jyellick can you tell me what is the orderer response on chain.getChannelConfig() if the channel exists and you can or cannot access it?

rmohta (Mon, 22 May 2017 02:50:48 GMT):
@here Do we always need to use `Admin@` to query on channel stats or get instantiated chain code? When I try to enroll a new user using fabric-ca and then query instantiated cc got the following error... `error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority `

rmohta (Mon, 22 May 2017 02:50:48 GMT):
@here Do we always need to use `Admin@` to query on channel stats or get instantiated chain code? When I try to enroll a new user using fabric-ca and then query instantiated cc got the following error... ```error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority ```

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

greg.haskins (Mon, 22 May 2017 02:53:23 GMT):
@rmohta as far as I know, you need to use a user with admin entitlements for channel creation/join and chaincode install/instantiate

greg.haskins (Mon, 22 May 2017 02:53:43 GMT):
that said, its not the principal name that matters, but rather the entitlement itself

greg.haskins (Mon, 22 May 2017 02:54:07 GMT):
in this case, the entitlement is granted in the MSP structure by having the user's cert installed under admincerts

greg.haskins (Mon, 22 May 2017 02:55:49 GMT):
as far as query on channel-stats or instantiated chaincode, I didnt think you needed admin rights for that

greg.haskins (Mon, 22 May 2017 02:56:08 GMT):
that said, i've been doing all my testing as admin since I cant do much else without it

greg.haskins (Mon, 22 May 2017 02:56:18 GMT):
so i might have missed this limitation

rmohta (Mon, 22 May 2017 02:56:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6vHdPAvsycsYE8tKR) @greg.haskins How would I request that via caService?

greg.haskins (Mon, 22 May 2017 02:56:37 GMT):
@rmohta you cannot

greg.haskins (Mon, 22 May 2017 02:56:48 GMT):
at least, not currently

greg.haskins (Mon, 22 May 2017 02:57:28 GMT):
right now, ca-service is not really capable for granting ecerts with admin entitlements

greg.haskins (Mon, 22 May 2017 02:57:39 GMT):
(IIUC)

greg.haskins (Mon, 22 May 2017 02:58:11 GMT):
(actually, because of this and a few other limitations like like of tcerts, I dont even use ca-service any more

greg.haskins (Mon, 22 May 2017 02:58:11 GMT):
(actually, because of this and a few other limitations like lack of tcerts, I dont even use ca-service any more

rmohta (Mon, 22 May 2017 02:58:19 GMT):
@greg.haskins But looking at the error (thinking again) - I am not sure if this is anywhere related to admin certs. Our app was working fine (atleast basic stuff) for alpha-1 image. Now trying to see what has changed with alpa-2.

greg.haskins (Mon, 22 May 2017 02:58:47 GMT):
yes, you do have a point there

greg.haskins (Mon, 22 May 2017 02:59:00 GMT):
it looks like you have a discrepancy in your MSP domains, not an entitlement problem

rmohta (Mon, 22 May 2017 02:59:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7cThijL7ruBwHMyur) @greg.haskins Agreed. And that's our plan too. But as part of a bootstrap library for my unit, we would like to give both the capabilities.

greg.haskins (Mon, 22 May 2017 02:59:39 GMT):
if I had to guess, your CA is not in the same MSP as the peer

greg.haskins (Mon, 22 May 2017 03:00:10 GMT):
(also, make sure you clean out any of the SDK caches like ~/.hfc-keystore

greg.haskins (Mon, 22 May 2017 03:00:16 GMT):
taht could be caching an old ecert

rmohta (Mon, 22 May 2017 03:00:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BfjYP5HeQPwPZHuSh) @greg.haskins Yeah. This time we generated test certs using cryptogen. And you have a good point. How can I validate that (ca MSP and peer MSP)?

greg.haskins (Mon, 22 May 2017 03:01:05 GMT):
I would just look at each nodes cert with "openssl x509 -in path/to/cert -text"

greg.haskins (Mon, 22 May 2017 03:01:29 GMT):
you should see that the peer was signed by the CA's cert with matching signature

rmohta (Mon, 22 May 2017 03:02:06 GMT):
ah gotcha @greg.haskins . I thought there was a shortcut of somekind. Let me do that now

greg.haskins (Mon, 22 May 2017 03:02:30 GMT):
there might be...but thats how I do it

greg.haskins (Mon, 22 May 2017 03:02:46 GMT):
have to run, good luck

rmohta (Mon, 22 May 2017 03:11:36 GMT):
@greg.haskins You were right. For some reason in my docker-compose file I had it as `ca/peerOrg1-cert.pem`, whereas it should have been `ca/ca.org1.example.com-cert.pem`. It's a left over from our previous test. Thank You!!!

rmohta (Mon, 22 May 2017 03:13:07 GMT):
This time a new error ```error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown```

rmohta (Mon, 22 May 2017 03:13:07 GMT):
This time a new error. Interestingly this happened, when I tried to query some information from a peer who hasn't yet joined the channel. :joy: ```error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown```

rmohta (Mon, 22 May 2017 03:27:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mGcHaWLzCocpNQH9K) @greg.haskins Looks like, to get chaincode and others we need admin certs. Error message: ```error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Authorization for GETCHAINCODES on channel getchaincodes 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] ```

JasonD (Mon, 22 May 2017 07:48:12 GMT):
when I try to run `node test/integration/e2e.js` in tag `alpha2`, I get this err `Error: Cannot find module 'fabric-client/lib/Block.js'`, and I'm pretty sure I had run `gulp ca`

JasonD (Mon, 22 May 2017 07:49:46 GMT):
so I add `'fabric-client/lib/*',` in `fabric-sdk-node/build/tasks/ca.js`, then this error fix. but got another error `TypeError: Cannot read property 'ns' of null`

JasonD (Mon, 22 May 2017 07:50:01 GMT):
`at Object.load (/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/index.js:124:28)`

JasonD (Mon, 22 May 2017 07:56:20 GMT):
oh, turns out I should re-install node_modules

mbwhite (Mon, 22 May 2017 08:50:35 GMT):
Hi - I've a commit I'd like to push to fabric-client for a small fix... I've read the contributing notes - but I'm afraid I'm unclear on the process to get this built and approved. ANy guidance much appreciated

rmohta (Mon, 22 May 2017 13:24:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bqoHx2kdAZeZaDAnt) @mbwhite Any particular step I can help you clarify? Also is the fix for an open JIRA ticket or a new one to be created?

mbwhite (Mon, 22 May 2017 13:39:39 GMT):
Hello - it's an open JIRA, issue.. I've clone the fabric-client repo, and am happy with the change... what I need to do now is 'push this back'... there's mention of review, and getting a build run in Jenkins,

mbwhite (Mon, 22 May 2017 13:39:59 GMT):
But I can't see any workflow documented as how to the steps to get a fix in

jyellick (Mon, 22 May 2017 13:43:42 GMT):
> praveennagpal 10:32 PM @jyellick can you tell me what is the orderer response on chain.getChannelConfig() if the channel exists and you can or cannot access it? @praveennagpal if this is the an API for the node SDK, someone else on this channel, like @jimthematrix should be better able to answer you. From an orderer perspective, a `Deliver` for a channel which does not exist produces a 404 Not Found, for a channel which the caller does not have access, a 403 Forbidden, and on success, the normal block stream reply.

rmohta (Mon, 22 May 2017 14:44:59 GMT):
@jimthematrix @here Do you know which file has eventHubConnect function? jsdoc for connect() in EventHub.js talks about default eventHub, but I'm unable to find that. ``` /** * Establishes connection with peer event source

* Note: Only use this if creating your own EventHub. The chain * class creates a default eventHub that most Node clients can * use (see eventHubConnect, eventHubDisconnect and getEventHub). */ connect() { ```

rmohta (Mon, 22 May 2017 14:49:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kSNaNhGNDTv4tfSyQ) @mbwhite Where do you see this?

rmohta (Mon, 22 May 2017 14:49:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kSNaNhGNDTv4tfSyQ) @mbwhite Where do you see that step?

ericmvaughn (Mon, 22 May 2017 14:50:16 GMT):
I have a question about the relationship between the Client and User objects. Currently our app has one Client instance and multiple User instances and we use setUserContext or getUserContext to switch between users. Is this OK or is the expectation that each Client instance has only one User instance?

mbwhite (Mon, 22 May 2017 14:51:54 GMT):
@rmohta well it's a case of now that I've got a local change .. what do I do with it? In other projects I'd push the changes to my own fork then create a PR to the main repo

mbwhite (Mon, 22 May 2017 14:52:07 GMT):
What's the established practice here?

rmohta (Mon, 22 May 2017 14:53:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=J2YaQwvPRhMmbdEAp) @ericmvaughn Yes. I would see that way i.e. each chain is for one user context. A chain is the view of the channel for that user. If you have multiple users for the same channel, then please create multiple instance of chain and initialize them appropriately.

rmohta (Mon, 22 May 2017 14:55:08 GMT):
@ericmvaughn Having said that (^^^), I don't see any problem in the code with switching user context - but it would be much easier for you to have multiple chain instance. may be go with service based instances for different roles of user?

rmohta (Mon, 22 May 2017 14:56:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kGK9sziop6uKeDyYZ) @mbwhite [Here](https://github.com/hyperledger/fabric-sdk-node) it's listed few steps about pushing a change. I would start by creating a linux foundation id and login to JIRA and Gerrit with that. Then assign the ticket for myself.

rmohta (Mon, 22 May 2017 14:56:39 GMT):
All code changes are to be pushed to gerrit

ericmvaughn (Mon, 22 May 2017 15:00:02 GMT):
@rmohta I was just thinking about the Client but you make a good point about the Chain as well. So would you suggest each user having their own Client and Chain?

rmohta (Mon, 22 May 2017 15:29:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8Rn9WDxQxtpDrDs9d) @ericmvaughn Chain - yes. Client - not necessarily. I view Client as a ServiceFactory class. As long as you use unique name for your chain, a single client for your app should work. The most common `unique name` is channel id, but in your case - you can build a unique name based on channel id + cc name + user id if required.

ericmvaughn (Mon, 22 May 2017 15:37:45 GMT):
@rmohta thanks for the help

pmullaney (Mon, 22 May 2017 17:58:53 GMT):
@rmohta : That comment originally came from the v0.6 eventhub in which there was a default eventhub instance as a member of the chain. Last I knew, there was a jira task for added this back to chain but I don't think it has been completed. @bretharrison may know the status

bretharrison (Mon, 22 May 2017 18:01:48 GMT):
@rmohta That comment has been removed

pmullaney (Mon, 22 May 2017 18:02:57 GMT):
@bretharrison : has the notion of a default eventhub also been dropped permanently?

bretharrison (Mon, 22 May 2017 18:03:22 GMT):
yes for 1.0

greg.haskins (Mon, 22 May 2017 18:45:20 GMT):
posting this here since it would be closely tied to the node-sdk: https://lists.hyperledger.org/pipermail/hyperledger-fabric/2017-May/001033.html

rohitbordia (Mon, 22 May 2017 21:11:41 GMT):
Has joined the channel.

RezwanKabir (Mon, 22 May 2017 22:09:35 GMT):
can someone confirm me that latest sdk is runnning without error. When i run e2e , everything works perfectly except in invoke command. In invoke command it says admin key for org1 was not found ... did u get this type of error ?

JasonD (Tue, 23 May 2017 00:59:14 GMT):
is there any document explain how to config channel, policies, etc in this file: https://github.com/hyperledger/fabric-sdk-node/blob/v1.0.0-alpha2/test/integration/e2e/create-channel.js

JasonD (Tue, 23 May 2017 01:02:15 GMT):
for example, what does this mean? ``` policy: { '0-of': [] } ```

prashiyn (Tue, 23 May 2017 04:42:44 GMT):
@jasonD lookup http://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html?highlight=endorsment%20policy#

paul.sitoh (Tue, 23 May 2017 05:10:37 GMT):
Folks, is there anyway of setting the fabric-ca-client key value store to one different from the default one? There is a setting for fabric-client sdk but not for the ca.

paul.sitoh (Tue, 23 May 2017 05:10:37 GMT):
Folks, is there anyway of setting the fabric-ca-client key value store to one different from the default $HOME/.hfc-key-value-store one? There is a setting for fabric-client sdk but not for the ca.

paul.sitoh (Tue, 23 May 2017 05:38:02 GMT):
I see there is this method static newCryptoKeyStore (KVSImplClass, opts) { return utils.newCryptoKeyStore(KVSImplClass, opts); } in the fabic-ca-client but what exactly is KVSImplClass?

praveennagpal (Tue, 23 May 2017 07:00:19 GMT):
@paul.sitoh you can do client.newCryptoSuite(keyStoreOpts);

praveennagpal (Tue, 23 May 2017 07:01:15 GMT):
wherein you can send couchdb options if you want to store the information in it

paul.sitoh (Tue, 23 May 2017 07:02:27 GMT):
@praveennagpal is that method for fabic-client or fabric-ca-client?

paul.sitoh (Tue, 23 May 2017 07:03:04 GMT):
When you do enroll with fabric-ca-client it automatically create a default keyvalstore but I want it to be in another location

paul.sitoh (Tue, 23 May 2017 07:03:11 GMT):
How do I do that?

paul.sitoh (Tue, 23 May 2017 07:03:56 GMT):
In any case what is the data type for keyStoreOpts?

praveennagpal (Tue, 23 May 2017 07:19:08 GMT):
@paul.sitoh this is a method on fabric-client. Do you really need to use fabric-ca-client as the sdk can talk directly to fabric-ca? Or are you talking about the Fabric CA client implementation in node sdk itself?

paul.sitoh (Tue, 23 May 2017 07:19:31 GMT):
How do you enroll user?

paul.sitoh (Tue, 23 May 2017 07:19:39 GMT):
with fabric-client?

paul.sitoh (Tue, 23 May 2017 07:20:04 GMT):
Enrollment is in fabric-ca-client sdk

paul.sitoh (Tue, 23 May 2017 07:21:27 GMT):
Without enrollment how to you do client operations?

praveennagpal (Tue, 23 May 2017 07:24:21 GMT):
@paul.sitoh yes that is the sdk bit I meant..currently I am using the certificates generated by cryptoconfig and storing it in the local MSP directory

praveennagpal (Tue, 23 May 2017 07:24:26 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/fabric-ca-services-tests.js

praveennagpal (Tue, 23 May 2017 07:25:06 GMT):
the above tests gives the sdk steps for enrolling

praveennagpal (Tue, 23 May 2017 07:25:58 GMT):
the fabric-ca docker image comes with the fabric-ca-server and client, so I was checking if that fabric client is not being used

tom.appleyard (Tue, 23 May 2017 07:33:13 GMT):
Hey all, I'm trying to create a channel with hfc but I'm getting this error: ``` error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST Error: BAD_REQUEST at ClientDuplexStream. (/home/ibmstudent/workspace/hfc-samples/node_modules/fabric-client/lib/Orderer.js:95:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/ibmstudent/workspace/hfc-samples/node_modules/grpc/src/node/src/client.js:245:14) (node:16227) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: failed to initialize the channel ``` On the orderer: ``` 2017-05-23 07:26:35.937 UTC [orderer/common/broadcast] Handle -> WARN 007 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Values] /Channel/Application/Org2MSP/MSP to version 0, but key is at version 0 2017-05-23 07:29:18.300 UTC [orderer/common/broadcast] Handle -> WARN 008 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Policy] /Channel/Admins to version 0, but key is at version 0 ``` Has anyone seen this before?

tom.appleyard (Tue, 23 May 2017 07:33:13 GMT):
Hey all, I'm trying to create a channel with `chain.createChannel(createChannelRequest)` but I'm getting this error: ``` error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST Error: BAD_REQUEST at ClientDuplexStream. (/home/ibmstudent/workspace/hfc-samples/node_modules/fabric-client/lib/Orderer.js:95:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/ibmstudent/workspace/hfc-samples/node_modules/grpc/src/node/src/client.js:245:14) (node:16227) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: failed to initialize the channel ``` On the orderer: ``` 2017-05-23 07:26:35.937 UTC [orderer/common/broadcast] Handle -> WARN 007 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Values] /Channel/Application/Org2MSP/MSP to version 0, but key is at version 0 2017-05-23 07:29:18.300 UTC [orderer/common/broadcast] Handle -> WARN 008 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Policy] /Channel/Admins to version 0, but key is at version 0 ``` Has anyone seen this before?

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

tom.appleyard (Tue, 23 May 2017 08:13:49 GMT):
Fixed - just restart your CA, this is an issue with repeatedly requesting someone be enrolled

tom.appleyard (Tue, 23 May 2017 08:14:39 GMT):
for this: ```// Build the request object let request = { targets: targets, txId: tx_id, nonce: nonce }; // Send a join channel proposal to some peers return chain.joinChannel(request);``` Why does the `txId` have to be supplied, surely this is something that Hyperledger should generate for me?

chenxuan (Tue, 23 May 2017 08:33:48 GMT):
Has joined the channel.

houssemchebbi (Tue, 23 May 2017 09:31:14 GMT):
hello ! i have this error when i try to enroll admin / adminpw ... does any one encounter this error before or have a solution plz !! "Failed to enroll user 'admin'. ReferenceError: ca_client is not defined"

alfa (Tue, 23 May 2017 10:20:57 GMT):
Has joined the channel.

chenxuan (Tue, 23 May 2017 10:56:26 GMT):
Cannot find module '/home/tinkpad/jsprojects/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/extension_binary/grpc_node.node'

NiketYende (Tue, 23 May 2017 11:22:06 GMT):
@jimthematrix @bretharrison @rliu Hi, i am facing some issue while trying to invoke a transaction using node-sdk.

NiketYende (Tue, 23 May 2017 11:23:29 GMT):

Message Attachments

NiketYende (Tue, 23 May 2017 11:23:34 GMT):
Here is the schenario: I am able to create 2 channels. Add peer0,peer1 to channel1 & peer0,peer2 to channel 2. The problem i face is when i try to invoke a transaction using peer1 on channel1. The same peer1 can be used to install and instantiate the chaincode. I am able to use peer0, peer2 to invoke transactions on channel2. Problem faced: Error while invoking transaction using peer1 for channel1.

NiketYende (Tue, 23 May 2017 11:30:48 GMT):
Error message from the orderer log: {"log":"\u001b[36m2017-05-23 10:18:43.334 UTC [msp/identity] newIdentity -\u003e DEBU 1185\u001b[0m Creating identity instance for ID \u0026{Org2MSP de598a1db76a172d185f9f792c867698f824dd1d9c06baa42291d1e31f60ef71}\n","stream":"stderr","time":"2017-05-23T10:18:43.335659464Z"} {"log":"\u001b[31m2017-05-23 10:18:43.334 UTC [cauthdsl] func2 -\u003e ERRO 1186\u001b[0m Principal deserialization failed: (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority) for identity

chenxuan (Tue, 23 May 2017 11:39:39 GMT):
貌似说的是证书不对 @NiketYende

bretharrison (Tue, 23 May 2017 11:52:57 GMT):
@NiketYende Check the user signing the transaction. Order says it is in Org2MSP, is Peer1 in Org2 ?

bretharrison (Tue, 23 May 2017 11:52:57 GMT):
@NiketYende Check the user signing the transaction. What org is the Orderer in ?, the user submitting the transaction must be allowed by the Orderer

NiketYende (Tue, 23 May 2017 11:55:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=F4rCiaBnjKJFf3yH6) @bretharrison We have used a system in which, each org has one peer. So org2 also has one peer called peer0. similar to other 2 orgs.

habpygo (Tue, 23 May 2017 12:15:56 GMT):
Hello - why are the links in the doc https://fabric-sdk-node.github.io/tutorial-node-sdk-guide.html not working? Anyone facing the same issue?

habpygo (Tue, 23 May 2017 12:18:26 GMT):
Ah... this one does https://fabric-sdk-node.readthedocs.io/en/latest/node-sdk-guide/

MartinC (Tue, 23 May 2017 13:00:10 GMT):
Thanks to those of you that have provided feedback on the REST API design I have been working on. I have incorporated that feedback and updated the design. The design can be found in the same place, https://docs.google.com/document/d/1Kafw06IwtBbKFrUm8Hnwk8XYW7SyuqVbWad5VrPmvb8/edit?usp=sharing If you have any more feedback please comment in the document, I am especially interested in whether the REST endpoints I am proposing are the right approach. Thanks

14gracel (Tue, 23 May 2017 13:22:57 GMT):
Hi All, currently seeing an interesting bug when listening to events. ``` eventHub.registerChaincodeEvent('ccid', 'composer', (event) => { // payload is a string let payload = event.payload.toString('utf8') // ev is a string let ev = JSON.parse(event); // evObj is an Object let evObj = JSON.parse(ev) this.emit('events', evObj)); }); ``` The payload emitted from the chaincode is JSON.stringify([Obj]) as a Byte array Is there any reason that I would have to parse the payload twice?

14gracel (Tue, 23 May 2017 13:22:57 GMT):
Hi All, currently seeing an interesting bug when listening to events. ``` eventHub.registerChaincodeEvent('ccid', 'composer', (event) => { // payload is a string let payload = event.payload.toString('utf8') // ev is a string let ev = JSON.parse(event); // evObj is an Object let evObj = JSON.parse(ev) }); ``` The payload emitted from the chaincode is JSON.stringify([Obj]) as a Byte array Is there any reason that I would have to parse the payload twice?

tom.appleyard (Tue, 23 May 2017 14:56:23 GMT):
Hey all, I'm trying to instantiate some chaincode with the following: ``` let nonce = utils.getNonce(); let tx_id = chain.buildTransactionID(nonce, user); let instantiateChaincodeRequest = { chaincodePath: 'example.com/marbles', chaincodeId: 'marbles', chaincodeVersion: '1.0', chainId: 'mychannel', txId: tx_id, nonce: nonce }; // let instantiateChaincodeRequest = { // chaincodePath: 'example.com/strings', // chaincodeId: 'strings', // chaincodeVersion: '1.0', // chainId: 'mychannel', // txId: tx_id, // nonce: nonce // }; return chain.sendInstantiateProposal(instantiateChaincodeRequest);``` Unfortunately when I do this it just times out - does anyone know why that might be?

tom.appleyard (Tue, 23 May 2017 14:56:23 GMT):
Hey all, I'm trying to instantiate some chaincode with the following: ``` let nonce = utils.getNonce(); let tx_id = chain.buildTransactionID(nonce, user); let instantiateChaincodeRequest = { chaincodePath: 'example.com/marbles', chaincodeId: 'marbles', chaincodeVersion: '1.0', chainId: 'mychannel', txId: tx_id, nonce: nonce }; return chain.sendInstantiateProposal(instantiateChaincodeRequest);``` Unfortunately when I do this it just times out - does anyone know why that might be?

jimthematrix (Tue, 23 May 2017 15:05:15 GMT):
@JasonD reading the code in the sample app (fabric-sdk-node/examples/balance-transfer) or end2end tests (test/integration/e2e) is the best way at this point. doc is still being worked on. would welcome any contributions

paul.sitoh (Tue, 23 May 2017 15:25:40 GMT):
@jimthematrix It might be useful if to create another much more cut down example, to show fabric-client interaction with only one peer. In other make that example, like a very simplistic glorified database -- reading and writing a piece of data to one peer. That way you can focus on demonstrating the steps involved in, installing, instantiating, invoking, and querying a chaincode. Without the extra stuff like switching between peers to distract from learning about the SDK. By all means keep the Balance Transfer but include a simple example.

paul.sitoh (Tue, 23 May 2017 15:25:40 GMT):
@jimthematrix It might be useful if to create another much more cut down example, to show fabric-client interaction with only one peer. In other words, make that example, like a very simplistic glorified database -- reading and writing a piece of data to one peer. That way you can focus on demonstrating the steps involved in, installing, instantiating, invoking, and querying a chaincode. Without the extra stuff like switching between peers to distract from learning about the SDK. By all means keep the Balance Transfer but include a simple example.

paul.sitoh (Tue, 23 May 2017 15:27:08 GMT):
@jimthematrix by the way how do you change the key-store-value path in fabric-ca-client? It appears you can only do it in fabric-client. I can't tell from the unit test.

jimthematrix (Tue, 23 May 2017 15:36:12 GMT):
@paul.sitoh appreciate the input. would you mind opening a work item in JIRA (https://jira.hyperledger.org), also any contributions welcome so feel free to assign it to yourself to work on it ;-)

jimthematrix (Tue, 23 May 2017 15:47:23 GMT):
by `key-store-value` do you mean the state store (where the User objects are saved), or the crypto key store (where private keys are saved)?

thakkarparth007 (Tue, 23 May 2017 15:48:34 GMT):
Has joined the channel.

habpygo (Tue, 23 May 2017 15:49:25 GMT):
For what it is worth. Just ran `node test/integration/e2e.js` against `x86_64-1.0.0-alpha2` images (thus without `make clean` and then `make docker` from the `$GOPATH/src/github.com/hyperledger/fabric` directory) and all went well. Last output was ``` ok 82 Successfully verified transient map values 1..82 # tests 82 # pass 82 # ok ```

thakkarparth007 (Tue, 23 May 2017 15:50:39 GMT):
Hello guys, I'm trying to write code to invoke a chaincode using the nodesdk. I'd like to know whether the SDK automatically verifies if the response by a Peer has a valid signature or not.

thakkarparth007 (Tue, 23 May 2017 15:51:01 GMT):
That is, if does the promise returned by Peer.sendProposal() fail if the signature is not valid?

jimthematrix (Tue, 23 May 2017 15:52:33 GMT):
@thakkarparth007 it does validate the signature against the endorser certificate in the response object. what it does NOT do though is it does not validate the certificate itself against the trust chain leading to a trusted CA root. it simply trusts the endorser certificate

jimthematrix (Tue, 23 May 2017 15:53:19 GMT):
however, the promise will always resolve()

thakkarparth007 (Tue, 23 May 2017 15:53:28 GMT):
Oh okay. Can you point me to the code that does that? I got a bit lost while tracing through sendProposal

thakkarparth007 (Tue, 23 May 2017 15:53:42 GMT):
The file and or the method name or anything would work

jimthematrix (Tue, 23 May 2017 15:54:56 GMT):
verify signatures: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/e2eUtils.js#L569

jimthematrix (Tue, 23 May 2017 15:55:11 GMT):
compare endorsement results: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/e2eUtils.js#L581

thakkarparth007 (Tue, 23 May 2017 15:55:46 GMT):
Oh, so I have to call verifyProposal to verify if the signature is valid.

thakkarparth007 (Tue, 23 May 2017 15:56:01 GMT):
That's what I meant by asking if SDK does it automatically

thakkarparth007 (Tue, 23 May 2017 15:56:44 GMT):
Thank you. This was helpful!

thakkarparth007 (Tue, 23 May 2017 15:56:51 GMT):
Also, how would I go about verifying if the certificate is signed by a trusted CA?

thakkarparth007 (Tue, 23 May 2017 15:57:07 GMT):
Is there some example code for that in the repo?

jimthematrix (Tue, 23 May 2017 16:03:18 GMT):
no example in the repo. it's rather complex doing this with node.js. i did some research but couldn't find anything that would work with node.js 6.9.x. pki.js v2.0 provides a CertificateChainValidationEngine that has good support for that but it's built with ES6 language features that are not supported by our current node.js version (6.9.x)

jimthematrix (Tue, 23 May 2017 16:04:02 GMT):
feel free to add comments to https://jira.hyperledger.org/browse/FAB-3202

thakkarparth007 (Tue, 23 May 2017 16:07:45 GMT):
I just looked through the docs, and the verifyProposal docs claim to verify if the signer is trusted: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Chain.js#L1561

thakkarparth007 (Tue, 23 May 2017 16:07:54 GMT):
I haven't gone through the code yet though

thakkarparth007 (Tue, 23 May 2017 16:10:28 GMT):
It seems to do that. Though I don't have a deep understanding of the codebase, but I guess this line does it: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Chain.js#L1594

thakkarparth007 (Tue, 23 May 2017 16:11:44 GMT):
https://jira.hyperledger.org/browse/FAB-3202 Ah, nvm, I just saw this.

thakkarparth007 (Tue, 23 May 2017 16:17:46 GMT):
Shouldn't the documentation of verifyProposal be updated then?

jimthematrix (Tue, 23 May 2017 17:09:05 GMT):
you are right, should really remove this: ``` * - validate that the proposal endorsement's signer is trusted

tom.appleyard (Tue, 23 May 2017 17:09:11 GMT):
Has anyone seen this error before: ``` error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN error: [Chain.js]: joinChannel - Failed Proposal. Error: Error: Invalid results returned ::FORBIDDEN ```

paul.sitoh (Wed, 24 May 2017 01:37:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6b2wtnqWr3hkSTX3K) @jimthematrix I am happy to contribute but unfortunately, I have not been able to get clearance from job yet.

paul.sitoh (Wed, 24 May 2017 01:43:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hxhusqb28Q2Mrkvid) @jimthematrix Yes indeed. At the moment, I can see several places to define where your private keys are can be stored by all in fabric-client. There is one in fabric-ca-client. That component is needed to register and enroll user. There is one method to so call define location of private keystore but it is unclear what kind of argument you need to provide. The only problem with fabric-ca-client is that it by default put the key store in home directory. So unlike v0.6 there seemed to require several different setting to define key store. Question is which is which?

JasonD (Wed, 24 May 2017 01:50:05 GMT):
anyone seen this error: when I try to invoke chaincode, proposal response was good, but then I get this error code = `ENDORSEMENT_POLICY_FAILURE` ? what does ENDORSEMENT_POLICY_FAILURE mean, how to fix it ?

paul.sitoh (Wed, 24 May 2017 02:11:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hxhusqb28Q2Mrkvid) @jimthematrix I am not aware that there is also user object store? Do we need a separate folder for that too?

JasonD (Wed, 24 May 2017 02:14:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JTYmY9wJiCAhhocBC) @JasonD `Failed to locate an MSP instance matching the endorser identity's orgainization Org1MSP` how to fix it ?

jimthematrix (Wed, 24 May 2017 03:08:51 GMT):
@JasonD the error happens when the SDK attempts to deserialize the endorser identity (certificate). it needs an MSP corresponding to the mspId accompanying the cert, which is Org1MSP in your case. the reason it is not found is could be because your chain/channel instance has not been properly initialized. you need to call `initialize()` first

jimthematrix (Wed, 24 May 2017 03:10:12 GMT):
@paul.sitoh I just put out a Change Request to address your concern: https://gerrit.hyperledger.org/r/#/c/9749/, corresponding JIRA: https://jira.hyperledger.org/browse/FAB-4131

paul.sitoh (Wed, 24 May 2017 03:12:08 GMT):
@jimthematrix thanks. I was trying to add my request but have been having difficulty accessing JIRA.

JasonD (Wed, 24 May 2017 03:18:19 GMT):
@jimthematrix thanks, that's the reason. right now the proposal responses are all good but I still get this error `ENDORSEMENT_POLICY_FAILURE`

jimthematrix (Wed, 24 May 2017 03:21:29 GMT):
@JasonD did you specify a custom endorsement policy when you instantiate the chaincode? if not, then the default policy is only one valid signature is required among the endorsers that you sent the transaction proposal to. a failure with the default policy means none of your endorsers approved the transaction

jimthematrix (Wed, 24 May 2017 03:22:02 GMT):
please check peer logs and see if any errors related to rejecting the proposal

JasonD (Wed, 24 May 2017 03:47:49 GMT):
@jimthematrix already specify endorsement policy. and when I check logs, I found this `VSCC check failed for transaction txid=09b95a7bfcc23a1ce9d066cd59173f393e50b67a9f8b777db826ab835c1fbcf9, e rror VSCC error: policy evaluation failed, err Failed to authenticate policy`

JasonD (Wed, 24 May 2017 03:47:55 GMT):
``` VSCC check failed for transaction txid=09b95a7bfcc23a1ce9d066cd59173f393e50b67a9f8b777db826ab835c1fbcf9, e rror VSCC error: policy evaluation failed, err Failed to authenticate policy ```

chenxuan (Wed, 24 May 2017 05:47:49 GMT):
peer0.org2.example.com | Error: unknown flag: --peer-defaultchain

praveennagpal (Wed, 24 May 2017 05:53:11 GMT):
@jimthematrix for a simple creation of genesis block, I see the configtxgen tool uses a profile for 2 organisations channel and an orderer. Do we need to know the organisations in the consortium upfront for creating the channel configuration file? For starting up the network, can we just start off with a single organisation channel and the other organisation peers can join the channel through the sdk?

praveennagpal (Wed, 24 May 2017 06:26:26 GMT):
@jimthematrix I am getting an error on trying to initialise chaincode although the chaincode got installed properly.

praveennagpal (Wed, 24 May 2017 06:26:27 GMT):
I20170524-11:47:22.514(5.5)? info: [FabricHelper]: connected to event hub I20170524-11:47:22.515(5.5)? info: [FabricHelper]: initializing chain W20170524-11:47:22.564(5.5)? (STDERR) error: [Orderer.js]: sendDeliver - on error code 14: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:229:12)" W20170524-11:47:22.619(5.5)? (STDERR) error: [Chain.js]: getChannelConfig - Failed Proposal. Error: Error: SERVICE_UNAVAILABLE W20170524-11:47:22.620(5.5)? (STDERR) at ClientDuplexStream. (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/lib/Orderer.js:234:23) W20170524-11:47:22.623(5.5)? (STDERR) at emitOne (events.js:77:13) W20170524-11:47:22.624(5.5)? (STDERR) at ClientDuplexStream.emit (events.js:169:7) W20170524-11:47:22.624(5.5)? (STDERR) at ClientDuplexStream._emitStatusIfDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:204:12) W20170524-11:47:22.625(5.5)? (STDERR) at ClientDuplexStream._readsDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8) W20170524-11:47:22.625(5.5)? (STDERR) at readCallback (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:22

praveennagpal (Wed, 24 May 2017 06:27:36 GMT):
on the orderer I see this error: 2017-05-24 06:23:48.429 UTC [grpc] Printf -> DEBU e44 transport: http2Server.HandleStreams failed to receive the preface from client: EOF 2017-05-24 06:23:54.893 UTC [grpc] Printf -> DEBU e45 transport: http2Server.HandleStreams failed to receive the preface from client: EOF

JasonD (Wed, 24 May 2017 07:24:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CHbFkbCRGz8HXSs3h) @JasonD right now I had to change policy to `0-of` to avoid this issue

praveennagpal (Wed, 24 May 2017 07:35:48 GMT):
Also, I am getting the same error when I call chain.getGenesisBlock (request) or whether I try do chain.initialize()

praveennagpal (Wed, 24 May 2017 07:35:48 GMT):
Also, I am getting the same error when I call chain.getGenesisBlock (request) or when I try do chain.initialize()

praveennagpal (Wed, 24 May 2017 07:35:49 GMT):
W20170524-13:01:48.492(5.5)? (STDERR) error: [Orderer.js]: sendDeliver - on error code 14: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:229:12)" W20170524-13:01:48.495(5.5)? (STDERR) error: [FabricHelper]: Error: SERVICE_UNAVAILABLE W20170524-13:01:48.495(5.5)? (STDERR) at ClientDuplexStream. (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/lib/Orderer.js:234:23)

JasonD (Wed, 24 May 2017 08:07:23 GMT):
@jimthematrix I mount data dir to docker like this `peer0.org1.example.com: volumes: - ./data/volumes/hyperledger/peer0org1/:/var/hyperledger/`, for ca0, ca1, peer0.org1, peer0.org2. So when the network down, we wouldn't lost data. But then after I restart the hyperledger network, I noticed that there are error messages in logs:

JasonD (Wed, 24 May 2017 08:07:35 GMT):
``` orderer.example.com | 2017-05-24 08:03:52.770 UTC [orderer/common/deliver] Handle -> DEBU 22d Client request for channel mychannel not found peer0.org1.example.com | 2017-05-24 08:03:52.770 UTC [blocksProvider] DeliverBlocks -> WARN 3cf Got error &{NOT_FOUND} ```

JasonD (Wed, 24 May 2017 08:09:41 GMT):
question 1: how to fix this error message ? question 2: after network restart, how to restart my chaincode container, what's the right way to do ?

JasonD (Wed, 24 May 2017 08:12:51 GMT):
about question 2, I tried this `docker run -i -t MY_CC_IMAGE` but the container exited immediately

gcreddy (Wed, 24 May 2017 08:16:00 GMT):
Has joined the channel.

JasonD (Wed, 24 May 2017 08:17:26 GMT):
then I tried instantiate chaincode using sdk, got this error `[Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND`

JasonD (Wed, 24 May 2017 08:17:52 GMT):
so what's the right way ?

praveennagpal (Wed, 24 May 2017 08:41:01 GMT):
I am kind of stuck as I am unable to join channel or instantiate chaincode through node sdk due to this error. Has anybody seen this before or know its root cause?

JasonD (Wed, 24 May 2017 09:24:28 GMT):
turns out I have to upgrade to restart my chaincode container. got error `[Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: chaincode exists` when I tried to instantiate chaincode using sdk

SoumyaP (Wed, 24 May 2017 09:45:47 GMT):
Hi, I am getting an error : cannot read property ' _certificate' of null while i am trying to register a user

SoumyaP (Wed, 24 May 2017 09:45:56 GMT):
can someone help me

tiue (Wed, 24 May 2017 10:17:03 GMT):
Has joined the channel.

JasonD (Wed, 24 May 2017 10:28:14 GMT):
@praveennagpal I got the same issue. my scenario is: I shut down the network, and restart the hyperledger network. then upgrade chaincode. then upgrade again, then I got this error

JasonD (Wed, 24 May 2017 10:28:21 GMT):
dont know how to fix it

JasonD (Wed, 24 May 2017 10:29:04 GMT):
` error: [Chain.js]: getChannelConfig - Failed Proposal. Error: Error: SERVICE_UNAVAILABLE `

JasonD (Wed, 24 May 2017 10:29:28 GMT):
` error: [Orderer.js]: sendDeliver - on error code 14: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone `

praveennagpal (Wed, 24 May 2017 10:43:29 GMT):
@JasonD ok..I don't event get a failed proposal mentioned in the error but do get it when I try to getChannelConfig

praveennagpal (Wed, 24 May 2017 10:43:59 GMT):
@jasond: also I ran the network by disabling TLS and the error goes away which means its somehow TLS related

Vadim (Wed, 24 May 2017 10:45:23 GMT):
@praveennagpal can you check the orderer logs?

praveennagpal (Wed, 24 May 2017 10:45:54 GMT):
the orderer logs just simply have 2017-05-24 08:37:53.514 UTC [grpc] Printf -> DEBU 14a9 transport: http2Server.HandleStreams failed to receive the preface from client: EOF 2017-05-24 08:38:13.503 UTC [grpc] Printf -> DEBU 14aa transport: http2Server.HandleStreams failed to receive the preface from client: EOF 2017-05-24 08:38:13.516 UTC [grpc] Printf -> DEBU 14ab transport: http2Server.HandleStreams failed to receive the preface from client: EOF

praveennagpal (Wed, 24 May 2017 10:46:04 GMT):
nothing else coming in there

Vadim (Wed, 24 May 2017 10:46:05 GMT):
seems like tls

Vadim (Wed, 24 May 2017 10:46:43 GMT):
make sure that you initialize orderer in SDK with a proper CA cert and correctly set the hostname

praveennagpal (Wed, 24 May 2017 10:47:09 GMT):
i have done that.. I am able to create the channel

praveennagpal (Wed, 24 May 2017 10:47:59 GMT):
but have this issue on peer joining channel or instantiating chaincode

praveennagpal (Wed, 24 May 2017 10:48:19 GMT):
the calls are failing at chain.initialize and chain.getGenesisBlock

Vadim (Wed, 24 May 2017 10:48:30 GMT):
so on every interaction with orderer you have that error

Vadim (Wed, 24 May 2017 10:48:30 GMT):
so on every interaction with the orderer you have that error

praveennagpal (Wed, 24 May 2017 10:49:01 GMT):
yes

Vadim (Wed, 24 May 2017 10:49:16 GMT):
looks like that tls is not set up properly with the orderer

jimthematrix (Wed, 24 May 2017 12:33:34 GMT):
@JasonD about your endorsement policy issue, can you paste the JSON you used for the policy during instantiate? the `Failed to authenticate policy` means the endorsements collected in the proposal responses did not meet the policy criteria. could be many things that cause this to happen

mizaoyu (Wed, 24 May 2017 13:15:30 GMT):
Has joined the channel.

mizaoyu (Wed, 24 May 2017 13:16:57 GMT):
Hi everyone, I am following https://github.com/hyperledger/fabric-sdk-node. After I run "docker-compose up --force-recreate" in the fabric-sdk-node/test/fixtures folder, it got stuck at a step "setModuleLevel -> DEBU 197 Module 'grpc' logger enabled for log level 'ERROR'" and doesn't output anything else afterwards, as in the following snapshoot. I am not sure whether it is a desired result or it's a mistake.

mizaoyu (Wed, 24 May 2017 13:17:20 GMT):

Message Attachments

mizaoyu (Wed, 24 May 2017 13:18:05 GMT):
If I left this running and do "gulp test" under the "fabric-sdk-node" folder, I got the following errors related to missing files.

mizaoyu (Wed, 24 May 2017 13:19:19 GMT):

Message Attachments

mizaoyu (Wed, 24 May 2017 13:19:28 GMT):
Any solution? Thank you!

JasonD (Wed, 24 May 2017 13:20:11 GMT):
``` '1-of': [ { 'signed-by': 2}, { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1 }]} ] ```

JasonD (Wed, 24 May 2017 13:20:15 GMT):
@jimthematrix

JasonD (Wed, 24 May 2017 13:20:43 GMT):
and about the restart chaincode issue, do you have any idea ? @jimthematrix

trilochanachary (Wed, 24 May 2017 13:33:03 GMT):
Has joined the channel.

srvnnp (Wed, 24 May 2017 13:39:51 GMT):
Has joined the channel.

JasonD (Wed, 24 May 2017 14:12:35 GMT):
I think my question is: if I mount directory to docker to persist data, then the docker network down, ca, orderer, peer etc, I can restart hyperledger network. but I have installed and instantiated my chaincode, how to restart it ? what's the right way to do ?

JasonD (Wed, 24 May 2017 14:15:25 GMT):
in this situation, I think peers all have my chaincode, so I just have to instantiated my chaincode, but i get this error `[Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND`

JasonD (Wed, 24 May 2017 14:16:20 GMT):
so right now, if the network down, all data just gone and no way to get it, right?

ericmvaughn (Wed, 24 May 2017 16:30:16 GMT):
On windows 10 I'm getting an error during the npm install for x509 `LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' ` Has anyone see this or know what package I need to install?

SandySun2000 (Wed, 24 May 2017 16:39:24 GMT):
Has joined the channel.

pd93 (Wed, 24 May 2017 16:40:34 GMT):
@ericmvaughn I've not come across this before, but you may find the comments here useful: https://github.com/sahat/hackathon-starter/issues/526

praveennagpal (Wed, 24 May 2017 17:01:39 GMT):
@jimthematrix in order to move forward, I disabled TLS in the network. Now, I am getting an error in instantiating the chaincode. I20170524-22:28:45.970(5.5)? Chain peers=[{"_options":{"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com","grpc.primary_user_agent":"grpc-node/1.2.4"},"_url":"grpc://localhost:7051","_endpoint":{"addr":"localhost:7051","creds":{}},"_request_timeout":1000000,"_endorserClient":{"$channel":{}},"_name":null,"_roles":[]},{"_options":{"grpc.ssl_target_name_override":"peer0.org2.example.com","grpc.default_authority":"peer0.org2.example.com","grpc.primary_user_agent":"grpc-node/1.2.4"},"_url":"grpc://localhost:9051","_endpoint":{"addr":"localhost:9051","creds":{}},"_request_timeout":1000000,"_endorserClient":{"$channel":{}},"_name":null,"_roles":[]}] W20170524-22:28:46.036(5.5)? (STDERR) error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown W20170524-22:28:46.037(5.5)? (STDERR) at /Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 W20170524-22:28:46.039(5.5)? (STDERR) error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown W20170524-22:28:46.040(5.5)? (STDERR) at /Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17

praveennagpal (Wed, 24 May 2017 17:03:10 GMT):
The surprising bit is that I don't get this error while installing chaincode.

praveennagpal (Wed, 24 May 2017 17:03:44 GMT):
the peer logs seem to get stuck in 2017-05-24 16:58:45.998 UTC [protoutils] ValidateProposalMessage -> DEBU 5f4 ValidateProposalMessage starts for signed proposal 0xc421517c20 2017-05-24 16:58:46.000 UTC [protoutils] validateChannelHeader -> DEBU 5f5 validateChannelHeader info: header type 3 2017-05-24 16:58:46.023 UTC [protoutils] checkSignatureFromCreator -> DEBU 5f6 checkSignatureFromCreator starts

praveennagpal (Wed, 24 May 2017 17:05:45 GMT):
The same checkSignatureFromCreator seems to return ok when the chaincode is installed. What could be the problem here?

ericmvaughn (Wed, 24 May 2017 18:24:31 GMT):
@pd93 Thanks for the tip, per the link I had to install `Win64 OpenSSL v1.0.2k` from https://slproweb.com/products/Win32OpenSSL.html and then my npm install completed successfully

Wenyang Liu (Wed, 24 May 2017 21:32:01 GMT):
Hi all, I am wondering where and when is the TCert generated ? I see that when requesting a transaction through node-sdk, the`tx_id = nonce+userHash` will be passed onto the request; I read the doc it says that in `FabricCAClientImpl.js` would provide the function to issue TCert, but I cannot find any here either. Thanks for any hints.

JasonD (Thu, 25 May 2017 01:24:03 GMT):
`[Orderer.js]: sendDeliver - on error code 14: "Error: Connect Failed`, got this error, what does code 14 mean ?

JasonD (Thu, 25 May 2017 01:24:55 GMT):
`[Chain.js]: getChannelConfig - Failed Proposal. Error: Error: SERVICE_UNAVAILABLE`

JasonD (Thu, 25 May 2017 03:14:37 GMT):
right now the problem is: after I mount directory to docker, I tried to shut down the network(ca, orderer, peer ), then restart them without cc container. then I tried to invoke, so peer will instantiate cc container. until now everything was fine. then I shutdown again, then restart them without cc container. still, fine. then invoke, that's when this error occured `[Chain.js]: getChannelConfig - Failed Proposal. Error: Error: SERVICE_UNAVAILABLE`

JasonD (Thu, 25 May 2017 03:14:51 GMT):
``` [Orderer.js]: sendDeliver - on error code 14: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/david/Desktop/work/code/gopath/src/datachain/jutian-backend/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/david/Desktop/work/code/gopath/src/datachain/jutian-backend/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/david/Desktop/work/code/gopath/src/datachain/jutian-backend/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:229:12)" ```

JasonD (Thu, 25 May 2017 03:35:37 GMT):
@jimthematrix just tested the whole process in test/integration/e2e, the same issue

prashiyn (Thu, 25 May 2017 04:48:55 GMT):
@jimthematrix I get this error while creating a new channel. Cannot verift CA for admincert for orderer. The certs were created with the same CA. `Principal deserialization failed: (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "metisnode.aanet.in")) `

rliu (Thu, 25 May 2017 13:20:15 GMT):
@smithbk Hi Keith, this is Emily. I ran into a strange problem and hope to get your help. I set up a network with three peers, say Org1, Org2, Org3. Using the testing code from node SDK, I created two channels, channel12 between Org1 and Org2, and Channel13 between Org1 and Org3. Everything seemed working fine for Channel13. I can invoke transactions for marbles from either peer. However, for Channel12, if I invoke transactions from Org2, I got error: error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN error: [Chain.js]: getChannelConfig - Failed Proposal. Error: Error: Invalid results returned ::FORBIDDEN at ClientDuplexStream. (/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:197:22) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/opt/fabric1_workspace/cross_channel_experiment/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:245:14)

rliu (Thu, 25 May 2017 13:22:58 GMT):
@smithbk When I change the submitter role to Admin (e.g. getSubmitter(client, t, true, userOrg), everything works fine. The interesting part is that all peers are set up in the exact same way. I don't understand why only 'Org2' needs to be "Admin" role to invoke transactions, while others don't need. Thanks.

jimthematrix (Thu, 25 May 2017 13:30:19 GMT):
@mizaoyu are you running inside vagrant? noticed you are running as "root" so was wondering. running non-root users on linux/mac are the best way to get things working so far. we are investigating windows support and hopefully that'll start working soon. but we know there are problems running in vagrant so it's not supported at this point

jimthematrix (Thu, 25 May 2017 13:32:05 GMT):
@Wenyang Liu tcert is not supported in v1.0, we'll update the documentation. sorry about the confusion

jimthematrix (Thu, 25 May 2017 13:32:05 GMT):
@Wenyang Liu tcert is not supported in v1.0, we'll update the documentation. sorry about the confusion

smithbk (Thu, 25 May 2017 13:58:48 GMT):
@rliu @jimthematrix Jim, should be able to help

SoumyaP (Thu, 25 May 2017 14:24:16 GMT):
while registering the user it is throwing me this errorinfo: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":7054,"tlsOptions":{"trustedRoots":[],"verify":false}} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} info: [Client.js]: Failed to load user "adminX" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":7054} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} [2017-05-25 10:10:20.146] [INFO] Helper - username:admin info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/home/soumya/.hfc-key-store"}} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/soumya/fabric/REPO/node_modules/fabric-client/lib/User.js:260:11) error: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _mspImpl.cryptoSuite.importKey.then.then (/home/soumya/fabric/REPO/node_modules/fabric-client/lib/User.js:260:11) [2017-05-25 10:10:20.171] [DEBUG] Helper - adminX failed to register [2017-05-25 10:10:20.171] [ERROR] Helper - adminX enrollment failed (node:5368) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot save null userContext. (node:5368) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property '_enrollmentSecret' of undefined

SoumyaP (Thu, 25 May 2017 14:24:32 GMT):
can someone help me

Wenyang Liu (Thu, 25 May 2017 14:55:53 GMT):
Thanks[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gWYywL6kfYhBWjggD) @jimthematrix

jimthematrix (Thu, 25 May 2017 15:44:58 GMT):
@rliu getChannelConfig(), which is the call that returned the error, is made to the orderer, not the peers. so my guess is that you have set up a channel READERS policy that differentiates identities from org1 vs. org2. it sounds like the policy is something like `any member from org1 or admin from org2`

jimthematrix (Thu, 25 May 2017 16:09:11 GMT):
@SoumyaP this means you have removed the crypto key store (default being ~/.hfc-key-store) but didn't remove the state store (defaults to /tmp/hfc-test-kvs* but since alpha2 has been changed to $TMPDIR/hfc/*). the state store has user objects that contains references to the private key in the key store, hence the error

bkvellanki (Thu, 25 May 2017 16:26:01 GMT):
@jimthematrix @bobbiejc @sowmya There are lot of changes in the fabric-sdk-node from alpha version..I have a wrapper that was functioning with alpha..Now it does not work with alpha2. There was new crytposuite in getSubmitter or get Member call. I tried updating this and made it enroll..Now i am having an issue buildTransactionID as it does use chain anymore..It uses client to build the trasaction id. I tried gettting that working..Now I have an issue with usercontext setitng..I am using admin as the user..Any help appreciated..Can some provide the step by process to update the components if we are moving from alpha to alpha..I am reading through the code and figure out issue..Its tedious as we are on a POC to be delivered with a short timeframe

bkvellanki (Thu, 25 May 2017 16:26:01 GMT):
@jimthematrix @bobbiejc @SowmyaP There are lot of changes in the fabric-sdk-node from alpha version..I have a wrapper that was functioning with alpha..Now it does not work with alpha2. There was new crytposuite in getSubmitter or get Member call. I tried updating this and made it enroll..Now i am having an issue buildTransactionID as it does use chain anymore..It uses client to build the trasaction id. I tried gettting that working..Now I have an issue with usercontext setitng..I am using admin as the user..Any help appreciated..Can some provide the step by process to update the components if we are moving from alpha to alpha2..I am reading through the code and figure out issue..Its tedious as we are on a POC to be delivered with a short timeframe

jimthematrix (Thu, 25 May 2017 16:30:07 GMT):
@bkvellanki I can empathize with your struggle, but alpha=use-at-your-own-risk, plus things are moving so fast we don't really have the bandwidth to provide a migration guide. if anyone from the community who are going through this and would like to document the steps involved and share that, I'm sure it'll be much appreciated

bkvellanki (Thu, 25 May 2017 17:07:49 GMT):
@here I am getting the following error when I am using admin user as the identityTypeError: Cannot read property 'length' of undefined at Function.Buffer.concat (buffer.js:304:24) at Function.buildTransactionID (/Users/bvellanki/install/workspace/node-workspace/bcs-sl-api-cc/node_modules/fabric-client/lib/Chain.js:1881:28) at Function.buildTransactionID (/Users/bvellanki/install/workspace/node-workspace/bcs-sl-api-cc/node_modules/fabric-client/lib/Client.js:1018:16)

jimthematrix (Thu, 25 May 2017 17:14:47 GMT):
@mizaoyu also try installing with the safe-perm switch: `npm install --unsafe-perm`

praveennagpal (Thu, 25 May 2017 17:16:39 GMT):
@jimthematrix I raised a couple of issues yesterday. Could you please have a look at them?

jimthematrix (Thu, 25 May 2017 17:17:43 GMT):
@bkvellanki at this line that failed: `var trans_bytes = Buffer.concat([nonce_bytes, creator_bytes]);` which of `nonce_bytes` and `creator_bytes` is undefined?

bkvellanki (Thu, 25 May 2017 17:18:13 GMT):
Yeah

bkvellanki (Thu, 25 May 2017 17:18:22 GMT):
I saw that

bkvellanki (Thu, 25 May 2017 17:19:43 GMT):
And I think creator bytes is the issue

bkvellanki (Thu, 25 May 2017 17:19:56 GMT):
Nonce is printing good

jimthematrix (Thu, 25 May 2017 17:21:00 GMT):
@praveennagpal the checks are MSPs when installing vs. instantiating are totally different: installing chaincode is a `channel agnostic` operation, and the submitter identity is checked against the target peer's "local MSP" (the peer's own organization); instantiation is a `channel aware` operation, and the MSPs used are from the channel configuration

jimthematrix (Thu, 25 May 2017 17:21:00 GMT):
@praveennagpal the checks done by the MSPs when installing vs. instantiating are totally different: installing chaincode is a `channel agnostic` operation, and the submitter identity is checked against the target peer's "local MSP" (the peer's own organization); instantiation is a `channel aware` operation, and the MSPs used are from the channel configuration

bkvellanki (Thu, 25 May 2017 17:21:05 GMT):
I am using admin and adminpw with hfc-key

jimthematrix (Thu, 25 May 2017 17:21:38 GMT):
the fact that Org1MSP is not known during instantiation typically means the peer has not joined the channel you are instantiating the chaincode on.

jimthematrix (Thu, 25 May 2017 17:23:01 GMT):
can you paste the code you used to setEnrollment() on the user?

jimthematrix (Thu, 25 May 2017 17:23:01 GMT):
@bkvellanki can you paste the code you used to setEnrollment() on the user?

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

rliu (Thu, 25 May 2017 18:29:27 GMT):
@jimthematrix Thanks for the reply. How can I check if I set up a channel READERS policy? When I look at the testing code, I thought a possible place is the configtx.yaml, which I used to generate channel.tx. This file does not have any reader policy. The other is create-channel.js, which has a sentence client.buildChannelConfig(test_input3, orderer, maps). test_input3 is set up like this: var test_input3 = { channel : { name : channel_name, consortium : 'SampleConsortium', peers : { organizations : [{ id : 'Org1MSP', //msp : { mspid : 'Org1MSP'}, policies : { } },{ id : 'Org2MSP', //msp : { mspid : 'Org2MSP'}, policies : { } }], policies : { Admins : {threshold : 'MAJORITY'}, Writers : {threshold : 'ANY'}, Readers : {threshold : 'ANY'}, }, } } }; Could you advise how to check channel READERS policy? Thanks. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZcFDsedeALPc76MFa) @jimthematrix

jimthematrix (Thu, 25 May 2017 18:34:04 GMT):
@rliu if you only used the default then the readers policy would be any member (not admin) of the channel's orgs. this doesn't explain why you had to use an Admin to call getChannelConfig(). back to square one...

rliu (Thu, 25 May 2017 18:36:36 GMT):
@jimthematrix is there an API to check what READER policies exist in my channel config? call chain.getChannelConfig() after chain.initialize()? I tried, but didn't get anything back.

jimthematrix (Thu, 25 May 2017 18:38:41 GMT):
@rliu note that getChannelConfig() is a promised call, so make sure it's handled with .then(). if should return the configuration envelope with the channel configuration including the readers policy

tumbleleaf (Thu, 25 May 2017 19:37:33 GMT):
Has joined the channel.

tumbleleaf (Thu, 25 May 2017 19:38:21 GMT):
Hi. Getting errors running 'make dist-clean all' on the fabric

tumbleleaf (Thu, 25 May 2017 19:38:23 GMT):
LINT: Running code checks.. Checking ./core Checking ./events Checking ./examples Checking ./peer Checking ./protos Checking ./orderer Checking ./msp Checking ./gossip Checking ./bccsp cd unit-test && docker-compose up --abort-on-container-exit --force-recreate && docker-compose down Traceback (most recent call last): File "/usr/local/bin/docker-compose", line 7, in from compose.cli.main import main File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 14, in from . import errors File "/usr/local/lib/python2.7/dist-packages/compose/cli/errors.py", line 9, in from docker.errors import APIError File "/usr/local/lib/python2.7/dist-packages/docker/__init__.py", line 6, in from .client import Client, AutoVersionClient, from_env # flake8: noqa File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 5, in import requests File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 53, in from .packages.urllib3.contrib import pyopenssl File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 73, in ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD, AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3' Makefile:118: recipe for target 'unit-test' failed make: *** [unit-test] Error 1

tumbleleaf (Thu, 25 May 2017 19:39:20 GMT):
Do I need to install some additional SSL software?

rliu (Thu, 25 May 2017 20:02:36 GMT):
@jimthematrix getChannelConfig() returns the following Readers { version: Long { low: 0, high: 0, unsigned: true }, policy: { type: 3, policy: ByteBuffer { buffer: , offset: 7271, markedOffset: -1, limit: 7280, littleEndian: true, noAssert: false } }, mod_policy: 'Admins' } After I convert the policy byteBuffer to string (i.e. toString('utf8'), I got this: Readers Not sure if this conversion is right. It does not seem 'Org2' shows in the READERS policy. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Hmt9FwE9NuxkabQ77) @jimthematrix

VenuVemula (Thu, 25 May 2017 20:32:44 GMT):
Has joined the channel.

jimthematrix (Thu, 25 May 2017 23:17:43 GMT):
@tumbleleaf for the make failure question you should try the #fabric channel

jimthematrix (Thu, 25 May 2017 23:24:08 GMT):
@bretharrison can you help answer @rliu 's question above?

akshay.lawange (Fri, 26 May 2017 05:56:23 GMT):
Has joined the channel.

Gaurav_Impro (Fri, 26 May 2017 06:44:54 GMT):
Has joined the channel.

SotirisAlfonsos (Fri, 26 May 2017 08:24:53 GMT):
Hello, should a client from one organisation be able to invoke or query chaincode on another organisation's peer? Currently i am getting this `/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Chain.js:248 var url = peer.getUrl(); ^ TypeError: Cannot read property 'getUrl' of undefined at Chain.addPeer (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Chain.js:248:17)` on the balance transfer example, which points me to the fact that clients can only talk to their org's peers.

SotirisAlfonsos (Fri, 26 May 2017 08:24:53 GMT):
Hello, should a client from one organisation be able to invoke or query chaincode on another organisation's peer? Currently i am getting this `/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Chain.js:248 var url = peer.getUrl(); ^ TypeError: Cannot read property 'getUrl' of undefined at Chain.addPeer (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Chain.js:248:17)` on the balance transfer example, which points me to the fact that clients can only talk to their org's peers.

SotirisAlfonsos (Fri, 26 May 2017 08:24:53 GMT):
Hello, should a client from one organisation be able to invoke or query chaincode on another organisation's peer? Currently i am getting this /home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Chain.js:248 var url = peer.getUrl(); ^ TypeError: Cannot read property 'getUrl' of undefined at Chain.addPeer (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Chain.js:248:17) on the balance transfer example, which points me to the fact that clients can only talk to their org's peers.

SotirisAlfonsos (Fri, 26 May 2017 08:24:53 GMT):
Hello, should a client from one organisation be able to invoke or query chaincode on another organisation's peer? Currently i am getting this `/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Chain.js:248 var url = peer.getUrl(); TypeError: Cannot read property 'getUrl' of undefined at Chain.addPeer (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Chain.js:248:17)` on the balance transfer example, which points me to the fact that clients can only talk to their org's peers.

praveennagpal (Fri, 26 May 2017 10:57:18 GMT):
@jimthematrix why are chaincode query calls 'promised'? Can't they be simply synchronous calls just querying the local copy of the world state? For an app, simple read operations being asynch makes it cumbersome.

praveennagpal (Fri, 26 May 2017 11:16:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DaM6aq5WE2TDSZpC3) @jimthematrix Thanks. Why is the channel id needed for installation in install-chaincode fabric-node-sdk test? I guess it is for initialisation of chain but then if we don't have anything to do with channel, why we need to initialise chain?

praveennagpal (Fri, 26 May 2017 11:16:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DaM6aq5WE2TDSZpC3) @jimthematrix Thanks. Why is the channel id needed for installation in install-chaincode fabric-node-sdk test? I guess it is for initialisation of chain but then if we don't have anything to do with channel, why do we need to initialise chain?

prashiyn (Fri, 26 May 2017 11:21:10 GMT):
I amm getting this error on the orderer log while creating a channel `Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Attempt to set key [Policy] /Channel/Application/Org1Msp/Writers to version 0, but key is at version 0`. Has anyone faced this issue?

bretharrison (Fri, 26 May 2017 12:03:59 GMT):
@rliu Type 3 policies are IMPLICIT_META , which indicate a threshold (ANY, ALL, MAJORITY) of successful evaluation of policies of that name at the next level. This type of policy is used at the channel level of the config. In this case you will need to check the 'Readers' policy of each of the Organizations.

rliu (Fri, 26 May 2017 12:46:44 GMT):
@bretharrison Thanks. How can I check 'Readers' policy of each of the Organization? [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SjJhEqeaRHqbGNMuq) @bretharrison

bretharrison (Fri, 26 May 2017 13:10:50 GMT):
@rliu Where did you get the implicit policy ?, should be in the same block

lyriarte (Fri, 26 May 2017 13:24:40 GMT):
Has joined the channel.

jimthematrix (Fri, 26 May 2017 13:58:59 GMT):
@SotirisAlfonsos the error you are seeing is a client side only coding issue, it has nothing to do with the peer's access control. double check to make sure the `peer` object has been properly constructed in your code

jimthematrix (Fri, 26 May 2017 14:00:42 GMT):
@praveennagpal _querying the local copy of the world state_ that's a remote call to peers, you don't want any network IO calls to be blocking in a node.js app since it's single threaded

jimthematrix (Fri, 26 May 2017 14:00:42 GMT):
@praveennagpal _querying the local copy of the world state_ - that's a remote call to peers, you don't want any network IO calls to be blocking in a node.js app since it's single threaded

jimthematrix (Fri, 26 May 2017 14:02:33 GMT):
also chainId is not required any longer in the latest code: https://fabric-sdk-node.github.io/Client.html#installChaincode__anchor

jimthematrix (Fri, 26 May 2017 14:13:13 GMT):
@prashiyn likely due to using the wrong JSON input from the node SDK API. note that JSON input support has been removed from node SDK. going forward please use the output of the configtxgen tool only for create and update channels

jimthematrix (Fri, 26 May 2017 14:13:37 GMT):
also this area is being enhanced: https://jira.hyperledger.org/browse/FAB-1678

rliu (Fri, 26 May 2017 14:16:20 GMT):
@bretharrison i used chain.getChannelConfig() as Jim suggested. This API returns me the following: { config: { sequence: Long { low: 1, high: 0, unsigned: true }, channel_group: { version: [Object], groups: [Object], values: [Object], policies: [Object], mod_policy: '' } }, last_update: { payload: ByteBuffer { buffer: , offset: 7330, markedOffset: -1, limit: 14144, littleEndian: true, noAssert: false }, signature: ByteBuffer { buffer: , offset: 14146, markedOffset: -1, limit: 14216, littleEndian: true, noAssert: false } } } Is 'Readers' policy of reach of the organization contained in this API return? If so, which element? I explored channel_group.policies (posted before), but didn't find readers policy for each organization. Thanks. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QGSdqau3KmYHCE5fE) @bretharrison

SotirisAlfonsos (Fri, 26 May 2017 15:10:29 GMT):
Thank you @jimthematrix i will check that as soon as i fix my build.

SotirisAlfonsos (Fri, 26 May 2017 15:10:29 GMT):
Thank you @jimthematrix i will check that as soon as i fix my build. From what i see the error is normal. Being triggered because org1 can not query peer2(part of org2), because peer2 is not on his list of known peers.

bretharrison (Fri, 26 May 2017 15:20:22 GMT):
@rliu you may wish to have a look at the test/integration/query.js. look at the queryBlock call, if made to block zero, this will get your config block. The block is decoded in to standard JSON

Asara (Fri, 26 May 2017 15:26:02 GMT):
Dunno if this is known, or matters, but two of the node integration test fail

Asara (Fri, 26 May 2017 15:26:03 GMT):
on master

Asara (Fri, 26 May 2017 15:27:00 GMT):
```not ok 454 Must throw error when current user enrollment certificate does not have a "CN" value --- operator: throws expected: |- '/Invalid enrollment certificate of the current user: does not contain the "CN" value/' actual: |- { [TypeError: Cannot read property 'commonName' of undefined] message: 'Cannot read property \'commonName\' of undefined' } at: Test. (/home/centos/fabric-sdk-node/node_modules/tape-promise/index.es5.js:21:13) error: [FabricCAClientImpl.js]: Failed to parse enrollment certificate -----BEGIN CERTIFICATE----- XXX -----END CERTIFICATE----- for Subject. Error: Error: File doesn't exist. ... not ok 455 Must not throw error when current user is valid --- operator: throws expected: |- null actual: |- [TypeError: Cannot read property 'commonName' of undefined] at: Test. (/home/centos/fabric-sdk-node/node_modules/tape-promise/index.es5.js:21:13) ... ```

Asara (Fri, 26 May 2017 15:27:27 GMT):
that is unless i'm doing something wrong

rliu (Fri, 26 May 2017 15:50:04 GMT):
@bretharrison I queried block 0, but didn't find anything suspicious. I'm attaching the output here. Could you take a look to see if there is anything wrong there? Thanks. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wG7cvi7oKpThG5D8o) @bretharrison

rliu (Fri, 26 May 2017 15:50:28 GMT):
@bretharrison https://chat.hyperledger.org/file-upload/wMZYperRZY3GGuf6A/block0.txt

prashiyn (Fri, 26 May 2017 16:52:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mkkCAkrFFkuLg8wtC) @jimthematrix Ya i was using json input. Thanks for the update.

hcw (Fri, 26 May 2017 18:26:35 GMT):
Has joined the channel.

hcw (Fri, 26 May 2017 18:38:05 GMT):
i'm trying to run the tests after following the setup instructions on https://github.com/hyperledger/fabric-sdk-node but the tests keep failing with the following errors ```error: [Channel.js]: Channel-sendPeersProposal - Promise is rejected: Error: Cannot create ledger from genesis block, due to LedgerID already exists at /home/neilson/Projects/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 not ok 14 Failed to join peers in organization "peerOrg1" to the channel. TypeError: Cannot read property 'stack' of undefined at Client.newDefaultKeyValueStore.then.then.then.then.then (/home/neilson/Projects/fabric-sdk-node/test/integration/e2e/join-channel.js:215:55) error: [Channel.js]: Channel-sendPeersProposal - Promise is rejected: Error: chaincode exists end2endnodesdk at /home/neilson/Projects/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [Channel.js]: Channel-sendPeersProposal - Promise is rejected: Error: chaincode exists end2endnodesdk at /home/neilson/Projects/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 error: [E2E testing]: instantiate proposal was bad error: [E2E testing]: instantiate proposal was bad ```

thakkarparth007 (Fri, 26 May 2017 19:05:09 GMT):
You've probably run the tests once and didn't clear the docker containers.

thakkarparth007 (Fri, 26 May 2017 19:05:29 GMT):
That's probably why "LedgerID already exists"

kuangchao (Sat, 27 May 2017 05:37:02 GMT):

Message Attachments

kuangchao (Sat, 27 May 2017 05:37:17 GMT):

Message Attachments

kuangchao (Sat, 27 May 2017 05:40:19 GMT):

Message Attachments

prashiyn (Sat, 27 May 2017 09:55:02 GMT):
How can i check using the sdk if a channel with a given name is already created?

nhrishi (Sat, 27 May 2017 12:15:32 GMT):
Hi, We're integrating fabric-sdk-node with fabric-v1-alpha2 CA. We're running with TLS options. Weálso passed tlsOption with CA pem. But we're getting below error - "[2017-05-27 08:04:25.896] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 0.0.0.0:7054]". Can someone pls advise. Thanks.

bmalavan (Sat, 27 May 2017 20:10:07 GMT):
Has joined the channel.

praveennagpal (Sun, 28 May 2017 10:09:04 GMT):
@prashiyn this is an earlier response from @jimthematrix on the same query that I had. it’s a multi-step process - check your peers for existing channels: Client.queryChannels(peer) - check the orderer for an existing channel by name: (pseudo code below) ```var chain = client.newChain('name'); chain.addOrderer(orderer); chain.getChannelConfig(); ``` from the result of the `getChannelConfig()` call, which calls the orderer to discover the config of the channel `name`, you *should* be able to tell if the channel already exists or not I said *should* because I’m not sure what the orderer returns in case the channel doesn’t exist or the client has no authorization to access it. the orderer may not tell you *the channel exists but you can’t access it* for privacy reasons

praveennagpal (Sun, 28 May 2017 10:12:26 GMT):
@jimthematrix I see that the channel config includes the organisations involved and then the channel.tx generated by configtxgen is passed to create the channel. How do we then add organisations later on if new organisations come along? Would a simple joinchannel proposal work for them?

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

openspylin (Sun, 28 May 2017 18:48:50 GMT):
Has joined the channel.

prashiyn (Mon, 29 May 2017 07:40:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hbhHrFSxYneN522CG) @praveennagpal Thanks. Will give it a shot

SotirisAlfonsos (Mon, 29 May 2017 12:07:34 GMT):
Hello. I noticed that we can install different chaincodes, in different orgs, within the same channel, using the same cc name and version. As far as as i see this leads us on sharing one common stub for different smart contracts. Is this something that will change in later versions? Could we hash the cc, and compare it to other installed chaincodes with the same name to determine if the actual code is the same?

SotirisAlfonsos (Mon, 29 May 2017 12:07:34 GMT):
Hello. I noticed that we can install different chaincodes, in different orgs, within the same channel, using the same cc name and version. As far as as i see this leads us on sharing one common stub for different smart contracts. Is this something that will change in later versions? Could we hash the cc, and compare it to other installed chaincodes with the same name to determine if the actual code is the same? Also a small bug on the balance transfer example https://github.com/hyperledger/fabric-sdk-node/blob/v1.0.0-alpha2/examples/balance-transfer/app/invoke-transaction.js#L105 should be [i] instead of [0].

jimthematrix (Mon, 29 May 2017 13:14:41 GMT):
@kuangchao the chaincode container couldn't connect to the endorser peer, check that you have the following environment variable in the peer's docker section: `- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE`, the value is the value of the *Networks* section in `docker inspect ` output, if you use fabric-sdk-node/test/fixtures/docker-compose.yaml to launch the target, it'll be `fixtures_default`, yours may be different

jimthematrix (Mon, 29 May 2017 13:17:57 GMT):
@praveennagpal re: adding orgs: https://jira.hyperledger.org/browse/FAB-1678 (requires enhanced tools to generate the channel update binary payload, then you can use it to send through the SDK)

jimthematrix (Mon, 29 May 2017 13:23:12 GMT):
@SotirisAlfonsos the LSCC (lifecycle system chaincode) does indeed use hash of the locally installed chaincode to indicate the target of the endorsement (during instantiation), at validation time if these hash values from endorsers don't match then the instantiation transaction is rejected

SotirisAlfonsos (Mon, 29 May 2017 14:17:21 GMT):
@jimthematrix both the balance transfer and the e2e tests run without errors when i install different chaincodes with the same name. My process is on balance transfer: Install chaincode 2 on peer1 org1 Install chaincode 1 on peer0 org1 Install chaincode 1 on peer2, peer3 org2 Instantiate chaincode 1 on peer0 org1 Or on e2e: Install chaincode 1 on peer0 org1 Install chaincode 2 on peer1 org2 Instantiate chaincode 1 on peer0 org1

jimthematrix (Mon, 29 May 2017 14:26:35 GMT):
@SotirisAlfonsos need to clarify some concepts: when you send instantiate call, you need to identify a list of endorsers, they each inspect the chaincode and provide their endorsement, since you only send the instantiate call to one peer, that's the only peer to inspect the chaincode. You should try sending instantiate calls to peers with different code to observe the failure

SotirisAlfonsos (Mon, 29 May 2017 14:48:22 GMT):
Yes i know that. I think in the e2e example there are target peers (peer1 from every org) specified to endorse the instantiation and on the balance transfer both peer0 and peer1 from org1 endorse it. Thank you for the reply.

MohammadObaid (Mon, 29 May 2017 15:01:09 GMT):
Has joined the channel.

DannyWong (Mon, 29 May 2017 15:40:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WFnvJ2uJcDziXFK73) @jimthematrix excuse me, I dun understand "indicate the target of endorsement"?..

jimthematrix (Mon, 29 May 2017 17:47:44 GMT):
@DannyWong same as "which peers should the proposal be sent to to solicit endorsements"?

RamanandaPanda (Tue, 30 May 2017 07:54:52 GMT):
Has joined the channel.

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

paul.sitoh (Tue, 30 May 2017 15:01:31 GMT):
@jimthematrix what is the difference between registering and enrolling as user from a fabric-ca-client perspective?

Asara (Tue, 30 May 2017 15:51:35 GMT):
Hey guys, I want to test out the fabric-sdk, just wondering, how do I set up credentials/keys for it?

Asara (Tue, 30 May 2017 15:51:46 GMT):
I have fabric running with docker-compose-e2e

jimthematrix (Tue, 30 May 2017 17:26:20 GMT):
@Asara take a look at fabric-sdk-node/test/integration/e2e/config.json, and see what settings are used there and how

DennisM330 (Tue, 30 May 2017 19:58:23 GMT):
Has joined the channel.

DennisM330 (Tue, 30 May 2017 20:00:56 GMT):
Advocating for the fixes in: https://github.com/hyperledger/composer/issues/1080. I have a composer-rest server CF app in Bluemix that would benefit from fixes in this issue

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

JasonD (Wed, 31 May 2017 02:45:10 GMT):
@jimthematrix just posted a bug in JIRA: https://jira.hyperledger.org/browse/FAB-4254

rickr (Wed, 31 May 2017 03:01:15 GMT):
FYI @jimthematrix @bretharrison https://gerrit.hyperledger.org/r/#/c/9955 I think there's a similar option for Node. I'm hoping this will fix any timeout on connections. Going to give it a try first before application level heartbeat

jimthematrix (Wed, 31 May 2017 03:21:57 GMT):
@DennisM330 this bug is being worked on which I think should address the problem you are seeing in composer: https://jira.hyperledger.org/browse/FAB-2787

vu3mmg (Wed, 31 May 2017 04:24:16 GMT):
could you please give me some pointers to use eventhub

chenxuan (Wed, 31 May 2017 04:24:47 GMT):
| 2017-05-31 04:23:28.274 UTC [deliveryClient] connect -> ERRO 3d6 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050]

prashiyn (Wed, 31 May 2017 04:56:57 GMT):
@jimthematrix Bug in Channel.js line # 1175 - ` var peers = null; if (request) { let peers = request.targets; }` peers is redefined inside if block. We should remove the 'let'. Otherwise proposal will go to all peers in the channel instead of the peer where chaincode is getting instantiated.

bkvellanki (Wed, 31 May 2017 06:38:06 GMT):
@jimthematri I am getting the instantiation error when i am executing the alpha-2 e2e test for instantiation..I am also able replicate this in my own code which i am working on using fabric sdk..Is this a known bug ***** End-to-end flow: instantiate chaincode ***** >>>> getting the org admin looking at file ::/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/keystore/9022d671ceedbb24af3ea69b5a8136cc64203df6b9920e26f48123fcfcb1d2e9_sk looking at file ::/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem info: [Client.js]: loading user from files info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/hfc-test-kvs_peerOrg1"}} ok 28 Successfully enrolled user 'admin' ok 29 Org is--org1 info: [E2E testing]: create new peer grpcs://localhost:7051 ok 30 create new peer %s ok 31 Org is--org2 info: [E2E testing]: create new peer grpcs://localhost:8051 ok 32 create new peer %s info: [E2E testing]: create new eventhub grpcs://localhost:7053 ok 33 Transaction ID build proposal451f7261023bda7441558fea6f44c651b1346dec0966553f5aea726bef545471 ok 34 Request ID build proposal[object Object] error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 info: [E2E testing]: instantiate proposal was good error: [E2E testing]: instantiate proposal was bad not ok 35 Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:387:6) ... not ok 36 Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at hfc.newDefaultKeyValueStore.then.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:388:10) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:406:5) ... not ok 37 Failed to instantiate chaincode --- operator: fail at: e2eUtils.instantiateChaincode.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/instantiate-chaincode.js:40:6) ...

bkvellanki (Wed, 31 May 2017 06:38:06 GMT):
@jimthematrix I am getting the instantiation error when i am executing the alpha-2 e2e test for instantiation..I am also able replicate this in my own code which i am working on using fabric sdk..Is this a known bug ***** End-to-end flow: instantiate chaincode ***** >>>> getting the org admin looking at file ::/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/keystore/9022d671ceedbb24af3ea69b5a8136cc64203df6b9920e26f48123fcfcb1d2e9_sk looking at file ::/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem info: [Client.js]: loading user from files info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/hfc-test-kvs_peerOrg1"}} ok 28 Successfully enrolled user 'admin' ok 29 Org is--org1 info: [E2E testing]: create new peer grpcs://localhost:7051 ok 30 create new peer %s ok 31 Org is--org2 info: [E2E testing]: create new peer grpcs://localhost:8051 ok 32 create new peer %s info: [E2E testing]: create new eventhub grpcs://localhost:7053 ok 33 Transaction ID build proposal451f7261023bda7441558fea6f44c651b1346dec0966553f5aea726bef545471 ok 34 Request ID build proposal[object Object] error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 info: [E2E testing]: instantiate proposal was good error: [E2E testing]: instantiate proposal was bad not ok 35 Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:387:6) ... not ok 36 Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at hfc.newDefaultKeyValueStore.then.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:388:10) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:406:5) ... not ok 37 Failed to instantiate chaincode --- operator: fail at: e2eUtils.instantiateChaincode.then (/Users/bvellanki/install/workspace/go-workspace/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/instantiate-chaincode.js:40:6) ...

bkvellanki (Wed, 31 May 2017 06:38:46 GMT):
@jimthematrix Here are errors from my code.. [2017-05-31 00:43:14.334] [DEBUG] -Instantiate-Chaincode - Successfully enrolled user 'admin' [2017-05-31 00:43:14.334] [DEBUG]-Instantiate-Chaincode - Just passed enrolling [2017-05-31 00:43:14.334] [DEBUG] -Instantiate-Chaincode - After passed enrolling--- [2017-05-31 00:43:14.334] [INFO] -Instantiate-Chaincode - create new peer grpcs://localhost:7051 [2017-05-31 00:43:14.335] [INFO] Instantiate-Chaincode - create new peer grpcs://localhost:8051 [2017-05-31 00:43:14.336] [DEBUG] -Instantiate-Chaincode - Passed this point [2017-05-31 00:43:14.336] [INFO] Instantiate-Chaincode - create new eventhub grpcs://localhost:7053 [2017-05-31 00:43:14.411] [DEBUG] -Instantiate-Chaincode - Inside Build Chanincode Proposal [2017-05-31 00:43:14.411] [DEBUG] Instantiate-Chaincode - TX ID is 19b1e3b2503a6c28809e34647cc9219eb32c66befdfc8e0baae7ce4e159089f1 [2017-05-31 00:43:14.411] [DEBUG] Instantiate-Chaincode - Request is [object Object] [2017-05-31 00:43:14.411] [DEBUG] Instantiate-Chaincode - TXID is 19b1e3b2503a6c28809e34647cc9219eb32c66befdfc8e0baae7ce4e159089f1 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /Users/bvellanki/install/workspace/node-workspace/-api/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error starting container: API error (404): {"message":"network vellanki-network_default not found"} at /Users/bvellanki/install/workspace/node-workspace//node_modules/grpc/src/node/src/client.js:434:17 [2017-05-31 00:43:25.070] [ERROR-Instantiate-Chaincode - instantiate proposal was bad [2017-05-31 00:43:25.070] [ERROR] Instantiate-Chaincode - instantiate proposal was bad [2017-05-31 00:43:25.070] [DEBUG] nstantiate-Chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-05-31 00:43:25.070] [DEBUG] Instantiate-Chaincode - Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at hfc.newDefaultKeyValueStore.then.then.then.then (/Users/bvellanki/install/workspace/node-workspace/instantiate-chaincode.js:200:19) (node:3196) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at hfc.newDefaultKeyValueStore.then.then.then.then (/Users/bvellanki/install/workspace/node-workspace/utils/instantiate-chaincode.js:200:19)

bkvellanki (Wed, 31 May 2017 06:39:19 GMT):
Here is the screen shot

bkvellanki (Wed, 31 May 2017 06:39:19 GMT):
Here is the screen shot from the peer log

bkvellanki (Wed, 31 May 2017 06:43:33 GMT):

Message Attachments

mizaoyu (Wed, 31 May 2017 07:33:58 GMT):
How can we get the list of all users registered in one orginization?

akdj (Wed, 31 May 2017 09:42:26 GMT):
Has joined the channel.

akdj (Wed, 31 May 2017 09:44:12 GMT):
Hi, can anybody explain me what is the chainless mode? why when I remove "--peer-defaultchain=false" in peer command I have this error : ` ``` 2017-05-24 10:06:21.732 UTC [ConnProducer] NewConnection -> ERRO 3c7 Failed connecting to orderer:7050 , error: grpc: timed out when dialing 2017-05-24 10:06:21.732 UTC [deliveryClient] connect -> ERRO 3c8 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050] ````` because, yesterday, there is someone who remove this option in the docker-compose.yaml from `hyperledger/fabric-sdk-nodetest/fixtures/docker-compose.yaml`

Vadim (Wed, 31 May 2017 09:52:16 GMT):
@akdj you need to create and join the channel, that option disables the default channel

mariogemoll (Wed, 31 May 2017 09:57:56 GMT):
Has joined the channel.

akdj (Wed, 31 May 2017 10:04:16 GMT):
@Vadim thank you, do I have to create channel with the docker-compose.yaml? or can I create after I run docker-compose up(and that I have this error) ?

Vadim (Wed, 31 May 2017 10:53:06 GMT):
@akdj I recommend you to have a look at the e2e_cli example: https://github.com/hyperledger/fabric/tree/master/examples/e2e_cli

highway (Wed, 31 May 2017 11:12:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=S4Q7DcWor7bBAZFPB) @bkvellanki Hey bkvellanki I get the same error for MSP Org2MSP when I try to make an instantiation proposal... did you find a solution yet? the chaincode installation works like a charm. I am pretty sure I implemented it as in the instantiateChaincode in the e2eUtils (https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/e2eUtils.js#L145) my orderer throws a warning: ```2017-05-31 10:52:47.273 UTC [orderer/common/deliver] Handle -> DEBU 1bcb Attempting to read seek info message 2017-05-31 10:52:47.292 UTC [orderer/common/deliver] Handle -> WARN 1bcc Error reading from stream: EOF```, but it is not very helpful to me

mizaoyu (Wed, 31 May 2017 12:31:24 GMT):
Hi everyone, after we enroll a user in an org, how can we get the list of users that have been enrolled into this org so far. I have been stucked at this for a day. Anyone please help? Thank you!

tumbleleaf (Wed, 31 May 2017 12:44:43 GMT):
hello world - I'm following the build instructions on github and right away run into problems running 'npm install' - it complains about a few deprecated dependencies and then throws error code 128

tumbleleaf (Wed, 31 May 2017 12:46:09 GMT):
log shows Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)

highway (Wed, 31 May 2017 13:18:52 GMT):
@bkvellanki found the solution... peer was not (correctly) joined to the channel

highway (Wed, 31 May 2017 13:19:20 GMT):
After joining the peer to the channel it worked

thakkarparth007 (Wed, 31 May 2017 13:24:22 GMT):
When does the transaction event get emitted from a peer? When the transaction gets committed/rejected? So does that mean the BLOCK_EVENT corresponding to the block having that transaction gets emitted before the TxEvent?

glotov (Wed, 31 May 2017 13:41:37 GMT):
Are there plans to upgrade [the sdk example](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QT7fJsFHiuEPRCA7D) to work with fabric 1.0 alpha2 in the near future?

glotov (Wed, 31 May 2017 13:41:37 GMT):
Are there plans to upgrade [the sdk example](https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer) to work with fabric 1.0 alpha2 in the near future?

glotov (Wed, 31 May 2017 13:42:53 GMT):
Are there plans to upgrade [the sdk example](https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer) to work with fabric 1.0 alpha2 in the near future?

bkvellanki (Wed, 31 May 2017 13:50:58 GMT):
@highway I did not get any errors when it joined the channel. It says it was successfully joined. How did u fix it or debug it

Asara (Wed, 31 May 2017 14:06:24 GMT):
Hey guys, what is the difference between FabricCAServices and FabricCAClient?

Asara (Wed, 31 May 2017 14:06:42 GMT):
Which of these should be used for registration/enrollment etc?

highway (Wed, 31 May 2017 14:14:59 GMT):
@bkvellanki It just worked after I rejoined the peers. I debugged it by tracing through the fabric/fabric-node-sdk source code files on github... at a certain point (after reverse engineering the stuff around the SignatureHeader) I got the idea that the problem is somehow attached to the channel membership... it also helped to output the grpc log traces... but only for excluding the potential problem of transmitting wrong or incomplete data... maybe you can try to disconnect and connect again to the channel or to create a new channel?

jyg007 (Wed, 31 May 2017 15:21:08 GMT):
Has joined the channel.

bkvellanki (Wed, 31 May 2017 15:38:44 GMT):
2017-05-31 15:23:31.240 UTC [dockercontroller] func2 -> INFO 41d Container dev-peer0.org1.example.com-bhload02-v02 has closed its IO channel @highway...e2e works after i rebuilt the whole fabric-sdk-node again.. Now when i start using the chaincode..Install chaincode works very well but when i start with my chanincode..for some reson..it container was not able to start..Here are the logs from.. the peer..2017-05-31 15:23:31.313 UTC [dockercontroller] Start -> ERRO 41e start-could not start container API error (404): {"message":"network bcs-sl-network not found"} 2017-05-31 15:23:31.313 UTC [container] unlockContainer -> DEBU 41f container lock deleted(dev-peer0.org1.example.com-bhload02-v02) 2017-05-31 15:23:31.313 UTC [chaincode] Launch -> ERRO 420 launchAndWaitForRegister failed Error starting container: API error (404): {"message":"network bcs-sl-network not found"} 2017-05-31 15:23:31.313 UTC [lockbasedtxmgr] Done -> DEBU 421 Done with transaction simulation / query execution [81456652-0a05-45bf-8c03-b95a555d5093] 2017-05-31 15:27:20.732 UTC [eventhub_producer] Chat -> ERRO 422 error during Chat, stopping handler: stream error: code = 1 desc = "context canceled"

bkvellanki (Wed, 31 May 2017 15:38:44 GMT):
@highway 2017-05-31 15:23:31.240 UTC [dockercontroller] func2 -> INFO 41d Container dev-peer0.org1.example.com-bhload02-v02 has closed its IO channel @highway...e2e works after i rebuilt the whole fabric-sdk-node again.. Now when i start using the chaincode..Install chaincode works very well but when i start with my chanincode..for some reson..it container was not able to start..Here are the logs from.. the peer..2017-05-31 15:23:31.313 UTC [dockercontroller] Start -> ERRO 41e start-could not start container API error (404): {"message":"network bcs-sl-network not found"} 2017-05-31 15:23:31.313 UTC [container] unlockContainer -> DEBU 41f container lock deleted(dev-peer0.org1.example.com-bhload02-v02) 2017-05-31 15:23:31.313 UTC [chaincode] Launch -> ERRO 420 launchAndWaitForRegister failed Error starting container: API error (404): {"message":"network bcs-sl-network not found"} 2017-05-31 15:23:31.313 UTC [lockbasedtxmgr] Done -> DEBU 421 Done with transaction simulation / query execution [81456652-0a05-45bf-8c03-b95a555d5093] 2017-05-31 15:27:20.732 UTC [eventhub_producer] Chat -> ERRO 422 error during Chat, stopping handler: stream error: code = 1 desc = "context canceled"

bkvellanki (Wed, 31 May 2017 15:42:21 GMT):
@highway i see the image created but it is not getting started

bkvellanki (Wed, 31 May 2017 15:42:22 GMT):
2017-05-31 15:23:19.743 UTC [container] lockContainer -> DEBU 40f waiting for container(dev-peer0.org1.example.com-bhload02-v02) lock 2017-05-31 15:23:19.743 UTC [container] lockContainer -> DEBU 410 got container (dev-peer0.org1.example.com-bhload02-v02) lock 2017-05-31 15:23:19.743 UTC [dockercontroller] Start -> DEBU 411 Cleanup container dev-peer0.org1.example.com-bhload02-v02 2017-05-31 15:23:19.744 UTC [dockercontroller] stopInternal -> DEBU 412 Stop container dev-peer0.org1.example.com-bhload02-v02(No such container: dev-peer0.org1.example.com-bhload02-v02) 2017-05-31 15:23:19.745 UTC [dockercontroller] stopInternal -> DEBU 413 Kill container dev-peer0.org1.example.com-bhload02-v02 (No such container: dev-peer0.org1.example.com-bhload02-v02) 2017-05-31 15:23:19.745 UTC [dockercontroller] stopInternal -> DEBU 414 Remove container dev-peer0.org1.example.com-bhload02-v02 (No such container: dev-peer0.org1.example.com-bhload02-v02) 2017-05-31 15:23:19.745 UTC [dockercontroller] Start -> DEBU 415 Start container dev-peer0.org1.example.com-bhload02-v02 2017-05-31 15:23:19.745 UTC [dockercontroller] createContainer -> DEBU 416 Create container: dev-peer0.org1.example.com-bhload02-v02 2017-05-31 15:23:19.746 UTC [dockercontroller] Start -> DEBU 417 start-could not find image ...attempt to recreate image no such image 2017-05-31 15:23:19.749 UTC [chaincode-platform] generateDockerfile -> DEBU 418 FROM hyperledger/fabric-baseos:x86_64-0.3.0 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="bhload02" \ org.hyperledger.fabric.chaincode.id.version="v02" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.0-alpha2" \ org.hyperledger.fabric.base.version="0.3.0" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.0-alpha2 ENV CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt COPY peer.crt /etc/hyperledger/fabric/peer.crt 2017-05-31 15:23:31.053 UTC [dockercontroller] deployImage -> DEBU 419 Created image: dev-peer0.org1.example.com-bhload02-v02 2017-05-31 15:23:31.054 UTC [dockercontroller] Start -> DEBU 41a start-recreated image successfully 2017-05-31 15:23:31.054 UTC [dockercontroller] createContainer -> DEBU 41b Create container: dev-peer0.org1.example.com-bhload02-v02 2017-05-31 15:23:31.216 UTC [dockercontroller] createContainer -> DEBU 41c Created container: dev-peer0.org1.example.com-bhload02-v02 2017-05-31 15:23:31.240 UTC [dockercontroller] func2 -> INFO 41d Container dev-peer0.org1.example.com-bhload02-v02 has closed its IO channel

bkvellanki (Wed, 31 May 2017 15:43:34 GMT):
Any thoughts

bkvellanki (Wed, 31 May 2017 15:43:51 GMT):
BTW e2e works after deleting and rebuilding all

wfh19926658 (Wed, 31 May 2017 17:34:21 GMT):
Has joined the channel.

wfh19926658 (Wed, 31 May 2017 17:34:31 GMT):
Hitting channel create error. Has anyone encountered this before? E0531 11:08:56.724384270 63937 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/wfh/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/home/wfh/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/home/wfh/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12)" Failed to create the channel (mychannel1) Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/wfh/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/home/wfh/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/home/wfh/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/home/wfh/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12) Thanks for the help!

bkvellanki (Wed, 31 May 2017 18:53:05 GMT):
@jimthematrix @highway info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/bcs-sl-hfc-kvs_peerOrg1"}} error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: cannot get package for the chaincode to be instantiated (bhload01:v01)-cannot retrieve package for chaincode bhload01/v01, error open /var/hyperledger/production/chaincodes/bhload01.v01: no such file or directory

bkvellanki (Wed, 31 May 2017 18:54:41 GMT):
Any idea why this happens..I loggged in to the container and i see the chaincode..But when i instantiate i get this error

bkvellanki (Wed, 31 May 2017 18:55:07 GMT):
at /Users/bvellanki/install/workspace/node-workspace/bcs-sl-api/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Error starting container: API error (404): {"message":"network bcsslhfc_default not found"}

bkvellanki (Wed, 31 May 2017 18:55:32 GMT):
Guys..Any help is appreciated on a POC - Urgent

bkvellanki (Wed, 31 May 2017 18:56:48 GMT):
Once I do this instantiation..It is almost done..All the other calls working..except this..

jimthematrix (Wed, 31 May 2017 20:09:38 GMT):
@bkvellanki you posted a few errors above, for this one `could not start container API error (404): {"message":"network bcs-sl-network not found"}` you need to double check if the docker network "bcs-sl-network" is correct (looks like it's not)

bkvellanki (Wed, 31 May 2017 20:10:00 GMT):
yes it is

bkvellanki (Wed, 31 May 2017 20:10:14 GMT):
I double checked it

jimthematrix (Wed, 31 May 2017 20:10:30 GMT):
for the latest error `error open /var/hyperledger/production/chaincodes/bhload01.v01: no such file or directory` it points to failed install

bkvellanki (Wed, 31 May 2017 20:11:14 GMT):
yeah..But i look in to the peer..but i could not see it

bkvellanki (Wed, 31 May 2017 20:11:20 GMT):
I am missing something

holocron (Wed, 31 May 2017 21:04:30 GMT):
Has left the channel.

rmohta (Thu, 01 Jun 2017 00:22:18 GMT):
How do I get the value from the data sent by CC Event using `stub.SetEvent(newPaymentEvent, []byte(trackingId))`. The event object that the callback gets has chaincode_id, tx_id, event_name and bunch of numbers.

rmohta (Thu, 01 Jun 2017 00:22:18 GMT):
How do I get the value from the data sent by CC Event using `stub.SetEvent(eventName, []byte(assetId))`. The event object that the callback gets has chaincode_id, tx_id, event_name and bunch of numbers.

rmohta (Thu, 01 Jun 2017 00:57:53 GMT):
@jimthematrix if you could help with this please? ^^

rmohta (Thu, 01 Jun 2017 04:10:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xfJWNBRQbKForedJy) @rmohta Found it.Had to read about `bytebuffer` library.

kmohanar (Thu, 01 Jun 2017 05:01:39 GMT):
Has joined the channel.

LordGoodman (Thu, 01 Jun 2017 08:00:06 GMT):
I clone the recently fabric-sdk-node and run the command "test/integration/e2e.js" .``` error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:229:12)" not ok 9 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:229:12) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then.then.then.then (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:215:5) ... ok 10 Successfully waited to make sure new channel was created. # ***** End-to-end flow: join channel ***** I used the test/fixtura/docker-compose.yaml to setup the container cluster ```

LordGoodman (Thu, 01 Jun 2017 08:00:25 GMT):
I used the test/fixtura/docker-compose.yaml to setup the container cluster

JasonD (Thu, 01 Jun 2017 08:08:20 GMT):
kind of stuck in this error several days, is this a bug? if so, how long will be fixed? https://jira.hyperledger.org/browse/FAB-4254

ccorley (Thu, 01 Jun 2017 12:37:45 GMT):
Has joined the channel.

akdj (Thu, 01 Jun 2017 15:07:48 GMT):
how to use API REST with hyperledger v1.0.0-alpha2 ?

akdj (Thu, 01 Jun 2017 15:07:48 GMT):
how to use API REST with hyperledger fabric v1.0.0-alpha2 ?

akdj (Thu, 01 Jun 2017 15:08:00 GMT):
fabric

LordGoodman (Thu, 01 Jun 2017 15:11:25 GMT):
@akdj no way

LordGoodman (Thu, 01 Jun 2017 15:12:09 GMT):
hyperledger fabric v1.0.0 doesn't support rest api anymore

akdj (Thu, 01 Jun 2017 15:12:11 GMT):
so how I send command to the system? only with perr cli ?

akdj (Thu, 01 Jun 2017 15:12:11 GMT):
so how I send command to the system? only with peer cli ?

LordGoodman (Thu, 01 Jun 2017 15:12:27 GMT):
cli and grpc

LordGoodman (Thu, 01 Jun 2017 15:12:48 GMT):
grpc which means you need to use the sdk tools

akdj (Thu, 01 Jun 2017 15:13:27 GMT):
ok

akdj (Thu, 01 Jun 2017 15:14:17 GMT):
Will api rest be added later? @LordGoodman

LordGoodman (Thu, 01 Jun 2017 15:15:16 GMT):
It won't be part of systeam anymore

akdj (Thu, 01 Jun 2017 15:15:52 GMT):
ok thanks!

akdj (Thu, 01 Jun 2017 15:26:00 GMT):
@LordGoodman Is there a document about how to write an application nodejs step by step? because i tried the test example in fabric-sdk-node repository, and it's look like very hard to write one similar application by myself....

AccentSandy (Thu, 01 Jun 2017 15:36:26 GMT):
Has joined the channel.

AccentSandy (Thu, 01 Jun 2017 15:38:14 GMT):
@akdj Did you try going through this section of the hyperledger composer documentation https://hyperledger.github.io/composer/applications/getting-started-nodejs-app.html . It walks you through sample node.js application. Not sure if you are using Hyperledger composer or not

MartinC (Thu, 01 Jun 2017 15:44:59 GMT):
I am trying to use the sdk to connect a local node app to a local fabric-sample network. I've looked in the docs but can't find anything that describes how I should be configuring the various certificates to the sdk, have I missed something?

akdj (Thu, 01 Jun 2017 15:56:29 GMT):
@AccentSandy no I am not using this, I tried the online version one time(with this , but I am still confused

akdj (Thu, 01 Jun 2017 15:56:29 GMT):
@AccentSandy no I am not using this, I tried the online version one time(with this https://cdn.oreillystatic.com/en/assets/1/event/214/Blockchain%20development%20fundamentals%20on%20Hyperledger%20fabric%20Presentation.pdf) , but I am still confused

MartinC (Thu, 01 Jun 2017 15:58:15 GMT):
My current code is failing to connect with SSL errors `Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.` which google tells me is an issue with the CA certificate. Any pointers on how I should be configuring the CA cert to the sdk would help me, thanks.

LordGoodman (Thu, 01 Jun 2017 16:01:35 GMT):
@MartinC How do you connect the fabric systeam

LordGoodman (Thu, 01 Jun 2017 16:03:26 GMT):
@akdj try to understand test/integration/e2e dir under the fabric-sdk-node, there is no document can help you.

MartinC (Thu, 01 Jun 2017 16:35:15 GMT):
@LordGoodman Thanks for asking, I am attempting to do Peer.queryChannels. In trying to describe what I am doing I have spotted a gap in the logic so I will fix that and then ask again if I am still having issues.

vdods (Thu, 01 Jun 2017 22:37:13 GMT):
Can anyone tell me why fabric-client was designed such that one must call setUserContext on the client object in order to specify which user is transacting, instead of passing in the User object to those calls? Having the client be stateful like this makes it so much harder to reason about the program flow because of the side effects and hidden state.

vdods (Thu, 01 Jun 2017 22:38:15 GMT):
The old v0.6 OO model where the User (formerly Member) object had transaction methods was much clearer.

greg.haskins (Fri, 02 Jun 2017 00:46:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Zp76voPz5fFJ6LsQS) @MartinC You can follow my sample program here that consumes this configuration: https://github.com/hyperledger/fabric-chaintool/blob/master/examples/example02/client/nodejs/client.config

greg.haskins (Fri, 02 Jun 2017 00:46:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=G58mrCyRr8w86Ydqg) @MartinC You can follow my sample program here that consumes this configuration: https://github.com/hyperledger/fabric-chaintool/blob/master/examples/example02/client/nodejs/client.config

greg.haskins (Fri, 02 Jun 2017 00:49:09 GMT):
I then feed that config to the SDK here: https://github.com/hyperledger/fabric-chaintool/blob/master/examples/example02/client/nodejs/client.js#L66

greg.haskins (Fri, 02 Jun 2017 00:49:21 GMT):
here: https://github.com/hyperledger/fabric-chaintool/blob/master/examples/example02/client/nodejs/client.js#L73

greg.haskins (Fri, 02 Jun 2017 00:49:40 GMT):
here: https://github.com/hyperledger/fabric-chaintool/blob/master/examples/example02/client/nodejs/client.js#L94

greg.haskins (Fri, 02 Jun 2017 00:49:41 GMT):
etc

greg.haskins (Fri, 02 Jun 2017 00:54:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LH9i6Rm8i7NLgNPfA) @vdods I would agree with you on this front...there are various elements of state that have crept into the design....also, related to this, theres probably opportunities to improve the flow in general like having a channel object that is constructed via discovery

vdods (Fri, 02 Jun 2017 00:55:36 GMT):
@greg.haskins Thanks -- also, I'm still working on an app to contribute to the alpha2 challenge. Just untangling js code right now ;)

jimthematrix (Fri, 02 Jun 2017 04:30:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xfJWNBRQbKForedJy) @rmohta the "bunch of numbers" is the bytes for `ChaincodeEvent.payload` which is the byte[] argument of the `stub.SetEvent` method

jimthematrix (Fri, 02 Jun 2017 04:32:24 GMT):
@LordGoodman if you `docker ps -a` what's the status of the orderer service? it would seem the orderer service is down

jimthematrix (Fri, 02 Jun 2017 04:33:55 GMT):
@JasonD try pinging @muralisr or ask on the #fabric-peer-endorser-committer channel, this is not an SDK issue

prashiyn (Fri, 02 Jun 2017 04:35:37 GMT):
@jimthematrix Is it necessary to create a new client and a channel for every interaction with the blockchain as shown in e2e as well as the balance transfer example?

jimthematrix (Fri, 02 Jun 2017 04:36:18 GMT):
@akdj REST API is being re-worked (to be implemented as a separate component from peers and based on node SDK): https://jira.hyperledger.org/browse/FAB-156

jimthematrix (Fri, 02 Jun 2017 04:36:28 GMT):
@MartinC is leading that effort

jimthematrix (Fri, 02 Jun 2017 04:48:48 GMT):
@vdods the current design is optimized for having the app/SDK use "server identities" to transact with the fabric, instead of propagating authenticated user identities to the fabric, if you are familiar with Java EE EJB (sorry for such an arcane analogy ;-) but it actually maps exactly the same) it's the same idea as "run-as-server". in a typical configuration the fabric does not differentiate b/w individual users, only their orgs (mspId, org unit) and role (admin vs. member). so it'd be a good practice to have the app assume a limited number of identities to transact with the fabric. manage the user authentication and authorization with the app and map them to the proper "fabric identity" for transacting

jimthematrix (Fri, 02 Jun 2017 04:50:11 GMT):
that said, you can still use different client instance (one for each user) or switch user context. are you seeing problems with this API? we'd love to understand the details

jimthematrix (Fri, 02 Jun 2017 04:51:27 GMT):
@prashiyn not necessary

jimthematrix (Fri, 02 Jun 2017 04:52:56 GMT):
and in fact in the balance-transfer example the same two client instances (client1 and client2) are re-used across requests

jimthematrix (Fri, 02 Jun 2017 04:52:56 GMT):
and in fact in the balance-transfer example the same two client instances (client1 and client2) are re-used across requests, client1 for users in org1 and client2 for org2

jimthematrix (Fri, 02 Jun 2017 04:52:56 GMT):
and in fact in the balance-transfer example the same two client instances (client1 and client2) are re-used across requests, client1 for any user in org1 and client2 for org2

LordGoodman (Fri, 02 Jun 2017 04:57:59 GMT):
@jimthematrix the orderer is good, I reset the the fabric-sdk-node code to b02f7a and it work

prashiyn (Fri, 02 Jun 2017 04:59:02 GMT):
@jimthematrix so When I initiate a chaincode ( after creating a channel and deploying the chain code) i get the following error `Failed to deserialize creator identity, err MSP PrimaryMSP is unknown` . Digging into the fabric code, this arises because `msp := mgr.mspsMap[sId.Mspid]` . However the chaincode was deployed with the signatures of the admin of PrimaryMSP... what might be going wrong.

JasonD (Fri, 02 Jun 2017 05:25:03 GMT):
@jimthematrix ok, got it

JasonD (Fri, 02 Jun 2017 05:25:07 GMT):
thanks

bob346 (Fri, 02 Jun 2017 09:03:15 GMT):
Has joined the channel.

bob346 (Fri, 02 Jun 2017 09:03:47 GMT):
how to create custom channel using nodeJS ??

Gerard9494 (Fri, 02 Jun 2017 09:53:34 GMT):
Hello to everyone, How can I get the tls_certificate? I'm trying to find out where to get the pem, but I don't find it. Thank you very much in advance!

prashiyn (Fri, 02 Jun 2017 11:00:01 GMT):
@Gerard9494 look up cryptotool in the fabric repository. check http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html#crypto-generator and you can create your key material

bob346 (Fri, 02 Jun 2017 11:36:16 GMT):
I am using creating channel using hfc-node module.

bob346 (Fri, 02 Jun 2017 11:36:35 GMT):
but it throws err:error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-06-02 17:03:14.348] [ERROR] Create-Channel - Error: BAD_REQUEST

bob346 (Fri, 02 Jun 2017 11:37:17 GMT):
at ClientDuplexStream. fabric-client/lib/Orderer.js:95:21

bob346 (Fri, 02 Jun 2017 11:37:19 GMT):
at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:191:7) at readableAddChunk (_stream_readable.js:178:18) at ClientDuplexStream.Readable.push (_stream_readable.js:136:10)

bob346 (Fri, 02 Jun 2017 11:37:59 GMT):
at readCallback @grpc/src/node/src/client.js:245:14

bob346 (Fri, 02 Jun 2017 11:38:19 GMT):
can anybody help me.

bob346 (Fri, 02 Jun 2017 11:49:55 GMT):
{"status":"BAD_REQUEST"} form broadcast.on('data', function (response)

bob346 (Fri, 02 Jun 2017 11:49:55 GMT):
in Orderer.js

bob346 (Fri, 02 Jun 2017 12:14:01 GMT):
{"status":"BAD_REQUEST"} from broadcast.on('error', function (err) { method in Orderer.js

bob346 (Fri, 02 Jun 2017 12:14:15 GMT):
can anybody help me.!!

Gerard9494 (Fri, 02 Jun 2017 12:37:19 GMT):
@prashiyn perfect! Thanks

prashiyn (Fri, 02 Jun 2017 13:41:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=q24GRP5zWHn7C5D3C) @prashiyn mgr.mspsMap is empty

SyneBlockChainTeam (Fri, 02 Jun 2017 14:03:33 GMT):
We imported one go file in example_cc.go like 'helper.go' After starting running node js app when we run test APIs then we are getting error of error: [Peer.js]: GRPC client got an error response from the peer "grpcs://localhost:7056". Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/example_cc.go" cannot find package "helper" Although I included mapping volumns in docker-compose.yml. I changed helper.go file location many places but it is showing same error. Please let us know is anything missing or where we can put imported file 'helper.go' to access it to example_cc.go file

martijnwouters (Fri, 02 Jun 2017 15:00:19 GMT):
Has joined the channel.

martijnwouters (Fri, 02 Jun 2017 15:04:18 GMT):
Hi all, I've a problem with the max message size of the of the peer response: `error: [Peer.js]: GRPC client got an error response from the peer "grpcs://p0.org0:7051". Error: Received message larger than max (4202697 vs. 4194304) at /usr/src/app/node_modules/grpc/src/node/src/client.js:434:17 error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Received message larger than max (4202697 vs. 4194304) at /usr/src/app/node_modules/grpc/src/node/src/client.js:434:17` Is there any way to set this max_message_size from the fabric client? Or does anyone have a suggestion on what to do to resolve this issue?

mastersingh24 (Fri, 02 Jun 2017 15:44:29 GMT):
@jimthematrix @bretharrison - you guys mind if I take over FAB-2787 ? If we get https://gerrit.hyperledger.org/r/#/c/10071/1 and look at upgrading grpc in the SDK I think we will have an out of the box solution

mastersingh24 (Fri, 02 Jun 2017 15:44:47 GMT):
take over for a little while at least ;)

vdods (Fri, 02 Jun 2017 16:29:00 GMT):
Hi all, I'm having a problem with channel creation, and I'm not 100% sure why, but I have a feeling I'm missing some step in user creation. The error I'm encountering is ``` webserver | debug: creating channel with name "mychannel" webserver | debug: via orderer: {"_options":{"grpc.ssl_target_name_override":"orderer.example.com","grpc.default_authority":"orderer.example.com","grpc.primary_user_agent":"grpc-node/1.2.4"},"_url":"grpcs://orderer.example.com:7050","_endpoint":{"addr":"orderer.example.com:7050","creds":{}},"_request_timeout":3000,"_ordererClient":{"$channel":{}}} webserver | E0602 16:13:55.193703811 29 ssl_transport_security.c:651] Invalid cipher list: undefined. webserver | E0602 16:13:55.193809698 29 security_connector.c:837] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. webserver | E0602 16:13:55.193814282 29 secure_channel_create.c:127] Failed to create secure subchannel for secure name 'orderer.example.com:7050' webserver | E0602 16:13:55.193816669 29 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. webserver | error: [Orderer.js]: sendBroadcast - timed out after:3000 webserver | error: Error: REQUEST_TIMEOUT webserver | at Timeout._onTimeout (/home/minion/node_modules/fabric-client/lib/Orderer.js:81:19) ```

vdods (Fri, 02 Jun 2017 16:30:48 GMT):
I've tried using the Client's createChannel method via the name,orderer,envelope args, as well as the name,orderer,config,signatures,txId,nonce args, but both result in that error.

vdods (Fri, 02 Jun 2017 16:31:55 GMT):
The one difference I'm seeing in my code relative to another (poe in ghaskin's alpha2 challenge) is that I'm only ever calling new User(...) and then setEnrollment, but never Client.createUser

bretharrison (Fri, 02 Jun 2017 16:51:01 GMT):
@mastersingh24 Sure, this is what I have seen so far - running with grpc 1.2.4 - added` 'grpc.http2.keepalive_time' : 30` to the eventhub setPeerAddr options on e2eUtils.js line 534 - run `node test/integration/e2e/invoke-transaction.js sleep=600000` Then running both GRPC logging and wireshark we are able to see TCP traffic at the 30 second mark, So we are confident that the keep alive ping is being sent

jimthematrix (Fri, 02 Jun 2017 16:52:06 GMT):
@mastersingh24 given what Bret just described above, it seems with the current grpc level we've got keepalive support

jimthematrix (Fri, 02 Jun 2017 16:52:14 GMT):
and it's something that doesn't require SDK changes

jimthematrix (Fri, 02 Jun 2017 16:53:27 GMT):
the app just needs to add that setting to the `opts` object when calling setPeerAddr() on event hub

jimthematrix (Fri, 02 Jun 2017 16:54:17 GMT):
I don't think we need to upgrade grpc either (since there are problems with it that needs investigation)

mastersingh24 (Fri, 02 Jun 2017 17:11:15 GMT):
@jimthematrix - hmm - ok - although the setting is named something different in 1.3.x looks like it is effectively the same thing. Of course you should probably also set `grpc.http2.keepalive_timeout` now that the peer and orderer support keepalive and might even want to set `grpc.http2.keepalive_permit_without_calls=true` as well. Also, we should actually always set these properties - I see no reason not to have them set by default. The default policy on the server is 300 sec so we should set `grpc.http2.keepalive_time=300` for the peer, orderer and eventhub connections. Also, I assume you'll change the min version in package.json to 1.2.4 and abandon https://gerrit.hyperledger.org/r/#/c/9971/ and https://gerrit.hyperledger.org/r/#/c/9813/ ?

jimthematrix (Fri, 02 Jun 2017 17:14:29 GMT):
yes-yes-yes (update min ver, abandon 9971, 9813) ;-)

jimthematrix (Fri, 02 Jun 2017 17:15:27 GMT):
want to give it more thought on whether to set as default: should we have a common default throughout the fabric?

jimthematrix (Fri, 02 Jun 2017 17:15:52 GMT):
sdk-peer, peer-chaincode, peer-orderer

jimthematrix (Fri, 02 Jun 2017 17:16:21 GMT):
only for the `stream` interfaces

bob346 (Fri, 02 Jun 2017 17:17:16 GMT):
How can I create custom multiple channel using node-sdk?

mastersingh24 (Fri, 02 Jun 2017 17:22:18 GMT):
@jimthematrix - I set the defaults for servers and clients in the peer to 300s so I'd suggest we go with that

mastersingh24 (Fri, 02 Jun 2017 17:22:40 GMT):
and you should do it for both the stream and rpc interfaces

mastersingh24 (Fri, 02 Jun 2017 17:22:51 GMT):
the http2 connections are persistent in both cases

jimthematrix (Fri, 02 Jun 2017 17:24:47 GMT):
I didn't include the rpc interfaces for node SDK because at the moment we kill the http connections after each request on the rpc interfaces

jimthematrix (Fri, 02 Jun 2017 17:25:21 GMT):
could change that so they are long living, but want to treat it as a separate issue and see how much change it'll require and how risky

jimthematrix (Fri, 02 Jun 2017 17:44:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Az8CJvDxSRXJr6tC2) @jimthematrix checked my notes (with Bret ;-) ) we don't do any special handling with rpc interfaces, it's the stream interface on the orderer that gets this treatment. we plan to leave that alone since changing it to use a long-lived stream will need significant code restructure that is risky at this point. can revisit after 1.0.

jimthematrix (Fri, 02 Jun 2017 17:44:47 GMT):
now back to the rpc interfaces

mastersingh24 (Fri, 02 Jun 2017 17:44:50 GMT):
how exactly do you kill them?

mastersingh24 (Fri, 02 Jun 2017 17:45:08 GMT):
they are persistent connections last time I looked

mastersingh24 (Fri, 02 Jun 2017 17:45:14 GMT):
even for rpc calls

jimthematrix (Fri, 02 Jun 2017 17:45:28 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Orderer.js#L86

mastersingh24 (Fri, 02 Jun 2017 17:45:41 GMT):
Did the Node grpc library add a way to close channels?

jimthematrix (Fri, 02 Jun 2017 17:46:44 GMT):
not sure what's done under the cover, @bretharrison may have more details

prashiyn (Fri, 02 Jun 2017 18:12:47 GMT):
@jimthematrix instantiateChaincode generates the following errors `Failed to deserialize creator identity, err MSP PrimaryMSP is unknown` . Further when i look into the fabric code, `in mspmgrImpl.go mgr.mspsMap is []` during this call. But the same map holds references to all the msp's during installChaincode. Is this a bug or Am i missing something here. Please suggest. Stuck at this for a few hours now

vdods (Fri, 02 Jun 2017 18:14:10 GMT):
@bob346 I've got a WIP sample app https://github.com/vdods/Fabric_SampleWebApp/tree/alpha2-and-config which performs generation of channel config and crypto materials. Take a look at Makefile in the project root.

vdods (Fri, 02 Jun 2017 18:14:51 GMT):
@bob346 In particular, it requires invoking the commandline tools configtxgen and cryptogen, but ostensibly this could be done from within the SDK at some point in the future.

vdods (Fri, 02 Jun 2017 18:16:04 GMT):
Note that the project itself is in a total intermediate, non-working state (simpleapp.js is where my attention is), and in fact I'm trying to get channel creation working in this myself.

vdods (Fri, 02 Jun 2017 18:17:05 GMT):
This may also be useful: http://hyperledger-fabric.readthedocs.io/en/latest/configtx.html

vdods (Fri, 02 Jun 2017 20:08:51 GMT):
Hi all, which key/cert do I need to provide to client.createUser in order to create 1) the admin User object and 2) a non-admin User object?

vdods (Fri, 02 Jun 2017 20:10:50 GMT):
I've got a huge mess of crypto material from use of cryptogen, and it's totally nonobvious what each file is for, or what their relationships are.

bobbiejc (Fri, 02 Jun 2017 22:05:41 GMT):
Is there a good 'getting started for dummies' for the sdk-node ?

bobbiejc (Fri, 02 Jun 2017 22:05:56 GMT):
i sort of recall tripping across some documentation, but this afternoon am coming up empty

bobbiejc (Fri, 02 Jun 2017 22:06:16 GMT):
@mastersingh24 ^^^

bobbiejc (Fri, 02 Jun 2017 22:06:49 GMT):
a 'learn-chain-code' equivalent would be cool

vdods (Fri, 02 Jun 2017 22:12:08 GMT):
There are starting to be reasonable example apps.. take a look at: https://github.com/vdods/Fabric_SampleWebApp and https://github.com/ghaskins/hyperledger-fabric-alpha2-challenge/tree/master/blocledger/poe

vdods (Fri, 02 Jun 2017 22:13:01 GMT):
vdods/Fabric_SampleWebApp is a fork of github.com/ratnakar-asara/Fabric_SampleWebApp, but my version is dockerized and a little easier to run

vdods (Fri, 02 Jun 2017 22:13:01 GMT):
vdods/Fabric_SampleWebApp is a fork of github.com/ratnakar-asara/Fabric_SampleWebApp, but my version is more fully dockerized and a little easier to run

vdods (Sat, 03 Jun 2017 00:19:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2Ap6MbRPzcBbdWrR3) @vdods @here Anyone have a word on this?

bobbiejc (Sat, 03 Jun 2017 03:42:33 GMT):
thanks @vdods !

prashiyn (Sat, 03 Jun 2017 04:55:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ay8jJ7fMrXQkaJf4D) @vdods So there are 4 directories that are needed for an msp, signcerts, cacerts, admincerts and keystore ... admincerts - certificate for the admin user of that MSP , signcerts - that MSP's certificate, cacerts - CA certificate used to generate certificates, keystore - the PK. So when configgen tool loads up, it actually loads up the cacerts and admincerts to register admin's for each of the peer / orderers. U need to then use the admincert + admin private key in the client to load that admin for signing and using. For members, just use the member signcert and keystore and that should be fine. I created all my certificates using fabric-ca instead of the cryptogen tool. But it should still work tho. Also make sure that the orderer MSP's cacert has the ca certificates of all the peers as well so that the orderer does not throw up nknown authority error. see the MSP section of 'read the docs' for more detailed explination

vdods (Sat, 03 Jun 2017 20:58:16 GMT):
@prashiyn Thanks. I think I'm also having a hard time understanding why there's any overlap at all between the `tls` and `msp` artifacts generated by cryptogen. In particular, when I'm calling things like `client.createUser`, I should be passing in files like `peerOrganizations/org0.example.com/users/Admin@org0.example.com/msp/keystore/e7e2ee99f2ec7a545184ad7232925cba7a41ebe45b645d154cead8f267db7359_sk` as the private key and `peerOrganizations/org0.example.com/users/Admin@org0.example.com/msp/signcerts/Admin@org0.example.com-cert.pem` as the cert? And not artifacts from the `tls` subdirs?

vdods (Sat, 03 Jun 2017 20:58:57 GMT):
I'm thinking of it this way -- say I disable TLS on all my peers/orderers. Then I shouldn't need any `tls` subdir artifacts at all, correct?

vdods (Sat, 03 Jun 2017 20:59:33 GMT):
And then I use only `msp` artifacts, which are concerned only with enrollment certification

vdods (Sat, 03 Jun 2017 21:06:41 GMT):
@prashiyn Also, I'm curious if you'd be willing to share your script for how you use fabric-ca to generate the crypto materials.

yecineoueslati (Sun, 04 Jun 2017 15:08:38 GMT):
Has joined the channel.

greg.haskins (Sun, 04 Jun 2017 21:47:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nmeauF9vtGPXhgbTy) @vdods I put this in: its for convenience

greg.haskins (Sun, 04 Jun 2017 21:47:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7G2uDa8HvhxCYEb6x) @vdods correct

prashiyn (Mon, 05 Jun 2017 05:01:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nmeauF9vtGPXhgbTy) @vdods Yes. Right now I have disabled tls. There is anyway too many moving parts to handle. So in all my docker scripts tls is disabled for now. The MSP and tls are different conceptually i presume. Ya once TLS is disabled, there is no need to pass any tls artefacts. I am taking the CA route despite too many configurations cause in a real application context, we will have different institutions having their own CA's.

prashiyn (Mon, 05 Jun 2017 05:04:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=o9sw5ndSKzGymzmLZ) @vdods Sure i can share the scripts, its not too much of scripting as much as setting some config files. So I have one fabric CA for each MSP and that CA generates MSP's localMSP as well as the certificates for MSPAdmins. I need to do some clean up ( removing real names ) before I can share the scripts. the docker file for one MSP that runs to generate all the certificates is as follows ` version: '2' ## We need to have the CA docker compose seperately as there is lot of config in ## the CA that is needed to setup the main network configurations ## Cause we need to create a whole lot of certificates. services: ordererCA: image: hyperledger/fabric-ca hostname: metisca.aanet.in environment: - FABRIC_CA_SERVER_HOME=/etc/hyperledger/ordererconfig/ca - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/ordererconfig/ca/certs/ca-cert.pem - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/ordererconfig/ca/certs/ca-key.pem - FABRIC_CA_CONFIG=/etc/hyperledger/ordererconfig/ca/fabric-ca-server-config.yaml - FABRIC_CA_TLS_ENABLED=false - FABRIC_CA_TLS_CERTFILE=/etc/hyperledger/ordererconfig/tls/cacerts/cert.pem - FABRIC_CA_TLS_KEYFILE=/etc/hyperledger/ordererconfig/tls/cacerts/cert.pem ports: - "7094:7094" command: sh -c 'sleep 1;fabric-ca-server start -d' volumes: - ./crypto/ordererconfig:/etc/hyperledger/ordererconfig container_name: ordererCA ordererCAClient: image: hyperledger/fabric-ca container_name: ordererCAClient environment: - FABRIC_CA_CLIENT_HOME=/etc/hyperledger/ordererconfig - CAURL=ordererCA:7094 - CANAME=OrdererCA - MSPUSERNAME=metisChain - MSPSECRET=metisChainOrderer - ADMINUSERNAME=ordererAdmin - ADMINSECRET=ordererAdmin - MEMBERUSERNAME=ordererMember - MEMBERSECRET=ordererMember volumes: - ./crypto/ordererconfig:/etc/hyperledger/ordererconfig # will run 3 commands in a sequence #1. enroll admin #2. register peer #3. enroll peer #4. register orderer #5. enroll orderer # long list of commands seperated by a ; # the last copy command needed fi this user is also the admin for this MSP command: > sh -c "fabric-ca-client enroll -u http://admin:adminpw@$${CAURL} --caname $${CANAME}; sleep 15;fabric-ca-client register -u http://$${CAURL} --config $${FABRIC_CA_CLIENT_HOME}/msp.yaml; sleep 15;fabric-ca-client enroll -u http://metisChain:metisChainOrderer@$${CAURL} -M ../ordererconfig/mspConfig --config $${FABRIC_CA_CLIENT_HOME}/msp.yaml; sleep 15;fabric-ca-client register -u http://$${CAURL} --config $${FABRIC_CA_CLIENT_HOME}/admin.yaml; sleep 15;fabric-ca-client enroll -u http://ordererAdmin:ordererAdmin@$${CAURL} -M ../ordererconfig/users/admin --config $${FABRIC_CA_CLIENT_HOME}/admin.yaml; sleep 15;fabric-ca-client register -u http://$${CAURL} --config $${FABRIC_CA_CLIENT_HOME}/member.yaml; sleep 15;fabric-ca-client enroll -u http://ordererMember:ordererMember@$${CAURL} -M ../ordererconfig/users/member --config $${FABRIC_CA_CLIENT_HOME}/member.yaml; sleep 5;cp /etc/hyperledger/ordererconfig/users/admin/signcerts/cert.pem /etc/hyperledger/ordererconfig/mspConfig/admincerts/cert.pem" depends_on: - ordererCA links: - ordererCA `

paul.sitoh (Mon, 05 Jun 2017 07:33:23 GMT):
@jimthematrix I just notice that your balance transfer local fabric installation has just changer to this https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/artifacts/docker-compose.yaml what happened to the images for ccenv and kafka? (see this https://github.com/hyperledger/fabric-sdk-node/commit/63ea71d23bbdac3aa7c2d642e8defcddc246ade8#diff-da0245b13d3fdd5c6ecd348021515478)

paul.sitoh (Mon, 05 Jun 2017 07:34:03 GMT):
Are they not needed anymore?

richard.holzeis (Mon, 05 Jun 2017 08:18:54 GMT):
Has joined the channel.

bmalavan (Mon, 05 Jun 2017 08:28:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KtJRYMrw6MWBczYaa) @prashiyn Interesting. Thanks for sharing.

MartinC (Mon, 05 Jun 2017 08:38:04 GMT):
@greg.haskins Thanks for pointing me at that configuration and source, i now have a working connection querying channels. My error was using the peer's public certificate for the peer PEM, instead of CA's public cert.

SyneBlockChainTeam (Mon, 05 Jun 2017 11:33:28 GMT):
@jimthematrix

SyneBlockChainTeam (Mon, 05 Jun 2017 11:38:36 GMT):
Hi @jimthematrix , We have implemented chaincode (ex. sample.go) with main, invoke,query,apis and we have helper file (ex.library.go) without main which acts as library file for main chaincode. When we instantiate using Nodejs we are getting below error: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/chaincode/sample.go:9:2: cannot find package "github.com/hyperledger/mortgage/release/samples/prototype/chaincodes/library" Could you please let us know if there specific way to import library files(ex.library.go) inside chaincode? Looking forward to you reply.

yecineoueslati (Mon, 05 Jun 2017 11:51:11 GMT):
hello, i am trying to run the e2e tests but i get an error in instantiate test.

yecineoueslati (Mon, 05 Jun 2017 11:51:25 GMT):

Message Attachments

Aleks-visser (Mon, 05 Jun 2017 11:51:48 GMT):
steps

Aleks-visser (Mon, 05 Jun 2017 11:52:07 GMT):
1.make docker, couchdb in fabric

Aleks-visser (Mon, 05 Jun 2017 11:52:12 GMT):
2 make docker in ca

Aleks-visser (Mon, 05 Jun 2017 11:52:40 GMT):
3 run network_setup.sh up

Aleks-visser (Mon, 05 Jun 2017 11:53:01 GMT):
then npm test i do believe

Aleks-visser (Mon, 05 Jun 2017 11:53:12 GMT):
Thats all you need to run , no more or less

yecineoueslati (Mon, 05 Jun 2017 11:54:45 GMT):
i fallowed these steps and get an error in node test/integration/e2e/instantiate-chaincode.js

Aleks-visser (Mon, 05 Jun 2017 11:55:06 GMT):
then your version of node is broken

yecineoueslati (Mon, 05 Jun 2017 11:55:22 GMT):
i think that it is related to timeout

Aleks-visser (Mon, 05 Jun 2017 11:55:25 GMT):
also you need libgen

yecineoueslati (Mon, 05 Jun 2017 11:55:45 GMT):
node v6.10.1

Aleks-visser (Mon, 05 Jun 2017 11:56:06 GMT):
ah

Aleks-visser (Mon, 05 Jun 2017 11:56:27 GMT):
your issue there, try 4.9.5

Aleks-visser (Mon, 05 Jun 2017 11:56:44 GMT):
yes its annoying, dl nvm to save yoursef time

Aleks-visser (Mon, 05 Jun 2017 11:56:57 GMT):
but 6.10.1 is not supported

yecineoueslati (Mon, 05 Jun 2017 11:59:27 GMT):
ok thx

ambatigaan (Mon, 05 Jun 2017 12:13:06 GMT):
Has joined the channel.

greg.haskins (Mon, 05 Jun 2017 13:55:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4tdWX85DQrhFvdekG) @MartinC +1

jimthematrix (Mon, 05 Jun 2017 14:33:15 GMT):
hi everyone, note that the examples/balance-transfer sample web app has been just ported to the latest master and merged over the weekend: https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer

jimthematrix (Mon, 05 Jun 2017 14:35:52 GMT):
besides porting the application code forward from alpha to the latest (close to beta), I also simplified the invocation of the REST APIs, no longer need the `x-access-token` header, just the regular `authorization` header with the Bearer token

jimthematrix (Mon, 05 Jun 2017 14:41:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7dZSQABxQwM2Tyth7) @paul.sitoh ccenv was not needed to be available ahead of time any longer (https://gerrit.hyperledger.org/r/#/c/9379/ by @greg.haskins ). I eliminated Kafka from the set up to simplify it. since the sample is to demonstrate the application coding aspect, kafka or solo orderer makes no difference to the value of the sample. for samples on using kafka based orderer see the official doc in http://hyperledger-fabric.readthedocs.io/

paul.sitoh (Mon, 05 Jun 2017 14:43:56 GMT):
@jimthematrix one more thing, how did you run the orderer images without tags (alpha or alpha2) I checked docker hub and there is no latest tag?

jimthematrix (Mon, 05 Jun 2017 14:44:16 GMT):
had to build locally

jimthematrix (Mon, 05 Jun 2017 14:44:30 GMT):
from fabric git repo

paul.sitoh (Mon, 05 Jun 2017 14:44:39 GMT):
Ah ok

jimthematrix (Mon, 05 Jun 2017 14:45:07 GMT):
as explained here https://gerrit.hyperledger.org/r/#/c/10091/, when the beta goes out, these temporary changes will be removed

jimthematrix (Mon, 05 Jun 2017 14:45:21 GMT):
so the sample can run against the beta level artefacts

jimthematrix (Mon, 05 Jun 2017 14:46:06 GMT):
please feel free to give the updated sample a try and let us know if any problems or suggestions for improvements

paul.sitoh (Mon, 05 Jun 2017 14:47:51 GMT):
Thanks. On another note, in case you know. I am running orderer alpha 2 and I got this error

paul.sitoh (Mon, 05 Jun 2017 14:48:43 GMT):

Message Attachments

paul.sitoh (Mon, 05 Jun 2017 14:48:48 GMT):
Any idea what this means?

paul.sitoh (Mon, 05 Jun 2017 14:49:50 GMT):
It is based on your balance transfer compose file. Only thing is I tag alpha2

greg.haskins (Mon, 05 Jun 2017 14:50:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=s7HdNNdrTEk4D4nzs) @paul.sitoh generally speaking, anything you see that refers to ":latest" falls into two camps

greg.haskins (Mon, 05 Jun 2017 14:50:44 GMT):
1) facilities that were meant to be used in a fabric-development flow (local fabric development publishes :latest tags)

greg.haskins (Mon, 05 Jun 2017 14:51:27 GMT):
2) fabric-user flows that have some kind of "setup" logic, like a script that pulls down from dockerhub and retags the image

greg.haskins (Mon, 05 Jun 2017 14:52:02 GMT):
this has been a source of great confusion to many users, so don't feel too bad about this not being clear

chris.loza (Mon, 05 Jun 2017 16:41:11 GMT):
Has joined the channel.

vdods (Mon, 05 Jun 2017 18:14:57 GMT):
@prashiyn Thanks, that was quite helpful! I talked to mastersingh24 and he confirmed that TLS and MSP are independent. They're thinking of enhancing the cryptogen tool to show that separation, but it hasn't been a priority. He also indicated that it's possible to generate TLS materials via fabric-ca.

vdods (Mon, 05 Jun 2017 19:20:47 GMT):
Hi all, I've got a question regarding the correspondence between instances of the Client class and organizations. In some examples, there is 1 orderer org and 2 peer orgs. Should there be one client per org? It seems like the persistence for a client corresponds to the namespace of an org -- i.e. Client.getUserContext requires the "name" of the requested user, which presumably would refer to a name within the context of a single org. Thus a Client instance should correspond to a single org. Is that correct?

vdods (Mon, 05 Jun 2017 19:21:05 GMT):
And if that's so, then should the orderer orgs each have their own Client instances?

richard.holzeis (Mon, 05 Jun 2017 20:01:40 GMT):
Hi, I am looking for an fabric-sdk-node example. Unfortunately, the sample application linked on http://fabric-sdk-node.readthedocs.io/en/latest/sample-web-app/ does not work. Can you recommend any helpful material?

shimos (Mon, 05 Jun 2017 20:38:32 GMT):
Has joined the channel.

eddie.allen (Mon, 05 Jun 2017 20:51:44 GMT):
Has joined the channel.

vdods (Mon, 05 Jun 2017 21:30:14 GMT):
@richard.holzeis Take a look at https://github.com/ghaskins/hyperledger-fabric-alpha2-challenge/tree/master/blocledger/poe

vdods (Mon, 05 Jun 2017 21:30:40 GMT):
Ostensibly there are more examples coming. I'm working on one, though I'm learning as I go, so it's taking a little longer than I'd like :)

greg.haskins (Mon, 05 Jun 2017 22:57:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4u25cGJL2BJmN9KH3) @richard.holzeis There is also an example here: https://github.com/hyperledger/fabric-chaintool/tree/master/examples/example02/client/nodejs

greg.haskins (Mon, 05 Jun 2017 22:58:12 GMT):
Despite it being a chaintool example, there is very little difference between a chaintool client and a regular golang-chaincode client (just the protobuf encoding)

greg.haskins (Mon, 05 Jun 2017 22:59:30 GMT):
The client that I have in the alpha2-challenge is actually the same client, but written in clojurescript (https://github.com/ghaskins/hyperledger-fabric-alpha2-challenge/tree/master/ghaskins/example02/client)

greg.haskins (Mon, 05 Jun 2017 22:59:58 GMT):
I highlight that because the clojurescript example does a better job of isolating the parts that are chaintool specific

greg.haskins (Mon, 05 Jun 2017 23:00:06 GMT):
let me know if you have any questions

greg.haskins (Mon, 05 Jun 2017 23:00:28 GMT):
(I also suggest you check out my chaintool project ;)

praveennagpal (Tue, 06 Jun 2017 01:31:07 GMT):
@jimthematrix , @greg.haskins - is there a time lag needed for a peer to create a channel and then join it. I am using a promise for create channel and when it gets fulfilled, I then request a join channel. However, I seem to be getting the error on join channel while trying to get the genesis block. W20170606-06:32:57.350(5.5)? (STDERR) error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND W20170606-06:32:57.357(5.5)? (STDERR) error: [FabricHelper]: Error: Invalid results returned ::NOT_FOUND W20170606-06:32:57.359(5.5)? (STDERR) at ClientDuplexStream. (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/lib/Orderer.js:197:22) W20170606-06:32:57.360(5.5)? (STDERR) at emitOne (events.js:77:13) W20170606-06:32:57.362(5.5)? (STDERR) at ClientDuplexStream.emit (events.js:169:7) W20170606-06:32:57.363(5.5)? (STDERR) at readableAddChunk (_stream_readable.js:153:18) W20170606-06:32:57.365(5.5)? (STDERR) at ClientDuplexStream.Readable.push (_stream_readable.js:111:10) W20170606-06:32:57.367(5.5)? (STDERR) at readCallback (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:245:1

praveennagpal (Tue, 06 Jun 2017 01:31:07 GMT):
@jimthematrix , @greg.haskins - is there a time lag needed between the time the peer creates a channel and then joins it. I am using a promise for create channel and when it gets fulfilled, I then request a join channel. However, I seem to be getting the error on join channel while trying to get the genesis block. W20170606-06:32:57.350(5.5)? (STDERR) error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND W20170606-06:32:57.357(5.5)? (STDERR) error: [FabricHelper]: Error: Invalid results returned ::NOT_FOUND W20170606-06:32:57.359(5.5)? (STDERR) at ClientDuplexStream. (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/lib/Orderer.js:197:22) W20170606-06:32:57.360(5.5)? (STDERR) at emitOne (events.js:77:13) W20170606-06:32:57.362(5.5)? (STDERR) at ClientDuplexStream.emit (events.js:169:7) W20170606-06:32:57.363(5.5)? (STDERR) at readableAddChunk (_stream_readable.js:153:18) W20170606-06:32:57.365(5.5)? (STDERR) at ClientDuplexStream.Readable.push (_stream_readable.js:111:10) W20170606-06:32:57.367(5.5)? (STDERR) at readCallback (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:245:1

praveennagpal (Tue, 06 Jun 2017 01:31:44 GMT):
If I do join channel manually after create channel, then it seems to work ok.

greg.haskins (Tue, 06 Jun 2017 01:47:36 GMT):
@praveennagpal I am not sure, I do create/join via CLI

jimthematrix (Tue, 06 Jun 2017 02:15:45 GMT):
@vdods it's generally recommended that application uses separate instances per peer organization. typically an application would never need to assume identities within the orderer organization (of course this is just generally speaking, it's all driven by how policies are defined).

jimthematrix (Tue, 06 Jun 2017 02:27:53 GMT):
@richard.holzeis the samples from @ericmvaughn and @greg.haskins are great references, there's also one in fabric-sdk-node/examples/balance-transfer that was just ported to the latest master level SDK, which is very close to the anticipated beta level

jimthematrix (Tue, 06 Jun 2017 02:31:39 GMT):
@praveennagpal yes there is a time lag, so good catch ;-) in fact this is the only place in the node SDK's end-to-end test (create channel -> join channel -> install chaincode -> instantiate chaincode -> invoke -> query -> upgrade chaincode) where a sleep() is required, because there's no notification of the event that the channel has been actually created in the orderer

jimthematrix (Tue, 06 Jun 2017 02:31:39 GMT):
@praveennagpal yes there is a time lag, so good catch ;-) in fact this is the only place in the node SDK's end-to-end test (create channel -> join channel -> install chaincode -> instantiate chaincode -> invoke -> query -> upgrade chaincode) where a sleep() of an arbitrary length of time is required, because there's no notification of the event that the channel has been actually created in the orderer

jimthematrix (Tue, 06 Jun 2017 02:32:30 GMT):
@jyellick now that I think about it, it's been a while since we checked on this, can you confirm the situation described above is still true with the orderer?

praveennagpal (Tue, 06 Jun 2017 02:34:02 GMT):
@jimthematrix typically how long the sleep interval should be?

jimthematrix (Tue, 06 Jun 2017 02:34:23 GMT):
it's all dependent on the network condition and setup, we use 5s in the test

jyellick (Tue, 06 Jun 2017 02:34:33 GMT):
@jimthematrix The orderer performs serialization of channel creation requests on the ordering system channel. Because non-orderer orgs cannot read from the ordering system channel (because this would leak information about who is creating channels with whom), there is no asynchronous way to detect channel creation. Instead, after the creation request has been accepted, the submitter must poll until channel creation

jimthematrix (Tue, 06 Jun 2017 02:35:32 GMT):
thanks Jason, that's what I remembered

jyellick (Tue, 06 Jun 2017 02:35:33 GMT):
Note, a 0.5 second polling period would be fine, allowing for a number of failures

jyellick (Tue, 06 Jun 2017 02:35:56 GMT):
(Or any other arbitrarily smaller polling period)

lujiang (Tue, 06 Jun 2017 05:53:04 GMT):
Hi, I am trying to follow the example https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer, but got error after "docker-compose -f artifacts/docker-compose.yaml up"

lujiang (Tue, 06 Jun 2017 05:56:08 GMT):

Message Attachments

richard.holzeis (Tue, 06 Jun 2017 06:14:27 GMT):
@ericmvaughn @greg.haskins @jimthematrix thank you for the references..

Souvik.Dey (Tue, 06 Jun 2017 06:46:58 GMT):
GRPC client got an error response from the peer "grpcs://localhost:7051"

Souvik.Dey (Tue, 06 Jun 2017 06:47:06 GMT):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1011fc13e2b4 dev-peer0.org1.example.com-mycc1-1.0 "chaincode -peer.addr" 16 hours ago Up 16 hours dev-peer0.org1.example.com-mycc1-1.0 0f71816ee0f6 dev-peer1.org2.example.com-mycc-1.0 "chaincode -peer.addr" 17 hours ago Up 17 hours dev-peer1.org2.example.com-mycc-1.0 fde9dcc6e316 dev-peer0.org1.example.com-mycc-1.0 "chaincode -peer.addr" 17 hours ago Up 17 hours dev-peer0.org1.example.com-mycc-1.0 765091adbf97 dev-peer0.org2.example.com-mycc-1.0 "chaincode -peer.addr" 17 hours ago Up 17 hours dev-peer0.org2.example.com-mycc-1.0 2fec982976ec hyperledger/fabric-peer "peer node start --pe" 17 hours ago Up 17 hours 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com 3b9501dc913c hyperledger/fabric-peer "peer node start --pe" 17 hours ago Up 17 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com 31645de0fca4 hyperledger/fabric-peer "peer node start --pe" 17 hours ago Up 17 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com ad691c239dee hyperledger/fabric-peer "peer node start --pe" 17 hours ago Up 17 hours 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com 1cea7bd9992d hyperledger/fabric-orderer "orderer" 17 hours ago Up 17 hours 0.0.0.0:7050->7050/tcp

Souvik.Dey (Tue, 06 Jun 2017 06:47:48 GMT):
anybody please provide solution.

lujiang (Tue, 06 Jun 2017 09:32:36 GMT):
I fix the problem by clean up my environment, including the npm & node modules

SyneBlockChainTeam (Tue, 06 Jun 2017 10:02:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BmP3Te6TAsAXM93TA) @jimthematrix We imported example_cc_helper.go in example_cc.go file and also mounted required path in docker-compose.yml but still stuck with same error "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: /chaincode/input/src/github.com/example_cc/example_cc.go:26:2: local import "./example_cc_helper" in non-local package chaincode/input/src/github.com/example_cc/example_cc.go:26:2: open /chaincode/input/src/github.com/example_cc/example_cc_helper: no such file or directory " at /home/venky/rdnode/rpc/fabric-sdk-node/fabric-client/node_modules/grpc/src/node/src/client.js:434:17"

SyneBlockChainTeam (Tue, 06 Jun 2017 10:02:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BmP3Te6TAsAXM93TA) @jimthematrix We imported example_cc_helper.go in example_cc.go file and also mounted required path in docker-compose.yml but still stuck with same error "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: /chaincode/input/src/github.com/example_cc/example_cc.go:26:2: local import "./example_cc_helper" in non-local package chaincode/input/src/github.com/example_cc/example_cc.go:26:2: open /chaincode/input/src/github.com/example_cc/example_cc_helper: no such file or directory " at /home/venky/rdnode/rpc/fabric-sdk-node/fabric-client/node_modules/grpc/src/node/src/client.js:434:17" Thanks

SyneBlockChainTeam (Tue, 06 Jun 2017 10:02:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BmP3Te6TAsAXM93TA) @jimthematrix We imported example_cc_helper.go in example_cc.go file and also mounted required path in docker-compose.yml but still stuck with same error "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: /chaincode/input/src/github.com/example_cc/example_cc.go:26:2: local import "./example_cc_helper" in non-local package chaincode/input/src/github.com/example_cc/example_cc.go:26:2: open /chaincode/input/src/github.com/example_cc/example_cc_helper: no such file or directory " at /home/venky/rdnode/rpc/fabric-sdk-node/fabric-client/node_modules/grpc/src/node/src/client.js:434:17" Thanks

SyneBlockChainTeam (Tue, 06 Jun 2017 10:02:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BmP3Te6TAsAXM93TA) @jimthematrix We imported example_cc_helper.go in example_cc.go file and also mounted required path in docker-compose.yml but still stuck with same error "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: /chaincode/input/src/github.com/example_cc/example_cc.go:26:2: local import "./example_cc_helper" in non-local package chaincode/input/src/github.com/example_cc/example_cc.go:26:2: open /chaincode/input/src/github.com/example_cc/example_cc_helper: no such file or directory " at /home/venky/rdnode/rpc/fabric-sdk-node/fabric-client/node_modules/grpc/src/node/src/client.js:434:17" Please refer below screenshots. Thanks

SyneBlockChainTeam (Tue, 06 Jun 2017 10:05:00 GMT):

Message Attachments

SyneBlockChainTeam (Tue, 06 Jun 2017 10:05:41 GMT):

Message Attachments

SyneBlockChainTeam (Tue, 06 Jun 2017 10:06:46 GMT):

Message Attachments

praveennagpal (Tue, 06 Jun 2017 11:04:51 GMT):
@jimthematrix what information is returned if we query transaction using the transaction id? Can we know that the transaction is validated and committed by the peer?

praveennagpal (Tue, 06 Jun 2017 11:04:51 GMT):
@jimthematrix is there a fabric ca services node sdk api which will store the signing certificate and the private key on the peer node file system like the -M option command line option that comes with fabric-ca client? I could not locate this option in the enrol API.

praveennagpal (Tue, 06 Jun 2017 11:04:51 GMT):
@jimthematrix is there a fabric ca services node sdk api which will store the signing certificate and the private key on the peer node file system like the -M option command line option that comes with fabric-ca client? I could not locate this option in the enrol API.

evgenhvost (Tue, 06 Jun 2017 11:18:34 GMT):
Has joined the channel.

alfa (Tue, 06 Jun 2017 13:07:50 GMT):
I'm running 'balance-transfer/example' from node-sdk. It is running successful : Log showing ---> server started --> http://localhost:4000 while accessing this url on browser, getting error : UnauthorizedError: No authorization token was found

scm197 (Tue, 06 Jun 2017 13:48:17 GMT):
Has joined the channel.

scm197 (Tue, 06 Jun 2017 13:48:53 GMT):
@alfa You need to use the curl requests to access the functionality. I don't think a get at / is implemented.

scm197 (Tue, 06 Jun 2017 13:49:24 GMT):
Also store the response token and use it in each curl request that you send in the Bearer part of the post

scm197 (Tue, 06 Jun 2017 13:52:07 GMT):
@here I am running through the balance transfer app and wanted to install my own chaincode on the fabric network. What confuses me where the node app gets its chancode from. In the config.json the chaincode path is github.com/mycc , but where does that point ? Also when I try to install the chaincode the node app errors out saying it cannot find the chaincode.

scm197 (Tue, 06 Jun 2017 13:52:07 GMT):
@here I am running through the balance transfer app and wanted to install my own chaincode on the fabric network. What confuses me where the node app gets its chancode from. In the config.json the chaincode path is github.com/my_example , but where does that point ? Also when I try to install the chaincode the node app errors out saying it cannot find the chaincode.

scm197 (Tue, 06 Jun 2017 14:08:06 GMT):
@here Another error I am seeing is : [2017-06-06 10:07:16.089] [ERROR] instantiate-chaincode - Failed to send instantiate transaction and get notifications within the timeout period. undefined [2017-06-06 10:07:16.089] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined

kletkeman (Tue, 06 Jun 2017 14:09:34 GMT):
@scm197 Are you running the latest fabric? It is my understanding that balance-transfer was recently updated to work on v1 with TLS, and our team is using it with the latest, not with alpha 2.

scm197 (Tue, 06 Jun 2017 14:14:12 GMT):
@kletkeman Thanks for replying. Isn't the latest alpha 2 ? Sorry for the stupid question but could you tell me how to check ? The docker compose file that I am using to spin up the network doesn't have any specifier. Is it the fabric container image you are refering to or the software. I have the latest master branch.

kletkeman (Tue, 06 Jun 2017 14:15:40 GMT):
@scm197 Sorry, I thought you were building and spinning up from a clone of the fabric. That's what our team member is doing to my knowledge. You could try updating your docker compose command to select "latest" for the containers, but I have not gone to see whether such exists.

kletkeman (Tue, 06 Jun 2017 14:17:10 GMT):
I should mention that he was able to get it running, but the latest was not perfectly stable, so we are again waiting for the right combination. Perhaps someone else is having better long term luck right now.

scm197 (Tue, 06 Jun 2017 14:26:44 GMT):
@kletkeman If you have some time could you tell me how the balance transfer app finds the chaincode that it should install. I see that there is a config.json which specifies that the location is github.com/my_example . Can I make it point somewhere else ?

scm197 (Tue, 06 Jun 2017 14:27:01 GMT):
I wanted to install my own chaincode.

kletkeman (Tue, 06 Jun 2017 14:31:32 GMT):
@scm197 I've not looked at it for quite some time ... but these two lines in the readme say it all ... cd fabric-sdk-node/examples/balance-transfer/ docker-compose -f artifacts/docker-compose.yaml pull It's a preconfigured environment I'm thinking ...

scm197 (Tue, 06 Jun 2017 14:32:52 GMT):
@kletkeman Yep. I was just wondering if I could bootstrap it to run my own chain code. Thanks.

scm197 (Tue, 06 Jun 2017 14:34:04 GMT):
@kletkeman Not related to this, but when I run that pull command I get : Pulling orderer.example.com (hyperledger/fabric-orderer:latest)... ERROR: manifest for hyperledger/fabric-orderer:latest not found

scm197 (Tue, 06 Jun 2017 14:34:16 GMT):
Using up works for me.

VamsiKrishnak (Tue, 06 Jun 2017 14:37:37 GMT):
Has joined the channel.

VamsiKrishnak (Tue, 06 Jun 2017 14:40:32 GMT):
@jimthematrix Can we use Rest API in hyperledger v1.0. if not what are the other options we can use?

MartinC (Tue, 06 Jun 2017 15:11:33 GMT):
@VamsiKrishnak There is no REST API at the moment for hyperledger v1.0 although I am working on a design for one as part of JIRA item FAB-156. I would assume the current options are to use one of the sdks or to do the grpc calls directly but I'll let jimthematrix confirm that.

mariogemoll (Tue, 06 Jun 2017 15:58:15 GMT):
Hi, while studying the test/example code I think I found a little bug which seems to be repeated in several places: When verifying endorsement responses, only the first one is looked at: https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/app/install-chaincode.js#L51 also for example: https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/app/invoke-transaction.js#L59 https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/e2eUtils.js#L130 Am I right and if so can I contribute a patch?

mariogemoll (Tue, 06 Jun 2017 16:07:53 GMT):
@scm197 you can put your own chaincode into test/fixtures/src

mariogemoll (Tue, 06 Jun 2017 16:12:00 GMT):
The packager builds an archive from there (the directory is "hardcoded" in https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/app/helper.js#L328 )

VamsiKrishnak (Tue, 06 Jun 2017 16:32:39 GMT):
@MartinC Ok, Thank you ..

scm197 (Tue, 06 Jun 2017 16:56:45 GMT):
@mariogemoll Thanks a lot for that tip. I had help figuring that out. All the best with the path. :)

scm197 (Tue, 06 Jun 2017 16:56:45 GMT):
@mariogemoll Thanks a lot for that tip. I had help figuring that out. All the best with the patch. :)

vdods (Tue, 06 Jun 2017 20:21:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=25j3oFzEaQywKJsz6) @jimthematrix How does one define who is allowed to use an orderer then? Presumably the member that creates a channel and invites peers to join a channel must be authorized by the orderer.. though is this done through the orderer's organization's CA?

jimthematrix (Tue, 06 Jun 2017 20:29:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=w6BjAwhS7SaDuwQ8R) @praveennagpal the returned object has two fields: ``` validationCode transactionEnvelope

jimthematrix (Tue, 06 Jun 2017 20:36:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Gzjtp2DeWr49echCk) @scm197 this is because the "latest" tags are not published in docker hub, so `docker-compose pull` would fail. this is a point-in-time issue and will be fixed once we publish the next release. so you would need to git clone the fabric and build locally in order to run the sample as the moment

jimthematrix (Tue, 06 Jun 2017 20:36:14 GMT):
... which it seems you have done successfully

jimthematrix (Tue, 06 Jun 2017 20:37:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eh2MhoiADuBzDeEE2) @VamsiKrishnak no REST APIs in v1.0, but is being worked on for post 1.0 (https://jira.hyperledger.org/browse/FAB-156), please use the SDKs

jimthematrix (Tue, 06 Jun 2017 20:37:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eh2MhoiADuBzDeEE2) @VamsiKrishnak no REST APIs in v1.0, but is being worked on for post 1.0 (https://jira.hyperledger.org/browse/FAB-156), as @MartinC pointed out. please use the SDKs

jimthematrix (Tue, 06 Jun 2017 20:41:38 GMT):
@vdods for a member to be allowed to create a channel with the orderer, the member's organization must first be added to a consortium (new or existing) that's maintained by the orderer's system channel. then the admins of the org can create channels in the context of that consortium

jimthematrix (Tue, 06 Jun 2017 20:41:38 GMT):
@vdods for a member to be allowed to create a channel with the orderer, the member's organization must first be added to a consortium (new or existing) that's maintained by the orderer's system channel. adding an org to the consortium is to add the org's MSP configuration (cacerts, admin certs). then the admins of the org can create channels in the context of that consortium

jimthematrix (Tue, 06 Jun 2017 20:43:23 GMT):
the orderer will use the admincerts in the org's MSP in the consortium to apply ACL rules

vdods (Tue, 06 Jun 2017 21:12:51 GMT):
@jimthematrix How does adding the org's MSP configuration to the consortium manifest? Which calls to which CAs/peers/orderers, which certs/keys get created/uploaded where?

jimthematrix (Tue, 06 Jun 2017 23:08:10 GMT):
You need to make a configuration update call to the orderer, at the moment this area is not very well documented, you may have to reach out to @jyellick about the brand new tool 'configtxlator' he just wrote

scm197 (Wed, 07 Jun 2017 00:33:15 GMT):
So, I have got my own chaincode running on a fabric network. Within the invoke, I have defined two functions put and get. So to put a value : stub.PutState(key , []byte(value)) and to get a value : value, err := stub.GetState(key)

scm197 (Wed, 07 Jun 2017 00:33:24 GMT):
My issue is that even though I inserted a value without any errors, when I get the value I get nil. What could be causing this issue? Do I have to wait some time before the orderer writes the transaction into a block, before I can get a value ?

kletkeman (Wed, 07 Jun 2017 00:59:21 GMT):
@scm197 You should be watching for the transaction to complete (see the EventHub object - or whatever it is called in the SDK). When you see the message come back as successful, you can query the asset key successfully. The transaction MUST be committed in a block for the world state to reflect the results of the transaction.

scm197 (Wed, 07 Jun 2017 01:01:03 GMT):
@kletkeman Thank you for the reply. Is there something that I can do to force each putstate to be written into the block directly ?

kletkeman (Wed, 07 Jun 2017 01:04:06 GMT):
@scm197 The process is not subject to the application's desires. meaning that you cannot force anything to happen. You submit the transaction to the endorser(s) and evaluate their responses. You take the read / write set that is created by endorsement, and you pass that to the ordering service I believe. Your transactions joins zero or more transactions in a block, and the block is then sent to all committers to be applied to world state (asset updates) and the blockchain (the block itself). Only once that has happened on the peer to which you are listening can you proceed to query the world state through your chaincode.

kletkeman (Wed, 07 Jun 2017 01:05:10 GMT):
Technically, you can query any time ... but only when the block is committed do you have any chance of seeing your changes.

scm197 (Wed, 07 Jun 2017 01:06:36 GMT):
@kletkeman Sorry for taking up more of your time, but is there a way to solve this issue then. I just have to wait for sometime period for the transaction to be written ?

kletkeman (Wed, 07 Jun 2017 01:08:57 GMT):
@scm197 The normal way is to set a listener on the event hub and wait for it to come back before you allow the app to run a query. Of course, if you are doing each command as a command line operation, then just wait for a few seconds. If you are not seeing your changes, then check the logs of the peer and the chaincode. I recommend heavy debug logging in your chaincode until you get most of the early issues worked out.

kletkeman (Wed, 07 Jun 2017 01:10:41 GMT):
I probably won't be responding until tomorrow as I have a presentation to prepare for review in the morning and I have hours of work left to go ...

scm197 (Wed, 07 Jun 2017 01:17:43 GMT):
@kletkeman Thanks a lot for the info! It helped me a lot. If you get some free time tomorrow, could you tell me how to turn on heavy debugging from within the chaincode. I tried using fmt.Printf, but that does not show up in the logs.

vdods (Wed, 07 Jun 2017 02:52:02 GMT):
Oh no... sanity check: is Client (and other stateful classes) non-reentrant?

vdods (Wed, 07 Jun 2017 02:53:53 GMT):
I'm calling Promise.all(promises), where promises is an array of promises which each call client.createUser. This returns a variable 'user' asynchronously, and when I print out user.getName(), I get all the same thing: "User1"

vdods (Wed, 07 Jun 2017 02:53:58 GMT):
instead of different usernames

vdods (Wed, 07 Jun 2017 02:54:47 GMT):
I guess the _userContext attribute in Client makes it non-reentrant

daijianw (Wed, 07 Jun 2017 03:06:16 GMT):
@jimthematrix Does sdk support chaincode upgrade now? I haven't found it in Client.js. If not, have we any plan for this?

daijianw (Wed, 07 Jun 2017 03:28:56 GMT):
@jimthematrix I already found it in Channel.js. thx.

kletkeman (Wed, 07 Jun 2017 04:41:55 GMT):
@scm197 printf statements have always worked for me for logging ... but there is a much nicer way. You could look over the code I have in my iot contract platform ... specifically this file: https://github.com/ibm-watson-iot/blockchain-samples/blob/master/contracts/platform/iotcontractplatform/ctconfig.go

NiketYende (Wed, 07 Jun 2017 05:08:35 GMT):
Any chaincode API similar to "chain.sendTransactionProposal(request);" node-sdk code? I am basically trying to invoke one chaincode from the other. Any help would be appreciated.. @bretharrison @jimthematrix

NiketYende (Wed, 07 Jun 2017 05:14:07 GMT):
I am trying to forward the request from one chaincode to other chaincode.

Souvik.Dey (Wed, 07 Jun 2017 05:42:33 GMT):
E0607 05:41:12.701614691 7453 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

Souvik.Dey (Wed, 07 Jun 2017 05:42:43 GMT):
Any help would be appreciated

Souvik.Dey (Wed, 07 Jun 2017 05:43:07 GMT):
GRPC client got an error response from the peer "grpcs://localhost:7051". Error: Connect Failed

Souvik.Dey (Wed, 07 Jun 2017 05:54:27 GMT):
please help me to create nodeJS application for alpha2 images .

Dpkkmr (Wed, 07 Jun 2017 06:20:36 GMT):
Has joined the channel.

jinyu18 (Wed, 07 Jun 2017 07:19:54 GMT):
Has joined the channel.

LordGoodman (Wed, 07 Jun 2017 07:43:28 GMT):
I checkout to v1.0.0-alpha2 and ran "npm test " command , but some CouchDBKeyValueStore tests are failed log like this``` not ok 231 Error: Error creating member_db database to store membership data: Error: >>> getting the org admin looking at file ::/root/fabric-sample/release/linux-amd64/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/a53a6b0e5a01667c6f263a1e3c7a462b41684337c623292f47a486952734bfd8_sk looking at file ::/root/fabric-sample/release/linux-amd64/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem ````` I am trying to use the sdk-node application example with e2e hyperledger fabric system example, and i have this error, I don't know which file I need to mofify

akdj (Wed, 07 Jun 2017 08:19:55 GMT):
can anyone eplain what is the meaning of this Error: Illegal file detected in payload: ? because i have this also with marble02.go

akdj (Wed, 07 Jun 2017 08:19:55 GMT):
can anyone explain what is the meaning of this Error: Illegal file detected in payload: ? because i have this also with marble02.go

akdj (Wed, 07 Jun 2017 08:24:53 GMT):
is it because I need to add "src/github.com" in the path?

Souvik.Dey (Wed, 07 Jun 2017 09:09:51 GMT):
please help me to create nodeJS application for alpha2 images .

akdj (Wed, 07 Jun 2017 09:32:26 GMT):

Message Attachments

akdj (Wed, 07 Jun 2017 09:32:34 GMT):
@Souvik.Dey

akdj (Wed, 07 Jun 2017 09:34:35 GMT):
@Souvik.Dey I think this question has been already mentioned a lot of times, but...rarely been answered

akdj (Wed, 07 Jun 2017 09:34:40 GMT):
:/

akdj (Wed, 07 Jun 2017 09:34:40 GMT):
:(

akdj (Wed, 07 Jun 2017 09:34:40 GMT):
:frowning2:

prashiyn (Wed, 07 Jun 2017 10:28:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=obJQzjpyNmKZYgTL5) @akdj So what worked for me is set env GOPATH = 'path to chaincode directory' . Go usually looks for your code in GOPATH/src directory. So if my chaincode is in say /chaincode/src/myapp/myapp.go , then GOPATH = /chaincode , and chaincodePath = "myapp". Hope this helps

prashiyn (Wed, 07 Jun 2017 10:30:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KMBejYuj6pjRWii8d) @Souvik.Dey I just pulled the fabric v1.0.0.alpha2 branch and built it. The Makefile in the root directory is very handy.

prashiyn (Wed, 07 Jun 2017 10:36:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vy42DKgjGrEXfL46X) @prashiyn Sorry, did not understand what you mean by nodejs application for alpha2 ? If you can elaborate, i might be able to help

zhasni (Wed, 07 Jun 2017 11:12:59 GMT):
Has joined the channel.

AbhilekhSingh (Wed, 07 Jun 2017 11:19:32 GMT):
Error: The creator's signature over the proposal is not valid, err Could not determine the validity of the signature, err Invalid S. Must be smaller than half the order [71627208281546532191517141310566160221691736010027233102293557434618077652629][57896044605178124381348723474703786764998477612067880171211129530534256022184].

AbhilekhSingh (Wed, 07 Jun 2017 11:24:37 GMT):
I'm getting this random error in alpha1 images when sending query

AbhilekhSingh (Wed, 07 Jun 2017 11:31:36 GMT):
I guess this creating an issue

AbhilekhSingh (Wed, 07 Jun 2017 11:31:38 GMT):
// in order to guarantee 's' falls in the lower range of the order, as explained in the above link, // first see if 's' is larger than half of the order, if so, it needs to be specially treated if (sig.s.cmp(halfOrder) == 1) { // module 'bn.js', file lib/bn.js, method cmp() // convert from BigInteger used by jsrsasign Key objects and bn.js used by elliptic Signature objects var bigNum = new BN(curveParams.n.toString(16), 16); sig.s = bigNum.sub(sig.s); }

AbhilekhSingh (Wed, 07 Jun 2017 11:32:26 GMT):
'/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js' _preventMalleability function

akdj (Wed, 07 Jun 2017 12:11:35 GMT):
@prashiyn thanks, it helps me. another way, i did, it is create a path `src/github.com`and place the chaincode here, then change chaincodePath by adding `src/github.com/`

AbhilekhSingh (Wed, 07 Jun 2017 12:52:36 GMT):
Anyone can help me in resolving this issue:

AbhilekhSingh (Wed, 07 Jun 2017 12:52:36 GMT):
Error: The creator's signature over the proposal is not valid, err Could not determine the validity of the signature, err Invalid S. Must be smaller than half the order [71627208281546532191517141310566160221691736010027233102293557434618077652629][57896044605178124381348723474703786764998477612067880171211129530534256022184].

AbhilekhSingh (Wed, 07 Jun 2017 12:52:42 GMT):
I guess this creating an issue // in order to guarantee 's' falls in the lower range of the order, as explained in the above link, // first see if 's' is larger than half of the order, if so, it needs to be specially treated if (sig.s.cmp(halfOrder) == 1) { // module 'bn.js', file lib/bn.js, method cmp() // convert from BigInteger used by jsrsasign Key objects and bn.js used by elliptic Signature objects var bigNum = new BN(curveParams.n.toString(16), 16); sig.s = bigNum.sub(sig.s); }

RezwanKabir (Wed, 07 Jun 2017 14:00:58 GMT):
From my linux machine fabric-sdk-node is running smooth. Even from second linux machine I can run fabric-sdk-node for calling functions

MartinC (Wed, 07 Jun 2017 14:12:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Je8WscEQyMeFfvSzQ) @vdods Looking at the code in client.js it is reentrant however, what is returned on createUser() is actually a reference to client._userContext instead of an instance of User. The reason I think this is as part of the createUser() processing it calls saveUserToStateStore() which resolves with the userContext but the code treats it as the User.

MartinC (Wed, 07 Jun 2017 14:14:13 GMT):
This means that all Promises will resolve to the same reference which is why after all promises resolve they have the same content.

MartinC (Wed, 07 Jun 2017 14:22:33 GMT):
I don't know if that is expected behaviour or a defect.

LordGoodman (Wed, 07 Jun 2017 14:43:34 GMT):
hey guys, I can't past the couchdb-key-value-store test , everthing thing else is fine, any idea of this issue ?

LordGoodman (Wed, 07 Jun 2017 14:43:58 GMT):
hey guys, I can't past the couchdb-key-value-store test , everthing else is fine, any idea of this issue ?

SotirisAlfonsos (Wed, 07 Jun 2017 15:40:11 GMT):
I am running fabric and fabric-ca alpha2 and just updated the node sdk to master. I do not seem to be able to connect to the orderer? Could anyone help? `peer0.org1.example.com | 2017-06-07 15:33:56.015 UTC [ConnProducer] NewConnection -> ERRO 5c6 Failed connecting to orderer:7050 , error: grpc: timed out when dialing` `peer0.org1.example.com | 2017-06-07 15:33:56.016 UTC [deliveryClient] connect -> ERRO 5c7 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050]`

pd93 (Wed, 07 Jun 2017 15:44:53 GMT):
@SotirisAlfonsos have you checked `docker ps -a` ? It will tell you if the orderer is running and on which port

pd93 (Wed, 07 Jun 2017 15:45:55 GMT):
I'm struggling to work out how to get an identity file (admin) into my key/val store directory without using fabric-ca to enroll them. Could someone give me a bit of info on which certs it's generated from? ie. If I were to generate the crypto material manually. How would I then enroll an admin user with the node sdk *without* a CA?

SotirisAlfonsos (Wed, 07 Jun 2017 16:03:26 GMT):
@pd93 yes the orderer is up and i have the right post. I can ping it so the port is open. The peers can not connect though.

SotirisAlfonsos (Wed, 07 Jun 2017 16:03:26 GMT):
@pd93 yes the orderer is up and i have the right port. I can ping it so the port is open. The peers can not connect though.

LordGoodman (Wed, 07 Jun 2017 16:03:48 GMT):
any log from orderer ?

SotirisAlfonsos (Wed, 07 Jun 2017 16:11:12 GMT):
Everything seems normal with the orderer. I can create a channel, join peers, install chaincode. The problem starts on instantiation where the peers have to talk with the orderer.

LordGoodman (Wed, 07 Jun 2017 16:15:24 GMT):
I don't think the master one is stable, try checkout to v1.0.0-alpha2

SotirisAlfonsos (Wed, 07 Jun 2017 16:16:22 GMT):
Yes that is what i am starting to believe. Thank you for your help by the way

openspylin (Wed, 07 Jun 2017 18:54:19 GMT):
I currently learning about sdk-node development for hyperledger. Before I move to version 1.0.0., I'd like to operate a node app that works with version 0.6 (chaincode). I've reviewed the Marbles & the SDK demos from IBM for Bluemix. I would like to better understand by creating/utilizing a non bluemix example to operate my own chaincode. (Then I can proceed with coversion to version 1.0.0). What would I need to change from those examples to to work on my local system or own server?

openspylin (Wed, 07 Jun 2017 18:54:19 GMT):
I currently learning about sdk-node development for hyperledger. Before I move to version 1.0.0., I'd like to operate a node app that works with version 0.6 (chaincode). I've reviewed the Marbles & the SDK demos from IBM for Bluemix. I would like to better understand by creating/utilizing a non bluemix example to operate my own chaincode. (Then I can proceed with coversion to version 1.0.0). What would I need to change from those examples to to work on my local system or own server? What are the minimal elements needed: CA, peer, chaincode commands?

jimthematrix (Thu, 08 Jun 2017 02:25:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Je8WscEQyMeFfvSzQ) @vdods I'm very curious about this, can you give more details? not sure how Promise.all() is relate to whether Client is reentrant?

jimthematrix (Thu, 08 Jun 2017 02:40:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=C5DGWTEQNoKsEvYMq) @NiketYende that's a server-side API as part of the chaincode shim: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces.go#L80

jimthematrix (Thu, 08 Jun 2017 02:45:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jdYAo5t73qSFn8oDG) @LordGoodman looks like you have a local proxy (Squid) running that's returning HTML instead of the expected couchdb responses

jimthematrix (Thu, 08 Jun 2017 02:49:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=N8fnxeHg9k9x3QLB8) @Souvik.Dey most likely you have a server certificate that says the host name (in the certificate's CN field) should be one thing but the actual host name is another

jimthematrix (Thu, 08 Jun 2017 02:50:31 GMT):
assuming you are using docker for the peers, make sure the name of the peer service in docker-compose.yaml matches the hostname of the server certificate

jimthematrix (Thu, 08 Jun 2017 02:54:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wsTXhbZso6r7d9bN3) @AbhilekhSingh if the signature is created by the SDK, it's guaranteed to have compliant as far as the malleability is concerned. we have never seen the SDK producing invalid signatures that fails the malleability check. did you somehow sign the request in a special way or modify the signature?

jimthematrix (Thu, 08 Jun 2017 02:57:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tGDP5tGvcga7bDikZ) @SotirisAlfonsos most likely you have a orderer certificate that says the host name (in the certificate's CN field) should be one thing but the actual host name is another, make sure the name of the peer service in docker-compose.yaml matches the hostname of the server certificate

LordGoodman (Thu, 08 Jun 2017 03:20:31 GMT):
@jimthematrix You are so right, It seem like a docker proxy took in charge my 5985 port

praveennagpal (Thu, 08 Jun 2017 04:01:08 GMT):
@jimthematrix is there a fabric ca services node sdk api which will store the signing certificate and the private key on the peer node file system like the -M command line option that comes with fabric-ca client? I could not locate this option in the enrol API.

praveennagpal (Thu, 08 Jun 2017 04:01:08 GMT):
@jimthematrix is there a fabric ca services node sdk api which will store the signing certificate and the private key on the peer node msp config file system like the -M command line option that comes with fabric-ca client? I could not locate this option in the enrol API.

JasonD (Thu, 08 Jun 2017 04:23:27 GMT):
hi, I download master, npm install, then `docker-compose up`. but got this error: `2017-06-08 04:06:33.736 UTC [gossip/service] configUpdated -> ERRO 030 Tried joining channel testchainid but our org( Org2MSP ), isn't among the orgs of the channel: [DEFAULT] , aborting.`

JasonD (Thu, 08 Jun 2017 04:23:32 GMT):
``` peer0.org1.example.com | 2017-06-08 04:06:33.731 UTC [peer] Initialize -> WARN 3b1 Failed to load ledger testchainid(Ledger already opened) peer0.org1.example.com | 2017-06-08 04:06:33.731 UTC [peer] Initialize -> DEBU 3b2 Error while loading ledger testchainid with message Ledger already opened. We continue to the next ledger rather than abort. peer0.org1.example.com | 2017-06-08 04:06:33.731 UTC [nodeCmd] serve -> INFO 3b3 Starting peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[peer0.org1.example.com:7051] peer0.org2.example.com | 2017-06-08 04:06:33.735 UTC [msp] DeserializeIdentity -> INFO 02f Obtaining identity peer0.org2.example.com | 2017-06-08 04:06:33.736 UTC [gossip/service] configUpdated -> ERRO 030 Tried joining channel testchainid but our org( Org2MSP ), isn't among the orgs of the channel: [DEFAULT] , aborting. peer0.org2.example.com | 2017-06-08 04:06:33.736 UTC [msp] DeserializeIdentity -> INFO 031 Obtaining identity ```

praveennagpal (Thu, 08 Jun 2017 05:45:42 GMT):
@jimthematrix another question that I have is how do I listen on chaincode events generated by other organisation peers? Do I need to add those peers in my eventhub or is it automtically listened to by Fabric?

thakkarparth007 (Thu, 08 Jun 2017 06:23:51 GMT):
@praveennagpal, not an authoritative answer, but saw this in a comment in an e2e test of the NodeSDK: `an event listener can only register with a peer in its own org`

praveennagpal (Thu, 08 Jun 2017 06:26:32 GMT):
@thakkarparth007 yes I saw this comment. But how do I propagate events sourced by one peer to peers of other organisation in the fabric network?

thakkarparth007 (Thu, 08 Jun 2017 06:26:58 GMT):
I'm not sure about that.

akdj (Thu, 08 Jun 2017 09:23:47 GMT):
can anyone tell me, is it mandatory to use fabric-ca when using fabric-sdk-node?

Dpkkmr (Thu, 08 Jun 2017 09:27:46 GMT):

Message Attachments

Dpkkmr (Thu, 08 Jun 2017 09:28:32 GMT):

Message Attachments

Dpkkmr (Thu, 08 Jun 2017 09:28:59 GMT):
Hi All, I am new to Node-SDK. I am interested in knowing the flow. I am executing balance transfer example. To get the abric network up, I ran "docker-compose -f artifacts/docker-compose.yaml up" which resulted in this error: If any one know how to resolve this issue please help me. Thanks!

kuangchao (Thu, 08 Jun 2017 09:53:19 GMT):

Message Attachments

praveennagpal (Thu, 08 Jun 2017 10:51:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Tudh3thBTpcFbQyCf) @akdj its not mandatory to use fabric-ca with node-sdk although I would recommend it. As an alternative, you can generate certificates using cryptogen tool and load it in your MSP config directory.

mariogemoll (Thu, 08 Jun 2017 12:25:51 GMT):
@Dpkkmr you need to run `npm test` first, this will generate some additional files such as api.js

zhasni (Thu, 08 Jun 2017 13:02:53 GMT):
@Dpkkmr did you make an `npm install` first

pd93 (Thu, 08 Jun 2017 13:04:37 GMT):
@praveennagpal I'm currently doing thing the way you suggested above (without a CA). Do you have any details on how I'd enroll a user via the node sdk without using a CA? I know that we can load an identity file from persistence, but I can't work out how to generate this file (either using the sdk or manually). Thanks

glotov (Thu, 08 Jun 2017 13:45:51 GMT):
As I run ./testApi.sh, I end up having ```[2017-06-08 12:35:09.976] [ERROR] instantiate-chaincode - Failed to send instantiate transaction and get notifications within the timeout period. undefined [2017-06-08 12:35:09.976] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined``` Although chaincodes `dev-peer1.org1.example.com-mycc-v0` and `dev-peer0.org1.example.com-mycc-v0` started successfully and sooner then the timeout. Anyone faced this?

glotov (Thu, 08 Jun 2017 13:49:48 GMT):
This is the first error in running `https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer`, today's master.

glotov (Thu, 08 Jun 2017 13:51:35 GMT):
Images used are `x86_64-1.0.0-alpha2`.

SotirisAlfonsos (Thu, 08 Jun 2017 14:01:14 GMT):
@glotov do the peer logs look something like 'peer0.org1.example.com | 2017-06-07 15:33:56.015 UTC [ConnProducer] NewConnection -> ERRO 5c6 Failed connecting to orderer:7050 , error: grpc: timed out when dialing` `peer0.org1.example.com | 2017-06-07 15:33:56.016 UTC [deliveryClient] connect -> ERRO 5c7 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050]`?

SotirisAlfonsos (Thu, 08 Jun 2017 14:01:14 GMT):
@glotov do the peer logs look something like `peer0.org1.example.com | 2017-06-07 15:33:56.015 UTC [ConnProducer] NewConnection -> ERRO 5c6 Failed connecting to orderer:7050 , error: grpc: timed out when dialing` `peer0.org1.example.com | 2017-06-07 15:33:56.016 UTC [deliveryClient] connect -> ERRO 5c7 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050]`?

glotov (Thu, 08 Jun 2017 14:03:59 GMT):
no, the orderer replied for me, here are more logs prior to the error: ```[2017-06-08 12:34:39.903] [INFO] instantiate-chaincode - instantiate proposal was good [2017-06-08 12:34:39.903] [INFO] instantiate-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - " myccv0escc"vscc*< OrdererMSP Org1MSP Org2MSP2D �k�k�6�!{��D�Z6cot(� *PI�w�jL5x6^�E=�)ˡF�� ��C55: 󴶲��C��5��P*|rH����ly��B, Org1MSP Org2MSP", endorsement signature: 0E!�:5����Zu�c���� ����Ӭ��.��� , s: , recoveryParam: 0 } [2017-06-08 12:34:39.940] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-06-08 12:35:09.973] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } [2017-06-08 12:35:09.976] [ERROR] instantiate-chaincode - Failed to send instantiate transaction and get notifications within the timeout period. undefined [2017-06-08 12:35:09.976] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined```

glotov (Thu, 08 Jun 2017 14:06:28 GMT):
@SotirisAlfonsos I think, I had that 'timed out when dialing' error when I used `-alpha` images (-not `-alpha2`).

SotirisAlfonsos (Thu, 08 Jun 2017 14:10:09 GMT):
@glotov I had it as soon as i synced to the node sdk master that uses alpha2. Anyway starting the peers with `--peer-defaultchain=false` solved it for me. I think i had a similar error with the one that you are describing, i am not 100% sure though

glotov (Thu, 08 Jun 2017 14:18:53 GMT):
Waw, I tried your patch and it worked mostly! The only error I see in logs is ```[2017-06-08 17:14:40.743] [INFO] invoke-chaincode - transaction proposal was good [2017-06-08 17:14:40.743] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0D E�,%3Wʺ�����nz$ "�]c�(/���N H3����h����_UH������<�ZD��� [2017-06-08 17:14:40.744] [ERROR] Helper - Failed to find a peer matching the url localhost:8051 info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"}```. But that may be normal, did you see it as well?

glotov (Thu, 08 Jun 2017 14:18:53 GMT):
@SotirisAlfonsos, Waw, I tried your patch and it worked mostly! The only error I see in logs is ```[2017-06-08 17:14:40.743] [INFO] invoke-chaincode - transaction proposal was good [2017-06-08 17:14:40.743] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0D E�,%3Wʺ�����nz$ "�]c�(/���N H3����h����_UH������<�ZD��� [2017-06-08 17:14:40.744] [ERROR] Helper - Failed to find a peer matching the url localhost:8051 info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"}``` But that may be normal, as the curl with 'invoke' was successful, did you see it as well?

SotirisAlfonsos (Thu, 08 Jun 2017 14:34:27 GMT):
@glotov hmm, no i do not recall an error like that.

daijianw (Thu, 08 Jun 2017 14:51:31 GMT):
@jimthematrix Is there any way in SDK to query all transactions of a channel? Or at least a way to count the number of transactions of a channel? Thanks.

openspylin (Thu, 08 Jun 2017 14:57:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5mTGEz5Dv4CxXDhFE) @Dpkkmr Re-confirm the repository is under that directory/filename. Did you see any network responses from the peers; further checking would need your yaml file to see what images it refers to among other details (ports, container definitions).

hancockp (Thu, 08 Jun 2017 16:00:40 GMT):
Has joined the channel.

l1nux (Thu, 08 Jun 2017 16:05:52 GMT):
How to reinstate a revoke user? I tried the normal CA register/enroll of a revoked user but failed.

glotov (Thu, 08 Jun 2017 16:30:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aXPuTTP6BfYGjdpBQ) @SotirisAlfonsos, seems a configuration typo in the test `https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/testAPIs.sh#L124`, if I got things right, it should be `"peers": ["localhost:7051", "localhost:7056"],` so that peers are from the same org.

glotov (Thu, 08 Jun 2017 16:37:58 GMT):
and when i patched the test script, `dev-peer0.org2.example.com-mycc-v0` is no longer instantiated during `invoke` command, which looks right

SotirisAlfonsos (Thu, 08 Jun 2017 16:56:51 GMT):
@glotov the curl is correct. It would not work with the old balance transfer alpha2 version, but i am pretty sure it is working on beta (It is working for me). The problem should be elsewhere.

jrosmith (Thu, 08 Jun 2017 18:17:05 GMT):
Hey all, I am using fabric-client 1.0.0-alpha2 and trying to follow the examples at https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/create-channel.js. Getting the following errors and not sure if this is an issue with the sdk or my implementation: ``` (node:1557) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Client.newCryptoKeyStore is not a function ``` and ``` (node:1554) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: cryptoSuite.setCryptoKeyStore is not a function ``` has anyone run into similar issues with the example code?

jrosmith (Thu, 08 Jun 2017 18:17:42 GMT):
Specifically the error comes from line 119 of the example code

scottz (Thu, 08 Jun 2017 19:36:58 GMT):
@bretharrison we see this msg.Status printed by our broadcastClient when sending transaction to Orderer, when kafkabrokers have all been stopped. The response comments in FAB-2575 state we should recreate our grpc connection to the orderer. Does the node sdk handle this situation smoothly? Got unexpected status: SERVICE_UNAVAILABLE func (b *broadcastClient) getAck() error { msg, err := b.client.Recv() if err != nil { return err } if msg.Status != cb.Status_SUCCESS { return fmt.Errorf("Got unexpected status: %v", msg.Status) } return nil }

bretharrison (Thu, 08 Jun 2017 19:40:38 GMT):
The NodeSDK will return the `SERVICE_UNAVAILABLE` to the application, it will be up to the application to retry

scottz (Thu, 08 Jun 2017 20:09:03 GMT):
oh, then we will need to document/advertise that fact somewhere externally (FAB-2575)

jrosmith (Thu, 08 Jun 2017 20:45:50 GMT):
Nevermind, it works after upgrade to 1.0.0.-beta

scottz (Thu, 08 Jun 2017 21:56:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CBh99ExBNaReeQrWW) @bretharrison in the user documentation describing the node-sdk API, does it state that the client is on the hook for recreating grpc connection after ANY error is returned by getACK() when broadcasting transaction? Or state that a new grpc connection must be created for every broadcast request sent?

JasonD (Fri, 09 Jun 2017 01:13:11 GMT):
download beta version, then run `docker-compose up`, still got this error:

JasonD (Fri, 09 Jun 2017 01:13:26 GMT):
``` peer0.org1.example.com | 2017-06-09 01:11:57.311 UTC [gossip/service] configUpdated -> ERRO 316 Tried joining channel testchainid but our org( Org1MSP ), isn't among the orgs of the channel: [DEFAULT] , aborting. ```

JasonD (Fri, 09 Jun 2017 01:13:55 GMT):
``` peer0.org1.example.com | 2017-06-09 01:11:57.420 UTC [lockbasedtxmgr] Done -> DEBU 3ad Done with transaction simulation / query execution [5aa3cdf4-8c0f-4c7d-8826-eca977346cc4] peer0.org1.example.com | 2017-06-09 01:11:57.420 UTC [nodeCmd] serve -> INFO 3ae Deployed system chaincodes on testchainid peer0.org1.example.com | 2017-06-09 01:11:57.420 UTC [peer] Initialize -> INFO 3af Loading chain testchainid peer0.org1.example.com | 2017-06-09 01:11:57.420 UTC [ledgermgmt] OpenLedger -> INFO 3b0 Opening ledger with id = testchainid peer0.org1.example.com | 2017-06-09 01:11:57.420 UTC [peer] Initialize -> WARN 3b1 Failed to load ledger testchainid(Ledger already opened) peer0.org1.example.com | 2017-06-09 01:11:57.420 UTC [peer] Initialize -> DEBU 3b2 Error while loading ledger testchainid with message Ledger already opened. We continue to the next ledger rather than abort. peer0.org1.example.com | 2017-06-09 01:11:57.421 UTC [nodeCmd] serve -> INFO 3b3 Starting peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[peer0.org1.example.com:7051] peer0.org1.example.com | 2017-06-09 01:11:57.434 UTC [nodeCmd] serve -> INFO 3b4 Started peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[peer0.org1.example.com:7051] ```

JasonD (Fri, 09 Jun 2017 01:14:04 GMT):
``` peer0.org2.example.com | 2017-06-09 01:11:59.205 UTC [ConnProducer] NewConnection -> ERRO 042 Failed connecting to orderer:7050 , error: grpc: timed out when dialing peer0.org2.example.com | 2017-06-09 01:11:59.205 UTC [deliveryClient] connect -> ERRO 043 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050] peer0.org1.example.com | 2017-06-09 01:12:00.339 UTC [ConnProducer] NewConnection -> ERRO 3c7 Failed connecting to orderer:7050 , error: grpc: timed out when dialing peer0.org1.example.com | 2017-06-09 01:12:00.339 UTC [deliveryClient] connect -> ERRO 3c8 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050] ```

JasonD (Fri, 09 Jun 2017 01:27:42 GMT):
my bad. have to upgrade all container to beta version too

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

praveennagpal (Fri, 09 Jun 2017 07:59:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=giDBsMivuJhiYdkMs) @pd93 [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=giDBsMivuJhiYdkMs) @pd93 There is a cryptogen tool which uses a crypto-config.yaml. You can run this binary to generate certificates for organisation CA, peers,users. Instructions are mentioned in the getting started link.

praveennagpal (Fri, 09 Jun 2017 07:59:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=giDBsMivuJhiYdkMs) @pd93 [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=giDBsMivuJhiYdkMs) There is a cryptogen tool which uses a crypto-config.yaml. You can run this binary to generate certificates for organisation CA, peers,users. Instructions are mentioned in the getting started link.

Dpkkmr (Fri, 09 Jun 2017 11:33:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GZEoBuMnBqEP64hak) @mariogemoll @zhasni @openspylin Thanks. I deleted node_module folder and ran npm install. This resolved the error which I was facing. :)

zhasni (Fri, 09 Jun 2017 12:00:21 GMT):
:-)

Dpkkmr (Fri, 09 Jun 2017 12:14:37 GMT):

Message Attachments

Dpkkmr (Fri, 09 Jun 2017 12:15:52 GMT):
Hi All, When I instantiate chaincode getting time-out error. I am using testAPIs.sh script to test. Please help me in resolving this error.

Dpkkmr (Fri, 09 Jun 2017 12:15:52 GMT):
Hi All, When I instantiate chaincode getting time-out error. I am using testAPIs.sh script to test. Please help me in resolving this error. Thanks.

Dpkkmr (Fri, 09 Jun 2017 12:16:49 GMT):

Message Attachments

yacovm (Fri, 09 Jun 2017 13:39:40 GMT):
Does the node SDK validate the certificate of the endorser(s) that endorsed the transaction proposal, @jimthematrix ?

jeffgarratt (Fri, 09 Jun 2017 17:26:22 GMT):
@yacovm I know the BDD does not, as that function is performed by the orderers on broadcast

yacovm (Fri, 09 Jun 2017 17:37:27 GMT):
ah really? the ordering service verifies the endorsers certificates at broadcast?

jeffgarratt (Fri, 09 Jun 2017 17:50:39 GMT):
yes

jeffgarratt (Fri, 09 Jun 2017 17:50:39 GMT):
@yacovm yes

jeffgarratt (Fri, 09 Jun 2017 17:51:42 GMT):
hmmm... Im pretty sure...

jeffgarratt (Fri, 09 Jun 2017 17:53:46 GMT):
perhaps it is only the signature of the submitter

mrobinson (Fri, 09 Jun 2017 18:44:55 GMT):
Has joined the channel.

greg.haskins (Fri, 09 Jun 2017 19:20:17 GMT):
gah, abi borkage between alpha2 and beta

greg.haskins (Fri, 09 Jun 2017 19:20:32 GMT):
is there a porting guide so I dont have to splunk the fix out

greg.haskins (Fri, 09 Jun 2017 19:20:57 GMT):
@jimthematrix

greg.haskins (Fri, 09 Jun 2017 19:21:25 GMT):
getting this once upgraded: 'Unhandled rejection TypeError: client.newChain is not a function'

jimthematrix (Fri, 09 Jun 2017 19:53:44 GMT):
@greg.haskins it's `client.newChanne()` now

jimthematrix (Fri, 09 Jun 2017 19:55:07 GMT):
we don't have a migration guide unfortunately, but this commit upgrades the sample app from alpha to beta: https://github.com/hyperledger/fabric-sdk-node/commit/63ea71d23bbdac3aa7c2d642e8defcddc246ade8

greg.haskins (Fri, 09 Jun 2017 19:55:18 GMT):
@jimthematrix just change the name, or are there parameter changes too?

jimthematrix (Fri, 09 Jun 2017 19:55:18 GMT):
could be used as somewhat of a guide

greg.haskins (Fri, 09 Jun 2017 19:55:25 GMT):
ok, cool

greg.haskins (Fri, 09 Jun 2017 19:55:27 GMT):
thx

jimthematrix (Fri, 09 Jun 2017 19:55:40 GMT):
np

jimthematrix (Fri, 09 Jun 2017 20:13:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cokLpn4m44bcnjzR9) @yacovm we don't at the moment: https://jira.hyperledger.org/browse/FAB-3202

yacovm (Fri, 09 Jun 2017 20:14:14 GMT):
Got it, thanks Jim!

jimthematrix (Fri, 09 Jun 2017 20:15:10 GMT):
mainly due to the node.js community lacking capabilities in validating the trust chain (there is good support for that finally but would require node.js 8)

jimthematrix (Fri, 09 Jun 2017 20:15:10 GMT):
mainly due to the node.js community lacking capabilities in validating the trust chain, there is good support for that finally but would require node.js 8

jimthematrix (Fri, 09 Jun 2017 20:16:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=E6xgabF7FTNpu6ckb) @praveennagpal as of v1.0 the event hub can only be connected to peers in your own org

jimthematrix (Fri, 09 Jun 2017 20:23:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BNyMPk4Z4qq2BRoDH) @Dpkkmr the failure is during endorsing, this typically means for some reason the endorsing peer was not able to run the chaincode in a container successfully, there could be a number of reasons, but the first thing I would check is that the peer and the chaincode container are able to communicate with each other, please make sure you have the following environment variable set properly in the peer service in docker-compose.yaml: `CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fixtures_default`

jimthematrix (Fri, 09 Jun 2017 20:23:33 GMT):
the value of the env variable above is the name of the docker network the peer is in.

jimthematrix (Fri, 09 Jun 2017 21:04:36 GMT):
`docker inspect ` and look at the name of the `Networks` section

jimthematrix (Fri, 09 Jun 2017 21:04:36 GMT):
`docker inspect ` and look at the name under the `Networks` section

vdods (Fri, 09 Jun 2017 21:18:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iTe7vP4KMpMjcN4Sc) @MartinC This has got to be a defect -- from the SDK docs: "createUser(opts) - Returns an authorized user loaded using the private key and pre-enrolled certificate...". The fact that the Client object is storing a reference to the current user context is an implementation detail that external users of FabricClient etc should not be concerned with or affected by

vdods (Fri, 09 Jun 2017 21:31:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ic3v3HQuKL3HCpWgf) @jimthematrix What I'm doing is calling client.createUser (using a single instance of the Client class) multiple times, each for a different user, all simultaneously (via Promise.all). createUser is then returning the resolution value of setUserContext(member), instead of member itself, and so what's likely happening is that setUserContext gets called several times, and the last value it gets set to is the one that all the promises are resolved with. I strongly suggest changing the stateful implementation of Client (and probably others, such as Chain), as it obscures the responsibility of each class and makes the relationships between the concepts more difficult to understand. For example, the Client.installChaincode method presumably acts on behalf of a user, but it's not clear if it does, and the documentation doesn't indicate anything about which user it should be, or that setUserContext should be used. Same for many other functions. Concretely, remove the notion of user context and require the app to pass in the desired User object directly to the relevant methods. It will make for an easier to understand an use SDK and much clearer app code.

vdods (Fri, 09 Jun 2017 21:35:35 GMT):
Regarding re-entrancy -- if a method has side effects due to some internal state, it's almost certainly non-reentrant with respect to multiple simultaneous uses of that object. In this case, the Client object is the model of one organization's interaction with the peer/orderer network. Generally, functions with side-effects are harder to understand (e.g. an OpenGL client, which is just a big mess of statefulness, and is a huge headache to debug)

prashiyn (Sat, 10 Jun 2017 04:47:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JJJvAAknLFdnYAyLA) @vdods Even I had the same issue with Promise.all and createClient. I changed it to serial execution of promises ( cause anyways a single client instance can have only one userContext).

vdods (Sat, 10 Jun 2017 16:19:32 GMT):
@prashiyn createClient or createUser? I don't see a createClient method

nhrishi (Sun, 11 Jun 2017 13:21:30 GMT):
Hi, I'm getting "TypeError: Cannot read property 'extractChannelConfig' of undefined. create-channel.js line 32. I'm using latest beta SDK and fabric beta versions.

nhrishi (Sun, 11 Jun 2017 13:21:30 GMT):
Hi, I'm getting "TypeError: Cannot read property 'extractChannelConfig' of undefined. create-channel.js line 32. I'm using latest beta SDK and fabric beta versions. Can someone pls advise. THanks.

CodeReaper (Sun, 11 Jun 2017 16:43:07 GMT):
Has joined the channel.

CodeReaper (Sun, 11 Jun 2017 16:44:06 GMT):
im trying to figure out fabric-client (nodejs modules functionalities) Im struggling with the code where client.getUserContext is required to registers or enroll other members and work with chaincode..... client.getUserContext seems to be returning undefined as default. I'm not sure how to initialize the usercontext in the client object. Is it done through CLI?? Can anyone help answer this query...Thanks in advance, I've been struggling for quite a while.

jimthematrix (Mon, 12 Jun 2017 02:42:47 GMT):
@CodeReaper https://chat.hyperledger.org/channel/fabric-questions?msg=MaWwecEL8m9rGTJ2B

jimthematrix (Mon, 12 Jun 2017 02:52:07 GMT):
@vdods the stateless design as you described is a legitimate alternative, it would require the user object to be passed to every call that sends requests to the fabric. the v1.0 SDK took a very different (stateful) approach from the very beginning, as evident in the "SDK design spec" https://docs.google.com/document/d/1R5RtIBMW9fZpli37E5Li5_Q9ve3BnQ4q3gWmGZj6Sv4/edit that was published in November 2016. as I explained in an earlier discussion on this subject, we took the view that not every application user would have their distinctive signing identity (private key and signing certificate), but instead the application would maintain a relatively small number of signing identities to use with the fabric. as a result you would want a client instance dedicated to a signing identity (say one for the org admin, and one or a small number for a regular org member).

jimthematrix (Mon, 12 Jun 2017 02:52:07 GMT):
@vdods the stateless design as you described is a legitimate alternative, it would require the user object to be passed to every call that sends requests to the fabric. the v1.0 SDK took a very different (stateful) approach from the very beginning, as evident in the "SDK design spec" https://docs.google.com/document/d/1R5RtIBMW9fZpli37E5Li5_Q9ve3BnQ4q3gWmGZj6Sv4/edit that was published in November 2016. as I explained in an earlier discussion on this subject, we took the view that not every application user needs to have their distinctive signing identity (private key and signing certificate), but instead the application would maintain a relatively small number of signing identities to use with the fabric. as a result you would want a client instance dedicated to a signing identity (say one for the org admin, and one or a small number for a regular org member).

jimthematrix (Mon, 12 Jun 2017 02:57:56 GMT):
if you have the need to use a large number of signing identities to submit requests to the fabric, then this design is not optimal (although it doesn't prevent you from doing that, you'd just have to create many instances of clients and channels). But since the fabric MSP governs access control and endorsement policies based on organizational units and roles (org1.admin, org1.member), there's really no need to use more than one identity for each role. of course you would want to have accountability of each individual user using the app, but that can be tracked and implemented in the application layer outside of the "fabric identities".

jimthematrix (Mon, 12 Jun 2017 03:00:29 GMT):
since we are beta, it'd be really difficult if not impossible to make any API changes. in the next major release (say 1.1) we could consider adding the ability to use the clients and channels in a stateless way, such that if the user object is passed with each fabric request call, it'll be used and the client/channel object itself does not require the user context to be set ahead of time. so basically both the stateful and stateless styles can be supported

jimthematrix (Mon, 12 Jun 2017 03:01:22 GMT):
would like to hear your thoughts, or if anybody else have inputs please feel free to chime in.

jimthematrix (Mon, 12 Jun 2017 03:01:22 GMT):
would like to hear your thoughts, and if anybody else have inputs please feel free to chime in.

jimthematrix (Mon, 12 Jun 2017 03:08:27 GMT):
I just opened https://jira.hyperledger.org/browse/FAB-4563, please continue the discussions there instead of there in the channel

jimthematrix (Mon, 12 Jun 2017 03:12:52 GMT):
Note that this is a very important design discussion. the "statefulness" of the current design was something I pointed out at the very beginning when the design was being discussed and formed, I also attempted to solicit feedback during the New York hackfest and may have done it again in SF hackfest, but at the time I think the community wasn't ready to use it in any serious way so no feedback came forward. What @vdods pointed out here was exactly the kind of concerns I had and the kind of feedback I was hoping to get during those early days.

jimthematrix (Mon, 12 Jun 2017 03:14:36 GMT):
I hope anyone with a point of view would go to FAB-4563 to log their thinking, because come 1.1 I hope to be able to reach a consensus with the community on whether we should work on adding the "stateless" support, and your input is critical.

vdods (Mon, 12 Jun 2017 03:27:10 GMT):
@jimthematrix Thanks Jim, I'll see if I can add any notes to that ticket.

prashiyn (Mon, 12 Jun 2017 04:01:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3tFZLFKpcrBezCrQD) @vdods createUser, sorry for the confusion

CodeReaper (Mon, 12 Jun 2017 08:46:28 GMT):
Hello, as @ji,

CodeReaper (Mon, 12 Jun 2017 08:50:56 GMT):
Hello, as @jimthematrix directed me I've been lookin to set the usercontext of client object by first enrolling a new user and then setting it as usercontext, but while enrolling the new user I'm getting an error. The CA image seems to be running on port 7054 and everything seems to checked out...but when enrolling 'admin' 'adminpw' it throws a weird 404 error. what am I doing wrong??handling error Error: Could not parse enrollment response [404 page not found ] as JSON due to error [SyntaxError: Unexpected token p in JSON at position 4] at IncomingMessage. (/home/sankalp/MyAppData/projects/test_Fabric_Client2/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:719:14) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)

CodeReaper (Mon, 12 Jun 2017 08:53:54 GMT):
Im running balance-transfer images only

CodeReaper (Mon, 12 Jun 2017 08:53:54 GMT):
Im running balance-transfer images only, and ca_url is http://localhost:7054. Any help is appreciated, thanks in advance :)

praveennagpal (Mon, 12 Jun 2017 08:56:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TwJWKj6AezwKLZsnT) @jimthematrix so if we have 2 parties collaborating on the chaincode and 1 party sends a transaction, how would the other party come to know about it?

praveennagpal (Mon, 12 Jun 2017 08:56:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=omTKxCoJsxWtxS2dX) @jimthematrix In that case, if I listen on my peer using the event hub, then I should be able to listen to events generated by peers of other organisation?

praveennagpal (Mon, 12 Jun 2017 08:56:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=omTKxCoJsxWtxS2dX) @jimthematrix In that case, if I listen on my peer using the event hub, then I should be able to listen to events generated by peers of other organisation?

SanthoshKumarMK (Mon, 12 Jun 2017 09:02:18 GMT):
How to get block created time using Query by block number API?

SanthoshKumarMK (Mon, 12 Jun 2017 09:02:18 GMT):
How to get block created time and transaction length using Query by block number API?

SanthoshKumarMK (Mon, 12 Jun 2017 09:02:18 GMT):
How to get the block created time and transaction length using Query by block number API?

SanthoshKumarMK (Mon, 12 Jun 2017 09:02:18 GMT):
How to get the block created time and transaction length of a block using API?

SanthoshKumarMK (Mon, 12 Jun 2017 09:02:18 GMT):
How to get the block created time and transaction length of a block using API? I checked in Query block number API, it seems to be not there.

CodeReaper (Mon, 12 Jun 2017 09:59:36 GMT):
I tried the same client.enroll process with a separately started ca server, and it enrolled my user correctly, giving my me the pem file response back in enrollment object. But when I'm trying with the ca server of balance-server its giving me the error i mentioned above. What could be the reason??

tomconte (Mon, 12 Jun 2017 11:13:21 GMT):
@CodeReaper are you using the same version for the Node.JS SDK and the fabric binaries ? e.g. if using alpha2 SDK, the nodes need to run alpha2 as well. When using the GitHub repos the best is to checkout a specific release tag.

CodeReaper (Mon, 12 Jun 2017 11:22:53 GMT):
The package.json of th repo says fabric-client and fabric-ca-client require version of --">=1.0.0-alpha <1.0.0-alpha.10" and im using 1.0.0-alpha-2

CodeReaper (Mon, 12 Jun 2017 11:22:53 GMT):
@tomconte The package.json of th repo says fabric-client and fabric-ca-client require version of --">=1.0.0-alpha <1.0.0-alpha.10" and im using 1.0.0-alpha2.

tomconte (Mon, 12 Jun 2017 11:55:30 GMT):
@CodeReaper and what about your Fabric CA server ? is it running the alpha2 bits as well ?

CodeReaper (Mon, 12 Jun 2017 11:58:59 GMT):
@tomconte "hyperledger/fabric-ca:x86_64-1.0.0-alpha" , not alpha2. Maybe this is the problem. will check and let you know. Thanks for the response.

jimthematrix (Mon, 12 Jun 2017 12:19:24 GMT):
@CodeReaper the example/balance-transfer version you are running is alpha level (it wasn't updated for alpha2). but still if you launch the fabric from examples/balance-transfer/artifacts/docker-compose.yaml it should pull down the matching alpha level fabric images. make sure to follow the instructions in the examples/balance-transfer/README.md

jimthematrix (Mon, 12 Jun 2017 12:20:13 GMT):
in any case, I would suggest you upgrade to the beta level by `git pull` the repo to get see the latest sample code written against the beta APIs

jimthematrix (Mon, 12 Jun 2017 12:21:22 GMT):
@praveennagpal when you sent a transaction, all the peers in the channel eventually get notified of the block, either by the orderer directly, or by other peers through gossip

SotirisAlfonsos (Mon, 12 Jun 2017 13:03:35 GMT):
Hi. I am trying to create two channels with org1 being part of both channel one and channel two. From what i have seen the channel and client variables are instantiated based on the orgs, so my case ( of an org belonging to two channels does not work ) . Want would be the best way to solve that problem.

SotirisAlfonsos (Mon, 12 Jun 2017 13:03:35 GMT):
Hi. I am trying to create two channels with org1 being part of both channel one and channel two. From what i have seen the `channels` and `clients` variables are instantiated based on the orgs, so my case ( of an org belonging to two channels does not work ) . Want would be the best way to solve that problem.

greg.haskins (Mon, 12 Jun 2017 13:36:31 GMT):
@jimthematrix just porting clients from alpha2->beta now...the one remaining thing I seem to have is my eventhub stopped working

greg.haskins (Mon, 12 Jun 2017 13:36:34 GMT):
any pointers ?

greg.haskins (Mon, 12 Jun 2017 13:37:14 GMT):
e.g. I took working alpha2 code, updated it for changes like chain->channel, removed nonce, updated transactionId, etc

greg.haskins (Mon, 12 Jun 2017 13:37:31 GMT):
and for the most part, things are working _except_ I no longer get my completion events

ericmvaughn (Mon, 12 Jun 2017 14:32:19 GMT):
@greg.haskins and @jimthematrix I was having the same issue with the eventhub but it turned out that I missed changing `ehtxid = txId.toString();` to `ehtxid = txId.getTransactionID();`

greg.haskins (Mon, 12 Jun 2017 14:32:42 GMT):
@ericmvaughn that is a good hint, thx

greg.haskins (Mon, 12 Jun 2017 14:33:46 GMT):
that was it, thanks mate

ericmvaughn (Mon, 12 Jun 2017 14:41:44 GMT):
anytime

jimthematrix (Mon, 12 Jun 2017 16:12:10 GMT):
@ericmvaughn exactly what I would've pointed to @greg.haskins as first thing to check :thumbsup: thanks very much for helping out!

ericmvaughn (Mon, 12 Jun 2017 16:18:17 GMT):
you're welcome, I'm glad I was able to help

greg.haskins (Mon, 12 Jun 2017 16:25:49 GMT):
@jimthematrix in case anyone needs another reference: https://gerrit.hyperledger.org/r/#/c/10477/

durantto (Mon, 12 Jun 2017 18:32:32 GMT):
Has joined the channel.

sstone1 (Mon, 12 Jun 2017 23:00:03 GMT):
The docs for endorsement policies (https://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html) shows the syntax `AND('Org1.member', 'Org2.member', 'Org3.member')`. However, I cannot see how to send an instantiate proposal with an endorsement policy written in this syntax - instead there seems to be some sort of JavaScript object format required. Is my understanding correct? If so, why is this the case?

jimthematrix (Tue, 13 Jun 2017 02:33:36 GMT):
@sstone1 a couple of reasons, 1) the string based syntax is only supported in the CLI tool, meaning it has to be processed into the SignaturePolicy protobuf before sending to the fabric, the go impl relies on a Polish notation parser written in GO that doesn't exist in javascript, 2) it's quite limited in the kinds of policies that can be expressed compared to the JSON based notation that was designed for node SDK (and modeled by java SDK in yaml)

sstone1 (Tue, 13 Jun 2017 08:56:41 GMT):
Thanks @jimthematrix. Do you expect the CLI tool be upgraded at some point to support the JSON/YAML format for endorsement policies?

sstone1 (Tue, 13 Jun 2017 08:56:41 GMT):
Thanks @jimthematrix . Do you expect the CLI tool be upgraded at some point to support the JSON/YAML format for endorsement policies?

praveennagpal (Tue, 13 Jun 2017 13:41:54 GMT):
@jimthematrix the earlier channel creation test script in fabric sdk node had config passed and then signed by 2 orgs and an orderer. Now I see we just pass the envelope in the channel creation request generated by the configtx tool. How is the app expected to run this tool to create a channel dynamically as the configtx tool seems to look like a manual step?

praveennagpal (Tue, 13 Jun 2017 13:41:54 GMT):
@jimthematrix the earlier channel creation test script in fabric sdk node had config passed and then signed by 2 orgs and an orderer. Now I see we just pass the envelope in the channel creation request generated by the configtx tool. How is the app expected to run this tool to create a channel dynamically as the configtx tool appears like a manual step?

praveennagpal (Tue, 13 Jun 2017 13:41:54 GMT):
@jimthematrix I understand but I still don't get the workflow for signing channel configuration which is show in the sdk test for channel creation. In a normal configuration, we can't expect 2 different organisation admin users available to the same application instance to be able to sign the channel config. How is this expected to work in a real scenario?

ShobhanaSundararaman (Tue, 13 Jun 2017 13:53:29 GMT):
Has joined the channel.

ShobhanaSundararaman (Tue, 13 Jun 2017 13:54:45 GMT):
I'm trying to setup the marbles demo in the fabric-node-sdk. I'm unable to create the channel. But getting the below error: Can someone help.

ShobhanaSundararaman (Tue, 13 Jun 2017 13:54:51 GMT):
info: Returning a new winston logger with default configurations TAP version 13 # ***** End-to-end flow: create channel ***** info: [Client.js]: Failed to load user "admin" from local key value store info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA client from options - {"protocol":"http","hostname":"localhost","port":7054} info: [FabricCAClientImpl.js]: Successfully constructed Fabric CA service client: endpoint - {"protocol":"http","hostname":"localhost","port":7054} info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/root/.hfc-key-store"}} not ok 1 Error: Could not parse enrollment response [404 page not found ] as JSON due to error [SyntaxError: Unexpected token p in JSON at position 4] at IncomingMessage. (/root/shobhana/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:560:14) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) --- operator: fail at: cop.enroll.then.then.then.catch (/root/shobhana/fabric-sdk-node/test/unit/util.js:119:8) ... 1..1 # tests 1 # pass 0 # fail 1

jimthematrix (Tue, 13 Jun 2017 14:05:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8QQto4Yeh3KprS5JJ) @sstone1 there hasn't been any discussions about that

jimthematrix (Tue, 13 Jun 2017 14:05:41 GMT):
you are welcome to open a JIRA improvement record for that

jimthematrix (Tue, 13 Jun 2017 14:13:21 GMT):
@praveennagpal the SDK as of now only supports binary input generated by either the configtxgen tool or the new REST based `configtxlator` tool described here: https://github.com/hyperledger/fabric/blob/master/examples/configtxupdate/README.md

jimthematrix (Tue, 13 Jun 2017 14:16:37 GMT):
@ShobhanaSundararaman you can actually search this channel's history and see a number of questions related to the same error. in any case, please make sure the fabric-ca docker images and the node SDK levels are matching (both must be alpha, alpha2 or beta)

CodeReaper (Tue, 13 Jun 2017 14:33:29 GMT):
Hi there, Im trying to create my channel on the network, Ive used balance-transfer images and configs. This error is showing up---

CodeReaper (Tue, 13 Jun 2017 14:33:29 GMT):
Hi there, Im trying to create my channel on the network, Ive used balance-transfer images and configs. This error is showing up--- error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-06-13 20:02:37.607] [ERROR] Helper - Error: BAD_REQUEST at ClientDuplexStream. (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/fabric-client/lib/Orderer.js:93:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:245:14) orderer.example.com | 2017-06-13 14:27:32.937 UTC [orderer/common/broadcast] Handle -> WARN 272 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining

CodeReaper (Tue, 13 Jun 2017 14:33:29 GMT):
Hi there, Im trying to create my channel on the network, Ive used balance-transfer images and configs. This error is showing up--- error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-06-13 20:02:37.607] [ERROR] Helper - Error: BAD_REQUEST at ClientDuplexStream. (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/fabric-client/lib/Orderer.js:93:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:245:14) and on the orderer it gives-- orderer.example.com | 2017-06-13 14:27:32.937 UTC [orderer/common/broadcast] Handle -> WARN 272 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining This is my request object for

CodeReaper (Tue, 13 Jun 2017 14:33:29 GMT):
Hi there, Im trying to create my channel on the network, Ive used balance-transfer images and configs. This error is showing up--- error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-06-13 20:02:37.607] [ERROR] Helper - Error: BAD_REQUEST at ClientDuplexStream. (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/fabric-client/lib/Orderer.js:93:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:245:14) and on the orderer it gives-- orderer.example.com | 2017-06-13 14:27:32.937 UTC [orderer/common/broadcast] Handle -> WARN 272 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining This is my request object for client.createChannel method- { config: , signatures: [ { signature_header: [Object], signature: [Object] } ], name: 'mychannel', orderer: Orderer { _options: { 'grpc.ssl_target_name_override': 'orderer.example.com', 'grpc.default_authority': 'orderer.example.com', 'grpc.primary_user_agent': 'grpc-node/1.2.4' }, _url: 'grpcs://localhost:7050', _endpoint: Endpoint { addr: 'localhost:7050', creds: ChannelCredentials {} }, _request_timeout: 45000, _ordererClient: Client { '$channel': Channel {} } }, txId: TransactionID { _nonce: , _transaction_id: 'ed4ff18d6cbb60d3a009445cc580a4b1bdc7a5ba9ee82c8d45995080a3657892' } } Can anyone point out the reason??

CodeReaper (Tue, 13 Jun 2017 14:33:29 GMT):
Hi there, Im trying to create my channel on the network, Ive used balance-transfer images and configs. This error is showing up--- error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-06-13 20:02:37.607] [ERROR] Helper - Error: BAD_REQUEST at ClientDuplexStream. (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/fabric-client/lib/Orderer.js:93:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:245:14) and on the orderer it gives-- orderer.example.com | 2017-06-13 14:27:32.937 UTC [orderer/common/broadcast] Handle -> WARN 272 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining This is my request object for client.createChannel method- { config: , signatures: [ { signature_header: [Object], signature: [Object] } ], name: 'mychannel', orderer: Orderer { _options: { 'grpc.ssl_target_name_override': 'orderer.example.com', 'grpc.default_authority': 'orderer.example.com', 'grpc.primary_user_agent': 'grpc-node/1.2.4' }, _url: 'grpcs://localhost:7050', _endpoint: Endpoint { addr: 'localhost:7050', creds: ChannelCredentials {} }, _request_timeout: 45000, _ordererClient: Client { '$channel': Channel {} } }, txId: TransactionID { _nonce: , _transaction_id: 'ed4ff18d6cbb60d3a009445cc580a4b1bdc7a5ba9ee82c8d45995080a3657892' } } Can anyone point out the reason??

CodeReaper (Tue, 13 Jun 2017 14:33:29 GMT):
Hi there, Im trying to create my channel on the network, Ive used balance-transfer images and configs. This error is showing up--- error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-06-13 20:02:37.607] [ERROR] Helper - Error: BAD_REQUEST at ClientDuplexStream. (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/fabric-client/lib/Orderer.js:93:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:245:14) and on the orderer it gives-- orderer.example.com | 2017-06-13 14:27:32.937 UTC [orderer/common/broadcast] Handle -> WARN 272 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining This is my request object for client.createChannel method- { config: , signatures: [ { signature_header: [Object], signature: [Object] } ], name: 'mychannel', orderer: Orderer { _options: { 'grpc.ssl_target_name_override': 'orderer.example.com', 'grpc.default_authority': 'orderer.example.com', 'grpc.primary_user_agent': 'grpc-node/1.2.4' }, _url: 'grpcs://localhost:7050', _endpoint: Endpoint { addr: 'localhost:7050', creds: ChannelCredentials {} }, _request_timeout: 45000, _ordererClient: Client { '$channel': Channel {} } }, txId: TransactionID { _nonce: , _transaction_id: 'ed4ff18d6cbb60d3a009445cc580a4b1bdc7a5ba9ee82c8d45995080a3657892' } } Im using all beta version images with beta version SDk. Can anyone point out the reason??

paul.sitoh (Tue, 13 Jun 2017 15:50:12 GMT):
@jimthematrix I just notice that fabric beta-1 is out now on docker hub. Are there any thing we should be aware of from an SDK perspective?

jimthematrix (Tue, 13 Jun 2017 15:59:48 GMT):
@CodeReaper the signatures you have, are they signed by each peer org's admin identity (using the private key under /artifacts/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/addb48b97e97992e9e04869a430009f59e615d94453983d177bf067215b3888c_sk)?

jimthematrix (Tue, 13 Jun 2017 16:01:32 GMT):
@paul.sitoh there are some API changes in beta compared to alpha2, use this CR from @greg.haskins to get an idea of the changes needed to port an alpha2 level app to beta: https://gerrit.hyperledger.org/r/#/c/10477/

xiven (Tue, 13 Jun 2017 16:10:57 GMT):
Has joined the channel.

xiven (Tue, 13 Jun 2017 16:15:06 GMT):
How can I get started using the nodejs sdk? I am able to start the network just fine from the getting started section. I started going through this page (https://fabric-sdk-node.github.io/tutorial-app-dev-env-setup.html) but the link at the bottom to start the tutorial just takes me back to the same page. Do I need to pull down the alpha version and upgrade it or is there a beta version available for me to start using?

bobbiejc (Tue, 13 Jun 2017 16:20:32 GMT):
@xiven I've been poking around the same thing... I found this is the best end-2-end that works: https://github.com/ghaskins/hyperledger-fabric-alpha2-challenge/tree/master/blocledger/poe

bobbiejc (Tue, 13 Jun 2017 16:20:34 GMT):
using v1

bobbiejc (Tue, 13 Jun 2017 16:20:46 GMT):
(at least it worked for me)

xiven (Tue, 13 Jun 2017 16:24:41 GMT):
@bobbiejc Thanks, did it work with beta v1 for you?

bobbiejc (Tue, 13 Jun 2017 16:34:40 GMT):
i didn't try it with beta v1

bobbiejc (Tue, 13 Jun 2017 16:34:48 GMT):
i used alpha2

praveennagpal (Tue, 13 Jun 2017 16:51:15 GMT):
@jimthematrix I understand the binary input for channel creation but I still don't get the workflow for signing channel configuration which is coded in the sdk integration test for channel creation. In a normal configuration, we can't expect 2 different organisation admin users available to the same application instance to be able to sign the channel config. How is this expected to work in a real scenario?

praveennagpal (Tue, 13 Jun 2017 16:51:15 GMT):
@jimthematrix I understand the binary input for channel creation but I still don't get the workflow for signing channel configuration which is coded in the sdk integration test for channel creation. In a normal configuration, we can't expect 2 different organisation admin users available to the same application instance to be able to sign the channel config. How is this expected to work in a real scenario? Is there a way, I can specify signature policy for channel creation in configtx.yaml?

jrosmith (Tue, 13 Jun 2017 17:28:45 GMT):
@jimthematrix having an issue that seems related to the issue @CodeReaper is having. I'm signing the request with the orderer admin and the peerOrg admin, but getting the following message on the Orderer: ``` 2017-06-13 17:22:45.933 UTC [cauthdsl] func2 -> DEBU fa2 Principal evaluation fails: (&{0}) [false false] 2017-06-13 17:22:45.933 UTC [cauthdsl] func1 -> DEBU fa3 Gate evaluation fails: (&{n:1 rules: }) 2017-06-13 17:22:45.933 UTC [orderer/common/broadcast] Handle -> WARN fa4 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining ``` I'm following a modified version of https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/create-channel.js in that I'm only using one organization.

jrosmith (Tue, 13 Jun 2017 17:30:24 GMT):
As a follow up question, why is it that the orderer admin is pushing `string_signature` on line 146/147 of that codebase but the peerorg admin is pushing the entire signature message on line 181/182?

jrosmith (Tue, 13 Jun 2017 17:33:59 GMT):
I'm sorry, its the reverse. the peerorg admin signs with `string_signature` and the ordererAdmin signs with `signature`

jrosmith (Tue, 13 Jun 2017 17:36:05 GMT):
Oh wait a minute, according to the example code org1 is pushing `string_signature` on 146/147 while org2 admin _and_ orderer admin are pushing `signature`...which is the proper method for appending signatures to the signatures array sent up with the request?

jyellick (Tue, 13 Jun 2017 17:50:18 GMT):
As a note, as I have seen this mistake happen multiple times. When signing over the `ConfigUpdate` message, it is imperative that the signature is over the _bytes_ not over the message.

jyellick (Tue, 13 Jun 2017 17:51:19 GMT):
Although we have always known that proto marshaling is non-deterministic, because of the map fields contained in the config protos, the non-deterministic behavior is nearly guaranteed. Remarshaling the message to sign will result in signatures which are not valid for the bytes sent.

jyellick (Tue, 13 Jun 2017 17:51:54 GMT):
@jrosmith @CodeReaper @jimthematrix ^

jrosmith (Tue, 13 Jun 2017 17:54:34 GMT):
@jyellick How should I go about fixing this error then? Is it just an issue of using `string_signature` vs `signature` or should I be using a different method of signing the channel config than in the e2e/create-channel example?

jyellick (Tue, 13 Jun 2017 17:57:18 GMT):
@jrosmith I'm not certain that my comment is in fact the source of your problem, and @jimthematrix is going to be a much better person to answer the question you just posed. I just wanted to suggest that you check to make sure that the signature is occurring over the same message bytes each time (and not that the message was being marshaled and signed each time), in case this is your underlying problem. The `cauthdsl` error snippet you posted could be indicative that the signature failed to validate. If you could past another 10 lines or so prior, I could validate this.

jrosmith (Tue, 13 Jun 2017 17:58:03 GMT):
Sure! Give me a second to grab the logs. Better yet, @Asara can grab them

Asara (Tue, 13 Jun 2017 17:58:51 GMT):
```

Asara (Tue, 13 Jun 2017 17:58:51 GMT):
Very long logs

Asara (Tue, 13 Jun 2017 17:59:54 GMT):
Gonna paste the last few lines

Asara (Tue, 13 Jun 2017 18:00:00 GMT):
``` 2017-06-13 17:37:30.851 UTC [msp/identity] newIdentity -> DEBU 106e Creating identity instance for ID &{OrdererMSP b2526ac6af3ca47a4250f372fdcfa892bbda7046a568b4e97fa854bc35b0f12a} 2017-06-13 17:37:30.853 UTC [cauthdsl] func2 -> DEBU 106f Identity ([10 10 79 114 100 101 114 101 114 77 83 80 18 219 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 84 68 67 67 65 102 79 103 65 119 73 66 65 103 73 82 65 76 78 57 103 98 121 48 66 105 85 89 53 53 74 66 106 86 113 69 113 103 85 119 67 103 89 73 75 111 90 73 122 106 48 69 65 119 73 119 97 84 69 76 10 77 65 107 71 65 49 85 69 66 104 77 67 86 86 77 120 69 122 65 82 66 103 78 86 66 65 103 84 67 107 78 104 98 71 108 109 98 51 74 117 97 87 69 120 70 106 65 85 66 103 78 86 66 65 99 84 68 86 78 104 98 105 66 71 10 99 109 70 117 89 50 108 122 89 50 56 120 70 68 65 83 66 103 78 86 66 65 111 84 67 50 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 82 99 119 70 81 89 68 86 81 81 68 69 119 53 106 89 83 53 108 101 71 70 116 10 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 68 103 121 77 68 77 48 77 68 100 97 70 119 48 121 78 122 65 50 77 68 89 121 77 68 77 48 77 68 100 97 77 70 103 120 67 122 65 74 66 103 78 86 10 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 89 87 52 103 82 110 74 104 98 109 78 112 10 99 50 78 118 77 82 119 119 71 103 89 68 86 81 81 68 69 120 78 118 99 109 82 108 99 109 86 121 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 10 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 90 105 55 70 72 79 52 54 100 115 79 103 74 81 114 56 80 68 99 65 103 51 54 81 103 76 118 85 74 104 65 90 103 108 71 80 81 88 57 116 80 85 122 106 49 118 110 117 10 99 53 78 114 98 103 100 81 119 97 102 115 103 109 112 66 65 55 111 81 83 99 107 55 101 109 110 52 53 112 115 79 90 116 83 50 69 97 79 66 106 68 67 66 105 84 65 79 66 103 78 86 72 81 56 66 65 102 56 69 66 65 77 67 10 66 97 65 119 69 119 89 68 86 82 48 108 66 65 119 119 67 103 89 73 75 119 89 66 66 81 85 72 65 119 69 119 68 65 89 68 86 82 48 84 65 81 72 47 66 65 73 119 65 68 65 114 66 103 78 86 72 83 77 69 74 68 65 105 10 103 67 66 65 72 47 65 119 105 68 78 47 110 107 50 82 110 78 75 111 102 48 98 75 116 106 72 104 83 82 56 113 81 106 119 116 90 43 50 55 83 110 121 98 83 84 65 110 66 103 78 86 72 82 69 69 73 68 65 101 103 104 78 118 10 99 109 82 108 99 109 86 121 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 103 103 100 118 99 109 82 108 99 109 86 121 77 65 111 71 67 67 113 71 83 77 52 57 66 65 77 67 65 48 99 65 77 69 81 67 73 71 121 82 10 106 88 107 82 102 110 90 78 113 69 51 121 70 83 69 119 120 85 80 108 81 83 71 102 110 115 81 97 117 66 71 97 90 103 74 67 105 108 66 104 65 105 66 74 47 72 99 100 72 88 48 88 77 112 80 54 100 120 49 115 99 100 47 120 10 121 88 75 86 108 83 67 72 89 84 54 53 122 122 117 86 109 70 70 87 83 81 61 61 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]) does not satisfy principal: The identity is a member of a different MSP (expected Org2MSP, got OrdererMSP) 2017-06-13 17:37:30.853 UTC [cauthdsl] func2 -> DEBU 1070 Principal evaluation fails: (&{0}) [false false false] 2017-06-13 17:37:30.853 UTC [cauthdsl] func1 -> DEBU 1071 Gate evaluation fails: (&{n:1 rules: }) 2017-06-13 17:37:30.853 UTC [orderer/common/broadcast] Handle -> WARN 1072 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining ```

jimthematrix (Tue, 13 Jun 2017 18:00:32 GMT):
@praveennagpal to collect the signatures from different org admins, you need to send the ConfigUpdate bytes to the involved parties to get signed. If those parties uses apps built with node SDK, they can call client.signChannelConfig() to generate the signature and send back to you

Asara (Tue, 13 Jun 2017 18:01:15 GMT):
Hm. Actually further up, I see the error methinks.

Asara (Tue, 13 Jun 2017 18:01:22 GMT):
``` 2017-06-13 17:37:30.850 UTC [cauthdsl] func2 -> DEBU 1061 Identity ([10 7 79 114 103 49 77 83 80 18 235 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 87 84 67 67 65 103 67 103 65 119 73 66 65 103 73 81 76 112 82 51 108 81 112 100 77 99 73 55 48 100 81 98 120 99 97 77 114 106 65 75 66 103 103 113 104 107 106 79 80 81 81 68 65 106 66 122 77 81 115 119 10 67 81 89 68 86 81 81 71 69 119 74 86 85 122 69 84 77 66 69 71 65 49 85 69 67 66 77 75 81 50 70 115 97 87 90 118 99 109 53 112 89 84 69 87 77 66 81 71 65 49 85 69 66 120 77 78 85 50 70 117 73 69 90 121 10 89 87 53 106 97 88 78 106 98 122 69 90 77 66 99 71 65 49 85 69 67 104 77 81 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 69 99 77 66 111 71 65 49 85 69 65 120 77 84 89 50 69 117 10 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 68 103 121 77 68 77 48 77 68 100 97 70 119 48 121 78 122 65 50 77 68 89 121 77 68 77 48 77 68 100 97 10 77 70 115 120 67 122 65 74 66 103 78 86 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 10 89 87 52 103 82 110 74 104 98 109 78 112 99 50 78 118 77 82 56 119 72 81 89 68 86 81 81 68 69 120 90 119 90 87 86 121 77 67 53 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 10 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 112 79 88 118 52 116 106 115 116 113 86 116 78 108 43 69 106 112 73 86 108 89 103 49 50 98 111 66 73 85 105 104 10 73 53 78 75 68 53 54 112 85 81 69 57 68 122 112 97 66 113 74 52 67 73 104 77 112 76 53 105 116 97 50 114 65 110 104 106 54 108 83 78 100 76 106 47 87 120 107 50 86 71 120 103 87 75 79 66 106 84 67 66 105 106 65 79 10 66 103 78 86 72 81 56 66 65 102 56 69 66 65 77 67 66 97 65 119 69 119 89 68 86 82 48 108 66 65 119 119 67 103 89 73 75 119 89 66 66 81 85 72 65 119 69 119 68 65 89 68 86 82 48 84 65 81 72 47 66 65 73 119 10 65 68 65 114 66 103 78 86 72 83 77 69 74 68 65 105 103 67 67 97 118 107 78 120 67 120 71 89 87 68 102 105 110 86 105 103 53 53 84 76 111 107 83 53 49 90 57 105 56 105 77 108 97 100 77 90 73 119 57 105 111 68 65 111 10 66 103 78 86 72 82 69 69 73 84 65 102 103 104 90 119 90 87 86 121 77 67 53 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 103 103 86 119 90 87 86 121 77 68 65 75 66 103 103 113 104 107 106 79 10 80 81 81 68 65 103 78 72 65 68 66 69 65 105 65 118 101 86 80 54 98 48 108 72 81 116 76 48 113 67 112 47 100 122 69 104 56 81 47 120 74 105 106 51 110 54 103 71 73 76 47 78 69 48 82 69 49 81 73 103 74 79 107 80 10 66 111 109 121 82 106 54 54 74 106 74 43 85 47 122 110 107 101 101 85 78 68 102 85 117 53 97 51 102 67 117 53 76 118 51 54 121 83 89 61 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]) does not satisfy principal: This identity is not an admin ```

jyellick (Tue, 13 Jun 2017 18:01:40 GMT):
Aha, yes, that would be a problem

Asara (Tue, 13 Jun 2017 18:01:41 GMT):
But we are definitely passing Org1MSP's admin ID

Asara (Tue, 13 Jun 2017 18:01:55 GMT):
Or rather the certs for that admin

praveennagpal (Tue, 13 Jun 2017 18:02:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Z2uJu2FNhHZgdg8jX) @jimthematrix in that case, would it mean some off chain communication to pass the bytes for signing from org1 to org2?

jyellick (Tue, 13 Jun 2017 18:03:08 GMT):
@Asara you may always pull the channel config, and look at the admin certs for each org via `configtxlator`

jyellick (Tue, 13 Jun 2017 18:03:36 GMT):
You should find the bytes in the output are exactly equal the certificate you are encoding in the signature.

jimthematrix (Tue, 13 Jun 2017 18:03:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GtDDJvBBDP8kmjwZk) @jyellick in other words, do not decode the bytes into protobuf object, just sign the raw bytes, correct Jason?

jyellick (Tue, 13 Jun 2017 18:06:27 GMT):
Correct. The appropriate flow is: 1. Some user creates a config update message, marshaled as bytes. 2. That user distributes the proposed bytes to the interested parties 3. Those other parties may decode the bytes to inspect it to their satisfaction, but if they sign, they must sign over the original bytes 4. Someone (usually the user from step 1) collects all of the `ConfigSignature` messages from the other parties, sets them in `ConfigUpdateEnvelope` and then submits as a config update transaction

jyellick (Tue, 13 Jun 2017 18:06:27 GMT):
Correct. The appropriate flow is: 1. Some user creates a config update message, marshaled as bytes. 2. That user distributes the proposed bytes to the interested parties 3. Those other parties may decode the bytes to inspect it to their satisfaction, but if they sign, they must sign over the original bytes 4. Someone (usually the user from step 1) collects all of the `ConfigSignature` messages from the other parties, sets them in `ConfigUpdateEnvelope` along with the original marshaled bytes, and then submits as a config update transaction

jyellick (Tue, 13 Jun 2017 18:06:27 GMT):
Correct. The appropriate flow is: 1. Some user creates a config update message, marshaled as bytes. 2. That user distributes the proposed bytes to the interested parties 3. Those other parties may decode the bytes to inspect it to their satisfaction, but if they sign, they must sign over the original bytes 4. Someone (usually the user from step 1) collects all of the `ConfigSignature` messages from the other parties, sets them in `ConfigUpdateEnvelope` along with the original marshaled `ConfigUpdate` bytes, and then submits as a config update transaction

jimthematrix (Tue, 13 Jun 2017 18:07:20 GMT):
@Asara when you say _Org1MSP's admin ID_, can you clarify if that's the identity under the Admin@org1.example.com, or the "admin" user you enroll with fabric-ca?

Asara (Tue, 13 Jun 2017 18:07:52 GMT):
The identity under Admin@org1.example.com

jimthematrix (Tue, 13 Jun 2017 18:08:24 GMT):
ok then, not sure why the `does not satisfy principal: This identity is not an admin` message

jimthematrix (Tue, 13 Jun 2017 18:09:05 GMT):
how many orgs do you have in that consortium?

Asara (Tue, 13 Jun 2017 18:09:35 GMT):
Two

Asara (Tue, 13 Jun 2017 18:09:48 GMT):
Well 3 if you include the orderer

jimthematrix (Tue, 13 Jun 2017 18:10:31 GMT):
can you paste a few more lines above your last post?

jimthematrix (Tue, 13 Jun 2017 18:10:43 GMT):
wondering what is being checked

Asara (Tue, 13 Jun 2017 18:11:04 GMT):
Sure

Asara (Tue, 13 Jun 2017 18:11:15 GMT):
``` 2017-06-13 18:09:21.514 UTC [policies] GetPolicy -> DEBU 112a Returning policy ChannelCreationPolicy for evaluation 2017-06-13 18:09:21.514 UTC [cauthdsl] func1 -> DEBU 112b Gate evaluation starts: (&{n:1 rules: }) 2017-06-13 18:09:21.514 UTC [cauthdsl] func2 -> DEBU 112c Principal evaluation starts: (&{0}) (used [false false false]) 2017-06-13 18:09:21.514 UTC [msp/identity] newIdentity -> DEBU 112d Creating identity instance for ID &{Org1MSP 29ac6af6ccb6371cfeb23011b30ab219ca35d6a28b88e5ab8f904f900668fde8} 2017-06-13 18:09:21.514 UTC [cauthdsl] func2 -> DEBU 112e Identity ([10 7 79 114 103 49 77 83 80 18 235 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 87 84 67 67 65 103 67 103 65 119 73 66 65 103 73 81 76 112 82 51 108 81 112 100 77 99 73 55 48 100 81 98 120 99 97 77 114 106 65 75 66 103 103 113 104 107 106 79 80 81 81 68 65 106 66 122 77 81 115 119 10 67 81 89 68 86 81 81 71 69 119 74 86 85 122 69 84 77 66 69 71 65 49 85 69 67 66 77 75 81 50 70 115 97 87 90 118 99 109 53 112 89 84 69 87 77 66 81 71 65 49 85 69 66 120 77 78 85 50 70 117 73 69 90 121 10 89 87 53 106 97 88 78 106 98 122 69 90 77 66 99 71 65 49 85 69 67 104 77 81 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 69 99 77 66 111 71 65 49 85 69 65 120 77 84 89 50 69 117 10 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 68 103 121 77 68 77 48 77 68 100 97 70 119 48 121 78 122 65 50 77 68 89 121 77 68 77 48 77 68 100 97 10 77 70 115 120 67 122 65 74 66 103 78 86 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 10 89 87 52 103 82 110 74 104 98 109 78 112 99 50 78 118 77 82 56 119 72 81 89 68 86 81 81 68 69 120 90 119 90 87 86 121 77 67 53 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 10 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 112 79 88 118 52 116 106 115 116 113 86 116 78 108 43 69 106 112 73 86 108 89 103 49 50 98 111 66 73 85 105 104 10 73 53 78 75 68 53 54 112 85 81 69 57 68 122 112 97 66 113 74 52 67 73 104 77 112 76 53 105 116 97 50 114 65 110 104 106 54 108 83 78 100 76 106 47 87 120 107 50 86 71 120 103 87 75 79 66 106 84 67 66 105 106 65 79 10 66 103 78 86 72 81 56 66 65 102 56 69 66 65 77 67 66 97 65 119 69 119 89 68 86 82 48 108 66 65 119 119 67 103 89 73 75 119 89 66 66 81 85 72 65 119 69 119 68 65 89 68 86 82 48 84 65 81 72 47 66 65 73 119 10 65 68 65 114 66 103 78 86 72 83 77 69 74 68 65 105 103 67 67 97 118 107 78 120 67 120 71 89 87 68 102 105 110 86 105 103 53 53 84 76 111 107 83 53 49 90 57 105 56 105 77 108 97 100 77 90 73 119 57 105 111 68 65 111 10 66 103 78 86 72 82 69 69 73 84 65 102 103 104 90 119 90 87 86 121 77 67 53 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 103 103 86 119 90 87 86 121 77 68 65 75 66 103 103 113 104 107 106 79 10 80 81 81 68 65 103 78 72 65 68 66 69 65 105 65 118 101 86 80 54 98 48 108 72 81 116 76 48 113 67 112 47 100 122 69 104 56 81 47 120 74 105 106 51 110 54 103 71 73 76 47 78 69 48 82 69 49 81 73 103 74 79 107 80 10 66 111 109 121 82 106 54 54 74 106 74 43 85 47 122 110 107 101 101 85 78 68 102 85 117 53 97 51 102 67 117 53 76 118 51 54 121 83 89 61 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]) does not satisfy principal: The identity is a member of a different MSP (expected Org2MSP, got Org1MSP) ```

Asara (Tue, 13 Jun 2017 18:11:37 GMT):
``` 2017-06-13 18:09:21.514 UTC [msp/identity] newIdentity -> DEBU 112f Creating identity instance for ID &{OrdererMSP b2526ac6af3ca47a4250f372fdcfa892bbda7046a568b4e97fa854bc35b0f12a} 2017-06-13 18:09:21.514 UTC [cauthdsl] func2 -> DEBU 1130 Identity ([10 10 79 114 100 101 114 101 114 77 83 80 18 219 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 84 68 67 67 65 102 79 103 65 119 73 66 65 103 73 82 65 76 78 57 103 98 121 48 66 105 85 89 53 53 74 66 106 86 113 69 113 103 85 119 67 103 89 73 75 111 90 73 122 106 48 69 65 119 73 119 97 84 69 76 10 77 65 107 71 65 49 85 69 66 104 77 67 86 86 77 120 69 122 65 82 66 103 78 86 66 65 103 84 67 107 78 104 98 71 108 109 98 51 74 117 97 87 69 120 70 106 65 85 66 103 78 86 66 65 99 84 68 86 78 104 98 105 66 71 10 99 109 70 117 89 50 108 122 89 50 56 120 70 68 65 83 66 103 78 86 66 65 111 84 67 50 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 82 99 119 70 81 89 68 86 81 81 68 69 119 53 106 89 83 53 108 101 71 70 116 10 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 68 103 121 77 68 77 48 77 68 100 97 70 119 48 121 78 122 65 50 77 68 89 121 77 68 77 48 77 68 100 97 77 70 103 120 67 122 65 74 66 103 78 86 10 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 89 87 52 103 82 110 74 104 98 109 78 112 10 99 50 78 118 77 82 119 119 71 103 89 68 86 81 81 68 69 120 78 118 99 109 82 108 99 109 86 121 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 10 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 90 105 55 70 72 79 52 54 100 115 79 103 74 81 114 56 80 68 99 65 103 51 54 81 103 76 118 85 74 104 65 90 103 108 71 80 81 88 57 116 80 85 122 106 49 118 110 117 10 99 53 78 114 98 103 100 81 119 97 102 115 103 109 112 66 65 55 111 81 83 99 107 55 101 109 110 52 53 112 115 79 90 116 83 50 69 97 79 66 106 68 67 66 105 84 65 79 66 103 78 86 72 81 56 66 65 102 56 69 66 65 77 67 10 66 97 65 119 69 119 89 68 86 82 48 108 66 65 119 119 67 103 89 73 75 119 89 66 66 81 85 72 65 119 69 119 68 65 89 68 86 82 48 84 65 81 72 47 66 65 73 119 65 68 65 114 66 103 78 86 72 83 77 69 74 68 65 105 10 103 67 66 65 72 47 65 119 105 68 78 47 110 107 50 82 110 78 75 111 102 48 98 75 116 106 72 104 83 82 56 113 81 106 119 116 90 43 50 55 83 110 121 98 83 84 65 110 66 103 78 86 72 82 69 69 73 68 65 101 103 104 78 118 10 99 109 82 108 99 109 86 121 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 103 103 100 118 99 109 82 108 99 109 86 121 77 65 111 71 67 67 113 71 83 77 52 57 66 65 77 67 65 48 99 65 77 69 81 67 73 71 121 82 10 106 88 107 82 102 110 90 78 113 69 51 121 70 83 69 119 120 85 80 108 81 83 71 102 110 115 81 97 117 66 71 97 90 103 74 67 105 108 66 104 65 105 66 74 47 72 99 100 72 88 48 88 77 112 80 54 100 120 49 115 99 100 47 120 10 121 88 75 86 108 83 67 72 89 84 54 53 122 122 117 86 109 70 70 87 83 81 61 61 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]) does not satisfy principal: The identity is a member of a different MSP (expected Org2MSP, got OrdererMSP) 2017-06-13 18:09:21.515 UTC [msp/identity] newIdentity -> DEBU 1131 Creating identity instance for ID &{OrdererMSP b2526ac6af3ca47a4250f372fdcfa892bbda7046a568b4e97fa854bc35b0f12a} ```

Asara (Tue, 13 Jun 2017 18:12:01 GMT):
``` 2017-06-13 18:09:21.515 UTC [cauthdsl] func2 -> DEBU 1132 Identity ([10 10 79 114 100 101 114 101 114 77 83 80 18 219 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 84 68 67 67 65 102 79 103 65 119 73 66 65 103 73 82 65 76 78 57 103 98 121 48 66 105 85 89 53 53 74 66 106 86 113 69 113 103 85 119 67 103 89 73 75 111 90 73 122 106 48 69 65 119 73 119 97 84 69 76 10 77 65 107 71 65 49 85 69 66 104 77 67 86 86 77 120 69 122 65 82 66 103 78 86 66 65 103 84 67 107 78 104 98 71 108 109 98 51 74 117 97 87 69 120 70 106 65 85 66 103 78 86 66 65 99 84 68 86 78 104 98 105 66 71 10 99 109 70 117 89 50 108 122 89 50 56 120 70 68 65 83 66 103 78 86 66 65 111 84 67 50 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 82 99 119 70 81 89 68 86 81 81 68 69 119 53 106 89 83 53 108 101 71 70 116 10 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 68 103 121 77 68 77 48 77 68 100 97 70 119 48 121 78 122 65 50 77 68 89 121 77 68 77 48 77 68 100 97 77 70 103 120 67 122 65 74 66 103 78 86 10 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 89 87 52 103 82 110 74 104 98 109 78 112 10 99 50 78 118 77 82 119 119 71 103 89 68 86 81 81 68 69 120 78 118 99 109 82 108 99 109 86 121 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 10 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 90 105 55 70 72 79 52 54 100 115 79 103 74 81 114 56 80 68 99 65 103 51 54 81 103 76 118 85 74 104 65 90 103 108 71 80 81 88 57 116 80 85 122 106 49 118 110 117 10 99 53 78 114 98 103 100 81 119 97 102 115 103 109 112 66 65 55 111 81 83 99 107 55 101 109 110 52 53 112 115 79 90 116 83 50 69 97 79 66 106 68 67 66 105 84 65 79 66 103 78 86 72 81 56 66 65 102 56 69 66 65 77 67 10 66 97 65 119 69 119 89 68 86 82 48 108 66 65 119 119 67 103 89 73 75 119 89 66 66 81 85 72 65 119 69 119 68 65 89 68 86 82 48 84 65 81 72 47 66 65 73 119 65 68 65 114 66 103 78 86 72 83 77 69 74 68 65 105 10 103 67 66 65 72 47 65 119 105 68 78 47 110 107 50 82 110 78 75 111 102 48 98 75 116 106 72 104 83 82 56 113 81 106 119 116 90 43 50 55 83 110 121 98 83 84 65 110 66 103 78 86 72 82 69 69 73 68 65 101 103 104 78 118 10 99 109 82 108 99 109 86 121 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 103 103 100 118 99 109 82 108 99 109 86 121 77 65 111 71 67 67 113 71 83 77 52 57 66 65 77 67 65 48 99 65 77 69 81 67 73 71 121 82 10 106 88 107 82 102 110 90 78 113 69 51 121 70 83 69 119 120 85 80 108 81 83 71 102 110 115 81 97 117 66 71 97 90 103 74 67 105 108 66 104 65 105 66 74 47 72 99 100 72 88 48 88 77 112 80 54 100 120 49 115 99 100 47 120 10 121 88 75 86 108 83 67 72 89 84 54 53 122 122 117 86 109 70 70 87 83 81 61 61 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]) does not satisfy principal: The identity is a member of a different MSP (expected Org2MSP, got OrdererMSP) 2017-06-13 18:09:21.515 UTC [cauthdsl] func2 -> DEBU 1133 Principal evaluation fails: (&{0}) [false false false] 2017-06-13 18:09:21.515 UTC [cauthdsl] func1 -> DEBU 1134 Gate evaluation fails: (&{n:1 rules: }) 2017-06-13 18:09:21.515 UTC [cauthdsl] func1 -> DEBU 1135 Gate evaluation starts: (&{n:1 rules: }) 2017-06-13 18:09:21.515 UTC [cauthdsl] func2 -> DEBU 1136 Principal evaluation starts: (&{0}) (used [false false false]) 2017-06-13 18:09:21.515 UTC [msp/identity] newIdentity -> DEBU 1137 Creating identity instance for ID &{Org1MSP 29ac6af6ccb6371cfeb23011b30ab219ca35d6a28b88e5ab8f904f900668fde8} 2017-06-13 18:09:21.515 UTC [msp] SatisfiesPrincipal -> DEBU 1138 Checking if identity satisfies ADMIN role for Org1MSP ```

Asara (Tue, 13 Jun 2017 18:12:09 GMT):
I can dump more in here if you'd like

Asara (Tue, 13 Jun 2017 18:13:02 GMT):
Then it goes onto ``` 2017-06-13 18:09:21.515 UTC [cauthdsl] func2 -> DEBU 1139 Identity ([10 7 79 114 103 49 77 83 80 18 235 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 87 84 67 67 65 103 67 103 65 119 73 66 65 103 73 81 76 112 82 51 108 81 112 100 77 99 73 55 48 100 81 98 120 99 97 77 114 106 65 75 66 103 103 113 104 107 106 79 80 81 81 68 65 106 66 122 77 81 115 119 10 67 81 89 68 86 81 81 71 69 119 74 86 85 122 69 84 77 66 69 71 65 49 85 69 67 66 77 75 81 50 70 115 97 87 90 118 99 109 53 112 89 84 69 87 77 66 81 71 65 49 85 69 66 120 77 78 85 50 70 117 73 69 90 121 10 89 87 53 106 97 88 78 106 98 122 69 90 77 66 99 71 65 49 85 69 67 104 77 81 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 69 99 77 66 111 71 65 49 85 69 65 120 77 84 89 50 69 117 10 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 68 103 121 77 68 77 48 77 68 100 97 70 119 48 121 78 122 65 50 77 68 89 121 77 68 77 48 77 68 100 97 10 77 70 115 120 67 122 65 74 66 103 78 86 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 10 89 87 52 103 82 110 74 104 98 109 78 112 99 50 78 118 77 82 56 119 72 81 89 68 86 81 81 68 69 120 90 119 90 87 86 121 77 67 53 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 10 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 112 79 88 118 52 116 106 115 116 113 86 116 78 108 43 69 106 112 73 86 108 89 103 49 50 98 111 66 73 85 105 104 10 73 53 78 75 68 53 54 112 85 81 69 57 68 122 112 97 66 113 74 52 67 73 104 77 112 76 53 105 116 97 50 114 65 110 104 106 54 108 83 78 100 76 106 47 87 120 107 50 86 71 120 103 87 75 79 66 106 84 67 66 105 106 65 79 10 66 103 78 86 72 81 56 66 65 102 56 69 66 65 77 67 66 97 65 119 69 119 89 68 86 82 48 108 66 65 119 119 67 103 89 73 75 119 89 66 66 81 85 72 65 119 69 119 68 65 89 68 86 82 48 84 65 81 72 47 66 65 73 119 10 65 68 65 114 66 103 78 86 72 83 77 69 74 68 65 105 103 67 67 97 118 107 78 120 67 120 71 89 87 68 102 105 110 86 105 103 53 53 84 76 111 107 83 53 49 90 57 105 56 105 77 108 97 100 77 90 73 119 57 105 111 68 65 111 10 66 103 78 86 72 82 69 69 73 84 65 102 103 104 90 119 90 87 86 121 77 67 53 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 103 103 86 119 90 87 86 121 77 68 65 75 66 103 103 113 104 107 106 79 10 80 81 81 68 65 103 78 72 65 68 66 69 65 105 65 118 101 86 80 54 98 48 108 72 81 116 76 48 113 67 112 47 100 122 69 104 56 81 47 120 74 105 106 51 110 54 103 71 73 76 47 78 69 48 82 69 49 81 73 103 74 79 107 80 10 66 111 109 121 82 106 54 54 74 106 74 43 85 47 122 110 107 101 101 85 78 68 102 85 117 53 97 51 102 67 117 53 76 118 51 54 121 83 89 61 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]) does not satisfy principal: This identity is not an admin ```

Asara (Tue, 13 Jun 2017 18:13:06 GMT):
Which I assumed should work.

CodeReaper (Tue, 13 Jun 2017 19:49:03 GMT):
@jimthematrix Will signing the channelconfig by admin of all organizations and then passing them in request object work?? I thought the signing has to be done by any one organization's admin as in balance-transfer there signing is done by only one client object(line 38 of create-channel.js) which would contain any one admin as the current user in the usercontext.

CodeReaper (Tue, 13 Jun 2017 19:49:03 GMT):
@jimthematrix Will signing the channelconfig by admin of all organizations and then passing them in request object work?? I thought the signing has to be done by any one organization's admin as in balance-transfer there signing is done by only one client object(line 38 of create-channel.js) which would contain any one admin as the current user in the usercontext. This is the full screenshot of the process---

CodeReaper (Tue, 13 Jun 2017 19:51:07 GMT):

Message Attachments

CodeReaper (Tue, 13 Jun 2017 19:51:24 GMT):

Message Attachments

praveennagpal (Wed, 14 Jun 2017 03:40:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SnXPNPD6NN7XaWtrK) @jyellick For step 2, how is the user supposed to distribute bytes to the interested parties for signatures using the node SDK?

jyellick (Wed, 14 Jun 2017 03:43:07 GMT):
@praveennagpal I am not an expert, but I do not believe the SDK supports an explicit mechanism for this. I believe the expectation is that your code would post those bytes to a REST API, or other service to perform this coordination. @jimthematrix can probably give a better response

jyellick (Wed, 14 Jun 2017 03:43:07 GMT):
@praveennagpal I am not an expert, but I do not believe the SDK supports an explicit mechanism for this. I believe the expectation is that your code would post those bytes to some REST or other network API (Google drive? Box? Some application specific storage etc.), to perform this coordination. @jimthematrix can probably give a better response

jyellick (Wed, 14 Jun 2017 03:43:07 GMT):
@praveennagpal I am not an expert, but I do not believe the SDK supports an explicit mechanism for this. I believe the expectation is that your code would post those bytes to some REST or other network API (Most likely some application specific storage, but could be some other network service like Google Drive, Box, etc.), to perform this coordination. @jimthematrix can probably give a better response

linyuadam (Wed, 14 Jun 2017 03:56:23 GMT):
Hi, all, for the channel.sendTransactionProposal(request), the ProposalResponse payload return the writeset?

praveennagpal (Wed, 14 Jun 2017 03:57:43 GMT):
@jyellick thanks. @jimthematrix - is there a way that I could define the signature policy in the configtx.yaml that only one organisation signature is required on the channel config before I send the creation request? I could not find any sample block for signatures in the yaml file which could then be used by the configtx tool.

jyellick (Wed, 14 Jun 2017 03:58:29 GMT):
@praveennagpal The default configuration from `configtxgen` only requires on signature to create a channel.

jyellick (Wed, 14 Jun 2017 03:58:29 GMT):
@praveennagpal The default configuration from `configtxgen` only requires one signature to create a channel.

jyellick (Wed, 14 Jun 2017 03:59:27 GMT):
It is modifying a channel config, in particular, changing the membership of the channel which requires multiple signatures. (This is very much by design, to allow decentralized control of the channel membership)

praveennagpal (Wed, 14 Jun 2017 04:00:05 GMT):
oh.. ok. But the channel creation test on node sdk has 3 signatures and I was using that channel config as reference.

praveennagpal (Wed, 14 Jun 2017 04:00:34 GMT):
when I remove the reference of one organisation signatures, the policy fails

jyellick (Wed, 14 Jun 2017 04:02:26 GMT):
@praveennagpal If the orderer was bootstrapped using `configtxgen`, then the policy only requires the signature from one org admin to create the channel

jyellick (Wed, 14 Jun 2017 04:03:14 GMT):
If you bootstrapped your system via the behave tests, then it requires signatures from all involved in the channel.

praveennagpal (Wed, 14 Jun 2017 04:05:32 GMT):
when you say orderer bootstrapping, you mean the genesis block provided as part of the docker environment config?

jyellick (Wed, 14 Jun 2017 04:05:40 GMT):
Correct

praveennagpal (Wed, 14 Jun 2017 04:08:27 GMT):
but I see 3 certificates in that genesis block created by the fabric getting started which runs the configgen tool

praveennagpal (Wed, 14 Jun 2017 04:08:48 GMT):
i am looking at orderer.genesis.block created by it

jyellick (Wed, 14 Jun 2017 04:09:25 GMT):
Are you referring to the MSP definition?

praveennagpal (Wed, 14 Jun 2017 04:12:44 GMT):
yes

praveennagpal (Wed, 14 Jun 2017 04:13:22 GMT):
it shows the certificate for each Org1MSP, Org2MSP and OrdererMSP

jyellick (Wed, 14 Jun 2017 04:14:12 GMT):
Ah. Yes, those three certificates are used for confirming identity of signers on the network.

jyellick (Wed, 14 Jun 2017 04:14:51 GMT):
To create a new channel, you must sign the `ConfigUpdate` with an admin cert from either Org1MSP or Org2MSP

praveennagpal (Wed, 14 Jun 2017 04:16:05 GMT):
Ok. When I try to do with only admin cert from Org1MSP, it fails, When I do it with both, then it works, so just wondering where in the genesis block, the signature requirement is specified?

jyellick (Wed, 14 Jun 2017 04:17:05 GMT):
Under the `Consortium` group, there is a consortium definition, which contains a `values` map, which contains a `ChannelCreationPolicy`

jyellick (Wed, 14 Jun 2017 04:18:00 GMT):
This is a `common.Policy` proto structure. And, by default it is an `ImplicitMetaPolicy` which requires that `ANY` of the `Admins` policies, for the consortium members are satisfied.

praveennagpal (Wed, 14 Jun 2017 04:19:54 GMT):
ok. I see the text for channelcreationpolicy but I guess its difficult to make it out from the serealised format of the genesis block.

jyellick (Wed, 14 Jun 2017 04:20:16 GMT):
You may use the `configtxlator` tool to decode the genesis block into a more human readable form

praveennagpal (Wed, 14 Jun 2017 04:20:51 GMT):
ok, will that show me the exact signature policy?

jyellick (Wed, 14 Jun 2017 04:22:19 GMT):
You can see the signature policies as defined for the `Admins` policies for each org, which will be evaluated by the `ChannelCreationPolicy`, yes.

jyellick (Wed, 14 Jun 2017 04:23:15 GMT):
``` make configtxlator configtxlator start & curl -X POST --data-binary @configuration_block.proto http://127.0.0.1:7059/protolator/decode/common.Block ```

jyellick (Wed, 14 Jun 2017 04:23:37 GMT):
You may see additional documentation here: https://github.com/hyperledger/fabric/tree/master/examples/configtxupdate

praveennagpal (Wed, 14 Jun 2017 04:24:08 GMT):
Thanks @jyellick. Very useful.

mochechan (Wed, 14 Jun 2017 07:04:53 GMT):
I have run the example: https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer The terminal 1 runs ./runApp.sh, and terminal 2 runs ./testAPIs.sh. In my test, the step "POST instantiate chaincode on peer1 of Org1" fails. The terminal 1 shows the following error messages: [2017-06-14 15:01:59.946] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/a/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/a/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) [2017-06-14 15:02:45.024] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-06-14 15:02:45.037] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-06-14 15:02:45.092] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-06-14 15:02:45.094] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined Could you please tell me how to solve this problem. Thank you in advanced.

CodeReaper (Wed, 14 Jun 2017 07:44:56 GMT):

Message Attachments

CodeReaper (Wed, 14 Jun 2017 07:45:01 GMT):
Hello, Im getting problems signing the channelconfigs. I've tried signing it both organizations separately and also with both organizations together, but i still get same error, My orderer gives logs stating something like expected org1MSP, got org2MSP. or expected org2MSP, got org1MSP (if i interchange the position of signarures in request object of createchannel).

CodeReaper (Wed, 14 Jun 2017 07:45:01 GMT):
Hello, Im getting problems signing the channelconfigs. I've tried signing it both organizations separately and also with both organizations together, but i still get same error, My orderer gives logs stating something like expected org1MSP, got org2MSP. or expected org2MSP, got org1MSP (if i interchange the position of signarures in request object of createchannel). As u can see above.

CodeReaper (Wed, 14 Jun 2017 07:47:08 GMT):
This is my code, Ive made two client objects each for one organizations, and made their respective signatures. Can someone point out where i could me messing up??

CodeReaper (Wed, 14 Jun 2017 07:47:27 GMT):

Message Attachments

mochechan (Wed, 14 Jun 2017 07:59:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tHJmzQym9TyAuHgxr) @mochechan I found a solution: just increase the request-timeout value in node_modules/fabric-client/config/default.json. I know that this solution is not good, but it solves my problem currently.

Rachitga (Wed, 14 Jun 2017 08:04:07 GMT):
Has joined the channel.

nhrishi (Wed, 14 Jun 2017 08:15:52 GMT):
Hi, I'm getting this error while invoking a chaincode error: `[client-utils.js]: sendPeersProposal - Promise is rejected: Error: could not find chaincode with name 'DealCC' - make sure the chaincode DealCC has been successfully instantiated and try again at /home/hrishi/repo_sdk_client_beta/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: could not find chaincode with name 'DealCC' - make sure the chaincode DealCC has been successfully instantiated and try again at /home/hrishi/repo_sdk_client_beta/node_modules/grpc/src/node/src/client.js:434:17 `

nhrishi (Wed, 14 Jun 2017 08:15:52 GMT):
Hi, I'm getting this error while invoking a chaincode error: `[client-utils.js]: sendPeersProposal - Promise is rejected: Error: could not find chaincode with name 'DealCC' - make sure the chaincode DealCC has been successfully instantiated and try again at /home/hrishi/repo_sdk_client_beta/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: could not find chaincode with name 'DealCC' - make sure the chaincode DealCC has been successfully instantiated and try again at /home/hrishi/repo_sdk_client_beta/node_modules/grpc/src/node/src/client.js:434:17 ` . I've a chaincode instantiated on the respective peers.

praveennagpal (Wed, 14 Jun 2017 08:42:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Jue7SdgL6NfFjSgWj) @nhrishi is the chaincode instantiated and running when you do docker ps?

nhrishi (Wed, 14 Jun 2017 08:45:19 GMT):
@praveennagpal yes I can see chaincode instantiated in docker ps.

nhrishi (Wed, 14 Jun 2017 08:48:51 GMT):
Also I've created 2 channels and instanatiated this chaincode on one channel

CodeReaper (Wed, 14 Jun 2017 11:48:26 GMT):
can someone talk a little about channel.joinchannel method, Is it for manging events generated by transactions only?? and what type of events??

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Here is our scenario: 1st Chaincode: buyer.go (this file we are installing on Peer0) 2nd Chaincode: lender.go (this file we are installing on Peer1) Apart from this we have created a Common.go file with common helper functions. That we are importing in above chaincode files. Now we have 2 approaches to test our scenarios: 1) Testing with Fabric CLI: It is working fine. 2) Testing with Node SDK: A) Individual test-cases for "buyer.go on Peer0" or "lender.go on Peer1" work fine. B) But, if we try to execute complete test-scenario (including both test-cases), it fails to execute with an error inside the helper-function from imported file (i.e. common.go). Is it happening due to ambiguities of having same imported file (common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Here is our scenario: 1st Chaincode: buyer.go (this file we are installing on Peer0) 2nd Chaincode: lender.go (this file we are installing on Peer1) Apart from this we have created a Common.go file with common helper functions. That we are importing in above chaincode files. Now we have 2 approaches to test our scenarios: 1) Testing with Fabric CLI: It is working fine. 2) Testing with Node SDK: A ) Individual test-cases for "buyer.go on Peer0" or "lender.go on Peer1" work fine. B ) But, if we try to execute complete test-scenario (including both test-cases), it fails to execute with an error inside the helper-function from imported file (i.e. common.go). Is it happening due to ambiguities of having same imported file (common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Before raising our query, here is a summary of our scenario: 1st Chaincode: buyer.go (this file we are installing on Peer0) 2nd Chaincode: lender.go (this file we are installing on Peer1) Apart from this we have created a Common.go file with common helper functions. That we are importing in above chaincode files. We are using 2 approaches to test our scenarios: 1) Testing with Fabric CLI: It is working fine. 2) Testing with Node SDK: A ) Individual test-cases for "buyer.go on Peer0" or "lender.go on Peer1" work fine. B ) But, if we try to execute complete test-scenario (including both test-cases), it fails to execute with an error inside the helper-function from imported file (i.e. common.go). Is it happening due to ambiguities of having same imported file (common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Before raising our query, here is a summary of our scenario: Our test application follow a simple work-flow. It has 3 files: File 1 : buyer.go chaincode with Method1 API File 2 : lender.go chaincode with method2 API File 3 : common.go, which is a library file having few common functions. This file we are importing in buyer.go and lender.go (As per work-flow, Method1 followed by Method2 should be executed) We are using 2 approaches to test our scenarios: 1) Testing with Fabric CLI: It is working fine while testing individual chaincode or executing the work-flow. 2) Testing with Node SDK: A ) Individual test-cases work file. i.e. "buyer.go on Peer0" works fine. And also "lender.go on Peer1" works fine. B ) But the problem comes, when we try to execute the work-flow. It fails to execute with an error inside the helper function of imported file (i.e. common.go). We are not sure, if it's happening due to ambiguities of importing same file (i.e. common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Before raising our query, here is a summary of our scenario: Our test application follow a simple work-flow. It has 3 files: File 1 : buyer.go chaincode with Method1 API File 2 : lender.go chaincode with method2 API File 3 : common.go, which is a library file having few common functions. This file we are importing in buyer.go and lender.go (As per work-flow, Method1 followed by Method2 should be executed) We are using 2 approaches to test our scenarios: 1) Testing with Fabric CLI: It is working fine while testing individual chaincode or executing the work-flow. 2) Testing with Fabric SDK Node: A ) Individual test-cases work file. i.e. "buyer.go on Peer0" works fine. And also "lender.go on Peer1" works fine. B ) But the problem comes, when we try to execute the work-flow. It fails to execute with an error inside the helper function of imported file (i.e. common.go). We are not sure, if it's happening due to ambiguities of importing same file (i.e. common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Before raising our query, here is a summary of our application: Our test application follow a simple work-flow. It has 3 files: File 1 : buyer.go chaincode with Method1 API File 2 : lender.go chaincode with method2 API File 3 : common.go, which is a library file having few common functions. This file we are importing in buyer.go and lender.go (As per work-flow, Method1 followed by Method2 should be executed) We are using 2 approaches to test our scenarios: 1) Testing with Fabric CLI: It is working fine while testing individual chaincode or executing the work-flow. 2) Testing with Fabric SDK Node: A ) Individual test-cases work file. i.e. "buyer.go on Peer0" works fine. And also "lender.go on Peer1" works fine. B ) But the problem comes, when we try to execute the work-flow. It fails to execute with an error inside the helper function of imported file (i.e. common.go). We are not sure, if it's happening due to ambiguities of importing same file (i.e. common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Before raising our query, here is a summary of our application: Our test application follows a simple work-flow. It has 3 files: File 1 : buyer.go chaincode with Method1 API File 2 : lender.go chaincode with method2 API File 3 : common.go, which is a library file having few common functions. This file we are importing in buyer.go and lender.go (As per work-flow, Method1 followed by Method2 should be executed) We are using 2 approaches to test our scenarios: 1) Testing with Fabric CLI: It is working fine while testing individual chaincode or executing the work-flow. 2) Testing with Fabric SDK Node: A ) Individual test-cases work file. i.e. "buyer.go on Peer0" works fine. And also "lender.go on Peer1" works fine. B ) But the problem comes, when we try to execute the work-flow. It fails to execute with an error inside the helper function of imported file (i.e. common.go). We are not sure, if it's happening due to ambiguities of importing same file (i.e. common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Before raising our query, here is a summary of our application: Our test application follows a simple work-flow. It has 3 files: File 1 : buyer.go chaincode with Method1 API File 2 : lender.go chaincode with method2 API File 3 : common.go, which is a library file having few common functions. This file we are importing in buyer.go and lender.go (As per work-flow, Method1 followed by Method2 should be executed) We are using 2 approaches to test our scenarios: a) individual Method test and work-flow test): 1) With Fabric CLI: Works fine for both "testing individual chaincodes" or "testing the work-flow". 2) With Fabric SDK Node: A ) Individual test-cases work file. i.e. "buyer.go on Peer0" works fine. And also "lender.go on Peer1" works fine. B ) But the problem comes, when we try to execute the work-flow. It fails to execute with an error inside the helper function of imported file (i.e. common.go). We are not sure, if it's happening due to ambiguities of importing same file (i.e. common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Before raising our query, here is a summary of our application: Our test application follows a simple work-flow. It has 3 files: File 1 : buyer.go chaincode with Method1 API File 2 : lender.go chaincode with method2 API File 3 : common.go, which is a library file having few common functions. This file we are importing in buyer.go and lender.go We are using 2 approaches to test our scenarios: a) Individual test: Both "buyer.go on Peer0" and "lender.go on Peer1" should execute individually. b) Work-flow test: Method1 followed by Method2 should execute successfully 1) Testing with Fabric CLI: Works fine for both "individual test" or "work-flow test". 2) With Fabric SDK Node: A ) Individual test works file. i.e. "buyer.go on Peer0" as well as "lender.go on Peer1". B ) But the problem comes, when we try to execute "work-flow test". It fails with error inside the helper function of imported file (i.e. common.go). We are not sure, if it's happening due to ambiguities of importing same file (i.e. common.go) in both chaincodes using govendor. We appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

SyneBlockChainTeam (Wed, 14 Jun 2017 12:34:24 GMT):
Before raising our query, here is a summary of our application: Our test application follows a simple work-flow. It has 3 files: File 1 : buyer.go chaincode with Method1 API File 2 : lender.go chaincode with method2 API File 3 : common.go, which is a library file having few common functions. This file we are importing in buyer.go and lender.go We are using 2 approaches to test our scenarios: a) Individual test: Both "buyer.go on Peer0" and "lender.go on Peer1" should execute individually. b) Work-flow test: Method1 followed by Method2 should execute successfully 1) Testing with Fabric CLI: Works fine for both "individual test" or "work-flow test". 2) With Fabric SDK Node: A ) Individual test works file. i.e. "buyer.go on Peer0" as well as "lender.go on Peer1". B ) But the problem comes, when we try to execute "work-flow test". It fails with error inside the helper function of imported file (i.e. common.go). We are not sure, if it's happening due to ambiguities of importing same file (i.e. common.go) in both chaincodes using govendor. Please let us know, if this type of scenario is supported with Fabric Node SDK? If so, we appreciate, if someone provides a work-around or any clues to resolve this issue. Regards.

jrosmith (Wed, 14 Jun 2017 14:06:01 GMT):
@jyellick @Asara still haven't found the root of the problem with identities not being an admin so I figured it would be useful to post the exact sdk code we're using to enroll admins and sign configs: ``` return FABRIC_UTILS.getOrderAdminSubmitter(client).then((admin) => { var envelope_bytes = fs.readFileSync(path.join(__dirname, '/../../../../data/keys/fabric10/channel_info/mychannel.tx')); channel_config = client.extractChannelConfig(envelope_bytes); client._userContext = null; return FABRIC_UTILS.getSubmitter(client, null, true /*get the org admin*/, 'org1'); }).then((admin) => { // here admin is peerorg1Admin var signature = client.signChannelConfig(channel_config); // convert signature to a storable string // fabric-client SDK will convert back during create var string_signature = signature.toBuffer().toString('hex'); // collect signature from org1 admin // TODO: signature counting against policies on the orderer // at the moment is being investigated, but it requires this // weird double-signature from each org admin signatures.push(string_signature); signatures.push(string_signature); // make sure we do not reuse the user client._userContext = null; return FABRIC_UTILS.getOrderAdminSubmitter(client); }).then((admin) => { // here admin is ordererAdmin the_user = admin; var signature = client.signChannelConfig(channel_config); // collect signature from orderer org admin // TODO: signature counting against policies on the orderer // at the moment is being investigated, but it requires this // weird double-signature from each org admin signatures.push(signature); signatures.push(signature); var tx_id = client.newTransactionID(); var request = { config: channel_config, signatures : signatures, name : channel_name, orderer : orderer, txId : tx_id }; return client.createChannel(request); }) ```

jrosmith (Wed, 14 Jun 2017 14:10:18 GMT):
and for reference here's our config.json: ``` { "test-network":{ "orderer": { "url": "grpcs://our.url", "server-hostname": "orderer.example.com", "tls_cacerts": "path/to/orderers/cacerts/ordererca.pem" }, "org1": { "name": "peerOrg1", "mspid": "Org1MSP", "ca": { "url": "https://our.url", "name": "ca-org1" }, "peer1": { "requests": "grpcs://our.url", "events": "grpcs://our.url", "server-hostname": "peer0.org1.example.com", "tls_cacerts": "path/to/peerOrgs/org1/users/org1Admin/cacerts/org1ca.pem" } } } } ```

SotirisAlfonsos (Wed, 14 Jun 2017 15:00:36 GMT):
Hello i started using kafka for ordering in my node-sdk app. I create my containers and the orderers connect to the brockers successfully. Then when i am trying to create a channel i get: ```orderer.example.com | 2017-06-14 14:37:44.146 UTC [grpc] Println -> DEBU 187 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.14:7050->172.22.0.1:38912: write: broken pipe" orderer.example.com | 2017-06-14 14:38:44.198 UTC [grpc] Println -> DEBU 188 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.14:7050->172.22.0.1:38918: write: broken pipe"``` and on the sdk side: ```[2017-06-14 14:41:09.138] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:115:21)```

SotirisAlfonsos (Wed, 14 Jun 2017 15:00:36 GMT):
Hello i started using kafka for ordering in my node-sdk app. I create my containers and the orderers connect to the brockers successfully. Then when i am trying to create a channel i get: ```orderer.example.com | 2017-06-14 14:37:44.146 UTC [grpc] Println -> DEBU 187 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.14:7050->172.22.0.1:38912: write: broken pipe" orderer.example.com | 2017-06-14 14:38:44.198 UTC [grpc] Println -> DEBU 188 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.14:7050->172.22.0.1:38918: write: broken pipe"``` and on the sdk side: ```[2017-06-14 14:41:09.138] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:115:21)```

SotirisAlfonsos (Wed, 14 Jun 2017 15:00:36 GMT):
Hello i started using kafka for ordering in my node-sdk app. I create my containers and the orderers connect to the brockers successfully. Then when i am trying to create a channel i get: ```orderer.example.com | 2017-06-14 14:37:44.146 UTC [grpc] Println -> DEBU 187 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.14:7050->172.22.0.1:38912: write: broken pipe" orderer.example.com | 2017-06-14 14:38:44.198 UTC [grpc] Println -> DEBU 188 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.14:7050->172.22.0.1:38918: write: broken pipe"``` and on the sdk side: ```[2017-06-14 14:41:09.138] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:115:21)``` Is this an issue on the sdk side? Do we have any pointers on how to fix it?

SanthoshKumarMK (Wed, 14 Jun 2017 15:28:35 GMT):
Hi, I would like to get current and previous block hash of a particular block. I tried it using "Query Block Number" API, in the output I can see previous_hash and data_hash. But the current block's previous_hash is not matching with data_hash of the previous block. Please correct me if I am wrong in this. Thanks

jyellick (Wed, 14 Jun 2017 15:32:02 GMT):
@SanthoshKumarMK The block previous block hash is the hash of the previous block header, not the previous data hash.

jyellick (Wed, 14 Jun 2017 15:33:42 GMT):
So essentially, the hash chain is across block headers, where each block header may validate the data via the block data hash. In this way, the block data may be pruned some day, without breaking the ability to validate the hash chain.

SanthoshKumarMK (Wed, 14 Jun 2017 15:54:10 GMT):
How to compute "block header hash" for the current block?

qizhang (Wed, 14 Jun 2017 16:03:08 GMT):
Has joined the channel.

jimthematrix (Wed, 14 Jun 2017 16:51:21 GMT):
@SanthoshKumarMK blockhash = hash(blocknumber + datahash + prevHash)

jimthematrix (Wed, 14 Jun 2017 16:53:27 GMT):
blocknumber + datahash + prevHash is the same as the block header as @jyellick mentioned above

jimthematrix (Wed, 14 Jun 2017 16:53:27 GMT):
(blocknumber + datahash + prevHash), or the block header as @jyellick mentioned above

jyellick (Wed, 14 Jun 2017 16:56:00 GMT):
To be clear, block header hash is computed as the hash over the ASN.1 marshaling of the block header.

jimthematrix (Wed, 14 Jun 2017 16:57:44 GMT):
node SDK does not provide this calculation directly, but java SDK does as a util function, you can use this as reference: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/SDKUtils.java#L50

SanthoshKumarMK (Wed, 14 Jun 2017 17:06:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fw58mXjXwu24dtNGf) @jimthematrix I am using NodeJS SDK, how will I achieve this?

SanthoshKumarMK (Wed, 14 Jun 2017 17:06:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fw58mXjXwu24dtNGf) @jimthematrix I am using NodeJS SDK, Is there any work around?

greg.haskins (Wed, 14 Jun 2017 17:10:36 GMT):
@jimthematrix I meant to give you this feedback the other day: FYI, the alpha2->beta cleanup was nice, thank you

greg.haskins (Wed, 14 Jun 2017 17:10:49 GMT):
(the lack of doc/guidance was really the only challenge)

jimthematrix (Wed, 14 Jun 2017 17:11:04 GMT):
@SanthoshKumarMK there are ASN.1 object support modules in npm

greg.haskins (Wed, 14 Jun 2017 17:11:07 GMT):
once it was understood what needed to be updated, the improvements to the SDK UX were good

jimthematrix (Wed, 14 Jun 2017 17:11:37 GMT):
@greg.haskins thanks for the feedback (wish we had more time for some remaining cleanup still)

greg.haskins (Wed, 14 Jun 2017 17:11:51 GMT):
yeah, "software is never done"

jimthematrix (Wed, 14 Jun 2017 17:12:26 GMT):
and doc is being beefed up as we speak: https://gerrit.hyperledger.org/r/10321 https://gerrit.hyperledger.org/r/10511 https://gerrit.hyperledger.org/r/10553

greg.haskins (Wed, 14 Jun 2017 17:13:34 GMT):
One of the cleanups I anticipate is the notion that we can read the channel config from the peer

greg.haskins (Wed, 14 Jun 2017 17:14:11 GMT):
e.g. rather than client.newChannel(), perhaps it becomes client.connectChannel()

greg.haskins (Wed, 14 Jun 2017 17:14:27 GMT):
and things like the orderer/peers can be bootstrapped from that

greg.haskins (Wed, 14 Jun 2017 17:14:37 GMT):
(not for v1.0

greg.haskins (Wed, 14 Jun 2017 17:14:40 GMT):
post v1.0

greg.haskins (Wed, 14 Jun 2017 17:14:58 GMT):
im thinking all thats needed is a seed-node from the clients MSP

greg.haskins (Wed, 14 Jun 2017 17:15:08 GMT):
(or seeds, really)

greg.haskins (Wed, 14 Jun 2017 17:15:22 GMT):
seeds from MSP, bootstrap the other MSPs/orderer/etc

jimthematrix (Wed, 14 Jun 2017 17:15:33 GMT):
yes makes a lot of sense

greg.haskins (Wed, 14 Jun 2017 17:15:54 GMT):
have to step away, bbiab

jimthematrix (Wed, 14 Jun 2017 17:16:35 GMT):
the "initialize()" call sort of meant to provide that but it requires knowing the orderer (instead of the peer(s))

jimthematrix (Wed, 14 Jun 2017 17:17:05 GMT):
if you don't mind please open a JIRA for that

jrosmith (Wed, 14 Jun 2017 18:19:27 GMT):
hey all, can anybody help me understand the difference between `newChannel(name)` and `createChannel(request)`? I get that `newChannel` creates a new instance of a channel object and `createChannel` starts building it on the channel, but I don't think I fully understand how the two interact

jrosmith (Wed, 14 Jun 2017 18:22:45 GMT):
I'm sorry, `createChannel` starts building it on the Orderer***

qizhang (Wed, 14 Jun 2017 18:30:50 GMT):
I got this error when using "node create_channel.js" :E0614 13:32:06.905572149 37946 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. Anyone can advise me how to solve it? Thanks!

qizhang (Wed, 14 Jun 2017 18:30:50 GMT):
I got this error when using "node create_channel.js (https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/create-channel.js)" :E0614 13:32:06.905572149 37946 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. Anyone can advise me how to solve it? Thanks!

jtrayfield (Wed, 14 Jun 2017 18:40:48 GMT):
previously (alpha2), in order to install new chaincode, I sent sendInstantiateProposal(request) followed by sendTransaction(request)

jtrayfield (Wed, 14 Jun 2017 18:41:13 GMT):
in the beta, sendTransaction(request) hangs. is it still necessary to send it?

jtrayfield (Wed, 14 Jun 2017 19:22:17 GMT):
fabric-sdk-node/test/integration/e2e/e2eUtils.js still seems to do both.....

jtrayfield (Wed, 14 Jun 2017 20:05:03 GMT):
found it: was TransactionID in registerTxEvent

kyle1234 (Thu, 15 Jun 2017 01:13:05 GMT):
Has joined the channel.

yahtoo (Thu, 15 Jun 2017 03:00:25 GMT):
Has joined the channel.

CodeReaper (Thu, 15 Jun 2017 05:44:36 GMT):
@jrosmith @jyellick @Asara I solved the identities not being admi problem. It is required that admin of the organization is set up with the privateKeyPEM and signedCertPEM using methods of getOrgAdmin and readAllFIles methods(reading pem and certificates from the artifacts folder created by cryptogen) found in balance-transfer. Its still not clear why this is necessary when the clint object isnt updated with the usercontext at any time before signing the channelconfig. But it worked for me. You can try the same.

jyellick (Thu, 15 Jun 2017 05:46:31 GMT):
@CodeReaper Thanks for the update. Glad to hear you got things going

CodeReaper (Thu, 15 Jun 2017 05:46:59 GMT):
I also needed to sign the channelconfig with only one organization not more

jyellick (Thu, 15 Jun 2017 05:48:28 GMT):
I would not expect additional signatures to harm the validation. Are you certain?

jyellick (Thu, 15 Jun 2017 05:48:28 GMT):
~I would not expect additional signatures to harm the validation. Are you certain?~ Misread this, I believe this is expected behavior for your scenario

CodeReaper (Thu, 15 Jun 2017 05:50:36 GMT):
I have two separate organizations, I wanted to launch my channel only on one so I took signatures of that admin only not others.

praveennagpal (Thu, 15 Jun 2017 05:54:49 GMT):
@jyellick or @jimthematrix - Do you know how can I download 1.0.0-alpha2 docker images of fabric as the current curl getting started link fetches the 1.0.0-beta images? asked this question in the fabric channel but did not get a response yet. I have build and tested against 1.0.0-alpha2 and want to set up a new environment with it.

jyellick (Thu, 15 Jun 2017 05:59:12 GMT):
@praveennagpal Have you tried following the instructions posted with alpha-2? https://github.com/hyperledger/fabric/blob/v1.0.0-alpha2/docs/source/getting_started.rst

nhrishi (Thu, 15 Jun 2017 06:05:32 GMT):
Hi, I'm using latest beta version of fabric and fabric-sdk-node. User registration and enrollment is working fine but when i try to invoke a chaincode, getting a below errror error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid". Can someone pls advise. Thanks.

jyellick (Thu, 15 Jun 2017 06:13:03 GMT):
@nhrishi This sounds like a clock synchronization issue to me. I would check to make sure that the time is accurate (preferably via NTP) across all of the different VMs or physical machines involved.

nhrishi (Thu, 15 Jun 2017 06:18:26 GMT):
@jyellick Yes possible, this is not the consistent issue, occurs randomly.

praveennagpal (Thu, 15 Jun 2017 06:28:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mFeB9KA9KqkrsBgcn) @jyellick Yes tried it. It did not work.

praveennagpal (Thu, 15 Jun 2017 06:31:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bZKxB3KEPDiPyEDD8) @jyellick Getting this error: tar: This does not look like a tar archive gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now

CodeReaper (Thu, 15 Jun 2017 06:38:40 GMT):
Im getting somewhat same issue with send instantiateProposal method--- error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:434:17

CodeReaper (Thu, 15 Jun 2017 06:38:51 GMT):
Any clue?

CodeReaper (Thu, 15 Jun 2017 06:42:17 GMT):
@praveennagpal I would suggest you to work with beta version only as some of code is deprecated in alpha-2 to beta transformation. But you can always just change the tags of the images as alpha2 instead of beta at the end and you have to install the appropriate aplha2 version of fabric-client and fabric-ca-client modules and youre good to go.

praveennagpal (Thu, 15 Jun 2017 06:44:17 GMT):
i am a bit concerned about the node sdk apis. If the previous apis work in beta, then I should be ok.

nhrishi (Thu, 15 Jun 2017 07:14:11 GMT):
@jyellick Is there any workaround for this issue (related to clock sync).

CodeReaper (Thu, 15 Jun 2017 09:10:34 GMT):

Message Attachments

akdj (Thu, 15 Jun 2017 13:28:55 GMT):
I'm trying the fabric-sdk-node/examples/balance-transfer/ beta version ``` error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/root/beta_hyper/fabric-sdk-node-1.0.0-beta/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/root/beta_hyper/fabric-sdk-node-1.0.0-beta/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-06-15 15:19:46.786] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

akdj (Thu, 15 Jun 2017 13:28:55 GMT):
I'm trying the fabric-sdk-node/examples/balance-transfer/ beta version And I have this error, it seems the chaincode is finally instaniated, but the time used is too much ``` error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/root/beta_hyper/fabric-sdk-node-1.0.0-beta/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/root/beta_hyper/fabric-sdk-node-1.0.0-beta/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-06-15 15:19:46.786] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

akdj (Thu, 15 Jun 2017 13:28:55 GMT):
I'm trying the fabric-sdk-node/examples/balance-transfer/ beta version And I have this error, it seems the chaincode is not instaniated ``` error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/root/beta_hyper/fabric-sdk-node-1.0.0-beta/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/root/beta_hyper/fabric-sdk-node-1.0.0-beta/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-06-15 15:19:46.785] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-06-15 15:19:46.786] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

akdj (Thu, 15 Jun 2017 13:30:52 GMT):
maybe need to change the waiting time value in `/node_modules/fabric-client/lib/Peer.js:121:19)`?

akdj (Thu, 15 Jun 2017 13:30:52 GMT):
maybe need to change the waiting time value in `/node_modules/fabric-client/lib/Peer.js:121:19`?

akdj (Thu, 15 Jun 2017 13:30:52 GMT):
maybe need to change the waiting time value in `/node_modules/fabric-client/lib/Peer.js:121:19`?

xiven (Thu, 15 Jun 2017 13:49:08 GMT):
I've ran into that same issue @akdj

xiven (Thu, 15 Jun 2017 13:49:16 GMT):
not sure why though

xiven (Thu, 15 Jun 2017 13:49:50 GMT):
although in your error i see its an timeout issue

akdj (Thu, 15 Jun 2017 13:49:51 GMT):
Not sure too, but when I retry again instantiate, it passed

xiven (Thu, 15 Jun 2017 13:50:04 GMT):
you could increase your timeout and try again

xiven (Thu, 15 Jun 2017 13:50:31 GMT):
i had increased my timeout but I still could not instantiate

akdj (Thu, 15 Jun 2017 13:50:42 GMT):
ok ...

akdj (Thu, 15 Jun 2017 13:51:31 GMT):
I run manually two times chaincode instatiation, and it works after the second time

xiven (Thu, 15 Jun 2017 13:51:48 GMT):
there should be a config file somewhere in node_modules/fabric-client i believe

xiven (Thu, 15 Jun 2017 13:51:54 GMT):
that is where the timeout is set

akdj (Thu, 15 Jun 2017 13:52:03 GMT):
it is maybe the install process, or instantiate process

akdj (Thu, 15 Jun 2017 13:52:28 GMT):
which has bug

xiven (Thu, 15 Jun 2017 13:54:42 GMT):
i'll have to try and pull a fresh copy of balance-transfer and see if i can get the cc to instantiate again

akdj (Thu, 15 Jun 2017 13:57:12 GMT):
ok, keep me know @xiven

jrosmith (Thu, 15 Jun 2017 13:59:25 GMT):
@CodeReaper @jyellick @Asara trying to implement it with the example code in balance transfer, currently getting stuck on `client.extractChannelConfig` in the following code block: ``` var client = helper.getClientForOrg(orgName); var channel = helper.getChannelForOrg(orgName); // read in the envelope for the channel config raw bytes var envelope = fs.readFileSync(channelConfigPath); // extract the channel config bytes from the envelope to be signed var channelConfig = client.extractChannelConfig(envelope); ``` using a config file of the following: ``` { "test-network":{ "orderer": { "url": "grpcs://orderer.url:port", "server-hostname": "orderer.example.com", "tls_cacerts": "path/to/cacerts/ordererca.pem" }, "org1": { "name": "peerOrg1", "mspid": "Org1MSP", "ca": { "url": "https://org1.ca.url", "name": "ca-org1" }, "peer1": { "requests": "grpcs://peer1.url:request_port", "events": "grpcs://peer1.url:event_port", "server-hostname": "peer0.org1.example.com", "tls_cacerts": "path/to/cacerts/org1ca.pem" } } } } ``` I'm getting this error: ``` error: [Client.js]: Problem with extracting the config update object :: Error: Illegal GROUPEND after unknown group: 6 (15 expected) ```

jrosmith (Thu, 15 Jun 2017 14:10:03 GMT):
woops thats because im not supposed to be passing that

xiven (Thu, 15 Jun 2017 14:15:40 GMT):
@akdj yes, I can confirm the first run it failed for me but stopping fabric and restarting then running the testAPI script it worked the second time

akdj (Thu, 15 Jun 2017 14:19:33 GMT):
ok :/

akdj (Thu, 15 Jun 2017 15:07:41 GMT):
@xiven I found the default timeout value is 3000 in /node_modules/fabric-client/lib/Remote.js but instantiate timeout displayed 45000, so need to find out where this 45000 is defined

xiven (Thu, 15 Jun 2017 15:08:45 GMT):
node_modules/fabric-client/config/default.json

akdj (Thu, 15 Jun 2017 15:09:37 GMT):
oh good ! thank you :D

xiven (Thu, 15 Jun 2017 15:09:44 GMT):
yw

xiven (Thu, 15 Jun 2017 15:11:23 GMT):
i noticed that no matter what i do when i try to run the sample app on my mac it will not instantiate. on my ubuntu vm it fails once then it runs fine the next try...rinse repeat. not sure why. what are you running the sample on?

akdj (Thu, 15 Jun 2017 15:13:56 GMT):
I am running on CentOS7

akdj (Thu, 15 Jun 2017 15:14:54 GMT):
@xiven did you check with `docker images` if chaincode image is created?

akdj (Thu, 15 Jun 2017 15:15:19 GMT):
name is something like : `dev-peer1.org1.example.com-mycc-v0`

xiven (Thu, 15 Jun 2017 15:16:48 GMT):
yes it does create

xiven (Thu, 15 Jun 2017 15:17:06 GMT):
no issues installing the chaincode just instantiating it

akdj (Thu, 15 Jun 2017 15:17:54 GMT):
yes but if you checked in realtime, you will notice that, after the install step, this image is not created

akdj (Thu, 15 Jun 2017 15:18:31 GMT):
it is created after, the instantiate command is called and finished with error

xiven (Thu, 15 Jun 2017 15:18:57 GMT):
POST instantiate chaincode on peer1 of Org1 Failed to order the transaction. Error code: undefined POST invoke chaincode on peers of Org1 and Org2 Transacton ID is Failed to order the transaction. Error code: undefined GET query chaincode on peer1 of Org1 User b now has Error: could not find chaincode with name 'mycc' - make sure the chaincode mycc has been successfully instantiated and try again after the move

akdj (Thu, 15 Jun 2017 15:19:03 GMT):
so I am thinking images are created only with instantiate command

akdj (Thu, 15 Jun 2017 15:20:01 GMT):
and when image is created, I retry the api command ``` curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "chaincodeName":"mycc", "chaincodeVersion":"v0", "functionName":"init", "args":[] }' ```

akdj (Thu, 15 Jun 2017 15:20:10 GMT):
and it passed well

akdj (Thu, 15 Jun 2017 15:21:37 GMT):
did you see what i mean?

akdj (Thu, 15 Jun 2017 15:23:35 GMT):
I just set 160000 for my timeout value, and it's work :)

xiven (Thu, 15 Jun 2017 15:29:11 GMT):
let me try that

akdj (Thu, 15 Jun 2017 15:33:21 GMT):
ok

xiven (Thu, 15 Jun 2017 15:34:55 GMT):
if i'm manually running the curl commands i get UnauthorizedError: jwt expired when creating the channel request

xiven (Thu, 15 Jun 2017 15:35:15 GMT):
are you manually running all your curl commands

akdj (Thu, 15 Jun 2017 15:39:54 GMT):
yes

akdj (Thu, 15 Jun 2017 15:40:13 GMT):
I firstly run `./runApp.sh`

akdj (Thu, 15 Jun 2017 15:40:24 GMT):
then, I run manually my command

akdj (Thu, 15 Jun 2017 15:42:23 GMT):
commands are similar to the section Sample REST APIs Requests of the example readme, I run commands by changing only the token

akdj (Thu, 15 Jun 2017 15:42:51 GMT):
yes you need one with runApp.sh and a second terminal for command

jimthematrix (Fri, 16 Jun 2017 00:02:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vitbJa6S42C94KAyc) @praveennagpal easiest way is to use the fabric-sdk-node/exmaples/balance-transfer/artifacts/docker-compose.yaml, modify it by replacing all the `:x86_64-1.0.0-beta` tags with `:x86_64-1.0.0-alpha2`, then do 'docker-compose pull`

jimthematrix (Fri, 16 Jun 2017 00:05:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iA7C3AidfWvTAxc3f) @jyellick that would be my recommendation to check first as well. very likely your docker running the fabric-ca server is in the future relative to the peers, we've seen this in the lab when they are running on different hosts

jimthematrix (Fri, 16 Jun 2017 00:13:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WC9WAZDcuaHZfxxYj) @CodeReaper the error is saying the peer does not believe Org1MSP is part of the channel you are instantiating the chaincode on. double check that the channel configuration has Org1MSP in it when it was created.

jimthematrix (Fri, 16 Jun 2017 00:28:43 GMT):
@akdj the very first instantiate call after a new chaincode install always takes the longest time because the peer first has to build a new docker image for the chaincode, then start it. subsequent instantiate calls will be faster because the image is located so it doesn't have to be rebuilt.

jimthematrix (Fri, 16 Jun 2017 00:29:30 GMT):
every system is different in how long this step takes. if you see a timeout, increase the default timeout

jimthematrix (Fri, 16 Jun 2017 02:02:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=h4TCby9QaFpazbexm) @jrosmith which file did you read in? it must be the output of the `configtxgen -outputChannelCreateTx` command

chenxuan (Fri, 16 Jun 2017 05:19:14 GMT):
TypeError: Cannot read property 'ns' of null at Object.load (/opt/go/src/github.com/hyperledger/fabric/test/tools/PTE/node_modules/grpc/src/node/index.js:124:28) at Object. (/opt/go/src/github.com/hyperledger/fabric/test/tools/PTE/pte-main.js:49:25) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:390:7) at startup (bootstrap_node.js:150:9) /opt/go/src/github.com/hyperledger/fabric/test/tools/PTE/node_modules/grpc/src/node/index.js:124 return loadObject(builder.ns, options);

nhrishi (Fri, 16 Jun 2017 06:57:21 GMT):
Hi, I'm running the latest Fabric -beta version with latest fabric-client (beta) and manage to invoke and query multiple chaincodes with different channels but i keep getting this error ("error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Chaincode data for cc DealCC/1.0 was not found, error cannot retrieve package for chaincode DealCC/1.0, error open /var/hyperledger/production/chaincodes/DealCC.1.0: no such file or directory"). Although, the transaction is processed and committed successfully. This looks like Fabric-SDK-Node issue. Can someone pls advise.

alexliu (Fri, 16 Jun 2017 07:08:52 GMT):
Has joined the channel.

akdj (Fri, 16 Jun 2017 07:24:05 GMT):
@jimthematrix thank you for the explanation

SyneBlockChainTeam (Fri, 16 Jun 2017 08:08:28 GMT):
@jimthematrix We are trying to add peer in balance transfer POC. We made changes to docker-compose.yaml,network-config.js,cryptogen.yaml and since we are using single ORG, i removed ORG2 from everywhere. When i start runApp.sh, orderer and peer2 exits within an min. Could you please let me know if we have any specific procedure to add peers?

outis (Fri, 16 Jun 2017 08:33:41 GMT):
Has joined the channel.

magg (Fri, 16 Jun 2017 09:40:32 GMT):
Has joined the channel.

magg (Fri, 16 Jun 2017 09:40:50 GMT):
hello, is there an simple example that works with fabric 1.0?

magg (Fri, 16 Jun 2017 09:40:50 GMT):
hello, is there a simple example that works with fabric 1.0?

akdj (Fri, 16 Jun 2017 09:41:45 GMT):
@magg which 1.0? alpha1? alpha2, or beta?

magg (Fri, 16 Jun 2017 09:43:15 GMT):
beta

akdj (Fri, 16 Jun 2017 09:49:41 GMT):
https://github.com/hyperledger/fabric-sdk-node/releases download the beta release, read the root README.md, there is a "test" example, however the code is a little complicated to read, because there are a lot of test and debug functions

akdj (Fri, 16 Jun 2017 09:50:58 GMT):
another example, is in the forlder fabric-sdk-node/examples/balance-transfer/ which use a api rest server app.js in which node sdk functions are used

akdj (Fri, 16 Jun 2017 09:50:58 GMT):
another example, is in the forlder fabric-sdk-node/examples/balance-transfer/ https://github.com/hyperledger/fabric-sdk-node/tree/v1.0.0-beta/examples/balance-transfer which use a api rest server app.js in which node sdk functions are used

akdj (Fri, 16 Jun 2017 09:51:22 GMT):
@magg

magg (Fri, 16 Jun 2017 10:12:17 GMT):
thanks a lot @akdj

akdj (Fri, 16 Jun 2017 10:12:39 GMT):
yw

SotirisAlfonsos (Fri, 16 Jun 2017 10:26:54 GMT):
@akdj @xiven I faced the same issue with the timeouts and increasing the limit solved the problem. However i am curious, did you also have this in the orderer logs? ```Identity ([10 7 79 114 103 49 77 83 80 18 174 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 76 84 67 67 65 100 83 103 65 119 73 66 65 103 73 81 90 102 109 68 107 97 99 87 76 84 53 84 122 52 65 90 88 56 103 82 100 84 65 75 66 103 103 113 104 107 106 79 80 81 81 68 65 106 66 122 77 81 115 119 10 67 81 89 68 86 81 81 71 69 119 74 86 85 122 69 84 77 66 69 71 65 49 85 69 67 66 77 75 81 50 70 115 97 87 90 118 99 109 53 112 89 84 69 87 77 66 81 71 65 49 85 69 66 120 77 78 85 50 70 117 73 69 90 121 10 89 87 53 106 97 88 78 106 98 122 69 90 77 66 99 71 65 49 85 69 67 104 77 81 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 69 99 77 66 111 71 65 49 85 69 65 120 77 84 89 50 69 117 10 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 84 89 119 78 122 81 119 78 84 78 97 70 119 48 121 78 122 65 50 77 84 81 119 78 122 81 119 78 84 78 97 10 77 70 115 120 67 122 65 74 66 103 78 86 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 10 89 87 52 103 82 110 74 104 98 109 78 112 99 50 78 118 77 82 56 119 72 81 89 68 86 81 81 68 68 66 90 66 90 71 49 112 98 107 66 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 10 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 55 50 76 83 69 90 117 113 73 43 67 111 100 75 101 56 55 116 75 117 104 110 76 107 103 54 43 66 56 47 56 104 10 97 73 105 80 118 98 56 115 69 76 121 120 66 115 75 105 98 67 56 50 85 101 98 56 65 84 83 102 115 118 86 106 89 83 113 114 84 107 51 99 117 49 71 86 102 110 56 79 117 90 78 87 52 97 78 105 77 71 65 119 68 103 89 68 10 86 82 48 80 65 81 72 47 66 65 81 68 65 103 87 103 77 66 77 71 65 49 85 100 74 81 81 77 77 65 111 71 67 67 115 71 65 81 85 70 66 119 77 66 77 65 119 71 65 49 85 100 69 119 69 66 47 119 81 67 77 65 65 119 10 75 119 89 68 86 82 48 106 66 67 81 119 73 111 65 103 66 82 107 107 106 114 51 75 108 104 90 118 115 104 70 76 51 121 55 111 48 68 111 110 68 76 67 43 122 86 57 88 71 107 67 104 54 111 51 76 43 104 99 119 67 103 89 73 10 75 111 90 73 122 106 48 69 65 119 73 68 82 119 65 119 82 65 73 103 83 78 118 104 50 102 99 74 65 105 88 49 117 102 85 115 108 115 66 69 71 97 43 118 108 49 99 79 72 65 48 72 104 54 77 102 85 101 112 82 56 75 107 67 10 73 68 67 118 43 90 69 120 111 114 69 66 86 105 48 54 52 111 66 85 118 53 75 57 83 84 102 73 55 114 75 67 48 49 70 83 86 100 52 57 98 43 120 50 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]) does not satisfy principal: The identity is a member of a different MSP (expected OrdererMSP, got Org1MSP)```

SotirisAlfonsos (Fri, 16 Jun 2017 10:26:54 GMT):
@akdj @xiven I faced the same issue with the timeouts and increasing the limit solved the problem. However i am curious, did you also have this in the orderer logs? ```Identity ([10 7 79 114 103 49 77 83 80 18 174 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 76 84 67 67 65 100 83 103 65 119 73 66 65 103 73 81 90 102 109 68 107 97 99 87 76 84 53 84 122 52 65 90 88 56 103 82 100 84 65 75 66 103 103 113 104 107 106 79 80 81 81 68 65 106 66 122 77 81 115 119 10 67 81 89 68 86 81 81 71 69 119 74 86 85 122 69 84 77 66 69 71 65 49 85 69 67 66 77 75 81 50 70 115 97 87 90 118 99 109 53 112 89 84 69 87 77 66 81 71 65 49 85 69 66 120 77 78 85 50 70 117 73 69 90 121 10 89 87 53 106 97 88 78 106 98 122 69 90 77 66 99 71 65 49 85 69 67 104 77 81 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 69 99 77 66 111 71 65 49 85 69 65 120 77 84 89 50 69 117 10 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 84 89 119 78 122 81 119 78 84 78 97 70 119 48 121 78 122 65 50 77 84 81 119 78 122 81 119 78 84 78 97 10 77 70 115 120 67 122 65 74 66 103 78 86 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 10 89 87 52 103 82 110 74 104 98 109 78 112 99 50 78 118 77 82 56 119 72 81 89 68 86 81 81 68 68 66 90 66 90 71 49 112 98 107 66 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 10 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 55 50 76 83 69 90 117 113 73 43 67 111 100 75 101 56 55 116 75 117 104 110 76 107 103 54 43 66 56 47 56 104 10 97 73 105 80 118 98 56 115 69 76 121 120 66 115 75 105 98 67 56 50 85 101 98 56 65 84 83 102 115 118 86 106 89 83 113 114 84 107 51 99 117 49 71 86 102 110 56 79 117 90 78 87 52 97 78 105 77 71 65 119 68 103 89 68 10 86 82 48 80 65 81 72 47 66 65 81 68 65 103 87 103 77 66 77 71 65 49 85 100 74 81 81 77 77 65 111 71 67 67 115 71 65 81 85 70 66 119 77 66 77 65 119 71 65 49 85 100 69 119 69 66 47 119 81 67 77 65 65 119 10 75 119 89 68 86 82 48 106 66 67 81 119 73 111 65 103 66 82 107 107 106 114 51 75 108 104 90 118 115 104 70 76 51 121 55 111 48 68 111 110 68 76 67 43 122 86 57 88 71 107 67 104 54 111 51 76 43 104 99 119 67 103 89 73 10 75 111 90 73 122 106 48 69 65 119 73 68 82 119 65 119 82 65 73 103 83 78 118 104 50 102 99 74 65 105 88 49 117 102 85 115 108 115 66 69 71 97 43 118 108 49 99 79 72 65 48 72 104 54 77 102 85 101 112 82 56 75 107 67 10 73 68 67 118 43 90 69 120 111 114 69 66 86 105 48 54 52 111 66 85 118 53 75 57 83 84 102 73 55 114 75 67 48 49 70 83 86 100 52 57 98 43 120 50 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]) does not satisfy principal: The identity is a member of a different MSP (expected OrdererMSP, got Org1MSP)``` The process succeeds overall but takes almost twice the time it used to.

akdj (Fri, 16 Jun 2017 12:03:31 GMT):
@SotirisAlfonsos sorry, I don't remember what I have in orderer logs...

akdj (Fri, 16 Jun 2017 12:16:17 GMT):
@SotirisAlfonsos now, T am trying the test example of sdk node, without the given docker-compose.yaml and crypto files (fabric-sdk-node/test/fixtures/), I am trying to use with the "getting-start" hyperledger system, and I modified the config.json file in fabric-sdk-node/test/integration/, and I get this when I tried to create channel ``` Principal deserialization failed: (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority) for identity [10 10 79 114 100 101 114 101 114 77 83 80 18 154 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 ...] ```

akdj (Fri, 16 Jun 2017 12:16:17 GMT):
@SotirisAlfonsos now, I am trying the test example of sdk node, without the given docker-compose.yaml and crypto files (fabric-sdk-node/test/fixtures/), I am trying to use with the "getting-start" hyperledger system, and I modified the config.json file in fabric-sdk-node/test/integration/, and I get this when I tried to create channel ``` Principal deserialization failed: (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority) for identity [10 10 79 114 100 101 114 101 114 77 83 80 18 154 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 ...] ```

SotirisAlfonsos (Fri, 16 Jun 2017 12:28:19 GMT):
@akdj was fighting with this until recently. But i do not know your setup. I followed the structure of the `docker-compose.yaml` on test/fixtures to import the correct tls certs. I don't now if this would work in your case too.

akdj (Fri, 16 Jun 2017 12:31:43 GMT):
if I use the the `docker-compose.yaml` and cert on test/fixtures, yes it works well, but I want to run this example application with another hyperledger system, and I have problems...

SotirisAlfonsos (Fri, 16 Jun 2017 12:38:35 GMT):
@akdj yes i get what you mean. What i meant to say is change `ORDERER_GENERAL_TLS_PRIVATEKEY` `ORDERER_GENERAL_TLS_CERTIFICATE` in your docker file according to the paths in fixtures docker-compose, and add the values from your crypto folder. Does it make sense?

akdj (Fri, 16 Jun 2017 12:40:52 GMT):
ok, Iet me try

akdj (Fri, 16 Jun 2017 13:00:08 GMT):
not work

akdj (Fri, 16 Jun 2017 13:00:38 GMT):
I think I have t wrote my own app

Sandeep (Fri, 16 Jun 2017 13:58:37 GMT):
Has joined the channel.

Sandeep (Fri, 16 Jun 2017 14:01:40 GMT):
@here How can I set endorsment policy during chaincode instantiation using fabric-sdk-node?

jimthematrix (Fri, 16 Jun 2017 14:02:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=axkaebM4iXNsvHWft) @chenxuan typically you get this error when the target proto file you are trying to load with grpc is not found

thakkarparth007 (Fri, 16 Jun 2017 14:02:35 GMT):
@Sandeep please take a look at the integration tests. They give a good idea.

jimthematrix (Fri, 16 Jun 2017 14:23:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=b6bkArv2hFxFXsvcp) @nhrishi very likely you have installed the chaincode on some peers (that's why your transactions have gone through successfully) but not on all peers that you are asking to endorse the transaction proposals

jimthematrix (Fri, 16 Jun 2017 14:25:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iqGvNwmHuoZ5CHYj6) @SyneBlockChainTeam if you can upload logs in the orderer and peer2 crashing that'll help us get you the right answer

qizhang (Fri, 16 Jun 2017 20:11:04 GMT):
The couchdb container failed to start when I tried to bring up the Blockchain network defined in fabric-sdk-node. The error is as following "couchdb1 | [error] 2017-06-16T20:04:10.416130Z nonode@nohost emulator -------- Error in process <0.939.0> with exit value: {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk...". Any advise on how to solve it? Thanks!

qizhang (Fri, 16 Jun 2017 20:11:04 GMT):
The couchdb container failed to start when I tried to brought up the Blockchain network defined in fabric-sdk-node. The error is as following "couchdb1 | [error] 2017-06-16T20:04:10.416130Z nonode@nohost emulator -------- Error in process <0.939.0> with exit value: {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,327}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,315}]},{mem3_shards,load_shards_from_disk...". Any advise on how to solve it? Thanks!

qizhang (Fri, 16 Jun 2017 20:51:48 GMT):
What is the link of fabric-sdk-node API document?

praveennagpal (Sat, 17 Jun 2017 06:57:48 GMT):
@jimthematrix I am getting this error on node sdk of fabric-client 1.0.0-beta version. W20170617-12:24:39.988(5.5)? (STDERR) /Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-ca-client/lib/BaseClient.js:8 W20170617-12:24:39.988(5.5)? (STDERR) var BaseClient = class { W20170617-12:24:39.989(5.5)? (STDERR) ^^^^^ W20170617-12:24:39.989(5.5)? (STDERR) W20170617-12:24:39.990(5.5)? (STDERR) SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode W20170617-12:24:39.990(5.5)? (STDERR) at exports.runInThisContext (vm.js:53:16) W20170617-12:24:39.991(5.5)? (STDERR) at Module._compile (module.js:373:25) W20170617-12:24:39.991(5.5)? (STDERR) at Object.Module._extensions..js (module.js:416:10) W20170617-12:24:39.991(5.5)? (STDERR) at Module.load (module.js:343:32) W20170617-12:24:39.991(5.5)? (STDERR) at Function.Module._load (module.js:300:12) W20170617-12:24:39.993(5.5)? (STDERR) at Module.require (module.js:353:17) W20170617-12:24:39.993(5.5)? (STDERR) at require (internal/module.js:12:17) W20170617-12:24:39.994(5.5)? (STDERR) at Object. (/Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:21:18) W20170617-12:24:39.995(5.5)? (STDERR) at Module._compile (module.js:409:26) W20170617-12:24:39.995(5.5)? (STDERR) at Object.Module._extensions..js (module.js:416:10)

praveennagpal (Sat, 17 Jun 2017 06:58:53 GMT):
I did not have this error on 1.0.0-alpha2. Seems the BaseClient is not using a strict mode unlike the Client

MohammadObaid (Sat, 17 Jun 2017 13:41:07 GMT):
I was previously working on fabric cli alpha version. Now I want to switch on fabric-sdk . Should I follow this tutorial for installation https://github.com/hyperledger/fabric-sdk-node and for api documentation this one `https://fabric-sdk-node.github.io/Channel.html#queryInfo` ??

MohammadObaid (Sat, 17 Jun 2017 13:41:07 GMT):
I was previously working on fabric cli alpha version. Now I want to switch on fabric-sdk . Should I follow this tutorial for installation https://github.com/hyperledger/fabric-sdk-node and for api documentation this one https://fabric-sdk-node.github.io/Channel.html#queryInfo ??

MohammadObaid (Sat, 17 Jun 2017 13:46:17 GMT):
Am I right ? or can anyone recommend me good tut?

SotirisAlfonsos (Sun, 18 Jun 2017 13:00:52 GMT):
Hello. I am using 4 orderers 4 kafka brokers and 3 zookeepers. When i try to create a channel i get the following error. ```error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)" [2017-06-18 12:51:56.843] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)``` Does anyone happen to know what is going wrong?

SotirisAlfonsos (Sun, 18 Jun 2017 13:00:52 GMT):
Hello. I am using 4 orderers 4 kafka brokers and 3 zookeepers. When i try to create a channel i get the following error. ```error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)" [2017-06-18 12:51:56.843] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)``` Does anyone happen to know what is going wrong?

SotirisAlfonsos (Sun, 18 Jun 2017 13:00:52 GMT):
Hello. I am using 4 orderers 4 kafka brokers and 3 zookeepers. When i try to create a channel i get the following error. ```error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)" [2017-06-18 12:51:56.843] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)``` On the orderer logs: ```orderer.example.com | 2017-06-18 12:56:21.988 UTC [grpc] Println -> DEBU 19d grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.12:7050->172.22.0.1:46465: write: broken pipe"``` Does anyone happen to know what is going wrong?

SotirisAlfonsos (Sun, 18 Jun 2017 13:00:52 GMT):
Hello. I am using 4 orderers 4 kafka brokers and 3 zookeepers. When i try to create a channel i get the following error. ```error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)" [2017-06-18 12:51:56.843] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)``` On the orderer logs: ```orderer.example.com | 2017-06-18 12:56:21.988 UTC [grpc] Println -> DEBU 19d grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.12:7050->172.22.0.1:46465: write: broken pipe"``` Does anyone happen to know what is going wrong?

SotirisAlfonsos (Sun, 18 Jun 2017 13:00:52 GMT):
Hello. I am using 4 orderers 4 kafka brokers and 3 zookeepers. When i try to create a channel i get the following error. ```error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)" [2017-06-18 12:51:56.843] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:115:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/home/ubuntu/go/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/grpc/src/node/src/client.js:229:12)``` On the orderer logs: ```orderer.example.com | 2017-06-18 12:56:21.988 UTC [grpc] Println -> DEBU 19d grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.22.0.12:7050->172.22.0.1:46465: write: broken pipe"``` Does anyone happen to know what is going wrong?

vu3mmg (Sun, 18 Jun 2017 14:01:06 GMT):
I am getting following error on RHEL ,

vu3mmg (Sun, 18 Jun 2017 14:01:07 GMT):
node: symbol lookup error: /root/fabric_v1_distributed/node_modules/grpc/src/node/extension_binary/grpc_node.node: undefined symbol: SSL_CTX_set_alpn_protos

vu3mmg (Sun, 18 Jun 2017 14:01:17 GMT):
anyone faced similiar issues ?

fennelD7 (Mon, 19 Jun 2017 02:02:00 GMT):
@vu3mmg Hi, this is a problem caused by the default nodejs in yum in centos, it just associated with low version of openssl. I solved this error by just manually downloaded a nodejs.

jimthematrix (Mon, 19 Jun 2017 03:18:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ewJHCDdJewAKv8DaP) @praveennagpal what's your node.js version? I'm on 6.9.4 and this wasn't a problem. in any case: https://jira.hyperledger.org/browse/FAB-4860

praveennagpal (Mon, 19 Jun 2017 04:57:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a3vdkRswHB2mYr27c) @jimthematrix My node.js version is 6.9.5 and I am running it inside meteor

vu3mmg (Mon, 19 Jun 2017 05:11:23 GMT):
@fennelD7 thank you

VickyWang (Mon, 19 Jun 2017 05:30:16 GMT):
Has joined the channel.

CodeReaper (Mon, 19 Jun 2017 06:01:10 GMT):
@SotirisAlfonsos I believe if u do a docker ps on a separate terminal, You'll find orderer(s) missing. Make sure youve done right changes to the orderer's environment in docker-compose file.

Dpkkmr (Mon, 19 Jun 2017 06:05:23 GMT):

Message Attachments

Dpkkmr (Mon, 19 Jun 2017 06:05:25 GMT):
Hi All, I have developed a node app which contains multiple channels. It is working fine using fabric CLI. Now I want the same implemented via NODE SDK. While looking into "config.json file" I have one channel in "channelName":"mychannel" If I have to add multiple channel how do I add it?

DannyWong (Mon, 19 Jun 2017 06:31:58 GMT):
is tCert ready to use in Node SDK Now?

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

Dpkkmr (Mon, 19 Jun 2017 07:17:11 GMT):

Message Attachments

Dpkkmr (Mon, 19 Jun 2017 07:17:30 GMT):
Hello, Please help me in resolving this error during enrollment.

SyneBlockChainTeam (Mon, 19 Jun 2017 07:53:27 GMT):

Message Attachments

SotirisAlfonsos (Mon, 19 Jun 2017 07:53:28 GMT):
@CodeReaper The thing is that no orderer crashes. It is just that the grpc broadcast is failing. My setup works with kafka and 1 orderer but whenever i try to spawn more orderers, i get this error. If you have any suggestions they are more than welcome.

SyneBlockChainTeam (Mon, 19 Jun 2017 07:53:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gex7nFCriz46uJbfK) @jimthematrix Please find attached logs of runAPI. I Copied TLS from from other peer's TLS but MSP folder structure is not being created automatically. We are also not sure about whether Channel.Tx and genesis.block is being modified while generation of new peer.

hshimo (Mon, 19 Jun 2017 08:15:46 GMT):
Has joined the channel.

hshimo (Mon, 19 Jun 2017 08:19:27 GMT):
What is wrong with this error? ``` e TypeError: Cannot read property 'prvKeyHex' of undefined at CryptoSuite_ECDSA_AES.sign (/Users/hitoshi/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_A ES.js:292:52) at Signer.sign (/Users/hitoshi/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/msp/identity.js:162:28) at SigningIdentity.sign (/Users/hitoshi/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/msp/identity.js:213:23) at Object.module.exports.signProposal (/Users/hitoshi/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/client-utils.js: 116:28) at _getChaincodePackageData.then (/Users/hitoshi/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/Client.js:650:38) at process._tickCallback (internal/process/next_tick.js:109:7) ```

hshimo (Mon, 19 Jun 2017 08:19:27 GMT):
What is wrong with this error? ``` e TypeError: Cannot read property 'prvKeyHex' of undefined at CryptoSuite_ECDSA_AES.sign (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_A ES.js:292:52) at Signer.sign (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/msp/identity.js:162:28) at SigningIdentity.sign (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/msp/identity.js:213:23) at Object.module.exports.signProposal (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/client-utils.js: 116:28) at _getChaincodePackageData.then (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/Client.js:650:38) at process._tickCallback (internal/process/next_tick.js:109:7) ```

hshimo (Mon, 19 Jun 2017 08:19:27 GMT):
When I try to install a chaincode, this error occurs. What is wrong with this error? ``` e TypeError: Cannot read property 'prvKeyHex' of undefined at CryptoSuite_ECDSA_AES.sign (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_A ES.js:292:52) at Signer.sign (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/msp/identity.js:162:28) at SigningIdentity.sign (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/msp/identity.js:213:23) at Object.module.exports.signProposal (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/client-utils.js: 116:28) at _getChaincodePackageData.then (/Users/user/my/job/consensusbase/sdk-test/node_modules/fabric-client/lib/Client.js:650:38) at process._tickCallback (internal/process/next_tick.js:109:7) ```

qaqatoco (Mon, 19 Jun 2017 08:43:08 GMT):
Has joined the channel.

paul.sitoh (Mon, 19 Jun 2017 09:09:24 GMT):
Folks, for this SDK API `queryByChaincode(request)` the request structure is this: ``` { targets : request.targets, chaincodeId : request.chaincodeId, chainId : request.channelId, fcn : request.fcn, args : request.args, transientMap : request.transientMap, txId : txId };``` Is the `fcn` attribute the name of the user defined function?

paul.sitoh (Mon, 19 Jun 2017 09:09:24 GMT):
Folks, for this SDK API `channle.queryByChaincode(request)` the request structure is this: ``` { targets : request.targets, chaincodeId : request.chaincodeId, chainId : request.channelId, fcn : request.fcn, args : request.args, transientMap : request.transientMap, txId : txId };``` Is the `fcn` attribute the name of the user defined function?

paul.sitoh (Mon, 19 Jun 2017 09:09:24 GMT):
Folks, for this SDK API `channel.queryByChaincode(request)` the request structure is this: ``` { targets : request.targets, chaincodeId : request.chaincodeId, chainId : request.channelId, fcn : request.fcn, args : request.args, transientMap : request.transientMap, txId : txId };``` Is the `fcn` attribute the name of the user defined function?

paul.sitoh (Mon, 19 Jun 2017 09:12:14 GMT):
It seemed that one of my smoke test indicated that `fcn` actually refers to the chaincode shim method call `invoke`. If that is the case, since shim only has one method call `invoke` (no `query`) why must we assign `fcn` as `invoke`?

fennelD7 (Mon, 19 Jun 2017 09:24:16 GMT):
Hi, I want to use node sdk in no tls fabric. Take e2e as example, I changed all TLS-ENABLE=true to falses in docker compose files and started test/fixture. What code changes in test/integration/e2e/create-channel.js should I do to make it run?

SyneBlockChainTeam (Mon, 19 Jun 2017 09:25:48 GMT):

Message Attachments

SyneBlockChainTeam (Mon, 19 Jun 2017 09:25:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3AAP8hmp4PaDdQJgY) @paul.sitoh fcn is user defined method name and you do not need to assign invoke to fcn. please find attached screenshot

fennelD7 (Mon, 19 Jun 2017 09:26:43 GMT):
Hi, I want to use node sdk in no tls fabric. Take e2e as example, I changed all TLS-ENABLE=true to falses in docker compose files and started test/fixture. What code changes in test/integration/e2e/create-channel.js should I do to make it run?

akdj (Mon, 19 Jun 2017 09:44:29 GMT):
good question

akdj (Mon, 19 Jun 2017 09:44:29 GMT):
good question @fennelD7

akdj (Mon, 19 Jun 2017 10:04:52 GMT):
can anyone provide me a "very easy" example of fabricsdk-node? an example with only fabric-ca and fabric-ca-client nodejs modules, without all the node-modules dependancies in e2e example, because, when I read e2e example, or balance-transfer example, I am losing in all objects in the code source, and I can not find clearly what I really need, for creating a channel, joiing a channel (and others steps)

akdj (Mon, 19 Jun 2017 10:04:52 GMT):
can anyone provide me a "very easy" example of fabricsdk-node? like a snippet an example with only fabric-ca and fabric-ca-client nodejs modules, without all the node-modules dependancies in e2e example, because, when I read e2e example, or balance-transfer example, I am losing in all objects in the code source, and I can not find clearly what I really need, for creating a channel, joiing a channel (and others steps)

praveennagpal (Mon, 19 Jun 2017 10:18:08 GMT):
@jimthematrix, @jyellick : for a peer of another organisation to join a channel, why do I need the creating peer's MSP? I have 2 organisations with a peer each on separate node. Peer 0 of org1 created the channel with its own signature. The channel configuration file used had both the MSP signatures when the configtx was run. But when the peer 0 of org2 tries to query or join the channel, it gets the error W20170619-07:52:03.503(0)? (STDERR) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org2MSP is unknown

praveennagpal (Mon, 19 Jun 2017 10:18:08 GMT):
@jimthematrix, @jyellick : for a peer of another organisation to join a channel, why do I need the creating peer's MSP? I have 2 organisations with a peer each on separate node. App instance using the certificate of Peer 0 of org1 created the channel with its own signature. The channel configuration file used had both the MSP signatures when the configtx was run. But when the peer 0 of org2 tries to query or join the channel, it gets the error W20170619-07:52:03.503(0)? (STDERR) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org2MSP is unknown

praveennagpal (Mon, 19 Jun 2017 10:18:08 GMT):
@jimthematrix, @jyellick : for a peer of another organisation to join a channel, why do I need the creating peer's MSP? I have 2 organisations with a peer each on separate node. App instance using the certificate of Peer 0 of org1 created the channel. The channel configuration file used had both the MSP signatures when the configtx was run. But when the peer 0 of org2 tries to query or join the channel, it gets the error W20170619-07:52:03.503(0)? (STDERR) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org2MSP is unknown

paul.sitoh (Mon, 19 Jun 2017 10:22:26 GMT):
@fennelD7 are you running the e2e from with the fabric source code?

CodeReaper (Mon, 19 Jun 2017 12:37:11 GMT):
@praveennagpal check balance transfer example, youll find out that the helper.getOrgAdmin and readAllfiles functions before you make proposal, excluding them gives this sort of error. Do check it once.

CodeReaper (Mon, 19 Jun 2017 12:40:12 GMT):
@SotirisAlfonsos you're probably making an error in the yaml files for the additional orderers, maybe if u share a screenshot of it

praveennagpal (Mon, 19 Jun 2017 12:41:33 GMT):
@CodeReaper I have gone through them before and shall again look at it. But my question is basic, how do we get the peers of other organisations join a channel, if it has been created by another organisation? Do we all add them as target peers in the application instance of the creator of the channel?

praveennagpal (Mon, 19 Jun 2017 12:43:12 GMT):
In my case, there is no issue with peer of Org1 joining the channel, ITs the peer of Org2 where I am having the issue.

praveennagpal (Mon, 19 Jun 2017 12:43:12 GMT):
In my case, there is no issue with peer of Org1 joining the channel, Its the peer of Org2 where I am having the issue.

paul.sitoh (Mon, 19 Jun 2017 12:49:13 GMT):
Does anyone know if it is possible to get the number of blocks using the Channel api?

SotirisAlfonsos (Mon, 19 Jun 2017 13:10:09 GMT):
@CodeReaper my docker, configtxgen and cryptogen files are all here: https://github.com/SotirisAlfonsos/TempKafkaSet . By now i suspect that it must be an issue with the way i am structuring my certificates for the orderers. But i do not know what exactly is going wrong. Orderer is trying to talk with `127.22.0.1` and fails. I see that ip on my ca's logs when i enrol a user. So i suspect it should be the client. I am not sure.

CodeReaper (Mon, 19 Jun 2017 13:54:52 GMT):
Yes @SotirisAlfonsos u gotta update crypto-config and configtx files accordingly for your orgganizations, peers, and orderers.

ashahn (Mon, 19 Jun 2017 13:57:05 GMT):
Has joined the channel.

CodeReaper (Mon, 19 Jun 2017 13:57:39 GMT):
and make sure the ports of all orderers are different and u change the tls/ca.cert loaction accordingly for orderers

MohammadObaid (Mon, 19 Jun 2017 14:02:05 GMT):
@here Hi. While following this guide regarding fabric-sdk-node setup https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer , I am continuously getting error while instantiating chaincode. I am running `./testApi.sh` command to execute all sample API's requests .

MohammadObaid (Mon, 19 Jun 2017 14:02:29 GMT):

Message Attachments

MohammadObaid (Mon, 19 Jun 2017 14:03:04 GMT):
Here are my docker images. Previously I worked on docker aplha images so I didnt updated it to beta images

akdj (Mon, 19 Jun 2017 14:03:12 GMT):
did you cheked the log?

akdj (Mon, 19 Jun 2017 14:03:12 GMT):
did you cheked the server log?

akdj (Mon, 19 Jun 2017 14:03:12 GMT):
did you cheked the aap.js server log? @MohammadObaid

akdj (Mon, 19 Jun 2017 14:03:12 GMT):
did you cheked the app.js server log? @MohammadObaid

akdj (Mon, 19 Jun 2017 14:03:35 GMT):
it is probably because of a default timeout

MohammadObaid (Mon, 19 Jun 2017 14:04:13 GMT):

Message Attachments

CodeReaper (Mon, 19 Jun 2017 14:04:36 GMT):
@MohammadObaid do a-> docker hyperledger/fabric-ccenv:x86_64-1.0.0-beta pull and see if u it downloads any new component of the ccenv image or whole of it

MohammadObaid (Mon, 19 Jun 2017 14:05:50 GMT):
@akdj No I didnt check it. Can you tell me a command to check app.js server log?

akdj (Mon, 19 Jun 2017 14:06:56 GMT):
@MohammadObaid I mean, when you run app.js you have a output , right?

ashahn (Mon, 19 Jun 2017 14:07:23 GMT):
@here Hello everyone, I'm getting a 'failed to get enrollment' when running an app.js project file. Any tips on how to fix this?

ashahn (Mon, 19 Jun 2017 14:07:34 GMT):

Message Attachments

MohammadObaid (Mon, 19 Jun 2017 14:08:02 GMT):
@akdj Yeah its a timeout error. Here is the logs

MohammadObaid (Mon, 19 Jun 2017 14:08:23 GMT):

Message Attachments

akdj (Mon, 19 Jun 2017 14:12:00 GMT):
@MohammadObaid ok, I had the same problem two days ago, and this is an explanation : "the very first instantiate call after a new chaincode install always takes the longest time because the peer first has to build a new docker image for the chaincode, then start it. subsequent instantiate calls will be faster because the image is located so it doesn't have to be rebuilt. every system is different in how long this step takes. if you see a timeout, increase the default timeout"

akdj (Mon, 19 Jun 2017 14:12:43 GMT):
you can change this default timeout value in `node_modules/fabric-client/config/default.json`

MohammadObaid (Mon, 19 Jun 2017 14:13:05 GMT):
ok. what timeout value you set?

akdj (Mon, 19 Jun 2017 14:14:51 GMT):
it depends, I tested 80000, then 160000...

akdj (Mon, 19 Jun 2017 14:14:51 GMT):
it depends, I tested 80000, then 160000... @MohammadObaid

akdj (Mon, 19 Jun 2017 14:16:32 GMT):
and with 160000, it works for me, maybe it works also with a lower value, like 100000

MohammadObaid (Mon, 19 Jun 2017 14:17:48 GMT):
ok thanks :)

akdj (Mon, 19 Jun 2017 14:18:04 GMT):
yw

Ratnakar (Mon, 19 Jun 2017 14:21:28 GMT):
@MohammadObaid as @CodeReaper pointed out, I would suspect it is somethiing to do with the ccenv image (the same is missing on your machine) `docker pull hyperledger/fabric-ccenv:x86_64-1.0.0-beta` might fix your problem

Sandeep (Mon, 19 Jun 2017 15:53:44 GMT):
@here Is it possible to do a peer channel fetch config using fabric node sdk?

svasilyev (Mon, 19 Jun 2017 16:01:20 GMT):
Has left the channel.

chaitanya (Mon, 19 Jun 2017 17:19:03 GMT):
Has joined the channel.

chaitanya (Mon, 19 Jun 2017 17:22:09 GMT):
Hi, I tried the NodeSDK using the instructions given here: https://github.com/hyperledger/fabric-sdk-node, but the e2e tests failed. Then I tried running them one by one, and it failed at the create channel test itself. I do have a fabric network setup through docker containers using the fabric-sample archive. Am I missing something?

chaitanya (Mon, 19 Jun 2017 17:22:09 GMT):
Hi, I tried the NodeSDK using the instructions given here: https://github.com/hyperledger/fabric-sdk-node/blob/master/README.md, but the e2e tests failed. Then I tried running them one by one, and it failed at the create channel test itself. I do have a fabric network setup through docker containers using the fabric-sample archive. Am I missing something?

xiven (Mon, 19 Jun 2017 17:28:11 GMT):
@chaitanya try to run through this and see if it works for you: https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer

jimthematrix (Mon, 19 Jun 2017 17:37:07 GMT):
@Dpkkmr the config json is application specific, has nothing to do with the SDK, take a look at the sample code to see how to build apps to use channels

jimthematrix (Mon, 19 Jun 2017 17:37:35 GMT):
@DannyWong tcert support is post v1.0

jimthematrix (Mon, 19 Jun 2017 17:38:58 GMT):
@Dpkkmr please paste error output from the fabric-ca docker

dushyant (Mon, 19 Jun 2017 17:41:30 GMT):
Has joined the channel.

praveennagpal (Mon, 19 Jun 2017 17:46:02 GMT):
@jimthematrix : I had a couple of queries on the join channel, which I asked earlier today. Could you please have a look?

jimthematrix (Mon, 19 Jun 2017 17:47:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3AAP8hmp4PaDdQJgY) @paul.sitoh see this API reference https://fabric-sdk-node.github.io/global.html#ChaincodeInvokeRequest

chaitanya (Mon, 19 Jun 2017 18:00:24 GMT):
@xiven Thanks, that helped. However, the REST API method didn't work as expected, while the one with the bash scripts worked alright.

chaitanya (Mon, 19 Jun 2017 18:00:24 GMT):
@xiven Thanks, that helped to some extent...I tried with the bash scripts, and I get errors

chaitanya (Mon, 19 Jun 2017 18:00:56 GMT):
Is that sufficient to prove that the setup is alright for me to go ahead and focus on building my Node app?

chaitanya (Mon, 19 Jun 2017 18:00:56 GMT):
The chaincode install happens alright, but instantiation fails :

chaitanya (Mon, 19 Jun 2017 18:19:38 GMT):
```POST Install chaincode on Org2 Successfully Installed chaincode on organization org2 POST instantiate chaincode on peer1 of Org1 Failed to order the transaction. Error code: undefined POST invoke chaincode on peers of Org1 and Org2 Transacton ID is Failed to order the transaction. Error code: undefined```

chaitanya (Mon, 19 Jun 2017 18:19:38 GMT):
```POST Install chaincode on Org2 Successfully Installed chaincode on organization org2 POST instantiate chaincode on peer1 of Org1 Failed to order the transaction. Error code: undefined POST invoke chaincode on peers of Org1 and Org2 Transacton ID is Failed to order the transaction. Error code: undefined``` Causing the subsequent transactions to fail too

jrosmith (Mon, 19 Jun 2017 18:20:02 GMT):
Hey all, working with balance_transfer example and have gotten up to installing the chaincode. I've notice the process takes an exceptionally long...13 minutes the last time it ran. The first run resulted in succesfully installing the chaincode on org1, but if I run the install chaincode command again I get errors. On the orderer I have : ``` 2017-06-19 18:10:11.833 UTC [orderer/main] Broadcast -> DEBU 22d6 Starting new Broadcast handler 2017-06-19 18:10:11.834 UTC [orderer/common/broadcast] Handle -> DEBU 22d7 Starting new broadcast loop 2017-06-19 18:10:11.834 UTC [orderer/common/broadcast] Handle -> DEBU 22d8 Preprocessing CONFIG_UPDATE 2017-06-19 18:10:11.834 UTC [orderer/configupdate] Process -> DEBU 22d9 Processing channel reconfiguration request for channel mychannel 2017-06-19 18:10:11.834 UTC [common/configtx] addToMap -> DEBU 22da Adding to config map: [Groups] /Channel 2017-06-19 18:10:11.834 UTC [common/configtx] addToMap -> DEBU 22db Adding to config map: [Groups] /Channel/Application 2017-06-19 18:10:11.834 UTC [common/configtx] addToMap -> DEBU 22dc Adding to config map: [Groups] /Channel/Application/Org2MSP 2017-06-19 18:10:11.834 UTC [common/configtx] addToMap -> DEBU 22dd Adding to config map: [Groups] /Channel/Application/Org1MSP 2017-06-19 18:10:11.835 UTC [common/configtx] addToMap -> DEBU 22de Adding to config map: [Values] /Channel/Consortium 2017-06-19 18:10:11.835 UTC [orderer/common/broadcast] Handle -> WARN 22df Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1 ``` which I assume means it considers attempting to install that same chaincode as an update to the channel configuration.

jrosmith (Mon, 19 Jun 2017 18:20:34 GMT):
I also get the following on the peer:

jrosmith (Mon, 19 Jun 2017 18:20:53 GMT):
``` 2017-06-19 15:50:49.196 UTC [endorser] ProcessProposal -> DEBU 201 Exit 2017-06-19 18:06:28.196 UTC [endorser] ProcessProposal -> DEBU 202 Entry 2017-06-19 18:06:28.197 UTC [protoutils] ValidateProposalMessage -> DEBU 203 ValidateProposalMessage starts for signed proposal 0xc4211505d0 2017-06-19 18:06:28.206 UTC [protoutils] validateChannelHeader -> DEBU 204 validateChannelHeader info: header type 3 2017-06-19 18:06:28.206 UTC [protoutils] checkSignatureFromCreator -> DEBU 205 checkSignatureFromCreator starts 2017-06-19 18:06:28.206 UTC [protoutils] checkSignatureFromCreator -> DEBU 206 checkSignatureFromCreator info: creator is &{Org1MSP 69fef3c8f0f7b806bcf31edb040a8de663b5e886ab8a225c2a2f1f90e257fb84} 2017-06-19 18:06:28.206 UTC [protoutils] checkSignatureFromCreator -> DEBU 207 checkSignatureFromCreator info: creator is valid 2017-06-19 18:06:28.277 UTC [protoutils] checkSignatureFromCreator -> DEBU 208 checkSignatureFromCreator exists successfully 2017-06-19 18:06:28.277 UTC [protoutils] validateChaincodeProposalMessage -> DEBU 209 validateChaincodeProposalMessage starts for proposal 0xc422690be0, header 0xc421150600 2017-06-19 18:06:28.277 UTC [protoutils] validateChaincodeProposalMessage -> DEBU 20a validateChaincodeProposalMessage info: header extension references chaincode name:"lscc" ```

jrosmith (Mon, 19 Jun 2017 18:20:55 GMT):
``` 2017-06-19 18:06:28.277 UTC [endorser] ProcessProposal -> DEBU 20b processing txid: 3e7466761ba7ff9afa2606b93773d69dd6ed5de1a6926fd79de972dfa2b6dcb8 2017-06-19 18:06:28.277 UTC [endorser] simulateProposal -> DEBU 20c Entry - txid: 3e7466761ba7ff9afa2606b93773d69dd6ed5de1a6926fd79de972dfa2b6dcb8 channel id: 2017-06-19 18:06:29.051 UTC [endorser] callChaincode -> DEBU 20d Entry - txid: 3e7466761ba7ff9afa2606b93773d69dd6ed5de1a6926fd79de972dfa2b6dcb8 channel id: version: 1.0.0-beta 2017-06-19 18:06:29.051 UTC [ccprovider] NewCCContext -> DEBU 20e NewCCCC (chain=,chaincode=lscc,version=1.0.0-beta,txid=3e7466761ba7ff9afa2606b93773d69dd6ed5de1a6926fd79de972dfa2b6dcb8,syscc=true,proposal=0xc422690be0,canname=lscc:1.0.0-beta 2017-06-19 18:06:29.051 UTC [chaincode] Launch -> DEBU 20f chaincode is running(no need to launch) : lscc:1.0.0-beta 2017-06-19 18:06:29.059 UTC [chaincode] Execute -> DEBU 210 Entry 2017-06-19 18:06:29.059 UTC [chaincode] Execute -> DEBU 211 chaincode canonical name: lscc:1.0.0-beta 2017-06-19 18:06:29.059 UTC [chaincode] sendExecuteMessage -> DEBU 212 [3e746676]Inside sendExecuteMessage. Message TRANSACTION 2017-06-19 18:06:29.059 UTC [chaincode] setChaincodeProposal -> DEBU 213 Setting chaincode proposal context... 2017-06-19 18:06:29.060 UTC [chaincode] setChaincodeProposal -> DEBU 214 Proposal different from nil. Creating chaincode proposal context... 2017-06-19 18:06:29.060 UTC [chaincode] sendExecuteMessage -> DEBU 215 [3e746676]sendExecuteMsg trigger event TRANSACTION 2017-06-19 18:06:29.060 UTC [chaincode] processStream -> DEBU 216 [3e746676]Move state message TRANSACTION 2017-06-19 18:06:29.061 UTC [chaincode] HandleMessage -> DEBU 217 [3e746676]Fabric side Handling ChaincodeMessage of type: TRANSACTION in state ready 2017-06-19 18:06:29.061 UTC [chaincode] filterError -> DEBU 218 Ignoring NoTransitionError: no transition 2017-06-19 18:06:29.061 UTC [chaincode] processStream -> DEBU 219 [3e746676]sending state message TRANSACTION 2017-06-19 18:06:29.061 UTC [shim] func1 -> DEBU 21a [3e746676]Received message TRANSACTION from shim 2017-06-19 18:06:29.061 UTC [shim] handleMessage -> DEBU 21b [3e746676]Handling ChaincodeMessage of type: TRANSACTION(state:ready) 2017-06-19 18:06:29.061 UTC [shim] beforeTransaction -> DEBU 21c [3e746676]Received TRANSACTION, invoking transaction on chaincode(Src:ready, Dst:ready) 2017-06-19 18:06:29.243 UTC [shim] func1 -> DEBU 21d [3e746676]Transaction completed. Sending COMPLETED 2017-06-19 18:06:29.243 UTC [shim] func1 -> DEBU 21e [3e746676]Move state message COMPLETED 2017-06-19 18:06:29.243 UTC [shim] handleMessage -> DEBU 21f [3e746676]Handling ChaincodeMessage of type: COMPLETED(state:ready) 2017-06-19 18:06:29.243 UTC [shim] func1 -> DEBU 220 [3e746676]send state message COMPLETED 2017-06-19 18:06:29.243 UTC [chaincode] processStream -> DEBU 221 [3e746676]Received message COMPLETED from shim 2017-06-19 18:06:29.243 UTC [chaincode] HandleMessage -> DEBU 222 [3e746676]Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready 2017-06-19 18:06:29.243 UTC [chaincode] HandleMessage -> DEBU 223 [3e7466761ba7ff9afa2606b93773d69dd6ed5de1a6926fd79de972dfa2b6dcb8]HandleMessage- COMPLETED. Notify 2017-06-19 18:06:29.243 UTC [chaincode] notify -> DEBU 224 notifying Txid:3e7466761ba7ff9afa2606b93773d69dd6ed5de1a6926fd79de972dfa2b6dcb8 2017-06-19 18:06:29.243 UTC [chaincode] Execute -> DEBU 225 Exit 2017-06-19 18:06:29.243 UTC [endorser] callChaincode -> DEBU 226 Exit 2017-06-19 18:06:29.243 UTC [endorser] simulateProposal -> DEBU 227 Exit 2017-06-19 18:06:29.243 UTC [endorser] ProcessProposal -> ERRO 228 simulateProposal() resulted in chaincode response status 500 for txid: 3e7466761ba7ff9afa2606b93773d69dd6ed5de1a6926fd79de972dfa2b6dcb8 2017-06-19 18:06:29.323 UTC [endorser] ProcessProposal -> DEBU 229 Exit ```

jrosmith (Mon, 19 Jun 2017 18:21:25 GMT):
Any idea why its taking so incredibly long to install a chaincode or get a response that it is already installed?

jrosmith (Mon, 19 Jun 2017 18:21:33 GMT):
13 minutes seems unreasonable

fennelD7 (Tue, 20 Jun 2017 01:00:04 GMT):
@paul.sitoh No, I started fabric from fabric-idk-node source code test/fixture, only changed all TLS-ENABLED=false, then I tried to run test/integration/e2e/create-channel.js, but not worked. I think just a few config changed should do, but I can't find out. Can anyone tell me what to do or where to find information?

praveennagpal (Tue, 20 Jun 2017 04:18:19 GMT):
@jimthematrix : in the join channel integration test script https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/join-channel.js, why is there a need to get the orderer admin? Would that mean anybody initiating join channel would need to have access to the admin keys of the orderer?

Dpkkmr (Tue, 20 Jun 2017 06:20:51 GMT):

Message Attachments

Dpkkmr (Tue, 20 Jun 2017 06:20:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=A2cWYu5E2rHPnCa7p) @jimthematrix I'm using beta version. CA docker logs:

paul.sitoh (Tue, 20 Jun 2017 07:07:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rX9LgPs3FQTPNQckL) @fennelD7 I have only ever used the e2e_cli code from within the fabric source. And it worked fine, even with TLS setting.

CodeReaper (Tue, 20 Jun 2017 07:49:52 GMT):
Hello, any of you getting the following error while instantiating th channel?? It seems to be occuring quite commmonly and isnt consistent.. Has anyone found its root cause and how to solve it?? error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND error: [Channel.js]: getChannelConfig - Failed Proposal. Error: Error: Invalid results returned ::NOT_FOUND at ClientDuplexStream. (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/fabric-client/lib/Orderer.js:197:22) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:245:14) error: [Channel.js]: Error: Invalid results returned ::NOT_FOUND at ClientDuplexStream. (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/fabric-client/lib/Orderer.js:197:22) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:245:14) [2017-06-20 13:16:48.153] [ERROR] Helper - Failed to initialize the channel [2017-06-20 13:16:48.154] [ERROR] Helper - Error: Failed to initialize the channel at getOrgAdmin.then.then (/home/sankalp/MyAppData/projects/fabric-client final /app.js:370:9) at process._tickCallback (internal/process/next_tick.js:103:7) [2017-06-20 13:16:48.154] [ERROR] Helper - Failed to order the transaction. Error code: undefined

praveennagpal (Tue, 20 Jun 2017 08:28:56 GMT):
@jimmatrix: I am still struggling to get the peer of org2 join the channel using the join channel test script.

praveennagpal (Tue, 20 Jun 2017 08:29:17 GMT):
'I20170620-13:37:12.925(5.5)? >>>> getting the org admin I20170620-13:37:12.926(5.5)? info: [FabricHelper]: obtaining admin of user organisation org2 I20170620-13:37:12.927(5.5)? info: [FabricHelper]: keypath =/Users/praveennagpal/src/GitHub/CT-IBF/framework/private/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore I20170620-13:37:12.927(5.5)? looking at file ::/Users/praveennagpal/src/GitHub/CT-IBF/framework/private/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/da31abec6ff27a4fcec872e882758c8ea103bb41610f66296b66040de927a61c_sk I20170620-13:37:12.928(5.5)? looking at file ::/Users/praveennagpal/src/GitHub/CT-IBF/framework/private/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem I20170620-13:37:12.929(5.5)? info: [FabricHelper]: userOrg=org2 I20170620-13:37:12.930(5.5)? info: [FabricHelper]: from settings=[object Object] I20170620-13:37:13.041(5.5)? info: [FabricHelper]: Successfully enrolled org:org2 'admin' I20170620-13:37:13.044(5.5)? info: [FabricHelper]: KEY=peer1 I20170620-13:37:13.047(5.5)? info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org2.example.com","grpc.default_authority":"peer0.org2.example.com"} I20170620-13:37:13.050(5.5)? info: [FabricHelper]: TARGETS= Peer : {url:grpc://localhost:8051} W20170620-13:37:13.071(5.5)? (STDERR) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err Expected MSP ID Org1MSP, received Org2MSP W20170620-13:37:13.072(5.5)? (STDERR) at /Users/praveennagpal/src/GitHub/CT-IBF/framework/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17'

praveennagpal (Tue, 20 Jun 2017 08:35:47 GMT):
why is this expecting MSP ID Org1MSP when I am trying to get the org2 peer join the channel. org1 peer joins the channel successfully.

praveennagpal (Tue, 20 Jun 2017 08:35:47 GMT):
Why is this expecting MSP ID Org1MSP when I am trying to get the org2 peer join the channel? org1 peer joins the channel successfully.

akdj (Tue, 20 Jun 2017 08:57:07 GMT):
The GOPATh in config.yaml, is it only use for searching chianecode

akdj (Tue, 20 Jun 2017 08:57:07 GMT):
The GOPATh in config.yaml, is it only use for searching chianecode?

praveennagpal (Tue, 20 Jun 2017 08:57:19 GMT):
which creator identity is being matched? Is it the proposal request creator or the channel creator MSP?

praveennagpal (Tue, 20 Jun 2017 08:59:11 GMT):
@akdj : Yes this is correct. its needed during the installation of chaincode for locating it

akdj (Tue, 20 Jun 2017 08:59:44 GMT):
thanks

VickyWang (Tue, 20 Jun 2017 09:10:30 GMT):
\fabric-sdk-node\node_modules\x509\build\Release\x509.node:invalid ELF header system:centOS

lyriarte (Tue, 20 Jun 2017 09:29:26 GMT):
[re: join channel integration test](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FMbvxTqcRyaNL3E5g) @praveennagpal That's most likely not the case, but I didn't find other examples as well. Reading the (fabric-ca-services-tests)[https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/fabric-ca-services-tests.js], admin can register and enroll users with the relevant rights.

lyriarte (Tue, 20 Jun 2017 09:31:00 GMT):
@praveennagpal @jimthematrix ...But I haven't found an example in the fabric-sdk-node test cases where you can reenroll a user from the stored enrollment info.

MohammadObaid (Tue, 20 Jun 2017 09:49:15 GMT):
@CodeReaper @Ratnakar Thanks a lot. After updating my docker ccenv image and changing timeout value everything works fine for me

SyneBlockChainTeam (Tue, 20 Jun 2017 10:45:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dz9Pu7pPfyd9qE6ik) @jimthematrix Could you please let us know how can we proceed on this issue of peer addition?

prashiyn (Tue, 20 Jun 2017 12:07:27 GMT):
@jimthematrix When there is an endorsement policy for chaincode execution, is there a verification done whether the proposalResponse is signed by all orgs in endorsement policy by the APK. OR is this done by fabric itself and so if there is a valid proposal response, then the client assumes that all endorsements are obtained ?

praveennagpal (Tue, 20 Jun 2017 12:25:44 GMT):
@jimthematrix I have got the join channel working now. Had incorrect MSP id in the configuration. But still would like to know the general pattern - is one client app supposed to create channel, join channel, install and instantiate across peers of org in the network just like the test scripts do, or can we have apps per org and one app of a peer creates the channel, other apps simply join channel, install and instantiate chaincode.

PushpalathaHiremath (Tue, 20 Jun 2017 12:28:19 GMT):
Hi All, In the beta version of fabric-ca-client, i see that there are few missing dependencies. Error: Cannot find module './api.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/root/MyApp/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:19:11) And similarly we do not have other files like - Utils.js, BaseClient.js taken client code from - https://github.com/hyperledger/fabric-sdk-node/blob/master/ Can any one please suggest. . .

eetti (Tue, 20 Jun 2017 12:49:31 GMT):
Has joined the channel.

lyriarte (Tue, 20 Jun 2017 13:28:49 GMT):
@PushpalathaHiremath I ran into the same issue after a fresh install. Solved it by running npm install in both sub directories fabric-ca-client and fabric-client.

lyriarte (Tue, 20 Jun 2017 13:30:23 GMT):
``` cd fabric-sdk-node npm install cd fabric-ca-client npm install cd ../fabric-client npm install cd .. npm test ``` worked for me.

MohammadObaid (Tue, 20 Jun 2017 13:58:02 GMT):
@Here I want to develop similar app like balance transfer using fabric-sdk-node but with more peers and added organizations . I have modified `base.yaml` and `docker-compose.yaml` file inside artifacts folder . My question is do I need to generate msp, channel-configuration and genesis block for modified network in the same way as we do in fabric-cli? What I have seen is that default channel configurations exist in channel folder with 4 peers and one orderer.

MohammadObaid (Tue, 20 Jun 2017 14:00:45 GMT):

Message Attachments

lehors (Tue, 20 Jun 2017 14:12:35 GMT):
Has joined the channel.

lehors (Tue, 20 Jun 2017 14:12:47 GMT):
@jimthematrix hi Jim

lehors (Tue, 20 Jun 2017 14:13:06 GMT):
I tried to install and run the test of the SDK on my windows 7 box

lehors (Tue, 20 Jun 2017 14:13:38 GMT):
the install succeeded after some tuning of my system but the tests fail

lehors (Tue, 20 Jun 2017 14:14:41 GMT):
[22:06:10] Finished 'lint' after 13 s [22:06:10] Starting 'test-headless'... stream.js:74 throw er; // Unhandled stream error in pipe. ^ Error: Cannot find module 'C:\Users\lehors\Documents\Projects\Go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\extension_binary\grpc_no e.node' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\lehors\Documents\Projects\Go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\grpc_extension.js:38 15) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Object.Module._extensions.(anonymous function) [as .js] (C:\Users\lehors\Documents\Projects\Go\src\github.com\hyperledger\fabric-sdk-node\node_modules\i tanbul\lib\hook.js:109:37) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\lehors\Documents\Projects\Go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:55:12) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) npm ERR! Test failed. See above for more details.

eetti (Tue, 20 Jun 2017 14:23:54 GMT):
@here When I queryChaincode var request = { chaincodeId: chaincode.id, chaincodeVersion: chaincode.version, chainId: config.channelName, fcn: chaincode.queryConfig.request.functionName, args: chaincode.queryConfig.request.args, txId: tx_id, nonce: nonce }; return chain.queryByChaincode(request); ... I get this error, events.js:160 throw er; // Unhandled 'error' event ^ Error: Connect Failed

eetti (Tue, 20 Jun 2017 14:24:23 GMT):
but the logs display that the query works

lehors (Tue, 20 Jun 2017 14:24:40 GMT):
I had to install node grpc - the doc doesn't say anything about this that I saw

akdj (Tue, 20 Jun 2017 14:34:14 GMT):
cannot find my peer0.org2 on localhost:8051 ``` [2017-06-20 13:43:14.020] [DEBUG] SampleWebApp - ==================== INVOKE ON CHAINCODE ================== [2017-06-20 13:43:14.020] [DEBUG] SampleWebApp - channelName : mychannel [2017-06-20 13:43:14.020] [DEBUG] SampleWebApp - chaincodeName : mycc [2017-06-20 13:43:14.020] [DEBUG] SampleWebApp - fcn : invoke [2017-06-20 13:43:14.020] [DEBUG] SampleWebApp - args : move,a,b,10 [2017-06-20 13:43:14.020] [DEBUG] invoke-chaincode - ============ invoke transaction on organization org1 ============ [2017-06-20 13:43:14.021] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-06-20 13:43:14.022] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-06-20 13:43:14.022] [DEBUG] Helper - [crypto_ecdsa_aes]: importKey - start [2017-06-20 13:43:14.023] [DEBUG] Helper - [crypto_ecdsa_aes]: importKey - have the key [Circular] [2017-06-20 13:43:14.023] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore resolving store [2017-06-20 13:43:14.023] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 2618ab0f436b94ef187ef46dc251c082243da07503de371a9f58401a2facbbc0 [2017-06-20 13:43:14.024] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 2e3c3b0f1e5044ec04d73d2abe350cbe466980c2bcbbbab41a449f46d09f39d3 [2017-06-20 13:43:14.024] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-06-20 13:43:14.025] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore resolving store [2017-06-20 13:43:14.025] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-06-20 13:43:14.027] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 2618ab0f436b94ef187ef46dc251c082243da07503de371a9f58401a2facbbc0 [2017-06-20 13:43:14.027] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 2e3c3b0f1e5044ec04d73d2abe350cbe466980c2bcbbbab41a449f46d09f39d3 [2017-06-20 13:43:14.027] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 2618ab0f436b94ef187ef46dc251c082243da07503de371a9f58401a2facbbc0 [2017-06-20 13:43:14.027] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 2e3c3b0f1e5044ec04d73d2abe350cbe466980c2bcbbbab41a449f46d09f39d3 [2017-06-20 13:43:14.028] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 2618ab0f436b94ef187ef46dc251c082243da07503de371a9f58401a2facbbc0 [2017-06-20 13:43:14.028] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 2e3c3b0f1e5044ec04d73d2abe350cbe466980c2bcbbbab41a449f46d09f39d3 [2017-06-20 13:43:14.028] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-06-20 13:43:14.029] [INFO] Helper - Successfully loaded member from persistence [2017-06-20 13:43:14.029] [DEBUG] invoke-chaincode - Sending transaction "{"_nonce":{"type":"Buffer","data":[21,213,240,178,72,130,208,0,25,117,117,114,172,54,88,232,230,241,90,218,227,207,42,59]},"_transaction_id":"675c424b5b654cb768fd34adf88092d6c0db52ba0abce8ffb208995ef7da054d"}" [2017-06-20 13:43:14.035] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/root/beta_hyper/defaut_sdk/fabric-sdk-node-1.0.0-beta/examples/balance-transfer/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-06-20 13:43:59.074] [INFO] invoke-chaincode - transaction proposal was good [2017-06-20 13:43:59.074] [INFO] invoke-chaincode - transaction proposal was good [2017-06-20 13:43:59.074] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0E!�yr�j�/���O61����o����FXS���U 4��rY5�R�.�W���+�%�W��R�I�O [2017-06-20 13:43:59.075] [ERROR] Helper - Failed to find a peer matching the url localhost:8051 info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"} [2017-06-20 13:43:59.081] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 }

akdj (Tue, 20 Jun 2017 14:34:23 GMT):
``` [2017-06-20 13:43:59.088] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-06-20 13:44:01.479] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } [2017-06-20 13:44:01.480] [INFO] invoke-chaincode - The balance transfer transaction has been committed on peer localhost:7053 [2017-06-20 13:44:01.480] [DEBUG] invoke-chaincode - event promise all complete and testing complete [2017-06-20 13:44:01.480] [INFO] invoke-chaincode - Successfully sent transaction to the orderer. [2017-06-20 13:44:01.496] [DEBUG] SampleWebApp - Decoded from JWT token: username - Jim, orgname - org1 ``` but with docker ps, i have ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES da2425fd5e95 dev-peer0.org2.example.com-mycc-v0 "chaincode -peer.a..." About a minute ago Up About a minute dev-peer0.org2.example.com-mycc-v0 783bc2e2de1a dev-peer0.org1.example.com-mycc-v0 "chaincode -peer.a..." 7 minutes ago Up 7 minutes dev-peer0.org1.example.com-mycc-v0 e6ddb8dac80c dev-peer1.org1.example.com-mycc-v0 "chaincode -peer.a..." 7 minutes ago Up 7 minutes dev-peer1.org1.example.com-mycc-v0 dd0cab661498 hyperledger/fabric-peer:x86_64-1.0.0-beta "peer node start" 10 minutes ago Up 10 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.org2.example.com 76a96b1ebdfc hyperledger/fabric-peer:x86_64-1.0.0-beta "peer node start" 10 minutes ago Up 10 minutes 0.0.0.0:8056->7051/tcp, 0.0.0.0:8058->7053/tcp peer1.org2.example.com 001b2f9887f7 hyperledger/fabric-peer:x86_64-1.0.0-beta "peer node start" 10 minutes ago Up 10 minutes 0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp peer1.org1.example.com aa548250e8e5 hyperledger/fabric-peer:x86_64-1.0.0-beta "peer node start" 10 minutes ago Up 10 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 4909ea233187 hyperledger/fabric-orderer:x86_64-1.0.0-beta "orderer" 11 minutes ago Up 10 minutes 0.0.0.0:7050->7050/tcp orderer.example.com e28cb2f56326 hyperledger/fabric-ca:x86_64-1.0.0-beta "sh -c 'fabric-ca-..." 11 minutes ago Up 10 minutes 0.0.0.0:8054->7054/tcp ca_peerOrg2 e28c5f082a05 hyperledger/fabric-ca:x86_64-1.0.0-beta "sh -c 'fabric-ca-..." 11 minutes ago Up 10 minutes 0.0.0.0:7054->7054/tcp ca_peerOrg1 ``` I never get this error in my previous tests...

akdj (Tue, 20 Jun 2017 15:00:31 GMT):
@jimthematrix I noticed this change https://github.com/hyperledger/fabric-sdk-node/commit/63ea71d23bbdac3aa7c2d642e8defcddc246ade8#diff-e3ba93882b514566e613ebaf62ccd2a6R124 in the beta release, can I change it to `"peers": ["localhost:7051", "localhost:7056"],` ?

lehors (Tue, 20 Jun 2017 16:37:49 GMT):
@jimthematrix I only got two headless tests failing: not ok 581 Failed to validate content in debug log file --- operator: fail at: Timeout._onTimeout (C:\Users\lehors\Documents\Projects\Go\src\github.com\hyperledger\fabric-sdk-node\test\unit\logger.js:198:6) ... not ok 582 Failed to validate content in error log file --- operator: fail at: Timeout._onTimeout (C:\Users\lehors\Documents\Projects\Go\src\github.com\hyperledger\fabric-sdk-node\test\unit\logger.js:212:6) ...

lehors (Tue, 20 Jun 2017 16:38:08 GMT):
not sure what it's about but not so bad

lehors (Tue, 20 Jun 2017 16:38:24 GMT):
I'm trying to get all the docker images in place to proceed with the other tests

lehors (Tue, 20 Jun 2017 16:38:39 GMT):
but connection in Beijing is super slow...

jimthematrix (Tue, 20 Jun 2017 16:47:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FMbvxTqcRyaNL3E5g) @praveennagpal the test code needs to be cleaned up, the examples/balance-transfer is a more accurate reference for application developers. no you don't need to involve orderer org admins to create channel

jimthematrix (Tue, 20 Jun 2017 16:47:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FMbvxTqcRyaNL3E5g) @praveennagpal the test code needs to be cleaned up, the examples/balance-transfer is a more accurate reference for application developers. no you don't need to involve orderer org admins to create channels

jimthematrix (Tue, 20 Jun 2017 16:55:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tfsAbrFpPCD5LpLxQ) @CodeReaper this has been asked before in this channel, after the channel creation request is sent to the orderer, there is a time gap before the channel is successfully created by the orderer. the length of this gap obviously can vary from system to system. you can either add a wait (sleep) after create channel call, or handle the NOT_FOUND error above and make another request after a brief pause (keep polling until you get the expected channel config from the orderer)

jimthematrix (Tue, 20 Jun 2017 17:01:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qhNDgDsjnb8wABmJm) @praveennagpal it seems the target peer in org2 has been configured to use "Org1MSP" as the mspid instead of "Org2MSP": `Error: Failed to deserialize creator identity, err Expected MSP ID Org1MSP, received Org2MSP`

jimthematrix (Tue, 20 Jun 2017 17:04:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=crTEpmQnFWLXsFJQZ) @VickyWang like this problem that's been reported: https://jira.hyperledger.org/browse/FAB-4847

jimthematrix (Tue, 20 Jun 2017 17:07:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qaTwsB6HrExG6PTba) @prashiyn the SDK does not perform validations of the proposal responses against the endorsement policy, the application can do that if choose so. the validation done by the committers after transaction ordering will "officially" enforce the endorsement policy

jimthematrix (Tue, 20 Jun 2017 17:11:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uerz2Z7LaoRjD87Rs) @praveennagpal ah glad to see that you got past that, just what I suspected. the test code is just that, "test code". in real world apps are not likely going to have access to peer org admin identities for other orgs, so each peer org is supposed to have their own admins use their own app to perform the channel join. the create channel operation can be submitted by just one app, although it does need to collect signatures on the channel creation request from other orgs, in order to submit a valid request

jimthematrix (Tue, 20 Jun 2017 17:11:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2Bx3hhHgP2oQZobFB) @PushpalathaHiremath please make sure to read the README: you need to run `gulp ca`

jimthematrix (Tue, 20 Jun 2017 17:12:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rkgbtbKafNnKcn8kQ) @lyriarte ^^^

durantto (Tue, 20 Jun 2017 19:30:32 GMT):
Has left the channel.

VickyWang (Wed, 21 Jun 2017 01:17:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cERvMdt9CmCwaGE7r) @akdj docker ps port

VickyWang (Wed, 21 Jun 2017 01:23:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QSzCzCiQpo4bLNNGa) @jimthematrix 你的node版本和 系统是什么

VickyWang (Wed, 21 Jun 2017 01:24:38 GMT):

Message Attachments

DannyWong (Wed, 21 Jun 2017 01:45:42 GMT):
@here, i got a question on Event to ask. I have successfully developed event in chaincode with the Node SDK subscribing to it, I code the nodejs middleware to do something in existing system when this event happens

DannyWong (Wed, 21 Jun 2017 01:46:34 GMT):
however, yesterday I found that, if i am running the NOdeJS in cluster mode (x4) + spinning up the NodeJS middleware for 4 docker (in my Swarm)... then all of the SDK will receive the event and perform the logic 16 times

DannyWong (Wed, 21 Jun 2017 01:47:05 GMT):
of course, I can develop a "stateful cluster" of nodeJS as a event listener...

DannyWong (Wed, 21 Jun 2017 01:47:12 GMT):
but any more suggestions?....

DannyWong (Wed, 21 Jun 2017 01:47:20 GMT):
very frustrated as I overlooked this.

DannyWong (Wed, 21 Jun 2017 02:17:06 GMT):
I considered to implement with competing consumers messaging pattern. but is there any easier way?!

DannyWong (Wed, 21 Jun 2017 05:18:29 GMT):
OMG, anyone!? (probably bad timezone)

akdj (Wed, 21 Jun 2017 07:41:10 GMT):
@jimthematrix https://github.com/hyperledger/fabric-sdk-node/commit/63ea71d23bbdac3aa7c2d642e8defcddc246ade8#diff-63a8d8b3a56d8cc7ae925a88610bb336L28 why we don't use anymore the username (registeredUser) to continue the next steps? why we change it to getOrgAdmin?

smfaizalkhan (Wed, 21 Jun 2017 08:15:37 GMT):
Has joined the channel.

chaitanya (Wed, 21 Jun 2017 08:17:19 GMT):
@here I am facing an issue on trying to Invoke a chaincode using the NodeSDK. The payload I'm using is the following: ```-d '{ "peers": ["localhost:7051"], "fcn":"Invoke", "args":["AddContent","..some args..."] }'``` Is that the right way ? I've been following the balance-transfer example given, but this throws up an error, since it takes the Function as `Invoke` and not `AddContent`, while my chaincode expects it to be AddContent.

chaitanya (Wed, 21 Jun 2017 08:17:19 GMT):
@here I am facing an issue on trying to Invoke a chaincode using the NodeSDK. The payload I'm using is the following: ```{ "peers": ["localhost:7051"], "fcn":"Invoke", "args":["AddContent","..some args..."] }``` Is that the right way ? I've been following the balance-transfer example given, but this throws up an error, since it takes the Function as `Invoke` and not `AddContent`, while my chaincode expects it to be AddContent.

smfaizalkhan (Wed, 21 Jun 2017 08:41:11 GMT):
Hello All,

smfaizalkhan (Wed, 21 Jun 2017 08:42:57 GMT):
I have followd the Docs and setupa 4 peers -2 org using docker-compose file,mounted the locally generated genertaed certs to the container folder and started thenetwrok and tried executing the initialize,invoke and deploy command through CLI

smfaizalkhan (Wed, 21 Jun 2017 08:43:18 GMT):
now how to achevie the same through Node.js

smfaizalkhan (Wed, 21 Jun 2017 08:43:42 GMT):
Examples or any Docs ? please suggest as i have to start from Basics?

akdj (Wed, 21 Jun 2017 08:48:07 GMT):
@smfaizalkhan I only know this one.. https://github.com/hyperledger/fabric-sdk-node

akdj (Wed, 21 Jun 2017 08:58:06 GMT):
@jimthematrix https://github.com/hyperledger/fabric-sdk-node/blob/v1.0.0-beta/examples/balance-transfer/app/helper.js#L174 in the args, it is normal that org is missed?

alexliu (Wed, 21 Jun 2017 09:12:54 GMT):
@jimthematrix Excuse me, is there any document or tutorial about how to setup a entire network with a client including node-sdk rather than using test codes? i wanna setup a simple,entire fabric network to use node-sdk but i have no idea .....Thx in advance

praveennagpal (Wed, 21 Jun 2017 10:46:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gKGSmvmF7uWhAkZXN) @jimthematrix I got the channel created with only the submitter org signature. I guess it depends on the channel creation policy defined in the genesis block generated by channel config. Then I got the other peers to join. Its all working now. Thanks for your help :-)

saism (Wed, 21 Jun 2017 11:11:48 GMT):
Hello, trying to run e2e tests from -beta tag, images built from -beta tag fabric ```2017-06-21 11:04:58.711 UTC [orderer/localconfig] Load -> CRIT 002 Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: genesis, sbftlocal panic: Error unmarshaling config into struct:1 error(s) decoding: * '' has invalid keys: genesis, sbftlocal goroutine 1 [running]: panic(0xb292e0, 0xc4202626b0) /opt/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc4201ceb40, 0xc4202592c0, 0x2, 0x2) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xd0 github.com/hyperledger/fabric/orderer/localconfig.Load(0xc4201cf5f0) /opt/gopath/src/github.com/hyperledger/fabric/orderer/localconfig/config.go:182 +0x52c main.main() /opt/gopath/src/github.com/hyperledger/fabric/orderer/main.go:69 +0x309 ```

SanthoshKumarMK (Wed, 21 Jun 2017 11:16:27 GMT):
Hi, In "Install Chincode" API we have a chaincodePath parameter to pass chaincode location, Can we pass external chaincode path? for example passing chaincode located in github.

saism (Wed, 21 Jun 2017 11:20:18 GMT):
balance transfer is ok though

praveennagpal (Wed, 21 Jun 2017 11:24:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dTs2GD4chtCmC3DkN) @chaitanya In Fabric v1, you just need to pass the function name in the request of node sdk api, which is AddContent in your case. Then you propose and transact if you have received endorsements as per the endorsement policy.

chaitanya (Wed, 21 Jun 2017 11:49:10 GMT):
@praveennagpal Thanks for your response, but even if I try ``` { "peers": ["localhost:7051"], "fcn":"AddContent", "args":["..some args..."] }``` I get the same error; Please let me know if you meant something else..

Anshulmittal (Wed, 21 Jun 2017 11:54:27 GMT):
Has joined the channel.

praveennagpal (Wed, 21 Jun 2017 12:00:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RFXSPPuva9WasiJ7q) @chaitanya I have not tried the balance app myself but this depends on the node sdk api call that you are calling and the chaincode. Refer to this for the listing of paramters in chaincode invocation request: https://fabric-sdk-node.github.io/global.html#ChaincodeInvokeRequest

praveennagpal (Wed, 21 Jun 2017 12:00:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RFXSPPuva9WasiJ7q) @chaitanya I have not tried the balance app myself but this depends on the node sdk api call that you are calling and the chaincode. Refer to this for the listing of parameters in chaincode invocation request: https://fabric-sdk-node.github.io/global.html#ChaincodeInvokeRequest

DannyWong (Wed, 21 Jun 2017 12:21:19 GMT):
@here I have successfully developed event in chaincode with the Node SDK subscribing to it, I code the nodejs middleware to do something in existing system when this event happens however, yesterday I found that, if i am running the NOdeJS in cluster mode (x4) + spinning up the NodeJS middleware for 4 docker (in my Swarm)... then all of the SDK will receive the event and perform the logic 16 times Any simple suggestions?

chaitanya (Wed, 21 Jun 2017 12:22:23 GMT):
@praveennagpal That link was helpful, but it seems that the default "invoke" is being picked despite me submitting a different "fcn" value. Any idea why this could be happening?

praveennagpal (Wed, 21 Jun 2017 12:36:39 GMT):
@ch [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PH33uHAqBsuLu4kCB) @chaitanya It depends on the chaincode. Are you doing stub.GetFunctionAndParameters() in the chaincode?

chaitanya (Wed, 21 Jun 2017 12:38:03 GMT):
@praveennagpal Yes, the chaincode has `function, args := stub.GetFunctionAndParameters()` to get the function name and proceed with corresponding logic

praveennagpal (Wed, 21 Jun 2017 12:40:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DjmQq4Lu9f2Pgbm3Z) @chaitanya and it has logic within the Invoke function in chaincode to look at function name and call it appropriately.

chaitanya (Wed, 21 Jun 2017 12:41:28 GMT):
It just has a bunch of if conditions right after extracting the function name and then makes the appropriate function calls. The chaincode expects `stub.GetFunctionAndParameters()` to return `AddContent` and not `invoke`

praveennagpal (Wed, 21 Jun 2017 12:42:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kZCfr9HWtDWSbaC2m) @chaitanya yes.. that is what you pass in the function name and the invoke is called automatically.

chaitanya (Wed, 21 Jun 2017 12:43:50 GMT):
@praveennagpal Right, which is why I do this: ```{ "peers": ["localhost:7051"], "fcn":"AddContent", "args":["..some args..."] }``` And it still says that it got function "invoke"

evgenhvost (Wed, 21 Jun 2017 12:51:09 GMT):
Can someone provide a code snipped of how to create a new channel ? been trying to use the code in /tests/integration/e2e/create-channel.js but it has some problems - for example it uses client.newMSP() which the client doesn't have...

chaitanya (Wed, 21 Jun 2017 13:03:24 GMT):
@praveennagpal Okay nevermind. It's fixed in their latest commit. Thanks for your help :)

praveennagpal (Wed, 21 Jun 2017 13:10:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5agv672RK3DktMhdH) @chaitanya cool

chrisf (Wed, 21 Jun 2017 13:47:32 GMT):
Has joined the channel.

chrisf (Wed, 21 Jun 2017 13:54:35 GMT):
Hey there, I'm using the Fabric Beta SDK. When I try to interact via the client for example to create a channel I get the following error messge: ``` 2017-06-21T15:41:38.14+0200 [APP/PROC/WEB/0]ERR debug: [Client.js]: createChannel - have envelope 2017-06-21T15:41:38.14+0200 [APP/PROC/WEB/0]ERR debug: [Client.js]: _createOrUpdateChannel - start 2017-06-21T15:41:38.14+0200 [APP/PROC/WEB/0]ERR debug: [Client.js]: _createOrUpdateChannel - have envelope 2017-06-21T15:41:38.14+0200 [APP/PROC/WEB/0]ERR debug: [Client.js]: _createOrUpdateChannel - about to send envelope 2017-06-21T15:41:38.14+0200 [APP/PROC/WEB/0]ERR debug: [Orderer.js]: sendBroadcast - start 2017-06-21T15:41:38.14+0200 [APP/PROC/WEB/0]ERR debug: [Orderer.js]: sendBroadcast - sent message 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]ERR error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/vcap/app/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/home/vcap/app/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/ home/vcap/app/node_modules/grpc/src/node/src/client.js:229:12)" 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]ERR debug: [Client.js]: _createOrUpdateChannel - rejecting with Error: SERVICE_UNAVAILABLE 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]OUT Error: SERVICE_UNAVAILABLE 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]OUT at ClientDuplexStream. (/home/vcap/app/node_modules/fabric-client/lib/Orderer.js:115:21) 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]OUT at emitOne (events.js:96:13) 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]OUT at ClientDuplexStream.emit (events.js:188:7) 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]OUT at ClientDuplexStream._emitStatusIfDone (/home/vcap/app/node_modules/grpc/src/node/src/client.js:204:12) 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]OUT at ClientDuplexStream._readsDone (/home/vcap/app/node_modules/grpc/src/node/src/client.js:169:8) 2017-06-21T15:41:38.15+0200 [APP/PROC/WEB/0]OUT at readCallback (/home/vcap/app/node_modules/grpc/src/node/src/client.js:229:12) ``` In the logs of the orderer I get: ``` [grpc] Printf -> DEBU 127 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 172.17.0.4:7050->52.58.183.15:40922: read: connection reset by peer ``` Can you help me?

C0rWin (Wed, 21 Jun 2017 14:08:21 GMT):
Sure

mbwhite (Wed, 21 Jun 2017 14:49:19 GMT):
Hi - what's the minimum support Node version for the beta FabricSDK... just trying node 4.6 and ``` SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at exports.runInThisContext (vm.js:53:16) ... at Object. (/home/matthew/github-lenny/composer-sample-applications/packages/digitalproperty-app/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:21:18) ``` errors are coming out

akdj (Wed, 21 Jun 2017 14:56:22 GMT):
should be 6.9.x or greater ? @mbwhite http://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#node-js-runtime-and-npm

jimthematrix (Wed, 21 Jun 2017 16:02:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=N6cK5Sq2pknANZzsN) @lehors thanks Arnaud, that's encouraging, the two failures were simply trying to compare output of the logger (for the Client.setLogger() API) with expected output, likely failed due to windows output format being different. please feel free to open a bug on this (I would set it to Low priority)

jimthematrix (Wed, 21 Jun 2017 16:04:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=efZr6tTjDuYu5v8rT) @VickyWang ``` jimzhang:balance-transfer jimzhang$ uname -a Darwin 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64 ``` ``` jimzhang:balance-transfer jimzhang$ node -v v6.9.4

lehors (Wed, 21 Jun 2017 16:08:10 GMT):
Hi @jimthematrix, yeah I figured that much. I have managed to build the containers and run the other tests. The peers are failing to connect to the orderer. I'm trying to understand what's wrong. Was in meeting all day. I'll report back when I have a bit more time to get more info.

jimthematrix (Wed, 21 Jun 2017 16:21:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6h7csd6TrudTMHW5v) @DannyWong I can think of at least two and I'm sure there are more techniques: 1) (DIY) use a state database to record which instance has registered for a particular event and all instances will check that database before registering, 2) use a messaging system like kafka to sit b/w the peer event source and your listening app, and implement the fabric event listener as a kafka event producer, then all your app instances can be assigned to the same consumer group to pull events from a single topic and let kafka manage them to avoid duplicates, this is more complex but has the benefit of not losing events if the listener crashed

akdj (Wed, 21 Jun 2017 16:39:34 GMT):
Hello, strange issue, since yesterday, I was reading line by line the balance transfer example application code, to understand how it work. and I am trying now to test by changing all "localhost" to my real hostname domain address it seems the steps of create channel, join channel, install chaincode, instantiate chaincode are working well, however for the invoke, I have a problem with chaincode default invoke function here my command, and output ``` curl -s -X POST \ http://node.org1.com:4000/channels/mychannel/chaincodes/mycc \ -H "authorization: Bearer $TOKEN_2" \ -H "content-type: application/json" \ -d '{ "peers": ["node.org1.com:7051", "node.org1.com:8051"], "fcn":"invoke", "args":["move","a","b","10"] }' ```

akdj (Wed, 21 Jun 2017 16:39:41 GMT):
``` [2017-06-21 15:31:52.491] [DEBUG] SampleWebApp - Decoded from JWT token: username - Tim, orgname - org2 [2017-06-21 15:31:52.492] [DEBUG] SampleWebApp - ==================== INVOKE ON CHAINCODE ================== [2017-06-21 15:31:52.493] [DEBUG] SampleWebApp - channelName : mychannel [2017-06-21 15:31:52.493] [DEBUG] SampleWebApp - chaincodeName : mycc [2017-06-21 15:31:52.493] [DEBUG] SampleWebApp - fcn : invoke [2017-06-21 15:31:52.493] [DEBUG] SampleWebApp - args : move,a,b,10 [2017-06-21 15:31:52.494] [DEBUG] invoke-chaincode - ... ... ... ... 2017-06-21 15:31:52.595] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-06-21 15:31:52.597] [INFO] Helper - Successfully loaded member from persistence [2017-06-21 15:31:52.604] [DEBUG] invoke-chaincode - Sending transaction "{"_nonce":{"type":"Buffer","data":[253,36,212,44,5,59,39,216,207,240,1,46,79,204,29,84,236,115,237,121,139,233,251,44]},"_transaction_id":"64b83bc096bf7662484c4dcc4596af39b5eb3cb24df123c702986058ee6b06c6"}" [2017-06-21 15:31:52.626] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Received unknown function invocation) at /root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/app_based_on_api_server/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Received unknown function invocation) at /root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/app_based_on_api_server/node_modules/grpc/src/node/src/client.js:434:17 [2017-06-21 15:31:52.666] [ERROR] invoke-chaincode - transaction proposal was bad [2017-06-21 15:31:52.666] [ERROR] invoke-chaincode - transaction proposal was bad [2017-06-21 15:31:52.666] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... ```

akdj (Wed, 21 Jun 2017 16:39:45 GMT):
`docker logs dev-peer0.org1.example.com-mycc-v0` ``` invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke ```

akdj (Wed, 21 Jun 2017 16:39:45 GMT):
`docker logs dev-peer0.org1.example.com-mycc-v0` ``` invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke invoke is running invoke invoke did not find func: invoke ``` and why in the invoke-transaction.js the fcn in the request uses config.invokeQueryFcnName, instead the "fcn" passing in arg of the invokeChaincode function? (https://github.com/hyperledger/fabric-sdk-node/blob/v1.0.0-beta/examples/balance-transfer/app/invoke-transaction.js#L43)

jimthematrix (Wed, 21 Jun 2017 16:41:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dTs2GD4chtCmC3DkN) @chaitanya please check out the latest balance transfer sample and see the improved code in this area (to avoid confusions: https://jira.hyperledger.org/browse/FAB-4870), basically you should set "AddContent" as `fcn`

jimthematrix (Wed, 21 Jun 2017 16:46:30 GMT):
EVERYONE, I'd like ask everyone to please read the following documentation carefully before asking questions on the channel, many can be directly answered from these documentations: 1) README.md in fabric-sdk-node repository, https://github.com/hyperledger/fabric-sdk-node/blob/master/README.md, 2) API reference doc that also contains lots of information on how fabric is designed to work in general (not directly related to the SDK but critical information for app developers): https://fabric-sdk-node.github.io/

jimthematrix (Wed, 21 Jun 2017 16:46:30 GMT):
EVERYONE, I'd like to ask everyone to please read the following documentation carefully before asking questions on the channel, many can be directly answered from these documentations: 1) README.md in fabric-sdk-node repository, https://github.com/hyperledger/fabric-sdk-node/blob/master/README.md, 2) API reference doc that also contains lots of information on how fabric is designed to work in general (not directly related to the SDK but critical information for app developers): https://fabric-sdk-node.github.io/

jimthematrix (Wed, 21 Jun 2017 16:47:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kzpk8Taee5Lwes9BG) @mbwhite it's in the README.md: ``` To build and test, the following pre-requisites must be installed first: node runtime version 6.9.x, note that 7.0 is not supported at this point npm tool version 3.10.x gulp command (must be installed globaly with npm install -g gulp)

jimthematrix (Wed, 21 Jun 2017 16:51:10 GMT):
@akdj this looks like an error message from the chaincode itself, please make sure you have cleaned up the old chaincode docker images

jimthematrix (Wed, 21 Jun 2017 16:51:43 GMT):
the chaincode (and corresponding app code in tests and balance-transfer sample) have been changed two days ago

jimthematrix (Wed, 21 Jun 2017 16:52:12 GMT):
if you have old chaincode docker images built from previous runs then they won't work with the new balance-transfer app code any longer

akdj (Wed, 21 Jun 2017 16:53:50 GMT):
@jimthematrix but I always use ./network-setup.sh down, to remove all containers and unless images :/

jimthematrix (Wed, 21 Jun 2017 16:56:37 GMT):
if you are sure they old images are getting cleaned up, check again the chaincode's invoke() method logic vs. what's submitted by the app

jimthematrix (Wed, 21 Jun 2017 16:57:22 GMT):
recommended way is to have `fcn` be set to the logical operation name (AddContent in your case) instead of "invoke" as was the case before

jimthematrix (Wed, 21 Jun 2017 16:57:44 GMT):
then in the chaincode use `stub.GetFunctionAndParameters()` to retrieve the value of the `fcn` parameter

jimthematrix (Wed, 21 Jun 2017 16:57:44 GMT):
then in the chaincode use `stub.GetFunctionAndParameters()` to retrieve the value of the `fcn` parameter as the function name

jimthematrix (Wed, 21 Jun 2017 16:58:36 GMT):
which is what the latest chaincode (sample_cc and sample_cc1) does

akdj (Wed, 21 Jun 2017 17:00:44 GMT):
AddContent ? you mean request like "move" "query" "delete"?

akdj (Wed, 21 Jun 2017 17:00:47 GMT):
@jimthematrix

CodeReaper (Wed, 21 Jun 2017 21:21:54 GMT):
Hey, getting this error initializinig chaincode- error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /home/sankalp/MyAppData/projects/fabric-client final /node_modules/grpc/src/node/src/client.js:434:17

CodeReaper (Wed, 21 Jun 2017 21:22:09 GMT):
what could be the reason

CodeReaper (Wed, 21 Jun 2017 21:22:09 GMT):
what could be the reason? This code has worked correctly all the way up to invoke and query before. Getting this problem now

CodeReaper (Wed, 21 Jun 2017 21:24:41 GMT):
getting this at peers-- 2017-06-21 21:18:10.433 UTC [endorser] ProcessProposal -> ERRO 385 simulateProposal() resulted in chaincode response status 500 for txid: 0570a5706dee90aa5e2721e59ec44b1330fd2cedb274f0b973cdd495bfd083f4

DannyWong (Thu, 22 Jun 2017 01:45:50 GMT):
@jimthematrix I am implementing the competing message consumer pattern with a msg broker in the middle at this moment... (within my project timeline)

DannyWong (Thu, 22 Jun 2017 01:45:59 GMT):
Thanks for your advice

DannyWong (Thu, 22 Jun 2017 03:36:24 GMT):
But @jimthematrix how about the producer side.... what if we have peer0 and peer1 within same org... They will both produce an event to Kafka (consumer side, we can implement competing consumers pattern with DIY-consumer-group or Kafka-consumer-group as the NodeJS is logically 1 component just with multiple instances running)

DannyWong (Thu, 22 Jun 2017 03:36:59 GMT):
i asked in #fabric as well

Dpkkmr (Thu, 22 Jun 2017 06:29:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=o832mBDT7z5sQzv3Z) @SanthoshKumarMK I'm also having a similar requirement. Can anyone suggest a way of implementing this. Loading the Chaincode remotely

PushpalathaHiremath (Thu, 22 Jun 2017 06:30:58 GMT):
Thank you.. Resolved. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rkgbtbKafNnKcn8kQ) @lyriarte

PushpalathaHiremath (Thu, 22 Jun 2017 06:48:41 GMT):

Message Attachments

tejasborawake (Thu, 22 Jun 2017 07:49:12 GMT):
Has joined the channel.

tejasborawake (Thu, 22 Jun 2017 07:49:36 GMT):
@jimthematrix Could you please let us know how can we add new peers into existing balance transfer project? Could you please help us on this? We are stuck in our POC as we are restricted to only 2 peers.

akdj (Thu, 22 Jun 2017 08:20:39 GMT):
``` curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes \ -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051"], "chaincodeName":"mycc", "chaincodeVersion":"v0", "functionName":"init", "args":["a","100","b","200"] }' ``` I think the `peers` item can be remove

akdj (Thu, 22 Jun 2017 08:20:39 GMT):
here, https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer#instantiate-chaincode ``` curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes \ -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051"], "chaincodeName":"mycc", "chaincodeVersion":"v0", "functionName":"init", "args":["a","100","b","200"] }' ``` I think the `peers` item can be remove

akdj (Thu, 22 Jun 2017 08:20:39 GMT):
here, https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer#instantiate-chaincode ``` curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes \ -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051"], "chaincodeName":"mycc", "chaincodeVersion":"v0", "functionName":"init", "args":["a","100","b","200"] }' ``` I think the `peers` item can be removed, because, it isn't use in the app.js code

CodeReaper (Thu, 22 Jun 2017 09:21:29 GMT):
Just when you think that youve covered all sorts of errors, something new always comes up-- when doing channel.sendTransaction this error pops up, I've tried putting timeouts for more than 30 seconds everywhere in the code to solve it, even increased the request-timeout field up to 120 seconds. but it wont solve the issue-- [2017-06-22 14:45:27.405] [ERROR] Helper - Failed to send instantiate transaction and get notifications within the timeout period. undefined [2017-06-22 14:45:27.405] [ERROR] Helper - Failed to order the transaction. Error code: undefined Anyone got any clue??

VamsiKrishnak (Thu, 22 Jun 2017 10:31:01 GMT):
how to enroll a client in hyperledger fabric v1.0? As, iam trying with this "fabric-ca-client enroll -u “http://admin:adminpw@localhost:7054” its showing error :"Error: Error response from server was: Authorization failure"

VamsiKrishnak (Thu, 22 Jun 2017 10:40:29 GMT):
@CodeReaper @jimthematrix how to enroll a client in hyperledger fabric v1.0? As, iam trying with this "fabric-ca-client enroll -u “http://admin:adminpw@localhost:7054” its showing error :"Error: Error response from server was: Authorization failure"

CodeReaper (Thu, 22 Jun 2017 10:45:52 GMT):
@VamsiKrishnak you have to register before enrolling the user by the admin. You might wanna go through this link to understand the enrollment process by starting your own CA server-https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#server. To test the registering and enrollment process through node SDK go through this example--https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer

VamsiKrishnak (Thu, 22 Jun 2017 10:48:03 GMT):
@CodeReaper i already registered to server.

SyneBlockChainTeam (Thu, 22 Jun 2017 10:58:01 GMT):
Hi @jimthematrix , @muralisr , @mastersingh24 There are 2 peers used in balance_transfer sample application. How to configure 3rd peer ? Thanks.

MohammadObaid (Thu, 22 Jun 2017 13:31:04 GMT):
@SyneBlockChainTeam I guess you first need to modify your configtx.yaml file by adding third peer there and then regenerate channel artifacts for peer3. You will also need to add peer3 in docker compose.yaml file so that container for 3rd peer also get running. Correct m if I am wrong. :)

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

jimthematrix (Thu, 22 Jun 2017 18:27:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yjip3MbgudNdEGqmR) @akdj yes

MohammadObaid (Thu, 22 Jun 2017 18:42:42 GMT):
@here Whenever I am trying to enroll user I am getting this error.. Can anyone tell me what causes this error?

MohammadObaid (Thu, 22 Jun 2017 18:43:10 GMT):

Message Attachments

jimthematrix (Thu, 22 Jun 2017 18:43:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7kCGSoZ2euomsn3YX) @CodeReaper what do you mean by "initializing chaincode"? is this from chaincode install or instantiate? for install, an error like `err MSP Org1MSP is unknown` means your target Peer's identity is not in the "Org1MSP" org, for instantiate this error means the peer's channel configuration does not have the "Org1MSP". make sure the channel config is correct (includes Org1MSP) and the target peers (where the instantiation proposal was sent to) has been joined to the channel

qizhang (Thu, 22 Jun 2017 19:05:16 GMT):
I am running "node test/integration/e2e.js" in Fabric-sdk-node v1.0.0-alpha2. However, 5 out of 51 tests failed. The first failure is shown in the following figure. I am wondering how to solve it. Thanks!

qizhang (Thu, 22 Jun 2017 19:05:16 GMT):
I running "node test/integration/e2e.js" in Fabric-sdk-node v1.0.0-alpha2. However, 5 out of 51 tests failed. The first failure is shown in the following figure. I am wondering how to solve it. Thanks!

qizhang (Thu, 22 Jun 2017 19:05:36 GMT):

Message Attachments

gormand (Thu, 22 Jun 2017 20:21:38 GMT):
Hi - Can anyone point me to a standalone SDK sample please? I'm looking for one which isn't wrapped in a webserver preferably. Many thanks.

jmcnevin (Thu, 22 Jun 2017 21:02:47 GMT):
Has joined the channel.

Ratnakar (Fri, 23 Jun 2017 00:44:19 GMT):
@jimthematrix @bretharrison `getGenesisBlock()` - gets *genesis block* of a channel `getChannelConfig()` - gets *latest (newest)* configuration block of the channel How do we get specific config block. For instance , we have the following command for CLI ``` Usage: peer channel fetch [outputfile] [flags] ``` Can we do this using node-sdk ?

bretharrison (Fri, 23 Jun 2017 00:58:14 GMT):
If you want specific block then just query for it, does not matter if is a config block or transaction block

j3ffyang (Fri, 23 Jun 2017 03:54:00 GMT):
Has joined the channel.

CodeReaper (Fri, 23 Jun 2017 04:38:51 GMT):
Yes @jimthematrix I solved that. Check my more recent problem-- [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2Mze7XA3Lrpva7x8g)

CodeReaper (Fri, 23 Jun 2017 04:38:51 GMT):
Yes @jimthematrix I solved that. Please see my more recent problem-- [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2Mze7XA3Lrpva7x8g)

akdj (Fri, 23 Jun 2017 07:04:44 GMT):
@CodeReaper https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JtFjYG7zfnsvuG9qu

SyneBlockChainTeam (Fri, 23 Jun 2017 09:42:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5GGoJvSexmhiFWuQb) @MohammadObaid We already did that but once you start runapp.js it doesn't generate required folders for TLS and MSP, it also doesn't recreate channel.tx nor it recreate genesis.block and hence application fails. We even tried creating entire structure of 3 peers in Fabric CLI version and put it back in Node-SDK but it doesn't work either.

SotirisAlfonsos (Fri, 23 Jun 2017 09:48:36 GMT):
@SyneBlockChainTeam You could generate the '.block' and '.tx' file with the configtxgen tool. Also you would need to add peer3 in the 'cryptogen.yaml' file and create the new 'crypto-config' folder using the cryptogen tool. Then, since you are using the balance transfer example, you might need to change the keystore certs in the network-config.json file.

SotirisAlfonsos (Fri, 23 Jun 2017 09:48:36 GMT):
@SyneBlockChainTeam You could generate the `.block` and `.tx` file with the configtxgen tool. Also you would need to add peer3 in the `cryptogen.yaml` file and create the new `crypto-config` folder using the cryptogen tool. Then, since you are using the balance transfer example, you might need to change the keystore certs in the `network-config.json` file.

MohammadObaid (Fri, 23 Jun 2017 10:17:17 GMT):
@SotirisAlfonsos Is this necessary to regenerate channel.tx and geneessi block when we add peers ?

holocron (Fri, 23 Jun 2017 10:42:24 GMT):
Has joined the channel.

SotirisAlfonsos (Fri, 23 Jun 2017 11:06:54 GMT):
@MohammadObaid Well depends if you introduce a new org with it.

lohitkrishnan (Fri, 23 Jun 2017 11:15:48 GMT):
Has joined the channel.

tejasborawake (Fri, 23 Jun 2017 11:50:08 GMT):
@SotirisAlfonsos i tried using configtxgen but i keep getting below error

tejasborawake (Fri, 23 Jun 2017 11:50:08 GMT):

Message Attachments

tejasborawake (Fri, 23 Jun 2017 11:50:51 GMT):
I was able to create new crypto-config using cryptogen tool but configtxgen kept giving this error.

SotirisAlfonsos (Fri, 23 Jun 2017 11:51:37 GMT):
@tejasborawake Yes BCCSP is no longer used. So you should remove it from the config file.

MikeMayori (Fri, 23 Jun 2017 16:20:15 GMT):
Hi , Any body knows why this error keeps showing up in fabric beta when your are creating the channel??

MikeMayori (Fri, 23 Jun 2017 16:20:16 GMT):
error: [Orderer.js]: sendBroadcast - reject with SERVICE_UNAVAILABLE [2017-06-23 16:17:43.291] [ERROR] ChannelServices - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/root/hl2.1-swagger/node_modules/fabric-client/lib/Orderer.js:93:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/root/hl2.1-swagger/node_modules/grpc/src/node/src/client.js:245:14)

MohammadObaid (Fri, 23 Jun 2017 17:25:22 GMT):
Is node version 6.11 supported in fbaric-node-sdk?

jyellick (Fri, 23 Jun 2017 17:28:57 GMT):
@MikeMayori This generally indicates that the resources for the channel are still being allocated at the orderer. Before the beta, the orderer would return the genesis block successfully, before all the resources were allocated, causing subsequent transactions to fail with SERVICE_UNAVAILABLE. The beta changed this behavior so that the genesis block is not returned until the backing resources are all up. You may need to wait a bit longer between sending a channel creation request and attempting to retrieve the channel config.

MikeMayori (Fri, 23 Jun 2017 17:29:45 GMT):
Thnaks

MikeMayori (Fri, 23 Jun 2017 17:29:45 GMT):
Thanks

MikeMayori (Fri, 23 Jun 2017 17:32:12 GMT):
let request = { config: channelConfig, signatures: [signature], name: channelName, orderer: channel.getOrderers()[0], txId: client.newTransactionID() }; return client.createChannel(request); //orderer

MikeMayori (Fri, 23 Jun 2017 17:33:08 GMT):
@jyellick you recommend waiting a little longer after or before createchannel

MohammadObaid (Fri, 23 Jun 2017 17:34:30 GMT):
@berestet Will node 6.11 version works with fabric-node-sdk?

berestet (Fri, 23 Jun 2017 17:34:30 GMT):
Has joined the channel.

jyellick (Fri, 23 Jun 2017 17:39:30 GMT):
@MikeMayori After sending the channel creation request, before attempting to retrieve the genesis block (which is what is sent via joinChannel)

jyellick (Fri, 23 Jun 2017 17:39:59 GMT):
@MohammadObaid Did you mean @bretharrison ?

bretharrison (Fri, 23 Jun 2017 17:44:04 GMT):
@MohammadObaid fabric-node-sdk works with Node 6.9 or greater up to , but not including 7.0 .... (` >=6.9.0 < 7.0`)

jyellick (Fri, 23 Jun 2017 17:55:52 GMT):
@bretharrison FYI, the doc in `fabric-sdk-node/examples/balance_transfer/README.md` says "v6.2.0 - 6.10.0 ( Node v7+ is not supported )". Might want to consider updating that to reflect the above (" >= 6.9.0 < 7.0")

MikeMayori (Fri, 23 Jun 2017 18:04:47 GMT):
@jyellick Nope , actually the error comes from the orderer.js line 91, i think will be a major bug

MikeMayori (Fri, 23 Jun 2017 18:04:47 GMT):
@jyellick Nope , actually the error comes from the orderer.js line 93, i think will be a major bug

jyellick (Fri, 23 Jun 2017 18:08:08 GMT):
@MikeMayori I am not that familiar with the node SDK, was only responding because I know when the orderer returns SERVICE_UNAVAILABLE. In my copy of `fabric-node-sdk` I only see an `orderer.js` in the test folder

MikeMayori (Fri, 23 Jun 2017 18:08:50 GMT):
Ok, but thanks for the help

MikeMayori (Fri, 23 Jun 2017 18:08:56 GMT):
it always helps

jyellick (Fri, 23 Jun 2017 18:10:25 GMT):
I maintain that seeing SERVICE_UNAVAILABLE generally indicates that Kafka resources have not yet been allocated. @bretharrison What is the SDK flow for creating a channel? I assume there is an API call to send the create channel tx, then an API call to retrieve the genesis block, then an API call to send that genesis block to a peer?

MikeMayori (Fri, 23 Jun 2017 18:11:38 GMT):
OK. I am not using Kafka in my network , i am just using the example network

bretharrison (Fri, 23 Jun 2017 18:12:03 GMT):
@jyellick yes that is correct

jyellick (Fri, 23 Jun 2017 18:12:52 GMT):
@bretharrison Is it the user's responsibility to wait between sending the create tx, and retrieving the genesis block? How about for polling/retrying if the genesis block is not ready yet?

jyellick (Fri, 23 Jun 2017 18:13:06 GMT):
@MikeMayori So you are using the solo consensus method?

MikeMayori (Fri, 23 Jun 2017 18:13:13 GMT):
yes

MikeMayori (Fri, 23 Jun 2017 18:13:40 GMT):
To start testing beta sdk

jyellick (Fri, 23 Jun 2017 18:14:12 GMT):
And on what call do you see `SERVICE_UNAVAILABLE`?

MikeMayori (Fri, 23 Jun 2017 18:14:55 GMT):
return client.createChannel(request); //orderer

MikeMayori (Fri, 23 Jun 2017 18:15:27 GMT):
which uses Fabric-client/lib/Orderer.Js line 93

MikeMayori (Fri, 23 Jun 2017 18:16:14 GMT):
Just to state that the example as is (e2e example ) does not work either??

MikeMayori (Fri, 23 Jun 2017 18:16:29 GMT):
a small drawback...

jyellick (Fri, 23 Jun 2017 18:20:24 GMT):
Ah, `Orderer.js`, I was not looking for the capitalized `O`, I see that file now, that is helpful, let me look

MikeMayori (Fri, 23 Jun 2017 18:20:38 GMT):
OK

jyellick (Fri, 23 Jun 2017 18:53:21 GMT):
@MikeMayori I see from running the end to end example, that if the docker compose network is not up correctly, you may also see `SERVICE_UNAVAILABLE` from the SDK itself. Can you confirm that your docker compose network is up and running?

MikeMayori (Fri, 23 Jun 2017 18:53:46 GMT):
i can give you access if you want

MikeMayori (Fri, 23 Jun 2017 18:53:57 GMT):
give me your email

MikeMayori (Fri, 23 Jun 2017 18:54:16 GMT):
no, let me give this link hold

MikeMayori (Fri, 23 Jun 2017 18:54:39 GMT):
https://ide.c9.io/mmayorivera/hledger

MikeMayori (Fri, 23 Jun 2017 18:54:42 GMT):
go ahead

MikeMayori (Fri, 23 Jun 2017 18:54:49 GMT):
this is an online IDE

jyellick (Fri, 23 Jun 2017 18:56:43 GMT):
It looks like it requires credit card details to sign up

MikeMayori (Fri, 23 Jun 2017 18:56:56 GMT):
nope

MikeMayori (Fri, 23 Jun 2017 18:57:24 GMT):
it is free , you just need to sign up but that is all

MikeMayori (Fri, 23 Jun 2017 18:57:48 GMT):
you can use the http://138.197.32.29:3000/#/app/explorer/api

MikeMayori (Fri, 23 Jun 2017 18:57:55 GMT):
swagger like

jyellick (Fri, 23 Jun 2017 18:58:03 GMT):
Maybe the process has changed since you signed up? I am stuck on a page requiring credit card details, though it claims to be free. Great, the last link seems to work

MikeMayori (Fri, 23 Jun 2017 18:58:25 GMT):
let me check i will create a user for you hold

MikeMayori (Fri, 23 Jun 2017 19:03:56 GMT):
just about to finish

MikeMayori (Fri, 23 Jun 2017 19:08:03 GMT):
i will go to you personal box

vdods (Sat, 24 Jun 2017 21:15:37 GMT):
Hi all, how are cert attributes (see FabricCAServices.register) represented within the (x509?) cert? I'm looking to set some cert attributes on the users I register and then access them within chaincode. So if you happen to want to gear your answer toward how they would be accessed through the https://golang.org/pkg/crypto/x509/#Certificate data structure, that would ideal! :)

mastersingh24 (Sat, 24 Jun 2017 21:37:27 GMT):
@vdods - Fabric CA does not currently set any attributes in the enrollment certificates. Attributes were intended to be set for transaction certificates (tcerts) but as you know that functionality has been deferred post 1.0.0 release. We never added a feature to Fabric CA to add them to enrollment certs

vdods (Sat, 24 Jun 2017 21:39:07 GMT):
Hmm.. from what I can see (and I'm looking at v1.0.0-alpha2 tag of everything), fabric-sdk-node sends attrs in the registration request to fabric-CA, which includes them in the signing request to create the ecert. This is just from reading code, not from actually verifying that that's what's happening.

vdods (Sat, 24 Jun 2017 21:56:27 GMT):
Ok, nevermind -- upon deeper inspection, it doesn't look like the attrs are ever put into the cert signed during enrollment

mastersingh24 (Sun, 25 Jun 2017 22:26:59 GMT):
@vdods - right - the attributes will actually be in the fabric-ca user registry but for now they aren't used. The good news is that once tcerts are implemented (again) then any attributes which you create now during registration will be available (of course you'd need to upgrade the fabric-ca-server)

tinywell (Mon, 26 Jun 2017 03:02:46 GMT):
Has joined the channel.

tejasborawake (Mon, 26 Jun 2017 07:12:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tQ8bZexjipc8sg8Z6) @SotirisAlfonsos I was able to create both channel.tx and certificates necessary for peer starting. but now i am facing different error. once server starts at 4000 port from runapp.sh, i try to run testapi.sh but it fails in registering new user and get ORG1_TOKEN so as proceed further. Error: [2017-06-26 12:30:03.953] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 64a16068cb28efa2463cb06f5eaf23328d502f0150c4b42ebb39e2d5c9958f3e [2017-06-26 12:30:03.959] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-06-26 12:30:04.034] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: write EPROTO 139754266982208:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2512: 139754266982208:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3544: ] at ClientRequest. (/home/dev/work/src/github.com/hyperledger/fabric-sdk-node/examples/balance-transfer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:712:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at onwriteError (_stream_writable.js:346:10) at onwrite (_stream_writable.js:364:5) at WritableState.onwrite (_stream_writable.js:90:5) at fireErrorCallbacks (net.js:468:13) [2017-06-26 12:30:04.035] [DEBUG] Helper - Jim failed to register [2017-06-26 12:30:04.035] [ERROR] Helper - Jim enrollment failed (node:10810) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot save null userContext. (node:10810) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property '_enrollmentSecret' of null

paul.sitoh (Mon, 26 Jun 2017 07:37:12 GMT):
Folks, I am calling this method ```channel.queryBlock(blockNumber, target)``` I pass it the height index of the array of a blocks. (For example, from a block height of 4, I pass it 0,1,2,3) but I am getting the same info. Is that a bug?

paul.sitoh (Mon, 26 Jun 2017 07:37:12 GMT):
Folks, I am calling this method ```channel.queryBlock(blockNumber, target)``` I pass it the height index of the array of a blocks. (For example, from a block height of 4, I pass it 0,1,2,3) but I am getting the same block info. Is that a bug?

paul.sitoh (Mon, 26 Jun 2017 07:38:27 GMT):
The documentation says blockNumber is the ID of a Block, what exactly is the id of a block

smfaizalkhan (Mon, 26 Jun 2017 08:14:29 GMT):
Hello All, I have been succeful in pusing/retreving Data in Hyperledger But can we push/retreive a Document in/from a Hyperledger BlockChainN/W Any examples ?

evgenhvost (Mon, 26 Jun 2017 08:44:02 GMT):

Message Attachments

evgenhvost (Mon, 26 Jun 2017 08:44:27 GMT):
Hello, maybe some can help ? I've been trying to run query and invoke on a channel but both of them are failing. I'm using pritty much the same code as in the e2e tests - however I'm receiving the previous error. Has anyone encoutered it ?

Gerard9494 (Mon, 26 Jun 2017 10:21:19 GMT):
Hello everyone, When I try to enroll a user i have this problem "No certificates found for provided serial and aki" doesn anyone knows what is going wrong? I can register+enroll just one user, then i have this problem. Thanks!

qizhang (Mon, 26 Jun 2017 14:25:09 GMT):
I am trying to use "docker-compose up --force-recreate" under directory "/root/git/src/github.com/hyperledger/fabric-sdk-node/text/fixtures" (version: 1.o.o-beta) to setup the network, but the orderer container cannot be up and running, the error messages are shown as below. Can someone let me know how to solve it? Thanks!

qizhang (Mon, 26 Jun 2017 14:25:09 GMT):
Hello everyone! I am trying to use "docker-compose up --force-recreate" under directory "/root/git/src/github.com/hyperledger/fabric-sdk-node/text/fixtures" (version: 1.o.o-beta) to setup the network, but the orderer container cannot be up and running, the error messages are shown as below.BTW, all the images are built against version v1.0.0-beta. Can someone let me know how to solve it? Thanks!

qizhang (Mon, 26 Jun 2017 14:25:09 GMT):
I am trying to use "docker-compose up --force-recreate" under directory "/root/git/src/github.com/hyperledger/fabric-sdk-node/text/fixtures" (version: 1.o.o-beta) to setup the network, but the orderer container cannot be up and running, the error messages are shown as below.BTW, all the images are built against version v1.0.0-beta. Can someone let me know how to solve it? Thanks!

qizhang (Mon, 26 Jun 2017 14:25:56 GMT):

Message Attachments

Gerard9494 (Mon, 26 Jun 2017 15:06:43 GMT):
Hello everyone, When I try to enroll a user i have this problem "[DEBUG] Failed to verify certificate: Failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")" doesnt anyone knows what is going wrong? I can register+enroll just one user, then i have this problem. Thanks!

vdods (Mon, 26 Jun 2017 17:37:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=g2fqAdLEvcA6gya6G) @mastersingh24 Thanks! Having TCerts is a very high priority from my end.

neharprodduturi (Tue, 27 Jun 2017 00:18:42 GMT):
Has joined the channel.

shanlusun (Tue, 27 Jun 2017 06:19:15 GMT):
Hello, anyone knows in chaincode how to unmarshal the Signature bytes inside SignedProposal? I tried to import "github.com/golang/protobuf/proto", but this is not provided by peer image by default.

bh4rtp (Tue, 27 Jun 2017 07:28:57 GMT):
@jimthematrix hi, long time not to test node sdk. i find there is a balance-transfer example, and wonder that whether i just need to modify the `network-config.json`, configure `docker-compose.yml` files, generate artifacts to run my own network?

bh4rtp (Tue, 27 Jun 2017 07:28:57 GMT):
@jimthematrix hi, long time not to test node sdk. i find there is a `balance-transfer` example, and wonder that whether i just need to modify the `network-config.json`, configure `docker-compose.yml` files, generate artifacts to run my own network?

bh4rtp (Tue, 27 Jun 2017 07:28:57 GMT):
@jimthematrix hi, long time not to test node sdk. i find there is a `balance-transfer` example, and wonder whether i just need to modify the `network-config.json`, configure `docker-compose.yml` files, generate artifacts to run my own network?

chaitanya (Tue, 27 Jun 2017 07:38:10 GMT):
Hi, does there exist a block event listener example in NodeSDK that I could build on? I need to write an event listener, for Block events, but I'm new to Node. I followed the balance-transfer example, but I can't get block events yet

sativ (Tue, 27 Jun 2017 07:47:40 GMT):
Has joined the channel.

sativ (Tue, 27 Jun 2017 08:25:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7kCGSoZ2euomsn3YX) @CodeReaper Hi, did you manage to solve this one? I am having this issue and can't seems to fix it... any help? thanks!

SotirisAlfonsos (Tue, 27 Jun 2017 08:43:50 GMT):
@bh4rtp depending what you want to do you might also need to change the `config.json`. And of-course `crypto-config`, `.tx`, `.block`.

SotirisAlfonsos (Tue, 27 Jun 2017 08:43:50 GMT):
@bh4rtp depending what you want to do you might also need to change the `config.json`. And of course `crypto-config`, `.tx`, `.block`.

whathewatt (Tue, 27 Jun 2017 09:40:49 GMT):
Has joined the channel.

dilipjain (Tue, 27 Jun 2017 09:50:41 GMT):
Has joined the channel.

dilipjain (Tue, 27 Jun 2017 09:50:47 GMT):
In V0.6, I was able to create a simple client application to make REST calls for invoke/query chaincode APIs. In v1.0, as REST calls are not supported, instead Node SDK (gRPC) has come into picture, and it seems difficult to write test application to make gRPC calls. Another point is ... same v1.0 blockchain application, which is easily tested with CLI, cannot be directly tested with Node SDK since the application folders need to be re-structured to support Node SDK. *It seems, that writing Node SDK based test application is more difficult then writing blockchain application itself* *and, why the CLI and Node SDK need different approaches for blockchain application folder structures* Please let me know if someone has a simple step-by-step guideline/checklist that could help while converting v0.6 test application (REST calls) into v1.0 test application (Node SDK gRPC) Thanks.

mastersingh24 (Tue, 27 Jun 2017 09:57:24 GMT):
@dilipjain - not sure if there is a step-by-step on converting the NodeJS app, but you might want to have a look at http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html as it explains the calls needed for invoke and query with 1.0.0

MohammadObaid (Tue, 27 Jun 2017 10:07:54 GMT):
@here I am trying to generate my own genesis block and channe;.tx using configtxgen took but I am continuously getting `segmentation violation error` . Any clue how to fix this? I have successfully generated msp's of organizations and modifed my configtx.yaml and cryptogen.yaml

MohammadObaid (Tue, 27 Jun 2017 10:08:24 GMT):

Message Attachments

dilipjain (Tue, 27 Jun 2017 10:10:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wyaPeegXZ5yRDpbWS) @MohammadObaid Please verify that the field names are on the correct column. Also confirm, that there should be no tab characters in the yaml file.

MohammadObaid (Tue, 27 Jun 2017 10:17:26 GMT):
@dilipjain Everything looks fine to me. I havent use any tabs in any yaml files. I copied code from this url https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/artifacts/channel/configtx.yaml and just organizations in it.

MohammadObaid (Tue, 27 Jun 2017 10:17:26 GMT):
@dilipjain Everything looks fine to me. I havent use any tabs in any yaml files. I copied code from this url https://github.com/hyperledger/fabric-sdk-node/blob/master/examples/balance-transfer/artifacts/channel/configtx.yaml and add just organizations in it.

mastersingh24 (Tue, 27 Jun 2017 10:52:44 GMT):
@MohammadObaid - you need to be in the `artifacts/channel` directory or you need to set FABRIC_CFG_PATH properly - in your case `FABRIC_CFG_PATH=$PWD/channel`

mastersingh24 (Tue, 27 Jun 2017 10:53:14 GMT):
You might also want to try moving to the recently released RC1 for both fabric and the Node SDK

mastersingh24 (Tue, 27 Jun 2017 10:54:12 GMT):
I made things a bit easier to generate but moving crypto-config under the channel folder and using relative paths to the MSP in configtx.yaml as well in RC1

Gerard9494 (Tue, 27 Jun 2017 12:37:44 GMT):
Hello everyone, Does somebody knows why do i have this error? "Registration of 'Gerard' failed: Failed getting affiliation 'org3': sql: no rows in result set" I am trying to register the user Gerard to org3. I am using the balance-transfer example form the repo, and I can't register an user to org3, the third organisation that I have added. Thanks!

MikeMayori (Tue, 27 Jun 2017 12:42:19 GMT):
@mastersingh24 What happen with the fabric example in rc1 node sdk??

mastersingh24 (Tue, 27 Jun 2017 12:43:45 GMT):
it's still there, isn't it?

mastersingh24 (Tue, 27 Jun 2017 12:44:29 GMT):
I assume you mean balance transfer? although we are moving it to fabric-samples - https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer

MikeMayori (Tue, 27 Jun 2017 12:45:05 GMT):
That one is old with beta

MikeMayori (Tue, 27 Jun 2017 12:46:13 GMT):
The fabric samples is with rc1

MikeMayori (Tue, 27 Jun 2017 12:46:22 GMT):
that should be the one??

MikeMayori (Tue, 27 Jun 2017 12:46:23 GMT):
Thanks

mastersingh24 (Tue, 27 Jun 2017 12:46:33 GMT):
yeah - it works with RC1

mastersingh24 (Tue, 27 Jun 2017 12:46:42 GMT):
I know because I fixed it ;)

MikeMayori (Tue, 27 Jun 2017 12:47:03 GMT):
Thanks you , we Know saw your commits

MikeMayori (Tue, 27 Jun 2017 12:47:16 GMT):
Thanks!!!

MikeMayori (Tue, 27 Jun 2017 13:06:01 GMT):
@mastersingh24 what happen with the release directory??

MikeMayori (Tue, 27 Jun 2017 13:06:15 GMT):
fabric-samples

MikeMayori (Tue, 27 Jun 2017 13:06:45 GMT):
@mastersingh24 how we can compile now our network??

mastersingh24 (Tue, 27 Jun 2017 13:12:49 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/samples.html

mastersingh24 (Tue, 27 Jun 2017 13:13:23 GMT):
We separated the installation of the binaries from the samples themselves for RC1

MohammadObaid (Tue, 27 Jun 2017 13:17:20 GMT):

Message Attachments

MohammadObaid (Tue, 27 Jun 2017 13:18:57 GMT):
@mastersingh24 I already moved configx.yaml and other yaml file in artifacts folder to make things easier and also using relative path of msp's but still getting same error

MohammadObaid (Tue, 27 Jun 2017 13:19:14 GMT):

Message Attachments

CodeReaper (Tue, 27 Jun 2017 14:50:52 GMT):
@sativ it can be a problem with a few things.. 1) check whether youve given the right private key in the yaml file for orderer and

CodeReaper (Tue, 27 Jun 2017 14:50:52 GMT):
@sativ it can be a problem with a few things.. 1) check whether youve given the right private key in the yaml file for orderer and 2)most probably its a problem with the added peers, they might not be added to the channel properly. Make sure youve done channel.joinchannel also

CodeReaper (Tue, 27 Jun 2017 14:50:52 GMT):
@sativ it can be a problem with a few things.. 1) check whether youve given the right private key in the yaml file for orderer and 2)most probably its a problem with the added peers, they might not be added to the channel properly. Make sure youve done channel.joinchannel also

MikeMayori (Tue, 27 Jun 2017 17:04:53 GMT):
to all : no advisable to play with hyperledger/fabric-samples/first_network

MikeMayori (Tue, 27 Jun 2017 17:04:53 GMT):
to all : not advisable to play with hyperledger/fabric-samples/first_network

MikeMayori (Tue, 27 Jun 2017 17:04:53 GMT):
to all : hyperledger/fabric-samples/first_network not running

MikeMayori (Tue, 27 Jun 2017 17:06:25 GMT):
to all : hyperledger/fabric-orderer is missing

MikeMayori (Tue, 27 Jun 2017 17:06:25 GMT):
to all : hyperledger/fabric-orderer is missing ::

MikeMayori (Tue, 27 Jun 2017 17:06:25 GMT):
to all : hyperledger/fabric-orderer is missing ::

jrosmith (Tue, 27 Jun 2017 20:08:19 GMT):
is there a way to get to the enrollment secret of a user that has already been enrolled but is not registered?

jrosmith (Tue, 27 Jun 2017 20:17:32 GMT):
i'm sorry, backwards. already registered but not yet enrolled

outis (Wed, 28 Jun 2017 02:41:42 GMT):
Hi all, I am trying out rc1, but the test doesn't seem to pass through. The following is what I did ```docker-compose -f fixture/docker-compose.yaml up -d node integration/e2e/create-channel.js node integration/e2e/join-channel.js node integration/e2e/install-chaincode.js node integration/e2e/instantiate-chaincode.js ``` where it fails with the error ``` not ok 3 Failed to send instantiate transaction and get notifications within the timeout period. --- operator: fail at: Promise.all.then.catch (/Users/amano/go/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:364:7) ... not ok 4 Error: Failed to send instantiate transaction and get notifications within the timeout period. at Promise.all.then.catch (/Users/amano/go/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:365:11) --- operator: fail at: hfc.newDefaultKeyValueStore.then.then.then.then.then (/Users/amano/go/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/e2eUtils.js:389:5) ... not ok 5 Failed to instantiate chaincode --- operator: fail at: e2eUtils.instantiateChaincode.then (/Users/amano/go/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/instantiate-chaincode.js:40:6) ... ``` I am not sure this is relevant, but there are following lines in the docker log ```

outis (Wed, 28 Jun 2017 02:42:20 GMT):
```peer0.org1.example.com | 2017-06-28 01:43:58.558 UTC [ConnProducer] NewConnection -> ERRO 3bc Failed connecting to orderer.example.com:7050 , error: x509: certificate signed by unknown authority peer0.org1.example.com | 2017-06-28 01:43:58.558 UTC [deliveryClient] connect -> ERRO 3bd Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] orderer.example.com | 2017-06-28 01:43:58.558 UTC [grpc] Printf -> DEBU 949 grpc: Server.Serve failed to complete security handshake from "172.21.0.6:46308": EOF ```

gdinhof (Wed, 28 Jun 2017 05:57:35 GMT):
Has joined the channel.

mochechan (Wed, 28 Jun 2017 06:03:59 GMT):
I add "role" when registering a user in fabric-sdk-node, and then do some processes including creating/joining channel, installing/instantiating/invoking/querying chaincode. My problem is that, in my attempts, any role can pass the whole process. So, how can I do access control for different user's role?

MohammadObaid (Wed, 28 Jun 2017 08:44:52 GMT):
@here .When I am trying to create a channel I am getting error `bad signature` and docker logs state that `org2msp expected but got org1msp` . I have check my docker-compose.yaml , network-config.json and everything looks fine to me. What else do I need to check? I have successfully added peers , organizations and enroll users but stuck in while creating channel.

MohammadObaid (Wed, 28 Jun 2017 08:45:28 GMT):

Message Attachments

zhasni (Wed, 28 Jun 2017 08:47:44 GMT):
check your configtx.yaml

sativ (Wed, 28 Jun 2017 09:01:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3aHmXkafrNsy93jBY) @CodeReaper Thanks for hints, It was actually the 1st one, now it's fixed and I have a different problem: Chanicode installation runs well, but when I instantiate the chaincode - it hangs for several minutes, then says that there's a timeout error. and error: [fcw] Failed to obtain endorsement for transaction. code=2 If my understanding is correct - then endorsement is done by endorsement peer. But I couldn't find anywhere in the settings which peer is endorser. Also I'm using fabric-sdk-node:alpha

sativ (Wed, 28 Jun 2017 09:01:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3aHmXkafrNsy93jBY) @CodeReaper Thanks for hints, It was actually the 1st one, now it's fixed and I have a different problem: Chanicode installation runs well, but when I instantiate the chaincode - it hangs for several minutes, then says that there's a timeout error. If my understanding is correct - then endorsement is done by endorsement peer. But I couldn't find anywhere in the settings which peer is endorser. Also I'm using

sativ (Wed, 28 Jun 2017 09:01:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3aHmXkafrNsy93jBY) @CodeReaper Thanks for hints, It was actually the 1st one, now it's fixed and I have a different problem: Chanicode installation runs well, but when I instantiate the chaincode - it hangs for several minutes, then says that there's a timeout error. If my understanding is correct - then endorsement is done by endorsement peer. But I couldn't find anywhere in the settings which peer is endorser. Also I'm using fabric-sdk-node:alpha

sativ (Wed, 28 Jun 2017 09:04:40 GMT):
@outis Hi, just a quick hint - try to run *.js scripts with sudo. That helped me

sativ (Wed, 28 Jun 2017 09:04:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WRyuGn2NdSTcZkLgs) @outis Hi, just a quick hint - try to run *.js scripts with sudo. That helped me

sativ (Wed, 28 Jun 2017 09:04:40 GMT):
@outis Hi, just a quick hint - try to run *.js scripts with sudo. That helped me

sativ (Wed, 28 Jun 2017 09:06:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KZFeut36NZqDx8Jue) @sativ

MohammadObaid (Wed, 28 Jun 2017 09:24:02 GMT):
@zhasni Yeah I have checked my configtx.yaml. There were some mistakes but even after recreating channel configuration I am getting same error.

zhasni (Wed, 28 Jun 2017 09:29:04 GMT):
check you *cryptogen* cmd to create your *orderer.genesis.block* and you *$CHANNEL_NAME.tx*

zhasni (Wed, 28 Jun 2017 10:07:29 GMT):
oh sorry i didn't notice that we where on sdk-node channel there is no *crypto-config.yaml* so... no cryptogen !

zhasni (Wed, 28 Jun 2017 10:15:28 GMT):
on tag v1.0.0-rc1 there is a *cryptogen.yaml* !

CodeReaper (Wed, 28 Jun 2017 10:34:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xW2mALTKXM8ii5MAE) @sativ You need to show the error, do a docker pull hyperledger/fabric-ccenv:x86_64-1.0.0-rc1 first.

crmiles (Wed, 28 Jun 2017 11:28:21 GMT):
Has joined the channel.

crmiles (Wed, 28 Jun 2017 11:48:44 GMT):
@jimthematrix Just posted some questions / thoughts re: the stateful client at https://jira.hyperledger.org/browse/FAB-4563... Hoping you can have a look and let me know your thoughts... Thanks!

KSchwartz (Wed, 28 Jun 2017 12:08:25 GMT):
Has joined the channel.

KSchwartz (Wed, 28 Jun 2017 12:11:58 GMT):
Hi, I am trying to get the fabcar example running but I can't query my chaincode somehow. The docker containers are running and everything looks fine. I saw it invoked the chaincode after ./startFabric.sh successfully, but I am unable to start it from outside. Do you have an Idea whats I am doing wrong?

KSchwartz (Wed, 28 Jun 2017 12:12:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WzcafvjLQTeNRDJcA) @KSchwartz

KSchwartz (Wed, 28 Jun 2017 12:12:58 GMT):

Message Attachments

sativ (Wed, 28 Jun 2017 12:37:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wB92uj9YBz6PC2QhR) @CodeReaper Thanks, I've done that, and I've found your previous comments about increasing timeout, so that's done too. I didn't have fabric-ccenv entry in my docker_compose.yaml, so I've added it as per screenshot. Unfortunately I am getting the same error... Not sure what can be wrong

sativ (Wed, 28 Jun 2017 12:37:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wB92uj9YBz6PC2QhR) @CodeReaper Thanks, I've dont that, and I've found your previous comments about increasing timeout, so that's done too. I didn't have fabric-ccenv entry in my docker_compose.yaml, so I've added it as per screenshot. Unfortunately I am getting the same error... Not sure what can be wrong

sativ (Wed, 28 Jun 2017 12:38:23 GMT):

Message Attachments

crmiles (Wed, 28 Jun 2017 13:24:28 GMT):
Also @jimthematrix, after converting my code to create a new client and chain instance for each request, I'm suddenly seeing these errors pop up randomly... Any thoughts? E0628 09:22:56.834000000 8524 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0628 09:22:56.834000000 8524 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR

jrosmith (Wed, 28 Jun 2017 13:27:15 GMT):
@mochechan i'm not sure about the rights for creating/joining a channel and installing/instantiating a chaincode, i'm fairly positive with the default configuration and org admin can execute those processes. for invoking and querying chaincode you can enforce permissions in the actual chaincode by getting the certificate of the party submitting the invoke and checking their role. #chaincode-dev would be the best place for specifics on this @mastersingh24 posted this in the channel previously and i found it quite helpful: So something like this should work: ``` import ( "crypto/x509" "encoding/pem" "github.com/golang/protobuf/proto" "github.com/hyperledger/fabric/core/chaincode/shim" mspprotos "github.com/hyperledger/fabric/protos/msp" ) func getSigner(stub shim.ChaincodeStubInterface) { creator,err := stub.GetCreator() id := &mspprotos.SerializedIdentity{} err = proto.Unmarshal(creator, id) block, _ = pem.Decode(id.GetIdBytes()) cert,err := x509.ParseCertificate(block.Bytes) enrollID := cert.Subject.CommonName mspID := id.GetMspid() } ```

SotirisAlfonsos (Wed, 28 Jun 2017 13:38:38 GMT):
@jrosmith the `enrollID` value is basically `id.IdBytes`?

SotirisAlfonsos (Wed, 28 Jun 2017 13:38:38 GMT):
@jrosmith the `enrollID` value is basically `id.IdBytes` (`id.GetIdBytes()`)?

SotirisAlfonsos (Wed, 28 Jun 2017 13:38:38 GMT):
@jrosmith the `enrollID` value is basically `id.IdBytes` (`id.GetIdBytes()`)?

SotirisAlfonsos (Wed, 28 Jun 2017 13:38:38 GMT):
@jrosmith the `enrollID` value is basically `id.IdBytes` ( ```id.GetIdBytes()```)?

SotirisAlfonsos (Wed, 28 Jun 2017 13:38:38 GMT):
@jrosmith the `enrollID` value is basically `id.IdBytes` ( `id.GetIdBytes`)?

SotirisAlfonsos (Wed, 28 Jun 2017 13:38:38 GMT):
@jrosmith the `enrollID` value is basically `id.IdBytes` ( `id.GetIdBytes`) but in what form? Could you provide a print?

jrosmith (Wed, 28 Jun 2017 13:47:20 GMT):
@SotirisAlfonsos it should return in the form of a string, as per https://golang.org/pkg/crypto/x509/#Certificate and https://golang.org/pkg/crypto/x509/pkix/#Name

SotirisAlfonsos (Wed, 28 Jun 2017 13:54:47 GMT):
Very nice. thanks

ksachdeva (Wed, 28 Jun 2017 14:18:17 GMT):
Has joined the channel.

ksachdeva (Wed, 28 Jun 2017 14:23:14 GMT):
Hi, I have been looking at the fabric-sdk-node and was surprised to see that a project of this size is not using typescript. Usage of typescript would have helped mitigate the quirks of javascript language, provided significant tooling improvements for the library itself and the applications that would use it and most importantly better maintenance of the project as it evolves. Any particular reason to not use it ?

FabricWhiskey (Wed, 28 Jun 2017 15:15:34 GMT):
Has joined the channel.

livespotty (Wed, 28 Jun 2017 15:30:18 GMT):
Has joined the channel.

jrosmith (Wed, 28 Jun 2017 16:21:58 GMT):
hey everyone, i've registered a new user via the sdk, but when i try to submit and invoke using that user, i get the following error: ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid ``` How do I go about validating this certificate before sending the transaction proposal?

jrosmith (Wed, 28 Jun 2017 17:49:45 GMT):
@jyellick is this relevant to the issue @Asara and I had before with signing the whole message versus the byte array?

jyellick (Wed, 28 Jun 2017 17:50:32 GMT):
@jrosmith I suspect this is a clock issue. Particularly, note: `certificate has expired or is not yet valid`

jyellick (Wed, 28 Jun 2017 17:50:55 GMT):
If your CA server's clock drifts even a few seconds ahead of the orderer, then the certs will not be valid when used.

Asara (Wed, 28 Jun 2017 17:51:13 GMT):
They are all docker instances on the same box

jyellick (Wed, 28 Jun 2017 17:52:29 GMT):
Can you inspect the certificate manually? See its validity period?

Asara (Wed, 28 Jun 2017 17:58:52 GMT):
The cert seems to be valid for a year, unless we are using the wrong cert

jrosmith (Wed, 28 Jun 2017 18:14:10 GMT):
@jyellick stepping through the code now and we're noticing while sending the transaction proposal that the certificates in `userContext._identity` and `userContext._signingIdentity` are the same...not sure if this should be the case?

jyellick (Wed, 28 Jun 2017 18:26:47 GMT):
@Asara And is the issuing date/time accurate? @jrosmith I would expect the for these to be the same

jrosmith (Wed, 28 Jun 2017 18:27:20 GMT):
@jyellick yes and yes

jrosmith (Wed, 28 Jun 2017 18:27:41 GMT):
or rather, yes and that's good to hear haha

jyellick (Wed, 28 Jun 2017 18:28:39 GMT):
I'm not certain how it would not be on the same host with docker, but verify the time as observed by the orderer?

jrosmith (Wed, 28 Jun 2017 18:28:45 GMT):
soooo, when the error mentions `not yet valid`, what exactly do they mean by that? is there another step we have to take beyond registration and enrollment?

Asara (Wed, 28 Jun 2017 18:29:04 GMT):
@jyellick I can verify that all the date/times are the same on the various docker containers

jyellick (Wed, 28 Jun 2017 18:32:25 GMT):
@Asara This error actually comes from very deep inside the golang runtime and its x509 certificate validation, so this is nothing fabric specific. This is the error string associated with the `Expired` error. And I believe it is triggered by this code block: ``` // isValid performs validity checks on the c. func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *VerifyOptions) error { now := opts.CurrentTime if now.IsZero() { now = time.Now() } if now.Before(c.NotBefore) || now.After(c.NotAfter) { return CertificateInvalidError{c, Expired} } ```

Asara (Wed, 28 Jun 2017 18:34:51 GMT):
``` Validity Not Before: Jun 28 15:17:00 2017 GMT Not After : Jun 28 15:17:00 2018 GMT ```

jyellick (Wed, 28 Jun 2017 18:35:32 GMT):
And the current date/time as reported on your orderer?

jyellick (Wed, 28 Jun 2017 18:36:12 GMT):
(Or actually, perhaps on your peer, I'm not entirely sure which component is rejecting you with this message)

Asara (Wed, 28 Jun 2017 18:36:27 GMT):
``` root@ip-172-30-2-145 ~]# for i in $(docker ps -aq); do docker exec -t -i $i date; done Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:14 UTC 2017 Wed Jun 28 18:36:15 UTC 2017 Wed Jun 28 18:36:15 UTC 2017 ```

jyellick (Wed, 28 Jun 2017 18:38:17 GMT):
Definitely looks right...

jyellick (Wed, 28 Jun 2017 18:42:25 GMT):
And using this same cert, you still get this same error? (Usually, we see the error go away after a few minutes, if it is clock drift [which of course, your issue doesn't appear to be])

jyellick (Wed, 28 Jun 2017 18:43:24 GMT):
Presumably other statically generated certs not from fabric-CA work?

Asara (Wed, 28 Jun 2017 18:45:58 GMT):
So we are able to use User1 (created via `./byfn.sh -m generate`) to invoke, but not users we create using the SDK

jyellick (Wed, 28 Jun 2017 18:51:02 GMT):
Can you write the PEM bytes of the cert to a file somewhere, then we can use `openssl` to verify it?

Asara (Wed, 28 Jun 2017 18:51:49 GMT):
Yeap that is what I did

Asara (Wed, 28 Jun 2017 18:52:02 GMT):
That is where the validity blocks came from

jyellick (Wed, 28 Jun 2017 18:52:57 GMT):
Great, so let's do: ``` openssl verify -no-CApath -trusted path.to.org.ca.pem client-cert.pem ```

Asara (Wed, 28 Jun 2017 18:56:51 GMT):
``` openssl verify -no-CApath -trusted ca.pem client.pem usage: verify [-verbose] [-CApath path] [-CAfile file] [-trusted_first] [-purpose purpose] [-crl_check] [-no_alt_chains] [-attime timestamp] [-engine e] cert1 cert2 ... recognized usages: sslclient SSL client sslserver SSL server nssslserver Netscape SSL server smimesign S/MIME signing smimeencrypt S/MIME encryption crlsign CRL signing any Any Purpose ocsphelper OCSP helper timestampsign Time Stamp signing ```

jyellick (Wed, 28 Jun 2017 18:57:23 GMT):
`openssl version`?

Asara (Wed, 28 Jun 2017 18:58:21 GMT):
OpenSSL 1.0.2k-fips 26 Jan 2017

jyellick (Wed, 28 Jun 2017 18:59:32 GMT):
Ah, I am using. Let me see if I can come up with the older flags ``` $ openssl version OpenSSL 1.1.0e 16 Feb 2017 ```

jyellick (Wed, 28 Jun 2017 18:59:32 GMT):
Ah, I am using: ``` $ openssl version OpenSSL 1.1.0e 16 Feb 2017 ``` Let me see if I can come up with the older flags

jyellick (Wed, 28 Jun 2017 19:01:39 GMT):
Maybe just: ``` openssl verify -CAfile ca.pem client.pem ``` ?

Asara (Wed, 28 Jun 2017 19:02:52 GMT):
Dont think that is it, tried it with the working client (User 1)

Asara (Wed, 28 Jun 2017 19:02:57 GMT):
``` openssl verify -CAfile ca.pem client.pem client.pem: CN = User1 error 20 at 0 depth lookup:unable to get local issuer certificate ```

jyellick (Wed, 28 Jun 2017 19:03:19 GMT):
Sorry, yes, it took me several tries to come up with the magic first one I pasted

jyellick (Wed, 28 Jun 2017 19:04:19 GMT):
Are you using an intermediate CA?

Asara (Wed, 28 Jun 2017 19:04:32 GMT):
Nope

jyellick (Wed, 28 Jun 2017 19:12:05 GMT):
``` [yellickj@jmobile first-network]$ openssl verify -no-CApath -trusted crypto-config/ordererOrganizations/example.com/users/Admin\@example.com/msp/cacerts/ca.example.com-cert.pem crypto-config/ordererOrganizations/example.com/users/Admin\@example.com/msp/signcerts/Admin\@example.com-cert.pem crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem: OK [yellickj@jmobile first-network]$ ```

jyellick (Wed, 28 Jun 2017 19:12:09 GMT):
Oops

jyellick (Wed, 28 Jun 2017 19:12:10 GMT):
Wrong one

jyellick (Wed, 28 Jun 2017 19:12:28 GMT):
``` $ openssl verify -CAfile crypto-config/ordererOrganizations/example.com/users/Admin\@example.com/msp/cacerts/ca.example.com-cert.pem crypto-config/ordererOrganizations/example.com/users/Admin\@example.com/msp/signcerts/Admin\@example.com-cert.pem crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem: OK [yellickj@jmobile first-network]$ ```

jyellick (Wed, 28 Jun 2017 19:13:27 GMT):
So, for the certs in my `crypto-config` from the `fabric-samples/first-network` I seem to be able to verify using `openssl verify -CAfile ca.pem client.pem`

Asara (Wed, 28 Jun 2017 19:14:45 GMT):
Any reason you are doing that against the orderer's certs and not the peer? I was under the impression all of these interactions occur between the peer and the sdk

jyellick (Wed, 28 Jun 2017 19:15:26 GMT):
Ah, no reason, the path was just a little shorter and more readable

Asara (Wed, 28 Jun 2017 19:15:47 GMT):
:)

Asara (Wed, 28 Jun 2017 19:15:53 GMT):
_is going CSI on this issue_

jyellick (Wed, 28 Jun 2017 19:16:16 GMT):
``` [yellickj@jmobile first-network]$ openssl verify -CAfile crypto-config/peerOrganizations/org2.example.com/users/User1\@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem crypto-config/peerOrganizations/org2.example.com/users/User1\@org2.example.com/msp/signcerts/User1\@org2.example.com-cert.pem crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/signcerts/User1@org2.example.com-cert.pem: OK [yellickj@jmobile first-network]$ ```

Asara (Wed, 28 Jun 2017 19:22:20 GMT):
@jyellick okay

Asara (Wed, 28 Jun 2017 19:22:25 GMT):
so I think its a key issue

Asara (Wed, 28 Jun 2017 19:22:27 GMT):
I was using

Asara (Wed, 28 Jun 2017 19:22:34 GMT):
crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

Asara (Wed, 28 Jun 2017 19:22:37 GMT):
as the CA

Asara (Wed, 28 Jun 2017 19:23:00 GMT):
instead of crypto-config/peerOrganizations/org1.example.com/users/User1\@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem

Asara (Wed, 28 Jun 2017 19:23:23 GMT):
Why wouldn't those be the same cert? For my edification. Wouldn't the CA for both be the same?

Asara (Wed, 28 Jun 2017 19:25:15 GMT):
I'm actually confused. All we changed for the test between User1 and NewUser was the user itself. The keys were all kept the same, and the users were registered the same.

jyellick (Wed, 28 Jun 2017 19:25:16 GMT):
Ah. So, it's bad practice to use the same issuing CA for both 'signing certs' and TLS certs.

jyellick (Wed, 28 Jun 2017 19:26:38 GMT):
I think the idea is, that the TLS negotiation could be used to trick the user into signing something unaware. I'm not positive about the particular attack, so don't take it as gospel, but, this is why there are the separate TLS and msp cert structures (this was a change)

Asara (Wed, 28 Jun 2017 19:27:35 GMT):
So why was User1 able to use the TLS ca.crt and invoke against the chaincode?

jyellick (Wed, 28 Jun 2017 19:29:37 GMT):
I'm not certain I am following. When user1 wants to invoke a chaincode. He takes his cert, signs a proposal, and encodes it into protobuf. Then, he opens a connection to the peer, and validates using the TLS ca.cert that he is indeed talking with a peer controlled by that org (rather than someone trying to MITM intercept his proposal). The user then sends the proposal, and the peer validates that the proposal was signed by a certificate which was issued by the user's CA. This CA is, in general, not the TLS CA we referred to earlier.

jyellick (Wed, 28 Jun 2017 19:31:14 GMT):
The error you were seeing, is from this last step, The peer is attempting to verify that the user's cert is signed by a valid CA authority (as defined by the MSP), and it is stating that the certificate encoded into the proposal is not valid. It says that this is because the cert is expired or not yet valid.

Asara (Wed, 28 Jun 2017 19:32:23 GMT):
Okay

Asara (Wed, 28 Jun 2017 19:32:26 GMT):
This makes sense

Asara (Wed, 28 Jun 2017 19:32:26 GMT):
now

Asara (Wed, 28 Jun 2017 19:32:33 GMT):
I updated the cacert in my test

Asara (Wed, 28 Jun 2017 19:32:34 GMT):
from before

Asara (Wed, 28 Jun 2017 19:32:34 GMT):
and

Asara (Wed, 28 Jun 2017 19:32:43 GMT):
``` openssl verify -CAfile ca.pem client.pem client.pem: OK ```

Asara (Wed, 28 Jun 2017 19:33:04 GMT):
Let me test if this is the same case with NewUser

Asara (Wed, 28 Jun 2017 19:33:27 GMT):
And it is...

Asara (Wed, 28 Jun 2017 19:33:35 GMT):
So the NewUser key also passes that verification.

Asara (Wed, 28 Jun 2017 19:33:57 GMT):
Against the MSP CA

jyellick (Wed, 28 Jun 2017 19:34:06 GMT):
Okay, great. Not too surprising, but worth checking.

Asara (Wed, 28 Jun 2017 19:34:18 GMT):
I don't need to pass the MSP CA in my invoke request do i?

jyellick (Wed, 28 Jun 2017 19:34:28 GMT):
You do not.

Asara (Wed, 28 Jun 2017 19:34:36 GMT):
I assume not since User1 works but NewUser doesn't.

Asara (Wed, 28 Jun 2017 19:34:45 GMT):
Alright cool. So now I am even more clueless :)

jyellick (Wed, 28 Jun 2017 19:35:23 GMT):
And just to double check, it validated using the same CA?

Asara (Wed, 28 Jun 2017 19:35:29 GMT):
Yeap

jyellick (Wed, 28 Jun 2017 19:38:28 GMT):
I am also quickly running out of ideas. How did you get the cert? Are you getting it from the logs via: ``` export HFC_LOGGING='{"debug":"console"}' ``` Or are you getting it via: ``` logger.info(' user info :: %s', client.getUserContext().toString()); ``` Or perhaps some other way?

jrosmith (Wed, 28 Jun 2017 19:42:17 GMT):
@jyellick threw a debugger in the actual fabric-client code and looking at the userContext being passed along

jyellick (Wed, 28 Jun 2017 19:42:28 GMT):
Ah, probably even better

jyellick (Wed, 28 Jun 2017 19:42:53 GMT):
Just trying to think if somehow the user context could be getting switched, or the creator bytes otherwise corrupted. But clearly I am reaching

jrosmith (Wed, 28 Jun 2017 19:43:47 GMT):
so when submitting invokes i've checked the userContext in both situations, they're definitely set to User1 and NewUser

jrosmith (Wed, 28 Jun 2017 19:47:39 GMT):
not sure if this a helpful reference, but here is how we're going about registering users: ``` var registerAndEnrollUser = function(user, userOrg) { return registerUser(user, userOrg) .then( (secret) => { return enrollUser(user.enrollmentID, userOrg, secret) }, (err) => { throw err } ) }; var registerUser = function(user, userOrg) { var username = user.enrollmentID; var caClient = caClients[userOrg]; return fabric_utils.getAdminUser(userOrg) .then( (adminUser) => { if (!user.affiliation) { user.affiliation = userOrg + '.department1' } return caClient.register(user, adminUser) }, (err) => { throw new Error("Error getting admin for org " + userOrg) } ) .then( (secret) => { return secret }, (err) => { // TODO: Handle users who are already registered but not enrolled } ) } var enrollUser = function(username, userOrg, secret) { var member var caClient = caClients[userOrg]; var client = fabric_utils.getClientForOrg(userOrg); return caClient.enroll( { enrollmentID: username, enrollmentSecret: secret } ) .then( (message) => { if (message && typeof message === 'string' && message.includes( 'Error:')) { throw new Error(message); } member = new User(username); member._enrollmentSecret = secret; return member.setEnrollment(message.key, message.certificate, fabric_utils.getMspID(userOrg)); } ) .then( () => { client.setUserContext(member); return member; }, (err) => { throw new Error("Error setting enrollment: " + err) } ) } ``` its just a broken down version of `getRegisteredUsers` from `balance_transfer`. Works fine for the pre-registered user but not a new user

jrosmith (Wed, 28 Jun 2017 19:48:41 GMT):
`fabric_utils` is the equivalent of `helper` in balance_transfer

jyellick (Wed, 28 Jun 2017 19:49:43 GMT):
When you've gotten the certificate bytes, this was from inspecting the user1/newuser contexts?

jyellick (Wed, 28 Jun 2017 19:49:46 GMT):
(with the debugger)

jrosmith (Wed, 28 Jun 2017 19:49:52 GMT):
yep

jyellick (Wed, 28 Jun 2017 19:50:35 GMT):
Still grasping at straws here, but could you confirm, that the cert bytes for User1 are the same bytes as the ones you are verifying on the filesystem?

Asara (Wed, 28 Jun 2017 19:52:28 GMT):
It should match `crypto-config/peerOrganizations/org1.example.com/users/User1\@org1.example.com/msp/signcerts/User1\@org1.example.com-cert.pem` correct?

jyellick (Wed, 28 Jun 2017 19:53:39 GMT):
Correct

Asara (Wed, 28 Jun 2017 19:54:37 GMT):
Hm. Well it looks to be different.

jyellick (Wed, 28 Jun 2017 19:56:04 GMT):
Okay. So, the `creator` bytes are not strictly just a cert.

jrosmith (Wed, 28 Jun 2017 19:56:42 GMT):
what should we be grabbing from the userContext object?

jyellick (Wed, 28 Jun 2017 19:57:00 GMT):
They are actually marshaled `msp.SerializedIdentity`

jyellick (Wed, 28 Jun 2017 19:57:54 GMT):
So, you can unmarshal the serialized identity, then extract its `id_bytes`

jyellick (Wed, 28 Jun 2017 19:58:01 GMT):
And this should be the `.pem`

jyellick (Wed, 28 Jun 2017 19:58:37 GMT):
The reason why I asked, is because if you are getting plain `.pem` bytes in the `creator` field for your `NewUser`, then the peer will try to deserialize them, and silently corrupt the cert.

Asara (Wed, 28 Jun 2017 19:59:08 GMT):
But we get a plain `.pem` for both `NewUser` and `User1`

jyellick (Wed, 28 Jun 2017 19:59:35 GMT):
Oh, I thought you said the bytes were different for `User1`?

Asara (Wed, 28 Jun 2017 20:01:13 GMT):
They are

Asara (Wed, 28 Jun 2017 20:02:15 GMT):
What I meant was the `userContext` of both `NewUser` and `User1` are in plaintext as a .pem formatted text

Asara (Wed, 28 Jun 2017 20:02:15 GMT):
What I meant was the `userContext` of both `NewUser` and `User1` are in plaintext as a .pem formatted string

jyellick (Wed, 28 Jun 2017 20:03:16 GMT):
Oh, I see. I thought you were looking at the bytes encoded as the `creator` field of the `ChannelHeader` message.

Asara (Wed, 28 Jun 2017 20:03:24 GMT):
Nope sorry

jyellick (Wed, 28 Jun 2017 20:03:51 GMT):
Okay, so... I guess take a look with `openssl` at the User1 cert from the debugger and from the filesystem and see how they're different?

ericmvaughn (Wed, 28 Jun 2017 20:08:58 GMT):
@jrosmith I may have seen the same problem you are having. It turned out that if the new user was registered and enrolled within the first 4 minutes after creating a network then that user would always fail with the `x509: certificate has expired or is not yet valid` error.

Asara (Wed, 28 Jun 2017 20:10:23 GMT):
@jyellick I mean they are different keys, but the big difference is `Subject: C=US, ST=California, L=San Francisco, CN=User1@org1.example.com` on the disk while `Subject: CN=User1` via `userContext`

jrosmith (Wed, 28 Jun 2017 20:11:12 GMT):
@ericmvaughn i'll reset my stuff and see if that causes it, thanks for the heads up!

Asara (Wed, 28 Jun 2017 20:13:53 GMT):
@ericmvaughn just to be sure (so we don't waste time), 4 minutes after creating the network as in the fabric, or after the channel is created?

ericmvaughn (Wed, 28 Jun 2017 20:15:02 GMT):
@Asara It's 4 to 5 minutes after creating the network, building the peers, orderer, and CA.

Asara (Wed, 28 Jun 2017 20:15:17 GMT):
Alright cool, thanks :)

ericmvaughn (Wed, 28 Jun 2017 20:16:16 GMT):
I opened a jira for it, FAB-4825

Asara (Wed, 28 Jun 2017 20:36:32 GMT):
@ericmvaughn that seems to have been it

Asara (Wed, 28 Jun 2017 20:36:50 GMT):
@ericmvaughn @jyellick thanks for all the help! got a lot of understanding as to how things are actually working

jrosmith (Wed, 28 Jun 2017 20:37:15 GMT):
yeah thanks guys! helped us regain our sanity haha

jyellick (Wed, 28 Jun 2017 20:37:45 GMT):
@ericmvaughn Thank you very much for coming in and saving the day, was really running out of ideas

ericmvaughn (Wed, 28 Jun 2017 20:37:47 GMT):
you're welcome, good luck

blockberk (Wed, 28 Jun 2017 20:45:47 GMT):
Has joined the channel.

Asara (Wed, 28 Jun 2017 21:02:19 GMT):
Might not be the place to ask, but we crashed out our chaincode

Asara (Wed, 28 Jun 2017 21:02:28 GMT):
when we try to reinstantiate it, it says the chaincode still exists

Asara (Wed, 28 Jun 2017 21:02:45 GMT):
but the docker container is `Exited`

xiven (Wed, 28 Jun 2017 21:16:40 GMT):
anyone had any success with instantiating a chaincode with a 3rd party library?

FengChen_1982 (Thu, 29 Jun 2017 02:43:07 GMT):
@here In the fabcar sample, the test code using the files inside network/creds folder as credentials to access the peer and the orderer? But where exactly are these files come from? What's exactly funtionality of each file?

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

jimthematrix (Thu, 29 Jun 2017 07:06:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pBgbpj3JWW7KrNJYD) @crmiles thanks Curtis, I responded in the JIRA.

AlexanderEx123 (Thu, 29 Jun 2017 08:12:43 GMT):
Has joined the channel.

AlexanderEx123 (Thu, 29 Jun 2017 08:13:47 GMT):
@FengChen_1982 JSON file is as result of function saveUserToStateStore()

MartinC (Thu, 29 Jun 2017 09:33:52 GMT):
I couldn't spot it in the readme.md for fabric-sdk-node, please could someone point me at the doc that describes how to raise minor doc defects? I've found a mismatch in what sendTransaction(TransactionRequest) expects a property to be called versus what the doc says the TransactionRequest properties should be.

MartinC (Thu, 29 Jun 2017 09:38:54 GMT):
Is it just raise a new JIRA issue with the details?

MohammadObaid (Thu, 29 Jun 2017 15:09:44 GMT):
Hi in core fabric we set endorsement policy at the time of instantiating chaincode. However in sdk, we dont set . If I want to set endorsement policy, should this be the query? `curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes \ -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051"], "chaincodeName":"mycc", "chaincodeVersion":"v0", "functionName":"init", "args":["a","100","b","200"] }'`

chaitanya (Thu, 29 Jun 2017 15:55:32 GMT):
Hi, I have a question about setting up a BlockEventListener using the NodeSDK. I see from the documentation given here https://fabric-sdk-node.github.io/EventHub.html, that I need to set peerAdress, then Register {Block, Tx, Chaincode} Event and then finally `connect()`. However the pem file required in the second parameter of the call to `setPeerAddr()`, is where I'm stuck. I have enrolled a user using `getOrgAdmin()` and tried passing in the `pem` file of that user... Could you please point me to an example out there, or let me know what I'm missing? @bretharrison

bretharrison (Thu, 29 Jun 2017 16:05:21 GMT):
@chaitanya The pem being used here is for the TLS, check the `fabric-sdk-node/test/integration/events.js`

MohammadObaid (Thu, 29 Jun 2017 16:27:58 GMT):
Hey. In core fabric we define endorsement policy when we instantiate chaincode but in nde-sdk , we dont. Which file contain the default policy ?

MohammadObaid (Thu, 29 Jun 2017 16:27:58 GMT):
Hey. In core fabric we define endorsement policy when we instantiate chaincode but in nde-sdk , we dont. Which file contain the default policy ?

jrosmith (Thu, 29 Jun 2017 17:14:53 GMT):
@xiven i've been able to install and instantiate chaincode that is not included under fabric_samples

jrosmith (Thu, 29 Jun 2017 17:21:09 GMT):
is that what you're asking or are you asking about instantiating a chaincode that uses a package that is not included in go's standard library and is not fabric related?

gen_el (Thu, 29 Jun 2017 17:43:10 GMT):
Has joined the channel.

gen_el (Thu, 29 Jun 2017 17:43:29 GMT):
@here Are there typings files for the node sdk?

zhasni (Thu, 29 Jun 2017 17:43:49 GMT):
loooool

holocron (Thu, 29 Jun 2017 17:44:13 GMT):
:weary: @gen_el you were just asked not to use @_here

holocron (Thu, 29 Jun 2017 17:44:20 GMT):
i don't even know what your questions means

holocron (Thu, 29 Jun 2017 17:44:20 GMT):
i don't even know what your question means

gen_el (Thu, 29 Jun 2017 17:45:27 GMT):
I guess this channel is a lot more active then. I will desist.

holocron (Thu, 29 Jun 2017 17:45:54 GMT):
can you restate your question, what do you mean by typings files?

gen_el (Thu, 29 Jun 2017 17:49:18 GMT):
How do i enable intellisense for the fabric-client package in vscode?

gen_el (Thu, 29 Jun 2017 17:57:25 GMT):
@holocron Never mind, its working now. For some other libraries, i've had to explicitly add the typescript definition file.

holocron (Thu, 29 Jun 2017 17:57:42 GMT):
cool

holocron (Thu, 29 Jun 2017 17:58:24 GMT):
glad to hear it @gen_el ... i don't know anything about microsoft products

shanlusun (Fri, 30 Jun 2017 01:36:00 GMT):
@holocron you already know vscode is from microsoft.:grinning:

holocron (Fri, 30 Jun 2017 03:49:07 GMT):
@shanlusun I know how to google

shanlusun (Fri, 30 Jun 2017 03:49:46 GMT):
@holocron Then you know almost everything, right ? :grinning:

holocron (Fri, 30 Jun 2017 03:52:09 GMT):
i know enough to know i don't know anything (and i'm not about to start learning microsoft again)

chaitanya (Fri, 30 Jun 2017 06:56:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QKZZqzSEAAdK24kbp) @bretharrison I'm absolutely new to the NodeSDK. Could you point me to where this pem file resides?

zhasni (Fri, 30 Jun 2017 07:22:28 GMT):
`find /opt/hyperledger/fabric-sdk-node/ -name *.pem`

zhasni (Fri, 30 Jun 2017 07:22:28 GMT):
`find . -name *.pem`

zhasni (Fri, 30 Jun 2017 07:22:28 GMT):
``` cd YOUR_PATH_TO_FABRIC_SDK_NODE find . -name *.pem ```

SanthoshKumarMK (Fri, 30 Jun 2017 07:28:37 GMT):
I have taken balance-transfer example and packaged node-sdk as an image. I have added node-sdk image reference in the compose file and it is talking to CA, Peer and orderer nodes successfully using service names. Enroll user and join channel API's are working and getting response from it but when i post "Join channel" request i am not getting any response but the peers are successfully joined to the channel, this i have confirmed with "Query Channels" API. I am getting following message in the console when join channel requested is posted.

SanthoshKumarMK (Fri, 30 Jun 2017 07:28:37 GMT):
I have taken balance-transfer example and packaged node-sdk as an image. I have added node-sdk image reference in the compose file and it is talking to CA, Peer and orderer nodes successfully using service names. Enroll user and join channel API's are working and getting response from it but when i post "Join channel" request i am not getting any response but the peers are successfully joined to the channel, this i have confirmed with "Query Channels" API. I am getting following message in the console when join channel requested is posted. peers are successfully joined to the channel but the success message is not reaching to node-sdk image. Please suggest on this. Thanks

SanthoshKumarMK (Fri, 30 Jun 2017 07:28:37 GMT):
I have taken balance-transfer example and packaged node-sdk as an image. I have added node-sdk image reference in the compose file and it is talking to CA, Peer and orderer nodes successfully using service names. Enroll user and join channel API's are working and getting response from it but when i post "Join channel" request i am not getting any response but the peers are successfully joined to the channel, this i have confirmed with "Query Channels" API. I am getting following message in the console when join channel requested is posted. peers are successfully joined to the channel but the success message is not reaching to node-sdk image. Please suggest on this. Same issue for Invoke Request as well, balance has transferred from a to b but it is throwing "Failed to order the transaction. Error code: undefined" , i confirmed this using "Query API". Thanks

SanthoshKumarMK (Fri, 30 Jun 2017 07:29:13 GMT):

Message Attachments

vladyslavmunin (Fri, 30 Jun 2017 09:09:57 GMT):
Has joined the channel.

vladyslavmunin (Fri, 30 Jun 2017 09:10:18 GMT):
Hi , can I use node sdk on windows?

shanlusun (Fri, 30 Jun 2017 12:36:25 GMT):
@vladyslavmunin of course you can.

bretharrison (Fri, 30 Jun 2017 12:45:34 GMT):
@chaitanya Please have a look at the `fabric-sdk-node/test/integration/events.js` test file. The crypto material was generated by `cryptogen` http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#crypto-generator

gen_el (Fri, 30 Jun 2017 14:28:31 GMT):
Hi! How do i create an asset that can not be updated? Its an asset that exists as long a channel exists.

sativ (Fri, 30 Jun 2017 15:15:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Zp76voPz5fFJ6LsQS) @MartinC Hi, I'm running itno the same problem, and can't figure it out. Did you manage to fix it? thanks!

qizhang (Fri, 30 Jun 2017 17:08:20 GMT):
Hello, anyone has used the PTE https://github.com/dongmingh/v1performance?

holocron (Fri, 30 Jun 2017 17:09:31 GMT):
@qizhang :raised_back_of_hand_tone1:

MohammadObaid (Sat, 01 Jul 2017 09:55:50 GMT):
@bretharrison I am having hard time implementing node-sdk api's . For example I want to use this class and change endorsement policy https://fabric-sdk-node.github.io/EndorsementPolicy.html how would I make curl query ?

rmohta (Sun, 02 Jul 2017 16:36:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JjMhXwHvFJHQDLwC2) @MohammadObaid Are you trying to use that during cc installation?

rmohta (Sun, 02 Jul 2017 16:36:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JjMhXwHvFJHQDLwC2) @MohammadObaid Are you trying to use that during cc installation? May be this will help - https://github.com/hyperledger/fabric-sdk-node/blob/9dc64907af565375c21bef8dd8c7ed5953bf1965/fabric-client/lib/Channel.js#L1081

antoniovassell (Sun, 02 Jul 2017 21:08:26 GMT):
https://stackoverflow.com/questions/44874992/converting-hyperledger-fabric-query-block-responses-to-human-readable-form

antoniovassell (Sun, 02 Jul 2017 21:09:15 GMT):
Hey there, anyone can answer this?

jeffgarratt (Mon, 03 Jul 2017 00:46:14 GMT):
configtxgen -inspectBlock

MartinC (Mon, 03 Jul 2017 07:38:15 GMT):
@sativ I do have it working now although I don't remember what the precise problem was. My working config uses a Client configured with a User that has "cryptoContent" set to either a User or Admin's msp keystore and signedcerts. The peer config uses the peer org's CA pem e.g. `.../crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem` it also sets opts['ssl-target-name-override'] = "peer0" which I believe allows the client to ignore the server is 0.0.0.0 (when running local docker containers) and pretend it is "peer0" when doing the certificate checks. I hope that helps you get further.

akdj (Mon, 03 Jul 2017 08:05:08 GMT):
Hello, I read the balance transfer example code, and i didn't find with which function, we can sign transactions? I noticed that we can add endorsement-policy when we instantiate the chaincode with `sendInstantiateProposal` but how we can control "signing" and "validating" action? I also saw that when we create channel, it's signing the channel config, what does it exactly mean ? it here we define who sign automatically transactions in the channel?

akdj (Mon, 03 Jul 2017 08:05:08 GMT):
Hello, I read the balance transfer example code, and i didn't find with which function, we can sign transactions? I noticed that we can add endorsement-policy when we instantiate the chaincode with `sendInstantiateProposal` , but how we can control "signing" and "validating" action? I also saw that when we create channel, it's signing the channel config, what does it exactly mean ? it here we define who sign automatically transactions in the channel? and is it the target peers in `sendInstantiateProposal` and `sendTransactionProposal` which will sign? I mean, if I defined

akdj (Mon, 03 Jul 2017 08:05:08 GMT):
Hello, I read the balance transfer example code, and i didn't find with which function, we can sign transactions? I noticed that we can add endorsement-policy when we instantiate the chaincode with `sendInstantiateProposal` , but how we can control "signing" and "validating" action? I also saw that when we create channel, it's signing the channel config, what does it exactly mean ? it here we define who sign automatically transactions in the channel? and is it the target peers in `sendInstantiateProposal` and `sendTransactionProposal` which will sign? I mean, if I add peer to `target`, this peer will certainly sign all transactions that it received?

habpygo (Mon, 03 Jul 2017 08:07:41 GMT):
Has left the channel.

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

rishabh1102 (Mon, 03 Jul 2017 09:27:41 GMT):
Hey all, how can I issue multiple transactions in parallel using the NodeJS sdk? Currently each invoke is takes me around 2 seconds, which is way too much time

MartinC (Mon, 03 Jul 2017 09:45:01 GMT):
So long as the sdk function you use returns a Promise, you should just be able to use Promise.all(). For example do var promiseN = sdkFunction().. for each request, then use `Promise.all([promiseN, ...]).then(...)` to continue processing once all complete. If a different user context is needed for each transaction a new Client instance will be needed for each request.

rishabh1102 (Mon, 03 Jul 2017 09:54:36 GMT):
Thanks @MartinC, I'm not very thorough with node JS, is there any sample code where this is happening?

MartinC (Mon, 03 Jul 2017 09:58:57 GMT):
@rishabh1102 I don't have an example of doing it with the sdk but for a Promise.all() general example this page gives a good description. https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise/all

anik (Mon, 03 Jul 2017 10:00:48 GMT):

Message Attachments

anik (Mon, 03 Jul 2017 10:01:03 GMT):
getting error while running endEndIT on fabric-beta

rohitrocket (Mon, 03 Jul 2017 11:31:09 GMT):
Has joined the channel.

rohitrocket (Mon, 03 Jul 2017 11:31:37 GMT):
can anyone help me in setting up hyperledger on laptop /

rohitrocket (Mon, 03 Jul 2017 11:31:38 GMT):
?

Styxt (Mon, 03 Jul 2017 11:33:00 GMT):
Has joined the channel.

Styxt (Mon, 03 Jul 2017 11:41:32 GMT):
Hi all, can anyone tell me if/how i can run the sdk on a different host than the network? I'm trying to run the sdk on one host and the network (from the first application example) on another.

akdj (Mon, 03 Jul 2017 12:13:32 GMT):
@Styxt you need to copy the crypto config file to the "sdk" machine, then, write your own application, or use the balance transfer example, need also modify the network-config.json which is in the balance-transfer folder

akdj (Mon, 03 Jul 2017 12:13:32 GMT):
@Styxt you need to copy the crypto config files to the "sdk" machine, then, write your own application, or use the balance transfer example, need also modify the network-config.json which is in the balance-transfer folder

Styxt (Mon, 03 Jul 2017 12:23:08 GMT):
@akdj i am talking about this example https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html - do you mean the crypto-config folder? (i did not find a file - only the folder)

akdj (Mon, 03 Jul 2017 12:26:48 GMT):
Hmm, yes I mean folder, and all the crypto files this, but if it is this example, I think you didn't need the crypto-config folder( it is in network folder) , just the cred folder, it is ok for invoke.js and query.js

akdj (Mon, 03 Jul 2017 12:26:48 GMT):
Hmm, yes I mean folder, and all the crypto files in this, but if it is this example, I think you didn't need the crypto-config folder( it is in network folder) , just the cred folder, it is ok for invoke.js and query.js

akdj (Mon, 03 Jul 2017 12:26:48 GMT):
Hmm, yes I mean folder, and all the crypto files in this, but if it is this example, I think you didn't need the crypto-config folder( it is in network folder) , just the cred folder, it is ok for invoke.js and query.js @Styxt

Styxt (Mon, 03 Jul 2017 12:50:08 GMT):
I copied the folders (both cred and crypto-config) but i am getting the following errors when i try to run the query.js: ``` error: [Client.js]: Failed to load user "PeerAdmin" from local key value store: Error: Error: Private key missing form key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:251:11) error: [Client.js] Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: Error: Private key missing form key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:251:11) Caught Error Error: Private key missing form key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:251:11) ```

Styxt (Mon, 03 Jul 2017 12:50:08 GMT):
I copied the folders (both cred and crypto-config) but i am getting the following errors when i try to run the query.js: ``` error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: Error: Private key missing form key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:251:11) error: [Client.js] Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: Error: Private key missing form key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:251:11) Caught Error Error: Private key missing form key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:251:11) ```

akdj (Mon, 03 Jul 2017 13:00:16 GMT):
yea

akdj (Mon, 03 Jul 2017 13:00:16 GMT):
yes

akdj (Mon, 03 Jul 2017 13:00:45 GMT):
@Styxt did you read the startFabric.sh ?

akdj (Mon, 03 Jul 2017 13:01:41 GMT):
before everything, in the script, it copies the cred's files, to another folder

akdj (Mon, 03 Jul 2017 13:02:24 GMT):
``` if [ ! -d ~/.hfc-key-store/ ]; then mkdir ~/.hfc-key-store/ fi cp $PWD/network/creds/* ~/.hfc-key-store/ ```

akdj (Mon, 03 Jul 2017 13:04:02 GMT):
because in the invoke.js and query.js, it defined to find keys in .hfc-key-store folder

Styxt (Mon, 03 Jul 2017 13:14:09 GMT):
Now it works - thanks a lot

akdj (Mon, 03 Jul 2017 13:20:47 GMT):
you are welcome :)

vladyslavmunin (Mon, 03 Jul 2017 13:24:49 GMT):
Hi , I got error during run startFabric.sh

vladyslavmunin (Mon, 03 Jul 2017 13:24:52 GMT):
2017-07-03 13:23:22.953 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /etc/hyperledger/fabric/C:/Program Files/Git/etc/hyperledger/msp/users/Admin@org1.example.com/msp folder

tejasborawake (Mon, 03 Jul 2017 14:05:41 GMT):
Hi, I am trying to add ORG3 in balance transfer example for RC2 version. I am getting following error: 2017/07/03 11:34:47 [DEBUG] Registration of 'allen' failed: Failed getting affiliation 'org3.department1': sql: no rows in result set 2017/07/03 11:34:47 [INFO] 192.168.0.1:38730 - "POST /api/v1/register" 0 Can someone help me in understanding how can i write rows of org3 in in sql?

MartinC (Mon, 03 Jul 2017 14:40:08 GMT):
@jimthematrix or anyone else that knows the answer. I want to raise a requirement against the node sdk, how do I do that?

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

mastersingh24 (Mon, 03 Jul 2017 17:24:58 GMT):
@MartinC - You can enter requirements in JIRA - https://jira.hyperledger.org

mastersingh24 (Mon, 03 Jul 2017 17:26:56 GMT):
You should see a "Create" link/button at the top once you log in. Then: Project: Fabric Issue Type: New Feature or Improvement (depending on the requirement) Component: fabric-sdk-node Affects Version: 1.0.0-rc1

mavericklam (Tue, 04 Jul 2017 01:58:56 GMT):
Has joined the channel.

mavericklam (Tue, 04 Jul 2017 02:00:45 GMT):
hi all, is there any documentation to explain what the complete flow is to do operation on the blockchain? I read the sample codes but found that there are many thing required by the client and the code is complicated to understand. Any help?

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

jaswanth (Tue, 04 Jul 2017 06:14:51 GMT):
Has joined the channel.

jaswanth (Tue, 04 Jul 2017 06:18:13 GMT):
can we create multiple channels for balance transfer... cause i tried it and got `BAD_REQUEST` error.. can anyone suggest how to create an extra channel in the network

Haojun (Tue, 04 Jul 2017 07:31:00 GMT):
Has joined the channel.

SotirisAlfonsos (Tue, 04 Jul 2017 07:50:48 GMT):
@jaswanth what i did i believe the simple way out is: create `.block` and `.tx` files for the new channel, create crypto material, change the `docker-compose` file, create new `config.json` and `network-config.json`, start another api in a new port for that channel and feed it with the new config files.

MartinC (Tue, 04 Jul 2017 07:56:42 GMT):
@mastersingh24 Thank you

jaswanth (Tue, 04 Jul 2017 08:43:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=v5A27aj6YPMGhrfM4) @SotirisAlfonsos Thank you ..I will try that

akdj (Tue, 04 Jul 2017 12:00:54 GMT):
Hello, I read the balance transfer example code, and i didn't find with which function, we can sign transactions? I noticed that we can add endorsement-policy when we instantiate the chaincode with `sendInstantiateProposal` , but how we can control "signing" and "validating" action? I also saw that when we create channel, it's signing the channel config, what does it exactly mean ? it here we define who sign automatically transactions in the channel? and is it the target peers in `sendInstantiateProposal` and `sendTransactionProposal` which will sign? I mean, if I add peer to `target`, this peer will certainly sign all transactions that it received?

akdj (Tue, 04 Jul 2017 12:02:25 GMT):
need to find out the full steps about how to sign a transaction with sdk

VamsiKrishnak (Tue, 04 Jul 2017 12:45:32 GMT):
@MartinC @jimthematrix @muralisr hii ,i am trying instantiate the chaincode by following the site:"https://github.com/asararatnakar/fabric_v1_Chaincode_instructions/blob/master/how-2-test-cc-non-vagrant.md" but iam getting the following error: 2017-07-04 18:08:01.333 IST [msp] getMspConfig -> INFO 001 intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/sampleconfig/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/sampleconfig/msp/intermediatecerts: no such file or directory] 2017-07-04 18:08:01.334 IST [msp] getMspConfig -> INFO 002 crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/sampleconfig/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/sampleconfig/msp/crls: no such file or directory] Error: unknown shorthand flag: 'p' in -p Usage: peer chaincode instantiate [flags] Flags: -C, --channelID string The channel on which this command should be executed (default "testchainid") -c, --ctor string Constructor message for the chaincode in JSON format (default "{}") -E, --escc string The name of the endorsement system chaincode to be used for this chaincode -l, --lang string Language the chaincode is written in (default "golang") -n, --name string Name of the chaincode -P, --policy string The endorsement policy associated to this chaincode -v, --version string Version of the chaincode specified in install/instantiate/upgrade commands -V, --vscc string The name of the verification system chaincode to be used for this chaincode Global Flags: --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint --logging-level string Default logging level and overrides, see core.yaml for full syntax -o, --orderer string Ordering service endpoint --test.coverprofile string Done (default "coverage.cov") --tls Use TLS when communicating with the orderer endpoint

MartinC (Tue, 04 Jul 2017 12:50:48 GMT):
@VamsiKrishnak From this message `Error: unknown shorthand flag: 'p' in -p` and the usage, I would guess the command used -p (lowercase) in the command instead of -P (uppercase)?

VamsiKrishnak (Tue, 04 Jul 2017 12:57:37 GMT):
@MartinC yeah martin, i tried both if i use upper case the result is:

VamsiKrishnak (Tue, 04 Jul 2017 12:57:48 GMT):
@MartinC root@vamsi-VirtualBox:/opt/gopath/src/github.com/hyperledger/fabric# ./build/bin/peer chaincode instantiate -o 127.0.0.1:7050 -n mycc -v 1.0 -P github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args":["init","a", "100", "b","200"]}' 2017-07-04 18:26:39.700 IST [msp] getMspConfig -> INFO 001 intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/sampleconfig/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/sampleconfig/msp/intermediatecerts: no such file or directory] 2017-07-04 18:26:39.701 IST [msp] getMspConfig -> INFO 002 crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/sampleconfig/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/sampleconfig/msp/crls: no such file or directory] 2017-07-04 18:26:39.734 IST [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-07-04 18:26:39.735 IST [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc Error: Invalid policy github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 Usage: peer chaincode instantiate [flags] Flags: -C, --channelID string The channel on which this command should be executed (default "testchainid") -c, --ctor string Constructor message for the chaincode in JSON format (default "{}") -E, --escc string The name of the endorsement system chaincode to be used for this chaincode -l, --lang string Language the chaincode is written in (default "golang") -n, --name string Name of the chaincode -P, --policy string The endorsement policy associated to this chaincode -v, --version string Version of the chaincode specified in install/instantiate/upgrade commands -V, --vscc string The name of the verification system chaincode to be used for this chaincode Global Flags: --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint --logging-level string Default logging level and overrides, see core.yaml for full syntax -o, --orderer string Ordering service endpoint --test.coverprofile string Done (default "coverage.cov") --tls Use TLS when communicating with the orderer endpoint

MartinC (Tue, 04 Jul 2017 13:00:42 GMT):
It looks like -P is the way to go as it is trying to use a policy. Is `github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02` what you wanted to set the policy too?

VamsiKrishnak (Tue, 04 Jul 2017 13:01:54 GMT):
After succesful chaincode instantiation, you would see chaincode container comes up CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c74a34f846f9 dev-jdoe-mycc-1.0 "chaincode -peer.a..." 1 second ago Up 1 second dev-jdoe

VamsiKrishnak (Tue, 04 Jul 2017 13:02:08 GMT):
but im not getting thid

MartinC (Tue, 04 Jul 2017 13:53:53 GMT):
From the error message output posted previously when -P was used, I interpreted that as saying it was trying to use the chaincode_example02 file as the policy and it was saying that was not a valid policy.

VamsiKrishnak (Tue, 04 Jul 2017 15:36:13 GMT):
@MartinC Yeah but in beta version i guess -p(lowercase) will use for chaincode path???

MartinC (Tue, 04 Jul 2017 15:43:09 GMT):
Ah, I think support for a remote chaincode location was removed in early June. See https://jira.hyperledger.org/browse/FAB-3172

VamsiKrishnak (Tue, 04 Jul 2017 16:02:29 GMT):
yeah , Thank you

AbhishekSeth (Tue, 04 Jul 2017 16:33:45 GMT):
hey all, I am using fabric- beta images for my network setup. I am using NodeSDK. create channel happens successfully and no error in the logs anywhere. But when I say node join-channel.js, it shows successfully joined but in the peer logs I see the following error:

AbhishekSeth (Tue, 04 Jul 2017 16:35:55 GMT):

Message Attachments

AbhishekSeth (Tue, 04 Jul 2017 16:36:06 GMT):
any help is highly appreciated!!!!

nhrishi (Tue, 04 Jul 2017 18:16:50 GMT):
Hi, Quick question. If I install and instantiate a chaincode on 4 peers (2 for Org A and 2 for Org 😎, do I have to explicitly invoke a transaction on all the 4 peers always? or If as a user of OrgA, I only invoke on the 2 peers of OrgA, Will a smart contract state on the OrgB get updated post endorsements and commitment of the transaction?

vishalgupta96 (Tue, 04 Jul 2017 19:37:02 GMT):
Has joined the channel.

asamk (Tue, 04 Jul 2017 22:44:31 GMT):
Has joined the channel.

asamk (Tue, 04 Jul 2017 22:45:21 GMT):
Need help with this issue, trying to run the fabcar sample with node sdk client as a node REST server and it works fine. But when create a docker image and run it from there, getting the following error on query, Example app listening at http://:::8081 Create a client and set the wallet location --Wallet location : /app/network/creds Set wallet path, and associate user PeerAdmin with application error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/app/node_modules/fabric-client/lib/User.js:251:11) error: [Client.js]: Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/app/node_modules/fabric-client/lib/User.js:251:11) Caught Error Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/app/node_modules/fabric-client/lib/User.js:251:11) using the latest rc1

jaswanth (Wed, 05 Jul 2017 05:44:32 GMT):
Hi am using couchdb as my database . upon successful transaction , db is updating perfectly . i just added a record and updated it. My question is , GetHistoryOfKeys() function is returning a data which has all the transactions i made ,but in db i can only see the updated data (the initial data is replaced with updated data) . can anyone give me an idea from where we are getting the data for GetHistoryOfKeys().

RezwanKabir (Wed, 05 Jul 2017 11:16:34 GMT):
In v1.0 rc1 I have copied example project from v1.0 gamma. in instantiate I am getting Failed connecting to orderer.example.com:7050 , error: x509: certificate signed by unknown authority. Do you know the reason?

RezwanKabir (Wed, 05 Jul 2017 11:16:34 GMT):
In v1.0 rc1 I have copied example project from v1.0 beta. in instantiate I am getting Failed connecting to orderer.example.com:7050 , error: x509: certificate signed by unknown authority. Do you know the reason?

akdj (Wed, 05 Jul 2017 11:18:25 GMT):
@RezwanKabir which example of beta? why don't you try example of rc1?

RezwanKabir (Wed, 05 Jul 2017 11:18:50 GMT):
fabric-sdk-node\examples\balance-transfer

RezwanKabir (Wed, 05 Jul 2017 11:19:24 GMT):
I didnt find example folder in rc1

akdj (Wed, 05 Jul 2017 11:28:19 GMT):
@RezwanKabir https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer here is it is moved in a repository only for sample

akdj (Wed, 05 Jul 2017 11:28:19 GMT):
@RezwanKabir https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer here is, it is moved in a repository only for sample

RezwanKabir (Wed, 05 Jul 2017 11:30:29 GMT):
thanks for the link. But does it work for rc1 ? my instanciation part was getting error "Failed connecting to orderer.example.com:7050 , error: x509: certificate signed by unknown authority"

RezwanKabir (Wed, 05 Jul 2017 11:36:22 GMT):
@akdj can you plz mention one example which runs in rc1 and works perfectly from "channel create " to "Query chaincode" ?

akdj (Wed, 05 Jul 2017 11:36:24 GMT):
yes, it is work

akdj (Wed, 05 Jul 2017 11:37:07 GMT):
all examples in the fabric-sample repository work with rc1, and only with rc1

akdj (Wed, 05 Jul 2017 11:37:07 GMT):
all examples in the fabric-sample repository work with rc1, and only with rc1 for the momenty

akdj (Wed, 05 Jul 2017 11:37:07 GMT):
all examples in the fabric-sample repository work with rc1, and only with rc1 for the moment @RezwanKabir

RezwanKabir (Wed, 05 Jul 2017 11:38:14 GMT):
thnx @akdj.

akdj (Wed, 05 Jul 2017 11:38:45 GMT):
yrwlcom

RezwanKabir (Wed, 05 Jul 2017 12:22:30 GMT):
you made my day. It worked.

akdj (Wed, 05 Jul 2017 14:25:57 GMT):
:D cool

akdj (Wed, 05 Jul 2017 14:25:57 GMT):
haha :D cool

mychewcents (Thu, 06 Jul 2017 06:17:15 GMT):
Guys, I'm getting a ./api.js file not found error when trying to run test/integration/e2e.js . Does anyone know a work around?

SotirisAlfonsos (Thu, 06 Jul 2017 08:02:47 GMT):
@mychewcents run `gulp watch`

RezwanKabir (Thu, 06 Jul 2017 08:23:00 GMT):
do we have any blockchain explorer for rc1 ?

ShenthilkumarCK (Thu, 06 Jul 2017 10:55:05 GMT):
Has joined the channel.

rishabh1102 (Thu, 06 Jul 2017 14:28:19 GMT):
`'use strict'; /* * Chaincode Invoke */ var hfc = require('fabric-client'); var path = require('path'); var util = require('util'); var amqp = require('amqplib/callback_api'); var options = { wallet_path: path.join(__dirname, './network/creds'), user_id: 'PeerAdmin', channel_id: 'mychannel', chaincode_id: 'fabcar', peer_url: 'grpc://localhost:7051', event_url: 'grpc://localhost:7053', orderer_url: 'grpc://localhost:7050' }; var arg = process.argv.slice(2)[0]; console.log(process.argv.slice(2)[0]); var channel = {}; var client = null; var targets = []; var tx_id = null; var peerObj = null; console.log("1: " + process.hrtime()); Promise.resolve().then(() => { console.log("Create a client and set the wallet location"); client = new hfc(); console.log(process.hrtime()); return hfc.newDefaultKeyValueStore({ path: options.wallet_path }); }).then((wallet) => { console.log("Set wallet path, and associate user ", options.user_id, " with application"); client.setStateStore(wallet); console.log("2: " + process.hrtime()); return client.getUserContext(options.user_id, true); }).then((user) => { console.log("Check user is enrolled, and set a query URL in the network"); if (user === undefined || user.isEnrolled() === false) { console.error("User not defined, or not enrolled - error"); } channel = client.newChannel(options.channel_id); peerObj = client.newPeer(options.peer_url); channel.addPeer(peerObj); channel.addOrderer(client.newOrderer(options.orderer_url)); targets.push(peerObj); console.log("3: " + process.hrtime()); return; }).then(() => ` Could someone please tell me what changes to make to the above code when TLS is enabled?

jmcnevin (Thu, 06 Jul 2017 20:00:34 GMT):
Has left the channel.

gauthampamu (Thu, 06 Jul 2017 20:32:27 GMT):
https://chat.hyperledger.org/channel/fabric?msg=6LiKQBKBnmd5xR9FE

KevinBai (Fri, 07 Jul 2017 05:09:21 GMT):
Has joined the channel.

KevinBai (Fri, 07 Jul 2017 05:12:06 GMT):
Hello, I use the nodejs sdk to test my blockchain, but get a error is "Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number" when call createchannel. How to fix it?

rishabh1102 (Fri, 07 Jul 2017 05:48:45 GMT):
Hey all, how to use hyperledger node sdk with tls enabled?

subbu165 (Fri, 07 Jul 2017 13:53:02 GMT):
Hi, when I do InstantiatChainCode, I get the timeout error as below: [2017-07-07 19:06:40.870] [DEBUG] Helper - Msp ID : Org1MSP error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/Users/spalani1/Downloads/chainwalk-1.0beta/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:365:14) This 45000 comes from node_modules/fabric-client/config/default.json, If I increase this value then it works fine. But I'm sure this can be only a workaround. What are other options to set this or override this default value?

subbu165 (Fri, 07 Jul 2017 13:55:19 GMT):
I'm using V1.0 Beta

praveennagpal (Sat, 08 Jul 2017 15:46:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Fpys4zZMJ4Qt7SLQc) @gauthampamu Yes, you would need connectivity from your client app in case you want to pass proposal request from that app instance to endorsing peer across organisation. If you only endorse it from one of your own organisation peer, then you really don't need the connectivity. So it kind of depends on your requirement.

Ratnakar (Sun, 09 Jul 2017 02:51:05 GMT):
@rishabh1102 TLS is enabled in balance-transafer sample. you can refer the sample available here https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer

MohammadObaid (Sun, 09 Jul 2017 17:40:31 GMT):
@here Hey all , I am trying to use blockdecoder class from fabric-node sdk but I am continuously getting error Blockdecoder is not defined. Where I need to define this blockdecoder library. I have created new object of that class and call one of its method . Below here is the code and error I get . Any clue how to resolve this.

MohammadObaid (Sun, 09 Jul 2017 17:40:31 GMT):
@here Hey all , I am trying to use blockdecoder class from fabric-node sdk but I am continuously getting error Blockdecoder is not defined. Where I need to define this blockdecoder class I have created new object of that class and call one of its method . Below here is the code and error I get . Any clue how to resolve this.

MohammadObaid (Sun, 09 Jul 2017 17:41:04 GMT):

Message Attachments

MohammadObaid (Sun, 09 Jul 2017 17:41:33 GMT):

Message Attachments

MohammadObaid (Sun, 09 Jul 2017 17:42:11 GMT):
I am using rc-1 images, binaries and node-modules

ericmvaughn (Sun, 09 Jul 2017 18:09:35 GMT):
@MohammadObaid The channel.queryBlock will return a block that is already decoded so you don't need to call decodeBlock on it.

MohammadObaid (Sun, 09 Jul 2017 18:13:55 GMT):
@ericmvaughn Are you sure?. As per sdk documentation , to decode block you need to call BlockDecoder class. In query.js or in any other js file there is no calling of any method of blockdecoder class

ericmvaughn (Sun, 09 Jul 2017 18:18:20 GMT):
channel.queryBlock calls BlockDecoder.decode which basically does the same decoding as decodeBlock

MohammadObaid (Sun, 09 Jul 2017 19:15:07 GMT):
Ok thanks @ericmvaughn .

MohammadObaid (Sun, 09 Jul 2017 19:15:37 GMT):
One more thing I want to ask is that signature return is of type buffer. Can we replace it into some more readable form?

ericmvaughn (Sun, 09 Jul 2017 20:26:20 GMT):
@MohammadObaid you can use toString('hex') on the signature to make it a little more readable, for example `block.data.data[0].signature = block.data.data[0].signature.toString('hex');`

mavericklam (Mon, 10 Jul 2017 03:46:21 GMT):
hey all, I use cryptogen tool to generate the cert, but when I am using nodejs sdk to read the cert and test the api it shows up this error: any hint Enroll User adminfailed with error Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140737235354560:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2512: 140737235354560:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3544: this error keeps happening when I try to enroll the user

RezwanKabir (Mon, 10 Jul 2017 07:29:22 GMT):
I want to add peer and orderer which is physical machine, not docker. What could be the challenges or what needs to be done ? expert opinion needed.

smallX (Mon, 10 Jul 2017 08:40:02 GMT):
hi,guys, when I run `npm test` I got the error ``` not ok 195 Error: Error creating member_db database to store membership data: Error: socket hang up at createHangUpError (_http_client.js:344:15) at Socket.socketOnEnd (_http_client.js:436:23) at emitNone (events.js:110:20) at Socket.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1047:12) at _combinedTickCallback (internal/process/next_tick.js:102:11) at process._tickCallback (internal/process/next_tick.js:161:9) at /Users/qbq_wzk/Documents/Developer/fabric-sdk-node/fabric-client/lib/impl/CouchDBKeyValueStore.js:93:21 at Request._callback (/Users/qbq_wzk/Documents/Developer/fabric-sdk-node/node_modules/nano/lib/nano.js:199:16) at self.callback (/Users/qbq_wzk/Documents/Developer/fabric-sdk-node/node_modules/request/request.js:186:22) at emitOne (events.js:115:13) at Request.emit (events.js:210:7) at Request.onRequestError (/Users/qbq_wzk/Documents/Developer/fabric-sdk-node/node_modules/request/request.js:824:8) at emitOne (events.js:115:13) at ClientRequest.emit (events.js:210:7) at Socket.socketOnEnd (_http_client.js:436:9) at emitNone (events.js:110:20) at Socket.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1047:12) at _combinedTickCallback (internal/process/next_tick.js:102:11) at process._tickCallback (internal/process/next_tick.js:161:9)``` environment:`npm:5.0.3`,`node: v8.1.2`, `docker:1.13.1`

smallX (Mon, 10 Jul 2017 08:52:51 GMT):
the error still there when I `git checkout v1.0.0-beta` run `npm test`

vinitesh (Mon, 10 Jul 2017 10:15:20 GMT):
Has joined the channel.

FollowingGhosts (Mon, 10 Jul 2017 14:57:06 GMT):
Has joined the channel.

FollowingGhosts (Mon, 10 Jul 2017 15:02:17 GMT):
Could anyone point me in the direction of code examples for the node sdk?

Asara (Mon, 10 Jul 2017 15:14:33 GMT):
@FollowingGhosts https://github.com/hyperledger/fabric-samples

FollowingGhosts (Mon, 10 Jul 2017 15:18:02 GMT):
thanks

MohammadObaid (Mon, 10 Jul 2017 15:24:28 GMT):
Hey in core fabric all communication between peers , ordering is done via grpc . What about in sdk?

jimthematrix (Mon, 10 Jul 2017 18:02:38 GMT):
@MohammadObaid SDK communicates with peers and orderers via grpc as well

jimthematrix (Mon, 10 Jul 2017 18:08:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MnSbDrxuKxwuNeZBw) @RezwanKabir why would you want to do that? dedicating a physical machine to a single process is hardly the optimal way to manage servers. besides that, you'll have to re-do many many build steps that is part of building the fabric-* containers to make things work (creating config directories, setting up environment variables, etc.)

jimthematrix (Mon, 10 Jul 2017 18:08:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MnSbDrxuKxwuNeZBw) @RezwanKabir why would you want to do that? managing physical machines as opposed to docker containers is hardly the optimal way to manage highly available services. besides that, you'll have to re-do many many build steps that is part of building the fabric-* containers to make things work (creating config directories, setting up environment variables, etc.)

jimthematrix (Mon, 10 Jul 2017 18:08:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MnSbDrxuKxwuNeZBw) @RezwanKabir why would you want to do that? managing physical machines as opposed to docker containers is hardly the optimal way to manage highly available (and potentially elastic) services. besides that, you'll have to re-do many many build steps that is part of building the fabric-* containers to make things work (creating config directories, setting up environment variables, etc.)

MohammadObaid (Mon, 10 Jul 2017 18:53:12 GMT):
Hey I have defined my custom endorsement policy in `fabric-client/lib/channel.js` as follows

MohammadObaid (Mon, 10 Jul 2017 18:53:39 GMT):

Message Attachments

MohammadObaid (Mon, 10 Jul 2017 18:54:24 GMT):
But when I insert data into blockchain it shows endorsement of org1 and org2 while I defined endorsement of org2 and org3. Am I missing something here?

MohammadObaid (Mon, 10 Jul 2017 18:54:54 GMT):

Message Attachments

outis (Tue, 11 Jul 2017 04:47:49 GMT):
Hi I am trying to run test/integration/e2e in sdk with fabric-samples/docker-compose-e2e-template.yaml (that comes with 'build your first network') I ran docker images with that yaml and ran `node integration/e2e/create-channel.js`, then got the following error ```E0710 12:30:28.442564000 140736428950464 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0710 12:30:28.444518000 140736428950464 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/user/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/Users/user/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/Users/user/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12)" not ok 9 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/Users/user/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/Users/user/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/Users/user/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/Users/user/go/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:229:12)``` I suppose I have to change e2e/config.json but don't know which certificate should be pointed.

SanthoshKumarMK (Tue, 11 Jul 2017 06:52:33 GMT):
how to assign permission at an asset level? For example, in the topology we have 4 orgs and want to allow only org2 and org4 to see asset1 and org3 to see asset2. please suggest me on this.

akdj (Tue, 11 Jul 2017 10:03:22 GMT):
hello, I learned that It does not matter about if the transaction is signed by respecting the endorsement policy or not, it wiil be sent as block to peers by orderer service, then peers will check the valididate of this transaction block, if it is validated, if will take effect in the transactions story. And in both cases , this block wiil be store in the ledger. But can anyone tell me how to differentiate a valid transaction block, and an invalid transaction block? only by checking signatures? I used the api function channel.queryblock() to get block information of a valided transaction and an invalided one, however, I cannot see the difference between these two, there is not a target/label which indicate if this block is valided or not...

FollowingGhosts (Tue, 11 Jul 2017 10:13:27 GMT):
Is there a simpler getting started guide than the full example in fabric-samples? It's tough to make heads or tails of it at points

praveennagpal (Tue, 11 Jul 2017 11:27:34 GMT):
@jimthematrix : by default endorsing peer nodes simply send the endorsement response back. How can I embed a certain logic in the endorsing peer for responding to a proposal request, for example - validating against a legacy system?

FollowingGhosts (Tue, 11 Jul 2017 13:22:33 GMT):
I've been trying to make use of the fabcar example, and I was wondering how I'd create a certificate like the one here: https://github.com/hyperledger/fabric-samples/tree/master/fabcar/network/creds

FollowingGhosts (Tue, 11 Jul 2017 13:25:06 GMT):
I have the per-peer, per-admin and per-user certs

FollowingGhosts (Tue, 11 Jul 2017 13:25:42 GMT):
but I'm not sure how those relate to the one the "peer admin" is using

akdj (Tue, 11 Jul 2017 13:26:25 GMT):
Hello, @jimthematrix can you help me about this : https://chat.hyperledger.org/channel/fabric-ledger?msg=KNzvhJFyY4PDXkb2b

akdj (Tue, 11 Jul 2017 13:26:25 GMT):
Hello, @jimthematrix can you help me about this : https://chat.hyperledger.org/channel/fabric-ledger?msg=nA2edkL5ygqYBkeF2

akdj (Tue, 11 Jul 2017 13:26:25 GMT):
Hello, @jimthematrix can you help me about this : https://chat.hyperledger.org/channel/fabric-ledger?msg=nA2edkL5ygqYBkeF2

akdj (Tue, 11 Jul 2017 13:26:25 GMT):
Hello, @jimthematrix can you help me about this : https://chat.hyperledger.org/channel/fabric-ledger?msg=nA2edkL5ygqYBkeF2 below all the conversation about my ask in #fabric-ledger

akdj (Tue, 11 Jul 2017 13:27:15 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=KNzvhJFyY4PDXkb2b

akdj (Tue, 11 Jul 2017 13:27:27 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=vDXgcpCPhX8JKhDEB

akdj (Tue, 11 Jul 2017 13:27:37 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=xnTaZ6qoT2g2atvvF

akdj (Tue, 11 Jul 2017 13:27:37 GMT):
here is the list of possible reasons https://chat.hyperledger.org/channel/fabric-ledger?msg=xnTaZ6qoT2g2atvvF

akdj (Tue, 11 Jul 2017 13:28:07 GMT):
here is the list of possible reasons

akdj (Tue, 11 Jul 2017 13:28:19 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=Buh8spNJvtmAkyyKn

akdj (Tue, 11 Jul 2017 13:28:27 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=cnSErnK2hoZbndZeD

akdj (Tue, 11 Jul 2017 13:28:38 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=Lh9YuqXADq7QdpCCZ

akdj (Tue, 11 Jul 2017 13:28:45 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=vAnmyXmZB4ftv8ZqZ

akdj (Tue, 11 Jul 2017 13:28:55 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=ZsxakeGJ6x4ctqSZ5

akdj (Tue, 11 Jul 2017 13:29:03 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=C2C5RQ7pYpz5yMFXS

akdj (Tue, 11 Jul 2017 13:29:13 GMT):
https://chat.hyperledger.org/channel/fabric-ledger?msg=aMriPL78xorzjMsiC

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

FollowingGhosts (Tue, 11 Jul 2017 14:32:55 GMT):
How do I make credentials for a user from their certs?

Vadim (Tue, 11 Jul 2017 14:39:57 GMT):
@FollowingGhosts in case you talk about fabric-ca credentials, then normally you have two options: 1) use the user certificates generated by the cryptogen tool (then the fabric-ca is not needed) 2) use the fabric-ca: register the user first, you get back user credentials; then that user can use the credentials to obtain (sign) a certificate. So the goal is to obtain a certificate. If you have a certificate already, you don't need credentials.

FollowingGhosts (Tue, 11 Jul 2017 14:40:53 GMT):
How can I use that with the sdk? I was trying to copy the example given in the cars example, but that uses a creds file here: https://github.com/hyperledger/fabric-samples/blob/master/fabcar/network/creds/PeerAdmin

FollowingGhosts (Tue, 11 Jul 2017 14:43:12 GMT):
As it'd appear the fabcar example is set up without using the CA, which is what I'd like to do for now as I'm still in the development stage

Vadim (Tue, 11 Jul 2017 14:46:50 GMT):
check the tests in fabric-sdk-node, they use both CA and cryptogen certs

FollowingGhosts (Tue, 11 Jul 2017 14:47:24 GMT):
thanks

ericmvaughn (Tue, 11 Jul 2017 15:03:43 GMT):
@akdj If you do a channel.queryTransaction() it will have a validationCode as a member in the return

Asara (Tue, 11 Jul 2017 15:20:34 GMT):
Now that 1.0.0 has been released on Github, how long until npm is updated?

mescoba1 (Tue, 11 Jul 2017 19:00:46 GMT):
Has joined the channel.

dante (Tue, 11 Jul 2017 22:52:33 GMT):
Has joined the channel.

JarvisJang (Wed, 12 Jul 2017 02:28:46 GMT):
Has joined the channel.

bh4rtp (Wed, 12 Jul 2017 02:50:53 GMT):
the balance-transfer cannot instantiate the chaincodes. it says `Failed to order the transaction. Error code: undefined`. while the chaincode containers, i.e. `dev-peer0.org1.example.com-mycc-v0`, are actually created.

bh4rtp (Wed, 12 Jul 2017 02:50:53 GMT):
the `balance-transfer` example cannot instantiate the chaincodes. it says `Failed to order the transaction. Error code: undefined`. while the chaincode containers, i.e. `dev-peer0.org1.example.com-mycc-v0`, are actually created.

bh4rtp (Wed, 12 Jul 2017 02:50:53 GMT):
the `balance-transfer` example cannot instantiate the chaincodes. it says `Failed to order the transaction. Error code: undefined`. while the chaincode containers, i.e. `dev-peer0.org1.example.com-mycc-v0`, are actually created. the errors reported in the terminal of running `./runApp.sh`: ```error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) [2017-07-12 15:13:03.523] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-12 15:13:03.525] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-12 15:13:03.526] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-07-12 15:13:03.528] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined```

outis (Wed, 12 Jul 2017 06:21:02 GMT):
I am running test/integration/e2e.js after docker-compoising fixture/docker-compose.yaml and got `Error: Cannot find module './api.js'` Anyone can tell what I'm missing? I did npm install.

luckydogchina (Wed, 12 Jul 2017 06:34:17 GMT):
2017-07-12 06:16:12.927 UTC [chaincode-platform] func1 -> ERRO 328 Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/example_cc/example_cc.go:27:2: cannot find package "github.com/golang/protobuf/proto" in any of: /opt/go/src/github.com/golang/protobuf/proto (from $GOROOT) /chaincode/input/src/github.com/golang/protobuf/proto (from $GOPATH) /opt/gopath/src/github.com/golang/protobuf/proto " the error is exported when I instantiate the `example_cc.go`, how to solve it?

apolikamixitos (Wed, 12 Jul 2017 07:24:59 GMT):
Has joined the channel.

mastersingh24 (Wed, 12 Jul 2017 08:49:53 GMT):
@luckydogchina - which `example_cc.go` are you using? Did you modify `https://github.com/hyperledger/fabric-sdk-node/tree/master/test/fixtures/src/github.com/example_cc`?

mastersingh24 (Wed, 12 Jul 2017 08:50:31 GMT):
In any case, you will need to "vendor" the `github.com/golang/protobuf/proto` package with the chaincode

luckydogchina (Wed, 12 Jul 2017 08:52:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xxXL8cfMeB8yktYjy) @mastersingh24 you are right, but the $GOROOT is on local or peer container?

luckydogchina (Wed, 12 Jul 2017 08:52:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xxXL8cfMeB8yktYjy) @mastersingh24 you are right, but the $GOROOT is on local or endorse peer container?

FollowingGhosts (Wed, 12 Jul 2017 09:57:01 GMT):
If I wanted to use the crypto material generated by cryptgen with the function user.setEnrollment(key, data, 'DEFAULT') which files do I need to use?

riancu (Wed, 12 Jul 2017 10:02:43 GMT):
Has joined the channel.

mavericklam (Wed, 12 Jul 2017 10:24:42 GMT):
hi all, I keep getting this error when I try to read the usercontext from the store, there is no problem when creating the store, and the file does indeed exist, is there any hint? error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin at _cryptoSuite.importKey.then.then (/Users/mav/Desktop/blockchain/middleware/node_modules/fabric-client/lib/User.js:251:11)

akdj (Wed, 12 Jul 2017 11:59:24 GMT):
@ericmvaughn thank you ! I found it!

akdj (Wed, 12 Jul 2017 11:59:24 GMT):
@ericmvaughn thank you ! I found it with your help!

MartinC (Wed, 12 Jul 2017 12:21:16 GMT):
Has anyone here used the `Client.installChaincode()` function in the SDK passing in a `chaincodePackage` and then instantiated it on a channel? It returns okay and I can successfully query the Peer for the chaincodeId successfully but when I try and instantiate the chaincode on the channel it complains about not being able to find the go file.

MartinC (Wed, 12 Jul 2017 12:21:16 GMT):
Has anyone here used the `Client.installChaincode()` function in the SDK passing in a `chaincodePackage` and then instantiated it on a channel? The install returns okay and I can successfully query the Peer for the chaincodeId but when I try and instantiate the chaincode on the channel it complains about not being able to find the go file on the Peer.

smfaizalkhan (Wed, 12 Jul 2017 12:42:25 GMT):
Hello All, I followed the example for balance-transfer https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer Ans succesful in cloning and runnning throgh it, Now i wanted to change the docker-compose.yaml to have my own IP and PORT instead of localhost.I mena multi-host ,multi-container environment. I tried to configure my docker-compose.yaml ,When i ran the docker-compose -f docker-compose.yaml i get the following error Error starting userland proxy: listen tcp 10.2.2.159:7051: bind: cannot assign requested address What am i doing wrong

smfaizalkhan (Wed, 12 Jul 2017 12:42:25 GMT):
Hello All, I followed the example for balance-transfer https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer Ans succesful in cloning and runnning throgh it, Now i wanted to change the docker-compose.yaml to have my own IP and PORT instead of localhost.I mena multi-host ,multi-container environment. I tried to configure my docker-compose.yaml ,When i ran the docker-compose -f docker-compose.yaml i get the following error Error starting userland proxy: listen tcp 10.2.2.159:7051: bind: cannot assign requested address What am i doing wrong

AlexanderEx123 (Wed, 12 Jul 2017 13:37:45 GMT):
Does anybody here try to get block events by block number? Then I call method queryBlockByNumber according to doc and get event by this path: result.data.data[1].payload.data.actions[0].payload.action.proposal_response_payload.extension.events I get empty structure like this: { chaincode_id: '', tx_id: '', event_name: '', payload: }

AlexanderEx123 (Wed, 12 Jul 2017 13:37:52 GMT):
What i doing wrong?

FollowingGhosts (Wed, 12 Jul 2017 13:54:28 GMT):
I'm getting the following error when trying to talk to a peer with the SDK

FollowingGhosts (Wed, 12 Jul 2017 13:54:34 GMT):
```/grpc/src/node/src/client.js:434:17 code: 14, metadata: Metadata { _internal_repr: {} } } undefined error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Endpoint read failed```

koloisator (Wed, 12 Jul 2017 14:02:25 GMT):
Has joined the channel.

FollowingGhosts (Wed, 12 Jul 2017 14:24:24 GMT):
Which certificate(s) do I need to pass to the Peer object when trying to connect over TLS?

FollowingGhosts (Wed, 12 Jul 2017 14:44:41 GMT):
I've tried the user certs, the tlsca certs to no avail

FollowingGhosts (Wed, 12 Jul 2017 14:45:10 GMT):
using the tlsca cert gives me code 14 whereas using the user certs gives me an SSL error

MartinC (Wed, 12 Jul 2017 14:55:47 GMT):
@FollowingGhosts In the past I have used the peer's org's ca file `..../crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem` for opts.pem and also set `opts['ssl-target-name-override'] = "peer0"` when connecting to docker running locally (0.0.0.0 or localhost), that worked for me anyway.

FollowingGhosts (Wed, 12 Jul 2017 14:56:03 GMT):
thanks Martin

MartinC (Wed, 12 Jul 2017 14:56:32 GMT):
Good luck

FollowingGhosts (Wed, 12 Jul 2017 15:02:53 GMT):
No dice yet sadly, which is frustrating

FollowingGhosts (Wed, 12 Jul 2017 15:04:04 GMT):
excellent, I changed it to the tlsca and with your override I've gotten further down the line before I get errors, thanks again

kletkeman (Wed, 12 Jul 2017 15:10:35 GMT):
@FollowingGhosts Are you using a helper like that in the balance transfer app? Following that application'

kletkeman (Wed, 12 Jul 2017 15:10:35 GMT):
@FollowingGhosts Are you using a helper like that in the balance transfer app? Following that application's style (most copy the code from what I have seen) should help. https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js

FollowingGhosts (Wed, 12 Jul 2017 15:12:05 GMT):
Thanks, I'd been using that and docs to give me some guidance, but I wanted to understand what was happening as well. I'm now able to query the chain etc. so I've made a lot of progress

jimthematrix (Wed, 12 Jul 2017 15:18:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PwaP7vFmSDgFDPDtE) @outis the answer is in the README.md ;-), you need to run `gulp ca`

jimthematrix (Wed, 12 Jul 2017 15:22:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mQfv6xrAKB7qZrPsa) @mavericklam this happens when you have deleted the private key store (where private keys are saved) but left behind the state store (where user enrollment is saved). to recover you need to remove the users from the state store so they can get re-created/re-enrolled

jimthematrix (Wed, 12 Jul 2017 15:24:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kKmgd6LdjCYF54maS) @MartinC can you confirm that the chaincode is installed on all the peers that you are calling instantiate on? could it be that some of the peers asked to endorse the instantiate proposal didn't have the chaincode installed?

jimthematrix (Wed, 12 Jul 2017 15:29:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zHkkGF36Bw5WrpxBy) @smfaizalkhan the 10.2.2.x addresses are for the host to reach the docker instances, what you need in docker-compose is the IP addresses in the designated network for the docker instance themselves, typically they are 172.21.0.x, use `docker inspect ` to find out

jimthematrix (Wed, 12 Jul 2017 15:32:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GfDaNZbFaYwEHLWYq) @AlexanderEx123 this means your chaincode did not set any events for that transaction. it has to call `stub.SetEvent(name, payload)` to have events as part of the transaction

jimthematrix (Wed, 12 Jul 2017 15:34:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XgtPcJoK56bwpNj9M) @Asara v1.0.0 has already been published to npm

Asara (Wed, 12 Jul 2017 15:36:04 GMT):
Yeap, happened around 1600. Thanks :)

MartinC (Wed, 12 Jul 2017 15:37:39 GMT):
@jimthematrix I am running the fabcar sample network, so there is only one peer. I have pulled a different bit of sample chaincode, marbles, put it in a tar.gz and sent it in to try out the function. The path in the tar is `src/marbles02/marbles_chaincode.go`, looking in the peer's directories after the "successful" install shows nothing new has been added to `/opt/gopath/src/`.

MartinC (Wed, 12 Jul 2017 15:40:44 GMT):
Doing a query of installed chaincode on the peer returns it as there. I do see that a file `/var/hyperledger/production/chaincodes/marbles.1.0` has been created on the peer. I'm guessing that I've got something wrong with either the tar I built using tar -cvzf ".." or the request details I pass to the sdk command.

jimthematrix (Wed, 12 Jul 2017 15:42:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FcFLNFmAaZZJhoG4h) @akdj the 3rd element in the `metadata.metadata` array should have been a list of validation codes corresponding to the transactions contained in the block. in your output it was an empty array. how did you get the JSON structure?

jimthematrix (Wed, 12 Jul 2017 15:55:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FJ5YnxqjiihsJMAid) @praveennagpal endorsing logic outside of the chaincode is accomplished with Endorsement System Chaincode (ESCC), which right now is not officially supported as user-extensible (please confirm with @binhn)

jimthematrix (Wed, 12 Jul 2017 15:56:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JJW8PYQJTaspwsWP9) @SanthoshKumarMK have you seen this: http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html?

jimthematrix (Wed, 12 Jul 2017 16:00:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=i4qqj24v6JwuevKyq) @MohammadObaid not sure I understand the question. when you say "I defined endorsement of org2 and org3" what did you mean? note that the endorsements included in a transaction came from the endorsing peers that you sent the transaction proposal to.

MohammadObaid (Wed, 12 Jul 2017 18:04:40 GMT):
@jimthematrix I mean to say I changed endorsment policy defined in file `fabric-client/lib/channel.js` but when block is inserted in blockchain it shows endorsment of only one organization.

MohammadObaid (Wed, 12 Jul 2017 18:04:59 GMT):
I want to change endorsemnt policy . How would I do that?

jimthematrix (Wed, 12 Jul 2017 18:40:54 GMT):
@MohammadObaid I think there's some clarifications needed first. endorsement policy is what the committer will use to decide if a transaction is valid or not. It compares the endorsements contained in that subject transaction against the endorsement policy to make the decision.

jimthematrix (Wed, 12 Jul 2017 18:41:35 GMT):
now the specific endorsement contained in a transaction come from which endorser node you have sent the proposal to. so if you only sent the proposal to one endorser, then you only get one endorsement.

jimthematrix (Wed, 12 Jul 2017 18:42:36 GMT):
if you want to change the endorsement policy, you need to specify that in JSON format when you call channel.sendInstantiateProposal(), as documented here: https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest

kustrun (Wed, 12 Jul 2017 19:45:46 GMT):
Has joined the channel.

qizhang (Wed, 12 Jul 2017 21:02:41 GMT):

Message Attachments

qizhang (Wed, 12 Jul 2017 21:02:42 GMT):
Hi, did anyone encountered this error and know how to solve it? Thanks!

qizhang (Wed, 12 Jul 2017 21:02:42 GMT):
Hi, did anyone encounter this error and know how to solve it? Thanks!

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, wne

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, when run 'gulp test' I get an error once it creates the database, it says 'port is already allocated'. I created my blockchain using the network-composer using couchDB so the port is allocated is the one that was out in the .yaml file, any suggestion on what is the problem and how to fix?

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, when run 'gulp test' I get an error once it creates the database, it says 'port is already allocated'. I created my blockchain using the network-composer using couchDB so the port is allocated is the one that was out in the .yaml file, any suggestion on what is the problem and how to fix?

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, when run `gulp test` I get an error once it creates the database, it says 'port is already allocated'. I created my blockchain using the network-composer using couchDB so the port is allocated is the one that was out in the .yaml file, any suggestion on what is the problem and how to fix?

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, when run `gulp test` I get an error once it creates the database, it says `port is already allocated` I created my blockchain using the network-composer using couchDB so the port is allocated is the one that was out in the .yaml file, any suggestion on what is the problem and how to fix?

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, when run `gulp test` I get an error once it creates the database, it says `Bind for 0.0.0.:5984 failed: port is already allocated` I created my blockchain using the network-composer using couchDB so the port is allocated is the one that was out in the .yaml file, any suggestion on what is the problem and how to fix?

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, when run `gulp test` I get an error once it creates the database, it says `Bind for 0.0.00.:5984 failed: port is already allocated` I created my blockchain using the network-composer using couchDB so the port is allocated is the one that was out in the .yaml file, any suggestion on what is the problem and how to fix?

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, when run `gulp test` I get an error once it creates the database, it says `Bind for 0.0.0.0:5984 failed: port is already allocated` I created my blockchain using the network-composer using couchDB so the port is allocated is the one that was out in the .yaml file, any suggestion on what is the problem and how to fix?

mescoba1 (Wed, 12 Jul 2017 21:06:13 GMT):
Hey, when run `gulp test` I get an error once it creates the database, it says `Bind for 0.0.0.0:5984 failed: port is already allocated` I created my blockchain using the network-composer using couchDB so the port is the same one from the .yaml file, any suggestion on what is the problem and how to fix?

qizhang (Wed, 12 Jul 2017 21:16:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PGnwQLZYWA9H4dWeF) This error occurs when I setup a Fabric network with TLS disabled, and then try to create a channel.

reoim (Thu, 13 Jul 2017 00:08:29 GMT):
Has joined the channel.

jeffgarratt (Thu, 13 Jul 2017 00:09:05 GMT):
@qizhang it looks like it is still trying to use TLS (either the server or the client). Guessing perhaps TLS is still configured for the orderer.

qizhang (Thu, 13 Jul 2017 00:27:16 GMT):
@jeffgarratt Thanks! Is there any approach to check whether TLS is still enabled for the orderer?

jeffgarratt (Thu, 13 Jul 2017 00:30:53 GMT):
@qizhang look at orderer logs... will see something like...

jeffgarratt (Thu, 13 Jul 2017 00:30:54 GMT):
2017-07-12 19:13:39.747 UTC [orderer/main] initializeSecureServerConfig -> INFO 002 Starting orderer with TLS enabled

qizhang (Thu, 13 Jul 2017 00:32:38 GMT):
@jeffgarratt here is my docker log, did not find anything related with TLS

qizhang (Thu, 13 Jul 2017 00:32:38 GMT):
@jeffgarratt here is my orderer log, did not find anything related with TLS

qizhang (Thu, 13 Jul 2017 00:32:41 GMT):
root@bitperf:/home/qi# docker logs 199 2017/07/12 21:38:34 profile: cpu profiling enabled, /tmp/profile435644996/cpu.pprof 2017-07-12 21:38:34.734 UTC [orderer/main] main -> INFO 001 Starting orderer: Version: 1.0.0-rc1 Go version: go1.7.5 OS/Arch: linux/s390x

jeffgarratt (Thu, 13 Jul 2017 00:34:11 GMT):
simply curl the orderer and then view the log

jeffgarratt (Thu, 13 Jul 2017 00:34:11 GMT):
@qizhang simply curl the orderer and then view the log

jeffgarratt (Thu, 13 Jul 2017 00:34:22 GMT):
curl -v orderer0:7050

jeffgarratt (Thu, 13 Jul 2017 00:34:29 GMT):
then tail the orderer log

mavericklam (Thu, 13 Jul 2017 01:41:28 GMT):
thanks a lot! I am curious about if it results from that I store the crypto key store and the state store in the same folder?[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qpnq86f8AJ3Tcyiss) @jimthematrix

ShenthilkumarCK (Thu, 13 Jul 2017 03:08:47 GMT):
Hi

bh4rtp (Thu, 13 Jul 2017 03:08:59 GMT):
hi, does node sdk support https?

ShenthilkumarCK (Thu, 13 Jul 2017 03:10:06 GMT):
I am trying to connect to byfn from fabcar query.js, I copied the certificates. But geting error as Endpoint read failed.

ShenthilkumarCK (Thu, 13 Jul 2017 03:10:07 GMT):
Create a client and set the wallet location Set wallet path, and associate user Shen with application Check user is enrolled, and set a query URL in the network Make query Assigning transaction_id: 931283c2941340205bc64c90eb7b6a9c89755213f033d098082907633ab89e8c error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Endpoint read failed at /opt/gopath/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/node/src/client.js:434:17 returned from query Query result count = 1 error from query = { Error: Endpoint read failed at /opt/gopath/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/node/src/client.js:434:17 code: 14, metadata: Metadata { _internal_repr: {} } } Response is Error: Endpoint read failed

ShenthilkumarCK (Thu, 13 Jul 2017 03:10:46 GMT):
Am i doing something wrong?

ShenthilkumarCK (Thu, 13 Jul 2017 03:11:11 GMT):
I have modified the function name and arguments accordingly

jaswanth (Thu, 13 Jul 2017 06:26:34 GMT):
i modified balance transfer example and gave a ui for it ...everything is working fine .. i created a channel ,joined peers and able to invoke transactions . Now i want to create a new channel dynamically ,i gave channel name `( second channe say ch2)` and path `(./artifacts/channnel.tx)` but getting `BAD_REQUEST ERROR `... i think thesdk is not passing the new channel name ...any help here

jaswanth (Thu, 13 Jul 2017 06:26:34 GMT):
i modified balance transfer example and gave a ui for it ...everything is working fine .. i created a channel ,joined peers and able to invoke transactions . Now i want to create a new channel dynamically ,i gave channel name `( second channel say ch2)` and path `(./artifacts/channnel.tx)` but getting `BAD_REQUEST ERROR `... i think thesdk is not passing the new channel name ...any help here

jaswanth (Thu, 13 Jul 2017 06:26:34 GMT):
i modified balance transfer example and gave a ui for it ...everything is working fine .. i created a channel ,joined peers and able to invoke transactions . Now i want to create a new channel dynamically ,i gave channel name `( second channel say ch2)` and path `(./artifacts/channnel.tx)` but getting `BAD_REQUEST ERROR `... i think the sdk is not passing the new channel name ...any help here

jaswanth (Thu, 13 Jul 2017 06:26:34 GMT):
i modified balance transfer example and gave a ui for it ...everything is working fine .. i created a channel ,joined peers and able to invoke transactions . Now i want to create a new channel dynamically ,i gave channel name `( second channel say ch2)` and path `(./artifacts/channnel.tx)` but getting `BAD_REQUEST ERROR `... i think the sdk is not passing the new channel name ...any help here and can anyone suggest how can i create channel and peers dynamically

Vadim (Thu, 13 Jul 2017 07:20:50 GMT):
@jaswanth you probably need to generate a new channel.tx

bh4rtp (Thu, 13 Jul 2017 07:56:03 GMT):
i find node sdk is not stable, especially timeout processing for example join channel, instantiate chaincode. does anyone face this problem?

RezwanKabir (Thu, 13 Jul 2017 07:56:04 GMT):
a silly question... I am writng one transaction per block. Is it possible to write multiple transaction in one block ?

baoyangc (Thu, 13 Jul 2017 08:14:34 GMT):
Has joined the channel.

baoyangc (Thu, 13 Jul 2017 08:16:41 GMT):
```The async function encountered an error Error: Connect Failed Error: Connect Failed at ClientDuplexStream._emitStatusIfDone (/usr/lib/node_modules/composer-cli/node_modules/_grpc@1.2.4@grpc/src/node/src/client.js:201:19) at ClientDuplexStream._readsDone (/usr/lib/node_modules/composer-cli/node_modules/_grpc@1.2.4@grpc/src/node/src/client.js:169:8) at readCallback (/usr/lib/node_modules/composer-cli/node_modules/_grpc@1.2.4@grpc/src/node/src/client.js:231:12)``` anyone meet this error?

baoyangc (Thu, 13 Jul 2017 08:17:23 GMT):
@bh4rtp did you have met this error

bh4rtp (Thu, 13 Jul 2017 08:18:54 GMT):
@baoyangc i did not inspect the details of error message, always too long to probe the reason. :grinning:

baoyangc (Thu, 13 Jul 2017 08:19:49 GMT):
yes ,i can understand it.

bh4rtp (Thu, 13 Jul 2017 08:24:03 GMT):
if fact, you can inspect the container log information to solve the problem. that is much more direct and effective.

bh4rtp (Thu, 13 Jul 2017 08:26:21 GMT):
i hate node.js, the error message is even obscurer than java. :blush:

koloisator (Thu, 13 Jul 2017 08:34:12 GMT):
Hi everyone, i'm trying to figure out how i could get a list of all transactions and render it in a simple html document. Since the REST API is deprecated, it seems like the only way to handle this is to use the gRPC implementation. I do not find any documentation on how to browse the ledger and list transactions.... Any ideas, or documentation links ?

koloisator (Thu, 13 Jul 2017 08:48:56 GMT):
Or maybe someone already managed to store transactions history via a struct in his chaincode. If so, i would really appriciate some help handling this

jaswanth (Thu, 13 Jul 2017 09:15:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YcTfN9Br4NDLJsRy6) @Vadim thank you for the response . i don't know how to generate new channel.tx from the sdk `(Dynamically )` .. can you suggest me a way of doing it .

Vadim (Thu, 13 Jul 2017 09:16:52 GMT):
@jaswanth https://github.com/hyperledger/fabric/blob/master/examples/configtxupdate/README.md

Vadim (Thu, 13 Jul 2017 09:17:04 GMT):
sdks currently cannot generate it directly

akdj (Thu, 13 Jul 2017 09:21:58 GMT):
which method in sdk node, should be called to sign transaction proposal by client side?

bh4rtp (Thu, 13 Jul 2017 09:43:08 GMT):
does `jq` support wide characters and structure in json? when invoking a function, i need package the args into a json structure. the structure contains wide characters and node sdk output an error: `SyntaxError: Unexpected token : in JSON at position 90` i am using balance-transfer as a template to build my network. the request is: ```curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes/trade \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051","localhost:8051"], "fcn":"register", "args":["pub_info":{"name":{"name":"某公司","alias_name":"某公司","desc":"某公司"}, "group_name":"某集团"}, "biz_info":{"addr":"某市", "zipcode":"999999", "phone":"888-8888888", "email":"ms@example.com", "busi_entity":"某人"}] }' ```

bh4rtp (Thu, 13 Jul 2017 09:43:08 GMT):
does `jq` support wide characters and structure in json? when invoking a function, i need package the args into a json structure. the structure contains wide characters. but node sdk output an error: `SyntaxError: Unexpected token : in JSON at position 90` i am using balance-transfer as a template to build my network. the request is: ```curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes/trade \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051","localhost:8051"], "fcn":"register", "args":["pub_info":{"name":{"name":"某公司","alias_name":"某公司","desc":"某公司"}, "group_name":"某集团"}, "biz_info":{"addr":"某市", "zipcode":"999999", "phone":"888-8888888", "email":"ms@example.com", "busi_entity":"某人"}] }' ```

bh4rtp (Thu, 13 Jul 2017 09:43:08 GMT):
does `jq` support wide characters and structure in json? when invoking a function, i need package the args into a json structure. the structure contains wide characters. but node sdk outputs an error: `SyntaxError: Unexpected token : in JSON at position 90` i am using balance-transfer as a template to build my network. the request is: ```curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes/trade \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051","localhost:8051"], "fcn":"register", "args":["pub_info":{"name":{"name":"某公司","alias_name":"某公司","desc":"某公司"}, "group_name":"某集团"}, "biz_info":{"addr":"某市", "zipcode":"999999", "phone":"888-8888888", "email":"ms@example.com", "busi_entity":"某人"}] }' ```

mavericklam (Thu, 13 Jul 2017 09:46:26 GMT):
not sure, but writing your own nodejs middleware will definitely solve your problem[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LbAkn55CnxWaGnAxR) @bh4rtp

bh4rtp (Thu, 13 Jul 2017 10:15:20 GMT):
@mavericklam ok. thanks.

MartinC (Thu, 13 Jul 2017 10:15:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Cq7RYyuwP95E27xcT) @akdj I think the SDK uses the userContext that is set on the Client instance to do the signing for you when .sendTransactionProposal() is called.

akdj (Thu, 13 Jul 2017 11:40:20 GMT):
@MartinC thank you, yes, I found it here : https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Channel.js#L1346

rohitrocket (Thu, 13 Jul 2017 12:48:26 GMT):
Hi, Does anyone have any info on how to query the number of channels on a blockchain network using API ?

jimthematrix (Thu, 13 Jul 2017 12:49:39 GMT):
@mavericklam that should not be a problem, you can use the same storage location for both state and crypto keys

jimthematrix (Thu, 13 Jul 2017 12:50:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=f3ghXXTpQZq8SLYWH) @bh4rtp it supports http and https when talking to fabric-ca, for others (peers and orderers) it's grpc and grpcs.

jimthematrix (Thu, 13 Jul 2017 13:04:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tHxNEdMe7ASCPEevf) @RezwanKabir how many tx end up in a block is a result of several factors: 1) transaction rate, 2) block interval setting (orderer's BatchTimeout) 3) max tx count per block (orderer BatchSize)

jimthematrix (Thu, 13 Jul 2017 13:06:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Yg8GcbKD2yP7LeeEm) @jaswanth https://fabric-sdk-node.github.io/tutorial-channel-create.html

jimthematrix (Thu, 13 Jul 2017 13:10:05 GMT):
@bh4rtp your `args` array is mal-formatted, it's missing a pair of curly braces, should have been: ``` "args":[ {"pub_info":{"name":{"name":"某公司","alias_name":"某公司","desc":"某公司"}, "group_name":"某集团"}, "biz_info":{"addr":"某市", "zipcode":"999999", "phone":"888-8888888", "email":"ms@example.com", "busi_entity":"某人"} } ]

jimthematrix (Thu, 13 Jul 2017 13:12:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SS62m86AoWKZLqoTa) @rohitrocket no, only how many channels a peer is part of: https://fabric-sdk-node.github.io/Client.html#queryChannels__anchor. only the orderer service has the information on how many channels are there in the entire network but that information is not exposed via APIs. you can ask @jyellick to see if there are ways to get that with low-level calls

jimthematrix (Thu, 13 Jul 2017 13:21:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NAnqgpGykqAkScrPk) @koloisator these types of statistical information are not readily available on the peers but can be easily constructed by reading the ledger itself. SDKs provide APIs to achieve this, that goes like this: 1. get block height: channel.queryInfo() 2. get each block by number from 1 to (height - 1): channel.queryBlock(), you don't need block #0 since the genesis block doesn't contain any transactions 3. from each block you can look for the list of transactions and whether they are valid or not

koloisator (Thu, 13 Jul 2017 13:26:14 GMT):
Nice ! thanks for the help. I'm going to take a look at this !

koloisator (Thu, 13 Jul 2017 13:27:26 GMT):
I was about to approach this problem from my chaincode with the getHistoryForKey(), but your approach seems to give more flexibility.

MohammadObaid (Thu, 13 Jul 2017 18:22:17 GMT):
Hey . I have changed my endorsement policy successfully but I noticed one problem when my endorsement policy contain any other organizations like org2 and org3 except org1 ,chaincode instantiate takes long time and then fails however when I changed it to org1 it successfully instantiate and invoke transactions. I try to change set timeout value to higher in `app/instantiate-chaincode.js` but no luck. Any suggestions?

MohammadObaid (Thu, 13 Jul 2017 18:23:06 GMT):

Message Attachments

MohammadObaid (Thu, 13 Jul 2017 18:23:12 GMT):
This is the only error I am getting on one of endorsing peers.

mescoba1 (Thu, 13 Jul 2017 20:53:19 GMT):
Hello I'm an intern at Almaden. I am trying to install the sdk and wondering if it supports CouchDB or do I have to use LevelDB? I get error when running `gulp test`

Tigermisu (Thu, 13 Jul 2017 21:08:14 GMT):
Has joined the channel.

Tigermisu (Thu, 13 Jul 2017 21:12:39 GMT):
Hello. Is there a simple guide to get started on interacting with a running blockchain using the Node SDK? I tried following the marbles example but I'm totally lost.

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
Hi, I encountered the following error when I instantiate the chaincode, any suggestions? Thanks!

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
Hi, I encountered the following error when I instantiate the chaincode, any suggestions? I checked the container logs, but no error is shown there.

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
Hi, I encountered with the following error when I instantiate the chaincode, any suggestions? I checked the container logs, but no error is shown there.

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
Hi, I encountered with the following error when I instantiate the chaincode, any suggestions? Thanks!

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
Hi, I encountered with the following error when I instantiate the chaincode, any suggestions? TTwo chaincode containers "dev-peer0.org1.example.com-sample_cc_ch1-v0" and "dev-peer0.org2.example.com-sample_cc_ch1-v0" have been spawned, and there is no error message in the container logs.

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
Hi, I encountered with the following error when I instantiate the chaincode, any suggestions? Two chaincode containers "dev-peer0.org1.example.com-sample_cc_ch1-v0" and "dev-peer0.org2.example.com-sample_cc_ch1-v0" have been spawned, and there is no error message in the container logs.

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
Hi, I encountered with the following error when I instantiate the chaincode, any suggestions? Two chaincode containers "dev-peer0.org1.example.com-sample_cc_ch1-v0" and "dev-peer0.org2.example.com-sample_cc_ch1-v0" have been spawned, but the corresponding containers just failed to start. I attached both the error messages from the client and the debug messages from the peers.

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
@here Hi, I encountered with the following error when I instantiate the chaincode (please see attachment), any suggestions? Two chaincode containers "dev-peer0.org1.example.com-sample_cc_ch1-v0" and "dev-peer0.org2.example.com-sample_cc_ch1-v0" have been spawned, but the corresponding containers just failed to start. The logs of the "dev-peer0.org1.example.com-sample_cc_ch1-v0" says "2017-07-13 22:52:43.690 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: context deadline exceeded Error starting New key per invoke: Error trying to connect to local peer: context deadline exceeded".

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
@here Hi, I encountered with the following error when I instantiate the chaincode (please see attachment), any suggestions? Two chaincode containers "dev-peer0.org1.example.com-sample_cc_ch1-v0" and "dev-peer0.org2.example.com-sample_cc_ch1-v0" have been spawned, but then existed right away with the error message saying "2017-07-13 22:52:43.690 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: context deadline exceeded Error starting New key per invoke: Error trying to connect to local peer: context deadline exceeded".

qizhang (Thu, 13 Jul 2017 21:20:24 GMT):
@here Hi, I encountered with the following error when I instantiate the chaincode (please see attachment). Two chaincode containers "dev-peer0.org1.example.com-sample_cc_ch1-v0" and "dev-peer0.org2.example.com-sample_cc_ch1-v0" have been spawned, but then existed right away with the error message saying "2017-07-13 22:52:43.690 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: context deadline exceeded Error starting New key per invoke: Error trying to connect to local peer: context deadline exceeded". any suggestions? Thanks!

qizhang (Thu, 13 Jul 2017 21:20:55 GMT):

Message Attachments

thakkarparth007 (Thu, 13 Jul 2017 21:53:14 GMT):
Hello, is there any plan to add a callback to `registerTxEvent` that lets us know when event handler gets registered at the peer? Sometimes for me, the tx gets committed before the event for that tx gets registered, and my code thinks that the tx is taking too long. Whereas, it's already finished!

thakkarparth007 (Thu, 13 Jul 2017 21:58:24 GMT):
@here does anyone know anything about this?

thakkarparth007 (Thu, 13 Jul 2017 22:03:44 GMT):
Okay, I looked up the docs, and I'm wrong about the "event handler getting registered on the peer". Node SDK listens for block events and calls the relevant tx's event listener on its own.

thakkarparth007 (Thu, 13 Jul 2017 22:04:50 GMT):
But in my case, I'm facing this issue definitely - my code thinks that the tx has timed out because the tx event listener doesn't get called in some cases, but I have verified that those tx actually get committed.

thakkarparth007 (Thu, 13 Jul 2017 22:05:23 GMT):
And I register for a tx before calling `sendTransaction`. Ideally this shouldn't happen, right?

qizhang (Thu, 13 Jul 2017 22:13:08 GMT):

Message Attachments

qizhang (Thu, 13 Jul 2017 22:13:23 GMT):

Message Attachments

bh4rtp (Fri, 14 Jul 2017 00:28:10 GMT):
@jimthematrix yes. curly braces and backslash before every `"` are needed.

qizhang (Fri, 14 Jul 2017 00:52:47 GMT):

Message Attachments

qizhang (Fri, 14 Jul 2017 00:53:07 GMT):

Message Attachments

qizhang (Fri, 14 Jul 2017 00:53:13 GMT):

Message Attachments

qizhang (Fri, 14 Jul 2017 00:54:41 GMT):
Hi, when I instantiate the chaincode, the chaincode container exist with the following error. Then, the client got a TIMEOUT error and the instantiation failed. It was successful when the TLS is enabled, but this error occured when I disabled the TLS. Any suggestion? Thanks!

qizhang (Fri, 14 Jul 2017 00:54:49 GMT):

Message Attachments

qizhang (Fri, 14 Jul 2017 00:55:10 GMT):

Message Attachments

qizhang (Fri, 14 Jul 2017 00:55:18 GMT):

Message Attachments

Haojun (Fri, 14 Jul 2017 03:06:43 GMT):
Hi all, I'm testing a DRM demo using sdk-node. The digital item is uploaded as byte array within the proposal, and the chaincode will hash the item and store the hash value in ledger. I found the hash function which is called by chain._signProposal is very slow (4MB proposal caused over 20s to hash). I used the default setting as the e2e test. Any idea why it's so slow, or is there any other way to deal with the large proposal?

bh4rtp (Fri, 14 Jul 2017 08:01:11 GMT):
hi, i have a question about chaincode instantiate. it always tells timeout error. how to adjust the timeout setting? below is my operations based on `balance-transfer` ```curl -s -X POST \ http://localhost:4000/channels/ch1/chaincodes \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051"], "chaincodeName":"trade", "chaincodeVersion":"v0", "functionName":"init", "args":[] }'``` log error from `./runApp.sh` terminal ```error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/trade/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5)```

bh4rtp (Fri, 14 Jul 2017 08:03:08 GMT):
the chaincodes are in fact be instantiated and the twice request will succeed.

SotirisAlfonsos (Fri, 14 Jul 2017 08:21:59 GMT):
@bh4rtp first instantiate or invoke always takes more time because it creates the container for the cc and that peer. You can change the timeout here: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/config/default.json#L2 and recreate `node_modules`.

bh4rtp (Fri, 14 Jul 2017 08:22:55 GMT):
@SotirisAlfonsos thank you very much. let me have a try.

bh4rtp (Fri, 14 Jul 2017 08:40:58 GMT):
@SotirisAlfonsos it can be directly changed in `node_modules/fabric-client/config/default.json`.

SotirisAlfonsos (Fri, 14 Jul 2017 08:43:07 GMT):
@bh4rtp yes i know but if you forget and recreate `node_modules` at a later time your code will break again and will be wondering why. That is why i mentioned the original place in `fabric-client`.

SotirisAlfonsos (Fri, 14 Jul 2017 08:43:07 GMT):
@bh4rtp yes i know but if you forget and recreate `node_modules` at a later time your code will break again and you will be wondering why. That is why i mentioned the original place in `fabric-client`.

SotirisAlfonsos (Fri, 14 Jul 2017 08:43:07 GMT):
@bh4rtp yes i know but if you forget and recreate `node_modules` at a later time your code will break again and you will be wondering why. That is why i mentioned the original place in `fabric-client`. Its safer i think

bh4rtp (Fri, 14 Jul 2017 08:44:51 GMT):
@SotirisAlfonsos yes. i agree with you. but when i recreate node_modules by running `npm install`. it will download from github.com, not from locally.

bh4rtp (Fri, 14 Jul 2017 08:44:51 GMT):
@SotirisAlfonsos yes. i agree with you. but when i recreate `node_modules` by running `npm install`, it will download from github.com, not from locally.

praveennagpal (Fri, 14 Jul 2017 08:55:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=brxqJKeEqyPMkWCbz) @jimthematrix Thanks. What about endorsing logic within the chaincode? How will that work? Is there a function in chaincode that could be called out by the endorsers through the Fabric SDK?

SotirisAlfonsos (Fri, 14 Jul 2017 09:20:38 GMT):
@bh4rtp Not 100% sure but i think fabric-client is compiled locally. You could see the `file` option in `package.json`

bh4rtp (Fri, 14 Jul 2017 09:28:08 GMT):
@SotirisAlfonsos you are absolutely right. i changed the package.json to specify file option. it does work.

jaswanth (Fri, 14 Jul 2017 10:16:34 GMT):
`curl -sSL https://goo.gl/iX9dek | bash` is not working..can anyone tell me an another link to download platform specific docker images

jimthematrix (Fri, 14 Jul 2017 12:52:26 GMT):
@praveennagpal chaincode executes business logic so it's already part of the endorsing process. you can do a lot of checks in the chaincode. one thing you should NOT do is writing non-deterministic chaincodes, which will result in endorsing peers not agreeing with the result of the transaction, and hence rendering the transaction invalid

FollowingGhosts (Fri, 14 Jul 2017 13:49:27 GMT):
How do I connect to an existing channel from within the node sdk?

tejasborawake (Fri, 14 Jul 2017 14:44:36 GMT):
Hi I am facing this error while adding new ORG in balance transfer example:failed: Failed getting affiliation 'org3.department1': sql: no rows in result set i have changed cryptogen.yaml,configtx.yaml and generated certificates ,genesis.block and mychannel.tx accordingly.

tejasborawake (Fri, 14 Jul 2017 14:44:36 GMT):
Hi @jimthematrix , I am facing this error while adding new ORG in balance transfer example: failed: Failed getting affiliation 'org3.department1': sql: no rows in result set i have changed cryptogen.yaml,configtx.yaml and generated certificates ,genesis.block and mychannel.tx accordingly. could you please let me know what am i missing? dockers for ORG3 and its CA are working. I get this error while trying to register new user to get ORG3_Token on 3rd ORG.

mescoba1 (Fri, 14 Jul 2017 16:41:43 GMT):
Was anyone able to test the sdk using CouchDB as the d

mescoba1 (Fri, 14 Jul 2017 16:41:43 GMT):
Was anyone able to test the sdk using CouchDB as the db provider?

Tigermisu (Fri, 14 Jul 2017 21:00:30 GMT):
Does anyone know of an example of using the SDK to query/invoke on an existing network?

bh4rtp (Sat, 15 Jul 2017 14:38:24 GMT):
@mescoba1 couchdb is easy to customize. you can take fabric/examples/e2e_cli as an example.

bh4rtp (Sat, 15 Jul 2017 14:40:41 GMT):
@Tigermisu i am referring the fabric-samples/balance-transfer as the example.

bh4rtp (Sat, 15 Jul 2017 14:59:07 GMT):
who can tell me what is the use of `jwt_expiretime` and `eventWaitTime` in the fabric-samples/balance-transfer/config.json? are these settings needed to change combined with `request-timeout` in `fabric-client/config/default.json`?

bh4rtp (Sat, 15 Jul 2017 14:59:07 GMT):
who can tell me what is the use of `jwt_expiretime` and `eventWaitTime` in the `fabric-samples/balance-transfer/config.json`? are these settings needed to change combined with `request-timeout` in `fabric-client/config/default.json`?

bh4rtp (Sat, 15 Jul 2017 14:59:07 GMT):
who can tell me what is the use of `jwt_expiretime` and `eventWaitTime` in the `fabric-samples/balance-transfer/config.json`? are these settings needed to change combined with `request-timeout` in `fabric-client/config/default.json` if the network is delayed?

mescoba1 (Sat, 15 Jul 2017 21:47:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ofvAyMJSgyAMwrbbe) @bh4rtp Do you happen to know why I get a port error when running `gulp test` ?

smfaizalkhan (Sun, 16 Jul 2017 08:07:36 GMT):
@jim the Matrix Thanks for the reply,My understanding is each peer ,orderer will be seprate physical machines which will have the chaicode as an image installed on top of hyperledger fabric ,thats how they maintain the world state.Now how to form a network between these all physical machines using docker

RezwanKabir (Mon, 17 Jul 2017 07:23:43 GMT):
How to add new peer on any organisation and setup new organisation?. Also how to generate new private key and certificate for new peers. any reference would be appreciated.

dushyantbehl (Mon, 17 Jul 2017 07:56:30 GMT):
Has joined the channel.

swangbj (Mon, 17 Jul 2017 08:18:13 GMT):

Message Attachments

swangbj (Mon, 17 Jul 2017 08:18:26 GMT):
Hi , anybode have met this error before ?

aakanshaparmar (Mon, 17 Jul 2017 09:08:38 GMT):
Has joined the channel.

rishabh1102 (Mon, 17 Jul 2017 13:51:13 GMT):
cd :q

rishabh1102 (Mon, 17 Jul 2017 14:03:22 GMT):
Is there a simple script just to invoke the chaincode (I have already set up the network)

rishabh1102 (Mon, 17 Jul 2017 14:04:04 GMT):
I tried running the invoke.js provided with fabcar (fabric samples)

rishabh1102 (Mon, 17 Jul 2017 14:04:11 GMT):
But it gives me a certificate error

rishabh1102 (Mon, 17 Jul 2017 14:04:39 GMT):
"error: x509: certificate signed by unknown authority. Do you know the reason?"

Vadim (Mon, 17 Jul 2017 14:07:46 GMT):
@rishabh1102 seems the network you set up uses different root certificate than the fabcar example

rishabh1102 (Mon, 17 Jul 2017 14:08:33 GMT):
I tried changing the link, but it didn't work still

rishabh1102 (Mon, 17 Jul 2017 14:08:45 GMT):
Also the PeerAdmin Public and private key seems to be hardcode

rishabh1102 (Mon, 17 Jul 2017 14:08:47 GMT):
hardcoded*

rishabh1102 (Mon, 17 Jul 2017 14:08:55 GMT):
q

mescoba1 (Mon, 17 Jul 2017 18:12:10 GMT):
When testing e2e, what pass rate is acceptable if any? I cannot seem to get 100% pass

jimthematrix (Tue, 18 Jul 2017 02:39:56 GMT):
@FollowingGhosts as long as the app/sdk has access to the certificates belonging to one of the channel's participating orgs, it can connect to the channel, details see https://github.com/hyperledger/fabric-sdk-node/blob/release/test/integration/e2e/invoke-transaction.js

jimthematrix (Tue, 18 Jul 2017 02:55:26 GMT):
@tejasborawake it looks like your fabric-ca has not been configured to have a group called "org3.department1". you need to set up the server with a custom config file using the FABRIC_CA_CONFIG environment variable, see this file as an example: https://github.com/hyperledger/fabric-ca/blob/release/testdata/ca/rootca/ca1/fabric-ca-server-config.yaml

anik (Tue, 18 Jul 2017 04:49:18 GMT):
can we have fabric set up on vagrant with nodesdk client ?Did not find any document around it like we have for java sdk client

akdj (Tue, 18 Jul 2017 07:08:00 GMT):
Hi everyone, I want to use my own csr to generate certificate for enrollment, like: https://fabric-sdk-node.github.io/FabricCAClient.html#enroll__anchor but I saw that in the balance-transfer example, it used another enroll method, https://fabric-sdk-node.github.io/FabricCAServices.html#enroll__anchor Need to know if I can change it? How to change it? I mean... `var copService = require('fabric-ca-client'); ` did I need to change this to a specific js file?

akdj (Tue, 18 Jul 2017 07:08:00 GMT):
Hi everyone, I want to use my own csr to generate certificate for enrollment, like: https://fabric-sdk-node.github.io/FabricCAClient.html#enroll__anchor but I saw that in the balance-transfer example, it used another enroll method, https://fabric-sdk-node.github.io/FabricCAServices.html#enroll__anchor is there an example with the first enroll method? i noticed that also resgister need to be changed but don't know how to create signingIdentity

zhasni (Tue, 18 Jul 2017 07:43:14 GMT):
[reply for this problem](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MqdMZdhcm4ZGKE7S4) @qizhang to fix the context deadline exceeded check this env variable ``` - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=YOUR_CHANNEL_NAME_default ``` thx to mariogemoll

zhasni (Tue, 18 Jul 2017 07:43:14 GMT):
[reply for this problem](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MqdMZdhcm4ZGKE7S4) @qizhang to fix the ```context deadline exceeded``` error, check this env variable ``` - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=YOUR_CHANNEL_NAME_default ``` thx to mariogemoll

zhasni (Tue, 18 Jul 2017 07:43:14 GMT):
[reply for this problem](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MqdMZdhcm4ZGKE7S4) @qizhang to fix the `context deadline exceeded` error, check this env variable ``` - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=YOUR_CHANNEL_NAME_default ``` thx to mariogemoll

zhasni (Tue, 18 Jul 2017 07:43:14 GMT):
[](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MqdMZdhcm4ZGKE7S4) @qizhang to fix the `context deadline exceeded` error, check this env variable ``` - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=YOUR_CHANNEL_NAME_default ``` thx to mariogemoll

zhasni (Tue, 18 Jul 2017 07:43:14 GMT):
@qizhang to fix the `context deadline exceeded` error, check this env variable ``` - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=YOUR_CHANNEL_NAME_default ``` thx to mariogemoll

FollowingGhosts (Tue, 18 Jul 2017 08:27:11 GMT):
Does anyone know why I'd get the following error? ```this._signingIdentity._signer._key.getSKI is not a function

FollowingGhosts (Tue, 18 Jul 2017 08:27:24 GMT):
this is in the context of a user object

ShenthilkumarCK (Tue, 18 Jul 2017 10:55:03 GMT):
Hi, anyone can help me how to get a new creds folder keys for fabric-samples/fabcar ? I would like to create a new set of values like this.

Vadim (Tue, 18 Jul 2017 11:12:43 GMT):
@ShenthilkumarCK http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#crypto-generator

ShenthilkumarCK (Tue, 18 Jul 2017 11:14:34 GMT):
@Vadim , while I am generating and using i am getting the error as "Endpoint read failed"

ShenthilkumarCK (Tue, 18 Jul 2017 11:15:09 GMT):
@Vadim, Thanks. I am stuck at this point

Vadim (Tue, 18 Jul 2017 11:16:12 GMT):
@ShenthilkumarCK have you replaced the MSP certs at peers/orderers/cas of your network?

ShenthilkumarCK (Tue, 18 Jul 2017 11:18:52 GMT):
@Vadim, Sorry I did not do. can give me somemore details so I can try that

sativ (Tue, 18 Jul 2017 12:09:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Kv9Py6CyRDCXzmFkn) @outis Hi, did you manage to figure this out? I am having the same issue now. thanks

ecn (Tue, 18 Jul 2017 12:33:35 GMT):
Hello, is there a way to get all the transactions of my network ?

akdj (Tue, 18 Jul 2017 12:47:31 GMT):
Hi everyone, I want to use my own csr to generate certificate for enrollment, like: https://fabric-sdk-node.github.io/FabricCAClient.html#enroll__anchor but I saw that in the balance-transfer example, it used another enroll method, https://fabric-sdk-node.github.io/FabricCAServices.html#enroll__anchor is there an example with the first enroll method? i noticed that also resgister need to be changed but don't know how to create signingIdentity

mastersingh24 (Tue, 18 Jul 2017 13:28:47 GMT):
@akdj - why would you need to change register?

akdj (Tue, 18 Jul 2017 13:30:09 GMT):
@mastersingh24 to able to use csr in `enroll(enrollmentID, enrollmentSecret, csr)`

mastersingh24 (Tue, 18 Jul 2017 13:30:52 GMT):
`register` just creates the enrollmentID and enrollmentSecret that you would use in the call above

akdj (Tue, 18 Jul 2017 13:31:33 GMT):
because I want to write a enrollment service server application, and a client application, which will ask to be enroll to the enrollment service server application

akdj (Tue, 18 Jul 2017 13:32:02 GMT):
ok

mastersingh24 (Tue, 18 Jul 2017 13:32:02 GMT):
And still use the fabric-ca ?

akdj (Tue, 18 Jul 2017 13:32:11 GMT):
yes

mastersingh24 (Tue, 18 Jul 2017 13:32:24 GMT):
So you should not need to change `register`

akdj (Tue, 18 Jul 2017 13:32:45 GMT):
because I see `register(enrollmentID, enrollmentSecret, role, affiliation, maxEnrollments, attrs, signingIdentity)` in the same classe of `enroll(enrollmentID, enrollmentSecret, csr)`

akdj (Tue, 18 Jul 2017 13:32:45 GMT):
because I noticed`register(enrollmentID, enrollmentSecret, role, affiliation, maxEnrollments, attrs, signingIdentity)` in the same classe of `enroll(enrollmentID, enrollmentSecret, csr)`

akdj (Tue, 18 Jul 2017 13:32:45 GMT):
because I noticed `register(enrollmentID, enrollmentSecret, role, affiliation, maxEnrollments, attrs, signingIdentity)` in the same classe of `enroll(enrollmentID, enrollmentSecret, csr)`

mastersingh24 (Tue, 18 Jul 2017 13:33:14 GMT):
To use `enroll(enrollmentID, enrollmentSecret, csr)` you'll need to generate a private key, create and sign a PKCS#10 csr and submit the bytes of the csr as the csr param

mastersingh24 (Tue, 18 Jul 2017 13:33:40 GMT):
They are independent functions though

akdj (Tue, 18 Jul 2017 13:33:48 GMT):
yes, I did this in a first time

akdj (Tue, 18 Jul 2017 13:33:48 GMT):
yes, I did this in a first time @mastersingh24

akdj (Tue, 18 Jul 2017 13:34:58 GMT):
but i seems it doesn't work, if i don't change `var copService = require('fabric-ca-client');` to `var copService = require('fabric-ca-client').FabricCAClient `

akdj (Tue, 18 Jul 2017 13:35:48 GMT):
and then, when I changed to var copService = require('fabric-ca-client').FabricCAClient, it displayed that I need to add arguments to register method

eetti (Tue, 18 Jul 2017 14:06:34 GMT):
@here Is there a way I an check if the peer is alive?

eetti (Tue, 18 Jul 2017 14:06:34 GMT):
@here Is there a way I an check if the peer is alive? I am trying to avoid the error *Endpoint read failed*

eetti (Tue, 18 Jul 2017 14:16:14 GMT):
@here For the Peer class, what does request-timeout do when set as a connection option.

mbochu (Tue, 18 Jul 2017 14:16:43 GMT):
Has joined the channel.

zhasni (Tue, 18 Jul 2017 14:17:46 GMT):
stop using @ here plz @eetti

eetti (Tue, 18 Jul 2017 14:18:31 GMT):
@zhasni this is very urgent, do you have an answer to my question?

zhasni (Tue, 18 Jul 2017 14:20:53 GMT):
no sorry

mbochu (Tue, 18 Jul 2017 14:26:28 GMT):
Hi ! I'm a beginer with the fabric-sdk-node and when I run the npm test, two tests don't pass. I want to know if this is a problem with my computer or if this is due to the development of the SDK ?

zhasni (Tue, 18 Jul 2017 14:29:42 GMT):
which test are failing ?

mbochu (Tue, 18 Jul 2017 14:30:30 GMT):
the 581 and 582 apparently ^^

xixuejia (Tue, 18 Jul 2017 14:41:25 GMT):
@eetti there is a cli `CORE_PEER_ADDRESS= peer node status` to check whether the peer is STARTED

xixuejia (Tue, 18 Jul 2017 14:42:29 GMT):
*Endpoint read* may mean the peer is unavailable

xixuejia (Tue, 18 Jul 2017 14:42:29 GMT):
*Endpoint read failed* may mean the peer is unavailable

xixuejia (Tue, 18 Jul 2017 14:42:55 GMT):
it may be caused by network issue, proxy, etc...

mrkiouak (Tue, 18 Jul 2017 18:36:01 GMT):
is sdk to peer tls mutual auth now?

mrkiouak (Tue, 18 Jul 2017 18:36:01 GMT):
is sdk to peer tls mutual auth now? https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Pm8cykyiGTW5buQfA

mrkiouak (Tue, 18 Jul 2017 18:38:59 GMT):
and if so, how can i set tls crypto vs endorsement crypto in user context a la ``` var userSpec = { username: config.identity.principal, mspid: config.identity.mspid, cryptoContent: { privateKeyPEM:config.identity.privatekey, signedCertPEM: config.identity.certificate, *tlsprivateKeyPEM: config.identity.tlsprivatekey*, *tlssignedCertPEM: config.identity.tlscertificate* }}; return client.createUser(userSpec);```

beatrider (Tue, 18 Jul 2017 20:51:14 GMT):
Has joined the channel.

mescoba1 (Tue, 18 Jul 2017 21:30:27 GMT):
When I try creating network using byfn.sh, I get `cryptogen tool not found. exiting` Does anyone know why I could be getting this error? Is there something I missed when cloning fabric-examples?

mrkiouak (Tue, 18 Jul 2017 21:36:55 GMT):
Could someone take a look at this log: https://pastebin.com/m203005k and let me know what they think the area of the issue is? I get this output https://pastebin.com/88ehQQsu when attempting to use enrolment cert & key as per beta2 single cert & key used for both tls and enrollment. AFAIK, since the aforementioned tls & enrollment split, unless i provide the user crypto content: privateKeyPEM & signedCertPEM, i fail to pass a tls handshake with any peer, orderer etc. ( as seen in https://pastebin.com/88ehQQsu). However, obviously, when i do provide the tls cert & key as the two aforementioned fields, tls handshake completes, but e.g. channel install new cc fails because the sdk uses the tls key to sign the install proposal. I am assuming I need to set a second key & cert for enrollment now that tls is working, but its not clear to me that the sdk has any functionality to actually do this, and none of the v1 updated examples in fabric-sample seem to show separate certs for enrollment vs tls + sdk usage.

ssaddem (Tue, 18 Jul 2017 23:35:34 GMT):
hi all i got this following error module.js:597 return process.dlopen(module, path._makeLong(filename)); ^ Error: /opt/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/x509/build/Release/x509.node: invalid ELF header also im not familiar with node can any one explain to me please

ssaddem (Tue, 18 Jul 2017 23:36:24 GMT):
please tag me with @ to get the notification

jeffgarratt (Wed, 19 Jul 2017 02:09:47 GMT):
@mrkiouak the first issue appears to be that the requestor does NOT have access to the deliver interface for the channel be requested

jeffgarratt (Wed, 19 Jul 2017 02:09:47 GMT):
@mrkiouak the first issue appears to be that the requestor does NOT have access to the deliver function (On orderer) for the channel be requested

jeffgarratt (Wed, 19 Jul 2017 02:09:47 GMT):
@mrkiouak the first issue appears to be that the requestor does NOT have access to the deliver function (On orderer) for the channel being requested

jeffgarratt (Wed, 19 Jul 2017 02:15:54 GMT):
this would in general be due to the fact that the requestor's signature and supplied cert do NOT meet the channe's READER policy (i.e. are not in the root of trust of the CAs defined for the organizations MSPConfigs in that channel)

jeffgarratt (Wed, 19 Jul 2017 02:15:54 GMT):
this would in general be due to the fact that the requestor's signature and supplied cert do NOT meet the channel's READER policy

ShenthilkumarCK (Wed, 19 Jul 2017 03:12:07 GMT):
@mescoba1 http://hyperledger-fabric.readthedocs.io/en/latest/samples.html#download-platform-specific-binaries, follow this link. and keep the path updated.

SasagawaHiroshi (Wed, 19 Jul 2017 06:40:48 GMT):
Has joined the channel.

shinsa82 (Wed, 19 Jul 2017 07:38:00 GMT):
Has joined the channel.

ssaddem (Wed, 19 Jul 2017 07:47:37 GMT):
i all i got this following error module.js:597 return process.dlopen(module, path._makeLong(filename)); ^ Error: /opt/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/x509/build/Release/x509.node: invalid ELF header also im not familiar with node can any one explain to me please

shinsa82 (Wed, 19 Jul 2017 07:51:11 GMT):
If I want to install a Go chaincode (a Go package) that depends on another package, (1) Do I need to vendor the dependent package? (2) I don't need to vendor github.com/hyperledger/fabric? I'm using v1.0.0-beta due to some business reasons.

shinsa82 (Wed, 19 Jul 2017 07:51:11 GMT):
If I want to install a Go chaincode (a Go package) that depends on another package using Node SDK, (1) Do I need to vendor the dependent package? (2) I don't need to vendor github.com/hyperledger/fabric? I'm using v1.0.0-beta due to some business reasons.

Sujeeban (Wed, 19 Jul 2017 08:06:50 GMT):
Has joined the channel.

ssaddem (Wed, 19 Jul 2017 09:18:50 GMT):
hi all i got this following error module.js:597 return process.dlopen(module, path._makeLong(filename)); ^ Error: /opt/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/x509/build/Release/x509.node: invalid ELF header also im not familiar with node can any one explain to me please

anik (Wed, 19 Jul 2017 11:01:32 GMT):

Message Attachments

anik (Wed, 19 Jul 2017 11:02:42 GMT):
geeting above error while running npm install from inside node sdk on windows ..would appreciate any pointer on this ?

anik (Wed, 19 Jul 2017 11:03:35 GMT):

Message Attachments

mastersingh24 (Wed, 19 Jul 2017 11:06:07 GMT):
@anik - try `npm install --global --production windows-build-tools` and then install again

sativ (Wed, 19 Jul 2017 11:13:25 GMT):
hi guys, I'm running marbles app with RC1 docker images, and I am getting an error when the app checks for chaincode availability. I have installed and instantiated the chaincode, and I can use it from cli, but the node.js app is not working. I have looked up in the chat for similar problems, but couldn't find a solution. Struggling with it for several days. please have a look at the screenshot below

sativ (Wed, 19 Jul 2017 11:14:01 GMT):

Message Attachments

sativ (Wed, 19 Jul 2017 11:17:29 GMT):
basically there's a ssl error - certificate verify error. I assume it is trying to reach the peer to check for chaincode. below is the screenshot from docker ps command

sativ (Wed, 19 Jul 2017 11:17:43 GMT):

Message Attachments

anik (Wed, 19 Jul 2017 11:37:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wfQbGTQD9fB7MaGSj) @mastersingh24 no change still getting the same error.

mastersingh24 (Wed, 19 Jul 2017 11:38:50 GMT):
@anik - can you try `npm install x509` and see if we get more detailed error?

anik (Wed, 19 Jul 2017 11:46:50 GMT):

Message Attachments

anik (Wed, 19 Jul 2017 11:50:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=J6eL6CiWD6yMbtato) @mastersingh24 have removed node_module before running

anik (Wed, 19 Jul 2017 11:57:09 GMT):
@mastersingh24 this is what i get https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hK9cwYe7nToMc9ZzR

mastersingh24 (Wed, 19 Jul 2017 12:00:46 GMT):
are you just trying to use the Node SDK?

anik (Wed, 19 Jul 2017 12:08:31 GMT):
@mastersingh24 basically trying to run marble appf where fabric would run on vagrant and try to access via node-sdk which would run on windows .(have done something similar for java-sdk).So the first step to run Node-sdk

mastersingh24 (Wed, 19 Jul 2017 12:10:19 GMT):
So you should just be able to directly install the SDK via npm: `npm install fabric-client` `npm install fabric-ca-client`

anik (Wed, 19 Jul 2017 12:21:08 GMT):
@mastersingh24 so i dont need to clone the fabric-node-sdk make marble app work ?

mastersingh24 (Wed, 19 Jul 2017 12:21:43 GMT):
Should not need to

mastersingh24 (Wed, 19 Jul 2017 12:21:51 GMT):
Which marbles app are you trying to use?

mastersingh24 (Wed, 19 Jul 2017 12:23:43 GMT):
But I'm seeing the same issue as well :(

mastersingh24 (Wed, 19 Jul 2017 12:23:46 GMT):
Hang on a bit

anik (Wed, 19 Jul 2017 12:24:44 GMT):
sure

mastersingh24 (Wed, 19 Jul 2017 12:33:21 GMT):
OK - I figured this out but can you install http://slproweb.com/download/Win64OpenSSL-1_0_2L.exe and then give it another try?

vladyslavmunin (Wed, 19 Jul 2017 12:35:08 GMT):
hi

vladyslavmunin (Wed, 19 Jul 2017 12:35:18 GMT):
I got error on every invoke

vladyslavmunin (Wed, 19 Jul 2017 12:35:18 GMT):
rror: [BlockDecoder.js]: TypeError: proto_kv_rw_set.getNamespace is not a function at decodeReadWriteSets (D:\go\src\blockchain\middleware\node_modules\fabric-client\lib\BlockDecoder.js:1171:42)

vladyslavmunin (Wed, 19 Jul 2017 12:35:58 GMT):
but data successfully store in blockchain

ssaddem (Wed, 19 Jul 2017 13:18:12 GMT):
@mastersingh24 i have the same error on vagrant and on ubuntu 16.

ssaddem (Wed, 19 Jul 2017 13:18:12 GMT):
@mastersingh24 i have the same error on vagrant and on ubuntu 16.04 module.js:597 return process.dlopen(module, path._makeLong(filename)); ^ Error: /opt/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/x509/build/Release/x509.node: invalid ELF header

ssaddem (Wed, 19 Jul 2017 13:18:12 GMT):
@mastersingh24 i have the same error on vagrant and host ubuntu 16.04 module.js:597 return process.dlopen(module, path._makeLong(filename)); ^ Error: /opt/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/x509/build/Release/x509.node: invalid ELF header

akdj (Wed, 19 Jul 2017 13:39:08 GMT):
I want to use api:key , in my application, for instance var Key = require("xxxxxx"); var mykey = new Key(); so my question is, with what the xxxxxx need to be replaced?

mbochu (Wed, 19 Jul 2017 14:15:41 GMT):
Hi ! I have some issue when I run test with the network. I have launch the docker-compose up commande in a terminal and in a other I run the test but it's like the application can't find the network :/ '' not ok 8 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\fabric-client\lib\Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:204:12) at ClientDuplexStream._readsDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:169:8) at readCallback (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:229:12) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then.then.then (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\test\integration\create-configtx-channel.js:160:5) stack: |- Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\fabric-client\lib\Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:204:12) at ClientDuplexStream._readsDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:169:8) at readCallback (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:229:12) at Test.assert [as _assert] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:212:54) at Test.bound [as _assert] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:64:32) at Test.fail (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:277:10) at Test.bound [as fail] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:64:32) at Client.newDefaultKeyValueStore.then.then.then.then.then (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\test\integration\create-configtx-channel.js:160:5) at process._tickCallback (internal/process/next_tick.js:103:7) ''' Any solution ?

mbochu (Wed, 19 Jul 2017 14:15:41 GMT):
Hi ! I have some issue when I run test with the network. I have launch the docker-compose up commande in a terminal and in a other I run the test but it's like the application can't find the network :/ ''' not ok 8 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\fabric-client\lib\Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:204:12) at ClientDuplexStream._readsDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:169:8) at readCallback (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:229:12) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then.then.then (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\test\integration\create-configtx-channel.js:160:5) stack: |- Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\fabric-client\lib\Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:204:12) at ClientDuplexStream._readsDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:169:8) at readCallback (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:229:12) at Test.assert [as _assert] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:212:54) at Test.bound [as _assert] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:64:32) at Test.fail (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:277:10) at Test.bound [as fail] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:64:32) at Client.newDefaultKeyValueStore.then.then.then.then.then (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\test\integration\create-configtx-channel.js:160:5) at process._tickCallback (internal/process/next_tick.js:103:7) ''' Any solution ?

mbochu (Wed, 19 Jul 2017 14:15:41 GMT):
Hi ! I have some issue when I run test with the network. I have launch the docker-compose up commande in a terminal and in a other I run the test but it's like the application can't find the network :/ ``` not ok 8 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\fabric-client\lib\Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:204:12) at ClientDuplexStream._readsDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:169:8) at readCallback (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:229:12) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then.then.then (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\test\integration\create-configtx-channel.js:160:5) stack: |- Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\fabric-client\lib\Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:204:12) at ClientDuplexStream._readsDone (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:169:8) at readCallback (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\grpc\src\node\src\client.js:229:12) at Test.assert [as _assert] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:212:54) at Test.bound [as _assert] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:64:32) at Test.fail (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:277:10) at Test.bound [as fail] (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\node_modules\tape\lib\test.js:64:32) at Client.newDefaultKeyValueStore.then.then.then.then.then (C:\Users\A671975\go\src\github.com\hyperledger\fabric-sdk-node\test\integration\create-configtx-channel.js:160:5) at process._tickCallback (internal/process/next_tick.js:103:7) ``` Any solution ?

mastersingh24 (Wed, 19 Jul 2017 14:50:08 GMT):
[ Sadly I can't help with Vagrant - I never use it](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NmM9ttNL2Tjzet7ig) @ssaddem

mastersingh24 (Wed, 19 Jul 2017 14:50:08 GMT):
Sadly I can't help with Vagrant - I never use it (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NmM9ttNL2Tjzet7ig) @ssaddem

ssaddem (Wed, 19 Jul 2017 15:02:25 GMT):
@mastersingh24 thx :)

qizhang (Wed, 19 Jul 2017 15:22:05 GMT):
Hi, where can I find the chaincode that is used by e2e in fabric-sdk-node? THanks!

jimthematrix (Wed, 19 Jul 2017 15:39:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=v8prm7vr8gdJwFgq9) @mrkiouak with the node sdk you set the tls certs in the constructors for orderers and peers (https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js#L63), and the enrollment certs when constructing the user (https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js#L316). these two sets of crypto materials are clearly separated in the APIs. I would agree with the diagnosis from @jeffgarratt so you should double check the ecerts

mrkiouak (Wed, 19 Jul 2017 15:43:09 GMT):
@jimthematrix @jeffgarratt please see this Jira https://jira.hyperledger.org/browse/FAB-5370 I've opened reproducing the issue, and note that i specifically point out where i've set the enrollment certs for the user, thats the second log output-- this fails to communicate with any peer. There is no change in what is passed to the orderer or peer, only the user constructor. I'm then only able to connect with any install, instantiate or invoke when using the tls certs.

mrkiouak (Wed, 19 Jul 2017 15:43:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=W9pcyq8n35HBcCpsd) @jimthematrix BBalance-transfer does not show the (more minimal mind you) workflow I am refering to. Balance-transfer shows a user enrolling via fabric ca (see lines 203-222). Kindly show a user instantiatied via file read in certs, with successful interaction with orderer & peers without ca interaction (per https://jira.hyperledger.org/browse/FAB-5370?filter=-2 which uses all pre-existing beta1, beta2, rc1 & release-1 code) and i'm happy to be shown im doing something incorrectly. AFA the balance-transfer userspace code appears to suggest, it is a different workflow.

rameshthoomu (Wed, 19 Jul 2017 16:05:24 GMT):
@jimthematrix @bretharrison could you please look into these failures.. I see this is happening more frequently https://jenkins.hyperledger.org/view/fabric-sdk-node/job/fabric-sdk-node-merge-x86_64/397/console

bretharrison (Wed, 19 Jul 2017 16:10:21 GMT):
@rameshthoomu I am looking

bretharrison (Wed, 19 Jul 2017 16:31:08 GMT):
@rameshthoomu our latest build is OK https://gerrit.hyperledger.org/r/#/c/11557/

bretharrison (Wed, 19 Jul 2017 16:31:08 GMT):
@rameshthoomu our latest build is OK https://gerrit.hyperledger.org/r/#/c/11557/

rameshthoomu (Wed, 19 Jul 2017 16:32:29 GMT):
ok. Will look for the latest merge build

jimthematrix (Wed, 19 Jul 2017 17:01:03 GMT):
@mrkiouak please refer to the balance-transfer sample in fabric-samples repo, that demonstrates how to set the two sets of crypto materials for tls vs. signing. the problem you were observing is not a problem with the SDK

ssaddem (Wed, 19 Jul 2017 17:17:20 GMT):
@mastersingh24 i have the same problem with ubuntu 16.04 without vagrant

mrkiouak (Wed, 19 Jul 2017 17:35:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=W9pcyq8n35HBcCpsd) @jimthematrix balance transfers hows fabric-ca user population at userspace/app/helper.js 203-221) https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/helper.js#L204. Please actually refer to https://jira.hyperledger.org/browse/FAB-5370 which uses pre-existing beta1, beta2 (broken by rc1, specifically the linked tls change), rc1, v1 release code to see the issue I am pointing to. Happy to stand corrected, but balance-transfer as referenced does not reproduce the workflow i am referring to and have reported an issue with.

mrkiouak (Wed, 19 Jul 2017 17:35:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=W9pcyq8n35HBcCpsd) @jimthematrix balance transfers shows fabric-ca user population at userspace/app/helper.js 203-221) https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/helper.js#L204. Please actually refer to https://jira.hyperledger.org/browse/FAB-5370 which uses pre-existing beta1, beta2 (broken by rc1, specifically the linked tls change), rc1, v1 release code to see the issue I am pointing to. Happy to stand corrected, but balance-transfer as referenced does not reproduce the workflow i am referring to and have reported an issue with.ssss

jimthematrix (Wed, 19 Jul 2017 17:49:33 GMT):
https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js#L316 - shows how a user is enrolled with admin keys and certs without fabric-ca, which is what I think you are trying to do

jimthematrix (Wed, 19 Jul 2017 17:49:45 GMT):
@mrkiouak ^^^

vdods (Wed, 19 Jul 2017 20:35:41 GMT):
Hi all, just want to confirm the following. I just upgraded everything (peer, ca, orderer, fabric-sdk-node) from v1.0.0-alpha2 to v1.0.0. It seems that the non-static Client method newCryptoSuite has been replaced with a static method BaseClient.newCryptoSuite. Is that correct?

mrkiouak (Wed, 19 Jul 2017 21:48:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qd9Hz2QtuPjZyP7av) @jimthematrix Yes, I do do that. And with the minimal setup, when I do this with enrollment certs, the client connection fails. When I do it with TLS certs, the connection works. Thats what the two output logs are showing. Literally the only change made is what certs are passed to the user on construction-- no orderer, peer, etc config changes. I'm under the imperssion sdk communication is not mutual auth, but that would be an explanation for this behavior. If you can show a user constructed via cert files passed in as args, and ithen nvoking a transaction without any of the other confounding activities that happen in balance-transfer, i'm happy to take a look. I do recommend you look at the isolated example i reference-- as what you're describing doing as I understand you does not successfully complete handshake.

mrkiouak (Wed, 19 Jul 2017 21:52:26 GMT):
^^^^^ @jimthematrix it is possible that some other change was introduced between beta2->rc1, and the tls/msp split is merely a red herring/not a root cause-- but the tls handshake failure with enrollment cert passed to user seem to indicate its a tls/msp related issue. This is very reproducable with example only code, documented in https://jira.hyperledger.org/browse/FAB-5370

vdods (Wed, 19 Jul 2017 22:51:30 GMT):
How does one poll the orderer to see if channel creation has been successful? Maybe just by attempting to getGenesisBlock until it succeeds or times out?

vdods (Wed, 19 Jul 2017 22:51:30 GMT):
How does one poll the orderer to see if channel creation has been successful? Maybe just by attempting to getGenesisBlock over and over until it succeeds or a pre-set timeout occurs to indicate failure?

vdods (Wed, 19 Jul 2017 23:33:50 GMT):
Also, the requirement to specify the "targets" key in the ChaincodeInstallRequest argument of client.installChaincode is not present in the documentation.

jimthematrix (Thu, 20 Jul 2017 01:54:10 GMT):
@vdods yes on the static method change, note that the Client class extends BaseClient so the static methods is available on Client

jimthematrix (Thu, 20 Jul 2017 01:55:24 GMT):
yes on calling getGenesisBlock() until it returns a successful response

jimthematrix (Thu, 20 Jul 2017 01:57:11 GMT):
your are right about the jsdoc missing the "targets" property. do you mind opening a bug in JIRA?

jaswanth (Thu, 20 Jul 2017 05:34:41 GMT):
hi all .. iam getting some errors in instantiation of chaincode .. it's running good in alpha-3 version ..when I dstarted using rc1 its givving me the below error ```error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/jaswanth/fabric-app/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/jaswanth/fabric-app/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-07-19 18:22:53.046] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

jaswanth (Thu, 20 Jul 2017 05:34:41 GMT):
hi all .. iam getting some errors in instantiation of chaincode .. it's running good in alpha-3 version ..but in rc1 version its givving me the below error ```error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/jaswanth/fabric-app/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/jaswanth/fabric-app/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-07-19 18:22:53.046] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

jaswanth (Thu, 20 Jul 2017 05:34:41 GMT):
hi all ..trying to run balance tra=nsfer example in fabric .etting some errors in instantiation of chaincode .. it's running good in alpha-3 version ..but in rc1 version its givving me the below error ```error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/jaswanth/fabric-app/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/jaswanth/fabric-app/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-07-19 18:22:53.046] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

jaswanth (Thu, 20 Jul 2017 05:34:41 GMT):
hi all ..trying to run balance transfer example in fabric .Getting some errors in instantiation of chaincode .. it's running good in alpha-3 version ..but in rc1 version its givving me the below error ```error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/jaswanth/fabric-app/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/jaswanth/fabric-app/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-07-19 18:22:53.046] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-07-19 18:22:53.047] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

qiushaoxi (Thu, 20 Jul 2017 05:39:41 GMT):
Has joined the channel.

anik (Thu, 20 Jul 2017 05:41:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ijwG9uS328mRpar9o) @mastersingh24 it seems to have worked.i ran npm install from node-sdk and did not go for npm install fabric-client` `npm install fabric-ca-client. many thanks

qiushaoxi (Thu, 20 Jul 2017 05:41:30 GMT):
hello everyone, call queryByBlockNum , why header of block do not have current hash field?

mbochu (Thu, 20 Jul 2017 07:05:53 GMT):
Someone can help me please :disappointed_relieved: [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xihHXqxTjQo4sBvNf)

outis (Thu, 20 Jul 2017 07:22:42 GMT):
what is the name of the property to specify an endorsement policy when one `sendInstantiateProposal`? According to https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest, ``` request.endorsement-policy = "{ identities: [ { role: { name: "member", mspId: "org1" }}, { role: { name: "member", mspId: "org2" }} ], policy: { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } }" ``` Does this really work? Anyone knows an example? (I searched the sdk-node repository, and found none)

outis (Thu, 20 Jul 2017 07:22:42 GMT):
what is the name of the property to specify an endorsement policy when one `sendInstantiateProposal`? According to https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest, it will be something like ``` request.endorsement-policy = "{ identities: [ { role: { name: "member", mspId: "org1" }}, { role: { name: "member", mspId: "org2" }} ], policy: { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } }" ``` Does this really work? Anyone knows an example? (I searched the sdk-node repository, and found none)

outis (Thu, 20 Jul 2017 07:22:42 GMT):
what is the name of the property to specify an endorsement policy when one `sendInstantiateProposal`? According to https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest, it will be something like ``` request.endorsement-policy = "{ identities: [ { role: { name: "member", mspId: "org1" }}, { role: { name: "member", mspId: "org2" }} ], policy: { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } }" ``` Does this really work? Anyone knows an example? (I searched the sdk-node repository, and found none)

outis (Thu, 20 Jul 2017 07:22:42 GMT):
what is the name of the property to specify an endorsement policy when one `sendInstantiateProposal`? According to https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest, it will be something like ``` request.endorsement-policy = { identities: [ { role: { name: "member", mspId: "org1" }}, { role: { name: "member", mspId: "org2" }} ], policy: { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } } ``` Does this really work? Anyone knows an example? (I searched the sdk-node repository, and found none)

outis (Thu, 20 Jul 2017 08:04:43 GMT):
According to https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest, one can set `endorsement-policy` in a request, but this gives a simple javascript error because of `-`. What is the correct property name for setting an endorsement policy?

sativ (Thu, 20 Jul 2017 09:06:16 GMT):
Hi all, i have a question regarding queryByChaincode method (https://fabric-sdk-node.github.io/Channel.html#queryByChaincode) in my marbles code, it looks like this: ``` // send proposal to peer var request = { chainId: options.channel_id, chaincodeId: options.chaincode_id, chaincodeVersion: options.chaincode_version, fcn: options.cc_function, args: options.cc_args, txId: chain.buildTransactionID(nonce, obj.submitter), nonce: nonce, }; logger.debug('[fcw] Sending query req', debug); chain.queryByChaincode(request //nothing ).then(... ```

sativ (Thu, 20 Jul 2017 09:06:16 GMT):
Hi all, i have a question regarding queryByChaincode method (https://fabric-sdk-node.github.io/Channel.html#queryByChaincode) in my marbles code, it looks like this: ``` // send proposal to peer var request = { chainId: options.channel_id, chaincodeId: options.chaincode_id, chaincodeVersion: options.chaincode_version, fcn: options.cc_function, args: options.cc_args, txId: chain.buildTransactionID(nonce, obj.submitter), nonce: nonce, }; logger.debug('[fcw] Sending query req', debug); chain.queryByChaincode(request //nothing ).then(... ``` but when I run it, I get error that 'chain.buildTransactionID' is not a function what should I use to get txID? thanks!

MartinC (Thu, 20 Jul 2017 09:12:12 GMT):
@sativ Client.newTransactionID() see https://fabric-sdk-node.github.io/Client.html#newTransactionID__anchor

sativ (Thu, 20 Jul 2017 09:18:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kJq9dvdzbqQSXzrzP) @MartinC Thanks! and how can I get the 'client' object to request newTransactionID() method?

sativ (Thu, 20 Jul 2017 09:18:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kJq9dvdzbqQSXzrzP) @MartinC Thanks! and how can I get the 'client' object to request newTransaction() method?

MartinC (Thu, 20 Jul 2017 09:20:34 GMT):
In my code I do `const Client = require('fabric-client/lib/Client');` Client is the main class to use with the SDK as it allows user context to be set up etc.

sativ (Thu, 20 Jul 2017 09:33:52 GMT):
Just tried that, but when I run it, it says `newTransactionID is not a function` ... I'll try to figure it out, thanks @MartinC !

MartinC (Thu, 20 Jul 2017 09:37:58 GMT):
You will probably need to run it against a client instance rather than the class itself. Some pseudo code: ```var myClient = new Client(); //Do client config stuff like create User and set state store etc var txId = myClient.newTransactionID() ```

sativ (Thu, 20 Jul 2017 10:59:03 GMT):
Got it working! I'll leave it here in case if anyone will look for something like that for marbles: ``` var TransactionID = require('fabric-client/lib/TransactionID.js'); ... var userContext = chain._clientContext.getUserContext(); ... txID : new TransactionID(userContext); ```

sativ (Thu, 20 Jul 2017 10:59:03 GMT):
Got it working! I'll leave it here in case if anyone will look for something like that for marbles: in *query_cc.js* ``` var TransactionID = require('fabric-client/lib/TransactionID.js'); ... var userContext = chain._clientContext.getUserContext(); ... txID : new TransactionID(userContext); ```

sativ (Thu, 20 Jul 2017 10:59:03 GMT):
Got it working! I'll leave it here in case if anyone will look for something like that for marbles: in query_cc.js ``` var TransactionID = require('fabric-client/lib/TransactionID.js'); ... var userContext = chain._clientContext.getUserContext(); ... txID : new TransactionID(userContext); ```

tom.appleyard (Thu, 20 Jul 2017 12:22:34 GMT):
Hey all, I'm trying to register a new user and getting this error: (node:89777) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: fabric-ca request register failed with errors [[{"code":0,"message":"Failed getting affiliation '': sql: no rows in result set"}]]

tom.appleyard (Thu, 20 Jul 2017 12:22:34 GMT):
Hey all, I'm trying to register a new user and getting this error: `(node:89777) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: fabric-ca request register failed with errors [[{"code":0,"message":"Failed getting affiliation '': sql: no rows in result set"}]]`

tom.appleyard (Thu, 20 Jul 2017 12:22:50 GMT):
how would I set an affiliation?

vladyslavmunin (Thu, 20 Jul 2017 12:27:51 GMT):
Hi . I got error "sendPeersProposal - Promise is rejected: Error: Endpoint read failed" on each transaction

vladyslavmunin (Thu, 20 Jul 2017 12:28:20 GMT):
can anyone help ?

sativ (Thu, 20 Jul 2017 12:29:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RudhkZXx7YvAJi3qk) Have just figured this one out. Error is due to an incorrect configuration in _config.json_ of node.js application. To set it up correctly for TLS enabled network - every certificate should have a name and a certificate itself. name should be the same as generated pem files by _cryptogen_ tool. This tool is parsing _crypto-config.yaml_ file. So to get correct names, one should look in crypto-config.yaml. Name is a combination of "hostname + domain". Certificate can be either a plain text, or a path to a file. Will leave this info here in case if anyone will get `ssl3_get_server_certificate:certificate verify failed` error

cbf (Thu, 20 Jul 2017 12:36:44 GMT):
@jimthematrix NB https://stackoverflow.com/questions/45193218/npm-fails-installing-fabric-ca-client - you may want to update the docs to reflect this caveat

gauthampamu (Thu, 20 Jul 2017 12:38:19 GMT):
https://chat.hyperledger.org/channel/fabric-ca?msg=TyRKdy8p3pgmTM4rW @jimthematrix The first-network sample in fabric-samples uses the cryptogen tool and I wanted to find out how to get the node SDK to read the cryptogen identity info from disk.

mastersingh24 (Thu, 20 Jul 2017 12:42:48 GMT):
@gauthampamu : https://fabric-sdk-node.github.io/User.html#setEnrollment__anchor https://fabric-sdk-node.github.io/Client.html#setUserContext__anchor

jrosmith (Thu, 20 Jul 2017 13:40:06 GMT):
Hey all, can anyone give me more insight into how FabricCAServices is registering and enrolling users? I'm registering and enrolling a user with the following structure: ``` { enrollmentID: 'User1', role: 'client', attrs: [ { name:'role', value:'client' }, { name:'region', value:'US'}, { name:'email', value:'user1@example.com'} ] } ``` but when I go to retrieve that user later I'm returned the following: ``` { _affiliation: "", _cryptoSuite: CryptoSuite_ECDSA_AES, _enrollmentSecret: "IhVpydTFokEr", _identity: Identity, _mspID: "Org1MSP", _name: "User1", _roles: null, _signingIdentity: SigningIdentity, } ``` In my registration function I explicitly set the registration affiliation to be `'user1.department1`, but in the returned object both `_affiliation` and `_roles` are not set. I've tried looking through the source code for FabricCAServices, and by extension FabricCAClient, but I don't see where the user object being passed in is converted into the structure of the user object being returned.

jrosmith (Thu, 20 Jul 2017 13:40:06 GMT):
Hey all, can anyone give me more insight into how FabricCAServices is registering and enrolling users? I'm registering and enrolling a user with the following structure: ``` { enrollmentID: 'User1', role: 'client', attrs: [ { name:'role', value:'client' }, { name:'region', value:'US'}, { name:'email', value:'user1@example.com'} ] } ``` but when I go to retrieve that user later I'm returned the following: ``` { _affiliation: "", _cryptoSuite: CryptoSuite_ECDSA_AES, _enrollmentSecret: "IhVpydTFokEr", _identity: Identity, _mspID: "Org1MSP", _name: "User1", _roles: null, _signingIdentity: SigningIdentity, } ``` In my registration function I explicitly set the registration affiliation to be `'user1.department1'`, but in the returned object both `_affiliation` and `_roles` are not set. I've tried looking through the source code for FabricCAServices, and by extension FabricCAClient, but I don't see where the user object being passed in is converted into the structure of the user object being returned.

jimthematrix (Thu, 20 Jul 2017 13:50:36 GMT):
@cbf will do, thanks for the heads up

zemtsov (Thu, 20 Jul 2017 13:53:08 GMT):
Has joined the channel.

zemtsov (Thu, 20 Jul 2017 13:54:31 GMT):
Hi. I'm trying to create a channel with Node SDK and getting the following error: ```error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST```. Is there a way to find out what exactly goes wrong?

jrosmith (Thu, 20 Jul 2017 13:54:52 GMT):
@zemtsov check the orderer logs

zemtsov (Thu, 20 Jul 2017 13:55:54 GMT):
Thanks! Looks my configtx.yaml is wrong: ```Attempted to include a member which is not in the consortium ```

zemtsov (Thu, 20 Jul 2017 13:56:00 GMT):
will try to fix it

jimthematrix (Thu, 20 Jul 2017 15:22:22 GMT):
@cbf for the issue above re: x509 module, I just provided a fix https://gerrit.hyperledger.org/r/#/c/11777/

vinay_g (Thu, 20 Jul 2017 15:31:39 GMT):
Has joined the channel.

akdj (Thu, 20 Jul 2017 16:16:03 GMT):
hello, can anyone help me? I get a privare key and CSR with jsrsasign KEYUTIL and module:api.Key, and with the csr, I succeed to get an enrollmentCert, now I created a new User, and the_new_user.setEnrollment, and client.setUserContext(the_new_user) However, when I check the generate enrollment file, i have this : ``` {"name":"b12345666","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"FLwpHQfgXJKX","enrollment":{}} ```

akdj (Thu, 20 Jul 2017 16:16:41 GMT):
instead of something like : ``` {"name":"admin","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"e1373b998305e4dc168baddd8f209113a441de670679dfacaa181ae9af908d45","identity":{"certificate":"-----BEGIN CERTIFICATE-----\nMII................................................qjjp3cjg3AQ0qw=\n-----END CERTIFICATE-----\n"}}} ```

Codegidi (Thu, 20 Jul 2017 16:47:32 GMT):
Has joined the channel.

mescoba1 (Thu, 20 Jul 2017 17:12:50 GMT):
Can anyone tell me about this error? I got when bringing network up with byfn.sh `2017-07-19 13:16:35.230 UTC [main] main -> ERRO 001 Cannot run peer because error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp: err CA Certificate is not valid, (SN: 112275803671675206408516412528239505290) [Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid] !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!`

mescoba1 (Thu, 20 Jul 2017 17:12:50 GMT):
Can anyone tell me about this error? I got when bringing network up with byfn.sh `2017-07-19 13:16:35.230 UTC [main] main -> ERRO 001 Cannot run peer because error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp: err CA Certificate is not valid, (SN: 112275803671675206408516412528239505290) [Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid] !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!`

mescoba1 (Thu, 20 Jul 2017 17:12:50 GMT):
Can anyone tell me about this error? I got when bringing network up with byfn.sh `2017-07-19 13:16:35.230 UTC [main] main -> ERRO 001 Cannot run peer because error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp: err CA Certificate is not valid, (SN: 112275803671675206408516412528239505290) [Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid] !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!`

mescoba1 (Thu, 20 Jul 2017 17:12:50 GMT):
Can anyone tell me about this error? I got when bringing network up with byfn.sh `2017-07-19 13:16:35.230 UTC [main] main -> ERRO 001 Cannot run peer because error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp: err CA Certificate is not valid, (SN: 112275803671675206408516412528239505290) [Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid] !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!`

mescoba1 (Thu, 20 Jul 2017 17:12:50 GMT):
Can anyone tell me about this error? I got when bringing network up with byfn.sh `2017-07-19 13:16:35.230 UTC [main] main -> ERRO 001 Cannot run peer because error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp: err CA Certificate is not valid, (SN: 112275803671675206408516412528239505290) [Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid] !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!`

mescoba1 (Thu, 20 Jul 2017 17:12:50 GMT):
Can anyone tell me about this error? I got when bringing network up with byfn.sh `[main] main -> ERRO 001 Cannot run peer because error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp: err CA Certificate is not valid, (SN: 112275803671675206408516412528239505290) [Could not obtain certification chain, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid] !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!`

ssaddem (Thu, 20 Jul 2017 17:23:56 GMT):
i have desabled tls on balance transfert and i got this error E0720 18:16:06.690700097 29779 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. how can i desable error

Randyshu2018 (Fri, 21 Jul 2017 02:20:19 GMT):
Has joined the channel.

mastersingh24 (Fri, 21 Jul 2017 08:05:26 GMT):
@mescoba1 - Are you running a Windows or Mac and using Docker Toolbox by chance? (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZtCREpgJ5SuuxCuK3) @mescoba1

ssaddem (Fri, 21 Jul 2017 08:45:42 GMT):
@jimthematrix i have desabled tls on balance transfert and i got this error E0720 18:16:06.690700097 29779 ssl_transport_security.c:947] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. how can i desable error

inaki (Fri, 21 Jul 2017 08:51:06 GMT):
Has joined the channel.

linyuadam (Fri, 21 Jul 2017 09:37:58 GMT):
Hi, all, when I running my node app to invoke chaincode, everything looks find (transaction invoked successfully). But in the log, there is an error: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed. Is there anyone having some idea?

linyuadam (Fri, 21 Jul 2017 09:38:35 GMT):
Hi, all, when I running my node app to invoke chaincode, everything looks fine (transaction invoked successfully). But in the log, there is an error: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed. Is there anyone having some idea?

mtgran (Fri, 21 Jul 2017 11:27:07 GMT):
Has joined the channel.

akdj (Fri, 21 Jul 2017 11:55:50 GMT):
``` echo "POST invoke chaincode on peers of Org1 and Org2" echo TRX_ID=$(curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes/mycc \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051", "localhost:8051"], "fcn":"move", "args":["a","b","10"] }') ``` there is something that I wonder knwo for a long time, as you see, in this balance transfer example, it said that this command can `POST invoke chaincode on peers of Org1 and Org2` But how it is possible? with ` -H "authorization: Bearer $ORG1_TOKEN" ` we know that the user is allowed to command org1's peers so how this user can "invok" on the peers of org2?

Vadim (Fri, 21 Jul 2017 11:57:05 GMT):
@akdj perhaps this authorizes the caller to whatever is running on localhost:4000, not for peers

Vadim (Fri, 21 Jul 2017 11:57:05 GMT):
@akdj perhaps this authorizes the caller as a member of ORG1 to whatever is running on localhost:4000, not for peers

akdj (Fri, 21 Jul 2017 12:00:34 GMT):
ok but when I tried this command, I have a message which explained that it cannot find localhost:8051 (this is org2's peer) with org1 member

akdj (Fri, 21 Jul 2017 12:00:39 GMT):
@Vadim

Vadim (Fri, 21 Jul 2017 12:01:06 GMT):
I don't understand the error message, can you copy what it exactly says?

akdj (Fri, 21 Jul 2017 12:02:01 GMT):
and I am using endorsement policy ``` var request = { chaincodeId: chaincodeName, chaincodeVersion: chaincodeVersion, fcn: functionName, args: args, txId: tx_id, 'endorsement-policy': { identities: [ { role: { name: "member", mspId: "Org1MSP" }}, { role: { name: "member", mspId: "Org2MSP" }}, { role: { name: "admin", mspId: "OrdererMSP" }} ], policy: { "1-of": [ { "signed-by": 2}, { "2-of": [{ "signed-by": 0 }, { "signed-by": 1 }]} ] } } }; ``` so I really need to get the signature of one peer of each org, to validate my transaction request

akdj (Fri, 21 Jul 2017 12:02:10 GMT):
yes i can

akdj (Fri, 21 Jul 2017 12:02:47 GMT):
wait a minute,

akdj (Fri, 21 Jul 2017 12:09:24 GMT):
``` [2017-07-21 14:03:44.300] [DEBUG] SampleWebApp - Decoded from JWT token: username - Jim, orgname - org1 [2017-07-21 14:03:44.301] [DEBUG] SampleWebApp - ==================== INVOKE ON CHAINCODE ================== [2017-07-21 14:03:44.301] [DEBUG] SampleWebApp - peers : localhost:7051,localhost:8051 [2017-07-21 14:03:44.302] [DEBUG] SampleWebApp - channelName : mychannel [2017-07-21 14:03:44.302] [DEBUG] SampleWebApp - chaincodeName : mycc [2017-07-21 14:03:44.302] [DEBUG] SampleWebApp - fcn : move [2017-07-21 14:03:44.303] [DEBUG] SampleWebApp - args : a,b,10 [2017-07-21 14:03:44.303] [DEBUG] SampleWebApp - peers : localhost:7051,localhost:8051 [2017-07-21 14:03:44.303] [DEBUG] invoke-chaincode - ============ invoke transaction on organization org1 ============ ```

akdj (Fri, 21 Jul 2017 12:09:52 GMT):
``` [2017-07-21 14:03:44.305] [ERROR] Helper - Failed to find a peer matching the url localhost:8051 [2017-07-21 14:03:44.305] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-07-21 14:03:44.306] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-07-21 14:03:44.306] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-07-21 14:03:44.307] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-07-21 14:03:44.309] [DEBUG] Helper - [crypto_ecdsa_aes]: importKey - start [2017-07-21 14:03:44.310] [DEBUG] Helper - [crypto_ecdsa_aes]: importKey - have the key [Circular] [2017-07-21 14:03:44.311] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore resolving store [2017-07-21 14:03:44.311] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.312] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.313] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-07-21 14:03:44.346] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore resolving store [2017-07-21 14:03:44.346] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-07-21 14:03:44.347] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.347] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.348] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.348] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.349] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.350] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.350] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-07-21 14:03:44.352] [INFO] Helper - Successfully loaded member from persistence [2017-07-21 14:03:44.357] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 }

akdj (Fri, 21 Jul 2017 12:09:56 GMT):
``` [2017-07-21 14:03:44.383] [DEBUG] Helper - Jim failed to register [2017-07-21 14:03:44.383] [ERROR] Helper - Jim enrollment failed [2017-07-21 14:03:44.383] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.383] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.385] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-07-21 14:03:44.385] [DEBUG] invoke-chaincode - Sending transaction "{"_nonce":{"type":"Buffer","data":[39,41,141,178,240,209,75,206,189,81,116,113,220,249,86,90,182,54,170,25,250,84,199,172]},"_transaction_id":"eddcc0c423fd15f35a1204b7d854f35768e7625571947700e440bfa3b5500363"}" [2017-07-21 14:03:44.391] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } [2017-07-21 14:04:34.655] [INFO] invoke-chaincode - transaction proposal was good [2017-07-21 14:04:34.655] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0D L�tM������ n7n3�q�j%>��{��ټ u������Wm{��E�j�<��_ rGMM> ? [2017-07-21 14:04:34.656] [ERROR] Helper - Failed to find a peer matching the url localhost:8051:9051 info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"} [2017-07-21 14:04:34.663] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-07-21 14:04:34.669] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [Orderer.js]: sendBroadcast - on error: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:242:12)" [2017-07-21 14:04:34.674] [ERROR] invoke-chaincode - Failed to send transaction and get notifications within the timeout period. [2017-07-21 14:04:34.674] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined [2017-07-21 14:05:04.670] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 }

akdj (Fri, 21 Jul 2017 12:09:56 GMT):
``` [2017-07-21 14:03:44.383] [DEBUG] Helper - Jim failed to register [2017-07-21 14:03:44.383] [ERROR] Helper - Jim enrollment failed [2017-07-21 14:03:44.383] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.383] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.385] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-07-21 14:03:44.385] [DEBUG] invoke-chaincode - Sending transaction "{"_nonce":{"type":"Buffer","data":[39,41,141,178,240,209,75,206,189,81,116,113,220,249,86,90,182,54,170,25,250,84,199,172]},"_transaction_id":"eddcc0c423fd15f35a1204b7d854f35768e7625571947700e440bfa3b5500363"}" [2017-07-21 14:03:44.391] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } [2017-07-21 14:04:34.655] [INFO] invoke-chaincode - transaction proposal was good [2017-07-21 14:04:34.655] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0D L�tM������ n7n3�q�j%>��{��ټ u������Wm{��E�j�<��_ rGMM> ? [2017-07-21 14:04:34.656] [ERROR] Helper - Failed to find a peer matching the url localhost:8051info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"} [2017-07-21 14:04:34.663] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-07-21 14:04:34.669] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [Orderer.js]: sendBroadcast - on error: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:242:12)" [2017-07-21 14:04:34.674] [ERROR] invoke-chaincode - Failed to send transaction and get notifications within the timeout period. [2017-07-21 14:04:34.674] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined [2017-07-21 14:05:04.670] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 }

akdj (Fri, 21 Jul 2017 12:09:56 GMT):
``` [2017-07-21 14:03:44.383] [DEBUG] Helper - Jim failed to register [2017-07-21 14:03:44.383] [ERROR] Helper - Jim enrollment failed [2017-07-21 14:03:44.383] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.383] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.385] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-07-21 14:03:44.385] [DEBUG] invoke-chaincode - Sending transaction "{"_nonce":{"type":"Buffer","data":[39,41,141,178,240,209,75,206,189,81,116,113,220,249,86,90,182,54,170,25,250,84,199,172]},"_transaction_id":"eddcc0c423fd15f35a1204b7d854f35768e7625571947700e440bfa3b5500363"}" [2017-07-21 14:03:44.391] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } [2017-07-21 14:04:34.655] [INFO] invoke-chaincode - transaction proposal was good [2017-07-21 14:04:34.655] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0D L�tM������ n7n3�q�j%>��{��ټ u������Wm{��E�j�<��_ rGMM> ? [2017-07-21 14:04:34.656] [ERROR] Helper - Failed to find a peer matching the url localhost:8051info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"} [2017-07-21 14:04:34.663] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-07-21 14:04:34.669] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [Orderer.js]: sendBroadcast - on error: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:242:12)" [2017-07-21 14:04:34.674] [ERROR] invoke-chaincode - Failed to send transaction and get notifications within the timeout period. [2017-07-21 14:04:34.674] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined [2017-07-21 14:05:04.670] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 }

akdj (Fri, 21 Jul 2017 12:09:56 GMT):
``` [2017-07-21 14:03:44.383] [DEBUG] Helper - Jim failed to register [2017-07-21 14:03:44.383] [ERROR] Helper - Jim enrollment failed [2017-07-21 14:03:44.383] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.383] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 475b540687d5737fb8551dff9a4518e184b9f798e1e344e7192a9332ef91dba1 [2017-07-21 14:03:44.384] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: a79de62273643e9145efd6147ddae3766e51f1df87d87e75e368f91ba9ef1910 [2017-07-21 14:03:44.385] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-07-21 14:03:44.385] [DEBUG] invoke-chaincode - Sending transaction "{"_nonce":{"type":"Buffer","data":[39,41,141,178,240,209,75,206,189,81,116,113,220,249,86,90,182,54,170,25,250,84,199,172]},"_transaction_id":"eddcc0c423fd15f35a1204b7d854f35768e7625571947700e440bfa3b5500363"}" [2017-07-21 14:03:44.391] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } [2017-07-21 14:04:34.655] [INFO] invoke-chaincode - transaction proposal was good [2017-07-21 14:04:34.655] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0D L�tM������ n7n3�q�j%>��{��ټ u������Wm{��E�j�<��_ rGMM> ? [2017-07-21 14:04:34.656] [ERROR] Helper - Failed to find a peer matching the url localhost:8051 info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"} [2017-07-21 14:04:34.663] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-07-21 14:04:34.669] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [Orderer.js]: sendBroadcast - on error: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:242:12)" [2017-07-21 14:04:34.674] [ERROR] invoke-chaincode - Failed to send transaction and get notifications within the timeout period. [2017-07-21 14:04:34.674] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined [2017-07-21 14:05:04.670] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 }

Vadim (Fri, 21 Jul 2017 12:10:39 GMT):
@akdj seems like it cannot reach the peer

Vadim (Fri, 21 Jul 2017 12:11:05 GMT):
which application are you running?

akdj (Fri, 21 Jul 2017 12:11:14 GMT):
balance transfer

akdj (Fri, 21 Jul 2017 12:11:24 GMT):
https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer

akdj (Fri, 21 Jul 2017 12:12:55 GMT):
https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/testAPIs.sh#L122

akdj (Fri, 21 Jul 2017 12:13:05 GMT):
@Vadim

Vadim (Fri, 21 Jul 2017 12:14:31 GMT):
did you make any modifications to the fabric network scripts or balance-transfer itself?

akdj (Fri, 21 Jul 2017 12:16:01 GMT):
Hmmm no

akdj (Fri, 21 Jul 2017 12:17:27 GMT):
Did you try this application? this command work for you?

Vadim (Fri, 21 Jul 2017 12:17:54 GMT):
no, I did not, but it seems the error message is OK

akdj (Fri, 21 Jul 2017 12:18:08 GMT):
is OK.?

Vadim (Fri, 21 Jul 2017 12:18:11 GMT):
it only appears when it try to install an eventhub for a different org

Vadim (Fri, 21 Jul 2017 12:18:24 GMT):
your problem is that apparently the orderer is not reachable

akdj (Fri, 21 Jul 2017 12:18:52 GMT):
[2017-07-21 14:03:44.305] [ERROR] Helper - Failed to find a peer matching the url localhost:8051 ?

Vadim (Fri, 21 Jul 2017 12:19:54 GMT):
no, here is your real problem: ``` ```

Vadim (Fri, 21 Jul 2017 12:19:54 GMT):
no, here is your real problem: ``` error: [Orderer.js]: sendBroadcast - on error: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/root/beta_hyper/release/linux-amd64/nodejsSDK/beta_nodejsSDK/backup_app_based_on_api_server/node_modules/grpc/src/node/src/client.js:242:12)" ```

akdj (Fri, 21 Jul 2017 12:19:57 GMT):
it is accesible, because if I change this command to invoke only with peers of org1, it works

akdj (Fri, 21 Jul 2017 12:20:25 GMT):
Hmm ok.. :/

Vadim (Fri, 21 Jul 2017 12:20:28 GMT):
check the orderer logs

akdj (Fri, 21 Jul 2017 12:21:20 GMT):
orderer's logs : ``` 2017-07-21 11:32:14.893 UTC [orderer/main] main -> INFO 001 Starting orderer: Version: 1.0.0-beta Go version: go1.7.5 OS/Arch: linux/amd64

akdj (Fri, 21 Jul 2017 12:21:34 GMT):
I have only these

Vadim (Fri, 21 Jul 2017 12:22:39 GMT):
and if invoke with that peer from org2?

Vadim (Fri, 21 Jul 2017 12:22:39 GMT):
and if invoke with only that peer from org2?

akdj (Fri, 21 Jul 2017 12:22:49 GMT):
So as i said, if I change this command to invoke only with peers of org1, it works like : instead of localhost:8051 I change to another org1 peer localhost:port it works

akdj (Fri, 21 Jul 2017 12:23:19 GMT):
also, if invoke only with org peers, it also works

akdj (Fri, 21 Jul 2017 12:23:19 GMT):
also, if invoke only with org peers, it also works, need juste to change token to org2 token

Vadim (Fri, 21 Jul 2017 12:23:25 GMT):
can you show `docker ps`output?

akdj (Fri, 21 Jul 2017 12:25:44 GMT):
ok, wait some minutes, I have to call someone

akdj (Fri, 21 Jul 2017 12:25:44 GMT):
ok, wait some minutesplease, I have to call someone

akdj (Fri, 21 Jul 2017 12:25:44 GMT):
ok, wait some minutes please, I have to call someone

jimthematrix (Fri, 21 Jul 2017 12:39:35 GMT):
@ssaddem make sure the TLS is disabled in the peer/orderer, and reflected in the app's config json (balance-transfer/app/nework-config.json) so grpcs:// URLs are changed to grpc://

akdj (Fri, 21 Jul 2017 12:58:55 GMT):
@Vadim

akdj (Fri, 21 Jul 2017 12:59:35 GMT):
I re tried, and the error: [Orderer.js]: sendBroadcast - disappeared

akdj (Fri, 21 Jul 2017 12:59:51 GMT):
but always have this `[2017-07-21 14:56:48.480] [ERROR] Helper - Failed to find a peer matching the url localhost:8051 `

akdj (Fri, 21 Jul 2017 12:59:51 GMT):
but always have this `[2017-07-21 14:56:48.480] [ERROR] Helper - Failed to find a peer matching the url localhost:8051`

akdj (Fri, 21 Jul 2017 13:00:28 GMT):
@Vadim my docker ps ``` docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d244c9e61357 dev-peer0.org2.example.com-mycc-v0 "chaincode -peer.a..." 3 minutes ago Up 3 minutes dev-peer0.org2.example.com-mycc-v0 337490819f8c dev-peer1.org1.example.com-mycc-v0 "chaincode -peer.a..." 4 minutes ago Up 4 minutes dev-peer1.org1.example.com-mycc-v0 67b07b4ac6be dev-peer0.org1.example.com-mycc-v0 "chaincode -peer.a..." 4 minutes ago Up 4 minutes dev-peer0.org1.example.com-mycc-v0 04c300f22064 hyperledger/fabric-peer:x86_64-1.0.0 "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.org2.example.com 90df99713a4c hyperledger/fabric-peer:x86_64-1.0.0 "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp peer1.org1.example.com c9d2503d5753 hyperledger/fabric-peer:x86_64-1.0.0 "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:8056->7051/tcp, 0.0.0.0:8058->7053/tcp peer1.org2.example.com 8156ab507357 hyperledger/fabric-peer:x86_64-1.0.0 "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 45adc7ae6665 hyperledger/fabric-orderer:x86_64-1.0.0 "orderer" 6 minutes ago Up 6 minutes 0.0.0.0:7050->7050/tcp orderer.example.com b754adcafb32 hyperledger/fabric-ca:x86_64-1.0.0 "sh -c 'fabric-ca-..." 6 minutes ago Up 6 minutes 0.0.0.0:8054->7054/tcp ca_peerOrg2 466c4cfb0d45 hyperledger/fabric-ca:x86_64-1.0.0 "sh -c 'fabric-ca-..." 6 minutes ago Up 6 minutes 0.0.0.0:7054->7054/tcp ca_peerOrg1

ssaddem (Fri, 21 Jul 2017 13:15:31 GMT):
@jimthematrix thx i will test it :)

DannyWong (Fri, 21 Jul 2017 15:58:23 GMT):
Hi, is the current SDK interfacing the Fabric's historyleveldb_query_executer.go?

DannyWong (Fri, 21 Jul 2017 15:58:30 GMT):
i mean the history DB

mescoba1 (Fri, 21 Jul 2017 17:29:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tFWyhXnzT92qwWv8B) @mastersingh24 I'm running on Mac, I have docker installed

mescoba1 (Fri, 21 Jul 2017 17:29:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tFWyhXnzT92qwWv8B) @mastersingh24 I'm running on Mac, I have docker installed. I tried to bring the network down clear the containers and remove the docker images with no luck. Could this have to do with the genesis block?

MohammadObaid (Fri, 21 Jul 2017 18:41:49 GMT):
@jimthematrix I have 5 org in my sytem. I am only able to enroll usera in two organization `org1` and `org2` successfully and rest all of them return an error like this . Any clue to fix these error . Interesting thing is that even after failed enrollment , query return organization token but not secret token and with that organization token I am able to join channel and install chaincode.!!!

MohammadObaid (Fri, 21 Jul 2017 18:43:24 GMT):

Message Attachments

jimthematrix (Fri, 21 Jul 2017 18:48:25 GMT):
@MohammadObaid this is because only "org1.department1" and "org2.department1" exist in the fabric-ca server database. these are the default affiliations.

jimthematrix (Fri, 21 Jul 2017 18:48:43 GMT):
if you want to add more affiliations, you need to provide a custom fabric-ca-server config

jimthematrix (Fri, 21 Jul 2017 18:49:16 GMT):
``` ############################################################################# # Affiliation section ############################################################################# affiliations: org1: - department1 - department2 org2: - department1

jimthematrix (Fri, 21 Jul 2017 18:49:41 GMT):
file in docker: /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml

jimthematrix (Fri, 21 Jul 2017 18:50:27 GMT):
you can provide your custom config file with an env variable: http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#fabric-ca-server

MohammadObaid (Fri, 21 Jul 2017 18:58:11 GMT):
@jimthematrix Where this fabric-ca-server-config.yaml file exist? in docker fabric-ca image ?

jimthematrix (Fri, 21 Jul 2017 18:58:41 GMT):
yes

MohammadObaid (Fri, 21 Jul 2017 19:18:13 GMT):
@jimthematrix You mean something like this in docker-compose.yaml file ? If yes then I have already done this and still getting the same error

MohammadObaid (Fri, 21 Jul 2017 19:18:42 GMT):

Message Attachments

jimthematrix (Fri, 21 Jul 2017 19:27:25 GMT):
your docker-compose above does not provide a custom config. one way to do that is mount a volume to /etc/hyperledger/fabric-ca-server and provide a custom fabric-ca-server-config.yaml file

jimthematrix (Fri, 21 Jul 2017 19:28:13 GMT):
not sure if that's the best/only way, you can ask @smithbk to be sure

smithbk (Fri, 21 Jul 2017 19:31:18 GMT):
a custom config file is the only way to define your own affiliation hierarchy

shimos (Fri, 21 Jul 2017 22:49:51 GMT):
Hello, I tried to invoke a chaincode function concurrently based on text/integration/e2e/invoke-transaction.js to the same peer. It worked well for 100 and 200 concurrent invokes, but it started to fail for 300 or more with "Connect Failed" or timeout.

shimos (Fri, 21 Jul 2017 22:49:55 GMT):
This number might be specific to my environment, but I guess some configuration limits the number of concurrent connections. Is there any config parameter to allow more concurrent invokes?

vdods (Sat, 22 Jul 2017 21:50:27 GMT):
Hi all -- I'm using fabric-sdk-node modules v1.0.0 and I'm getting `Error: fabric-ca request register failed with errors [[{"code":400,"message":"Authorization failure"}]]` when attempting to register a new user via that CA's admin account. There is very little printed by the CA even in debug logging mode, all I get is ``` ca.org0.example.com | 2017/07/22 21:33:41 [DEBUG] Checking for revocation/expiration of certificate owned by 'Admin@org0.example.com' ca.org0.example.com | 2017/07/22 21:33:41 [DEBUG] DB: Get certificate by serial (5fcedebd3d18a04e33b006138ad4fe76) and aki (5eb04353b72b2513c4fae8bb86e200711eb3b8d13980a49325a000bfbbf7cdde) ca.org0.example.com | 2017/07/22 21:33:41 [ERROR] No certificates found for provided serial and aki ``` So I'm not sure how to proceed.

mhpr (Sun, 23 Jul 2017 13:37:32 GMT):
Has joined the channel.

mhpr (Sun, 23 Jul 2017 13:39:40 GMT):
Hi all - I am getting below error when i try to run "node query.js". I rebuild the fabler sample but for some reason it is not working. Any one experienced the same problem: Assigning transaction_id: 775b032954865de61505dd878ffed3d08dbc69414379274224e1c270c1443d37 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Endpoint read failed

mhpr (Sun, 23 Jul 2017 13:39:55 GMT):
not fabler - fabcar

mhpr (Sun, 23 Jul 2017 13:41:28 GMT):
Node query.js Trace ends up writing nothing as below: D0723 16:24:48.662502000 140736048427968 chttp2_transport.c:726] W:0x10207bc00 CLIENT state WRITING -> IDLE [begin writing nothing]

mhpr (Sun, 23 Jul 2017 13:44:57 GMT):
Question is why I am not getting response from gRPC?

mhpr (Sun, 23 Jul 2017 13:45:52 GMT):
No errors reporting regarding security etc

jaswanth (Mon, 24 Jul 2017 04:21:23 GMT):
Hi all , I am trying to create a new channel in balance transfer example from node sdk. I provided an mychanneltx.tx file in the channelConfigPath , i got `channel mychanneltx has created ` output . but when i try to join peers into the channel getting error ``` Error: chaincode error (status: 500, message: Cannot create ledger from genesis block, due to LedgerID already exists) ``` . Do i need an another genesis block ,if so can anyone suggest how can i create it dynamically. and also I am using couchdb ..after mychanneltx channel created there is no new mychanneltx database .

Ismail-Boukili (Mon, 24 Jul 2017 11:57:57 GMT):
Has joined the channel.

kletkeman (Mon, 24 Jul 2017 14:05:29 GMT):
@jimthematrix I have been searching the node sdk modules and cannot find where state history is modelled. I.e. using "getHistoryForKey", one can recreate the transaction list that led to a certain state at a certain point in time. And one can recreate the exact state of any asset at a specific point in time. Is there a wrapper object in the SDK for that? Thanks.

jimthematrix (Mon, 24 Jul 2017 14:07:32 GMT):
hi Kim, at the moment this particular (and there are several others) query must be implemented in the chaincode, there's no direct access to this API from the SDK

jimthematrix (Mon, 24 Jul 2017 14:07:32 GMT):
hi @kletkeman , at the moment this particular (and there are several others) query must be implemented in the chaincode, there's no direct access to this API from the SDK

kletkeman (Mon, 24 Jul 2017 14:09:09 GMT):
@jimthematrix Thanks. We have moved onto Composer, which relies on the SDK, which further means that they would have to create a custom historian using the fabric's history support. Is that accurate?

kletkeman (Mon, 24 Jul 2017 14:09:09 GMT):
@jimthematrix Thanks. We have moved onto Composer, which relies on the SDK, which further means that they would have to create a custom historian using the fabric's history support. Is that accurate? Note: if there is ever time for me to port my IoT contract platform, this is exactly what I would do (although I could just continue using my existing history support as well), and I could then add a historian object as a layer above the SDK. So I consider this entirely feasible.

jimthematrix (Mon, 24 Jul 2017 14:18:38 GMT):
@kletkeman should be feasible assuming that the SDK would be reliably notified (that the client or the event producer didn't miss any events) of the transaction/block events. on the other hand, Composer should have that API support in the Composer JS business logic library. You'd need to verify that on the Composer channel

akdj (Mon, 24 Jul 2017 14:19:19 GMT):
https://chat.hyperledger.org/channel/fabric?msg=u7SJBxwx9Le7n6cXk

akdj (Mon, 24 Jul 2017 14:19:27 GMT):
https://chat.hyperledger.org/channel/fabric?msg=6vpuzuZyd9R5Wa8sX

akdj (Mon, 24 Jul 2017 14:19:35 GMT):
https://chat.hyperledger.org/channel/fabric?msg=fk64jawXRZtXQFmN6

akdj (Mon, 24 Jul 2017 14:19:43 GMT):
https://chat.hyperledger.org/channel/fabric?msg=jGha4KZLbLwAREpDT

akdj (Mon, 24 Jul 2017 14:20:00 GMT):
https://chat.hyperledger.org/channel/fabric?msg=qxgQWuEkKtqXeA5bA

MohammadObaid (Mon, 24 Jul 2017 15:24:32 GMT):
@jimthematrix [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GYLmbmGYmd3JuiSvr) Is this the way I should mount custom fabric-ca file in my docker compose.yaml file? This is the gist link https://gist.github.com/mohammadobaid1/3056831d821e12f3e4d5567dfd548d04

samroberts (Mon, 24 Jul 2017 20:27:37 GMT):
Has joined the channel.

samroberts (Mon, 24 Jul 2017 20:27:59 GMT):
are there any docs for contributing to the node/npm packages for fabricclient? I found some stuff in https://github.com/hyperledger/fabric-sdk-node/pull/3#issuecomment-312027434 but the important links are dead

samroberts (Mon, 24 Jul 2017 20:28:09 GMT):
where to submit bug reports, for example?

samroberts (Mon, 24 Jul 2017 20:48:50 GMT):
AFAICT, fabric supports 4.x, except for one tiny change, which works fine on all versions of node:

samroberts (Mon, 24 Jul 2017 20:48:52 GMT):
```

samroberts (Mon, 24 Jul 2017 20:49:05 GMT):
diff --git a/test/unit/util.js b/test/unit/util.js index 1daec00..6013093 100644 --- a/test/unit/util.js +++ b/test/unit/util.js @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +'use strict'; var path = require('path'); var fs = require('fs-extra');

samroberts (Mon, 24 Jul 2017 20:49:58 GMT):
some of the engine strict stuff needs deleteting, too: see https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-node

samroberts (Mon, 24 Jul 2017 20:50:41 GMT):
I'll PR this if you are interested (I'm supporting some users who are pinned to node 4.x, it will be months before they can upgrade)

samroberts (Mon, 24 Jul 2017 20:59:47 GMT):
tests pass for node 8.x as well

ShenthilkumarCK (Tue, 25 Jul 2017 03:46:49 GMT):
@mhpr Hi, it is due to the key mismatch

ShenthilkumarCK (Tue, 25 Jul 2017 03:48:03 GMT):
if you generate the key for fabcar it will not match. You need to place the key in creds folders accordingly. I got the same problem, after couple of rework I could solve it.

JarvisJang (Tue, 25 Jul 2017 03:50:00 GMT):
Hi, actually hyperledger doesn't have currency function. Then how can I make payment system in chaincode?

outis (Tue, 25 Jul 2017 04:37:21 GMT):
Hi I am running fabric-samples/balance-transfer by ./runApp.sh & ./testAPI.sh. The tests pass, but I see an error in logs as follows. Anyone knows how to fix this? ```[2017-07-25 13:34:49.208] [INFO] invoke-chaincode - transaction proposal was good [2017-07-25 13:34:49.208] [INFO] invoke-chaincode - transaction proposal was good [2017-07-25 13:34:49.208] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", endorsement signature: 0D SY�j��ns���Q[p%��1�s~o���7 W��B�m��+���=8z)ut����ʰ��� [2017-07-25 13:34:49.212] [ERROR] Helper - Failed to find a peer matching the url localhost:8051 info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"}````

akdj (Tue, 25 Jul 2017 07:03:30 GMT):
so .. I ask again.... can anyone help me?

Vadim (Tue, 25 Jul 2017 07:22:26 GMT):
@akdj everything seems to work fine, why do you think you have a problem?

akdj (Tue, 25 Jul 2017 07:23:14 GMT):
for me, this is a problem : `[2017-07-24 13:43:09.008] [ERROR] Helper user app - Failed to find a peer matching the url peer0.org2.example.com:9051`

akdj (Tue, 25 Jul 2017 07:23:43 GMT):
the transaction proposal request is not sent to this peer

Vadim (Tue, 25 Jul 2017 07:24:31 GMT):
@akdj from your logs I see that you get two proposal responses back: ``` [2017-07-24 13:43:09.006] [INFO] invoke-chaincode - transaction proposal was good [2017-07-24 13:43:09.006] [INFO] invoke-chaincode - transaction proposal was good ```

Vadim (Tue, 25 Jul 2017 07:24:41 GMT):
so it is sent to two peers

akdj (Tue, 25 Jul 2017 07:25:08 GMT):
but why I get this message about didn't match?

akdj (Tue, 25 Jul 2017 07:25:16 GMT):
what that means exactly?

Vadim (Tue, 25 Jul 2017 07:25:21 GMT):
did you check the code which writes this message?

akdj (Tue, 25 Jul 2017 07:26:54 GMT):
yes, it is here :https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js#L155

Vadim (Tue, 25 Jul 2017 07:27:36 GMT):
@akdj so it is output if found == false

Vadim (Tue, 25 Jul 2017 07:28:08 GMT):
the found var is declared here: https://github.com/hyperledger/fabric-samples/blob/ca8fad315128a528dc8f3eab2395105723d5f95b/balance-transfer/app/helper.js#L155

Vadim (Tue, 25 Jul 2017 07:28:08 GMT):
the found var is declared here: https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js#L113

Vadim (Tue, 25 Jul 2017 07:28:46 GMT):
between lines 113 and 155 I don't see that the value of found is anyhow changed

Vadim (Tue, 25 Jul 2017 07:28:53 GMT):
it always stays false

Vadim (Tue, 25 Jul 2017 07:29:15 GMT):
seems like some bug to me

akdj (Tue, 25 Jul 2017 07:31:03 GMT):
yes you are right, it stays false, but, in the loop, it calls the command `continue` https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js#L136

Vadim (Tue, 25 Jul 2017 07:34:27 GMT):
@akdj so can you just check how many targets you get back from that function?

akdj (Tue, 25 Jul 2017 07:34:31 GMT):
it will try to find peer and push it in a target, then invoke transaction will sen transaction proposal to targets

Vadim (Tue, 25 Jul 2017 07:35:02 GMT):
from your log I see two proposal responses, so it must be working fine

akdj (Tue, 25 Jul 2017 07:35:05 GMT):
I get only one, ``` [2017-07-24 13:43:11.634] [INFO] invoke-chaincode - The balance transfer transaction has been committed on peer peer0.org1.example.com:7053 [2017-07-24 13:43:11.635] [DEBUG] invoke-chaincode - event promise all complete and testing complete [2017-07-24 13:43:11.635] [INFO] invoke-chaincode - Successfully sent transaction to the orderer

akdj (Tue, 25 Jul 2017 07:35:23 GMT):
ok, I will check more in detail

akdj (Tue, 25 Jul 2017 07:36:40 GMT):
because, my objective is to define endorsement policy which validates transaction signed by the two orgs

akdj (Tue, 25 Jul 2017 07:36:45 GMT):
``` tx_id = client.newTransactionID(); // send proposal to endorser var request = { chaincodeId: chaincodeName, chaincodeVersion: chaincodeVersion, fcn: functionName, args: args, txId: tx_id, 'endorsement-policy': { identities: [ { role: { name: "member", mspId: "Org1MSP" }}, { role: { name: "member", mspId: "Org2MSP" }} ], policy: { "2-of": [{ "signed-by": 0 }, { "signed-by": 1 }]} } }; return channel.sendInstantiateProposal(request);

Vadim (Tue, 25 Jul 2017 07:36:48 GMT):
@akdj I can guess that you don't see that message when it tries to connect an event hub from the second org

Vadim (Tue, 25 Jul 2017 07:37:03 GMT):
but it cannot do it because the client is from the first org

akdj (Tue, 25 Jul 2017 07:37:04 GMT):
ok :/

Vadim (Tue, 25 Jul 2017 07:37:27 GMT):
but from this comment: https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js#L116 this is the intended behavior

Vadim (Tue, 25 Jul 2017 07:38:35 GMT):
@akdj it's also not clear to me when this endorsement policy is defined, I don't see it in the testAPI.sh

akdj (Tue, 25 Jul 2017 07:40:53 GMT):
in the example, it used the default one. So it needn't to define it https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/instantiate-chaincode.js#L49 https://fabric-sdk-node.github.io/Channel.html#sendTransactionProposal__anchor https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest

akdj (Tue, 25 Jul 2017 07:41:29 GMT):
and me, I added my own endorsement policy

akdj (Tue, 25 Jul 2017 07:41:35 GMT):
@Vadim

Vadim (Tue, 25 Jul 2017 07:44:03 GMT):
@akdj so what is the problem now?

Vadim (Tue, 25 Jul 2017 07:44:19 GMT):
the endorsement policy does not work?

akdj (Tue, 25 Jul 2017 07:47:15 GMT):
@Vadim I tested it only one time, and at this time, it didn't work, and I noticed this message about "didn't find peer" then I never retry again, I am searching firstly how to resolve this message before to retry

Vadim (Tue, 25 Jul 2017 07:47:42 GMT):
@akdj so I guess that we established that the message is completely OK

akdj (Tue, 25 Jul 2017 07:48:12 GMT):
Hmmm, let me check the targets variable

Vadim (Tue, 25 Jul 2017 07:48:29 GMT):
well check this code: https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/helper.js#L116

Vadim (Tue, 25 Jul 2017 07:48:50 GMT):
this will skip the for loop cycle if looking for event hub and if user is not from the same org

Vadim (Tue, 25 Jul 2017 07:49:18 GMT):
this will cause to end for loop without calling the `continue outer`

Vadim (Tue, 25 Jul 2017 07:49:31 GMT):
and you see that "error" message

Vadim (Tue, 25 Jul 2017 07:49:47 GMT):
this is btw has nothing to do with the endorsement policies

Arindam (Tue, 25 Jul 2017 07:51:50 GMT):
Has joined the channel.

Arindam (Tue, 25 Jul 2017 07:53:14 GMT):
Hi, I am running the balance transfer demo. I have ran .runApp.sh and the node started in localhost:4000 URL. But when I am giving the curl command Error: Calling enrollment endpoint filed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]

Arindam (Tue, 25 Jul 2017 07:54:47 GMT):
I am running the curl command in Docker Quickstart terminal of Windows 7, curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=org1'

akdj (Tue, 25 Jul 2017 07:56:06 GMT):
@Vadim thanks, I just checked now the targets content, is ok, it contains the peers of each org

akdj (Tue, 25 Jul 2017 08:00:38 GMT):
@Vadim I will try again to instantiate with endorsement policy, and will let you know

ShenthilkumarCK (Tue, 25 Jul 2017 08:23:16 GMT):
Hi, I dont understand the command for service ca.example.com in fabric-samples/basic-network/docker-compose.yml file. --ca.keyfile /etc/hyperledger/fabric-ca-server-config/a22daf356b2aab5792ea53e35f66fccef1d7f1aa2b3a2b92dbfbf96a448ea26a_sk is hardcoded but the file is not available in the repository. Someone help me to undersstand better

mhpr (Tue, 25 Jul 2017 08:38:59 GMT):
That is to start the node for ca server in docker. It uses cobra packages to do that.[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9LsZn6KtRadYQ5Yta) @ShenthilkumarCK

mhpr (Tue, 25 Jul 2017 08:41:07 GMT):
The path is mapped in volumes section of docker compose. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9LsZn6KtRadYQ5Yta) @ShenthilkumarCK

ShenthilkumarCK (Tue, 25 Jul 2017 08:41:35 GMT):
@mhpr Thanks for that. But the keyfile is not there. Worrying how this statement is working?

ShenthilkumarCK (Tue, 25 Jul 2017 08:42:39 GMT):
I just commented out the command statement in docer-compose.yaml then also I am able to complete the tests for fabcar.

akdj (Tue, 25 Jul 2017 08:43:32 GMT):
@Vadim Thank you, I tested my endorsement policy again, did an invokeTransaction() and checked transaction with getTransactionbyID() method. the result is fine, the transaction proposal is signed by the two org2, and the transaction is validated ` "validationCode": 0` in all peers .

akdj (Tue, 25 Jul 2017 08:44:32 GMT):
@Vadim it is clear now for me, the "error" message about "didn't find peer" can be ignored

mhpr (Tue, 25 Jul 2017 08:44:40 GMT):
Actual path is /Users/fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/ca. Mapped path is /etc/hyperledger/fabric-ca-server-config/. So check in actual path and you will find the file based on where you installed the samples. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JEFDMwKgAZEQMachY) @ShenthilkumarCK

Arindam (Tue, 25 Jul 2017 08:45:48 GMT):
Hi, I am running the balance transfer demo. I have ran .runApp.sh and the node started in localhost:4000 URL. But when I am giving the curl command Error: Calling enrollment endpoint filed with error [Error: connect ECONNREFUSED 127.0.0.1:7054] I am running the curl command in Docker Quickstart terminal of Windows 7, curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=org1' I can do telenet 192.168.99.100 7054 but can not do telnet localhost 7054, but internally the scripts is referring to localhost:7054 in the script, Can ay one tell how to solve the problem

lyriarte (Tue, 25 Jul 2017 08:46:44 GMT):
@ShenthilkumarCK look at function ```replacePrivateKey``` in ```fabric/examples/e2e_cli/generateArtifacts.sh```

mhpr (Tue, 25 Jul 2017 08:46:52 GMT):
Please note that ca.example.com is for crypto material generation/management and in your case you have the crypto material already and you are not requesting any new. So it worked. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JEFDMwKgAZEQMachY) @ShenthilkumarCK

ShenthilkumarCK (Tue, 25 Jul 2017 09:09:08 GMT):
Thank you mhpr, it is clear to me now.

mhpr (Tue, 25 Jul 2017 09:15:39 GMT):
You are welcome.[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rBQGaq4FfcSYMFdQY) @ShenthilkumarCK

AngelMilanov (Tue, 25 Jul 2017 11:44:33 GMT):
@jimthematrix Hi, I'm running Fabric 1.0.0 with Fabric Node SDK 1.0.0. I get this error when I try invoke Channel#queryBlock(blockNumber, target) after a few blocks have been committed to the ledger: ``` error: [BlockDecoder.js]: TypeError: Cannot read property 'max_degree' of null at decodeRangeQueryInfo (…/fabric-client/lib/BlockDecoder.js:1248:31) at decodeKVRWSet (...fabric-client/lib/BlockDecoder.js:1203:27) at decodeReadWriteSets (...fabric-client/lib/BlockDecoder.js:1172:22) at decodeChaincodeAction (...fabric-client/lib/BlockDecoder.js:1144:29) at decodeProposalResponsePayload (...fabric-client/lib/BlockDecoder.js:1136:40) at decodeChaincodeEndorsedAction (...fabric-client/lib/BlockDecoder.js:1114:37) at decodeChaincodeActionPayload (...fabric-client/lib/BlockDecoder.js:1098:19) at decodeEndorserTransaction (...fabric-client/lib/BlockDecoder.js:665:21) at decodeBlockDataEnvelope (...fabric-client/lib/BlockDecoder.js:649:27) at decodeBlockData (...fabric-client/lib/BlockDecoder.js:566:18) ```

AngelMilanov (Tue, 25 Jul 2017 11:44:33 GMT):
@jimthematrix Hi, I'm running Fabric 1.0.0 with Fabric Node SDK 1.0.0. I get this error when I try invoke Channel#queryBlock(blockNumber, target) after a few blocks have been committed to the ledger: ``` error: [BlockDecoder.js]: TypeError: Cannot read property 'max_degree' of null at decodeRangeQueryInfo (…/fabric-client/lib/BlockDecoder.js:1248:31) at decodeKVRWSet (...fabric-client/lib/BlockDecoder.js:1203:27) at decodeReadWriteSets (...fabric-client/lib/BlockDecoder.js:1172:22) at decodeChaincodeAction (...fabric-client/lib/BlockDecoder.js:1144:29) at decodeProposalResponsePayload (...fabric-client/lib/BlockDecoder.js:1136:40) at decodeChaincodeEndorsedAction (...fabric-client/lib/BlockDecoder.js:1114:37) at decodeChaincodeActionPayload (...fabric-client/lib/BlockDecoder.js:1098:19) at decodeEndorserTransaction (...fabric-client/lib/BlockDecoder.js:665:21) at decodeBlockDataEnvelope (...fabric-client/lib/BlockDecoder.js:649:27) at decodeBlockData (...fabric-client/lib/BlockDecoder.js:566:18) ``` Is this a know issue? Am I using it wrong? The only thing that helps is to recreate the peer containers.

AngelMilanov (Tue, 25 Jul 2017 11:44:33 GMT):
@jimthematrix Hi, I'm running Fabric 1.0.0 with Fabric Node SDK 1.0.0. I get this error when I try invoke Channel#queryBlock(blockNumber, target) after a few blocks have been committed to the ledger: ``` error: [BlockDecoder.js]: TypeError: Cannot read property 'max_degree' of null at decodeRangeQueryInfo (…/fabric-client/lib/BlockDecoder.js:1248:31) at decodeKVRWSet (...fabric-client/lib/BlockDecoder.js:1203:27) at decodeReadWriteSets (...fabric-client/lib/BlockDecoder.js:1172:22) at decodeChaincodeAction (...fabric-client/lib/BlockDecoder.js:1144:29) at decodeProposalResponsePayload (...fabric-client/lib/BlockDecoder.js:1136:40) at decodeChaincodeEndorsedAction (...fabric-client/lib/BlockDecoder.js:1114:37) at decodeChaincodeActionPayload (...fabric-client/lib/BlockDecoder.js:1098:19) at decodeEndorserTransaction (...fabric-client/lib/BlockDecoder.js:665:21) at decodeBlockDataEnvelope (...fabric-client/lib/BlockDecoder.js:649:27) at decodeBlockData (...fabric-client/lib/BlockDecoder.js:566:18) ``` Is this a know issue? Am I using it wrong? The only thing that helps is to recreate the peer containers, but I cannot do this in a production environment.

AngelMilanov (Tue, 25 Jul 2017 11:44:33 GMT):
@jimthematrix Hi, I'm running Fabric 1.0.0 with Fabric Node SDK 1.0.0. I get this error when I try invoke Channel#queryBlock(blockNumber, target) after a few blocks have been committed to the ledger: ``` error: [BlockDecoder.js]: TypeError: Cannot read property 'max_degree' of null at decodeRangeQueryInfo (...fabric-client/lib/BlockDecoder.js:1248:31) at decodeKVRWSet (...fabric-client/lib/BlockDecoder.js:1203:27) at decodeReadWriteSets (...fabric-client/lib/BlockDecoder.js:1172:22) at decodeChaincodeAction (...fabric-client/lib/BlockDecoder.js:1144:29) at decodeProposalResponsePayload (...fabric-client/lib/BlockDecoder.js:1136:40) at decodeChaincodeEndorsedAction (...fabric-client/lib/BlockDecoder.js:1114:37) at decodeChaincodeActionPayload (...fabric-client/lib/BlockDecoder.js:1098:19) at decodeEndorserTransaction (...fabric-client/lib/BlockDecoder.js:665:21) at decodeBlockDataEnvelope (...fabric-client/lib/BlockDecoder.js:649:27) at decodeBlockData (...fabric-client/lib/BlockDecoder.js:566:18) ``` Is this a know issue? Am I using the SDK the wrong way? The only thing that helps is to recreate the peer containers, but I cannot do this in a production environment. Even then, after a few committed blocks the issue returns.

mbochu (Tue, 25 Jul 2017 13:07:16 GMT):
Hi, do you know where I can find an example of a development with the fabric-sdk-node because I am a little bit lost ?

Arindam (Tue, 25 Jul 2017 13:12:29 GMT):
@mbochu Please see https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer

mbochu (Tue, 25 Jul 2017 13:14:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sX2a44jSjqXSXQh4b) @Arindam Thanks !

bretharrison (Tue, 25 Jul 2017 14:01:36 GMT):
@AngelMilanov This looks like a bug, I will work on a fix shortly, would you be able to open a Jira to note the issue.

AngelMilanov (Tue, 25 Jul 2017 14:43:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wnYf6ZFyhxCd95z9E) @bretharrison Sure, right away.

bretharrison (Tue, 25 Jul 2017 14:44:03 GMT):
@AngelMilanov thanks

AngelMilanov (Tue, 25 Jul 2017 15:02:10 GMT):
@bretharrison done, https://jira.hyperledger.org/browse/FAB-5457

bretharrison (Tue, 25 Jul 2017 15:31:53 GMT):
@AngelMilanov Here is a fix for FAB-5457, there is a build issue, so it will not be merged until we fix that https://gerrit.hyperledger.org/r/#/c/11907/

zupan (Tue, 25 Jul 2017 15:42:22 GMT):
Has joined the channel.

zupan (Tue, 25 Jul 2017 15:46:38 GMT):
Hi, I have a code example that is submitting transactions in for loop and I'm getting `MVCC_READ_CONFLICT rejected transaction` for all others than the first one. I cannot find anything in docs about it. Has someone already experienced this behaviour?

zupan (Tue, 25 Jul 2017 15:46:38 GMT):
Hi, I have a code example that is submitting transactions in for loop and I'm getting `MVCC_READ_CONFLICT rejected transaction` for all others than the first one. I cannot find anything in docs about it. Has someone already experienced this behavior? Whole error message : `caught error trying invoke chaincode. Error: Peer has rejected transaction '8dc6618fc615cd6f7595ef159207046dc351f5184c067cb66de7b80f4f934765' with cdoe MVCC_READ_CONFLICT `

plee (Tue, 25 Jul 2017 18:53:15 GMT):
Has joined the channel.

mavericklam (Wed, 26 Jul 2017 05:57:16 GMT):
Hey guys, I have a error when invoking the chaincode, but it seems the records has been added successfully, may I know why ?

mavericklam (Wed, 26 Jul 2017 05:57:24 GMT):
Error: The transaction was invalid, code = MVCC_READ_CONFLICT

Vadim (Wed, 26 Jul 2017 05:59:41 GMT):
@mavericklam it's because you were concurrently modifying the same state, i.e. several transactions modifying the same state ended up in the same block

Randyshu2018 (Wed, 26 Jul 2017 06:30:53 GMT):
Hi,everyone,If I want the open the debug model and make the print into console,what should I do ?

mbochu (Wed, 26 Jul 2017 07:03:38 GMT):
Hi, I don't understand how we can get the signature for the createChannel request without getSubmitter and getOrderAdminSubmitter which are test functions. Someone can explain me that, please ?

Vadim (Wed, 26 Jul 2017 07:04:34 GMT):
@mbochu you need to write equivalent functions in your app

mbochu (Wed, 26 Jul 2017 07:09:23 GMT):
Yes but this functions use the private key of Orderer and peers. So it's stange, no ?

Vadim (Wed, 26 Jul 2017 07:13:22 GMT):
@mbochu only admin users, not the orderer itself

mbochu (Wed, 26 Jul 2017 07:15:40 GMT):
but any user can create channel so to do that, he need the private key of the admin users ?

Vadim (Wed, 26 Jul 2017 07:17:52 GMT):
@mbochu only admin user should be able to do that, if any user has a private key of another user, then this is an insecure system

mbochu (Wed, 26 Jul 2017 07:19:28 GMT):
So if I am an admin user of the org1, I need the private key of the admin user of the org2 in order to create a channel ?

Vadim (Wed, 26 Jul 2017 07:20:46 GMT):
@mbochu no, you need his signature

Vadim (Wed, 26 Jul 2017 07:21:26 GMT):
@mbochu well actually, as far as I remember, by default the admin users of orderer org can create the channels

Vadim (Wed, 26 Jul 2017 07:21:50 GMT):
that's why there is a function called "getOrderAdminSubmitter"

mbochu (Wed, 26 Jul 2017 07:23:20 GMT):
Yes, but to have the signature, in test we use the getsubmitter function and this function use the private key of the admin user

Vadim (Wed, 26 Jul 2017 07:24:40 GMT):
normally you need a signature. I'm not sure how that function is used, but e.g. it can be during the chaincode installation, when only the peer admin can install the chaincode.

Vadim (Wed, 26 Jul 2017 07:25:23 GMT):
it installs it only on the peer it is admin of, and on other peers (e.g. from other orgs) another admins should do that

Vadim (Wed, 26 Jul 2017 07:26:01 GMT):
perhaps for the simplicity in that example the one client has all admin keys, but in reality this should not be like that.

mbochu (Wed, 26 Jul 2017 07:33:14 GMT):
So if I want to create a channel, I have to create it just with the peer admin of the org1 and then I ask the join of the peer admin of the org2. After that, everyone (peer and user of the 2 orgs) has access to the channel ?

Vadim (Wed, 26 Jul 2017 07:33:39 GMT):
@mbochu read http://hyperledger-fabric.readthedocs.io/en/latest/configtx.html#orderer-system-channel-configuration

Vadim (Wed, 26 Jul 2017 07:33:43 GMT):
and below it

Randyshu2018 (Wed, 26 Jul 2017 08:05:26 GMT):
How to enable fabric-client loggger in fabric-sdk-node.?

benjamin_J_sb (Wed, 26 Jul 2017 08:18:22 GMT):
Has joined the channel.

cristianvanderweij (Wed, 26 Jul 2017 09:55:40 GMT):
Has joined the channel.

cristianvanderweij (Wed, 26 Jul 2017 09:55:47 GMT):
Hi everyone, sometimes I have a timeout error when instantiating the chaincode using the balance-transfer sample. anyone has an idea why this happens? [...] [2017-07-24 17:07:47.055] [DEBUG] SampleWebApp - ==================== INSTANTIATE CHAINCODE ================== [2017-07-24 17:07:47.056] [DEBUG] SampleWebApp - channelName : mychannel [2017-07-24 17:07:47.057] [DEBUG] SampleWebApp - chaincodeName : mycc [2017-07-24 17:07:47.058] [DEBUG] SampleWebApp - chaincodeVersion : v0 [2017-07-24 17:07:47.059] [DEBUG] SampleWebApp - functionName : init [2017-07-24 17:07:47.062] [DEBUG] SampleWebApp - args : a,100,b,200 [2017-07-24 17:07:47.063] [DEBUG] instantiate-chaincode - ============ Instantiate chaincode on organization org1 ============ [...] [2017-07-24 17:07:47.186] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ubuntu/go/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js💯19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ubuntu/go/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js💯19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) [2017-07-24 17:08:32.234] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-24 17:08:32.238] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-07-24 17:08:32.239] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-07-24 17:08:32.239] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined [2017-07-24 17:08:32.293] [DEBUG] SampleWebApp - Decoded from JWT token: username - Jim, orgname - org1

FollowingGhosts (Wed, 26 Jul 2017 10:06:12 GMT):
Is there a way of unit testing code written to leverage the node SDK?

mbochu (Wed, 26 Jul 2017 12:31:58 GMT):
Hi ! How I can do to be sure that the certificate of the peer admin org in the genesis block is the same that the one created by the fabric ca serveur when I enroll this admin ?

shinsa 2 (Wed, 26 Jul 2017 12:44:08 GMT):
Has joined the channel.

vanhumbeecka (Wed, 26 Jul 2017 13:45:36 GMT):
Has joined the channel.

vanhumbeecka (Wed, 26 Jul 2017 13:45:49 GMT):
hi, i saw that the node package 'hfc' included typescript definition files however, in the new fabric-client, i can't seem to find typescript def files do they exist? and if so , were can i find them?

vanhumbeecka (Wed, 26 Jul 2017 13:47:22 GMT):
it seems like a step backwards from the 'hfc' package..

kly4 (Wed, 26 Jul 2017 14:56:45 GMT):
Has joined the channel.

Juan.Arias (Wed, 26 Jul 2017 14:56:48 GMT):
Has joined the channel.

bh4rtp (Wed, 26 Jul 2017 15:01:44 GMT):
hi, i have updated the latest fabric, fabric-ca and fabric-sdk-node. and then run `fabric-samples/balance-transfer`. it failed to create channel. ```error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-07-26 22:55:58.424] [ERROR] Create-Channel - Error: BAD_REQUEST at ClientDuplexStream. (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:245:14) (node:17354) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: BAD_REQUEST at ClientDuplexStream. (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:245:14)```

bh4rtp (Wed, 26 Jul 2017 15:01:44 GMT):
hi, i have updated the latest `fabric`, `fabric-ca` and `fabric-sdk-node`. and then run `fabric-samples/balance-transfer`. it failed to create channel. ```error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-07-26 22:55:58.424] [ERROR] Create-Channel - Error: BAD_REQUEST at ClientDuplexStream. (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:245:14) (node:17354) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: BAD_REQUEST at ClientDuplexStream. (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:245:14)```

bh4rtp (Wed, 26 Jul 2017 15:01:44 GMT):
hi, i have updated the latest `fabric`, `fabric-ca` and `fabric-sdk-node`. and then run `fabric-samples/balance-transfer`. it failed to create channel. ```error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-07-26 22:55:58.424] [ERROR] Create-Channel - Error: BAD_REQUEST at ClientDuplexStream. (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:245:14) (node:17354) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: BAD_REQUEST at ClientDuplexStream. (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:245:14)``` there is a warn message in the `orderer`.container. ```2017-07-26 22:55:58.414 CST [orderer/common/broadcast] Handle -> WARN 1b3 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: invalid mod_policy for element [Policy] /Channel/Application/Admins: mod_policy not set```

rameshthoomu (Wed, 26 Jul 2017 15:05:19 GMT):
@jimthematrix @bretharrison observed fabric-sdk-node tests are failing on latest commits.. Could you please check the recent 5 merge builds https://jenkins.hyperledger.org/view/fabric-sdk-node/job/fabric-sdk-node-merge-s390x/220/console

rameshthoomu (Wed, 26 Jul 2017 15:05:19 GMT):
@jimthematrix @bretharrison observed fabric-sdk-node tests are failing on latest commits.. Could you please check the recent merge builds https://jenkins.hyperledger.org/view/fabric-sdk-node/job/fabric-sdk-node-merge-s390x/220/console

bretharrison (Wed, 26 Jul 2017 15:07:35 GMT):
@rameshthoomu https://gerrit.hyperledger.org/r/#/c/11917/ should fix that issue

rameshthoomu (Wed, 26 Jul 2017 15:09:11 GMT):
thanks @bretharrison

farhan3 (Wed, 26 Jul 2017 15:55:22 GMT):
Hi - is there some sample code that uses the fabric-ca-client to register and enroll users? I saw that helper.js under balance-transfer (https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/helper.js) does some of this, but there's a lot more going on there. I was hoping there may be another simple example elsewhere.

Tigermisu (Wed, 26 Jul 2017 16:01:27 GMT):
I agree, a simpler example would be useful.

jogando (Wed, 26 Jul 2017 16:08:16 GMT):
Has left the channel.

mescoba1 (Wed, 26 Jul 2017 17:03:55 GMT):
Have you guys tried fabcar example? http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html

borisbuechel (Wed, 26 Jul 2017 17:39:03 GMT):
Has joined the channel.

Asara (Wed, 26 Jul 2017 18:47:01 GMT):
Anyone know why packaging GOLANG would take long when trying to deploy chaincode?

Asara (Wed, 26 Jul 2017 18:47:08 GMT):
It takes upwards of 15 minutes to just package

ashahn (Wed, 26 Jul 2017 19:01:21 GMT):
Hello, I'm trying to create and listen to events from chaincode in the node sdk. Does anyone have any suggestions on how to accomplish this? I was looking at the EventHub class in the documentation, but there aren't specifics on how to implement in node. Has anyone done something like this before?

htyagi90 (Wed, 26 Jul 2017 19:02:21 GMT):
Has joined the channel.

farhan3 (Wed, 26 Jul 2017 19:03:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XhpzrJFTchStjsXKn) @mescoba1 Doesn't that always use the admin user stored under the creds dir?

joshhw (Wed, 26 Jul 2017 19:08:58 GMT):
Has joined the channel.

snehalpansare (Thu, 27 Jul 2017 07:02:27 GMT):
Has joined the channel.

vanhumbeecka (Thu, 27 Jul 2017 07:19:15 GMT):
hi, i saw that the node package 'hfc' included typescript definition files however, in the new fabric-client, i can't seem to find typescript def files do they exist? and if so , were can i find them?

Vadim (Thu, 27 Jul 2017 07:35:34 GMT):
@vanhumbeecka I don't think they are in fabric-client

vanhumbeecka (Thu, 27 Jul 2017 07:36:01 GMT):
i noticed, and that saddens me :)

vanhumbeecka (Thu, 27 Jul 2017 07:36:25 GMT):
but do you know if there are plans in the future for adding typescript definitions?

Vadim (Thu, 27 Jul 2017 07:37:23 GMT):
@vanhumbeecka I think the support was removed intentionally: https://jira.hyperledger.org/browse/FAB-396

vanhumbeecka (Thu, 27 Jul 2017 07:40:34 GMT):
ok thanks for pointing that out

vanhumbeecka (Thu, 27 Jul 2017 07:40:56 GMT):
shame though, i'm not happy they removed it

ParkJaesung (Thu, 27 Jul 2017 09:36:46 GMT):
Has joined the channel.

ShenthilkumarCK (Thu, 27 Jul 2017 09:52:01 GMT):
Hi anyone know, how to connect to tls enabled network with fabric-client on sdk?

SyneBlockChainTeam (Thu, 27 Jul 2017 10:08:59 GMT):
Hi NodeSDK Team, We are using NodeSDK with 2 organisations (each has 3 peers. I.e total 6 peers ). We deployed 6 different chain-codes on each peer. We are able to call chain-code APIs from first 3 peers (of Org1) successfully, but when we tried to call any API from Peers of Org2, it gives following error on SDK Terminal : error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Could not get deployment transaction from LSCC for mycc:v0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch at /home/venky/go/src/github.com/hyperledger/mortgage/mortgage/dlt-service/mortgage/node_modules/grpc/src/node/src/client.js:434:17 [2017-07-27 14:42:26.290] [ERROR] invoke-chaincode - transaction proposal was bad [2017-07-27 14:42:26.290] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-07-27 14:42:26.290] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined Incase someone has faced similar issue, please let us know its resolution or any clue. We appreciate any help. Thanks

abheekmaitra (Thu, 27 Jul 2017 15:15:26 GMT):
Has joined the channel.

abheekmaitra (Thu, 27 Jul 2017 15:18:04 GMT):
Hi, I have created a hyperledger fabric network and using CLI managed to create and join a channel. While trying to create a channel using the Node SDK, i am getting the following error.

abheekmaitra (Thu, 27 Jul 2017 15:18:06 GMT):
E0727 15:06:56.491222999 20721 ssl_transport_security.c:651] Invalid cipher list: undefined. E0727 15:06:56.491291586 20721 security_connector.c:837] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0727 15:06:56.491298068 20721 secure_channel_create.c:127] Failed to create secure subchannel for secure name 'localhost:7050' E0727 15:06:56.491301395 20721 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. error: [Orderer.js]: sendBroadcast - timed out after:3000 failed to create channel Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ubuntu/fabric-samples/hypNodePOC/node_modules/fabric-client/lib/Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) (node:20721) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ubuntu/fabric-samples/hypNodePOC/node_modules/fabric-client/lib/Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)

baoyangc (Fri, 28 Jul 2017 07:32:28 GMT):
```Connection fails: Error: error trying login and get user Context. Error: error trying to enroll user. Error: Calling enrollment endpoint failed with error [Error: unsupported certificate purpose]```

baoyangc (Fri, 28 Jul 2017 07:33:15 GMT):
meet this error after I set the trustedRoots to be:["---certificate--"],verify:true

akdj (Fri, 28 Jul 2017 08:21:49 GMT):
are there some ways/methods which are able to display a list of installed chaincode in the channel ?

akdj (Fri, 28 Jul 2017 11:13:57 GMT):
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction)

akdj (Fri, 28 Jul 2017 11:14:23 GMT):
where can I check the timeout value?

ssaddem (Fri, 28 Jul 2017 11:16:55 GMT):
hi, i have this problem (Error sending TRANSACTION: txid:6748d5243b9bcdcd1a489295b6a57694151d62f98f3ef1fed9ae1a57ee84d417 exists)

ssaddem (Fri, 28 Jul 2017 11:17:01 GMT):
guid is not unique ?

SyneBlockChainTeam (Fri, 28 Jul 2017 14:27:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=isAcsdkDfr47qYqig) @SyneBlockChainTeam Has

SyneBlockChainTeam (Fri, 28 Jul 2017 14:30:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=isAcsdkDfr47qYqig) In SDK Node, has anyone tried with 1 Organization with More then 3 Peers OR with 2 Organizations each with 3 Peers. We are looking forward for a reply. Thanks

MohammadObaid (Sat, 29 Jul 2017 07:56:23 GMT):
What does `ValidationCode=10` means in block header?

ericmvaughn (Sat, 29 Jul 2017 16:32:56 GMT):
@MohammadObaid From the TxValidationCode table at https://github.com/hyperledger/fabric/blob/release/protos/peer/transaction.proto#L125 10 equates to ENDORSEMENT_POLICY_FAILURE

ksachdeva (Sat, 29 Jul 2017 18:25:05 GMT):
Hi guys, finished a series of blog posts on bootstrapping a hyperledger fabric network using NodeJS SDK. Check them out at https://ksachdeva.github.io. There is also a sample project to support the posts at https://github.com/ksachdeva/hyperledger-fabric-example. The sample project is written using Typescript ( ... I end up creating the typings for some classes/objects and will finish it soon and post it on DefinitelyTyped).

ksachdeva (Sat, 29 Jul 2017 18:59:06 GMT):
@vanhumbeecka See this sample project (https://github.com/ksachdeva/hyperledger-fabric-example). I have the typings (work under progress ...). Yes it is a shame that a library of this complexity is not written using Typescript in the first place.

ksachdeva (Sat, 29 Jul 2017 18:59:06 GMT):
@vanhumbeecka See this sample project (https://github.com/ksachdeva/hyperledger-fabric-example) written using typescript. I have the typings (work under progress ...). Yes it is a shame that a library of this complexity is not written using Typescript in the first place.

MohammadObaid (Sat, 29 Jul 2017 19:36:36 GMT):
@ericmvaughn Thanks. Just one more thing I want to ask, when we invoke queries or insert data using curl, we also pass parameter `peers` in which we pass address of endorsing peers like `localhost:7051 ` ? Why we need to pass this paramter? I observed without passing this parameter , invoke query fails

ericmvaughn (Sat, 29 Jul 2017 20:21:23 GMT):
@MohammadObaid I'm not sure I understand your question. If you are asking about the queryByChaincode method then the targets (peers) parameter is optional.

MohammadObaid (Sun, 30 Jul 2017 08:20:19 GMT):
Hey @ericmvaughn I am talking about this query for example ```TRX_ID=$(curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes/mycc \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7051", "localhost:8051"], "fcn":"init", "args":["Khurrum","software","Ned11831314","3.5","Ned"] }')

MohammadObaid (Sun, 30 Jul 2017 08:21:20 GMT):
Why we need to pass peers paramter in this invoke query? I noticed if I didnt pass this parameter then I am getting endorsement failure error

ericmvaughn (Sun, 30 Jul 2017 22:55:50 GMT):
@MohammadObaid That appears to be from the fabric-sample/balance-transfer example. I took a quick look at the code for the sample and it choose to require peers and to include them as targets for sendTransactionProposal SDK call. They could have written the sample differently so that you wouldn't need it include the peers but this way gives you control over which peers you send the invoke to.

innoanyang (Mon, 31 Jul 2017 01:01:20 GMT):
Has joined the channel.

k0hl1 (Mon, 31 Jul 2017 05:52:58 GMT):
Hi All, I have a question. What is the best way to start / join channel and install/instantiate chaincode automatically whenever your webApp which interacts with hyperledger using node SDK starts ?

k0hl1 (Mon, 31 Jul 2017 05:53:51 GMT):
Right now I have to do these steps manually using curl commands. Please let me know if I am not clear enough, and I can provide more details.

k0hl1 (Mon, 31 Jul 2017 05:54:03 GMT):
@here

k0hl1 (Mon, 31 Jul 2017 05:54:07 GMT):
Thanks in advance

subbu165 (Mon, 31 Jul 2017 06:14:37 GMT):
@k0hl1 try following this example - https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer/app

paapighoda (Mon, 31 Jul 2017 10:46:22 GMT):
Has joined the channel.

prempatidar (Mon, 31 Jul 2017 10:56:41 GMT):
Has joined the channel.

prempatidar (Mon, 31 Jul 2017 10:57:06 GMT):
hi all, i am on mac terminal, I have setup environment and trying to run the first application by following http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html On executing node query.js command I am getting error cannot find module ‘fabric client’ could you please help on this

prempatidar (Mon, 31 Jul 2017 10:58:01 GMT):

Message Attachments

cbf (Mon, 31 Jul 2017 11:17:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=66dMbEnQ8c9SQN7Gb) @prempatidar http://hyperledger-fabric-docs.readthedocs.io/en/master/prereqs.html#node-js-runtime-and-npm there's a similar question in the #general channel - I would suggest you install node version 6.9.x as recommended (possibly using a version manager such as nvm)

prempatidar (Mon, 31 Jul 2017 11:18:43 GMT):
@cbf i have version 6.11.1 do u mean i should grad it down to 6.9.x

cbf (Mon, 31 Jul 2017 11:38:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wuCF9FfP6PfFMXpDf) @prempatidar yes, until we figure this out

prempatidar (Mon, 31 Jul 2017 12:13:38 GMT):
@cbf i have reduced it to 6.9.5 but the error remain same.

jimthematrix (Mon, 31 Jul 2017 12:21:45 GMT):
@prempatidar did you run `npm install` first?

prempatidar (Mon, 31 Jul 2017 12:23:25 GMT):
@jimthematrix yes i did that

jimthematrix (Mon, 31 Jul 2017 12:26:26 GMT):
@prempatidar from the directory where you launched "node query.js", do you have a folder "node_modules/fabric-client"?

prempatidar (Mon, 31 Jul 2017 12:28:34 GMT):
@jimthematrix no i do not have that folder in the directory, i downloaded it from sample apps for Hyperledger

jimthematrix (Mon, 31 Jul 2017 12:29:28 GMT):
make sure you run "npm install" from the same folder you are launching "node query.js"

GeneralResearch (Mon, 31 Jul 2017 12:35:17 GMT):
Has joined the channel.

nickgaski (Mon, 31 Jul 2017 15:06:38 GMT):
@prempatidar - if you DM me I will help troubleshoot with you

joshhw (Mon, 31 Jul 2017 19:18:54 GMT):
open [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Pb2u8TnkmNHwEiab4) @ksachdeva thanks for these posts. Have you tried to push this setup to an Openshift environment or something similar?

joshhw (Mon, 31 Jul 2017 19:18:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Pb2u8TnkmNHwEiab4) @ksachdeva thanks for these posts. Have you tried to push this setup to an Openshift environment or something similar?

jimthematrix (Tue, 01 Aug 2017 02:17:32 GMT):
@ksachdeva thanks for the excellent work on the blog series! we should really have it linked from the hyperledger documentation pages on RTD

barry_liang (Tue, 01 Aug 2017 03:47:01 GMT):
Has joined the channel.

barry_liang (Tue, 01 Aug 2017 03:52:30 GMT):
hi all I get a block by queryBlock(blockNumber, target),, but when queryBlockByHash(block, target) with the hash queryBlock returns ,, I cannot get the block, could you please help on this

shanlusun (Tue, 01 Aug 2017 04:09:10 GMT):
Hello, currently sometimes we get the *evethub* listener disconnected issue: `debug: [EventHub.js]: on.error - event stream:1 _current_stream:1 debug: [EventHub.js]: on.error - grpc stream state :3 debug: [EventHub.js]: _disconnect - start -- called due to:: Endpoint read failed debug: [EventHub.js]: _closeAllCallbacks - start debug: [EventHub.js]: _closeAllCallbacks - blockOnErrors 0 debug: [EventHub.js]: _closeAllCallbacks - transactionOnErrors 0 debug: [EventHub.js]: _closeAllCallbacks - chaincodeRegistrants 0 debug: [EventHub.js]: _disconnect - shutdown existing stream` Does anyone have some solution to resolve this ?

jaswanth (Tue, 01 Aug 2017 06:51:18 GMT):
Hi all, I am using Couchdb as my database to store the data , when i update the data ( by getting it and editing it ), in couchdb am seeing only the updated data , but when i query using node sdk , its returning all the transactions ( previous data and edited data ) . My question is hows it returning the previous data ? . if it stores every transaction separately then why in couchdb i find only the updated data ?

innoanyang (Tue, 01 Aug 2017 07:16:16 GMT):
sendPeersProposal - Promise is rejected: Error: Received message larger than max (4865439 vs. 4194304) at /app/money-transfer/node_modules/grpc/src/node/src/client.js:434:17 how to deel with the problem,promise received message larger than max

SDChoi (Tue, 01 Aug 2017 07:18:50 GMT):
Has joined the channel.

prempatidar (Tue, 01 Aug 2017 08:52:43 GMT):
@jimthematrix i an able to run npm install now and got node_modules folder created and there are lots of file under this forlder too including "fabric-ca-client" but not the "fabric-client" any help on this please

prempatidar (Tue, 01 Aug 2017 08:53:29 GMT):
@nickgaski please let me know if you are available to help on this issue

Randyshu2018 (Tue, 01 Aug 2017 09:49:51 GMT):
how to find all transactions associate with assert?

Randyshu2018 (Tue, 01 Aug 2017 09:52:10 GMT):
I use chaincode method of GetHistoryForKey and use the returns to iterator finally through the given api getTransacationById to get message....but it isn't convenient,is there some way else ?

smallant (Tue, 01 Aug 2017 09:58:19 GMT):
Hi guys, Working on an application with node sdk and I'm having a bit of a trouble treating the shim.Error(), because what it returns is something like this: Error: chaincode error (status: 500, message: Im the error) What I want is the message, only. (the status code might be usefull) Where is the "chaincode error" string being added? and shouldn't it be at least as a JSON object? The only way i can see for now is doing a string parse (that would be like hitting the code with a hammer)

urkizu (Tue, 01 Aug 2017 10:41:58 GMT):
Has joined the channel.

prempatidar (Tue, 01 Aug 2017 10:50:57 GMT):
@jimthematrix @nickgaski @cbf issue solved now for febric client, the error was due to Python version 3.6 i had on my system, whereas it requires python version 2.7 , i installed it and it works fine.

CarlXK (Tue, 01 Aug 2017 11:00:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hMJnuFpAT5GodSWMi) @shanlusun @jimthematrix @nickgaski for the java sdk , eventhub also auto disconnect, any solution?

prempatidar (Tue, 01 Aug 2017 11:24:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5ZysKtzqFoTbc7RC7) @jimthematrix the fabric client error is resolved now but i am getting error on hitting node query.js is below screen could you please help

prempatidar (Tue, 01 Aug 2017 11:24:44 GMT):

Message Attachments

danielleekc (Tue, 01 Aug 2017 11:57:22 GMT):
Has joined the channel.

jimthematrix (Tue, 01 Aug 2017 12:50:57 GMT):
@barry_liang note that the hash value passed into queryBlockByHash() is a byte array (Buffer), how did you set that? what value got returned?

jimthematrix (Tue, 01 Aug 2017 12:56:49 GMT):
@jaswanth the state database (couchdb or leveldb) is only a *cache* of the latest state values, the entire history of the states are saved in the ledger itself (in file), when querying for transactions it reads the ledger so you get the previous value too

jimthematrix (Tue, 01 Aug 2017 12:58:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mnj3qnYjhqj7AKbuB) @innoanyang you can use a grpc option variable to adjust the receive limit: https://github.com/hyperledger/fabric-sdk-node/blob/release/test/integration/grpc.js#L138

jimthematrix (Tue, 01 Aug 2017 12:59:24 GMT):
note the inline comment for that line has a typo, should've said "// now dial the *receive* limit up by setting to -1 for unlimited"

jimthematrix (Tue, 01 Aug 2017 13:00:58 GMT):
@prempatidar did npm install complete successfully or there were errors? likely that grpc failed the post install build or something of that sort

jimthematrix (Tue, 01 Aug 2017 13:03:16 GMT):
for the "Connect Failed" error, were your peers started properly?

gauthampamu (Tue, 01 Aug 2017 13:43:00 GMT):
I have few questions on how fabric authenticate the requests submitted by the application SDK. Does the endorsing peer check the signing identity ? How does it verify the identity of the request ?. Thanks in advance.

bretharrison (Tue, 01 Aug 2017 15:13:04 GMT):
@shanlusun Would you be able to provide a complete debug log of this eventhub disconnect issue. From the debug log provided I can see that there are no registered event listeners, which means that this client side has already received the event from the fabric side event service. This client side eventhub is not active so I do not understand why it received an error due to a read problem. Seeing the rest of the log may help.

bretharrison (Tue, 01 Aug 2017 15:30:40 GMT):
@shanlusun Would you be able to create a JIRA for this issue of eventhub getting an error. Are you seeing any problems with the event processing ? Because there are no event listeners, I do not think this is causing any issues with the event processing, other than this log message.

bretharrison (Tue, 01 Aug 2017 15:30:40 GMT):
@shanlusun Would you be able to create a JIRA for this issue of eventhub getting an error, then we can track the issue. Are you seeing any problems with the event processing ? Because there are no event listeners, I do not think this is causing any issues with the event processing, other than this log message.

jimthematrix (Tue, 01 Aug 2017 15:31:35 GMT):
@gauthampamu endorsing peers does the following checks: - the signing identity against the claimed MSP id (can the peer use the corresponding MSP instance to deserialize it?) - validate the certificate against the trust chain (issued by a known CA?) - check the identity against the policy on that requested operation (does the submitter have the privilege to do this?) - validate the signature of the payload against the cert (has the payload been tampered with?)

jimthematrix (Tue, 01 Aug 2017 15:31:35 GMT):
@gauthampamu endorsing peers does the following checks: - the signing identity against the claimed MSP id (can the peer use the corresponding MSP instance to deserialize it?) - validate the certificate against the trust chain (issued by a known CA?) - check the identity against the policy on that requested operation (does the submitter have the privilege to do this?) - validate the signature of the payload against the cert (has the payload been tampered with or replayed?)

ksachdeva (Tue, 01 Aug 2017 16:23:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nRCuZ4KTWE6FJbzTa) @joshhw I have not. In near future thinking to have this setup for Kubernetes.

MohammadObaid (Tue, 01 Aug 2017 16:45:18 GMT):
@ksachdeva Have you been able to enroll users from organization3 and invoke queries on behalf of that users.?

gauthampamu (Tue, 01 Aug 2017 18:21:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jzdiAqCG7qSFva8Bp) @jimthematrix Thanks for the response. Few additional questions. You mentioned about the policy "check the identity against the policy....", how do you define the policy ? Also can you expand on how to validates the signature of the payload. If the tamper the payload, can they note also modify the signature along with the payload.

jimthematrix (Tue, 01 Aug 2017 18:24:56 GMT):
policies are defined in the channel configuration, see this link for details: http://hyperledger-fabric.readthedocs.io/en/latest/configtx.html

jimthematrix (Tue, 01 Aug 2017 18:24:56 GMT):
policies are defined in the channel configuration, visit this link for details: http://hyperledger-fabric.readthedocs.io/en/latest/configtx.html

jimthematrix (Tue, 01 Aug 2017 18:26:37 GMT):
validating the signature is just a regular crypto operation, that uses the validated certificate that contains the public key to validate the signature over the essence of the request (payload + certificate)

jimthematrix (Tue, 01 Aug 2017 18:26:37 GMT):
validating the signature is just a regular crypto operation, that uses the validated certificate that contains the public key to validate the signature over the essence of the request (payload + certificate + nonce)

ksachdeva (Tue, 01 Aug 2017 18:26:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MSpShS6cXSSNhNnwY) @MohammadObaid I am not using the CA services, rather have pre-generated admins for all organizations. In all the example scripts, I am using the admins of the respective organizations. See the example to perform query of chaincode https://github.com/ksachdeva/hyperledger-fabric-example/blob/master/src/query-chaincode.ts#L49. So to answer your question, my example scripts are not showing how to enroll new users. This is keep to posts simple and not have clutter of more concepts than necessary. Integration with CA services such (fabric-ca) is a separate topic for me.

ksachdeva (Tue, 01 Aug 2017 18:30:38 GMT):
@jimthematrix Should I submit the typescript declarations to DefinitelyTyped or will you be open to include them in the fabric-client package itself. Including them in module is preferred so that no extra module installation is required by the user of the module (https://github.com/DefinitelyTyped/DefinitelyTyped#create-a-new-package) . Please suggest your preference.

ksachdeva (Tue, 01 Aug 2017 18:30:38 GMT):
@jimthematrix Should I submit the typescript declarations to DefinitelyTyped or will you be open to include them in the fabric-client package itself. Including them in module is preferred so that no extra module installation is required by the user of the module ( as suggested here https://github.com/DefinitelyTyped/DefinitelyTyped#create-a-new-package) . Please suggest your preference.

jimthematrix (Tue, 01 Aug 2017 18:46:02 GMT):
hi @ksachdeva thanks for the work on typescript, I actually think having it in a separate package is a good thing, so that app developers can choose b/w native JS vs. typescript, no?

jimthematrix (Tue, 01 Aug 2017 18:50:57 GMT):
a 3rd option is have a new package in the fabric-sdk-node repository that publishes a new package, can be named something like "fabric-client-ts" and simply require and re-expose fabric-client, and pair that with your declarations

jimthematrix (Tue, 01 Aug 2017 18:51:30 GMT):
app developers can choose b/w "fabric-client" and "fabric-client-ts"

jimthematrix (Tue, 01 Aug 2017 18:53:15 GMT):
if you are willing to work with that option, please go ahead and open a JIRA and submit a change request to gerrit

ksachdeva (Tue, 01 Aug 2017 19:00:52 GMT):
@jimthematrix the way it works is that in your module all that is required is to drop index.d.ts file, then in package.json add a field called typings:index.d.ts. If the developer is using plain JS then there is no difference for them. If they are using typescript then typescript compiler looks for the 'typings' field in package.json file to discover the location of index.d.ts. In brief, there is no problem for the plain/native JS projects if there is a typescript declaration file in the installed modules.

ksachdeva (Tue, 01 Aug 2017 19:01:45 GMT):
The other option is that of DefinitelyTyped where the typings of library projects are submitted and all the typescript user does is following "npm install @types/fabric-client".

jimthematrix (Tue, 01 Aug 2017 19:01:54 GMT):
ah ok I had thought you wanted the typescript/typings to be added to the package.json itself

jimthematrix (Tue, 01 Aug 2017 19:01:54 GMT):
ah ok I had thought you wanted the typescript/typings dependencies to be added to the package.json itself

ksachdeva (Tue, 01 Aug 2017 19:02:55 GMT):
no. rather drop the index.d.ts in your project i.e. fabric-client nodejs project. update package.json to have the field called typings.

jimthematrix (Tue, 01 Aug 2017 19:03:21 GMT):
i don't see a problem with that

ksachdeva (Tue, 01 Aug 2017 19:03:54 GMT):
ok so I would create first the JIRA report and then submit a pull request with the typings ?

jimthematrix (Tue, 01 Aug 2017 19:04:17 GMT):
can I also ask you to write a decent test suite to cover the new declarations?

jimthematrix (Tue, 01 Aug 2017 19:04:21 GMT):
(yes please)

jimthematrix (Tue, 01 Aug 2017 19:04:35 GMT):
I'm thinking the test case should mostly be headless (in test/unit folder)

ksachdeva (Tue, 01 Aug 2017 19:04:59 GMT):
the declarations do not include any "logic"

jimthematrix (Tue, 01 Aug 2017 19:05:02 GMT):
and a few key tests in the integration suite that actually talks to the fabric backend

ksachdeva (Tue, 01 Aug 2017 19:05:04 GMT):
may be you meant an example ?

ksachdeva (Tue, 01 Aug 2017 19:05:47 GMT):
look at https://github.com/ksachdeva/hyperledger-fabric-example/blob/master/src/types/fabric-client/index.d.ts

jimthematrix (Tue, 01 Aug 2017 19:05:49 GMT):
right, understood, what I'm thinking in terms of unit tests is mostly negative tests

ksachdeva (Tue, 01 Aug 2017 19:05:54 GMT):
this is the file that will be dropped/included

jimthematrix (Tue, 01 Aug 2017 19:06:30 GMT):
write a bad input and verify that exceptions by typescript is thrown

ksachdeva (Tue, 01 Aug 2017 19:06:39 GMT):
the negative tests will result in compilation failure. This is the value typescript brings i.e. it will not let you specify incorrect inputs etc

jimthematrix (Tue, 01 Aug 2017 19:08:07 GMT):
(reviewing the declaration)

ksachdeva (Tue, 01 Aug 2017 19:08:07 GMT):
as an example - https://github.com/ksachdeva/hyperledger-fabric-example/blob/master/src/create-channel.ts#L25 is creating the ChannelRequest object. When you plain javascript you can specify the properties which have typo or are not expected by the library. In typescript you will see a compilation error.

jimthematrix (Tue, 01 Aug 2017 19:08:35 GMT):
the main goal is to somehow catch the case where the declaration does not match the implementation

jimthematrix (Tue, 01 Aug 2017 19:08:56 GMT):
we don't want them to get out of sync, and if we don't have a way to check, then they will

ksachdeva (Tue, 01 Aug 2017 19:09:26 GMT):
this is correct and it is similar to the way the documentation is out of sync right now

ksachdeva (Tue, 01 Aug 2017 19:09:51 GMT):
that said, at least with the declarations you would made sure that the backward compatibility is there

ksachdeva (Tue, 01 Aug 2017 19:10:00 GMT):
especially when 1.0 has been released

ksachdeva (Tue, 01 Aug 2017 19:12:00 GMT):
>> the main goal is to somehow catch the case where the declaration does not match the implementation.

ksachdeva (Tue, 01 Aug 2017 19:12:05 GMT):
I think I see your point

ksachdeva (Tue, 01 Aug 2017 19:12:15 GMT):
you are saying that I would not end up creating wrong declarations

jimthematrix (Tue, 01 Aug 2017 19:12:15 GMT):
so i guess i would write test cases like this: t.doesNotThrow( // construct a ts object // call the function that uses the object );

jimthematrix (Tue, 01 Aug 2017 19:12:15 GMT):
so i guess i would write test cases like this: ```t.doesNotThrow( // construct a ts object // call the function that uses the object );```

ksachdeva (Tue, 01 Aug 2017 19:13:18 GMT):
I would replicate some of the unit tests that you have in typescript. This way there will be both examples and test cases

jimthematrix (Tue, 01 Aug 2017 19:13:43 GMT):
great, sounds good

ksachdeva (Tue, 01 Aug 2017 19:14:52 GMT):
the typings I have currently are not complete. Will it be okay to finish the work iteratively ? i.e. I will send a pull request now and then follow them up with more typing declarations.

jimthematrix (Tue, 01 Aug 2017 19:15:21 GMT):
of course, that's the best way ;-)

ulysses (Tue, 01 Aug 2017 21:21:44 GMT):
Has joined the channel.

daniel_pu (Wed, 02 Aug 2017 02:25:14 GMT):
Has joined the channel.

daniel_pu (Wed, 02 Aug 2017 04:12:14 GMT):
Both Block and BlockchainInfo have Hash inside,What's the difference between the them. https://fabric-sdk-node.github.io/global.html#Block

daniel_pu (Wed, 02 Aug 2017 04:12:14 GMT):
Both Block and BlockchainInfo have Hash inside,What's the difference between the them. https://fabric-sdk-node.github.io/global.html#Block '''

daniel_pu (Wed, 02 Aug 2017 04:12:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BBLhQ3sDrmkMNuovS) @berserkr i mean what's the difference between previous_hash in Block and previousBlockHash in BlockchainInfo

berserkr (Wed, 02 Aug 2017 04:14:18 GMT):
if I am not mistaken, @daniel_pu blockchaininfo gives you the top of the chain

berserkr (Wed, 02 Aug 2017 04:14:25 GMT):
block gives you each block info

berserkr (Wed, 02 Aug 2017 04:14:36 GMT):
you can use the top of the chain to walk backwards to build the bc

berserkr (Wed, 02 Aug 2017 04:14:43 GMT):
at least, that is what I used to do a while back

linyuadam (Wed, 02 Aug 2017 07:55:38 GMT):
Hi, all, for NodeSDK, what if I query for multiple peers? Now I try at my side and find if one of the peers down, then the query will return error. Is that expected?

outis (Wed, 02 Aug 2017 08:21:53 GMT):
Are there examples of (1) revoking a user and (2) removing an org from a channel?

CodeReaper (Wed, 02 Aug 2017 08:48:25 GMT):
Hey, Im having this problem in instantiation of chaincode, I've done instantiation multiple times, but lately this has started throwing error like this-

CodeReaper (Wed, 02 Aug 2017 08:48:27 GMT):

Message Attachments

CodeReaper (Wed, 02 Aug 2017 08:48:38 GMT):
Any help is appreciated

CodeReaper (Wed, 02 Aug 2017 08:48:38 GMT):
I've checked that I have all images up to date. Any help is appreciated

CodeReaper (Wed, 02 Aug 2017 08:48:38 GMT):
I've checked that I have all images up to date including ccenv. Any help is appreciated

dave.enyeart (Wed, 02 Aug 2017 10:26:38 GMT):
Looking at the docs at https://fabric-sdk-node.github.io/Channel.html. Why is it that getGenesisBlock(request) requires a an OrdererRequest with txid be passed in, while getChannelConfig() does not? It seems that both would simply read a block from the channel.

dave.enyeart (Wed, 02 Aug 2017 10:26:38 GMT):
@bretharrison Looking at the docs at https://fabric-sdk-node.github.io/Channel.html. Why is it that getGenesisBlock(request) requires a an OrdererRequest with txid be passed in, while getChannelConfig() does not? It seems that both would simply read a block from the channel.

shanlusun (Wed, 02 Aug 2017 12:04:05 GMT):
@bretharrison Thanks for reply! Finally we find the root cause of our issue, it's a network issue(domain mapping) which causes GRPC exception.

shanlusun (Wed, 02 Aug 2017 12:10:56 GMT):

Message Attachments

shanlusun (Wed, 02 Aug 2017 12:11:37 GMT):
But the sure thing for me is that: actually the node-sdk should not do disconnect when this is an exception from GRPC (fabric-sdk-node\fabric-client\lib\EventHub.js) Because if once the node-sdk does this disconnect, we will lose the listener.

bretharrison (Wed, 02 Aug 2017 12:38:23 GMT):
@shanlusun Yes the listener will be removed when an error occurs. If the registration of the listener also registers an error callback, the listener will be notified that there is problem with the event source and will be able to decide on the next action. It is likely that the event being listened for will not occur since there was an error and maybe a query should be used to check the status of the transaction.

SotirisAlfonsos (Wed, 02 Aug 2017 14:07:00 GMT):
Hi. I am issuing a bunch of invoke transactions and end up getting ```[2017-08-02 13:33:32.341] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.341] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.342] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.342] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.342] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.342] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined [2017-08-02 13:33:32.343] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined [2017-08-02 13:33:32.343] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined [2017-08-02 13:33:32.344] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined [2017-08-02 13:33:32.344] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined``` on the node sdk application. The transactions, however, are committed to the peers. I think it is an eventhub error. I am on beta version. Any ideas?

SotirisAlfonsos (Wed, 02 Aug 2017 14:07:00 GMT):
Hi. I am issuing a bunch of invoke transactions and end up getting ```[2017-08-02 13:33:32.341] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.341] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.342] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.342] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.342] [ERROR] Invoke-Transaction - Failed to send transaction and get notifications within the timeout period. [2017-08-02 13:33:32.342] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined [2017-08-02 13:33:32.343] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined [2017-08-02 13:33:32.343] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined [2017-08-02 13:33:32.344] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined [2017-08-02 13:33:32.344] [ERROR] Invoke-Transaction - Failed to order the transaction. Error code: undefined``` on the node sdk application. The transactions, however, are committed to the peers. I think it is an eventhub error. I am on beta version. At more than 90 transactions at the same time, the event-listener hangs. Any ideas?

jimthematrix (Wed, 02 Aug 2017 15:56:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CvRRPw7rnMBXH2EL4) @linyuadam Channel.queryByChaincode() allows you to target multiple peers, and if any peer failed for any reason, all the other calls should still resolve properly and all the results get returns in an array mixed with successful results and errors. is that not what you saw?

blw (Wed, 02 Aug 2017 16:23:31 GMT):
Has joined the channel.

blw (Wed, 02 Aug 2017 16:24:06 GMT):
Hi all, If I have installed and instantiated chaincode through the cli commands, is it still possible to interact with same network using the Node SDK? Specifically, my issue is that after creating a client object, I'm not able to access any of the information about the network (e.g. get channels, query chaincode, etc.). Is there some way for me to create the client object with the state already loaded?

ksachdeva (Wed, 02 Aug 2017 17:18:38 GMT):
@jimthematrix I have submitted the review request for the typescript typings. This is the first time I am contributing to Hyperledger and using gerrit so may need your guidance on mistakes I might have made with respect to the required process. Thanks.

bretharrison (Wed, 02 Aug 2017 17:39:00 GMT):
@dave.enyeart With getChannelConfig() the SDK automatically generates the TXID, I guess we should help out the users here and do the same on the getGenesisBlock()

ksachdeva (Wed, 02 Aug 2017 21:56:43 GMT):
@jimthematrix have also submitted the integration tests written using typescript. I made sure to reuse the unit & e2e utils and also have integrated the execution using gulp. Issue gulp test-ts to run them. Also tests use async/await therefore are more readable and take less number of lines than the javascript ones.

jimthematrix (Thu, 03 Aug 2017 01:27:48 GMT):
@ksachdeva one of the tasks for 1.1 node SDK is evaluating upgrading the engine support range to node.js 8 (skipping node.js 7), which I believe would bring along native async/await support introduced in 7.6

jimthematrix (Thu, 03 Aug 2017 01:29:23 GMT):
I'll review your changeset

linyuadam (Thu, 03 Aug 2017 02:39:49 GMT):
@jimthematrix Yes. It is as what you said. I found there are problems when I handling the return result. Thanks for your answer

yeyc.linuxf (Thu, 03 Aug 2017 07:34:24 GMT):
Has joined the channel.

FollowingGhosts (Thu, 03 Aug 2017 08:32:13 GMT):
Is there any way to test code written with the fabric-sdk without having to run a blockchain network? I'm trying to test my code in as isolated a fashion as possible

pd93 (Thu, 03 Aug 2017 10:24:59 GMT):
``` Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/...../node_modules/fabric-client/lib/Orderer.js:258:23) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/...../node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/...../node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/...../node_modules/grpc/src/node/src/client.js:242:12) ``` I've been consistently getting this error since updating to v1 (from v1-alpha). I've triple checked the ports for my orderer. Does anyone know what's causing this initialization error?

pd93 (Thu, 03 Aug 2017 10:24:59 GMT):
```Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/...../node_modules/fabric-client/lib/Orderer.js:258:23) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/...../node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/...../node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/...../node_modules/grpc/src/node/src/client.js:242:12) ``` I've been consistently getting this error since updating to v1 (from v1-alpha). I've triple checked the ports for my orderer. Does anyone know what's causing this initialization error?

mychewcents (Thu, 03 Aug 2017 10:55:19 GMT):
I'm having the same error from quite some time now, @pd93 .

DarshanBc (Thu, 03 Aug 2017 11:45:18 GMT):
Has joined the channel.

DarshanBc (Thu, 03 Aug 2017 11:45:24 GMT):
n this link they say there is a sample .js file https://fabric-sdk-node.readthedocs.io/en/latest/sample-standalone-app they say it is at https://raw.githubusercontent.com/hyperledger/fabric/master/examples/sdk/node/app.js but It gives error 404 can anyone of you help me in getting sample app

Vadim (Thu, 03 Aug 2017 11:47:29 GMT):
@pd93 did you check your orderer logs?

pd93 (Thu, 03 Aug 2017 12:05:02 GMT):
@Vadim Hey thanks, I have this: `Server.Serve failed to complete security handshake from "172.18.0.1:59132": tls: first record does not look like a TLS handshake`

pd93 (Thu, 03 Aug 2017 12:05:09 GMT):
Everything else looks ok

Vadim (Thu, 03 Aug 2017 12:05:45 GMT):
@pd93 does your sdk has tls enabled?

Vadim (Thu, 03 Aug 2017 12:06:10 GMT):
because it seems like it tries to talk plaintext, but the orderer is tls-enabled

pd93 (Thu, 03 Aug 2017 12:06:43 GMT):
Ohhhhh ok, that makes a lot of sense. I'm using the behave stuff to bring up the network at the moment. I totally forgot that it uses TLS by default

pd93 (Thu, 03 Aug 2017 12:06:51 GMT):
Thank you

Vadim (Thu, 03 Aug 2017 12:06:56 GMT):
no problem

jimthematrix (Thu, 03 Aug 2017 12:31:21 GMT):
@DarshanBc please disregard the content at the link http://fabric-sdk-node.readthedocs.io/, it should really be taken offline. latest node SDK doc is at fabric-sdk-node.github.io. the samples you are looking for can be found in https://github.com/hyperledger/fabric-samples

pd93 (Thu, 03 Aug 2017 13:25:55 GMT):
@jimthematrix +1 to taking down all the old documentation. The newest one is the 6th result on Google for me... All three of the following are above the actual latest docs. Has caused me a lot of confusion in the past https://jimthematrix.github.io/index.html http://fabric-sdk-node.readthedocs.io https://readthedocs.org/projects/fabric-sdk-node/

pd93 (Thu, 03 Aug 2017 14:06:48 GMT):
@jimthematrix Also found a typo - `postive`: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Channel.js#L893

ksachdeva (Thu, 03 Aug 2017 14:09:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZwxBMZFoBa6ykvTuk) @jimthematrix Yes nodejs 8 has support for native async/await. This is where the benefits of typescript are. Behind the scenes the typescript compiler is emitting generators so the code works for older nodejs versions as well. Async/Await internally is built upon generators anyways.

hamptonsmith (Thu, 03 Aug 2017 14:12:08 GMT):
Has joined the channel.

hamptonsmith (Thu, 03 Aug 2017 14:13:44 GMT):
Good morning everybody. For the ChannelRequest object used to call createChannel(), what is the difference between the optional byte-array field "envelope" and the optional byte-array field "config"? Both seem to accept the output of configtxgen?

jimthematrix (Thu, 03 Aug 2017 14:22:31 GMT):
@pd93 thanks will include the fix in the next release

pd93 (Thu, 03 Aug 2017 14:33:01 GMT):
@jimthematrix :thumbsup: Sounds like I'm being really picky now ;) but there's also a missing close bracket in one of the examples on the latest docs page for EventHub: https://fabric-sdk-node.github.io/EventHub.html `console.log(util.format('Transaction %s has completed', transactionId);` It's in the example for `new EventHub(clientContext)` on L17

jimthematrix (Thu, 03 Aug 2017 14:47:33 GMT):
https://jira.hyperledger.org/browse/FAB-5597

jimthematrix (Thu, 03 Aug 2017 14:48:58 GMT):
https://gerrit.hyperledger.org/r/12127

jimthematrix (Thu, 03 Aug 2017 14:49:07 GMT):
@pd93 ^^

MohammadObaid (Thu, 03 Aug 2017 14:52:54 GMT):
@jimthematrix I have been working on hyperledger-fabric node sdk v 1.0 and nearly created prototype based on dockers . However now I wanted to implement this architecture on real systems. I haven't found any documentation which helps in setting up environment in real systems. .Can we connect different computer machines using dockers and then spin up the network on all these different machine to create private blockchain? Any example of little trick to achieve this

mychewcents (Thu, 03 Aug 2017 15:14:01 GMT):
Hey @MohammadObaid , I have tried what you are trying to do and it is quite possible. I ran the network using 4 EC2 instances in AWS, for that matter. The trick is simple. Let's consider you set up an orderer on 127.1.1.1 and your peers are setup on 127.0.0.[1-10]. So, now when you define the IP Address of the Orderer in the docker-compose.yaml file for the peers, you can specify 127.1.1.1: for the orderer and the rest will be taken care of. Similar thing can be done for any other instance, whether it is a peer or orderer or fabric-ca. It is really the play of IP Addresses. I have tried it myself and if I'm not wrong, it is mere the IP Addresses.

Eric.Bui (Thu, 03 Aug 2017 16:37:22 GMT):
Has joined the channel.

MohammadObaid (Thu, 03 Aug 2017 17:27:30 GMT):
@mychewcents Thanks for info. So it means I need to know the public facing ip address of peers and port and will define that in docker-compose file. But I am confused will I need to download fabric images and all other yaml's file in all peers computers or in just one computer like for example in ordering service? Can I DM you for more questions?

rmohta (Thu, 03 Aug 2017 17:30:44 GMT):
`error: [EventHub.js]: on.data - Error unmarshalling transaction= TypeError: payloadByteBufferClone.remaining is not a function` -- using fabric-client@1.0. How can I read the payload of a custom event. In alpha-2, this code worked

MohammadObaid (Thu, 03 Aug 2017 17:56:29 GMT):
@mychewcents What about ibm bluemix . I heard they also offered blockchain services

DarshanBc (Fri, 04 Aug 2017 06:00:48 GMT):
Hi @jimthematrix at balance transfer they say Execute the REST APIs from the section https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer#running-the-sample-program but this link empty

DarshanBc (Fri, 04 Aug 2017 06:00:48 GMT):
Hi @jimthematrix In balance transfer example they say Execute the REST APIs from the section https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer#running-the-sample-program but this link empty

pd93 (Fri, 04 Aug 2017 08:24:38 GMT):
@DarshanBc The samples have been moved a separate repo: https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer

DarshanBc (Fri, 04 Aug 2017 08:28:55 GMT):
ok when I run npm install after removing node_modules again its giving some error

DarshanBc (Fri, 04 Aug 2017 08:30:39 GMT):
npm WARN balance-transfer@1.0.0 No repository field. npm ERR! Linux 4.4.0-42-generic npm ERR! argv "/root/.nvm/versions/node/v6.0.0/bin/node" "/root/.nvm/versions/node/v6.0.0/bin/npm" "install" npm ERR! node v6.0.0 npm ERR! npm v3.8.6 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! pkcs11js@1.0.9 install: `npm run build` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the pkcs11js@1.0.9 install script 'npm run build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pkcs11js package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pkcs11js npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pkcs11js npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/.../fabric-samples/balance-transfer/npm-debug.log

DarshanBc (Fri, 04 Aug 2017 08:31:14 GMT):
I am using normal internet I am not behinf firewall or proxy

pd93 (Fri, 04 Aug 2017 08:49:21 GMT):
@DarshanBc Your node/npm version look pretty dated..

pd93 (Fri, 04 Aug 2017 08:49:21 GMT):
@DarshanBc Your node/npm versions look pretty dated..

pd93 (Fri, 04 Aug 2017 08:50:02 GMT):
The docs states that you need Node.js v6.9.0 - 6.10.0 ( Node v7+ is not supported )

DarshanBc (Fri, 04 Aug 2017 08:57:52 GMT):
I have v6.9.5

pd93 (Fri, 04 Aug 2017 09:00:34 GMT):
Okaay then, I just saw `npm ERR! node v6.0.0`, `npm ERR! npm v3.8.6` and assumed

pd93 (Fri, 04 Aug 2017 09:00:34 GMT):
Okay then, I just saw `npm ERR! node v6.0.0`, `npm ERR! npm v3.8.6` and assumed

DarshanBc (Fri, 04 Aug 2017 09:03:36 GMT):
I tried with both versions

DarshanBc (Fri, 04 Aug 2017 09:03:38 GMT):
npm WARN balance-transfer@1.0.0 No repository field. npm ERR! Linux 4.4.0-42-generic npm ERR! argv "/root/.nvm/versions/node/v6.9.5/bin/node" "/root/.nvm/versions/node/v6.9.5/bin/npm" "install" npm ERR! node v6.9.5 npm ERR! npm v3.10.10 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! pkcs11js@1.0.9 install: `npm run build` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the pkcs11js@1.0.9 install script 'npm run build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pkcs11js package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pkcs11js npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pkcs11js npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/rtcin/Darshan/fabric-samples/balance-transfer/npm-debug.log

DarshanBc (Fri, 04 Aug 2017 09:03:38 GMT):
npm WARN balance-transfer@1.0.0 No repository field. npm ERR! Linux 4.4.0-42-generic npm ERR! argv "/root/.nvm/versions/node/v6.9.5/bin/node" "/root/.nvm/versions/node/v6.9.5/bin/npm" "install" npm ERR! node v6.9.5 npm ERR! npm v3.10.10 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! pkcs11js@1.0.9 install: `npm run build` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the pkcs11js@1.0.9 install script 'npm run build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pkcs11js package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pkcs11js npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pkcs11js npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/.../fabric-samples/balance-transfer/npm-debug.log

DarshanBc (Fri, 04 Aug 2017 09:04:58 GMT):
pkcs11js@1.0.9 install /home/.../fabric-samples/balance-transfer/node_modules/pkcs11js > npm run build sh: 1: npm: Permission denied balance-transfer@1.0.0 /home/.../fabric-samples/balance-transfer

DarshanBc (Fri, 04 Aug 2017 09:04:58 GMT):
before that I have this pkcs11js@1.0.9 install /home/.../fabric-samples/balance-transfer/node_modules/pkcs11js > npm run build sh: 1: npm: Permission denied balance-transfer@1.0.0 /home/.../fabric-samples/balance-transfer

dnzdlklc (Fri, 04 Aug 2017 10:16:11 GMT):
Has joined the channel.

karumbas (Fri, 04 Aug 2017 11:32:50 GMT):
Has joined the channel.

jimthematrix (Fri, 04 Aug 2017 14:40:12 GMT):
@ksachdeva I added a comment to https://gerrit.hyperledger.org/r/#/c/12121/, please let me know if you have any questions. Still reviewing 12113 and 12119

jyellick (Fri, 04 Aug 2017 14:59:47 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? If it's both, I'd recommend splitting this error message into two to better isolate the problem. (And if it's just the one, I'd consider making that more obvious, maybe just `Failed to get notifications within the timeout period.

DannyWong (Fri, 04 Aug 2017 15:24:37 GMT):
Hi, i would like to know the phase when transaction event is emitted (those defined in chaincode, not block event)

DannyWong (Fri, 04 Aug 2017 15:24:47 GMT):
endorsement phase / committing phase?

pmullaney (Fri, 04 Aug 2017 16:00:25 GMT):
@DannyWong : commit phase

blw (Fri, 04 Aug 2017 16:53:15 GMT):
Hi all, if a channel has been created from the CLI, is there a way to load that information into a StateStore instance? I'm trying to use the node sdk to invoke transactions on a channel that has already been created. Any direction would be helpful!

dklesev (Fri, 04 Aug 2017 17:04:33 GMT):
hi all, is there any example of a cli-node-tool built with node-sdk to interact with the fabric? I just need to retrieve the whole block information or tranaction including signatures

jimthematrix (Fri, 04 Aug 2017 17:41:40 GMT):
@jyellick that phrase is used only in the test code where a list of promises are lumped together as one resolve, including sending transaction to the orderer, and waiting for the eventhub to notify the listener. we did that because it almost never fails to send to the orderer. but i can see why this can be confusing when problems do happen

jimthematrix (Fri, 04 Aug 2017 17:41:47 GMT):
care to open a JIRA for this?

jyellick (Fri, 04 Aug 2017 17:42:56 GMT):
@jimthematrix Sure. I didn't realize this was test code, I'm guessing now that this message is being emitted by a user app which copied the test logic as a base.

jimthematrix (Fri, 04 Aug 2017 17:43:14 GMT):
yes, they all do ;-)

jimthematrix (Fri, 04 Aug 2017 17:43:14 GMT):
yes, that'd be my guess too, most app developers start with the sample or test code

jyellick (Fri, 04 Aug 2017 17:46:55 GMT):
https://jira.hyperledger.org/browse/FAB-5622 ^ There you go @jimthematrix

eacoeytaux (Fri, 04 Aug 2017 19:56:11 GMT):
Has joined the channel.

mescoba1 (Fri, 04 Aug 2017 20:35:44 GMT):
peer_url: 'grpc://localhost:7051', event_url: 'grpc://localhost:7053', orderer_url: 'grpc://localhost:7050'

mescoba1 (Fri, 04 Aug 2017 20:35:44 GMT):
peer_url: 'grpc://localhost:7051', event_url: 'grpc://localhost:7053', orderer_url: 'grpc://localhost:7050'

mescoba1 (Fri, 04 Aug 2017 20:42:22 GMT):
I have a network built, along with chaincode installed on each peer that is up and working. I am trying to work on the application side to get an `invoke.js` and `query.js` script running. I am having trouble outfitting the options

mescoba1 (Fri, 04 Aug 2017 20:42:22 GMT):
I have a network built, along with chaincode installed on each peer that is up and working. I am trying to work on the application side to get an `invoke.js` and `query.js` script running. Where do I get started? I am trying to model application to fabcar. How do I interface node with my chaincode? The fabcar uses the idea of a wallet with /creds

mescoba1 (Fri, 04 Aug 2017 20:42:22 GMT):
I have a network built, along with chaincode installed on each peer that is up and working. I am trying to work on the application side to get an `invoke.js` and `query.js` script running. *Where do I get started?* I am trying to model application to fabcar. *How do I interface node with my chaincode?* The fabcar uses the idea of a wallet with /creds

mescoba1 (Fri, 04 Aug 2017 20:42:22 GMT):
I have a network built, along with chaincode installed on each peer that is up and working. I am trying to work on the application side to get an `invoke.js` and `query.js` script running. *Where do I get started?* I am trying to model the application like fabcar. *How do I interface node with my chaincode?* The fabcar uses the idea of a wallet with /creds

mescoba1 (Fri, 04 Aug 2017 20:42:22 GMT):
*Help* I have a network built, along with chaincode installed on each peer that is up and working. I am trying to work on the application side to get an `invoke.js` and `query.js` script running. *Where do I get started?* I am trying to model the application like fabcar. *How do I interface node with my chaincode?* The fabcar uses the idea of a wallet with /creds

mescoba1 (Fri, 04 Aug 2017 20:43:45 GMT):
Where do I find the network, peer, ordering, event url?

asamk (Fri, 04 Aug 2017 21:48:41 GMT):
Hi need help on this issue I have the network running and a node sdk client app to invoke/query the chaincode which works fine when i run the node app, but when i try to put the client node app in a container it looks like it is not able to connect to the network. The client has the following error error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/sdkclient/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-08-04 21:29:55.425] [INFO] Query - Error: REQUEST_TIMEOUT The network compose file is different from the node client compose file, both are based on balance-transfer example.

ejiro (Fri, 04 Aug 2017 22:20:59 GMT):
Has joined the channel.

ejiro (Fri, 04 Aug 2017 22:33:08 GMT):
Hi guys, I followed the balance-transfer demo instruction and it seems to be using this client SDK for Node.js: https://www.npmjs.com/package/fabric-client You can only call a newChannel() using this version: Example: var hfc = require('fabric-client'); var client = new hfc(); var channel = client.newChannel(); //can do this var chain = client.newChain(); //CAN’T do this Then followed the marbles demo instruction and seems to be using a different client SDK for Node.js https://www.npmjs.com/package/hfc You can only call a newChannel() using this version: Example: var hfc = require('fabric-client'); var client = new hfc(); var channel = client.newChannel(); //CAN’T do this var chain = client.newChain(); //can do this What is the deal? Am I missing something? In the package.json, they are being reference as dependencies as below: "fabric-client": "^1.0.0", //for the balance-transfer demo OR "fabric-client": "file:./fabric-client", //for the marbles demo Whats the difference?

ejiro (Fri, 04 Aug 2017 22:33:08 GMT):
Hi guys, I followed the balance-transfer demo instruction and it seems to be using this client SDK for Node.js: https://www.npmjs.com/package/fabric-client You can only call a newChannel() using this version: Example: var hfc = require('fabric-client'); var client = new hfc(); var channel = client.newChannel(); //can do this var chain = client.newChain(); //CAN’T do this Then followed the marbles demo instruction and seems to be using a different client SDK for Node.js https://www.npmjs.com/package/hfc You can only call a newChain() using this version: Example: var hfc = require('fabric-client'); var client = new hfc(); var channel = client.newChannel(); //CAN’T do this var chain = client.newChain(); //can do this What is the deal? Am I missing something? In the package.json, they are being reference as dependencies as below: "fabric-client": "^1.0.0", //for the balance-transfer demo OR "fabric-client": "file:./fabric-client", //for the marbles demo Whats the difference?

k0hl1 (Sun, 06 Aug 2017 09:47:40 GMT):
Hi All, I wanted to know how to make sense of the data returned by queryBlock, queryTransaction or some other similar function in HL. The data is of the format "data": [ { "signature": { "type": "Buffer", "data": [ 48, 69, How to get to know from this, what was saved/updated in blockchain and when ?

k0hl1 (Sun, 06 Aug 2017 09:47:58 GMT):
Any help is appreciated! Thanks!

dklesev (Sun, 06 Aug 2017 18:07:44 GMT):
@k0hl1 transaction data is under payload->data

dklesev (Sun, 06 Aug 2017 18:10:15 GMT):
and the data is as raw-bytes as I know

dklesev (Sun, 06 Aug 2017 18:10:48 GMT):
there you find the rw-set

k0hl1 (Sun, 06 Aug 2017 18:24:31 GMT):
@dklesev Thanks I was able to find it, just after posting this question! So right now if I want something like a block explorer or transaction history page, I will need to code it manually or is there any other code base/resource?

dklesev (Sun, 06 Aug 2017 18:26:06 GMT):
there is a channel #blockchain-explorer , you can ask there. If you only want to view the txs you can look at composer (I prefer using it)

dklesev (Sun, 06 Aug 2017 18:26:06 GMT):
there is a channel #blockchain-explorer , you can ask there. If you only want to view the txs you can look at #composer (I prefer using it)

DarshanBc (Mon, 07 Aug 2017 05:22:44 GMT):
Is balance transfer sample a webapp based example because when I run the app a webserver in started at 4000 port but can't see anything out of it

dklesev (Mon, 07 Aug 2017 06:50:47 GMT):
@DarshanBc it's an api

dklesev (Mon, 07 Aug 2017 06:51:23 GMT):
follow the readme, there it's showed how you send requests

dklesev (Mon, 07 Aug 2017 06:51:37 GMT):
you can use Postman instead

DarshanBc (Mon, 07 Aug 2017 07:12:26 GMT):
I am now developing my chaincode before that I am trying to work on chaincode-docker-devmode I folowed these steps 1. I built my fabcar code with command go build 2. then installed it using command peer chaincode install -p chaincodedev/chaincode/fabcar/fabcar -n mycc -v 0 3. when I am tring to instantiate peer chaincode instantiate -n mycc -v 0 -c '{"Args":"initLedger"}' i am getting an error Error: Empty JSON chaincode parameters must contain the following keys: 'Args' or 'Function' and 'Args'

Vadim (Mon, 07 Aug 2017 07:43:42 GMT):
@DarshanBc try `-c '{"Args":["initLedger"]}'`

SanketPanchamia (Mon, 07 Aug 2017 09:19:32 GMT):
Has joined the channel.

MoulaliMvg (Mon, 07 Aug 2017 13:07:00 GMT):
Has joined the channel.

alexcrownus (Mon, 07 Aug 2017 15:00:48 GMT):
Has joined the channel.

mescoba1 (Mon, 07 Aug 2017 16:46:29 GMT):
What is a `User` and how do you create an instance without using a PeerAdmin? How do I create and use a `Client` to communicate with fabric step by step? I wish the Wiki was more comprehensive on the Application side.

KrisVishwanathan (Mon, 07 Aug 2017 18:01:15 GMT):
Has joined the channel.

smcambria22 (Mon, 07 Aug 2017 19:57:33 GMT):
Has joined the channel.

mffrench (Mon, 07 Aug 2017 22:02:00 GMT):
Hi there, I would like to know if it would be possible to use some merkle tree algo in the nodejs cli when hashing msg to be then signed and then broadcasted as a fabric transaction ? That way I assume we could enjoy multi process hash worker to speed up this part of the work ? Let me know what you think :)

KrisVishwanathan (Mon, 07 Aug 2017 22:34:50 GMT):
@jimthematrix npm install error for nodesdk

KrisVishwanathan (Mon, 07 Aug 2017 22:35:03 GMT):
@jimthematrix [ec2-user@ip-172-31-13-25 fabric-sdk-node]$ npm install > pkcs11js@1.0.9 install /home/ec2-user/fabric-samples/fabric-sdk-node/node_modules/pkcs11js > npm run build > pkcs11js@1.0.9 build /home/ec2-user/fabric-samples/fabric-sdk-node/node_modules/pkcs11js > node-gyp configure build gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR make: Entering directory `/home/ec2-user/fabric-samples/fabric-sdk-node/node_modules/pkcs11js/build' CXX(target) Release/obj.target/pkcs11/src/main.o make: g++: Command not found make: *** [Release/obj.target/pkcs11/src/main.o] Error 127 make: Leaving directory `/home/ec2-user/fabric-samples/fabric-sdk-node/node_modules/pkcs11js/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/ec2-user/.nvm/versions/node/v6.11.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.9.32-15.41.amzn1.x86_64 gyp ERR! command "/home/ec2-user/.nvm/versions/node/v6.11.2/bin/node" "/home/ec2-user/.nvm/versions/node/v6.11.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /home/ec2-user/fabric-samples/fabric-sdk-node/node_modules/pkcs11js gyp ERR! node -v v6.11.2 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm ERR! Linux 4.9.32-15.41.amzn1.x86_64 npm ERR! argv "/home/ec2-user/.nvm/versions/node/v6.11.2/bin/node" "/home/ec2-user/.nvm/versions/node/v6.11.2/bin/npm" "run" "build" npm ERR! node v6.11.2 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! pkcs11js@1.0.9 build: `node-gyp configure build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pkcs11js@1.0.9 build script 'node-gyp configure build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pkcs11js package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp configure build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pkcs11js npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pkcs11js npm ERR! There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install? npm ERR! Please include the following file with any support request: npm ERR! /home/ec2-user/fabric-samples/fabric-sdk-node/node_modules/pkcs11js/npm-debug.log fabric-sdk-node@1.0.0-snapshot /home/ec2-user/fabric-samples/fabric-sdk-node └── (empty) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! Linux 4.9.32-15.41.amzn1.x86_64 npm ERR! argv "/home/ec2-user/.nvm/versions/node/v6.11.2/bin/node" "/home/ec2-user/.nvm/versions/node/v6.11.2/bin/npm" "install" npm ERR! node v6.11.2 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! pkcs11js@1.0.9 install: `npm run build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pkcs11js@1.0.9 install script 'npm run build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pkcs11js package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pkcs11js npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pkcs11js npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/ec2-user/fabric-samples/fabric-sdk-node/npm-debug.log npm ERR! code 1

KrisVishwanathan (Mon, 07 Aug 2017 22:35:26 GMT):
wondering if any thoughts on this error

ejiro (Mon, 07 Aug 2017 23:00:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vJoTKcYSHSrxMdQfH) @ejiro No comments? Damn!!!

mffrench (Mon, 07 Aug 2017 23:12:02 GMT):
@ejiro : `"fabric-client": "^1.0.0", //for the balance-transfer demo`means node will download last 1.X.Y available in remote repository `"fabric-client": "file:./fabric-client", //for the marbles demo` means node will take the fabric client defined by the file path => changes has been done while working on fabric v1.0.0. client.newChannel() is the v1 way

jimthematrix (Tue, 08 Aug 2017 03:14:06 GMT):
@KrisVishwanathan your Ubuntu box may be lacking the essential build tools required for node-gyp build, try these commands and then try npm install again: ```sudo apt-get update sudo apt-get install build-essential

jimthematrix (Tue, 08 Aug 2017 03:16:12 GMT):
another potential obstacle from my own experience is if your Ubuntu box comes with python3, it needs to be downgraded to python2

jimthematrix (Tue, 08 Aug 2017 03:17:08 GMT):
I would first try the above two commands to get the build-essential, if still having errors, check python version and if 3 then install 2

mescoba1 (Tue, 08 Aug 2017 03:39:21 GMT):
When using the `fabricCAServices` object in test/integration the _endpoint url_ lives inside _config.json_ Where is _config.json_ consumed? If it is consumed when building the network, Can I find the CA port when I build my network without using the SDK?

mescoba1 (Tue, 08 Aug 2017 03:39:21 GMT):
When using the `fabricCAServices` object in test/integration/fabric-ca-services-tests.js the _endpoint url_ lives inside _config.json_ Where is _config.json_ consumed? If it is consumed when building the network, Can I find the CA port when I build my network without using the SDK?

mescoba1 (Tue, 08 Aug 2017 03:40:28 GMT):
Trying to access the CA port so I can use Fabric-CA to dynamically create a user

MoulaliMvg (Tue, 08 Aug 2017 04:41:06 GMT):
Anyone online?

SanketPanchamia (Tue, 08 Aug 2017 06:04:29 GMT):
Hi. I have been trying to deploy the balance-transfer example on a truly distributed system using node sdk. I have one VM that is running the orderer and other system that has the peers. I can enroll users, create channels and join peers but it gives me an error while trying to instantiate chaincode. The error on the console is [2017-08-08 01:12:16.497] [ERROR] instantiate-chaincode - Failed to send instantiate transaction and get notifications within the timeout period. undefined [2017-08-08 01:12:16.497] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined

SanketPanchamia (Tue, 08 Aug 2017 06:05:00 GMT):
Hi. I have been trying to deploy the balance-transfer example on a truly distributed system using node sdk. I have one VM that is running the orderer and other system that has the peers. I can enroll users, create channels and join peers but it gives me an error while trying to instantiate chaincode. The error on the console is [2017-08-08 01:12:16.497] [ERROR] instantiate-chaincode - Failed to send instantiate transaction and get notifications within the timeout period. undefined [2017-08-08 01:12:16.497] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined

SanketPanchamia (Tue, 08 Aug 2017 06:06:27 GMT):
Hi. I have been trying to deploy the balance-transfer example on a truly distributed system using node sdk. I have one VM that is running the orderer and other system that has the peers. I can enroll users, create channels and join peers but it gives me an error while trying to instantiate chaincode. The error on the console is [2017-08-08 01:12:16.497] [ERROR] instantiate-chaincode - Failed to send instantiate transaction and get notifications within the timeout period. undefined [2017-08-08 01:12:16.497] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined When i check the docker logs for the peer, the log shows 2017-08-08 05:12:47.405 UTC [ConnProducer] NewConnection -> ERRO 596 Failed connecting to orderer.example.com:7050 , error: context deadline exceeded 2017-08-08 05:12:47.406 UTC [deliveryClient] connect -> ERRO 597 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] All i have done is basically changed the config.json and network_config.json files to reflect the correct url of the orderer. Do i need to make any more changes?

DarshanBc (Tue, 08 Aug 2017 07:19:19 GMT):
Hi In fabcar sample if I have to query car by owner name how do it

SanketPanchamia (Tue, 08 Aug 2017 08:55:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=b4zinRWu4uRaeknWj) @SanketPanchamia Anyone have any idea on this? Its kind of urgent

Vadim (Tue, 08 Aug 2017 09:07:41 GMT):
@SanketPanchamia have you changed that in the configtx.yaml too?

Vadim (Tue, 08 Aug 2017 09:07:57 GMT):
namely, the orderer address

SanketPanchamia (Tue, 08 Aug 2017 09:33:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=597pFKor8MBBLguB8) @Vadim Yes i did that also. Then re-generated the certificates and channel artifacts.

Vadim (Tue, 08 Aug 2017 09:34:30 GMT):
is this correct address? `orderer.example.com:7050`

Vadim (Tue, 08 Aug 2017 09:36:10 GMT):
@SanketPanchamia perhaps you should `grep` for orderer.example.com, because it's clearly still left somewhere

SanketPanchamia (Tue, 08 Aug 2017 09:36:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Mf2FtXtpKJS7worGb) @Vadim Yes i changed it to the orderer url. I will try again and see.

hugo-borne (Tue, 08 Aug 2017 10:03:25 GMT):
Has joined the channel.

SanketPanchamia (Tue, 08 Aug 2017 10:10:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Mf2FtXtpKJS7worGb) @Vadim Do i even need to make changes to the config and network_Config json files? Need to give the url for grpcs calls right?

SanketPanchamia (Tue, 08 Aug 2017 11:20:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kQ6u9GLaLDChQYbFu) @SanketPanchamia Just an update. I did as you said and redeployed the network with the new url for orderer.

SanketPanchamia (Tue, 08 Aug 2017 11:20:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kQ6u9GLaLDChQYbFu) @SanketPanchamia Just an update. I did as you said and redeployed the network with the new url for orderer. I am getting the same error and the docker logs for orderer says this 2017-08-08 10:24:55.414 UTC [grpc] Printf -> DEBU 8ae grpc: Server.Serve failed to complete security handshake from "192.26.xx.xx:35440": EOF 2017-08-08 10:24:55.426 UTC [grpc] Printf -> DEBU 8af grpc: Server.Serve failed to complete security handshake from "192.26.xx.xx:36982": EOF 2017-08-08 10:24:55.550 UTC [grpc] Printf -> DEBU 8b0 grpc: Server.Serve failed to complete security handshake from "192.26.xx.xx:40274": EOF 2017-08-08 10:24:55.553 UTC [grpc] Printf -> DEBU 8b1 grpc: Server.Serve failed to complete security handshake from "192.26.xx.xx:56630": EOF

Vadim (Tue, 08 Aug 2017 11:25:23 GMT):
@SanketPanchamia the error you are facing is because of the TLS connection, the certificate is no longer valid because TLS fails to validate the CN in the certificate against the IP address. Simplest thing is to disable TLS.

rajasekharpippalla (Tue, 08 Aug 2017 12:00:52 GMT):
Has joined the channel.

MoulaliMvg (Tue, 08 Aug 2017 12:02:08 GMT):
[ ](https://chat.hyperledger.org/direct/SanketPanchamia?msg=2ZGbjPTdkPnt6kAuX)

MoulaliMvg (Tue, 08 Aug 2017 12:02:28 GMT):
can anyone

MoulaliMvg (Tue, 08 Aug 2017 12:03:20 GMT):
i am using fabric-samples / balance transfer example

jimthematrix (Tue, 08 Aug 2017 12:03:46 GMT):
@MoulaliMvg on your question above re: fabric-ca, you have to know it's endpoint information from out-of-band source, at the moment there's no way to find out from the network itself

jimthematrix (Tue, 08 Aug 2017 12:05:00 GMT):
regarding the error you see above with chaincode install, the error from the peer says "mycc.v0 exists", which means you've already installed the same chaincode of the same version before on those target peers

jimthematrix (Tue, 08 Aug 2017 12:06:05 GMT):
to get around that, you can either `docker rm` the docker instance to start from scratch, or `docker exec` to log onto the docker instance and remove the chaincode files from the /var/hyperledger/production/chaincodes/mycc.v0 folder

MoulaliMvg (Tue, 08 Aug 2017 12:06:57 GMT):
ok. let me check once

jimthematrix (Tue, 08 Aug 2017 12:13:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ujyJdPk8PKDoA8mhS) @Vadim note that unlike the SDKs which exposes the grpc options to override the TLS server hostnames in order to let the TLS handshake complete (when the server's TLS cert CN says one thing and the actual TLS endpoint of the server is another, which is the case you have), the peers and orderers do not allow this override (the override is considered for dev environment only). as a result if you want to deploy the network across VMs, either disable TLS or generate certs that match the endpoints

jimthematrix (Tue, 08 Aug 2017 12:13:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ujyJdPk8PKDoA8mhS) @SanketPanchamia note that unlike the SDKs which exposes the grpc options to override the TLS server hostnames in order to let the TLS handshake complete (when the server's TLS cert CN says one thing and the actual TLS endpoint of the server is another, which is the case you have), the peers and orderers do not allow this override (the override is considered for dev environment only). as a result if you want to deploy the network across VMs, either disable TLS or generate certs that match the endpoints

MoulaliMvg (Tue, 08 Aug 2017 12:13:26 GMT):

Message Attachments

MoulaliMvg (Tue, 08 Aug 2017 12:15:20 GMT):
@jimthematrix can you please look the above screen once

rajasekharpippalla (Tue, 08 Aug 2017 12:19:11 GMT):
@jimthematrix Is peer to peer communication possible with this https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer set up

jimthematrix (Tue, 08 Aug 2017 12:35:00 GMT):
@rajasekharpippalla not sure what you mean "peer to peer communications"? did you mean gossip?

rajasekharpippalla (Tue, 08 Aug 2017 12:38:21 GMT):
yes

MoulaliMvg (Tue, 08 Aug 2017 12:39:01 GMT):
@jimthematrix can you please see my error

MoulaliMvg (Tue, 08 Aug 2017 12:48:25 GMT):
i am getting bash: cd: mycc.v0: Not a directory

MoulaliMvg (Tue, 08 Aug 2017 12:50:50 GMT):

Message Attachments

SanketPanchamia (Tue, 08 Aug 2017 12:57:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WMfbZCeWPsfZanKse) @jimthematrix So what do you mean we need to generate "certs that match the endpoints". I changed the urls in the config files and regenrated the certificates. Is that what needs to be done? I will try disabling TLS and deploying the network across VMs and let you know.

rajasekharpippalla (Tue, 08 Aug 2017 13:06:26 GMT):

Message Attachments

rajasekharpippalla (Tue, 08 Aug 2017 13:07:04 GMT):
Can anyone please resolve this error

rajasekharpippalla (Tue, 08 Aug 2017 13:08:00 GMT):
I uninstall and reinstalled but no use

SanketPanchamia (Tue, 08 Aug 2017 13:14:21 GMT):
Can you type env and send the screenshot

rajasekharpippalla (Tue, 08 Aug 2017 13:15:54 GMT):

Message Attachments

rajasekharpippalla (Tue, 08 Aug 2017 13:16:47 GMT):

Message Attachments

rajasekharpippalla (Tue, 08 Aug 2017 13:17:26 GMT):

Message Attachments

SanketPanchamia (Tue, 08 Aug 2017 13:23:26 GMT):
it looks like the path is set properly. Not sure why it barfs for node and npm

pd93 (Tue, 08 Aug 2017 13:24:52 GMT):
Hey, I'm using the Node SDK with the e2e version of byfn. I'm trying to enroll an admin user on org1 with `ca_client.enroll`, but I'm getting `unsupported certificate purpose` back. The CA logs are set to debug and there's nothing there. I can only assume it's an issue on the SDK side. Does anyone know what causes this? Thanks

pd93 (Tue, 08 Aug 2017 13:24:52 GMT):
Hey, I'm using the Node SDK with the e2e version of byfn. I'm trying to enroll an admin user on org1 with `ca_client.enroll`, but I'm getting `Calling enrollment endpoint failed with error [Error: unsupported certificate purpose]` back. The CA logs are set to debug and there's nothing there. I can only assume it's an issue on the SDK side. Does anyone know what causes this? Thanks

Vadim (Tue, 08 Aug 2017 13:37:58 GMT):
@rajasekharpippalla do you use sudo to run runApp.sh?

rajasekharpippalla (Tue, 08 Aug 2017 13:38:11 GMT):
yes

Vadim (Tue, 08 Aug 2017 13:38:27 GMT):
you should not use sudo

rajasekharpippalla (Tue, 08 Aug 2017 13:39:35 GMT):
I tried with both

rajasekharpippalla (Tue, 08 Aug 2017 13:39:49 GMT):
with and without sudo

Vadim (Tue, 08 Aug 2017 13:39:50 GMT):
it should work without sudo

MoulaliMvg (Tue, 08 Aug 2017 13:40:02 GMT):
[ ](https://chat.hyperledger.org/direct/SanketPanchamia?msg=mLNo2GpYR86WhqQDZ)

rajasekharpippalla (Tue, 08 Aug 2017 13:40:08 GMT):
okay I'll try it again

Vadim (Tue, 08 Aug 2017 13:40:16 GMT):
@rajasekharpippalla does it show the same errors or something else?

rajasekharpippalla (Tue, 08 Aug 2017 13:42:23 GMT):

Message Attachments

rajasekharpippalla (Tue, 08 Aug 2017 13:44:20 GMT):

Message Attachments

Vadim (Tue, 08 Aug 2017 13:44:22 GMT):
@rajasekharpippalla `usermod -a -G docker rajasekhar` then logout and login again, the error should be fixed

Vadim (Tue, 08 Aug 2017 13:44:22 GMT):
@rajasekharpippalla `sudo usermod -a -G docker rajasekhar` then logout and login again, the error should be fixed

rajasekharpippalla (Tue, 08 Aug 2017 13:46:47 GMT):
I run the above command but how to logout and login

SanketPanchamia (Tue, 08 Aug 2017 13:49:16 GMT):

Message Attachments

SanketPanchamia (Tue, 08 Aug 2017 13:49:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WMfbZCeWPsfZanKse) @jimthematrix Hi i tried disabling the tls by setting these two flags as false ORDERER_GENERAL_TLS_ENABLED=false and CORE_PEER_TLS_ENABLED=false but still i get an error

Vadim (Tue, 08 Aug 2017 13:49:45 GMT):
@rajasekharpippalla just reboot

MoulaliMvg (Tue, 08 Aug 2017 13:54:26 GMT):

Message Attachments

MoulaliMvg (Tue, 08 Aug 2017 13:55:29 GMT):

Message Attachments

MoulaliMvg (Tue, 08 Aug 2017 13:56:35 GMT):
i am unable to instantiate chain code.. can anyone pls look above 2 screens and help me on this

Vadim (Tue, 08 Aug 2017 13:58:36 GMT):
@MoulaliMvg seems you already have this chaincode running

MoulaliMvg (Tue, 08 Aug 2017 14:00:12 GMT):
@Vadim i have logged in peers and removed mycc-v0 file actually then only I was able to install chaincode on peers successfully

Vadim (Tue, 08 Aug 2017 14:00:48 GMT):
you could just specified different chaincode name

MoulaliMvg (Tue, 08 Aug 2017 14:01:39 GMT):
ok.. let me check once

rajasekharpippalla (Tue, 08 Aug 2017 14:02:40 GMT):

Message Attachments

rajasekharpippalla (Tue, 08 Aug 2017 14:02:42 GMT):
after restarting also

Vadim (Tue, 08 Aug 2017 14:03:07 GMT):
@rajasekharpippalla do you even read what it prints?

Dpkkmr (Tue, 08 Aug 2017 14:03:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bufZFcRxbZjAgWbPE) @rajasekharpippalla Please share docker logs

Vadim (Tue, 08 Aug 2017 14:03:44 GMT):
@rajasekharpippalla it says: "chaincode exists mycc"

rajasekharpippalla (Tue, 08 Aug 2017 14:04:35 GMT):
@Dpkkmr How to get docker logs can you please tell me

Dpkkmr (Tue, 08 Aug 2017 14:05:16 GMT):
from console type "docker logs "

Dpkkmr (Tue, 08 Aug 2017 14:05:24 GMT):
to get container name

Dpkkmr (Tue, 08 Aug 2017 14:05:30 GMT):
type docker ps

rajasekharpippalla (Tue, 08 Aug 2017 14:08:04 GMT):

Message Attachments

rajasekharpippalla (Tue, 08 Aug 2017 14:08:12 GMT):
Or I need to send all 7 containers logs

Dpkkmr (Tue, 08 Aug 2017 14:08:33 GMT):
send orderer and peer0.org1

Dpkkmr (Tue, 08 Aug 2017 14:09:38 GMT):
just the error part

Dpkkmr (Tue, 08 Aug 2017 14:11:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ck872hNdaXX32Ldgm) @rajasekharpippalla Check for peer0 and Orderer

rajasekharpippalla (Tue, 08 Aug 2017 14:15:01 GMT):

Message Attachments

rajasekharpippalla (Tue, 08 Aug 2017 14:17:29 GMT):

Message Attachments

rajasekharpippalla (Tue, 08 Aug 2017 14:19:06 GMT):
@Dpkkmr can you please look the logs once

MoulaliMvg (Tue, 08 Aug 2017 14:22:00 GMT):
@Vadim thanks ... i have changed chaincode id as u suggested .. now working fine... how i can query all the peers to check 'a' value

MoulaliMvg (Tue, 08 Aug 2017 14:22:28 GMT):
i am using fabric-sample / balance transfer example

Dpkkmr (Tue, 08 Aug 2017 14:26:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mtR5byrCpynmYDRZZ) @rajasekharpippalla THe logs which you have shared looks good.

rajasekharpippalla (Tue, 08 Aug 2017 14:28:23 GMT):
So what's th problem there are some errors in peer log

Souvik.Dey (Tue, 08 Aug 2017 15:23:45 GMT):
I have successfully installed chaincode, but in the time of instantiation it throws error:

Souvik.Dey (Tue, 08 Aug 2017 15:23:48 GMT):
error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/ubuntu/hyperledger/hyperledger-node-app/node_modules/fabric-client/lib/Peer.js:100:19)

Souvik.Dey (Tue, 08 Aug 2017 15:24:33 GMT):
Please provide any solutions for that.

mescoba1 (Tue, 08 Aug 2017 16:09:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hxDW9AwiycyXq9hvW) @mescoba1 Anyone?

KrisVishwanathan (Tue, 08 Aug 2017 16:55:15 GMT):
@jimthematrix Jim, thanks for the pointers, earlier I was using AWS Linux AMI, now I moved to using Ubuntu and past that error. But struggling to get the basic network working and deploy fabcar

KrisVishwanathan (Tue, 08 Aug 2017 16:55:27 GMT):
below is the error in creating Chaincode:

KrisVishwanathan (Tue, 08 Aug 2017 16:55:33 GMT):
@jimthematrix root@ip-172-31-13-114:/home/ubuntu/fabric-samples/fabcar# ./startFabric.sh docker-compose -f docker-compose.yml down Stopping peer0.org1.example.com ... done Stopping ca.example.com ... done Stopping orderer.example.com ... done Stopping couchdb ... done Removing peer0.org1.example.com ... done Removing ca.example.com ... done Removing orderer.example.com ... done Removing couchdb ... done Removing network net_basic docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb Creating network "net_basic" with the default driver Creating orderer.example.com Creating couchdb Creating ca.example.com Creating peer0.org1.example.com # wait for Hyperledger Fabric to start # incase of errors when running later commands, issue export FABRIC_START_TIMEOUT= export FABRIC_START_TIMEOUT=10 #echo ${FABRIC_START_TIMEOUT} sleep ${FABRIC_START_TIMEOUT} # Create the channel docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/home/ubuntu/fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /home/ubuntu/fabric-samples/basic-network/config/channel.tx flag provided but not defined: -e See 'docker exec --help'. root@ip-172-31-13-114:/home/ubuntu/fabric-samples/fabcar#

KrisVishwanathan (Tue, 08 Aug 2017 16:55:38 GMT):
any pointers will help

harsha (Tue, 08 Aug 2017 18:16:10 GMT):
What's docker version ?

harsha (Tue, 08 Aug 2017 18:16:33 GMT):
`docker version`

harsha (Tue, 08 Aug 2017 18:19:15 GMT):
Would suggest you to make use of docker-1.17 if not already ..

KrisVishwanathan (Tue, 08 Aug 2017 18:24:25 GMT):
Docker version 1.12.6, let me try updating Docker

KrisVishwanathan (Tue, 08 Aug 2017 19:14:43 GMT):
Here is the error after docker upgrade

KrisVishwanathan (Tue, 08 Aug 2017 19:14:44 GMT):
Create the channel docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/home/ubuntu/fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /home/ubuntu/fabric-samples/basic-network/config/channel.tx 2017-08-08 19:13:12.795 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /home/ubuntu/fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/msp folder

KrisVishwanathan (Tue, 08 Aug 2017 19:15:39 GMT):
where is the that folder has newly generated certs

KrisVishwanathan (Tue, 08 Aug 2017 19:15:41 GMT):
root@ip-172-31-13-114:/home/ubuntu/fabric-samples/basic-network# ls -ltr /home/ubuntu/fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/msp total 12 drwxr-xr-x 2 root root 4096 Aug 8 19:04 tlscacerts drwxr-xr-x 2 root root 4096 Aug 8 19:04 cacerts drwxr-xr-x 2 root root 4096 Aug 8 19:11 admincerts

KrisVishwanathan (Tue, 08 Aug 2017 19:24:19 GMT):
the install seems to work now, after I changed the location

KrisVishwanathan (Tue, 08 Aug 2017 19:24:39 GMT):
thx for the pointer Harsha

mescoba1 (Tue, 08 Aug 2017 20:53:31 GMT):
```docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode install -n fabcar -v 1.0 -p github.com/fabcar```

mescoba1 (Tue, 08 Aug 2017 20:53:44 GMT):
Where does the chaincode live?

mescoba1 (Tue, 08 Aug 2017 20:54:23 GMT):
I don't understand the `-p github.com/fabcare`

mescoba1 (Tue, 08 Aug 2017 20:54:23 GMT):
I don't understand the `-p github.com/fabcar`

mescoba1 (Tue, 08 Aug 2017 20:54:48 GMT):
Where is this directory?

mescoba1 (Wed, 09 Aug 2017 00:13:00 GMT):

Message Attachments

mescoba1 (Wed, 09 Aug 2017 00:13:27 GMT):
Getting this error when trying to create an Instance of FabricCAServices

mescoba1 (Wed, 09 Aug 2017 00:13:55 GMT):
Using `var fabricCAEndpoint = "https://localhost:7054";`as the endpoint

mescoba1 (Wed, 09 Aug 2017 00:14:53 GMT):

Message Attachments

mescoba1 (Wed, 09 Aug 2017 00:15:26 GMT):
*7054

mescoba1 (Wed, 09 Aug 2017 00:15:56 GMT):
Any suggestions as to what I'm doing wrong?

GirijaShankarMishra (Wed, 09 Aug 2017 07:24:10 GMT):
Has joined the channel.

GirijaShankarMishra (Wed, 09 Aug 2017 07:25:51 GMT):

Message Attachments

GirijaShankarMishra (Wed, 09 Aug 2017 07:25:51 GMT):

Message Attachments

MoulaliMvg (Wed, 09 Aug 2017 07:27:05 GMT):
i am able to install chaincode on peer0.org1 & peer1.org1 and unable to install same chaincode on peer0.org2 & peer1.org2.. getting install proposal was bad.. can you please help me.. how to resolve this issue.. i am following fabric-sample/balance-transfer example

shzhaochy (Wed, 09 Aug 2017 08:07:46 GMT):
Has joined the channel.

shzhaochy (Wed, 09 Aug 2017 08:14:05 GMT):
hi, guys. How can I determine when the committers have finished their job, so that I can continue the next invoke? ``` channel.sendTransaction(request).then(response=>{ // can I continue the next invoke/query here? }) ```

shzhaochy (Wed, 09 Aug 2017 08:17:46 GMT):
I tried the code above, but it seem doesn't work. The official test code use sleep(), but that doesn't make sense in product environment

Vadim (Wed, 09 Aug 2017 08:19:05 GMT):
@shzhaochy you need to listen for an transaction event

Vadim (Wed, 09 Aug 2017 08:19:49 GMT):
@shzhaochy https://fabric-sdk-node.github.io/EventHub.html#registerTxEvent__anchor

shzhaochy (Wed, 09 Aug 2017 08:21:06 GMT):
I'll try it, thank you

GirijaShankarMishra (Wed, 09 Aug 2017 08:22:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hzMeFTeuD92k36Ztj) @GirijaShankarMishra @Vadim Can you help me in this issue

DarshanBc (Wed, 09 Aug 2017 09:03:16 GMT):
Hi while installing in chaincode I am getting this error `2017-08-09 08:56:24.495 UTC [msp/identity] Sign -> DEBU 00d Sign: plaintext: 0A8A070A5C08031A0C08B89CABCC0510...077FFE2F0000FFFFB684B535002E0000 2017-08-09 08:56:24.495 UTC [msp/identity] Sign -> DEBU 00e Sign: digest: 3209C6DDB1AEF8C14154ABA6FF7B0449E9716AC0BC11E28F8A12A430E7E2F159 2017-08-09 08:56:24.497 UTC [chaincodeCmd] install -> DEBU 00f Installed remotely response: 2017-08-09 08:56:24.497 UTC [main] main -> INFO 010 Exiting..... 2017-08-09 08:56:24.609 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-08-09 08:56:24.609 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-08-09 08:56:24.609 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-08-09 08:56:24.609 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2017-08-09 08:56:24.610 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A95070A6708031A0C08B89CABCC0510...324D53500A04657363630A0476736363 2017-08-09 08:56:24.610 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 0C9810D77E2FC4EE3B0E1917FD94CDB2D453BA76C7E758282C7FAD45F34E7C8F 2017-08-09 08:56:38.294 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0A95070A6708031A0C08B89CABCC0510...053A78FC7316ED5C63D48A1B58C3068B 2017-08-09 08:56:38.294 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: 2EDA73AEB2D7FF7167301154CEB7B83A7FA0248F047E01703D6DB64494EA4CC8 2017-08-09 08:56:38.296 UTC [main] main -> INFO 009 Exiting..... 2017-08-09 08:56:48.382 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-08-09 08:56:48.382 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-08-09 08:56:48.382 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-08-09 08:56:48.382 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2017-08-09 08:56:48.383 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A97070A6908031A0C08D09CABCC0510...1A0E0A0A696E69744C65646765720A00 2017-08-09 08:56:48.383 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 733A4D71FED33B153CF8B0335BF79B2B8E5B31B383D389CC6A8E1A5FF74DA0C7 Error: Error endorsing invoke: rpc error: code = Unknown desc = Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) -

pd93 (Wed, 09 Aug 2017 09:17:53 GMT):
@DarshanBc Have you checked your chaincode logs? Make sure to output any errors from your chaincode so that they show up there. Makes debugging much easier

pd93 (Wed, 09 Aug 2017 09:18:00 GMT):
Anyone seen these before? I get them while trying to connect to my eventhub ``` E0809 09:39:44.038646342 12493 ssl_transport_security.c:651] Invalid cipher list: undefined. E0809 09:39:44.038670538 12493 security_connector.c:837] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0809 09:39:44.038676796 12493 secure_channel_create.c:127] Failed to create secure subchannel for secure name '127.0.0.1:7053' E0809 09:39:44.038680813 12493 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. Error: Unable to connect to the peer event hub at Timeout._onTimeout (...../node_modules/fabric-client/lib/EventHub.js:278:21) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) ```

pd93 (Wed, 09 Aug 2017 09:18:00 GMT):
Anyone seen these before? I get them while trying to connect to my eventhub ```E0809 09:39:44.038646342 12493 ssl_transport_security.c:651] Invalid cipher list: undefined. E0809 09:39:44.038670538 12493 security_connector.c:837] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0809 09:39:44.038676796 12493 secure_channel_create.c:127] Failed to create secure subchannel for secure name '127.0.0.1:7053' E0809 09:39:44.038680813 12493 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. Error: Unable to connect to the peer event hub at Timeout._onTimeout (...../node_modules/fabric-client/lib/EventHub.js:278:21) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) ```

pd93 (Wed, 09 Aug 2017 09:20:08 GMT):
`docker logs -f`

GirijaShankarMishra (Wed, 09 Aug 2017 09:25:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hzMeFTeuD92k36Ztj) @GirijaShankarMishra Any suggestions on this??

Souvik.Dey (Wed, 09 Aug 2017 12:39:44 GMT):
I have invoked my transaction, it only return "{ status: 'SUCCESS' }". Is there any way get some asset balance in invoke method?

kletkeman (Wed, 09 Aug 2017 13:28:41 GMT):
@Souvik.Dey No, you cannot get an answer from an invoke. However, you emit an event with an asset balance from the chaincode (makes sense if the balance just changed) and listen for the event in your app.

pd93 (Wed, 09 Aug 2017 14:22:36 GMT):
Hey, I'm getting ```TypeError: self._getPeerForQuery is not a function at Object.queryInfo (...../node_modules/fabric-client/lib/Channel.js:755:19) ``` I've double checked that the function is there in Channel.js. Am I missing something obvious?

mescoba1 (Wed, 09 Aug 2017 23:53:00 GMT):

Message Attachments

mescoba1 (Wed, 09 Aug 2017 23:54:04 GMT):
Am I doing something wrong when creating a new User with the `FabricCAServices` object?

MoulaliMvg (Thu, 10 Aug 2017 02:40:26 GMT):
Can any one tell how to run fabcar's query.js and invoke.js from any editor

ArnabChatterjee (Thu, 10 Aug 2017 03:01:21 GMT):
Has joined the channel.

Selvam_Annamalai (Thu, 10 Aug 2017 03:46:03 GMT):
Has joined the channel.

SanketPanchamia (Thu, 10 Aug 2017 04:12:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=R7oS8iYYGmSnA4cN6) @mescoba1 It looks like the certificates generated and the network config dont match. Regenerate the certificates and then modify the network_config.json file accordingly.

MoulaliMvg (Thu, 10 Aug 2017 05:13:31 GMT):
I want to pass args(car) in fabcar example dynamically to query.js and invoke.js

MoulaliMvg (Thu, 10 Aug 2017 05:13:47 GMT):
Can anyone know how to do this

zhuxubin01 (Thu, 10 Aug 2017 06:30:19 GMT):
Has joined the channel.

shzhaochy (Thu, 10 Aug 2017 06:30:32 GMT):
hi, guys. What is right place to unregister a transaction event? is it a must to unregisterTxEvent after a invoke?

ArigelaSatyanarayana (Thu, 10 Aug 2017 08:30:53 GMT):
Has joined the channel.

pd93 (Thu, 10 Aug 2017 10:27:31 GMT):
So I'm getting this when submitting my invoke? Does anyone know where/when the `_msp_manager` is set and what to? ```Error: Failed to locate an MSP instance matching the endorser identity's orgainization Org1MSP at Channel.verifyProposalResponse (...../node_modules/fabric-client/lib/Channel.js:1598:10)```

pd93 (Thu, 10 Aug 2017 10:27:31 GMT):
So I'm getting this when submitting an invoke? Does anyone know where/when the `_msp_manager` is set and what to? ```Error: Failed to locate an MSP instance matching the endorser identity's orgainization Org1MSP at Channel.verifyProposalResponse (...../node_modules/fabric-client/lib/Channel.js:1598:10)```

MohammadObaid (Thu, 10 Aug 2017 14:13:54 GMT):
@here Hey If I want to implement fabric-sdk in real systems,then can endorser manually endorse transactions? RIghtnow When I invoke transactions, it is automatically endorsed and committed in ledger. Can we manually do all these activities by creating separate interface for each nodes like seperate gui for endorser and committer?

jimthematrix (Thu, 10 Aug 2017 14:17:56 GMT):
@MohammadObaid "manually" as in involving a human being to approve or reject the transaction proposal?

MohammadObaid (Thu, 10 Aug 2017 14:18:37 GMT):
@jimthematrix Yes exactly. just a submit or reject button to endorse or reject transaction

jimthematrix (Thu, 10 Aug 2017 14:23:15 GMT):
short answer is no, you don't want to do that because that's not how fabric (or blockchains that involve smart contracts in general) is designed to work. you want to make sure all copies of the chaincode during proposal endorsement run exactly the same logic and give exactly the same result for each transaction proposal. so involving a human being to do the work on behalf of the chaincode is against the design principles. you'll get into non-deterministic distributed executions and the system would not be stable

jimthematrix (Thu, 10 Aug 2017 14:23:15 GMT):
short answer is no, you don't want to do that because that's not how fabric (or blockchains that involve smart contracts in general) is designed to work. you want to make sure all copies of the chaincode during proposal endorsement run exactly the same logic and give exactly the same result for each transaction proposal. so involving a human being to do the work on behalf of the chaincode is against that design principle. you'll get into non-deterministic distributed executions and the system would not be stable

jimthematrix (Thu, 10 Aug 2017 14:23:59 GMT):
If I venture to guess that your goal is to implement a business process/workflow, would I be totally off the mark?

pd93 (Thu, 10 Aug 2017 14:28:19 GMT):
@jimthematrix I'm still really struggling with my error ^^^ Do you know where the `_msp_manager` is set? I figured it would be during `initialize()`, but it still shows up as empty: `MSPManager { _msps: {} }`

jimthematrix (Thu, 10 Aug 2017 14:32:51 GMT):
@pd93 the error is from the SDK using the MSPs, discovered from the channel configuration during `channel.initialize()`, to verify the endorsements in the proposal responses. it means either the channel hasn't been initialized or you have sent the proposal to a peer that's not part of the channel

pd93 (Thu, 10 Aug 2017 14:34:50 GMT):
Currently, I'm just brining up the network with the e2e byfn. So all my peers should be on the same channel no? I've definitely called `channel.initialize()` from my code

MohammadObaid (Thu, 10 Aug 2017 14:44:49 GMT):
@jimthematrix Thanks for detailed answer . Nope. It means only `transaction issuer` can manually invoke transaction and rest of entire process will be automated ? right?

jimthematrix (Thu, 10 Aug 2017 14:45:54 GMT):
correct

MohammadObaid (Thu, 10 Aug 2017 14:46:49 GMT):
Alright. Does all blockchain which includes smart contract like ethereum and others follow the same design prinicple or it is specific to hyperledger-fabric?

GirijaShankarMishra (Thu, 10 Aug 2017 17:47:31 GMT):
I am getting the below error while instantiating my chain code. I am using balance-transfer example. 2017-08-10 17:20:20.827 UTC [deliveryClient] connect -> ERRO 390 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050]

GirijaShankarMishra (Thu, 10 Aug 2017 17:47:31 GMT):
I am getting the below error while instantiating my chain code. I am using balance-transfer example. 2017-08-10 17:20:20.827 UTC [deliveryClient] connect -> ERRO 390 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050]

GirijaShankarMishra (Thu, 10 Aug 2017 17:47:31 GMT):
I am getting the below error while instantiating my chain code. I am using balance-transfer example. 2017-08-10 17:20:20.827 UTC [deliveryClient] connect -> ERRO 390 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] I am creating Multi Host network.

MohammadObaid (Thu, 10 Aug 2017 19:17:15 GMT):
@GirijaShankarMishra multi host network means different machines with different ip addres?

Moto (Thu, 10 Aug 2017 20:11:32 GMT):
Has joined the channel.

mescoba1 (Thu, 10 Aug 2017 21:50:21 GMT):
Has anyone been able to enroll the peer identity using the fabric-ca? I think my peer is using cryptogen certs, while the User I am interfacing with blockchain is getting certs from fabric-ca.

MoulaliMvg (Fri, 11 Aug 2017 04:18:21 GMT):

Message Attachments

MoulaliMvg (Fri, 11 Aug 2017 04:19:23 GMT):
CA Error while perfoming ./testAPI in balance transfer can anyone help me I'm unable to resolve this from 2 days

crazyquark (Fri, 11 Aug 2017 07:37:41 GMT):
Has joined the channel.

as93717913 (Fri, 11 Aug 2017 09:32:34 GMT):
Has joined the channel.

AER_IoT (Fri, 11 Aug 2017 09:37:21 GMT):
Has joined the channel.

as93717913 (Fri, 11 Aug 2017 09:37:32 GMT):
Hi, I just test the eventHub's reconnect ability, and found that when the peer connected to it crash, the evenhub will clean all callback when it emit "error" event, is there any solution that I can use the same event Hub. I just try to copy the eh._blockOnEvents and other callback map, and try to pass back to eventHub object when I try to invoke "connect" function, but I want to know is there any greater method ?

AER_IoT (Fri, 11 Aug 2017 09:43:26 GMT):
Hello I'm working on the Marbles projet and I wanted to get Block informations with the Node SDK. Marbles project is using the SDK 1.0.0-alpha version. But I saw on the newest version are more usefull decode function. So I'm trying to use the SDK 1.0.0-alpha with 1.0.0 fuction (I just chnaged the Block.js and Chain.js). Is someone already try it with success? Cause I got this error for the Read/Write set : error: [Chain.js]: Failed Query block. Error: Error: Illegal group end indicator for Message .rwset.TxReadWriteSet: 0 (not a group) at Error (native) at T.ProtoBuf.Reflect.MessagePrototype.decode (/home/ausy/marbles/node_modules/protobufjs/dist/protobuf.js:3230:31) at Function.Message.decode (/home/ausy/marbles/node_modules/protobufjs/dist/protobuf.js:2952:37) at decodeReadWriteSets (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:596:59) at decodeChaincodeAction (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:578:29) at decodeProposalResponsePayload (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:570:40) at decodeChaincodeEndorsedAction (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:547:37) at decodeChaincodeActionPayload (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:540:19) at decodeEndorserTransaction (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:182:20) at decodeBlockDataEnvelope (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:166:27) Thanks in advance :) Jack

AER_IoT (Fri, 11 Aug 2017 09:43:26 GMT):
Hello I'm working on the Marbles projet and I wanted to get Block informations with the Node SDK. Marbles project is using the SDK 1.0.0-alpha version. But I saw the newest versions are more usefull decode function. So I'm trying to use the SDK 1.0.0-alpha with 1.0.0 fuction (I just chnaged the Block.js and Chain.js). Is someone already try it with success? Cause I got this error for the Read/Write set : error: [Chain.js]: Failed Query block. Error: Error: Illegal group end indicator for Message .rwset.TxReadWriteSet: 0 (not a group) at Error (native) at T.ProtoBuf.Reflect.MessagePrototype.decode (/home/ausy/marbles/node_modules/protobufjs/dist/protobuf.js:3230:31) at Function.Message.decode (/home/ausy/marbles/node_modules/protobufjs/dist/protobuf.js:2952:37) at decodeReadWriteSets (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:596:59) at decodeChaincodeAction (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:578:29) at decodeProposalResponsePayload (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:570:40) at decodeChaincodeEndorsedAction (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:547:37) at decodeChaincodeActionPayload (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:540:19) at decodeEndorserTransaction (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:182:20) at decodeBlockDataEnvelope (/home/ausy/marbles/node_modules/fabric-client/lib/Block.js:166:27) Thanks in advance :) Jack

SotirisAlfonsos (Fri, 11 Aug 2017 10:05:15 GMT):
Hello. I am seeing significant delays on parallel transaction requests, on the responses from the peers to the node application. I can not really understand why is that. Would anyone be able to help?

as93717913 (Fri, 11 Aug 2017 10:07:57 GMT):
Which part? from the endorse proposal requested to the endorsement returned or the application send your endorsement to order?

SotirisAlfonsos (Fri, 11 Aug 2017 10:18:41 GMT):
On the response from the peers with the read-write sets and the signatures to the client, and also on the event listener that informs the client about the new transaction being added to the state.

SotirisAlfonsos (Fri, 11 Aug 2017 10:18:41 GMT):
On the response from the peers with the read-write sets and the signatures to the client, and also on the event listener that informs the client about the new transaction being added to the state. But the first part is the important one. It delays the whole transaction flow.

hamptonsmith (Fri, 11 Aug 2017 14:17:01 GMT):
Has left the channel.

gauthampamu (Fri, 11 Aug 2017 16:51:12 GMT):
I have a question on HSM support. There is JIRA request for HSM support in Java SDK. Is it supported in Nodejs and if not is there JIRA for adding support to NodeSDK. https://jira.hyperledger.org/browse/FAB-3137

sofun (Sat, 12 Aug 2017 00:39:45 GMT):
Has joined the channel.

sofun (Sat, 12 Aug 2017 00:44:41 GMT):
Hello.I want to query the chaincode. But I dont koow how to judge It just installed in peer or instantiated in channel. How should I do?

berserkr (Sat, 12 Aug 2017 04:43:42 GMT):
you can look at docker ps results

berserkr (Sat, 12 Aug 2017 04:43:46 GMT):
see where your cc is installed

berserkr (Sat, 12 Aug 2017 04:44:12 GMT):
wait, that is only if you install it, you need to instantiate it on the containers, not sure if there is a way to detect where cc is installed

GirijaShankarMishra (Sat, 12 Aug 2017 07:10:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JBQLPCPkYtjeZe6CC) @MohammadObaid Yes I am using different IP Adresses. I am getting IP SANS error

ydk210999 (Sun, 13 Aug 2017 07:21:58 GMT):
Has joined the channel.

k0hl1 (Mon, 14 Aug 2017 07:13:01 GMT):
Hi All,

k0hl1 (Mon, 14 Aug 2017 07:13:39 GMT):
I am working with hyperledger fabric, and wanted to know is there a way to get all transaction ids for a single key in blockchain ?

ajp (Mon, 14 Aug 2017 15:26:24 GMT):
Has joined the channel.

berserkr (Mon, 14 Aug 2017 23:44:21 GMT):
as far as I know, no, however, you could do a chack where you walk the bc backwards, getting all the txs per block, and for each tx, look for the key, then keep track on a hashtable so that the lookup is always o(n) worst case

ArnabChatterjee (Tue, 15 Aug 2017 05:02:50 GMT):
Hi Team, Any example how I can define endorsement policy while instantiating chaincode from node sdk? Thanks. *)

gloriow (Tue, 15 Aug 2017 09:07:50 GMT):
Has joined the channel.

bretharrison (Tue, 15 Aug 2017 10:25:59 GMT):
@MoulaliMvg check your CA port address.. I see 6054 in the log, is that what the docker compose says

bretharrison (Tue, 15 Aug 2017 10:27:55 GMT):
@AER_IoT It is best to have a complete match set of all nodeSDK and all fabric code.

bretharrison (Tue, 15 Aug 2017 10:36:15 GMT):
@as93717913 It should be possible to just re-register the events and then have the event hub `connect` again to the peer using the same eventHub object. Note that with the peer crash there may have been a loss of event notifications for the transaction. Use a query on the transaction ID to check the status.

bretharrison (Tue, 15 Aug 2017 10:46:58 GMT):
@ArnabChatterjee see `buildChaincodeProposal` method in the test/integration/e2e/e2eUtils.js

bretharrison (Tue, 15 Aug 2017 10:58:02 GMT):
@gauthampamu yes nodeSDK has support for HSM, see `bccsp_pkcs11.js` in fabric-client\lib\impl

bretharrison (Tue, 15 Aug 2017 11:03:39 GMT):
@berserkr @sofun Client has queryInstalledChaincodes(peer) to ask a peer for installed chaincodes and Channel has queryInstantiatedChaincodes(peer) to ask the channel the running chaincodes.

DarshanBc (Tue, 15 Aug 2017 11:08:27 GMT):
In helper.js of balance transfer wrt line 26 & 56 as per the documentation copService is an instance variable of fabric-ca-Client but instantiated as instance variable of fabric-ca-Service Class can anybody clarify

gauthampamu (Tue, 15 Aug 2017 13:36:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8FQCoGNiT9eoJMxQr) @bretharrison What are some HSM products we can use for x86 and what HSMs are using to the SDK ?

Jonny (Tue, 15 Aug 2017 14:10:57 GMT):
Has joined the channel.

pd93 (Tue, 15 Aug 2017 14:59:36 GMT):
Anytime I try to use the `channel.queryInfo()` method I get the error: ```TypeError: this._getPeerForQuery is not a function at Object.queryInfo (...../node_modules/fabric-client/lib/Channel.js:754:19)``` Anyone know why this would happen? The method definitely exists in Channel.js

berestet (Tue, 15 Aug 2017 20:48:50 GMT):
Hi guys, I am trying to use node-sdk to create and join channel (fabric 1.0). API docs seem to indicate that `channel.joinChannel`_automatically acquires the channel's genesis block from the channel object's orderer_ However, it appears that `JoinChannelRequest`, which is an input to the `joinChannel` call, requires encoded bytes of the genesis block... Could someone help me understand whether I indeed need to obtain genesis block before making a call to `joinChannel`. Thanks!

berestet (Tue, 15 Aug 2017 20:48:50 GMT):
Hi guys, I am trying to use node-sdk to create and join channel (fabric 1.0). API docs seem to indicate that `channel.joinChannel`automatically acquires the channel's genesis block from the channel object's orderer... However, it appears that `JoinChannelRequest`, which is an input to the `joinChannel` call, requires encoded bytes of the genesis block... Could someone help me understand whether I indeed need to obtain genesis block before making a call to `joinChannel`. Thanks!

vdods (Tue, 15 Aug 2017 22:30:18 GMT):
@berestet Yes, you do have to obtain the genesis block first -- the docs are misleading

vdods (Tue, 15 Aug 2017 22:30:35 GMT):
Maybe they intended for the genesis block to be retrieved automatically, but only changed the docs, not the code

vdods (Tue, 15 Aug 2017 22:32:07 GMT):
Hi all, I'm finally getting around to turning on TLS on all the different components of my fabric app (ca, peer, orderer), and I'm getting the following error upon call to client createChannel: ``` debug: [Client.js]: _createOrUpdateChannel - start debug: [Client.js]: _createOrUpdateChannel - have config_update debug: [Client.js]: _stringToSignature - signature is protobuf debug: [client-utils.js]: buildChannelHeader - type 2 channel_id mychannel tx_id NaN epoch % chaincode_id undefined debug: [crypto_ecdsa_aes]: ecdsa signature: negative=0, words=[64789103, 67017020, 15476840, 46459565, 18131567, 58249244, 13565660, 54425202, 60069934, 1466702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, negative=0, words=[52024830, 8089985, 30973140, 26461082, 48924388, 28009359, 37966563, 59986482, 61863744, 404506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, recoveryParam=0 debug: [Client.js]: _createOrUpdateChannel - about to send envelope debug: [Orderer.js]: sendBroadcast - start debug: [Orderer.js]: sendBroadcast - sent message E0815 22:12:14.310575193 29 ssl_transport_security.c:651] Invalid cipher list: undefined. E0815 22:12:14.310689003 29 security_connector.c:837] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0815 22:12:14.310694043 29 secure_channel_create.c:127] Failed to create secure subchannel for secure name 'orderer.example.com:7050' E0815 22:12:14.310696516 29 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. error: [Orderer.js]: sendBroadcast - timed out after:3000 debug: [Client.js]: _createOrUpdateChannel - rejecting with Error: REQUEST_TIMEOUT ```

vdods (Tue, 15 Aug 2017 22:32:07 GMT):
Hi all, I'm finally getting around to turning on TLS on all the different components of my fabric app (ca, peer, orderer), and I'm getting the following error upon call to client createChannel: ```debug: [Client.js]: _createOrUpdateChannel - start debug: [Client.js]: _createOrUpdateChannel - have config_update debug: [Client.js]: _stringToSignature - signature is protobuf debug: [client-utils.js]: buildChannelHeader - type 2 channel_id mychannel tx_id NaN epoch % chaincode_id undefined debug: [crypto_ecdsa_aes]: ecdsa signature: negative=0, words=[64789103, 67017020, 15476840, 46459565, 18131567, 58249244, 13565660, 54425202, 60069934, 1466702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, negative=0, words=[52024830, 8089985, 30973140, 26461082, 48924388, 28009359, 37966563, 59986482, 61863744, 404506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, recoveryParam=0 debug: [Client.js]: _createOrUpdateChannel - about to send envelope debug: [Orderer.js]: sendBroadcast - start debug: [Orderer.js]: sendBroadcast - sent message E0815 22:12:14.310575193 29 ssl_transport_security.c:651] Invalid cipher list: undefined. E0815 22:12:14.310689003 29 security_connector.c:837] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0815 22:12:14.310694043 29 secure_channel_create.c:127] Failed to create secure subchannel for secure name 'orderer.example.com:7050' E0815 22:12:14.310696516 29 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. error: [Orderer.js]: sendBroadcast - timed out after:3000 debug: [Client.js]: _createOrUpdateChannel - rejecting with Error: REQUEST_TIMEOUT ```

vdods (Tue, 15 Aug 2017 22:33:10 GMT):
There's clearly some problem with the grpcs connection, but the error messages printed are not useful in debugging it

vdods (Tue, 15 Aug 2017 23:15:22 GMT):
Looks like it may have to do with the `--tls-cipher-list` option that can be specified to nodejs. I'm running nodejs 6.7.0. Presumably its default cipher list includes the one that the orderer uses?

vdods (Tue, 15 Aug 2017 23:15:41 GMT):
Not sure why the cipher list is undefined

vdods (Wed, 16 Aug 2017 00:02:11 GMT):
I figured out why -- Client.js is attempting to set `process.env.GRPC_SSL_CIPHER_SUITES = sdkUtils.getConfigSetting('grpc-ssl-cipher-suites');`, but the function call is returning `undefined`. I'm not adding any config files, and presumably it should be using the default one

vdods (Wed, 16 Aug 2017 00:02:27 GMT):
Either way, it didn't print any sort of error message when it failed to retrieve that config setting

DarshanBc (Wed, 16 Aug 2017 06:43:15 GMT):
can anybody explain when to use fabricCAclient and fabricCAService Class

dsanchezseco (Wed, 16 Aug 2017 07:02:51 GMT):
Has left the channel.

Vadim (Wed, 16 Aug 2017 07:46:38 GMT):
@vdods check your default config file... It's should be as https://github.com/hyperledger/fabric-sdk-node/blob/509b86a0b37fdb8e0d84847428494bd3660b43eb/fabric-client/config/default.json

k0hl1 (Wed, 16 Aug 2017 08:15:34 GMT):
@berserkr Thanks for your input. But it is too tedious to traverse via the whole blockchain. It would have been so much simpler if they would be saving these details in some hashmap on the go.

MoulaliMvg (Wed, 16 Aug 2017 08:35:05 GMT):
i am working on nodejs and go ... able to send some string values while init chaincode and able to query also.. but unable to handle JSON objects instead of string vales .. can any one help me what is the approach we can follow to do this

Vadim (Wed, 16 Aug 2017 08:45:55 GMT):
@MoulaliMvg in nodejs you do `JSON.stringify(obj)`, in go code ``` myObj := myObjStruct{} err := json.Unmarshal(marshalledBytes, &myOb)

Vadim (Wed, 16 Aug 2017 08:46:27 GMT):
more on json in golang: https://gobyexample.com/json

KevinBai (Wed, 16 Aug 2017 09:10:12 GMT):
hello, when join channel, it return status: 500, message: Cannot create ledger from genesis block, due to LedgerID already exists?

MoulaliMvg (Wed, 16 Aug 2017 09:13:32 GMT):
@Vadim so with curl commands can i give json object using angularjs

Vadim (Wed, 16 Aug 2017 09:14:25 GMT):
@MoulaliMvg yes, usually this is how angular communicates with nodejs. But this is not related to fabric.

Vadim (Wed, 16 Aug 2017 09:14:55 GMT):
and angular does not need curl

reoim10 (Wed, 16 Aug 2017 09:34:05 GMT):
Hi, I'm trying to use grpcs protocol with tls enabled. I need to provide connectionOption(https://fabric-sdk-node.github.io/global.html#ConnectionOpts). Where can I get the pem file?

rajasekharpippalla (Wed, 16 Aug 2017 11:38:15 GMT):
yes I'm able to send and get services to fabric network using AngularJs but I'm unable to send JSON object to fabric in angularjs instead I'm sending with comma separated values and second procedure by following this link : https://stackoverflow.com/questions/45562918/proper-way-to-maintain-key-to-store-value-state-in-chaincode

rajasekharpippalla (Wed, 16 Aug 2017 11:38:23 GMT):
@Vadim

rajasekharpippalla (Wed, 16 Aug 2017 11:39:10 GMT):
@Vadim this is @MoulaliMvg

Vadim (Wed, 16 Aug 2017 11:40:26 GMT):
@rajasekharpippalla from angular JS you need first to send it to your nodejs app, and from nodejs to fabric

rajasekharpippalla (Wed, 16 Aug 2017 11:42:24 GMT):
@Vadim I think in balance transfer while using service commands from angular internally it uses nodejs?

Vadim (Wed, 16 Aug 2017 11:43:13 GMT):
does balance-transfer have an angular component?

rajasekharpippalla (Wed, 16 Aug 2017 11:44:17 GMT):
no curl commands I'm using as services in angularjs

Vadim (Wed, 16 Aug 2017 11:45:06 GMT):
I don't understand your question

rajasekharpippalla (Wed, 16 Aug 2017 11:46:04 GMT):
wait I will show codde

rajasekharpippalla (Wed, 16 Aug 2017 11:46:10 GMT):
code*

mescoba1 (Wed, 16 Aug 2017 20:51:05 GMT):

Message Attachments

mescoba1 (Wed, 16 Aug 2017 20:51:38 GMT):

Message Attachments

mescoba1 (Wed, 16 Aug 2017 21:19:41 GMT):
```Create a client and set the wallet location Set wallet path, and associate user AdminX with application Check user is enrolled, and set a query URL in the network mychannel null Make query Assigning transaction_id: b78e30ae43a992976deb7ed842e0afd1c8010ed0d9ae19cfe54756c6a653d1e5 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Endpoint read failed at /Users/miguelescobar/Documents/go/src/github.com/hyperledger/fabric/examples/e2e_cli/node_modules/grpc/src/node/src/client.js:434:17 returned from query Query result count = 1 error from query = { Error: Endpoint read failed at /Users/miguelescobar/Documents/go/src/github.com/hyperledger/fabric/examples/e2e_cli/node_modules/grpc/src/node/src/client.js:434:17 code: 14, metadata: Metadata { _internal_repr: {} } } Response is Error: Endpoint read failed ```

mescoba1 (Wed, 16 Aug 2017 21:20:47 GMT):
The shows up as `null`

mescoba1 (Wed, 16 Aug 2017 21:20:58 GMT):
Which I think is the problem

mescoba1 (Wed, 16 Aug 2017 21:21:22 GMT):
I get Endpoint errors when things are wrong with ports

mescoba1 (Wed, 16 Aug 2017 21:26:44 GMT):
```channel = client.newChannel(options.channel_id); channel.addPeer(client.newPeer(options.network_url));```

mescoba1 (Wed, 16 Aug 2017 21:48:55 GMT):
```Create a client and set the wallet location Set wallet path, and associate user AdminX with application Check user is enrolled, and set a query URL in the network Channel { _name: 'mychannel', _peers: [ Peer { _options: [Object], _url: 'grpc://localhost:7051', _endpoint: [Object], _request_timeout: 45000, _endorserClient: [Object], _name: null } ], _anchor_peers: [], _orderers: [], _kafka_brokers: [], _clientContext: Client { _cryptoSuite: null, _channels: { mychannel: [Circular] }, _stateStore: FileKeyValueStore { _dir: '/Users/miguelescobar/Documents/go/src/github.com/hyperledger/fabric/examples/e2e_cli/creds' }, _userContext: User { _name: 'AdminX', _roles: null, _affiliation: '', _enrollmentSecret: '', _identity: [Object], _signingIdentity: [Object], _mspId: 'Org1MSP', _cryptoSuite: [Object] }, _msps: Map {}, _devMode: false }, _msp_manager: MSPManager { _msps: {} } } Peer { _options: { 'grpc.primary_user_agent': 'grpc-node/1.2.4' }, _url: 'grpc://localhost:7051', _endpoint: Endpoint { addr: 'localhost:7051', creds: ChannelCredentials {} }, _request_timeout: 45000, _endorserClient: Client { '$channel': Channel {} }, _name: null } Make query Assigning transaction_id: c48db79999bedb8358d50ff71cd11f7688deb0ee111d1665cd5ae067b1f54348 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Endpoint read failed at /Users/miguelescobar/Documents/go/src/github.com/hyperledger/fabric/examples/e2e_cli/node_modules/grpc/src/node/src/client.js:434:17 returned from query Query result count = 1 error from query = { Error: Endpoint read failed at /Users/miguelescobar/Documents/go/src/github.com/hyperledger/fabric/examples/e2e_cli/node_modules/grpc/src/node/src/client.js:434:17 code: 14, metadata: Metadata { _internal_repr: {} } } Response is Error: Endpoint read failed

mescoba1 (Wed, 16 Aug 2017 21:49:08 GMT):
I'm using fabcar, invoking the chaincode using query.js I dynamically created a User with fabric-ca. I am getting `Error: Endpoint read failed` any suggestions?

mescoba1 (Wed, 16 Aug 2017 21:51:51 GMT):
I have a peer container with the port 7051

vdods (Wed, 16 Aug 2017 23:26:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EchfHgpv4y8HBpWCr) @Vadim I think I figured it out. Because of some sloppy use of global variables, as well as some assumption about what variable name the fabric client will be imported as, the fabric-ca-client default.json config file is being loaded instead of the fabric-client one.

vdods (Wed, 16 Aug 2017 23:27:58 GMT):
In particular, I use ```const FabricCAServices = require('fabric-ca-client'); const FabricClient = require('fabric-client'); ``` to import those modules, not `hfc` as in other code. The file `fabric-sdk-node/fabric-client/lib/utils.js` has the following function to load the config: ```module.exports.getConfig = function() { if(global.hfc && global.hfc.config) { return global.hfc.config; } var config = new Config(); if (global.hfc) { global.hfc.config = config; } else { global.hfc = { config: config }; } return config; }; ```

vdods (Wed, 16 Aug 2017 23:31:03 GMT):
This particular use of `global` and the assumption of import name `hfc` is what's causing the problem.

vdods (Thu, 17 Aug 2017 00:20:32 GMT):
Ok, so it looks like it's only a matter of the order of `require`s

vdods (Thu, 17 Aug 2017 00:22:04 GMT):
You have to `require("fabric-client")` before you `require("fabric-ca-client")`.. the names that you assign the modules don't matter, though the use of `global.hfc` within fabric-client/lib/utils.js:getConfig is still bad practic

vdods (Thu, 17 Aug 2017 00:22:04 GMT):
You have to `require("fabric-client")` before you `require("fabric-ca-client")`.. the names that you assign the modules don't matter, though the use of `global.hfc` within fabric-client/lib/utils.js:getConfig is still bad practice

vdods (Thu, 17 Aug 2017 00:51:30 GMT):
I created a Jira ticket for the bug

linyuadam (Thu, 17 Aug 2017 02:20:45 GMT):
@jimthematrix Hi, I have encountered one problem when using SDK. When my node idle for more than 15 mins, when the SDK API function channel.sendTransaction() called again, it will have an SERVICE_UNAVAILABLE error. SERVICE_UNAVAILABLE at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/usr/src/app/node_modules/grpc/src/node/src/client.js:242:12)

linyuadam (Thu, 17 Aug 2017 02:20:55 GMT):
I am using the kalka ordering service.

linyuadam (Thu, 17 Aug 2017 02:21:31 GMT):
May I know if there is any idea on that? Thanks very much in advance.

Calvin_Heo (Thu, 17 Aug 2017 04:23:46 GMT):
Hi, I got the error message that "Failed to send Proposal or receive valid response. Response null or status is not 200" when calling to chaincode by sendTransactionProposalRequest() method. Why happen to this error message ? is that TLS problem ?

vudathasaiomkar (Thu, 17 Aug 2017 11:05:07 GMT):
Has joined the channel.

ersudiplama (Thu, 17 Aug 2017 13:36:04 GMT):
Hi, When I try to use AND policy with chaincode. But I am getting error after sendTransaction() like 'Failed to send transaction and get notification within the timeout period". I tired to increase timeout for eventListener but still it won't work. If someone has used multiple peers and with AND policy to invoke using SDK, I would appreciate the help? Or Can someone share info about confirming transaction commit without using eventListener as its throwing error due to timeout for some invoke but works fine sometime for same instruction. Thank you in advance.

ersudiplama (Thu, 17 Aug 2017 13:36:04 GMT):
Hi, When I try to use AND policy with chaincode, I am getting error after sendTransaction() like 'Failed to send transaction and get notification within the timeout period". I tired to increase timeout for eventListener but still it won't work. If someone has used multiple peers and with AND policy to invoke using SDK, I would appreciate the help? Or Can someone share info about confirming transaction commit without using eventListener as its throwing error due to timeout for some invoke but works fine sometime for same instruction. Thank you in advance.

torresjeff (Thu, 17 Aug 2017 15:54:34 GMT):
Hi, I was looking at the fabcar sample here (specifically invoking a function): https://github.com/hyperledger/fabric-samples/blob/release/fabcar/invoke.js

torresjeff (Thu, 17 Aug 2017 15:55:35 GMT):
looking at the `invoke.js` code, wouldn't it be a better practice to have a global of the peers, orderer, channel, etc. Instead of having to do the addPeer/addOrderer for every transaction?

torresjeff (Thu, 17 Aug 2017 15:57:46 GMT):
Or is it necessary to do that for every transaction?

mescoba1 (Thu, 17 Aug 2017 22:03:13 GMT):
```Make query Assigning transaction_id: 7d6b17b98b085c057e833959ac09e38ef4e669034ccc2bf13652a7e11345d421 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "fabric-ca-server") at /Users/miguelescobar/Documents/go/src/github.com/hyperledger/fabric/examples/e2e_cli/node_modules/grpc/src/node/src/client.js:434:17 returned from query Query result count = 1 error from query = { Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "fabric-ca-server") at /Users/miguelescobar/Documents/go/src/github.com/hyperledger/fabric/examples/e2e_cli/node_modules/grpc/src/node/src/client.js:434:17 code: 2, metadata: Metadata { _internal_repr: {} } } Response is Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "fabric-ca-server")```

mescoba1 (Thu, 17 Aug 2017 22:04:07 GMT):
Trying to query my chaincode using `query.js`, not sure why I'm getting this error

mescoba1 (Thu, 17 Aug 2017 22:04:44 GMT):
The peers are enrolled with the CA

mescoba1 (Thu, 17 Aug 2017 22:05:01 GMT):
And the User credentials are generated by the CA

JoelHubert (Fri, 18 Aug 2017 01:17:42 GMT):
Has joined the channel.

KevinBai (Fri, 18 Aug 2017 03:53:28 GMT):
hello everyone, how to join exist channel? when I join exist channel, I get error message is status: 500, message: Cannot create ledger from genesis block, due to LedgerID already exists

ArnabChatterjee (Fri, 18 Aug 2017 06:46:24 GMT):
Hi people. When I am using persistent storage for couchdb. I am not able to deploy chain code for subsequent instantiates. It says chaincode already exists. I am using node SDK to install and instantiate chaincodes and node sdk balance transfer as an example

ArnabChatterjee (Fri, 18 Aug 2017 06:46:34 GMT):
Can you help me out?

Vadim (Fri, 18 Aug 2017 06:47:36 GMT):
@ArnabChatterjee why do you try to instantiate chaincode several times? Once is enough.

ArnabChatterjee (Fri, 18 Aug 2017 06:48:21 GMT):
@Vadim - I am talking of the case when I tear down fabric and re initiate all docker containers

ArnabChatterjee (Fri, 18 Aug 2017 06:49:05 GMT):
Even without instantiating, I am unable to invoke. Probably because I already have a database with the same name in my couch db

Vadim (Fri, 18 Aug 2017 06:49:28 GMT):
if you tear down everything, make sure you remove all old data

Vadim (Fri, 18 Aug 2017 06:49:41 GMT):
sounds like some leftovers remained

ArnabChatterjee (Fri, 18 Aug 2017 06:50:56 GMT):
@Vadim - Do you mean everytime I tear down, I would have to delete all persistent couchdb data. Actually I was looking for the case in development environment where I can start/stop docker containers without having to lose all my data in couch

Vadim (Fri, 18 Aug 2017 06:52:00 GMT):
so when you "tear down", you just stop containers?

ArnabChatterjee (Fri, 18 Aug 2017 06:52:23 GMT):
Nopes. I remove them as well.

ArnabChatterjee (Fri, 18 Aug 2017 06:53:05 GMT):
I only keep my host os mapped couch db data

ArnabChatterjee (Fri, 18 Aug 2017 06:56:27 GMT):
@Vadim Any clues?

Vadim (Fri, 18 Aug 2017 06:57:10 GMT):
so what exactly are you trying to do? Remove the network, start it again, you expect your data to be kept, but at the same time you try to instantiate your chaincode?

ArnabChatterjee (Fri, 18 Aug 2017 06:59:36 GMT):
@Vadim I am actually trying to redeploy a modified CC.

Vadim (Fri, 18 Aug 2017 06:59:55 GMT):
then you need to do `peer chaincode upgrade`

Vadim (Fri, 18 Aug 2017 06:59:59 GMT):
not instantiate

ArnabChatterjee (Fri, 18 Aug 2017 07:00:38 GMT):
okay. got it. :) thanks. Let me try that.

Vadim (Fri, 18 Aug 2017 07:00:53 GMT):
it should be the same params as instantiate, just change the version

ArnabChatterjee (Fri, 18 Aug 2017 07:01:30 GMT):
actually i deployed my CC via node. Now you mean I need to go into the peer and run peer chaincode upgrade.

Vadim (Fri, 18 Aug 2017 07:01:49 GMT):
no, you either do it over sdk or over cli

Vadim (Fri, 18 Aug 2017 07:02:12 GMT):
it's `sendUpgradeProposal` if I'm not mistaken

Vadim (Fri, 18 Aug 2017 07:02:41 GMT):
https://fabric-sdk-node.github.io/Channel.html#sendUpgradeProposal

ArnabChatterjee (Fri, 18 Aug 2017 07:02:59 GMT):
okay. :)

ArnabChatterjee (Fri, 18 Aug 2017 07:17:41 GMT):
Thanks @Vadim . Can you explain what is the use of transientMap? I didn't get the explanation *Optional. map that can be used by the chaincode during intialization, but not saved in the ledger. Data such as cryptographic information for encryption can be passed to the chaincode using this technique*

Vadim (Fri, 18 Aug 2017 07:18:18 GMT):
you can pass the data to the chaincode, but it will not be recorded to the blockchaib

Vadim (Fri, 18 Aug 2017 07:18:18 GMT):
you can pass the data to the chaincode, but it will not be recorded to the blockchain

ArnabChatterjee (Fri, 18 Aug 2017 07:20:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5LQ4MENoEmPpgcQWX) @Vadim But, isn't what I do as "PutState" would eventually go into the blockchain. Anyways, its the CC developer's choice what would be kept in the BC. What is the utility of transientMap in data passing other than the arguments to init?

Vadim (Fri, 18 Aug 2017 07:20:28 GMT):
not put state, the arguments you invoke chaincode with go to blockchain

Vadim (Fri, 18 Aug 2017 07:20:38 GMT):
if you don't want that, you use transientMap

ArnabChatterjee (Fri, 18 Aug 2017 07:21:23 GMT):
@Vadim That's interesting. Any documents on this? I would like to know more. I think I am missing something.

Vadim (Fri, 18 Aug 2017 07:22:14 GMT):
https://jimthematrix.github.io/Chain.html search on the page "transientMap"

Vadim (Fri, 18 Aug 2017 07:22:47 GMT):
or better this: https://fabric-sdk-node.github.io/global.html

MoulaliMvg (Fri, 18 Aug 2017 07:31:23 GMT):
i am having the below statement in my chaincode go file

MoulaliMvg (Fri, 18 Aug 2017 07:31:24 GMT):
var logger = shim.NewLogger("example_cc0")

MoulaliMvg (Fri, 18 Aug 2017 07:31:46 GMT):
where exactly I can check loggers.. can anyone help me

MoulaliMvg (Fri, 18 Aug 2017 07:32:53 GMT):
I am using "docker logger CONTAINERID" command.. but not getting loggers

cotofei (Fri, 18 Aug 2017 09:56:10 GMT):
Has joined the channel.

bretharrison (Fri, 18 Aug 2017 10:44:49 GMT):
@KevinBai The peer must have already joined this channel. Use the `client.queryChannels(peer)` to check the peer to see what channels have been joined.

MoulaliMvg (Fri, 18 Aug 2017 12:04:15 GMT):
how we can get all entities from chaincode stub?

FollowingGhosts (Fri, 18 Aug 2017 14:43:52 GMT):
Is it possible to bundle fabric-client with webpack? I get errors with graceful-fs

Vadim (Fri, 18 Aug 2017 14:46:34 GMT):
@FollowingGhosts there are some binaries, not sure how webpack can handle that

FollowingGhosts (Fri, 18 Aug 2017 14:47:06 GMT):
I think that might be where I'm running into issues

FollowingGhosts (Fri, 18 Aug 2017 14:52:04 GMT):
The error I keep getting is `'fs$ReadStream.prototype`

FollowingGhosts (Fri, 18 Aug 2017 14:52:19 GMT):
I've tried it with browserify and webpack

FollowingGhosts (Fri, 18 Aug 2017 14:52:30 GMT):
and it seems to be an issue with `graceful-fs`

FollowingGhosts (Fri, 18 Aug 2017 14:52:50 GMT):
I've tried it with the latest package versions etc

rojanjose (Fri, 18 Aug 2017 18:16:58 GMT):
Has joined the channel.

saurabhxtiwari (Sat, 19 Aug 2017 15:34:29 GMT):
Has joined the channel.

saurabhxtiwari (Sat, 19 Aug 2017 15:35:41 GMT):
I am getting below error while registering a user using node sdk - SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing

saurabhxtiwari (Sat, 19 Aug 2017 15:35:41 GMT):
I am getting below error while registering a user using node sdk - SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing

saurabhxtiwari (Sat, 19 Aug 2017 15:35:41 GMT):
I am getting below error while registering a user using node sdk - SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing The registration works fine using CLI though with the same certs.

saurabhxtiwari (Sat, 19 Aug 2017 16:29:31 GMT):
Error: Calling register endpoint failed with error [Error: write EPROTO 140735752541120:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2520: 140735752541120:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3550: ]

mastersingh24 (Sat, 19 Aug 2017 20:05:13 GMT):
@saurabhxtiwari - unfortunately, when you enable TLS for the fabric-ca, by default it attempts to use the same key pair it uses for signing certificates as the TLS key pair as well. And even more unfortunately, that key pair is not generated with the key usage required by openssl for TLS (NodeJS uses openssl under the covers)

mastersingh24 (Sat, 19 Aug 2017 20:05:49 GMT):
(I assume that is what you are doing)

mastersingh24 (Sat, 19 Aug 2017 20:06:24 GMT):
So the best option is to generate a different key pair for the fabric-ca to use for TLS

yicchen (Sun, 20 Aug 2017 14:27:52 GMT):
Has joined the channel.

saurabhxtiwari (Mon, 21 Aug 2017 09:10:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8zrzdZf3MmfAiTqqE) @mastersingh24 Thanks. That's exactly what it is.

AcidumIrae (Mon, 21 Aug 2017 09:38:50 GMT):
Has joined the channel.

usman_shaik (Mon, 21 Aug 2017 10:08:45 GMT):
Has joined the channel.

usman_shaik (Mon, 21 Aug 2017 10:12:32 GMT):
Hi, I am trying the configtxlator reconfigure example ( https://hyperledger-fabric.readthedocs.io/en/latest/configtxlator.html ) from node sdk. as part of this, i will have to fetch latest config block through node sdk. But when i do this channel.getChannelConfig(); and try to print the envelope JSON.stringify(config_envelope); I am getting JSON parse error that there are circular dependencies and the object cannot be converted to json. Can anyone help me on this pls.

Vadim (Mon, 21 Aug 2017 10:43:08 GMT):
@usman_shaik you need to use protolator to obtain a json, read https://hyperledger-fabric.readthedocs.io/en/latest/configtxlator.html#proto-translation

usman_shaik (Mon, 21 Aug 2017 11:07:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ykae3QigSw2osJvH9) @Vadim i need to post configuration_block.pb to configtxlator to decode it into json. How can i get it from node sdk client ? when i use channel.getChannelConfig() it gives decoded config_envolope ( as javascript object ).

Vadim (Mon, 21 Aug 2017 11:09:32 GMT):
@usman_shaik check it here: https://github.com/sandp125/FabricNodeAPI_V1/blob/master/app/channel-config.js#L39

usman_shaik (Mon, 21 Aug 2017 11:11:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MhAs6A3vNC9kkbjdv) @Vadim Thanks Vadim. Will try this.

kayadhami (Mon, 21 Aug 2017 11:43:50 GMT):
Has joined the channel.

vudathasaiomkar (Mon, 21 Aug 2017 11:55:01 GMT):
Hi, I had followed steps which was explained in balance transfer but I got a error like this:

vudathasaiomkar (Mon, 21 Aug 2017 11:55:08 GMT):
npm WARN balance-transfer@1.0.0-snapshot No repository field. npm ERR! Windows_NT 10.0.15063 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! node v6.11.2 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! pkcs11js@1.0.9 install: `npm run build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pkcs11js@1.0.9 install script 'npm run build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pkcs11js package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pkcs11js npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pkcs11js npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Saiomkar\dockerapps\fabric-samples\balance-transfer\npm-debug.log module.js:471 throw err; ^ Error: Cannot find module 'fabric-client/lib/User.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\Saiomkar\dockerapps\fabric-samples\balance-transfer\app\helper.js:24:12) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

MoulaliMvg (Mon, 21 Aug 2017 13:56:23 GMT):
Hi I am following fabric-samples/balance-transfer I have two modules in my project like comp1 and comp2 modules curl commands like below in balance-transfer curl -s -X POST \ http://localhost:4000/chaincodes \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7056"], "chaincodeName":"mycc", "chaincodePath":"github.com/example_cc", "chaincodeVersion":"v0" }' curl -s -X POST \ http://localhost:4000/chaincodes \ -H "authorization: Bearer $ORG2_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:8056"], "chaincodeName":"mycc", "chaincodePath":"github.com/example_cc", "chaincodeVersion":"v0" }' 1. when company1 want to send JSON data to company2 2. company2 takes that data and displays in UI and it should approve that data. Once it approves , company1 should get acknoledgement from comp2 to comp1 3. How I can do transactions with in companies in balance transfer setup 4. How can i launch comp1 UI with "localhost:7056" and comp2 UI with "localhost:8056" and how to fetch all transactions from distributed ledger

jimthematrix (Mon, 21 Aug 2017 15:21:12 GMT):
@linyuadam this is likely due to the stream connection b/w the app and the orderer getting severed during the period of inactivity, you can try one of two things: - establish a new connection by catching that error and instantiate a new Orderer instance (make sure to clean up the old one) - attempt to prevent the stream from being disrupted by setting keep alive: ```client.newOrderer(url, {'grpc.http2.keepalive_time' : 15});```

linyuadam (Mon, 21 Aug 2017 15:23:21 GMT):
@jimthematrix Got it. Thanks very much. Let me have a try.

bretharrison (Mon, 21 Aug 2017 15:28:25 GMT):
@usman_shaik the `getChannelConfig()` returns a protobuf object. Decoded means in this case decoded from a higher level protobuf object. You may notice that many of the fabric protobufs contain bytes for the attributes of a protobuf object. The getChannelConfig() method is indented to return a protobuf object that is usable by the nodeSDK internally or for the config proto translator tool. The nodeSDK will return a JSON object fully converted from protobuf with the queryBlock and queryTranaction methods.

jimthematrix (Mon, 21 Aug 2017 15:30:33 GMT):
@MoulaliMvg so first of all let's clarify a few things to make sure the fabric's transaction flow is well-understood: a client application sends transaction to the channel, and all participants of that channel will get to replicate the transaction down to their copy of the ledger (once fully processed), so it's not so much "company1 sends to company2", but rather "company1 sends to the channel, and company2 gets the data from the channel". maybe you already understand this but just want to be sure.

jimthematrix (Mon, 21 Aug 2017 15:33:52 GMT):
also, note that during the transaction processing, the chaincode that all participants have agreed on (which will have been installed and instantiated for the channel) will automatically make decisions on the proposed transaction on behalf of each participant. in other words, there's no chance for any decision making involving an external logic (like company2's user approving from UI, in your example above)

aakanshaparmar (Mon, 21 Aug 2017 15:41:16 GMT):
@mastersingh24 Hi, we are using hyper ledger fabric v1.0.0. If we leave the peers and orderer idle for some time we get two types of errors - 1.) The first is a SERVCE_UNAVAILABLE error which appears only the 1st time we try to invoke a transaction after having left it idle for 15-20 minutes. Log - [2017-08-21 10:48:02.724] [ERROR] fabric/invoke_transaction.js - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/usr/src/app/node_modules/grpc/src/node/src/client.js:242:12) 2.) After having left it idle for some time all transaction commits fail and we get an undefined error. The orderer seems to have written the block but it doesn’t seem to be able to connect to the peers and they are not able to commit the transaction Orderer Log - 2017-08-21 10:07:38.054 UTC [orderer/common/deliver] Handle -> WARN 3b7 [channel: mychannel] Error sending to stream: rpc error: code = Canceled desc = context canceled 2017-08-21 10:07:38.055 UTC [orderer/main] func1 -> DEBU 3b9 Closing Deliver stream If we restart the peers, all errors go and it works smoothly till we leave it idle again. Any idea why this might be happening. We found your jira regarding timeouts - https://jira.hyperledger.org/browse/FAB-5658 Do you think it might be related to that? Thanks a lot

jimthematrix (Mon, 21 Aug 2017 15:41:52 GMT):
that said, you can design a workflow that involves multiple transactions, like the following: - company1's app submits transaction #1, which puts a state value as "approved_by_company1" - peers from both company1 and company2 signs off on that proposal, which then gets sent to the orderer and eventually committed to the ledger - once company2's app gets notified, by it's own peer, of the transaction's commitment to the ledger, it can display that in the UI and allow its user to decide whether to go forward with the workflow. if so, submit a transaction #2, which puts the state value as "approved_by_company1_and_company2" - peers from both company1 and company2 signs off on that proposal, which then gets sent to the orderer and eventually committed to the ledger - now the payment has the approval of users from both companies, and can proceed to the settlement stage (or whatever is the right thing to do in the business case)

jimthematrix (Mon, 21 Aug 2017 15:41:52 GMT):
(continuing the response to @MoulaliMvg ) that said, you can design a workflow that involves multiple transactions, like the following: - company1's app submits transaction #1, which puts a state value as "approved_by_company1" - peers from both company1 and company2 signs off on that proposal, which then gets sent to the orderer and eventually committed to the ledger - once company2's app gets notified, by it's own peer, of the transaction's commitment to the ledger, it can display that in the UI and allow its user to decide whether to go forward with the workflow. if so, submit a transaction #2, which puts the state value as "approved_by_company1_and_company2" - peers from both company1 and company2 signs off on that proposal, which then gets sent to the orderer and eventually committed to the ledger - now the payment has the approval of users from both companies, and can proceed to the settlement stage (or whatever is the right thing to do in the business case)

jimthematrix (Mon, 21 Aug 2017 15:45:07 GMT):
the above design of multiple transactions to approve a payment transfer is necessary only when external logic (like a human user's approval) is required. if these decisions can be codified into chaincode and do not require external logic, then all can be done in a single transaction as is the case with the balance-transfer example

jimthematrix (Mon, 21 Aug 2017 15:47:38 GMT):
finally, on your last question, each app can use the SDK's Channel.js -> queryBlock() method to retrieve the entire ledger, one block at a time, and then inspect the returned Block object for transactions included in them

jimthematrix (Mon, 21 Aug 2017 16:30:25 GMT):
@MoulaliMvg please let me know if this makes sense and would fulfill your requirements

cwng (Tue, 22 Aug 2017 09:30:15 GMT):
Has joined the channel.

Subramanyam (Tue, 22 Aug 2017 12:18:13 GMT):
Has joined the channel.

Subramanyam (Tue, 22 Aug 2017 12:19:41 GMT):
Can anyone assist me how to implement the smart contract integration on data validation (consensus with validating peers) example in hyperledger fabric sdk

Subramanyam (Tue, 22 Aug 2017 12:37:04 GMT):
How to implement the smart contract integration for data validation in hyperledger fabric sdk node

MoulaliMvg (Tue, 22 Aug 2017 13:01:55 GMT):

Message Attachments

MoulaliMvg (Tue, 22 Aug 2017 13:02:14 GMT):
@jimthematrix Hi Jim.. I am trying to query all the transactions based on block number by using the below approach.. I am not getting how to handle the response to get information regarding all transaction.. can you please provide some approach on this... $http.get('http://localhost:4000/channels/mychannel/blocks/1?peer=peer1', { headers: { 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDM0MTkzNjgsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE1MDMzODMzNjh9.vWSV8JXbpNe_psEegE_eZk8r0uHfeCBaygEPbIFhWXY', 'Content-Type' : 'application/json' } }).success(function(response){ //var resStr = response; console.log("Block one response:::: "+JSON.stringify(response)); }); I am attaching the file which contains what is the JSON response I am getting.. can you please check the file once(response_json.txt).

MoulaliMvg (Tue, 22 Aug 2017 14:09:51 GMT):
@jimthematrix I have one more doubt ... I am getting only one transaction per block .. how I can change transaction limit in block.. I am getting one transaction by using the URL "http://localhost:4000/channels/mychannel/blocks/1?peer=peer1" and getting one more transaction when I changed URL like this "http://localhost:4000/channels/mychannel/blocks/2?peer=peer1"

Vadim (Tue, 22 Aug 2017 14:12:26 GMT):
@MoulaliMvg https://github.com/hyperledger/fabric/blob/release/examples/e2e_cli/configtx.yaml#L110

Vadim (Tue, 22 Aug 2017 14:13:16 GMT):
if you don't send more than one transaction within that limit, the block will be created with only that transaction

jimthematrix (Tue, 22 Aug 2017 14:47:22 GMT):
@MoulaliMvg you can use SDKs' block decoder to get the transactions from the block bytes: https://fabric-sdk-node.github.io/BlockDecoder.html

ssaddem (Tue, 22 Aug 2017 17:07:25 GMT):
hi greg is this exist now on node sdk ? [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RJBq5hdfB6mffBv9p) @greg.haskins

DarshanBc (Wed, 23 Aug 2017 03:21:59 GMT):
Configuration pertaining to solo ordering is given in _https://github.com/hyperledger/fabric/blob/release/examples/e2e_cli/configtx.yaml_ but can somebody help me in configuring *kafka ordereing*

DarshanBc (Wed, 23 Aug 2017 03:21:59 GMT):
Configuration pertaining to solo ordering is given in https://github.com/hyperledger/fabric/blob/release/examples/e2e_cli/configtx.yaml but can somebody help me in configuring *kafka ordereing*

Subramanyam (Wed, 23 Aug 2017 05:36:50 GMT):
i supposed to implement the smart contract integration on data validation (consensus with validating peers) in go language by using in hyperledger fabric sdk node

Subramanyam (Wed, 23 Aug 2017 05:37:22 GMT):
Anyone assist the example to implement the smart contract

outis (Wed, 23 Aug 2017 06:26:52 GMT):
Hi, I have a question about what `revoke` does. I am tweaking balance-transfer example. I run the app, create a channel, join peers, install and instantiate cc on them. I revoke Jim, and then invoke again, which does succeed. I thought it is because the invoke in balance transfer ```var getRegisteredUsers = function(username, userOrg, isJson) { var member; var client = getClientForOrg(userOrg); var enrollmentSecret = null; return hfc.newDefaultKeyValueStore({ path: getKeyStoreForOrg(getOrgName(userOrg)) }).then((store) => { client.setStateStore(store); // clearing the user context before switching client._userContext = null; return client.getUserContext(username, true).then((user) => { if (user && user.isEnrolled()) { logger.info('Successfully loaded member '+ user.getName() + ' from persistence'); // amano moded return user; } else { let caClient = caClients[userOrg]; return getAdminUser(userOrg).then(function(adminUserObj) { member = adminUserObj; ``` allows Jim to throw a trn without enrolling. Do I understand correctly? The other question is, even if I make some changes in the above code so that it enrolls again, the invoke does succeed still. Why is this? The log shows Jim's enrollment fails as expected.

SanketPanchamia (Wed, 23 Aug 2017 06:38:44 GMT):
Hi, Anyone has tried uncommenting the specs section in the peer configuration of crypto-config? If i am running a node sdk app on multiple systems do i need to give the addresses of the peers in this section?

Vadim (Wed, 23 Aug 2017 06:45:53 GMT):
@SanketPanchamia you can provide there concrete hostnames, then cryptogen will generate appropriate certs with these hostnames

Vadim (Wed, 23 Aug 2017 06:46:19 GMT):
I, however, did not try that, as standard config worked well for my DOcker Swarm setup

SanketPanchamia (Wed, 23 Aug 2017 06:46:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jXdnGNSTKrNWTKhHn) @Vadim So like actual URLs of the peers?

Vadim (Wed, 23 Aug 2017 06:46:49 GMT):
no, the hostnames, like in the example: ``` Specs: # - Hostname: foo # implicitly "foo.org1.example.com" # CommonName: foo27.org5.example.com # overrides Hostname-based FQDN set above # - Hostname: bar # - Hostname: baz

Vadim (Wed, 23 Aug 2017 06:47:22 GMT):
so you just write "foo", but it will add domain "org1.example.com" to it, resulting in hostname foo.org1.example.com

SanketPanchamia (Wed, 23 Aug 2017 06:47:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uDadwbbD8SyuGzMgB) @Vadim So i am able to get the docker swarm network up with a new updated yaml file. I am able to create channels but for peers joining channels i have troubles...even after disabling TLS

Vadim (Wed, 23 Aug 2017 06:47:43 GMT):
which troubles?

SanketPanchamia (Wed, 23 Aug 2017 06:48:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WqDpRNP4R5mX7Kq2g) @Vadim Can i PM you?

Vadim (Wed, 23 Aug 2017 06:48:08 GMT):
go ahead

Subramanyam (Wed, 23 Aug 2017 06:54:32 GMT):
hyperledger/fabric-samples how to implement the consensus with validating peers for above example. can anyone assist me

Vadim (Wed, 23 Aug 2017 07:05:54 GMT):
@Subramanyam you need to set the peers from which you require endorsements explicitly, e.g. in balance-transfer it's here: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/testAPIs.sh#L59

zhuxubin01 (Wed, 23 Aug 2017 07:19:23 GMT):
I test the fabric-sdk-node's e2e sample's Createchannel,the function getSubmitter supports 2 ways to enroll user,1 with 4 parms ,1 with 3 parms ,the first way with 4 parms will user local msp,and the 2nd way

zhuxubin01 (Wed, 23 Aug 2017 07:20:30 GMT):
I test the fabric-sdk-node's e2e sample's Createchannel,the getSubmitter supports 2 ways to enroll user,1 with 4 parms ,1 with 3 parms ,the first way with 4 parms will user local msp,and the 2nd way with 3 parms will enroll user by ca,why both the twos users can creat channel

ghufran (Wed, 23 Aug 2017 07:37:46 GMT):
Has joined the channel.

ghufran (Wed, 23 Aug 2017 07:40:20 GMT):
@Vadim https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/testAPIs.sh#L59 in this u said that we have to set the peers endorsements explicitly then only we can derive as validating peers for consensus

ghufran (Wed, 23 Aug 2017 07:44:30 GMT):
@Vadim How can we assist peers endorsements explicitly for the above example link

Vadim (Wed, 23 Aug 2017 08:04:14 GMT):
@ghufran currently, you need to know them beforehand

grapebaba (Wed, 23 Aug 2017 10:10:55 GMT):
there is a problem with fabric-samples, it should be a nodejs file system issue. when invoke helper.js readAllFiles many times, it will throw 'EMFILE, too many open files'

grapebaba (Wed, 23 Aug 2017 10:11:26 GMT):
i don't see the better solution for this problem

MoulaliMvg (Wed, 23 Aug 2017 11:24:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cJ9dL4W7CL9QE8fST) @Vadim changed BatchTimeout 2s to 120s and performed two transactions within a minute but still I'm getting only one transaction per block when I'm querying with block id

Vadim (Wed, 23 Aug 2017 11:25:44 GMT):
@MoulaliMvg I assume you regenerated your network (genesis block, etc.)?

MoulaliMvg (Wed, 23 Aug 2017 11:26:59 GMT):
what and how I want to do with genesis block

MoulaliMvg (Wed, 23 Aug 2017 11:27:20 GMT):
because I don't know about genesis block

Vadim (Wed, 23 Aug 2017 11:28:53 GMT):
@MoulaliMvg perhaps you should read http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html then first

MoulaliMvg (Wed, 23 Aug 2017 11:30:47 GMT):
I completed my fabric setup with fabric-samples/balance-transfer and I'm able to post and get data to channel

MoulaliMvg (Wed, 23 Aug 2017 11:30:59 GMT):
@Vadim

Vadim (Wed, 23 Aug 2017 11:31:19 GMT):
please read the tutorial

Vadim (Wed, 23 Aug 2017 11:31:30 GMT):
it explains everything about network setup

Calvin_Heo (Wed, 23 Aug 2017 14:04:27 GMT):
Hi, when I send one million requests from node sdk, the following error message occurs. : error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/app/bmt-sdk/node_modules/fabric-client/lib/Peer.js:99:31) at ontimeout (timers.js:469:11) at tryOnTimeout (timers.js:304:5), How to solve this problem ? at Timer.listOnTimeout (timers.js:264:5)

AlexanderEx123 (Wed, 23 Aug 2017 14:33:58 GMT):
@Calvin_Heo increase default timeout

AlexanderEx123 (Wed, 23 Aug 2017 14:34:14 GMT):
then creating the Peer object pass Options object as second argument to it

FollowingGhosts (Wed, 23 Aug 2017 15:17:14 GMT):
What latency does/should the node SDK introduce? It seems that invoking chaincode directly from the CLI is about 1.5s faster than using the nodesdk

FollowingGhosts (Wed, 23 Aug 2017 15:17:24 GMT):
I'm not sure if the delay is just coming from the eventhub

FollowingGhosts (Wed, 23 Aug 2017 15:19:16 GMT):
or is a performance issue on my end

Calvin_Heo (Wed, 23 Aug 2017 15:19:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fvKQXnoFzmRXcyojX) @AlexanderEx123 ㅅThank you for your answer and can you specifically explain what the pass option is on the peer?

linyuadam (Wed, 23 Aug 2017 15:20:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gKkymtWbyhy7tt3Nf) @jimthematrix The second one (add 'grpc.http2.keepalive_time') seems not working, may I know what does the 15 exactly mean? Should I make it smaller or bigger?

linyuadam (Wed, 23 Aug 2017 15:21:38 GMT):
Still get a SERVICE_UNAVAILABLE error when sending transaction to orderer from SDK after idle for 15mins

GirijaShankarMishra (Wed, 23 Aug 2017 15:28:26 GMT):
Hi, I am getting the below error in balance-transfer example error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST (node:13598) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 15): Error: BAD_REQUEST error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST [2017-08-23 20:54:20.915] [ERROR] Create-Channel - Error: BAD_REQUEST

GirijaShankarMishra (Wed, 23 Aug 2017 15:32:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=svQ3PWrzFRgcunzj3) @GirijaShankarMishra @jimthematrix

FollowingGhosts (Wed, 23 Aug 2017 15:49:30 GMT):
Can anyone tell me roughly how long it takes them to invoke a transaction through the NodeSDK?

jimthematrix (Wed, 23 Aug 2017 20:21:11 GMT):
@linyuadam depending on your grpc module version: for 1.2.x `grpc.http2.keepalive_time` and the unit is seconds, for 1.3.x+ `grpc.keepalive_time_ms` and the unit is milliseconds

jimthematrix (Wed, 23 Aug 2017 20:23:03 GMT):
I would try to specify a value that's no shorter than 5min, otherwise it's ignored by the peers (they don't like getting bombarded by keep alive pings), so the value is `300` for 1.2.x or `300000` for 1.3+

jimthematrix (Wed, 23 Aug 2017 20:24:03 GMT):
@GirijaShankarMishra what does the orderer's log say?

Calvin_Heo (Thu, 24 Aug 2017 02:00:32 GMT):
Hi, I got a error message when executing a chaincode using node sdk as below. Set wallet path, and associate user PeerAdmin with application error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/0.GLN/node_modules/fabric-client/lib/User.js:255:11) error: [Client.js]: Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/0.GLN/node_modules/fabric-client/lib/User.js:255:11) Caught Error Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (/home/pi/0.GLN/node_modules/fabric-client/lib/User.js:255:11)

rangak (Thu, 24 Aug 2017 02:31:41 GMT):
I see that the fabric-samples/balance-transfer application works with 1.0 release. However if I update the containers to the current release 1.0.1 and generate new certs and channel artifacts with v1.0.1 cryptogen and configtxgen the balance-transfer example fails. Is this a known problem ? What has changed from 1.0 to 1.0.1 and how do I get v1.0.1 working with the balance-transfer example ?

NakaoK (Thu, 24 Aug 2017 06:06:10 GMT):
Has joined the channel.

Subramanyam (Thu, 24 Aug 2017 06:10:26 GMT):
I want to implement the smart contract implementation (consensus with validating peers). Can anyone assist the proper example

Subramanyam (Thu, 24 Aug 2017 06:10:47 GMT):
in hyperledger fabric sdk node

aaronzheng (Thu, 24 Aug 2017 06:35:54 GMT):
Has joined the channel.

Claude-ZHENG (Thu, 24 Aug 2017 06:51:12 GMT):
Has joined the channel.

Claude-ZHENG (Thu, 24 Aug 2017 06:55:17 GMT):
Hi, everybody, i'm new here and want to know whether we could get tls cert through node sdk or not. If yes, what should i do when register and enroll a new user? Thanks in advance.

GirijaShankarMishra (Thu, 24 Aug 2017 07:46:04 GMT):
Hi @jimthematrix I am getting the below error while creating the channel in balance-transfer example. error: [Orderer.js]: sendBroadcast - timed out after:4500000000 [2017-08-24 13:13:43.864] [ERROR] Create-Channel - Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/appadmin/ybl/balance-transfer/node_modules/fabric-client/lib/Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) (node:28853) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/appadmin/ybl/balance-transfer/node_modules/fabric-client/lib/Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Orderer Logs :-

GirijaShankarMishra (Thu, 24 Aug 2017 07:46:04 GMT):
Hi @jimthematrix I am getting the below error while creating the channel in balance-transfer example. error: [Orderer.js]: sendBroadcast - timed out after:4500000000 [2017-08-24 13:13:43.864] [ERROR] Create-Channel - Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/appadmin/ybl/balance-transfer/node_modules/fabric-client/lib/Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) (node:28853) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/appadmin/ybl/balance-transfer/node_modules/fabric-client/lib/Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Orderer Logs :-

GirijaShankarMishra (Thu, 24 Aug 2017 07:46:04 GMT):
Hi @jimthematrix I am getting the below error while creating the channel in balance-transfer example. error: [Orderer.js]: sendBroadcast - timed out after:4500000000 [2017-08-24 13:13:43.864] [ERROR] Create-Channel - Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/appadmin/ybl/balance-transfer/node_modules/fabric-client/lib/Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) (node:28853) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/appadmin/ybl/balance-transfer/node_modules/fabric-client/lib/Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Orderer Logs :- 2017-08-24 07:43:43.974 UTC [orderer/multichain] newChain -> INFO 66c Created and starting new chain mychannel 2017-08-24 07:43:43.974 UTC [orderer/multichain] addBlockSignature -> DEBU 66d &{ledgerResources:0xc420397b00 chain:0xc4201aafc0 cutter:0xc420114e60 filters:0xc420397b60 signer:0x126ee88 lastConfig:0 lastConfigSeq:0} 2017-08-24 07:43:43.974 UTC [orderer/multichain] addBlockSignature -> DEBU 66e &{} 2017-08-24 07:43:43.974 UTC [msp] GetLocalMSP -> DEBU 66f Returning existing local MSP 2017-08-24 07:43:43.974 UTC [msp] GetDefaultSigningIdentity -> DEBU 670 Obtaining default signing identity 2017-08-24 07:43:43.974 UTC [msp] GetLocalMSP -> DEBU 671 Returning existing local MSP 2017-08-24 07:43:43.974 UTC [msp] GetDefaultSigningIdentity -> DEBU 672 Obtaining default signing identity 2017-08-24 07:43:43.974 UTC [msp/identity] Sign -> DEBU 673 Sign: plaintext: 0AFF050A0A4F7264657265724D535012...ED116EFFE091C2F9A5FA5B4F2036CC95 2017-08-24 07:43:43.974 UTC [msp/identity] Sign -> DEBU 674 Sign: digest: 9BC5EBFCC23E318A91C041509AB9484F5CCD642D2EDD0DA429D7FE1495AE4879 2017-08-24 07:43:43.974 UTC [msp] GetLocalMSP -> DEBU 675 Returning existing local MSP 2017-08-24 07:43:43.974 UTC [msp] GetDefaultSigningIdentity -> DEBU 676 Obtaining default signing identity 2017-08-24 07:43:43.974 UTC [orderer/multichain] addLastConfigSignature -> DEBU 677 [channel: testchainid] About to write block, setting its LAST_CONFIG to 0 2017-08-24 07:43:43.974 UTC [msp] GetLocalMSP -> DEBU 678 Returning existing local MSP 2017-08-24 07:43:43.974 UTC [msp] GetDefaultSigningIdentity -> DEBU 679 Obtaining default signing identity 2017-08-24 07:43:43.974 UTC [msp/identity] Sign -> DEBU 67a Sign: plaintext: 0AFF050A0A4F7264657265724D535012...ED116EFFE091C2F9A5FA5B4F2036CC95 2017-08-24 07:43:43.974 UTC [msp/identity] Sign -> DEBU 67b Sign: digest: F976933BCB1BE4074F7F6AD9D585304D3C2C4BED10C257BA11E58117F9E3D3CB 2017-08-24 07:43:43.977 UTC [fsblkstorage] indexBlock -> DEBU 67c Indexing block [blockNum=1, blockHash=[]byte{0x99, 0x10, 0xd8, 0x73, 0x74, 0xe4, 0xd2, 0xfa, 0x37, 0x1f, 0x27, 0xd5, 0x24, 0xc9, 0x5e, 0xe9, 0xf3, 0xd7, 0xce, 0x92, 0x67, 0xe6, 0x48, 0xe4, 0xb8, 0x99, 0xbe, 0x27, 0x2, 0x82, 0xde, 0x52} txOffsets= txId= locPointer=offset=70, bytesLength=10100 ] 2017-08-24 07:43:43.977 UTC [fsblkstorage] updateCheckpoint -> DEBU 67d Broadcasting about update checkpointInfo: latestFileChunkSuffixNum=[0], latestFileChunksize=[18268], isChainEmpty=[false], lastBlockNumber=[1] 2017-08-24 07:43:43.977 UTC [orderer/multichain] WriteBlock -> DEBU 67e [channel: testchainid] Wrote block 1

GirijaShankarMishra (Thu, 24 Aug 2017 07:52:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=i4XiTT4xQ3LphGEQJ) @jimthematrix This problem has been resolved. Thanks for the help

SanketPanchamia (Thu, 24 Aug 2017 08:59:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WMfbZCeWPsfZanKse) @jimthematrix Hi, Finally i have been able to truly distribute my application on 4 systems using docker swarm and disabling TLS. A big shout out to @Vadim for helping me out in this struggle that i had for days together.

qizhang (Thu, 24 Aug 2017 18:13:24 GMT):

Message Attachments

qizhang (Thu, 24 Aug 2017 18:13:26 GMT):
By saying "has been committed into a block", does it mean that the orderer has put this transaction into a block? Or it means every peer has accepted this block and committed into their copy of the ledger?

rangak (Thu, 24 Aug 2017 18:33:03 GMT):
When i regenerate the crypto materials and channel artifacts in the balance-transfer example it fails with this error

rangak (Thu, 24 Aug 2017 18:34:26 GMT):
[2017-08-24 11:12:23.603] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-08-24 11:12:23.682] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140736558990272:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2512: 140736558990272:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3544: ]

rangak (Thu, 24 Aug 2017 18:34:26 GMT):
`[2017-08-24 11:12:23.603] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-08-24 11:12:23.682] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140736558990272:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2512: 140736558990272:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3544: ]'

rangak (Thu, 24 Aug 2017 18:35:14 GMT):
I am using the v1.0 cryptogen and configtxgen .

rangak (Thu, 24 Aug 2017 18:36:10 GMT):
When I use the crypto materials and channel artifacts in the github repo the balance-transfer example works.

rangak (Thu, 24 Aug 2017 18:38:52 GMT):
How do I generate new material and artifacts that will work with the balance-transfer app ?

jimthematrix (Thu, 24 Aug 2017 18:54:59 GMT):
@qizhang not quite either of those two, it means "the particular peer that this event hub is connected to has accepted this block"

jimthematrix (Thu, 24 Aug 2017 18:54:59 GMT):
@qizhang not quite either of those two, it means "the particular peer that this event hub is connected to has accepted this block and committed it to its ledger"

qizhang (Thu, 24 Aug 2017 18:56:13 GMT):
thanks @jimthematrix any document describing how the event hub works in Fabric?

qizhang (Thu, 24 Aug 2017 19:18:20 GMT):
@jimthematrix How to decide which peer(s) an event hub needs to connect to?

jimthematrix (Thu, 24 Aug 2017 19:19:16 GMT):
any peer in your organization is fair game

jimthematrix (Thu, 24 Aug 2017 19:21:01 GMT):
if you care about timing of the notification, and have a statically designated peer as the org leader (instead of using auto-election of leaders), connect to that to get most instantaneous notifications

jimthematrix (Thu, 24 Aug 2017 19:21:22 GMT):
(since other peers will get the blocks replicated via gossip so there's a small lag)

qizhang (Thu, 24 Aug 2017 19:42:08 GMT):
@jimthematrix Can I consider the event hub as a channel between the client and a particular peer, and this channel is used to deliver event from the peer to the client?

jimthematrix (Fri, 25 Aug 2017 02:01:40 GMT):
yes!

AuHuR (Fri, 25 Aug 2017 11:59:59 GMT):
Has joined the channel.

gregoryj (Fri, 25 Aug 2017 15:15:03 GMT):
Has joined the channel.

linyuadam (Fri, 25 Aug 2017 15:20:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Cw2TfxoKQ59sNwQzx) @jimthematrix I tried the grpc.http2.keepalive_time (1.2.x) option (I try 300 and 600), but it seems not work, both for the orderer and the eventhub. The stream connection between node-orderer and node-peer(eventhub) will still close after inactivity

mariol100 (Fri, 25 Aug 2017 16:15:09 GMT):
Has joined the channel.

qizhang (Fri, 25 Aug 2017 19:06:20 GMT):
How can I tell from "sendTransactionProposal(request, timeout)" that which endorsing peer(s) this proposal will be sent to?

jimthematrix (Fri, 25 Aug 2017 19:18:38 GMT):
@qizhang if request.targets is not empty, it'll be sent to those peers, otherwise it's sent to all peers added to the channel

jimthematrix (Fri, 25 Aug 2017 19:19:21 GMT):
@linyuadam can you double check the installed grpc version? `npm list grpc` from where you run the app

qizhang (Fri, 25 Aug 2017 19:21:36 GMT):
thanks @jimthematrix

greg.haskins (Sat, 26 Aug 2017 01:34:10 GMT):
@jimthematrix can you remind me how to turn on logging in the SDK?

linyuadam (Sat, 26 Aug 2017 03:14:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RPNdRCGpeBqGvDMr2) @jimthematrix It is 1.2.4. └─┬ fabric-client@1.0.0 └── grpc@1.2.4

jimthematrix (Sat, 26 Aug 2017 03:36:14 GMT):
@greg.haskins HFC_LOGGING='{"debug":"console"}' for the default winston logger. or if you use your own logger (Client.setLogger()), use that logger's control mechanism. https://fabric-sdk-node.github.io/BaseClient.html#.setLogger__anchor

jimthematrix (Sat, 26 Aug 2017 04:01:48 GMT):
@linyuadam can you paste the code snippet where you passed the keepalive settings?

linyuadam (Sat, 26 Aug 2017 04:06:07 GMT):
This is for the eventhub: let eh = client.newEventHub() eh.setPeerAddr(peers[index]['event_url'], { pem: peers[index]['tls_certificate_actual'], 'ssl-target-name-override': peers[index]['name'], 'grpc.http2.keepalive_time': 600 }) This is for the Orderer: return client.newOrderer(ordererUrl, { 'pem': ordererTlsCert, 'ssl-target-name-override': ordererHostName, 'grpc.http2.keepalive_time': 600 })

linyuadam (Sat, 26 Aug 2017 04:06:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DcmxdtjfWDrB8pcpK) @jimthematrix return client.newOrderer(ordererUrl, { 'pem': ordererTlsCert, 'ssl-target-name-override': ordererHostName, 'grpc.http2.keepalive_time': 600 })

linyuadam (Sat, 26 Aug 2017 04:07:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DcmxdtjfWDrB8pcpK) @jimthematrix This is for Orderer: return client.newOrderer(ordererUrl, { 'pem': ordererTlsCert, 'ssl-target-name-override': ordererHostName, 'grpc.http2.keepalive_time': 600 })

linyuadam (Sat, 26 Aug 2017 04:07:20 GMT):
This is for eventhub: let eh = client.newEventHub() eh.setPeerAddr(peers[index]['event_url'], { pem: peers[index]['tls_certificate_actual'], 'ssl-target-name-override': peers[index]['name'], 'grpc.http2.keepalive_time': 600 })

Haojun (Sat, 26 Aug 2017 06:05:29 GMT):
Hello, in order to obey the endorsement policy, does the client have to analyse the policy and add endorsers in the tx proposal by itself, or does the SDK provide any interface to implement it in the SDK ? According to the e2e demo, it seems to be application's responsibility to do that, but i'm not sure.

vdods (Sat, 26 Aug 2017 18:50:05 GMT):
Hi all, are cert attributes supported in the node SDK yet?

vdods (Sat, 26 Aug 2017 18:50:47 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:47 GMT):
E.g. I want to be able to determine the transactor's roles, etc.

Vrai1127 (Sat, 26 Aug 2017 19:10:09 GMT):
Has joined the channel.

Vrai1127 (Sat, 26 Aug 2017 19:10:38 GMT):
Is there a comparision of features available between node SDK and Java SDK?

yp (Sat, 26 Aug 2017 22:51:50 GMT):
Failed to send transaction and get

greg.haskins (Sun, 27 Aug 2017 12:40:52 GMT):
@jimthematrix is there a way to specify the path to the cryptostore?

greg.haskins (Sun, 27 Aug 2017 12:41:37 GMT):
after adding the logging, I can see that I am getting an EACCESS trying to store it as "/.hfc.."

greg.haskins (Sun, 27 Aug 2017 12:41:58 GMT):
(in a docker environment

greg.haskins (Sun, 27 Aug 2017 14:02:58 GMT):
@jimthematrix nevermind, I found it

evader1337 (Mon, 28 Aug 2017 09:13:58 GMT):
Has joined the channel.

rajasekharpippalla (Mon, 28 Aug 2017 10:33:25 GMT):
I am unable to pass file path for the below code from nodeJS request.... i am getting issue at os.Open(args[0]) func (t *SimpleChaincode) md5sum(stub shim.ChaincodeStubInterface, args []string) pb.Response { var result string // Entities var err error file, err := os.Open(args[0]) if err != nil { jsonResp := "{\"Error\":\"OS open for " + args[0] + "\"}" return shim.Error(jsonResp) } defer file.Close() hash := md5.New() _, err = io.Copy(hash, file) if err != nil { jsonResp := "{\"Error\":\"io copy for " + args[0] + "\"}" return shim.Error(jsonResp) } result = hex.EncodeToString(hash.Sum(nil)) return shim.Success([]byte(result)) }

Vadim (Mon, 28 Aug 2017 10:44:20 GMT):
@rajasekharpippalla because the file you are trying to open is not in the chaincode container, apparently

cristianvanderweij (Mon, 28 Aug 2017 15:01:30 GMT):
Hi everyone. I'm experiencing problems when I try to enroll a user in the balance-transfer example running on windows 10, on ubuntu it works perfect. I get the following error

cristianvanderweij (Mon, 28 Aug 2017 15:01:30 GMT):
Hi everyone. I'm experiencing problems when I try to enroll a user in the balance-transfer example running on redhead, on ubuntu it works perfect. I get the following error when running testAPIS: [2017-08-28 16:42:24.310] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-08-28 16:42:24.312] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-08-28 16:42:24.313] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-08-28 16:42:24.404] [DEBUG] Helper - [utils.CryptoKeyStore]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/tmp/fabric-client-kvs_peerOrg1"}} [2017-08-28 16:42:24.404] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-08-28 16:42:24.405] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore returning ks [2017-08-28 16:42:24.405] [DEBUG] Helper - [crypto_ecdsa_aes]: generateKey, store.setValue [2017-08-28 16:42:24.406] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 2d829879dda3efa6470cf2bc9e0f6c17a8fef3bc8f997482ca008c15e2951a78 [2017-08-28 16:42:24.407] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 412b25c70f437ebee01ae634fe8bb40d3a675b9eaa7bb40de94e814de3fc3638 [2017-08-28 16:42:24.414] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-08-28 16:42:31.507] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: read ECONNRESET] at ClientRequest. (/data/projects/cwb-hyperledger/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:711:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:309:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at emitErrorNT (net.js:1281:8) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) [2017-08-28 16:42:31.508] [DEBUG] Helper - bnp-user failed to register [2017-08-28 16:42:31.509] [ERROR] Helper - bnp-user enrollment failed (node:10691) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot save null userContext. (node:10691) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property '_enrollmentSecret' of null

DarshanBc (Mon, 28 Aug 2017 17:35:43 GMT):
How to get all transaction id of transactions done by particular user

vdods (Mon, 28 Aug 2017 18:13:35 GMT):
@cristianvanderweij Make sure you're running on docker v1.13 or newer.. I had a problem that was probably similar to yours, and that was the fix

mescoba1 (Mon, 28 Aug 2017 23:01:59 GMT):
Has left the channel.

SasagawaHiroshi (Tue, 29 Aug 2017 01:34:02 GMT):
Hi, I am getting the below error very often when invoke the chaincode. transaction proposal was bad result = { Error: Error executing chaincode: Failed to execute transaction (Error sending TRANSACTION: txid:***** exists) - make sure the chaincode ***** has been successfully instantiated and try again at /***/node_modules/grpc/src/node/src/client.js:434:17 code: 2, metadata: Metadata { _internal_repr: {} } } Failed to order the transaction. Error code: undefined Caught Error = Failed to order the transaction. Error code: undefined

linyuadam (Tue, 29 Aug 2017 02:29:51 GMT):
@jimthematrix For the keepalive, is it possible to upgrade the grpc to 1.3.x and try the option grpc.keepalive_time_ms. Is the grpc 1.3.x compatible to the fabric-client 1.0 (the embedded gprc in fabric-client is 1.2.x)?

SasagawaHiroshi (Tue, 29 Aug 2017 03:49:27 GMT):
Thanks, but I can't change grpc.

SimonOberzan (Tue, 29 Aug 2017 06:48:01 GMT):
Has joined the channel.

abheekmaitra (Tue, 29 Aug 2017 12:22:30 GMT):
While using the node-sdk, does the "ssl-target-name-override" that is needed to create an orderer or a peer correspond to the docker service name or the docker container name running on the fabric network?

Vadim (Tue, 29 Aug 2017 12:23:13 GMT):
@abheekmaitra it corresponds to the CN in the certificate that peer/orderer uses as its identity

Vadim (Tue, 29 Aug 2017 12:24:05 GMT):
you normally should avoid using that override in the production, as it basically disables TLS server authentication

indefire (Tue, 29 Aug 2017 15:40:55 GMT):
Has joined the channel.

indefire (Tue, 29 Aug 2017 15:41:26 GMT):
Does anyone have a nice way of reading in the registered users via the nodesdk? I'm using the balance-transfer sample as a basis for my own app

vdods (Tue, 29 Aug 2017 20:05:09 GMT):
Hi all, is anyone encountering errors registering users using fabric-sdk-node 1.0.1? My code that worked in 1.0.0 doesn't in 1.0.1.

jrosmith (Tue, 29 Aug 2017 21:01:48 GMT):
@vdods just updated from 1.0.0 to 1.0.1 and havent had any issues. can you show us an example and the error?

vdods (Tue, 29 Aug 2017 21:22:13 GMT):
@jrosmith Here goes: I'm registering a new user via fabric-ca-client ```www.example.com | debug: successfully got user context for registrar "Admin"; calling ca.register. www.example.com | debug: [crypto_ecdsa_aes]: ecdsa signature: negative=0, words=[6946185, 27373676, 2649940, 31894311, 14249197, 53073967, 21106000, 28236315, 17049239, 3494286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, negative=0, words=[2123078, 49453250, 8153383, 10657289, 13417668, 12249000, 7028425, 51409715, 12176362, 1045798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, recoveryParam=0 www.example.com | debug: [FabricCAClientImpl.js]: bodyAndcert: eyJpZCI6IkZhbmN5VXNlciIsInR5cGUiOiJ1c2VyIiwiYWZmaWxpYXRpb24iOiJvcmcxLmRlcGFydG1lbnQxIiwibWF4X2Vucm9sbG1lbnRzIjowLCJhdHRycyI6W10sInNlY3JldCI6IkZhbmN5UGFzc3dvcmQiLCJjYU5hbWUiOm51bGx9.LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNOekNDQWQrZ0F3SUJBZ0lVQVM5VXoxMk5oMGlFc25YN3JDYVFKZzZjSWpvd0NnWUlLb1pJemowRUF3SXcKWFRFTE1Ba0dBMVVFQmhNQ1ZWTXhGekFWQmdOVkJBZ1REazV2Y25Sb0lFTmhjbTlzYVc1aE1SUXdFZ1lEVlFRSwpFd3RJZVhCbGNteGxaR2RsY2pFUE1BMEdBMVVFQ3hNR1JtRmljbWxqTVE0d0RBWURWUVFERXdWaFpHMXBiakFlCkZ3MHhOekE0TWpReU1qRTJNREJhRncweE9EQTRNalF5TWpFMk1EQmFNR0V4Q3pBSkJnTlZCQVlUQWxWVE1SY3cKRlFZRFZRUUlFdzVPYjNKMGFDQkRZWEp2YkdsdVlURVVNQklHQTFVRUNoTUxTSGx3WlhKc1pXUm5aWEl4RHpBTgpCZ05WQkFzVEJrWmhZbkpwWXpFU01CQUdBMVVFQXhNSmJtOWtaVUZrYldsdU1Ga3dFd1lIS29aSXpqMENBUVlJCktvWkl6ajBEQVFjRFFnQUVybmI4bkhXTmpoaWc2OVBWR1NCVERhNnAzMzhxRXVTZGlxQjhSaEpFUWd2OUdKNlQKMGJ0Yy8wQU5GSVU1V09nVWNvb014VGdueHZWamVIM1dnZVNueEtONU1IY3dEZ1lEVlIwUEFRSC9CQVFEQWdlQQpNQXdHQTFVZEV3RUIvd1FDTUFBd0hRWURWUjBPQkJZRUZPVjdMbzI2aWJLTXVubklRQnlPK1RESmxsaURNQjhHCkExVWRJd1FZTUJhQUZKcFdaS1hCNC8rdjF1Wmx3WEJBQlh0ZjczN1JNQmNHQTFVZEVRUVFNQTZDRERCbE5UUmkKWXpkbFpqUXhNakFLQmdncWhrak9QUVFEQWdOR0FEQkRBaDlHak5aaU9VR2Q2VmlVdjBOK1ZIVkRBY2dIaW1XeApmQ2VKSGRBaE54c1BBaUFRZlV5L29rMkswSjl2bXUzU2pGVVcreWVjMzdRTWFPb2sySWpQZ0gybkZ3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= www.example.com | error: CAUGHT UNHANDLED ERROR: Error: Calling register endpoint failed with error [Error: unable to verify the first certificate] ```

vdods (Tue, 29 Aug 2017 22:38:43 GMT):
After trying the same setup but with TLS disabled, I get `www.example.com | error: CAUGHT UNHANDLED ERROR: Error: fabric-ca request register failed with errors [[{"code":400,"message":"Authorization failure"}]]` though the CA shows no requests being made of it.

vdods (Tue, 29 Aug 2017 22:48:07 GMT):
Nevermind -- I was using the wrong admin account.

vdods (Tue, 29 Aug 2017 22:52:06 GMT):
I was using the wrong admin account to register the new user.. using the correct one, it works with TLS disabled, but I'm still getting `Error: Calling enrollment endpoint failed with error [Error: unable to verify the first certificate]` when TLS is enabled

ArnabChatterjee (Wed, 30 Aug 2017 00:00:51 GMT):
Hi All, Are the peers fault tolerant in Fabric Network? That means, If any peer node crashes, does the App go down or does it use other peers to continue transactions? I am using balance transfer example and to test the scenario, I have stopped the docker container of a peer from org1 and I got an error in the Node SDK logs. `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed at /home/ubuntu/go/src/sdk/node_modules/grpc/src/node/src/client.js:434:17 [2017-08-29 06:25:39.431] [ERROR] invoke-chaincode - transaction proposal was bad [2017-08-29 06:25:39.432] [ERROR] invoke-chaincode - transaction proposal was bad [2017-08-29 06:25:39.432] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-08-29 06:25:39.432] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined [2017-08-29 06:25:39.432] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor`

ArnabChatterjee (Wed, 30 Aug 2017 00:01:29 GMT):
Is there any way on how to make nodejs sdk to automatically resile to this?

Vadim (Wed, 30 Aug 2017 06:58:48 GMT):
@ArnabChatterjee it's the responsibility of the app to send proposals to enough peers in order to satisfy the endorsement policy

Vadim (Wed, 30 Aug 2017 06:59:15 GMT):
so in case one peer fails, there should be still enough proposal responses colllected from other peers

ArnabChatterjee (Wed, 30 Aug 2017 08:49:05 GMT):
@Vadim Thanks. So do you mean, I have to set my endorsement policy in such a way that in case even if at most M out of N (N>M) peers have failed I would be able to get a valid transaction response.

Vadim (Wed, 30 Aug 2017 08:56:19 GMT):
@ArnabChatterjee check out this: https://jira.hyperledger.org/browse/FAB-5451

Vadim (Wed, 30 Aug 2017 08:57:21 GMT):
I'd also add, that the endorsement policy must be driven by your business requirements and the number of peer must be chosen in a way that it can satisfy the policy even when some peers fail

cristianvanderweij (Wed, 30 Aug 2017 09:05:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=w9YrewrnTH6sQan8t) @cristianvanderweij I have managed to fix the error concerning the enrollment of a user in the balance-transfer using redhat. It seems that I had a proxy problem. Now I am running the code inside a docker container and we are able to enroll the user. Unfortunately I have encountered a next error when I am trying to create a channel running testAPI's. I get the following error: error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/usr/src/app/node_modules/grpc/src/node/src/client.js:229:12)" [2017-08-30 08:50:51.089] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/usr/src/app/node_modules/grpc/src/node/src/client.js:229:12) (node:5) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/usr/src/app/node_modules/grpc/src/node/src/client.js:229:12)error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/usr/src/app/node_modules/grpc/src/node/src/client.js:229:12)" [2017-08-30 08:50:51.089] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/usr/src/app/node_modules/grpc/src/node/src/client.js:229:12) (node:5) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:204:12) at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/node/src/client.js:169:8) at readCallback (/usr/src/app/node_modules/grpc/src/node/src/client.js:229:12)

Vadim (Wed, 30 Aug 2017 09:13:46 GMT):
@cristianvanderweij which orderer address do you use?

HuangLijun (Wed, 30 Aug 2017 09:39:33 GMT):
Has joined the channel.

cristianvanderweij (Wed, 30 Aug 2017 10:08:31 GMT):
@Vadim Hi Vadim, this is the address we use: grpcs://orderer.example.com:7050. I here is some additional information: [2017-08-30 09:44:08.097] [DEBUG] Create-Channel - request [2017-08-30 09:44:08.097] [DEBUG] Create-Channel - { config: , signatures: [ { signature_header: [Object], signature: [Object] } ], name: 'mychannel', orderer: Orderer { _options: { 'grpc.ssl_target_name_override': 'orderer.example.com', 'grpc.default_authority': 'orderer.example.com', 'grpc.primary_user_agent': 'grpc-node/1.2.4' }, _url: 'grpcs://orderer.example.com:7050', _endpoint: Endpoint { addr: 'orderer.example.com:7050', creds: ChannelCredentials {} }, _request_timeout: 45000, _ordererClient: Client { '$channel': Channel {} } }, txId: TransactionID { _nonce: , _transaction_id: '4cb2653e10dc002522dc4f6bb7044ad352d7f8540936943e067905dfc4719ae6' } } [2017-08-30 09:44:08.113] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature {[2017-08-30 09:44:08.097] [DEBUG] Create-Channel - request [2017-08-30 09:44:08.097] [DEBUG] Create-Channel - { config: , signatures: [ { signature_header: [Object], signature: [Object] } ], name: 'mychannel', orderer: Orderer { _options: { 'grpc.ssl_target_name_override': 'orderer.example.com', 'grpc.default_authority': 'orderer.example.com', 'grpc.primary_user_agent': 'grpc-node/1.2.4' }, _url: 'grpcs://orderer.example.com:7050', _endpoint: Endpoint { addr: 'orderer.example.com:7050', creds: ChannelCredentials {} }, _request_timeout: 45000, _ordererClient: Client { '$channel': Channel {} } }, txId: TransactionID { _nonce: , _transaction_id: '4cb2653e10dc002522dc4f6bb7044ad352d7f8540936943e067905dfc4719ae6' } } [2017-08-30 09:44:08.113] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature {

cristianvanderweij (Wed, 30 Aug 2017 10:08:31 GMT):
@Vadim Hi Vadim, this is the address we use: grpcs://orderer.example.com:7050. I here is some additional information: [[2017-08-30 09:44:08.097] [DEBUG] Create-Channel - request [2017-08-30 09:44:08.097] [DEBUG] Create-Channel - { config: , signatures: [ { signature_header: [Object], signature: [Object] } ], name: 'mychannel', orderer: Orderer { _options: { 'grpc.ssl_target_name_override': 'orderer.example.com', 'grpc.default_authority': 'orderer.example.com', 'grpc.primary_user_agent': 'grpc-node/1.2.4' }, _url: 'grpcs://orderer.example.com:7050', _endpoint: Endpoint { addr: 'orderer.example.com:7050', creds: ChannelCredentials {} }, _request_timeout: 45000, _ordererClient: Client { '$channel': Channel {} } }, txId: TransactionID { _nonce: , _transaction_id: '4cb2653e10dc002522dc4f6bb7044ad352d7f8540936943e067905dfc4719ae6' } } [2017-08-30 09:44:08.113] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature {

Vadim (Wed, 30 Aug 2017 10:53:23 GMT):
@cristianvanderweij so you run your code in another container? Are they both on the same docker network?

ancythomas (Wed, 30 Aug 2017 10:58:15 GMT):
Has joined the channel.

ancythomas (Wed, 30 Aug 2017 11:00:41 GMT):
Hi,, i am trying to install the fabric-sdk-node on my Windows machine, and when i m trying to issue an "npm install" command from the fabric-client folder, i m getting the error:

ancythomas (Wed, 30 Aug 2017 11:00:48 GMT):
"Failed at the pkcs11js@1.0.9 build script 'node-gyp configure build'."

ancythomas (Wed, 30 Aug 2017 11:01:51 GMT):

Message Attachments

cristianvanderweij (Wed, 30 Aug 2017 12:34:16 GMT):
@Vadim yes they are both on the same network! docker network inspect fddf181d1890 [ { "Name": "artifacts_default", "Id": "fddf181d1890a1743cb780fc0e64a11698189740a486704e50ffcfe7ac671f1a", "Created": "2017-08-30T12:14:39.183690626+02:00", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": null, "Config": [ { "Subnet": "172.18.0.0/16", "Gateway": "172.18.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": { "15d820f260618c0496f078d218a4371bb067e9098af53523cb604d20c96e4c4f": { "Name": "ca_peerOrg1", "EndpointID": "0320073a32601285d92fe6c4430af0ca5a27eca37ce5a7ceeb6301f181569f2f", "MacAddress": "02:42:ac:12:00:04", "IPv4Address": "172.18.0.4/16", "IPv6Address": "" }, "282edd7117f0aa2a1f4a0e565c403d3074baa5699e9ca670bf6954670c8cc654": { "Name": "couchdb1", "EndpointID": "be4482ca4ac0c0a385f6dce102cbe5543a4b269c473140f7ea543567e1f185d0", "MacAddress": "02:42:ac:12:00:03", "IPv4Address": "172.18.0.3/16", "IPv6Address": "" }, "51fbf736af6a90456207b00e54fde26887427a5724c5fe58ea3ebb0213449059": { "Name": "peer1.org1.example.com", "EndpointID": "2d7acc261f61f4241db154a6a8e8e30695d3b90e56f1f8a760eda576739cf161", "MacAddress": "02:42:ac:12:00:07", "IPv4Address": "172.18.0.7/16", "IPv6Address": "" }, "520d3f47d0f22f284d0fe81d93a79e7cb17f355f5c0a6d39a16c14ccb959af18": { "Name": "blockchain-node", "EndpointID": "1b1c5896638389a8bbcb1e12a130e213a03a6c0e8fe66d1df749873736c8a44b", "MacAddress": "02:42:ac:12:00:08", "IPv4Address": "172.18.0.8/16", "IPv6Address": "" }, "8a2d7f6dfaeddc23919687f8cd3e3029c1d763122990a37173249afe4249d818": { "Name": "peer0.org1.example.com", "EndpointID": "3a9382ce0d4da266d4b692df4926eaecced0ed96a78a9d75d145cda123648cee", "MacAddress": "02:42:ac:12:00:06", "IPv4Address": "172.18.0.6/16", "IPv6Address": "" }, "d40ff57da44fe06e5b7a333d02b4570495a3a20c3d238b74bd127d6f9325a960": { "Name": "couchdb0", "EndpointID": "d10ade303c4cabef920b9d645cbeba0953edea5f587a761fb4ddfe4aba9e9c88", "MacAddress": "02:42:ac:12:00:05", "IPv4Address": "172.18.0.5/16", "IPv6Address": "" }, "e85842df4b403165736a63c2962b1121acf29163eae24210d379cb20dd3b522d": { "Name": "orderer.example.com", "EndpointID": "5948ef7c172232e02f7656bf3e466b84cb07654f34d1a0a9a81710ec4c2c67da", "MacAddress": "02:42:ac:12:00:02", "IPv4Address": "172.18.0.2/16", "IPv6Address": "" } }, "Options": {}, "Labels": {} } ]

ashok.pannala (Wed, 30 Aug 2017 12:51:50 GMT):
Has joined the channel.

ashok.pannala (Wed, 30 Aug 2017 12:57:18 GMT):
while running ./runApp.sh in balance_transfer sample application I am getting below error: ============== node modules installed already ============= module.js:471 throw err; ^ Error: Cannot find module 'grpc' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/ashok/fabric-samples/balance-transfer/node_modules/fabric-ca-client/lib/Remote.js:19:12) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) Can anyone please help me to resolve this error ?

xiven (Wed, 30 Aug 2017 13:03:00 GMT):
Is there an automated way to create multiple channels using the sdk?

anishman (Wed, 30 Aug 2017 14:21:25 GMT):
Has joined the channel.

debrajo (Wed, 30 Aug 2017 18:09:13 GMT):
Can someone tell me what format the config file needs to be in for SDK client.loadFromConfig(config). Is this the same service credential format from Blockchain business-plan and https://ibm-blockchain.github.io/interacting/ connection profile?

paulkeogh (Wed, 30 Aug 2017 20:22:10 GMT):
Has joined the channel.

paulkeogh (Wed, 30 Aug 2017 20:24:02 GMT):
Can you explain how to increase the default timeout in this scenario ?

vdods (Wed, 30 Aug 2017 23:32:13 GMT):
Hi all, in the tlsOptions for connecting to a CA that is an intermediate whose cert is signed by a root CA, what should the trustedRoots value be? I've tried specifying the root CA's cert, but it seems as if the connection doesn't try to derive the cert chain from root to intermediate.. I'm getting the following error while trying to enroll: `Error: Calling enrollment endpoint failed with error [Error: unable to verify the first certificate]`

vdods (Thu, 31 Aug 2017 00:17:30 GMT):
In the balance-transfer example in github.com/hyperledger/fabric-samples the CA is constructed with null as its tlsOptions, and the comment indicates this uses the default options. Does that mean that TLS is still enabled, and if so, which trusted roots are being used? Something defined by the nodejs https/tls module?

vdods (Thu, 31 Aug 2017 00:31:23 GMT):
Has anyone successfully used tlsOptions (during construction of fabric-ca-client instance) with the material generated by fabric-ca-cryptogen.sh ?

oujunketu (Thu, 31 Aug 2017 01:11:35 GMT):
Has joined the channel.

oujunketu (Thu, 31 Aug 2017 01:15:18 GMT):
Hi all, I've checked the type definitions in the latest Hyperledger Fabric SDK document. It seems that only BlockchainInfo includes currentBlockHash and previousBlockHash which are array type. However, I want them in string type but I do not know where I can get them. Shall I convert them to string by myself and how? And I got the array value of currentBlockHash which is the same as the value of previousBlockHash in my test. That was strange.

oujunketu (Thu, 31 Aug 2017 01:18:18 GMT):

Message Attachments

ghufran (Thu, 31 Aug 2017 06:18:15 GMT):
Hi,can someone tell me how to generate PEM files in membership services in hyperledger fabric application

DarshanBc (Thu, 31 Aug 2017 06:31:27 GMT):
Hi I am trying to modify the fabcar example with sdk APIs In chaincode I am not Auto-incrementing the Car ID but instaead I am send from the application so my requirement is if the car id already exists API should return "car Already exists" hence I am editing invoke-transaction.js Here is the code ```return helper.getRegisteredUsers(username, org).then((user) => { if(fcn==="createCar"){ var queryarg=JSON.stringify([args[0]]) queryarg = queryarg.replace(/'/g, '"'); logger.info("line 48 "+queryarg); queryarg = JSON.parse(queryarg); logger.info("line 50 "+queryarg); logger.info("its query arg "+queryarg); query.queryChaincode(querypeer, channelName, chaincodeName, queryarg, queryfcn, username, org).then(message=>{ if (message==="") { logger.info("message is empty"); logger.debug("need to create a car)"; //return channel.sendTransactionProposal(request); } else{ return "Car exists" }; }).catch( function(error){ console.log(error); }); }; tx_id = client.newTransactionID(); logger.debug(util.format('Sending transaction "%j"', tx_id)); // send proposal to endorser var request = { targets: targets, chaincodeId: chaincodeName, fcn: fcn, args: args, chainId: channelName, txId: tx_id }; return channel.sendTransactionProposal(request); }, (err) => { logger.error('Failed to enroll user \'' + username + '\'. ' + err); throw new Error('Failed to enroll user \'' + username + '\'. ' + err); }).then((results) => { logger.info(results); if (results!=="Car exists") { var proposalResponses = results[0]``` It is asynchronously executing query and invoking the transaction its not reurning "Car already exists" can anyone help me

DarshanBc (Thu, 31 Aug 2017 06:31:27 GMT):
Hi I am trying to modify the fabcar example with sdk APIs In chaincode I am not Auto-incrementing the Car ID but instaead I am sending CAR ID from the application so my requirement is if the car id already exists API should return "car Already exists" hence I am editing invoke-transaction.js Here is the code ```return helper.getRegisteredUsers(username, org).then((user) => { if(fcn==="createCar"){ var queryarg=JSON.stringify([args[0]]) queryarg = queryarg.replace(/'/g, '"'); logger.info("line 48 "+queryarg); queryarg = JSON.parse(queryarg); logger.info("line 50 "+queryarg); logger.info("its query arg "+queryarg); query.queryChaincode(querypeer, channelName, chaincodeName, queryarg, queryfcn, username, org).then(message=>{ if (message==="") { logger.info("message is empty"); logger.debug("need to create a car)"; //return channel.sendTransactionProposal(request); } else{ return "Car exists" }; }).catch( function(error){ console.log(error); }); }; tx_id = client.newTransactionID(); logger.debug(util.format('Sending transaction "%j"', tx_id)); // send proposal to endorser var request = { targets: targets, chaincodeId: chaincodeName, fcn: fcn, args: args, chainId: channelName, txId: tx_id }; return channel.sendTransactionProposal(request); }, (err) => { logger.error('Failed to enroll user \'' + username + '\'. ' + err); throw new Error('Failed to enroll user \'' + username + '\'. ' + err); }).then((results) => { logger.info(results); if (results!=="Car exists") { var proposalResponses = results[0]``` It is asynchronously executing query and invoking the transaction its not reurning "Car already exists" can anyone help me

DarshanBc (Thu, 31 Aug 2017 06:31:27 GMT):
Hi I am trying to modify the fabcar example with sdk APIs In chaincode I am not Auto-incrementing the Car ID but instaead I am sending CAR ID from the application so my requirement is if the car id already exists API should return "car Already exists" hence I am editing invoke-transaction.js Here is the code ```return helper.getRegisteredUsers(username, org).then((user) => { if(fcn==="createCar"){ var queryarg=JSON.stringify([args[0]]) queryarg = queryarg.replace(/'/g, '"'); queryarg = JSON.parse(queryarg); query.queryChaincode(querypeer, channelName, chaincodeName, queryarg, queryfcn, username, org).then(message=>{ if (message==="") { logger.info("message is empty"); logger.debug("need to create a car)"; } else{ return "Car exists" }; }).catch( function(error){ console.log(error); }); }; tx_id = client.newTransactionID(); logger.debug(util.format('Sending transaction "%j"', tx_id)); // send proposal to endorser var request = { targets: targets, chaincodeId: chaincodeName, fcn: fcn, args: args, chainId: channelName, txId: tx_id }; return channel.sendTransactionProposal(request); }, (err) => { logger.error('Failed to enroll user \'' + username + '\'. ' + err); throw new Error('Failed to enroll user \'' + username + '\'. ' + err); }).then((results) => { logger.info(results); if (results!=="Car exists") { var proposalResponses = results[0]``` It is asynchronously executing query and invoking the transaction its not reurning "Car already exists" can anyone help me

DarshanBc (Thu, 31 Aug 2017 06:31:27 GMT):
Hi I am trying to modify the fabcar example with sdk APIs In chaincode I am not Auto-incrementing the Car ID but instaead I am sending CAR ID from the application so my requirement is if the car id already exists API should return "car Already exists" hence I am editing invoke-transaction.js Here is the code ```return helper.getRegisteredUsers(username, org).then((user) => { if(fcn==="createCar"){ var queryarg=JSON.stringify([args[0]]) queryarg = queryarg.replace(/'/g, '"'); queryarg = JSON.parse(queryarg); query.queryChaincode(querypeer, channelName, chaincodeName, queryarg, queryfcn, username, org).then(message=>{ if (message==="") { logger.info("message is empty"); logger.debug("need to create a car)"; } else{ return "Car exists" }; }).catch( function(error){ console.log(error); }); }; tx_id = client.newTransactionID(); logger.debug(util.format('Sending transaction "%j"', tx_id)); // send proposal to endorser var request = { targets: targets, chaincodeId: chaincodeName, fcn: fcn, args: args, chainId: channelName, txId: tx_id }; return channel.sendTransactionProposal(request); }, (err) => { logger.error('Failed to enroll user \'' + username + '\'. ' + err); throw new Error('Failed to enroll user \'' + username + '\'. ' + err); }).then((results) => { logger.info(results); if (results!=="Car exists") { var proposalResponses = results[0]``` It is asynchronously executing query and invoking the transaction its not reurning "Car already exists" can anyone help me

rwadhwa (Thu, 31 Aug 2017 06:53:15 GMT):
Has joined the channel.

Vadim (Thu, 31 Aug 2017 10:53:15 GMT):
@DarshanBc why don't you check if id exists in the chaincode?

Vadim (Thu, 31 Aug 2017 10:54:46 GMT):
also, in your code you send the transaction before the queryChaincode completes

MoulaliMvg (Thu, 31 Aug 2017 14:17:34 GMT):
I did my balance transfer setup in my system and the same set up I did in another system and changed example_cc.go but it showing Time out error error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/rajasekhar/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js💯19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/rajasekhar/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js💯19) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) [2017-08-31 19:20:22.417] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-08-31 19:20:22.418] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-08-31 19:20:22.418] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-08-31 19:20:22.455] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined

MoulaliMvg (Thu, 31 Aug 2017 14:17:42 GMT):
From testAPIs.sh I'm doing upto install chaincode instantiate and invoke I'm doing from my UI

Vrai1127 (Thu, 31 Aug 2017 18:37:30 GMT):
Hi, Does the read of data has to be through chaincode? Or could that happen directly through Node SDK?

Vrai1127 (Thu, 31 Aug 2017 18:37:30 GMT):
Hi, Does the read of data has to be through chaincode(methods available through SDK)? Or Could I directly query Couchdb or chain?

greg.haskins (Thu, 31 Aug 2017 20:06:41 GMT):
@Vrai1127 I assume you mean officially?

greg.haskins (Thu, 31 Aug 2017 20:07:44 GMT):
officially you can only access data through the SDK...if you are in a development scenario, you could choose to surface couchdb as an accessible endpoint for debugging/learning/whatever

greg.haskins (Thu, 31 Aug 2017 20:07:52 GMT):
but you would never have access to this on a real network

greg.haskins (Thu, 31 Aug 2017 20:07:59 GMT):
(or the network admins failed)

Vrai1127 (Thu, 31 Aug 2017 21:33:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7mhcYKZQ6xtsTNugD) @greg.haskins Yes i meant officially :). Also even through SDK, all of querying goes through chaincode or is there a way (officially) a peer could query without having a chaincode installed?

rajasekharpippalla (Fri, 01 Sep 2017 06:46:31 GMT):
I am working on fabric-samples/balance-transfer example.. i am able to install chaincode and unable to instantiate chaincode , getting timeout error.. I am attaching screen shots for peer log file and peer terminal for the reference(peer-log.png and peer-terminal.png).. can anyone help me on this

rajasekharpippalla (Fri, 01 Sep 2017 06:46:48 GMT):

Message Attachments

rajasekharpippalla (Fri, 01 Sep 2017 06:47:02 GMT):

Message Attachments

Vadim (Fri, 01 Sep 2017 06:50:03 GMT):
@rajasekharpippalla have you instantiated that chaincode?

rajasekharpippalla (Fri, 01 Sep 2017 06:51:24 GMT):
@Vadim i am able to install chaincode.. i am facing issue with cahincode instantiation only

Vadim (Fri, 01 Sep 2017 06:51:50 GMT):
the error implies the chaincode is not instantiated

Vadim (Fri, 01 Sep 2017 06:52:22 GMT):
regarding timeout - do you use sdk?

rajasekharpippalla (Fri, 01 Sep 2017 06:53:18 GMT):
nodesdk (node-modules) in balance-transfer example

Vadim (Fri, 01 Sep 2017 06:53:54 GMT):
so this is the error you see on peer when you instantiate, and the node app tells you "timeout"?

rajasekharpippalla (Fri, 01 Sep 2017 06:55:19 GMT):
yes

Vadim (Fri, 01 Sep 2017 06:58:47 GMT):
have you tried to regenerate the artifacts?

rajasekharpippalla (Fri, 01 Sep 2017 06:59:41 GMT):
i don't know what is the approach to regenerate the artifacts

MohammadObaid (Fri, 01 Sep 2017 09:46:15 GMT):
Hey @here Is there a way I can retrieve all blocks using one query? Any node api code for that? Rightnow we can retrieve block information either by block number or blockhash or transaction id?

yacovm (Fri, 01 Sep 2017 10:02:03 GMT):
yes. you can via QSCC

DomSteil (Fri, 01 Sep 2017 16:10:31 GMT):
Has joined the channel.

MohammadObaid (Fri, 01 Sep 2017 16:15:47 GMT):
@yacovm means writing a function on chaincode and then calling it in node api right?

yacovm (Fri, 01 Sep 2017 16:16:05 GMT):
no, QSCC is a system chaincode

MohammadObaid (Fri, 01 Sep 2017 16:59:19 GMT):
How? Any docs link? What will be the curl query for this? What I was thinking is to first get chain info which will give me block height and then using that block height to retrieve all block iteratively

yacovm (Fri, 01 Sep 2017 17:00:26 GMT):
curl?? since when does curl knows gRPC?

eetti (Fri, 01 Sep 2017 18:58:21 GMT):
What are the possible reason'w why the nodeSDK may not be able to connect with the orderer

eetti (Fri, 01 Sep 2017 18:58:21 GMT):
What are the possible reason'w why the nodeSDK may not be able to connect with the orderer. I have this error. ``` 2017-09-01T18:56:00.447Z - error: Error: REQUEST_TIMEOUT at Timeout._onTimeout (C:\Users\s3752324\workspace\ledgerapi\node_modules\fabric-client\lib\Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Error: {} error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (C:\\Users\\s3752324\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:201:19)\n at ClientDuplexStream._readsDone (C:\\Users\\s3752324\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:169:8)\n at readCallback (C:\\Users\\s3752324\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:229:12)" ```

eetti (Fri, 01 Sep 2017 18:58:21 GMT):
What are the possible reason'w why the nodeSDK may not be able to connect with the orderer. I have this error. ``` 2017-09-01T18:56:00.447Z - error: Error: REQUEST_TIMEOUT at Timeout._onTimeout (C:\Users\xxxx\workspace\ledgerapi\node_modules\fabric-client\lib\Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Error: {} error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:201:19)\n at ClientDuplexStream._readsDone (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:169:8)\n at readCallback (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:229:12)" ```

eetti (Fri, 01 Sep 2017 18:58:21 GMT):
What are the possible reason'w why the nodeSDK may not be able to connect with the orderer. I have this error. ``` 2017-09-01T18:56:00.447Z - error: Error: REQUEST_TIMEOUT at Timeout._onTimeout (C:\Users\xxxx\workspace\ledgerapi\node_modules\fabric-client\lib\Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Error: {} error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:201:19)\n at ClientDuplexStream._readsDone (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:169:8)\n at readCallback (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:229:12)" ```

eetti (Fri, 01 Sep 2017 18:58:21 GMT):
What are the possible reason'w why the nodeSDK may not be able to connect with the orderer. I have this error. ``` error: [Orderer.js]: sendBroadcast - timed out after:45000 2017-09-01T18:56:00.447Z - error: Error: REQUEST_TIMEOUT at Timeout._onTimeout (C:\Users\xxxx\workspace\ledgerapi\node_modules\fabric-client\lib\Orderer.js:94:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Error: {} error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:201:19)\n at ClientDuplexStream._readsDone (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:169:8)\n at readCallback (C:\\Users\\xxxx\\workspace\\ledgerapi\\node_modules\\fabric-client\\node_modules\\grpc\\src\\node\\src\\client.js:229:12)" ```

Xeriou (Sat, 02 Sep 2017 12:16:36 GMT):
Has joined the channel.

alexandra_g (Sat, 02 Sep 2017 21:12:29 GMT):
Has joined the channel.

Eman0 (Sun, 03 Sep 2017 01:08:07 GMT):
Has joined the channel.

rajasekharpippalla (Mon, 04 Sep 2017 06:50:06 GMT):
@eetti I think u can change request timeout value in node_modules/fabric-client/config/default.json (45000 -> 160000)

saptarshee (Mon, 04 Sep 2017 10:09:17 GMT):
In fabric, while endorsement, i am doing some validations in chaincode (business validation based onthe data stored in ledger). For a case of failure of business validation I am returning an error code from chaincode. How do i retrieve the errorcode returned from chaincode in node-sdk. I have followed the sample app-sdk-node example provided, and it always returns a common error 'Failed to order transactions'. I can see the proper error code (returned by chaincode) getting printed in logs withing the somewhere fabric-client module. Can somebody please help on this.

Luxii (Mon, 04 Sep 2017 12:38:19 GMT):
Has joined the channel.

saptarshee (Tue, 05 Sep 2017 05:08:31 GMT):
Hii... Request somebody to update me on the above point if anybody has come accross something similar, and have solved it somehow. The above doubt is for an invoke flow, involving endorsement and orderering, and the logs that i see getting printed (as mentioned above) are in the response of endorsement. There is a 2nd doubt, are there any services provided by the fabric platform by which 1. we can retrieve all the node details and which of them are currently running/active, 2. fetch all transactions from a node any ideas on this??

vudathasaiomkar (Tue, 05 Sep 2017 05:16:34 GMT):
@here , I am new here. I am going through the getting started in the official doc. while running fabcar , when i do `node query.js` getting error ``` cannot find module: grpc_node.node``` .

vudathasaiomkar (Tue, 05 Sep 2017 05:17:29 GMT):

Message Attachments

net0410 (Tue, 05 Sep 2017 06:11:36 GMT):
I wanna apply below endorsement policy when chincode instantiating in cli container? ``` { "identities": [ { "role": { "name": "member", "mspId": "Org1MSP" }}, { "role": { "name": "member", "mspId": "Org1MSP" }}, { "role": { "name": "member", "mspId": "Org2MSP" }}, { "role": { "name": "admin", "mspId": "Org1MSP" }} ], "policy": { "1-of": [ { "signed-by": 0}, { "1-of": [{ "signed-by": 0}]} ] } } ``` ``` ex) peer chaincode deploy -C testchainid -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args":["init","a","100","b","200"]}' -P "AND('Org1.member', 'Org2.member')" ``` how can i do that?

vdods (Tue, 05 Sep 2017 06:12:01 GMT):
@vudathasaiomkar I'm having the same issue in my app. It looks like this ( https://github.com/IBM-Blockchain-Archive/car-lease-demo/issues/99 ) may be the answer.

abheekmaitra (Tue, 05 Sep 2017 07:22:04 GMT):
Is there a way to retrieve the channel and client objects to the node application via the SDK if a channel has already been created?

usman_shaik (Tue, 05 Sep 2017 07:23:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MhAs6A3vNC9kkbjdv) @Vadim I have tried this example. it perfectly works. I have a question. If we have a distributed environment like org1, org2 on different machines ( org1 MSP certs are only available on org1 infrastructure/ VM and org2 MSP on its VM ) in such case, when i try to add org3 into a shared channel that org1&2 are already part of, then what should be the workflow? org1 VM has this node sdk app thorough this, i may not able to able to get admin details of org3 ( which is on different machine ) to sign the configUpdate object ? How can i handle this?

Xeriou (Tue, 05 Sep 2017 08:23:06 GMT):
HI everyone~ i meet a problem, error message is below `node: symbol lookup error: /{myhome}/xfabric/app/node_modules/grpc/src/node/extension_binary/grpc_node.node: undefined symbol: SSL_CTX_set_alpn_protos` Is openssl or node/grpc's problem? My openssl version is `OpenSSL 1.0.1e-fips 11 Feb 2013` and my package.json is ``` "dependencies": { "fs-extra": "^2.0.0", "fabric-client": "^1.0.0", "fabric-ca-client": "^1.0.0" } ``` Does anyone have same problem?

DarshanBc (Tue, 05 Sep 2017 09:04:16 GMT):
Hi I have designed a system of 3-orgs all the containers are up and running I am trying to run API to create users it is showing this error ```[2017-09-05 14:31:57.703] [DEBUG] SampleWebApp - End point : /users [2017-09-05 14:31:57.703] [DEBUG] SampleWebApp - User name : Jim [2017-09-05 14:31:57.703] [DEBUG] SampleWebApp - Org name : mfg [2017-09-05 14:31:57.708] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-09-05 14:31:57.710] [ERROR] Helper - Failed to get registered user: Jim, error: TypeError: Cannot read property 'setStateStore' of undefined at hfc.newDefaultKeyValueStore.then (/home/rtcin/go/src/github.com/hyperledger/fabric-samples/CustomApp/app/helper.js:235:9) ```

DarshanBc (Tue, 05 Sep 2017 09:04:16 GMT):
Hi I have designed a system of 3-orgs all the containers are up and running I am trying to run API to create users it is showing this error ```[2017-09-05 14:31:57.703] [DEBUG] SampleWebApp - End point : /users [2017-09-05 14:31:57.703] [DEBUG] SampleWebApp - User name : Jim [2017-09-05 14:31:57.703] [DEBUG] SampleWebApp - Org name : mfg [2017-09-05 14:31:57.708] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-09-05 14:31:57.710] [ERROR] Helper - Failed to get registered user: Jim, error: TypeError: Cannot read property 'setStateStore' of undefined at hfc.newDefaultKeyValueStore.then (/home/.../go/src/github.com/hyperledger/fabric-samples/CustomApp/app/helper.js:235:9) ```

GirijaShankarMishra (Tue, 05 Sep 2017 10:32:45 GMT):
Hi I am getting an error of timeout while invoking a request, but after few seconds when I again invoke the same request it works well. This scenario appears constantly. I am using balance-transfer example.

wy (Tue, 05 Sep 2017 11:20:54 GMT):
Has joined the channel.

Lavanya5896 (Tue, 05 Sep 2017 11:47:15 GMT):
Has joined the channel.

DarshanBc (Tue, 05 Sep 2017 14:00:35 GMT):
I have 3 orgs system when I try to register user I am getting this error when I tried to regiser user I am getting this error ``` [2017-09-05 19:20:48.863] [DEBUG] SampleWebApp - End point : /users [2017-09-05 19:20:48.864] [DEBUG] SampleWebApp - User name : Jim [2017-09-05 19:20:48.864] [DEBUG] SampleWebApp - Org name : mfg [2017-09-05 19:20:48.868] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-09-05 19:20:48.871] [ERROR] Helper - Failed to get registered user: Jim, error: TypeError: Cannot read property 'setStateStore' of undefined at hfc.newDefaultKeyValueStore.then (/home/.../go/src/github.com/hyperledger/fabric-samples/CustomApp/app/helper.js:235:9) ``` this is my config.json ``` { "host":"localhost", "port":"4000", "jwt_expiretime": "36000", "channelName":"mychannel", "GOPATH":"../artifacts", "keyValueStore":"/tmp/fabric-client-kvs", "eventWaitTime":"30000", "orderer":"grpcs://localhost:7050", "users":[ { "username":"admin", "secret":"adminpw" } ] } ``` I had put a logger.debug(store) I got this ``` [2017-09-05 19:28:10.108] [DEBUG] Helper - FileKeyValueStore { _dir: '/tmp/fabric-client-kvs_peerMfg' }

DarshanBc (Tue, 05 Sep 2017 14:00:35 GMT):
I have 3 orgs system when I try to register user I am getting this error ``` [2017-09-05 19:20:48.863] [DEBUG] SampleWebApp - End point : /users [2017-09-05 19:20:48.864] [DEBUG] SampleWebApp - User name : Jim [2017-09-05 19:20:48.864] [DEBUG] SampleWebApp - Org name : mfg [2017-09-05 19:20:48.868] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-09-05 19:20:48.871] [ERROR] Helper - Failed to get registered user: Jim, error: TypeError: Cannot read property 'setStateStore' of undefined at hfc.newDefaultKeyValueStore.then (/home/.../go/src/github.com/hyperledger/fabric-samples/CustomApp/app/helper.js:235:9) ``` this is my config.json ``` { "host":"localhost", "port":"4000", "jwt_expiretime": "36000", "channelName":"mychannel", "GOPATH":"../artifacts", "keyValueStore":"/tmp/fabric-client-kvs", "eventWaitTime":"30000", "orderer":"grpcs://localhost:7050", "users":[ { "username":"admin", "secret":"adminpw" } ] } ``` I had put a logger.debug(store) I got this ``` [2017-09-05 19:28:10.108] [DEBUG] Helper - FileKeyValueStore { _dir: '/tmp/fabric-client-kvs_peerMfg' }

AkshayMisal (Tue, 05 Sep 2017 14:18:41 GMT):
Has joined the channel.

skarim (Tue, 05 Sep 2017 15:02:47 GMT):
Has joined the channel.

hamptonsmith (Tue, 05 Sep 2017 16:35:56 GMT):
Has joined the channel.

hamptonsmith (Tue, 05 Sep 2017 16:38:01 GMT):
Hey folks, what's the best example starting point for using the node sdk assuming I already have a functioning fabric running on AWS that I can successfully manipulate with the command-line tools?

MartinC (Tue, 05 Sep 2017 17:02:49 GMT):
@hamptonsmith I think a lot of people take a look at this sample https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer

hamptonsmith (Tue, 05 Sep 2017 18:12:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cMz7QRE6MWMpyCybL) @MartinC Thanks much! Libraries and documentation are moving fast, so I want to make sure I'm starting from an actual known good.

smith (Wed, 06 Sep 2017 02:52:39 GMT):
Has joined the channel.

Subramanyam (Wed, 06 Sep 2017 04:34:35 GMT):
I want to convert the curl script into post in angularjs and can anyone help me

Lavanya5896 (Wed, 06 Sep 2017 04:34:36 GMT):
Hi I am working with balance transfer example in that I created one more organization named org3 It was created fine but when I tried to enroll user in that organization I am getting issue.

Lavanya5896 (Wed, 06 Sep 2017 04:35:02 GMT):

Message Attachments

Subramanyam (Wed, 06 Sep 2017 04:37:12 GMT):
I am working with the balance transfer example in that I have testApis.sh file and in that have curl script and convert into http post in angular js

Subramanyam (Wed, 06 Sep 2017 04:38:15 GMT):

Message Attachments

zemtsov (Wed, 06 Sep 2017 06:33:50 GMT):
Has left the channel.

DarshanBc (Wed, 06 Sep 2017 11:37:06 GMT):
@Subramanyam https://curl.trillworks.com/#node

Subramanyam (Wed, 06 Sep 2017 12:02:39 GMT):
@DarshanBc I already went with that link and in that available Node.js conversion but i want in AngularJS

Subramanyam (Wed, 06 Sep 2017 12:03:15 GMT):
Thanks for info @DarshanBc

DarshanBc (Wed, 06 Sep 2017 12:04:06 GMT):
You can use XmlHttpRequest() in html and work with from end

DarshanBc (Wed, 06 Sep 2017 12:04:06 GMT):
You can use XmlHttpRequest() in html and work with front end

jimthematrix (Wed, 06 Sep 2017 15:26:47 GMT):
```EVERYONE, please note that v1.0.2 has been published to npm earlier today. two notable highlights are grpc upgrade (1.2.4 causes problems in certain Linux distros), and node.js engine v8.4 support in addition to 6.9.x

AnilOner (Wed, 06 Sep 2017 17:46:55 GMT):
Has joined the channel.

jethdg (Thu, 07 Sep 2017 04:38:25 GMT):
Has joined the channel.

GirijaShankarMishra (Thu, 07 Sep 2017 07:20:23 GMT):

Message Attachments

GirijaShankarMishra (Thu, 07 Sep 2017 07:44:28 GMT):

Message Attachments

GirijaShankarMishra (Thu, 07 Sep 2017 07:45:29 GMT):

Message Attachments

xiven (Thu, 07 Sep 2017 17:03:48 GMT):
Has anyone had success importing the couchbase sdk within their chaincode?

xiven (Thu, 07 Sep 2017 17:07:47 GMT):
this is what i get [chaincode-platform] func1 -> ERRO 651e Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/Tabulation/vendor/github.com/couchbase/gocb/bucket.go:4:2: cannot find package "gopkg.in/couchbase/gocbcore.v7" in any of: peer0.org1.example.com | /chaincode/input/src/Tabulation/vendor/gopkg.in/couchbase/gocbcore.v7 (vendor tree) peer0.org1.example.com | /opt/go/src/gopkg.in/couchbase/gocbcore.v7 (from $GOROOT) peer0.org1.example.com | /chaincode/input/src/gopkg.in/couchbase/gocbcore.v7 (from $GOPATH) peer0.org1.example.com | /opt/gopath/src/gopkg.in/couchbase/gocbcore.v7 peer0.org1.example.com | chaincode/input/src/Tabulation/vendor/github.com/couchbase/gocb/cluster.go:7:2: cannot find package "gopkg.in/couchbaselabs/gocbconnstr.v1" in any of: peer0.org1.example.com | /chaincode/input/src/Tabulation/vendor/gopkg.in/couchbaselabs/gocbconnstr.v1 (vendor tree) peer0.org1.example.com | /opt/go/src/gopkg.in/couchbaselabs/gocbconnstr.v1 (from $GOROOT) peer0.org1.example.com | /chaincode/input/src/gopkg.in/couchbaselabs/gocbconnstr.v1 (from $GOPATH) peer0.org1.example.com | /opt/gopath/src/gopkg.in/couchbaselabs/gocbconnstr.v1 peer0.org1.example.com | chaincode/input/src/Tabulation/vendor/github.com/couchbase/gocb/cluster_searchquery.go:7:2: cannot find package "gopkg.in/couchbaselabs/jsonx.v1" in any of: peer0.org1.example.com | /chaincode/input/src/Tabulation/vendor/gopkg.in/couchbaselabs/jsonx.v1 (vendor tree) peer0.org1.example.com | /opt/go/src/gopkg.in/couchbaselabs/jsonx.v1 (from $GOROOT) peer0.org1.example.com | /chaincode/input/src/gopkg.in/couchbaselabs/jsonx.v1 (from $GOPATH) peer0.org1.example.com | /opt/gopath/src/gopkg.in/couchbaselabs/jsonx.v1 peer0.org1.example.com | " peer0.org1.example.com | 2017-09-06 19:16:30.546 UTC [dockercontroller] deployImage -> ERRO 651f Error building images: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/Tabulation/vendor/github.com/couchbase/gocb/bucket.go:4:2: cannot find package "gopkg.in/couchbase/gocbcore.v7" in any of: peer0.org1.example.com | /chaincode/input/src/Tabulation/vendor/gopkg.in/couchbase/gocbcore.v7 (vendor tree) peer0.org1.example.com | /opt/go/src/gopkg.in/couchbase/gocbcore.v7 (from $GOROOT) peer0.org1.example.com | /chaincode/input/src/gopkg.in/couchbase/gocbcore.v7 (from $GOPATH) peer0.org1.example.com | /opt/gopath/src/gopkg.in/couchbase/gocbcore.v7 peer0.org1.example.com | chaincode/input/src/Tabulation/vendor/github.com/couchbase/gocb/cluster.go:7:2: cannot find package "gopkg.in/couchbaselabs/gocbconnstr.v1" in any of: peer0.org1.example.com | /chaincode/input/src/Tabulation/vendor/gopkg.in/couchbaselabs/gocbconnstr.v1 (vendor tree) peer0.org1.example.com | /opt/go/src/gopkg.in/couchbaselabs/gocbconnstr.v1 (from $GOROOT) peer0.org1.example.com | /chaincode/input/src/gopkg.in/couchbaselabs/gocbconnstr.v1 (from $GOPATH) peer0.org1.example.com | /opt/gopath/src/gopkg.in/couchbaselabs/gocbconnstr.v1 peer0.org1.example.com | chaincode/input/src/Tabulation/vendor/github.com/couchbase/gocb/cluster_searchquery.go:7:2: cannot find package "gopkg.in/couchbaselabs/jsonx.v1" in any of: peer0.org1.example.com | /chaincode/input/src/Tabulation/vendor/gopkg.in/couchbaselabs/jsonx.v1 (vendor tree) peer0.org1.example.com | /opt/go/src/gopkg.in/couchbaselabs/jsonx.v1 (from $GOROOT) peer0.org1.example.com | /chaincode/input/src/gopkg.in/couchbaselabs/jsonx.v1 (from $GOPATH) peer0.org1.example.com | /opt/gopath/src/gopkg.in/couchbaselabs/jsonx.v1

aakanshaparmar (Thu, 07 Sep 2017 17:50:57 GMT):
Hi all, we are using queryblock() function to display block details. When we try to query a large number of blocks (40/50) it fails and we get the following error - [31merror: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/app/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) ssl_transport_security.c:602] Could not add root certificate to ssl context. ssl_transport_security.c:1348] Cannot load server root certificates. security_connector.c:837] Handshaker factory creation failed with TSI_INTERNAL_ERROR. secure_channel_create.c:127] Failed to create secure subchannel for secure name 'peer2:7051' Failed to create subchannel arguments during subchannel creation. Could not add root certificate to ssl context. Any idea why it might be happening?

aakanshaparmar (Thu, 07 Sep 2017 17:51:31 GMT):
Hi all, we are using queryblock() function to display block details. When we try to query a large number of blocks (40/50) it fails and we get the following error - [31merror: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/app/node_modules/fabric-client/lib/Peer.js) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) ssl_transport_security.c:602] Could not add root certificate to ssl context. ssl_transport_security.c:1348] Cannot load server root certificates. security_connector.c:837] Handshaker factory creation failed with TSI_INTERNAL_ERROR. secure_channel_create.c:127] Failed to create secure subchannel for secure name 'peer2:7051' Failed to create subchannel arguments during subchannel creation. Could not add root certificate to ssl context. Any idea why it might be happening?

robert.feng (Fri, 08 Sep 2017 04:03:25 GMT):
Has joined the channel.

jgabuya (Fri, 08 Sep 2017 06:22:53 GMT):
Has joined the channel.

jgabuya (Fri, 08 Sep 2017 06:23:56 GMT):
Hi guys, I'm very new to fabric so please bear with me. We have 3 users (A, B, C), each connected to its own peer node. When user A invokes a chaincode, how can user B and C be notified about the event? I've heard that the sdk can listen to events. I just don't have any idea how.

DarshanBc (Fri, 08 Sep 2017 09:27:16 GMT):
Can I execute 2 functions on 2 different smart contracts and decide whether the transactions to commit to ledger based on their results like sdk examines the proposal responses

jrosmith (Fri, 08 Sep 2017 20:17:18 GMT):
@DarshanBc are you saying you want to submit two transactions, then hold off on committing unless both proposal responses come back ok?

kostas (Fri, 08 Sep 2017 20:18:04 GMT):
Has left the channel.

linyuadam (Sat, 09 Sep 2017 03:56:39 GMT):
@jgabuya The chaincode can emit the event. User b and c's sdk can can subscribe to the event then get notified

hamptonsmith (Mon, 11 Sep 2017 14:52:24 GMT):
Working through the fabcar example, it seems that credentials are drawn from the hard-coded ~/.hfc-key-store directory. How best to change where those are drawn from?

hamptonsmith (Mon, 11 Sep 2017 21:15:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vcy4tLd36YBHBxm7L) @hamptonsmith Ultimately got this working with: ``` client.setCryptoSuite(hfc.newCryptoSuite()); client.getCryptoSuite().setCryptoKeyStore( hfc.newCryptoKeyStore({path: '/path/to/crypto'})); ``` But this seems to require a fair amount of inappropriate intimacy with the underlying client and cryptosuite objects, is there a more parsimonious way I've missed?

DarshanBc (Tue, 12 Sep 2017 03:51:03 GMT):
@jrosmith yes I want to hold back two transaction and commit both of them based on the results simulated in those transactions

ArvsIndrarys (Tue, 12 Sep 2017 08:58:49 GMT):
Has left the channel.

nhrishi (Tue, 12 Sep 2017 16:09:48 GMT):
Hi, I'm running node SDK client and Client WebApp on the Server A and Fabric on server B. When we try to invoke a transaction from Server A, Invoke is failing with error "error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed at /home/nashi/sdk_client_qa_package/sdk_ui_server/node_modules/grpc/src/node/src/client.js:434:17 [2017-09-12 15:38:32.388] [ERROR] invoke-chaincode - transaction proposal was bad [2017-09-12 15:38:32.388] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-09-12 15:38:32.388] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined

nhrishi (Tue, 12 Sep 2017 16:09:48 GMT):
Hi, I'm running node SDK client and Client WebApp on the Server A and Fabric on server B. When we try to invoke a transaction from Server A, Invoke is failing with error. Could you pls advise ---> "error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed at /home/nashi/sdk_client_qa_package/sdk_ui_server/node_modules/grpc/src/node/src/client.js:434:17 [2017-09-12 15:38:32.388] [ERROR] invoke-chaincode - transaction proposal was bad [2017-09-12 15:38:32.388] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-09-12 15:38:32.388] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined

jimthematrix (Tue, 12 Sep 2017 16:20:18 GMT):
@hamptonsmith that's the right way, all the functions you called above are official APIs needed for customizing the crypto store from the default location

jimthematrix (Tue, 12 Sep 2017 16:21:05 GMT):
@nhrishi what's the peer address you are using?

nhrishi (Tue, 12 Sep 2017 16:56:41 GMT):
@jimthematrix I'm using IP address of Server B and port 7051

nhrishi (Tue, 12 Sep 2017 17:22:02 GMT):
my url is grpcs://:7051 and addr is :7051 in the transaction proposal

jrosmith (Tue, 12 Sep 2017 17:33:57 GMT):
@DarshanBc seems like you want to insert some logic between when the proposals are executed against the state db in the chaincode and when the client assembles the actual transaction message to be committed to the ledger. I'm not entirely sure if you can do this within the node-sdk or if you'd have to make changes to your endorsement policy, but that's where something would have to happen. More on the flow here, specifically 3, 4, and 5: https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html

nhrishi (Tue, 12 Sep 2017 19:22:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yzRerjtdokHq2Mu2E) @nhrishi Jim, my url is grpcs://:7051 and addr is :7051 in the transaction proposal. Somehow When I run both my WebApp(node sdk) and Fabric on the same server. it just works perfectly fine. With 2 on different servers, fabric client sdk is sending a transaction proposal on the endorsing node but endorsing peer doesnt receive tran proposal at all (log doesnt show anything). We also checked TCP dump on the port and see data is received on the given port. Could you pls help on this. This is little urgent. Will really apprecite your help. Thanks.

nhrishi (Tue, 12 Sep 2017 19:22:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yzRerjtdokHq2Mu2E) @nhrishi @jimthematrix Jim, my url is grpcs://:7051 and addr is :7051 in the transaction proposal. Somehow When I run both my WebApp(node sdk) and Fabric on the same server. it just works perfectly fine. With 2 on different servers, fabric client sdk is sending a transaction proposal on the endorsing node but endorsing peer doesnt receive tran proposal at all (log doesnt show anything). We also checked TCP dump on the port and see data is received on the given port. Could you pls help on this. This is little urgent. Will really apprecite your help. Thanks.

hamptonsmith (Tue, 12 Sep 2017 19:24:18 GMT):
@jimthematrix Having slept on it, I feel better about it. But, for whatever my datapoint is worth, the things that I'm responding to are: 1) The default `CryptoSuite` doesn't draw from configured `KeyValueStore`. (Never specified that it should, but it still struck me as surprising.) 2) The details of the lazy creation of the crypto suite aren't specified, so if I don't set a suite it will "behave like" I've set the default suite at the point that I try to invoke chaincode, for example, but `getCryptoSuite()` will not "behave like" I've set the default suite if I call it without first calling `setCryptoSuite()` (unless I've called one of an unspecified subset of lazy-suite-providing methods first). I'd expect to be able to omit line one in my example above and I only know that I can't because I consulted the source code. I guess ideally I'd dispense with lazy creation and just create the default crypto suite at client-creation time. If there's a performance issue there, then the default crypto suite could wait until one of its methods was called to lazily set itself up internally. 3) `setCryptoKeyStore()` isn't a specified part of the interface of `CryptoSuite`, only of the default `CryptoSuite_ECDSA_AES` implementation, which is a configurable default, so I could change a config file and the code would become wrong. I kind of intuit that if I pass `{algorithm: 'EC'}` in my `CryptoSettings`, I'll get that particular concrete base class back, but again it's configurable in a way not specified and I'm only sure because I looked at the source code. Is there a use case for me mapping 'EC' to something other than the ECSDSA implementation? Ideally, if the ECSDSA implementation is guaranteed to be available, I'd like a guaranteed way of getting my hands on it, but it isn't publicly accessible to me. Overall, I concede these are pretty nit-picky, but they were the things that made a simple thing relatively complicated in this case. I'd expect a simple configuration issue like, "Change the directory you draw your creds from" to have a straightforward answer in the docs, but instead there was a lot of guessing and checking and needing to gain a lot of global understanding of how the system fits together to follow all the mappings to mappings at a distance.

jimthematrix (Tue, 12 Sep 2017 19:28:16 GMT):
@nhrishi have you made sure the app is able to reach the peer by that IP address? Is that a public IP or one in the same private network

jimthematrix (Tue, 12 Sep 2017 20:49:55 GMT):
@hamptonsmith thanks for taking the time to write up this fantastic feedback. Let me call the attention of @bretharrison so these issues can be tracked and further investigated

jimthematrix (Tue, 12 Sep 2017 21:07:14 GMT):
the reason setCryptoStore() was not part of the API was that some implementation like an HSM based does not need a crypto key store

nhrishi (Wed, 13 Sep 2017 04:04:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ANBBKgrdoPxcx7B2H) @jimthematrix Jim, it's in the same private Network. I did check it's accessible. But App doesn't connect to the peer. We did check the data traffic on the peer port and it looks good. But somehow peer log doesn't show any transaction receival.

DarshanBc (Wed, 13 Sep 2017 10:08:19 GMT):
can Anybody explain `var ORGS = hfc.getConfigSetting('network-config');` `var channel = hfc.getConfigSetting('channelName');` this line I read the document but couldn't understand from where value of network-config and channelName is assigned

MRobinson (Wed, 13 Sep 2017 11:24:14 GMT):
Has joined the channel.

hamptonsmith (Wed, 13 Sep 2017 13:56:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AqQvzi5sLeFTnbKBp) @DarshanBc Relevant documentation here: https://fabric-sdk-node.github.io/BaseClient.html#.getConfigSetting

DarshanBc (Wed, 13 Sep 2017 13:57:13 GMT):
@hamptonsmith I read that but with relavant to balance transfer I couldnt understand how ORGS and channel var is set

hamptonsmith (Wed, 13 Sep 2017 14:01:57 GMT):
@DarshanBc Note in `app.js`, both `config.json` and `app/network-config.json` are added as config files. 'network-config' is drawn from the `app/network-config.json` config file and `channelName` is drawn from the `config.json` config file.

hamptonsmith (Wed, 13 Sep 2017 14:03:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qy5hr4tcDbNbmJMyA) @hamptonsmith This corresponds to number 4 in the documentation: ``` Custom Files: all files added with addConfigFile(path) will be ordered by when added, where same settings in the files added later will override those added earlier ```

AryaGhodsi (Wed, 13 Sep 2017 14:41:55 GMT):
Has joined the channel.

hamptonsmith (Wed, 13 Sep 2017 16:09:08 GMT):
I'm trying to understand a failure mode I'm seeing: if I submit a transaction proposal from a user in org1 to the org1 endorser, I get back an accepted transaction, which I then send to the orderer and eventual success. Ditto for a user in org2 and the org2 endorser. But if I send a transaction proposal from a user in org2 to the endorser for *org1* (note mismatch!), I get back an accepted transaction, which I then send to the orderer and get a timeout. Looking at the orderer logs, it looks like the submission to the orderer is succeeding on the backend? Without a whole lot of digging yet, the problem seems to be client side. Thoughts on what might be going on here?

hamptonsmith (Wed, 13 Sep 2017 16:10:49 GMT):
(I don't actually need a fix as I don't care about this functionality, but clearly my understanding of something is broken and I'd like to understand better.)

Luxii (Thu, 14 Sep 2017 08:59:19 GMT):
Hey guys, Im trying to create a network with 7 peers and 1 org .... So far in the network i can enroll a user and can create a channel but an error occurs everytime peers try to join the network ```[2017-09-14 14:24:01.817] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } (node:29078) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'stack' of undefined ```

Luxii (Thu, 14 Sep 2017 08:59:19 GMT):
Hey guys, Im trying to create a network with 7 peers and 1 org .... So far in the network i can enroll a user and can create a channel but an error occurs everytime peers try to join the network ```[2017-09-14 14:28:01.785] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Cannot create ledger from genesis block, due to LedgerID already exists) at /home/lakshay/Desktop/hyperledger/fabric-samples/7peersagain/node_modules/grpc/src/node/src/client.js:434:17 (node:29078) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'stack' of undefined ```

eetti (Thu, 14 Sep 2017 11:07:37 GMT):
Hi All, what changes should I make on my node App, so the I can create/join channel on HLF 1.0.1. I used the same code the was written for HLF 1.0.0 but it doesn't work.

Luxii (Thu, 14 Sep 2017 11:14:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Cv6QZWf6GSEzvgMno) @Luxii I'm using balance transfer application here

bretharrison (Thu, 14 Sep 2017 12:47:25 GMT):
@hamptonsmith Do you know where the timeout is coming from, is it the timer set on the actual Orderer submission of the transaction or is it from the timer set to monitor for the event that should be posted when a Peer has committed the transaction.

bretharrison (Thu, 14 Sep 2017 12:48:45 GMT):
@Luxii Looks like there is a problem with NodeSDK not handling gracefully an error returned by the Peer, are you able to see the Peer log ?

bretharrison (Thu, 14 Sep 2017 12:50:25 GMT):
@eetti What time of errors are you seeing

hamptonsmith (Thu, 14 Sep 2017 14:25:30 GMT):
@bretharrison Uncertain. The last few bit of logging + stdout: ``` debug: [Orderer.js]: sendBroadcast - on data response: {"status":"SUCCESS"} debug: [Orderer.js]: sendBroadcast - resolve with SUCCESS debug: [Orderer.js]: sendBroadcast - on end: debug: [EventHub.js]: _disconnect - start -- called due to:: EventHub has been shutdown debug: [EventHub.js]: _closeAllCallbacks - start debug: [EventHub.js]: _closeAllCallbacks - blockOnErrors 0 debug: [EventHub.js]: _closeAllCallbacks - transactionOnErrors 0 debug: [EventHub.js]: _closeAllCallbacks - chaincodeRegistrants 0 Failed to send transaction and get notifications within the timeout period. Failed to order the transaction. Error code: undefined ``` I've not personally set any timeouts in the client code, but I've adapted my config files from the fabcar example and I see `jwt_expiretime: 36000` and `eventWaitTime: 30000` in there. Certainly this timeout is not taking 30 seconds, though. Comes back after four or five seconds max.

bretharrison (Thu, 14 Sep 2017 14:27:14 GMT):
@hamptonsmith check the peer logs ... it may show an issue with the event registration

hamptonsmith (Thu, 14 Sep 2017 14:36:48 GMT):
@bretharrison ``` 14:20:54 [36m2017-09-14 14:20:54.595 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 1853 [0m Entry 14:20:54 [36m2017-09-14 14:20:54.595 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 1854 [0m Channel [bwbcchannel]: Block event for block number [88] contains transaction id: 4968ae273d93bfc638c4322ac5dd4a0ccce9273b9cda6047f35cc950a3925580 14:20:54 2017-09-14 14:20:54.595 UTC [eventhub_producer] SendProducerBlockEvent -> INFO 1855 [0m Channel [bwbcchannel]: Sending event for block number [88] 14:20:54 [36m2017-09-14 14:20:54.595 UTC [eventhub_producer] Send -> DEBU 1856 [0m Entry 14:20:54 [36m2017-09-14 14:20:54.595 UTC [eventhub_producer] Send -> DEBU 1857 [0m Event processor timeout > 0 14:20:54 [36m2017-09-14 14:20:54.595 UTC [eventhub_producer] Send -> DEBU 1858 [0m Event sent successfully 14:20:54 [36m2017-09-14 14:20:54.595 UTC [eventhub_producer] Send -> DEBU 1859 [0m Exit 14:20:54 [36m2017-09-14 14:20:54.595 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 185a [0m Exit ``` I read that as event sent ok. Certainly I don't see anything talking about an error or a failure above this (though it's very dense, so I could have missed it.)

bretharrison (Thu, 14 Sep 2017 14:39:38 GMT):
@hamptonsmith I will investigate on my own setup

hamptonsmith (Thu, 14 Sep 2017 14:39:55 GMT):
@bretharrison Appreciate it!

bretharrison (Thu, 14 Sep 2017 16:13:58 GMT):
@hamptonsmith you may wish to add an error callback function to your event registration. Notice in the `test/integration/e2e/e2eUtils.js` line 547. The callback is the only mechanism for the Peer's eventhub to report problems back to the caller.

acloudfan (Thu, 14 Sep 2017 16:21:26 GMT):
Has joined the channel.

jrosmith (Thu, 14 Sep 2017 18:52:14 GMT):
@eetti what does you code for creating/joining a channel look like? I've used the same codebase since 1.0.0 and its been working through 1.0.1 and 1.0.2

eetti (Thu, 14 Sep 2017 20:17:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nYFSoh2oNjA6R4qxS) @jrosmith It looks more like balance transfer. One question, is there a different configtxgen/crypyogen tool that you used? The error I get is BAD request from the peers when I try to create a channel from the nodeJS app. I haven't been able to pass that stage.

Asara (Thu, 14 Sep 2017 20:34:32 GMT):
@eetti @jrosmith and I have been updating the configtxgen/cryptogen tools, and at times not updating the sdk itself. Can't say i've tried the updated sdk against an old version of cryptogen/configtx

eetti (Thu, 14 Sep 2017 20:36:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uoga4kCkhssiXvFFC) @Asara That could be the reason, I haven't updated the configtxgen/cryptogen tools I have been using. I will give that a try. Thanks

jimthematrix (Thu, 14 Sep 2017 22:27:05 GMT):
@hamptonsmith when you sent the tx to the orderer from org2, how did you set up the eventhub? i assume your eh was hooked up to peer in org2? was the log above from org2 peer?

Luxii (Fri, 15 Sep 2017 06:18:35 GMT):
@bretharrison So i updated my binaries and samples again Im getting the same error again ``` [2017-09-15 11:48:09.044] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-09-15 11:48:09.053] [ERROR] Join-Channel - TypeError: Cannot read property 'peer1' of undefined at newRemotes (/home/lakshay/Desktop/network/fabric-samples/7peers/app/helper.js:110:26) at Object.newPeers (/home/lakshay/Desktop/network/fabric-samples/7peers/app/helper.js:147:9) at helper.getOrgAdmin.then.then (/home/lakshay/Desktop/network/fabric-samples/7peers/app/join-channel.js:70:20) at process._tickCallback (internal/process/next_tick.js:103:7) [2017-09-15 11:48:09.053] [DEBUG] Join-Channel - !!!!!!!! ERROR: Join Channel FAILED !!!!!!!! [2017-09-15 11:48:09.053] [DEBUG] Join-Channel - (node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: TypeError: Cannot read property 'peer1' of undefined at newRemotes (/home/lakshay/Desktop/network/fabric-samples/7peers/app/helper.js:110:26) at Object.newPeers (/home/lakshay/Desktop/network/fabric-samples/7peers/app/helper.js:147:9) at helper.getOrgAdmin.then.then (/home/lakshay/Desktop/network/fabric-samples/7peers/app/join-channel.js:70:20) at process._tickCallback (internal/process/next_tick.js:103:7) ```

Luxii (Fri, 15 Sep 2017 06:19:28 GMT):
docker logs : ``` orderer.example.com | 2017-09-15 06:18:09.047 UTC [cauthdsl] func2 -> DEBU 721 0xc42007e428 principal evaluation succeeds for identity 0 orderer.example.com | 2017-09-15 06:18:09.047 UTC [cauthdsl] func1 -> DEBU 722 0xc42007e428 gate 1505456289046609401 evaluation succeeds orderer.example.com | 2017-09-15 06:18:09.047 UTC [orderer/common/sigfilter] Apply -> DEBU 723 Forwarding validly signed message for policy &{%!s(*common.ImplicitMetaPolicy=&{Readers 0}) %!s(int=1) [%!s(*policies.implicitMetaPolicy=&{0xc420bec8a0 1 [0xc42007e110]}) %!s(*policies.implicitMetaPolicy=&{0xc420becda0 1 [0xc42007e310]})]} orderer.example.com | 2017-09-15 06:18:09.047 UTC [orderer/common/deliver] Handle -> DEBU 724 [channel: mychannel] Received seekInfo (0xc42019fc40) start: > stop: > orderer.example.com | 2017-09-15 06:18:09.047 UTC [fsblkstorage] retrieveBlockByNumber -> DEBU 725 retrieveBlockByNumber() - blockNum = [0] orderer.example.com | 2017-09-15 06:18:09.047 UTC [fsblkstorage] newBlockfileStream -> DEBU 726 newBlockfileStream(): filePath=[/var/hyperledger/production/orderer/chains/mychannel/blockfile_000000], startOffset=[0] orderer.example.com | 2017-09-15 06:18:09.047 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 727 Remaining bytes=[9282], Going to peek [8] bytes orderer.example.com | 2017-09-15 06:18:09.047 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 728 Returning blockbytes - length=[9280], placementInfo={fileNum=[0], startOffset=[0], bytesOffset=[2]} orderer.example.com | 2017-09-15 06:18:09.047 UTC [orderer/common/deliver] Handle -> DEBU 729 [channel: mychannel] Delivering block for (0xc42019fc40) orderer.example.com | 2017-09-15 06:18:09.047 UTC [orderer/common/deliver] Handle -> DEBU 72a [channel: mychannel] Done delivering for (0xc42019fc40), waiting for new SeekInfo orderer.example.com | 2017-09-15 06:18:09.047 UTC [orderer/common/deliver] Handle -> DEBU 72b Attempting to read seek info message orderer.example.com | 2017-09-15 06:18:09.051 UTC [orderer/common/deliver] Handle -> DEBU 72c Received EOF, hangup orderer.example.com | 2017-09-15 06:18:09.051 UTC [orderer/main] func1 -> DEBU 72d Closing Deliver stream ```

Amber.Zhang (Fri, 15 Sep 2017 08:41:13 GMT):
Has joined the channel.

Amber.Zhang (Fri, 15 Sep 2017 08:47:04 GMT):
Hi, I tried to run "node fabric-sdk-node/test/integration/e2e/create-channel.js channel=testChannel", but got message "error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST not ok 9 Error: BAD_REQUEST at ClientDuplexStream. (/home/ibmadmin/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/ibmadmin/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:299:14).

Amber.Zhang (Fri, 15 Sep 2017 08:48:06 GMT):
I checked the orderer log and see the error "[orderer/common/broadcast] Handle -> WARN b55 Rejecting CONFIG_UPDATE because: Failing initial channel config creation: mismatched channel IDs: 'mychannel' != 'testChannel'"

Amber.Zhang (Fri, 15 Sep 2017 08:48:50 GMT):
not sure how to change the create-channel.js to create more channels except 'mychannel'

Amber.Zhang (Fri, 15 Sep 2017 08:49:16 GMT):
'mychannel' can be created successfully

bretharrison (Fri, 15 Sep 2017 10:11:05 GMT):
@Luxii Please check your code to see why there is an undefined object

Luxii (Fri, 15 Sep 2017 10:12:00 GMT):
Im using balance transfer application

bretharrison (Fri, 15 Sep 2017 10:17:54 GMT):
@Luxii Would you be able to dig into the sample code to help locate the issue

Luxii (Fri, 15 Sep 2017 10:20:06 GMT):
Balance transfer application is working fine with its own network

bretharrison (Fri, 15 Sep 2017 11:17:31 GMT):
@Amber.Zhang Here are some options https://fabric-sdk-node.github.io/tutorial-channel-create.html http://hyperledger-fabric.readthedocs.io/en/latest/configtx.html?highlight=configtx

jimthematrix (Fri, 15 Sep 2017 13:14:41 GMT):
@Luxii the kind of problem you are seeing is difficult to pinpoint without more involved actions, you need to do some debugging on your own: https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27

Luxii (Fri, 15 Sep 2017 13:19:22 GMT):
@jimthematrix aim here is not to debug the node application (cause its one of the fabric sample application) but to test whether the custom network that i have created is working fine or not

Luxii (Fri, 15 Sep 2017 13:19:22 GMT):
@jimthematrix Thanks for your response , aim here is not to debug the node application (cause its one of the fabric sample application) but to test whether the custom network that i have created is working fine or not

jimthematrix (Fri, 15 Sep 2017 13:22:12 GMT):
speaking from experience, debugging the client app can often expose problems in the backend network

jimthematrix (Fri, 15 Sep 2017 13:22:46 GMT):
since your error is manifested as an `undefined` variable in the app, best way to proceed is debug the app

Luxii (Fri, 15 Sep 2017 13:34:21 GMT):
Okay, I'll debug the app then

asamk (Fri, 15 Sep 2017 20:09:52 GMT):
[Hi @SanketPanchamia, will you be able to provide the sample config and steps for the distributed network. Thanks](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=T6tiA635XJTqdXpRh) @SanketPanchamia

greg.haskins (Fri, 15 Sep 2017 20:11:06 GMT):
@jimthematrix I assume this: https://fabric-sdk-node.github.io/Client.html#queryInstalledChaincodes__anchor

greg.haskins (Fri, 15 Sep 2017 20:11:46 GMT):
only returns items that were installed...is there a similar query to tell if a chaincode is instantiated?

Arindam (Fri, 15 Sep 2017 20:14:01 GMT):
Hi All, I am able to deploy the BNA file to one of the peer. But the other peer is able to join the channel, but can not deploy on the 2nd peer. It is giving error like : Error: Error trying install chaincode. Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority I am using CA server no TLS is used

bretharrison (Fri, 15 Sep 2017 22:57:18 GMT):
@greg.haskins instantiated Chaincode are on a channel , so the API is on the channel https://fabric-sdk-node.github.io/Channel.html#queryInstantiatedChaincodes__anchor

greg.haskins (Fri, 15 Sep 2017 23:07:58 GMT):
@bretharrison that is logical, thank you!

Amber.Zhang (Sun, 17 Sep 2017 15:58:30 GMT):
@bretharrison Thanks for your sharing the doc! it's very helpful!

luke16 (Mon, 18 Sep 2017 01:23:41 GMT):
Has joined the channel.

pd93 (Mon, 18 Sep 2017 08:26:18 GMT):
I keep getting this back from the Node SDK ``` Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/eqdlt/eq-trader/app/node_modules/fabric-client/lib/Peer.js:100:19) ``` I think the root cause is that my CouchDB queries are taking too long due to a lack of indexing.. but I was wondering how I'd adjust the timeout for these requests

pd93 (Mon, 18 Sep 2017 08:26:18 GMT):
I keep getting this back from the Node SDK ```Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/eqdlt/eq-trader/app/node_modules/fabric-client/lib/Peer.js:100:19) ``` I think the root cause is that my CouchDB queries are taking too long due to a lack of indexing.. but I was wondering how I'd adjust the timeout for these requests

pd93 (Mon, 18 Sep 2017 08:26:18 GMT):
I keep getting this back from the Node SDK ```Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/eqdlt/eq-trader/app/node_modules/fabric-client/lib/Peer.js:100:19)``` I think the root cause is that my CouchDB queries are taking too long due to a lack of indexing.. but I was wondering how I'd adjust the timeout for these requests

pd93 (Mon, 18 Sep 2017 08:26:18 GMT):
I keep getting this back from the Node SDK ```Error: REQUEST_TIMEOUT at Timeout._onTimeout (...../node_modules/fabric-client/lib/Peer.js:100:19)``` I think the root cause is that my CouchDB queries are taking too long due to a lack of indexing.. but I was wondering how I'd adjust the timeout for these requests

RezwanKabir (Mon, 18 Sep 2017 11:08:51 GMT):
in Balance Transfer examle I found install chaincode method ... Is there any upgrade method ? Can someone guide me ?

RezwanKabir (Mon, 18 Sep 2017 11:08:51 GMT):
in Balance Transfer examle I found install chaincode method ... Is there any upgrade chaincode method ? Can someone guide me ?

jarvis26 (Mon, 18 Sep 2017 11:21:50 GMT):
Has joined the channel.

bretharrison (Mon, 18 Sep 2017 16:22:47 GMT):
@RezwanKabir To upgrade chaincode, the first step would be to install the code on the peer, notice that the `installChaincode` method of the client has a version in the request object, so install a new version of the code using the same method used to install the previous version's code, just change the version string. Then use the `sendUpgradeProposal` method of the channel to send the proposal to the peers. The final step is also the same of sending the Order the transaction with `sendTransaction` method of the channel.

bretharrison (Mon, 18 Sep 2017 16:43:46 GMT):
@pd93 Set the request timeout configuration setting to higher value `Client.setConfigSetting('request-timeout', 60000);`

pd93 (Mon, 18 Sep 2017 16:46:07 GMT):
@bretharrison Perfect. Thank you :)

chunhui (Tue, 19 Sep 2017 02:55:59 GMT):
``` init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - policy name: Readers init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - version: 0 init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - mod_policy: Admins init-box_1 | debug: [Channel.js]: loadPolicy - base.Orderer.OrdererOrg - name: Readers - unable to parse policy TypeError: Cannot read property 'decodeSignaturePolicy' of undefined init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - policy name: Writers init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - version: 0 init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - mod_policy: Admins init-box_1 | debug: [Channel.js]: loadPolicy - base.Orderer.OrdererOrg - name: Writers - unable to parse policy TypeError: Cannot read property 'decodeSignaturePolicy' of undefined init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - policy name: Admins init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - version: 0 init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer.OrdererOrg - mod_policy: Admins init-box_1 | debug: [Channel.js]: loadPolicy - base.Orderer.OrdererOrg - name: Admins - unable to parse policy TypeError: Cannot read property 'decodeSignaturePolicy' of undefined init-box_1 | debug: [Channel.js]: loadConfigGroup - base.Orderer.OrdererOrg - << policies init-box_1 | debug: [Channel.js]: loadConfigGroup - base.Orderer.OrdererOrg - < group init-box_1 | debug: [Channel.js]: loadConfigGroup - base.Orderer - << groups init-box_1 | debug: [Channel.js]: loadConfigGroup - base.Orderer - >> values init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - value name: BatchTimeout init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - version: 0 init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - mod_policy: Admins init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - name: BatchTimeout - *** unable to parse with error :: TypeError: Cannot set property 'BatchTimeout' of undefined init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - value name: ChannelRestrictions init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - version: 0 init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - mod_policy: Admins init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - name: ChannelRestrictions - *** unable to parse with error :: TypeError: Cannot set property 'ChannelRestrictions' of undefined init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - value name: ConsensusType init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - version: 0 init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - mod_policy: Admins init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - name: ConsensusType - *** unable to parse with error :: TypeError: Cannot set property 'ConsensusType' of undefined init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - value name: BatchSize init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - version: 0 init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - mod_policy: Admins init-box_1 | debug: [Channel.js]: loadConfigValue - base.Orderer - name: BatchSize - *** unable to parse with error :: TypeError: Cannot set property 'BatchSize' of undefined init-box_1 | debug: [Channel.js]: loadConfigGroup - base.Orderer - << values init-box_1 | debug: [Channel.js]: loadConfigGroup - base.Orderer - >> policies init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer - policy name: Writers init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer - version: 0 init-box_1 | debug: [Channel.js]: loadConfigPolicy - base.Orderer - mod_policy: Admins init-box_1 | debug: [Channel.js]: loadPolicy - base.Orderer - policy IMPLICIT_META :: ANY Writers ``` ... Would someone help to see, if the above log coming out from a deployment container (using fabric-sdk-node v1.0.0), are these errors something to worry about?

qiang0723 (Tue, 19 Sep 2017 03:29:04 GMT):
Has joined the channel.

SanketPanchamia (Tue, 19 Sep 2017 05:37:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TjfR7bZXa3QLpZFcF) @asamk Hi I will do so but will take some time since i am stuck with deadlines. Its on my mind

SanketPanchamia (Tue, 19 Sep 2017 05:51:15 GMT):

Message Attachments

SanketPanchamia (Tue, 19 Sep 2017 05:51:22 GMT):
i have a weird problem that i am facing with the node app running for a distributed system. So i deploy the services on the two VMs that i have and run the test cases end to end. All works fine and all transactions are executed. I have made my jwt token to not expire ever for testing purposes. Then after the system is idle for some time, i use the same token to query the ledger and i get this attached error. Then I purposely sent a bad query request (missing fcn parameter) which gave me the error that "fcn is missing". Then i added back again and then the query worked. So all in all, after the system is idle for a while, i need to send a bad request before sending a good request to be able to get it to work. Not sure if anyone has faced this issue or have any pointers @Vadim @zhasni @jimthematrix

SanketPanchamia (Tue, 19 Sep 2017 05:59:15 GMT):

Message Attachments

SanketPanchamia (Tue, 19 Sep 2017 05:59:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=M72DDwkaono2KhWsM) @SanketPanchamia The peer logs says this

CodeReaper (Tue, 19 Sep 2017 06:00:43 GMT):
Hi there, I want to make a mobile app as front-end, followed by APIs in nodejs to interact with my smart-contracts. I was wondering how I can save my mobile app itself and not on the default key-value store in config.json of nodejs such as in balance-transfer example. And then I would like to like my transactions to be signed in that application with keys present inside. I do feel this is the wrong approach but I also can't have N number of Nodejs instances for every user. Any directions?

bh4rtp (Tue, 19 Sep 2017 06:49:23 GMT):
Hi, I noticed that `app/network-config-aws.json` was added to `fabric-samples/balance-transfer`. what is the use of this configuration file?

SanketPanchamia (Tue, 19 Sep 2017 07:08:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4XTNpbDA7R6nC7arK) @bh4rtp That file is an example if you have to deploy the balance transfer to AWS. truly distributed

bh4rtp (Tue, 19 Sep 2017 07:16:34 GMT):
@SanketPanchamia thanks.

SanketPanchamia (Tue, 19 Sep 2017 07:17:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HN3rmwDm85LFJXRvL) @bh4rtp If you are trying to run on AWS, make sure you create certificates with the correct hostnames (public IP) else it wont work.

bh4rtp (Tue, 19 Sep 2017 07:18:21 GMT):
@SanketPanchamia Ok, I will try.

bh4rtp (Tue, 19 Sep 2017 07:35:32 GMT):
It seems that the latest node sdk doesn't support `balance-transfer` example. I changed `package.json` to use local v1.0.2 sdk, and it failed to run `runApp.sh`. It is ok to use v1.0.0 sdk as `balance-transfer` configured.

bh4rtp (Tue, 19 Sep 2017 08:02:28 GMT):
I have changed `"jwt_expiretime": "90000"` in the `config.json`. Why does the sdk report expire error: ```error: [Peer.js]: sendProposal - timed out after:45000```

bh4rtp (Tue, 19 Sep 2017 08:21:33 GMT):
I found the answer, the expire time should be set in the `fabric_client/config/default.json`.

bh4rtp (Tue, 19 Sep 2017 08:43:20 GMT):
Does instantiate chaincode need specify the function name? Here is the output of `balance-transfer`: ```[2017-09-19 16:29:32.945] [DEBUG] SampleWebApp - Decoded from JWT token: username - Jim, orgname - org1 [2017-09-19 16:29:32.946] [DEBUG] SampleWebApp - ==================== INSTANTIATE CHAINCODE ================== [2017-09-19 16:29:32.946] [DEBUG] SampleWebApp - channelName : mychannel [2017-09-19 16:29:32.946] [DEBUG] SampleWebApp - chaincodeName : mycc [2017-09-19 16:29:32.947] [DEBUG] SampleWebApp - chaincodeVersion : v0 [2017-09-19 16:29:32.947] [DEBUG] SampleWebApp - fcn : undefined [2017-09-19 16:29:32.948] [DEBUG] SampleWebApp - args : a,100,b,200 [2017-09-19 16:29:32.948] [DEBUG] instantiate-chaincode - ============ Instantiate chaincode on organization org1 ============ ``` Does `fcn : undefined` mean it should be given `"fcn": "Init"`?

SanketPanchamia (Tue, 19 Sep 2017 08:49:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cupSaxKCzF946iMYd) @bh4rtp i think its init and not Init and yes its a required parameter.

SanketPanchamia (Tue, 19 Sep 2017 08:50:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AMDRxNRvmwBFfqJiG) @bh4rtp There is a way to make the jwt token not expired if you want to do that. In app.js there is a line exp: Math.floor(Date.now() / 1000) + parseInt(config.jwt_expiretime) . Just comment this out

RezwanKabir (Tue, 19 Sep 2017 10:19:16 GMT):
@bretharrison After `sendUpgradeProposal` new container is created with same chaincode and with different version no. It seems ok. But when I invoke any method it executes previous version function. Am I missing something?

bretharrison (Tue, 19 Sep 2017 10:44:01 GMT):
@RezwanKabir might be another docker container from a previous attempt, check your active containers `docker ps -a`. Remove all the active instances with a `docker ps -a | grep "dev-" | awk '{print $1}' | xargs docker rm -f` command. And or remove all docker images that start with the `dev-` name, you will notice them when you do a a `docker images` command and can removed with a `docker images | grep "dev-" | awk '{print $3}' | xargs docker rmi -f` command.

bretharrison (Tue, 19 Sep 2017 11:27:42 GMT):
@chunhui do not worry about those errors, they are from a parsing issue of channel information used only for debug

pd93 (Tue, 19 Sep 2017 20:29:10 GMT):
Hey, When I take my network down, my app exits with the error below.. How can I catch this? I'd like my app to be able to handle this gracefully ```{ Error: Endpoint read failed at ClientDuplexStream._emitStatusIfDone (...../node_modules/grpc/src/node/src/client.js:201:19) at ClientDuplexStream._readsDone (...../node_modules/grpc/src/node/src/client.js:169:8) at readCallback (...../node_modules/grpc/src/node/src/client.js:242:12) code: 14, metadata: Metadata { _internal_repr: {} } }```

DarshanBc (Wed, 20 Sep 2017 04:33:34 GMT):
Is there any client available in node to access UTXO transaction?

DarshanBc (Wed, 20 Sep 2017 04:33:34 GMT):
Is there any client available in node to access UTXO chaincode given here https://github.com/hyperledger/fabric/tree/release/examples/chaincode/go/utxo

SanketPanchamia (Wed, 20 Sep 2017 04:52:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ccqCtjJeNT345BzFu) @SanketPanchamia Anyone have any idea on this?

yoyokeen (Wed, 20 Sep 2017 08:34:00 GMT):
Has joined the channel.

yoyokeen (Wed, 20 Sep 2017 08:34:22 GMT):
```[2017-09-20 16:21:01.320] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at /opt/fe/fabric-explorer/node_modules/grpc/src/node/src/client.js:554:15 error: [Channel.js]: Failed Query channel info. Error: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority```

yoyokeen (Wed, 20 Sep 2017 08:34:36 GMT):
can u help me, what's the problem?

SanketPanchamia (Wed, 20 Sep 2017 08:44:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ePxFoLQRq3GkKngEj) @yoyokeen Certificates are not proper

yoyokeen (Wed, 20 Sep 2017 08:45:52 GMT):
Yes. I use the SDK e2e, and the cryto is the same to SDK e2e.

yoyokeen (Wed, 20 Sep 2017 08:46:30 GMT):
I dont know I arise the error, and how to fix it?

SanketPanchamia (Wed, 20 Sep 2017 08:47:03 GMT):
Try running the balance transfer example. Have you generated the certificates or using the ones on github?

yoyokeen (Wed, 20 Sep 2017 08:48:14 GMT):
Yes, generated.

yoyokeen (Wed, 20 Sep 2017 08:48:16 GMT):
tree crypto-config

yoyokeen (Wed, 20 Sep 2017 08:48:50 GMT):
```crypto-config ├── ordererOrganizations │   └── example.com │   ├── ca │   │   ├── ca.example.com-cert.pem │   │   └── e575398eaf2f0d475ba89f568c49f57013af938c157756c0654b94e59240b8fe_sk │   ├── msp │   │   ├── admincerts │   │   │   └── Admin@example.com-cert.pem │   │   ├── cacerts │   │   │   └── ca.example.com-cert.pem │   │   └── tlscacerts │   │   └── ca.example.com-cert.pem │   ├── orderers │   │   └── orderer.example.com │   │   ├── msp │   │   │   ├── admincerts │   │   │   │   └── Admin@example.com-cert.pem │   │   │   ├── cacerts │   │   │   │   └── ca.example.com-cert.pem │   │   │   ├── keystore │   │   │   │   └── 30652478a0678558e8573fa33246175b33997226b63fa40503290187e0f99144_sk │   │   │   ├── signcerts │   │   │   │   └── orderer.example.com-cert.pem │   │   │   └── tlscacerts │   │   │   └── ca.example.com-cert.pem │   │   └── tls │   │   ├── ca.crt │   │   ├── server.crt │   │   └── server.key │   ├── tlsca │   │   ├── 79dc874966cf161d08dba71a5904e8b2b25615831de12e7293146987b7c3325b_sk │   │   └── tlsca.example.com-cert.pem │   └── users │   └── Admin@example.com │   ├── msp │   │   ├── admincerts │   │   │   └── Admin@example.com-cert.pem │   │   ├── cacerts │   │   │   └── ca.example.com-cert.pem │   │   ├── keystore │   │   │   └── f1a9a940f57419a18a83a852884790d59b378281347dd3d4a88c2b820a0f70c9_sk │   │   ├── signcerts │   │   │   └── Admin@example.com-cert.pem │   │   └── tlscacerts │   │   └── ca.example.com-cert.pem │   └── tls │   ├── ca.crt │   ├── server.crt │   └── server.key ```

yoyokeen (Wed, 20 Sep 2017 08:49:06 GMT):
```── peerOrganizations ├── org1.example.com │   ├── ca │   │   ├── ca.org1.example.com-cert.pem │   │   └── fcf776b02a05600408d0be9d9752afc59f64950b721cacb363b5b95a0fea6216_sk │   ├── msp │   │   ├── admincerts │   │   │   └── Admin@org1.example.com-cert.pem │   │   ├── cacerts │   │   │   └── ca.org1.example.com-cert.pem │   │   └── tlscacerts │   │   └── ca.org1.example.com-cert.pem │   ├── peers │   │   ├── peer0.org1.example.com │   │   │   ├── msp │   │   │   │   ├── admincerts │   │   │   │   │   └── Admin@org1.example.com-cert.pem │   │   │   │   ├── cacerts │   │   │   │   │   └── ca.org1.example.com-cert.pem │   │   │   │   ├── keystore │   │   │   │   │   └── 46c70c47d10e70d2a8a4711eb3b766d3621927ad045691dcd258fa9e93bc2c2c_sk │   │   │   │   ├── signcerts │   │   │   │   │   └── peer0.org1.example.com-cert.pem │   │   │   │   └── tlscacerts │   │   │   │   └── ca.org1.example.com-cert.pem │   │   │   └── tls │   │   │   ├── ca.crt │   │   │   ├── server.crt │   │   │   └── server.key │   │   └── peer1.org1.example.com │   │   ├── msp │   │   │   ├── admincerts │   │   │   │   └── Admin@org1.example.com-cert.pem │   │   │   ├── cacerts │   │   │   │   └── ca.org1.example.com-cert.pem │   │   │   ├── keystore │   │   │   │   └── 12201dec0f49b97542c6f0f50432c27797bed4aaecd12cf2e65ef617733b8d25_sk │   │   │   ├── signcerts │   │   │   │   └── peer1.org1.example.com-cert.pem │   │   │   └── tlscacerts │   │   │   └── ca.org1.example.com-cert.pem │   │   └── tls │   │   ├── ca.crt │   │   ├── server.crt │   │   └── server.key │   ├── tlsca │   │   ├── 418980b5f8d471909a4ce16b610957bf99e3ac4e7b9a3419125f7416d95bcffd_sk │   │   └── tlsca.org1.example.com-cert.pem │   └── users │   ├── Admin@org1.example.com │   │   ├── msp │   │   │   ├── admincerts │   │   │   │   └── Admin@org1.example.com-cert.pem │   │   │   ├── cacerts │   │   │   │   └── ca.org1.example.com-cert.pem │   │   │   ├── keystore │   │   │   │   └── 6b32e59640c594cf633ad8c64b5958ef7e5ba2a205cfeefd44a9e982ce624d93_sk │   │   │   ├── signcerts │   │   │   │   └── Admin@org1.example.com-cert.pem │   │   │   └── tlscacerts │   │   │   └── ca.org1.example.com-cert.pem │   │   └── tls │   │   ├── ca.crt │   │   ├── server.crt │   │   └── server.key │   └── User1@org1.example.com │   ├── msp │   │   ├── admincerts │   │   │   └── User1@org1.example.com-cert.pem │   │   ├── cacerts │   │   │   └── ca.org1.example.com-cert.pem │   │   ├── keystore │   │   │   └── f3c01db816069a226654d66a023c2260695f71e19b322a6564dad3e32ccf063b_sk │   │   ├── signcerts │   │   │   └── User1@org1.example.com-cert.pem │   │   └── tlscacerts │   │   └── ca.org1.example.com-cert.pem │   └── tls │   ├── ca.crt │   ├── server.crt │   └── server.key```

yoyokeen (Wed, 20 Sep 2017 08:49:21 GMT):
```└── org2.example.com ├── ca │   ├── b59bba37975dafcc4a93984aa01d3d29b64894617db9e0c9a2d486b5273cbd27_sk │   └── ca.org2.example.com-cert.pem ├── msp │   ├── admincerts │   │   └── Admin@org2.example.com-cert.pem │   ├── cacerts │   │   └── ca.org2.example.com-cert.pem │   └── tlscacerts │   └── ca.org2.example.com-cert.pem ├── peers │   ├── peer0.org2.example.com │   │   ├── msp │   │   │   ├── admincerts │   │   │   │   └── Admin@org2.example.com-cert.pem │   │   │   ├── cacerts │   │   │   │   └── ca.org2.example.com-cert.pem │   │   │   ├── keystore │   │   │   │   └── fc883e2b877cde763cf9926890b1e9077d0684b10608ee720208b68ad6bcd824_sk │   │   │   ├── signcerts │   │   │   │   └── peer0.org2.example.com-cert.pem │   │   │   └── tlscacerts │   │   │   └── ca.org2.example.com-cert.pem │   │   └── tls │   │   ├── ca.crt │   │   ├── server.crt │   │   └── server.key │   └── peer1.org2.example.com │   ├── msp │   │   ├── admincerts │   │   │   └── Admin@org2.example.com-cert.pem │   │   ├── cacerts │   │   │   └── ca.org2.example.com-cert.pem │   │   ├── keystore │   │   │   └── 3d44880d32a2611121dacdce9b30b96bc401f6b7ef2b9948cbbec0f2b4ffad94_sk │   │   ├── signcerts │   │   │   └── peer1.org2.example.com-cert.pem │   │   └── tlscacerts │   │   └── ca.org2.example.com-cert.pem │   └── tls │   ├── ca.crt │   ├── server.crt │   └── server.key ├── tlsca │   ├── 849fab79ac44554ffcff796c37b8059fda5c7b89804dc805e71b5eb24295d729_sk │   └── tlsca.org2.example.com-cert.pem └── users ├── Admin@org2.example.com │   ├── msp │   │   ├── admincerts │   │   │   └── Admin@org2.example.com-cert.pem │   │   ├── cacerts │   │   │   └── ca.org2.example.com-cert.pem │   │   ├── keystore │   │   │   └── b2e2536de633960859d965f02b296083d1e8aa1e868016417c4e4fb760270b96_sk │   │   ├── signcerts │   │   │   └── Admin@org2.example.com-cert.pem │   │   └── tlscacerts │   │   └── ca.org2.example.com-cert.pem │   └── tls │   ├── ca.crt │   ├── server.crt │   └── server.key └── User1@org2.example.com ├── msp │   ├── admincerts │   │   └── User1@org2.example.com-cert.pem │   ├── cacerts │   │   └── ca.org2.example.com-cert.pem │   ├── keystore │   │   └── 9f97934915db15db4c803b6eff5b6f4966bdef05d13f99e4d60c7128a6f22733_sk │   ├── signcerts │   │   └── User1@org2.example.com-cert.pem │   └── tlscacerts │   └── ca.org2.example.com-cert.pem └── tls ├── ca.crt ├── server.crt └── server.key ```

SanketPanchamia (Wed, 20 Sep 2017 08:53:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bxhLwS8xZNCabG4TH) @yoyokeen Have you updated the certificates in the docker compose yaml file?

yoyokeen (Wed, 20 Sep 2017 08:54:00 GMT):
so what's the problem?

SanketPanchamia (Wed, 20 Sep 2017 09:03:24 GMT):
If you have generated the certificates, then in the docker compose yaml file in the node app, you have to change the certificate names for FABRIC_CA_SERVER_CA_KEYFILE in the CA container of the docker file. For you it will be fcf776b02a05600408d0be9d9752afc59f64950b721cacb363b5b95a0fea6216_sk and b59bba37975dafcc4a93984aa01d3d29b64894617db9e0c9a2d486b5273cbd27_sk

pd93 (Wed, 20 Sep 2017 12:54:42 GMT):
Hey, When I take my network down, my app exits with the error below.. How can I catch this? I'd like my app to be able to handle this gracefully ```{ Error: Endpoint read failed at ClientDuplexStream._emitStatusIfDone (...../node_modules/grpc/src/node/src/client.js:201:19) at ClientDuplexStream._readsDone (...../node_modules/grpc/src/node/src/client.js:169:8) at readCallback (...../node_modules/grpc/src/node/src/client.js:242:12) code: 14, metadata: Metadata { _internal_repr: {} } }```

ashok.pannala (Thu, 21 Sep 2017 08:38:37 GMT):
Hi All,

ashok.pannala (Thu, 21 Sep 2017 08:45:41 GMT):
Hi All, I have a requirement that, any number of customers can log into one company site and they will upload some documents for identity proofs, And the company can verify the documents by opening and accepts if documents are fine otherwise reject of documents are fake. When the user login again into the site, he has to see whether the uploaded docs are approved/rejected by company. How do we achieve this requirement in hyperledger fabric 1.0 and How the user details are restricted from other users even though we are using distributed ledger? Can anyone suggest me the solutions for this?

Luxii (Thu, 21 Sep 2017 08:56:09 GMT):
I'm trying to use registerChaincodeEvent() here : ```var chaincodeEvents = helper.newEventHubs(peerNames, org); for(let key in chaincodeEvents) { let ehe = chaincodeEvents[key]; ehe.connect(); console.log('evnetHub2 : EHE'); console.log(ehe); var regID = ehe.registerChaincodeEvent(chaincodeName,'event',function(event){ console.log('chaincodeEvent'); console.log(util.format('chaincode event %j \n',event.payload.toString())); ehe.unregisterChaincodeEvent(regID); ehe.disconnect(); }); }```

Luxii (Thu, 21 Sep 2017 09:02:00 GMT):
But its not executing .... i dont even get *chaincodeEvent* printed on the console

mariogemoll (Thu, 21 Sep 2017 10:45:38 GMT):
I have a problem with my Fabric Node SDK client: I configure it with the settings for peers, orderer, user and channel (I always use it with the same configuration, ie Fabric user). I then have a client and a channel object and can use those to successfully query and invoke chaincode. However, if I just keep these around in my Node app and try to use them again after about 10 minutes, they don't work any more. I get the following error: ``` error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/app/node_modules/fabric-client/lib/Peer.js:107:19) at ontimeout (timers.js:469:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) ``` However, it's actually not the peer that's not responding any more, but the client. When I restart my node app, everything works again. Any ideas why this might be? Do I have to pay attention to something special if I want to reuse the client/channel object? Might the fact that my node app is running inside a docker container have anything to do with this? Any help would be appreciated!

MoulaliMvg (Thu, 21 Sep 2017 10:48:42 GMT):
@mariogemoll Increase timeout in nodemodules/fabric-client/config/default.json to 200000.

MoulaliMvg (Thu, 21 Sep 2017 10:48:49 GMT):
Try it once

mariogemoll (Thu, 21 Sep 2017 10:50:10 GMT):
again, the peer is responding, there is no request timeout, there is no request fired at all (it works perfectly once i restart the client)

mariogemoll (Thu, 21 Sep 2017 10:50:27 GMT):
and i wouldn't want to wait 200 secs for a response anyway :D

saptarshee (Thu, 21 Sep 2017 11:23:18 GMT):

Message Attachments

saptarshee (Thu, 21 Sep 2017 11:23:23 GMT):
I am getting an issue in the node js sdk.... it is happening abruptly andi am not able to understand why only at times this issue come

saptarshee (Thu, 21 Sep 2017 11:24:12 GMT):
It is cannot read property serialize of null, at Chain.js, buildTransactionID function

saptarshee (Thu, 21 Sep 2017 11:24:34 GMT):
I am running fabric-sdk-node v1.0.0-alpha

saptarshee (Thu, 21 Sep 2017 11:25:35 GMT):
So the transaction id is not built

saptarshee (Thu, 21 Sep 2017 11:28:09 GMT):
I have multiple nodejs instance running in the same system... and they all are being called from the application (the application is multithreaded, so transactions accross nodejs instance are simultaneous)

DannyWong (Thu, 21 Sep 2017 16:42:17 GMT):
Hi, is it possible to programmatically create CouchDB index/view in chaincode (e.g. putting it in init(), which will be called during first instantiation / subsequent version upgrade)? It is freaking stupid to apply the Couchdb index/view operationally... (What if I have 100 peers!?)

sam.doyle (Thu, 21 Sep 2017 17:41:43 GMT):
Has joined the channel.

sam.doyle (Thu, 21 Sep 2017 17:42:39 GMT):
I am trying to programmatically upgrade chaincode, but the sendUpgradeProposal code ends up looking for a chaincode with the name of the channel I'm calling it on, rather than the chaincodeId I pass in. Heres' my code: ``` const txId = client.newTransactionID(); var request = { targets: channel.getPeers(), txId, chaincodeId: chaincodeName, chaincodeVersion: chaincodeVersion }; channel.initialize().then(() => { return channel.sendUpgradeProposal(request); ``` I'm getting this error: ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: could not find chaincode with name 'fschannel') at /node_modules/grpc/src/node/src/client.js:554:15 error: upgrade proposal was bad ``` But fschannel is the name of the channel I called initialize and sendUpgradeProposal on, not the value I passed in the chaincodeId field. Shouldn't it search for chaincode matching the chaincodeId field, rather than the channel name? Am I doing something wrong?

bretharrison (Thu, 21 Sep 2017 23:28:14 GMT):
@ashok.pannala You may wish to ask your question on the `fabric` channel

bretharrison (Thu, 21 Sep 2017 23:34:26 GMT):
@Luxii You may wish to add another callback to your register command `ehe.registerChaincodeEvent(chaincodeName, 'event', , )` to see if there an issue with the registration. And have you checked the peer logs ?

bretharrison (Fri, 22 Sep 2017 00:18:26 GMT):
@mariogemoll You may wish to turn on debug logging `export HFC_LOGGING='{"debug":"console"}'`

bretharrison (Fri, 22 Sep 2017 00:42:26 GMT):
@sam.doyle I think there is a bug on the fabric side that presents the error. However there is an error in the request where the peer is not able to find the running chaincode by that name, is that possible ? You may wish to open a JIRA to track the error message issue.

yoyokeen (Fri, 22 Sep 2017 01:57:24 GMT):
how the get the Height of channel?

bertrand_sirodot (Fri, 22 Sep 2017 02:04:04 GMT):
Has joined the channel.

bertrand_sirodot (Fri, 22 Sep 2017 02:06:38 GMT):
Hi, I am trying to use the fabric-node-sdk and I am running into an issue. I have built a custom network without a CA authority. All of my certificates are stored in the crypto-config directory. I have looked at all the examples of using the sdk and all of them assume a fabric-ca-server to do the authentication. Could anyone walk me through how to do the user part of the sdk without a fabric-ca-server?

bertrand_sirodot (Fri, 22 Sep 2017 02:06:54 GMT):
Or does anybody have code snippet or could point me toward some code showing how to do this?

ArnabChatterjee (Fri, 22 Sep 2017 02:49:24 GMT):
Hi, I had an error in my chaincode and it did not propagate to a exception in the promise of my SDK. Although I got the following stacktrace in console `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: unexpected end of JSON input) at /home/ubuntu/app-network/app-server/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: unexpected end of JSON input) at /home/ubuntu/app-network/app-server/node_modules/grpc/src/node/src/client.js:434:17 ` Any clues @jimthematrix ? Thanks. :)

ArnabChatterjee (Fri, 22 Sep 2017 02:49:24 GMT):
Hi, I had an error in my chaincode and it did not propagate to a exception in the promise of my SDK. Although I got the following stacktrace in console error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: unexpected end of JSON input) at /home/ubuntu/app-network/app-server/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: unexpected end of JSON input) at /home/ubuntu/app-network/app-server/node_modules/grpc/src/node/src/client.js:434:17 Any clues @jimthematrix ? Thanks. :)

Luxii (Fri, 22 Sep 2017 04:41:36 GMT):
@bretharrison My event wasnt registering itself ... solved it now

kapilAtrey (Fri, 22 Sep 2017 04:58:18 GMT):
Has joined the channel.

knagware9 (Fri, 22 Sep 2017 07:39:42 GMT):
Has joined the channel.

knagware9 (Fri, 22 Sep 2017 07:40:37 GMT):
I am also getting this issue

knagware9 (Fri, 22 Sep 2017 07:40:41 GMT):
Hi, I had an error in my chaincode and it did not propagate to a exception in the promise of my SDK. Although I got the following stacktrace in console error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: unexpected end of JSON input) at /home/ubuntu/app-network/app-server/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: unexpected end of JSON input) at /home/ubuntu/app-network/app-server/node_modules/grpc/src/node/src/client.js:434:1

knagware9 (Fri, 22 Sep 2017 07:40:46 GMT):
please help me

knagware9 (Fri, 22 Sep 2017 07:43:24 GMT):

Message Attachments

RezwanKabir (Fri, 22 Sep 2017 09:54:24 GMT):
@sam.doyle I have solved the problem. Dont face any issue updating chaincode for balancetransfer project. you can knock me personally.

mna2017 (Fri, 22 Sep 2017 10:22:45 GMT):
Has joined the channel.

bretharrison (Fri, 22 Sep 2017 12:19:58 GMT):
@yoyokeen see https://fabric-sdk-node.github.io/Channel.html#queryInfo__anchor

jimthematrix (Fri, 22 Sep 2017 12:48:46 GMT):
@ksachdeva thanks for re-submitting the CR https://gerrit.hyperledger.org/r/#/c/13571/ for adding typescript declarations and e2e tests using TypeScript, please see my comments. if you have any questions please let me know

bretharrison (Fri, 22 Sep 2017 12:50:32 GMT):
@sam.doyle I have opened a JIRA for the message issue https://jira.hyperledger.org/browse/FAB-6267

bretharrison (Fri, 22 Sep 2017 13:24:29 GMT):
@bertrand_sirodot have a look at `test/unit/util.js` line 165

paul.sitoh (Fri, 22 Sep 2017 13:33:10 GMT):
Folks, why does npm fabric-ca-client not also pull down fabric-client, since the former is dependent on the other for GRPC module? What would be the point of having fabric-ca-client as an independent module if you still need to have fabric-client?

paul.sitoh (Fri, 22 Sep 2017 13:33:10 GMT):
Folks, why does npm fabric-ca-client not also pull down fabric-client, since the former is dependent on the other for GRPC module? What would be the point of having fabric-ca-client as an independent module if you still need to have fabric-client and only depends on that for GRPC?

bertrand_sirodot (Fri, 22 Sep 2017 15:00:26 GMT):
@bretharrison : thanks a lot . This is exactly what I was looking for. I had looked in many files for an example, but didn't look into this one. Thanks!!! :)

guruce (Fri, 22 Sep 2017 17:03:58 GMT):
Has joined the channel.

mauricio.salinas (Fri, 22 Sep 2017 17:21:23 GMT):
Has joined the channel.

muralisr (Sat, 23 Sep 2017 16:21:39 GMT):
https://chat.hyperledger.org/channel/chaincode-dev?msg=z8CL5kCGziM3jM9eT

sampath06 (Sun, 24 Sep 2017 01:54:23 GMT):
Has joined the channel.

MeenakshiSingh (Sun, 24 Sep 2017 06:48:36 GMT):
Has joined the channel.

MeenakshiSingh (Sun, 24 Sep 2017 06:52:42 GMT):
Hi..I am trying to setup a client to interact with my fabric network. I am following this sample `https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer`. My target network is in aws. Can anybody please help me on what certificates are required at my client machine and how to generate them. I am modifying the `network-config-aws.json` file.

MeenakshiSingh (Sun, 24 Sep 2017 14:41:12 GMT):
How can I run this `https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer` example for a tls disabled network?

MeenakshiSingh (Sun, 24 Sep 2017 14:46:58 GMT):
I am getting the following error upon starting the server with `PORT=4000 node app`

MeenakshiSingh (Sun, 24 Sep 2017 14:47:10 GMT):

Message Attachments

gentios (Sun, 24 Sep 2017 16:28:29 GMT):
Has joined the channel.

gentios (Sun, 24 Sep 2017 17:37:38 GMT):
Hi guys

gentios (Sun, 24 Sep 2017 17:37:46 GMT):
I have posted to the fabric-ca channel

gentios (Sun, 24 Sep 2017 17:38:06 GMT):
but I think that this question belongs and to this channel to if I am not wrong

gentios (Sun, 24 Sep 2017 17:38:23 GMT):
in the fabric-samples/ there is a folder called /creds

gentios (Sun, 24 Sep 2017 17:38:43 GMT):
and from NodeJs we link it like this

gentios (Sun, 24 Sep 2017 17:38:45 GMT):
`````` let options = { wallet_path: path.join(__dirname, "../creds"), user_id: "PeerAdmin", channel_id: "mychannel", chaincode_id: "fabcar", peer_url: "grpc://localhost:7051", event_url: "grpc://localhost:7053", orderer_url: "grpc://localhost:7050" };

gentios (Sun, 24 Sep 2017 17:38:58 GMT):
`````` let options = { wallet_path: path.join(__dirname, "../creds"), user_id: "PeerAdmin", channel_id: "mychannel", chaincode_id: "fabcar", peer_url: "grpc://localhost:7051", event_url: "grpc://localhost:7053", orderer_url: "grpc://localhost:7050" };

gentios (Sun, 24 Sep 2017 17:39:36 GMT):
so I have build a custom network, with custom docker-compose files and I

gentios (Sun, 24 Sep 2017 17:40:00 GMT):
I wanted to ask you guys, how to generate the files which are in the /creds folder for my custom network

gentios (Sun, 24 Sep 2017 17:40:25 GMT):
they are a Private Key, Public Key, and a JSON with Begin Certificate --- --- END CERTIFICATE

gentios (Sun, 24 Sep 2017 17:41:36 GMT):
link: https://github.com/hyperledger/fabric-samples/tree/release/fabcar/creds

mna2017 (Mon, 25 Sep 2017 06:09:11 GMT):
Hi All, I have created a chaincode using composer playground. I deployed the composer chaincode on ibm cloud. now i want to read 1) blockchain height 2) block content by block number. How do I do this? Any examples will be appreciated.

mna2017 (Mon, 25 Sep 2017 06:09:11 GMT):
@jimthematrix I have created a chaincode using composer playground. I deployed the composer chaincode on ibm cloud. now i want to read 1) blockchain height 2) block content by block number. How do I do this? Any examples will be appreciated.

mna2017 (Mon, 25 Sep 2017 06:09:11 GMT):
@jimthematrix I have created a chaincode using composer playground. I deployed the composer chaincode on ibm cloud. now i want to read 1) blockchain height 2) block content by block number. How do I do this? Any examples will be appreciated.

DarshanBc (Mon, 25 Sep 2017 07:37:26 GMT):

Message Attachments

DarshanBc (Mon, 25 Sep 2017 07:37:33 GMT):
Hi I am trying to get block by hash But I am getting that index not found highlightened text in the screen shot is whatr I sent as argumet

DarshanBc (Mon, 25 Sep 2017 07:37:33 GMT):
Hi I am trying to get block by hash But I am getting that index not found highlighted text in the screen shot is what I sent as argument

prmdmshra (Mon, 25 Sep 2017 08:59:32 GMT):
Has joined the channel.

DarshanBc (Mon, 25 Sep 2017 09:53:57 GMT):
@jrosmith and @muralisr I am also facing the same error as @sampath06 I tried vendoring in local machine but its not reflecting in docker I am using balance transfer example

DarshanBc (Mon, 25 Sep 2017 09:53:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=M2MAtE5P2LL7LSoYR) I have error while installing the chaincode ```info: [packager/Golang.js]: packaging GOLANG from github.com/fabcar E0925 17:18:29.127611266 14821 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0925 17:18:29.127655586 14821 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0925 17:18:29.127701119 14821 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0925 17:18:29.127706856 14821 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0925 17:18:29.127721512 14821 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0925 17:18:29.127726621 14821 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR E0925 17:18:29.127740230 14821 ssl_transport_security.c:439] SSL_read returned 0 unexpectedly. E0925 17:18:29.127745118 14821 secure_endpoint.c:185] Decryption error: TSI_INTERNAL_ERROR [2017-09-25 17:18:42.645] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , ```

gentios (Mon, 25 Sep 2017 11:48:14 GMT):
hi guys

gentios (Mon, 25 Sep 2017 11:48:18 GMT):
how to enroll a new user

gentios (Mon, 25 Sep 2017 11:48:24 GMT):
and generate the /creds foldeR ?

toriaezunama (Mon, 25 Sep 2017 12:06:45 GMT):
Has joined the channel.

pd93 (Mon, 25 Sep 2017 15:03:23 GMT):
Hey, I'm looking for a nice lightweight docker container (preferably something official) to run my app in.. I've tried the `node:6.11-alpine` image, but I get build errors telling my there is no Python included. Are there any recommended docker images for app developers using Hyperledger Fabric? If not.. Creating some would be super helpful. I quite happy to create my own if necessary, but it's always nice to have an official baseimage

pd93 (Mon, 25 Sep 2017 15:09:35 GMT):
I should add to the above... that I've been using the Debian based `node:boron` image up to now.. and the main thing I'm trying to achieve is a smaller image. ~800MB is just ridiculous

qizhang (Mon, 25 Sep 2017 19:15:45 GMT):
Hi everyone, I am wondering what could result in the following error, thanks!

qizhang (Mon, 25 Sep 2017 19:15:59 GMT):
```info: [PTE 0 main]: stderr: error: [PTE 0 exec]: [Nid:chan:org:id=2:testorgschannel3:org3:8 invoke_move_const] Failed to send transaction proposal due to error: TypeError: Illegal buffer at TypeError (native) at Function.module.exports.ByteBuffer.wrap (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/bytebuffer/dist/bytebuffer-node.js:346:19) at Element.ProtoBuf.Reflect.ElementPrototype.verifyValue (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:1886:39) at T.ProtoBuf.Reflect.FieldPrototype.verifyValue (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:3499:33) at setter (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:2582:77) at Channel.sendTransaction (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Channel.js:1441:27) at /home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:1224:43 at eventRegister (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:876:5)``` at channel.sendTransactionProposal.then (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:1222:13)

qizhang (Mon, 25 Sep 2017 19:15:59 GMT):
```info: [PTE 0 main]: stderr: error: [PTE 0 exec]: [Nid:chan:org:id=2:testorgschannel3:org3:8 invoke_move_const] Failed to send transaction proposal due to error: TypeError: Illegal buffer at TypeError (native) at Function.module.exports.ByteBuffer.wrap (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/bytebuffer/dist/bytebuffer-node.js:346:19) at Element.ProtoBuf.Reflect.ElementPrototype.verifyValue (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:1886:39) at T.ProtoBuf.Reflect.FieldPrototype.verifyValue (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:3499:33) at setter (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:2582:77) at Channel.sendTransaction (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Channel.js:1441:27) at /home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:1224:43 at eventRegister (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:876:5) at channel.sendTransactionProposal.then (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:1222:13)```

qizhang (Mon, 25 Sep 2017 19:15:59 GMT):
```info: [PTE 0 main]: stderr: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP PeerOrg3 is unknown at /home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17 info: [PTE 0 main]: stderr: error: [PTE 0 exec]: [Nid:chan:org:id=0:testorgschannel3:org3:12 invoke_move_const] Failed to send transaction proposal due to error: TypeError: Illegal buffer at TypeError (native) at Function.module.exports.ByteBuffer.wrap (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/bytebuffer/dist/bytebuffer-node.js:346:19) at Element.ProtoBuf.Reflect.ElementPrototype.verifyValue (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:1886:39) at T.ProtoBuf.Reflect.FieldPrototype.verifyValue (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:3499:33) at setter (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/protobufjs/dist/protobuf.js:2582:77) at Channel.sendTransaction (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/Channel.js:1441:27) at /home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:1224:43 at eventRegister (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:876:5) at channel.sendTransactionProposal.then (/home/root/git/src/github.com/hyperledger/fabric-sdk-node/test/v1performance/pte-execRequest.js:1222:13)```

DarshanBc (Tue, 26 Sep 2017 05:48:08 GMT):
Is there any Usecase which involves a block is searched by hash or TxID

DarshanBc (Tue, 26 Sep 2017 05:48:08 GMT):
Is there any Usecase where a block is searched by hash or TxID

VickyWang (Tue, 26 Sep 2017 06:20:52 GMT):

Message Attachments

VickyWang (Tue, 26 Sep 2017 06:21:20 GMT):
why?

tbltzk (Tue, 26 Sep 2017 06:55:12 GMT):
Has joined the channel.

tbltzk (Tue, 26 Sep 2017 07:00:45 GMT):
Hello all, I have trouble to plug node-sdk with a network running in devMode. I have a script that runs fine on the fabcar example (from the fabric-samples repo). Actually it is an adaption of the query.js script. I use it to retrieve some block information. However, the same script does not work if I start a network in devMode following these instructions https://github.com/hyperledger/fabric-samples/blob/release/chaincode-docker-devmode/README.rst code and error messages will follow immediately

tbltzk (Tue, 26 Sep 2017 07:04:01 GMT):
``` var hfc = require('fabric-client'); var path = require('path'); var config = { walletPath: path.join(__dirname, './creds'), userId: 'PeerAdmin', channelId: 'mychannel', // chaincode_id: 'fabcar', peerUrl: 'grpc://localhost:7051', }; var channel = {}; var client = null; function initClient(){ console.log("Create a client and the user"); client = new hfc(); // if(client.isDevMode()) client.setDevMode(true); return hfc.newDefaultKeyValueStore({ path: config.walletPath }) .then(wallet => { return client.setStateStore(wallet); }) } function initUser(){ return client.getUserContext(config.userId, true) .then(user => { if(!user) return; console.log("Check user is enrolled, and set a query URL in the network"); if (user === undefined || user.isEnrolled() === false) { console.error("User not defined, or not enrolled - error"); } }); } function initChannel() { channel = client.newChannel(config.channelId); channel.addPeer(client.newPeer(config.peerUrl)); } function getChannelInfo() { return channel.queryInfo() // .then(ci => { // console.log('channel info', ci); // return ci; // }) ; } function getCurrentBlock(channelInfo){ let currentBlockIndex = channelInfo.height.toNumber() - 1; return channel.queryBlock(currentBlockIndex) } function displayBlockInfo(block){ console.log('\n-----------------------------------------------------------------------------------'); console.log('This is the current block on channel', config.channelId) console.log('\nheader:', JSON.stringify(block.header, null, '\t')); console.log('\ndata:', JSON.stringify(block.data)); console.log('-----------------------------------------------------------------------------------\n'); } Promise.resolve() .then(initClient) .then(initUser) .then(initChannel) .then(getChannelInfo) .then(getCurrentBlock) .then(displayBlockInfo) .catch(console.error); ```

tbltzk (Tue, 26 Sep 2017 07:04:39 GMT):
``` error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: Error: Private key missing from key store. Can not establish t he signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\fabric-client\lib\User.js:255:11) error: [Client.js]: Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\fabric-client\lib\User.js:255:11) Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\fabric-client\lib\User.js:255:11) ```

tbltzk (Tue, 26 Sep 2017 07:08:42 GMT):
Obviously, the user PeerAdmin does not exist, or does exist with a different private key, if I start the network through `chaincode-docker-devmode/docker-compose-simple.yaml` . From the docs I didn't figure out which userId to use or how to omit the user (as I am in devMode, I don't need access control at the moment)

VickyWang (Tue, 26 Sep 2017 07:15:28 GMT):
user entroll failure

tbltzk (Tue, 26 Sep 2017 07:18:56 GMT):
should the `getUserContext` call do the enroll?

Vadim (Tue, 26 Sep 2017 07:23:19 GMT):
@tbltzk https://fabric-sdk-node.github.io/FabricCAClient.html#enroll__anchor

Vadim (Tue, 26 Sep 2017 07:23:54 GMT):
getUserContext() will load user from state store if it was enrolled before

tbltzk (Tue, 26 Sep 2017 07:36:31 GMT):
Ok, but for the simple demo, I want to to, I'm not using ca service. So I have to pick a user, who is already registered. How do you use node-sdk with devMode network?

tbltzk (Tue, 26 Sep 2017 07:36:31 GMT):
Ok, but for the simple demo, I'm not using ca service. So I have to pick a user, who is already registered. How do you use node-sdk with devMode network?

Vadim (Tue, 26 Sep 2017 07:38:06 GMT):
so in the demos, the /creds folder is a state store

Vadim (Tue, 26 Sep 2017 07:38:26 GMT):
that's why when you call getUserCOntext() it will load the user from there

tbltzk (Tue, 26 Sep 2017 07:39:20 GMT):
Or more specific: running the network as configured in https://github.com/hyperledger/fabric-samples/blob/ed285ef42dcd315c94ed0487251c292d56ed5194/chaincode-docker-devmode/docker-compose-simple.yaml, which userId should I use, or can I omit the userContext somehow?

Vadim (Tue, 26 Sep 2017 07:41:14 GMT):
the network by itself does not care about users, it only checks the certificates which come along with transactions you submit to that network. The certificates check means it makes sure the certs are valid and belong to a known MSP. The client should obtain it somehow, e.g. over a CA.

Vadim (Tue, 26 Sep 2017 07:41:14 GMT):
the network by itself does not know how many users are there, it only checks the certificates which come along with transactions you submit to that network. The certificates check means it makes sure the certs are valid and belong to a known MSP. The client should obtain it somehow, e.g. over a CA.

Vadim (Tue, 26 Sep 2017 07:41:14 GMT):
the network by itself does not know how many users are there, it only checks their certificates which come along with transactions you submit to that network. The certificates check means it makes sure the certs are valid and belong to a known MSP. The client should obtain it somehow, e.g. over a CA.

Vadim (Tue, 26 Sep 2017 07:41:14 GMT):
the network by itself does not know how many users are there, it only checks their certificates which come along with transactions you submit to that network. The certificates check means it makes sure the certs are valid and belong to a known MSP. The client (SDK app) should obtain it somehow, e.g. over a CA.

tbltzk (Tue, 26 Sep 2017 07:42:25 GMT):
ok, but there seems to be a way to operate a simple demo without a CA, right?

Vadim (Tue, 26 Sep 2017 07:43:14 GMT):
as I said, they provide a state store in a creds folder, i.e. a pregenerated user. I suspect that the creators of the demo just enrolled a user with a CA and then committed the state store to the repo.

Vadim (Tue, 26 Sep 2017 07:43:14 GMT):
as I said, they provide a state store in a creds folder, i.e. a pregenerated user. I suspect that the creators of the demo just enrolled a user with a CA and then committed the state store they obtained to the repo.

tbltzk (Tue, 26 Sep 2017 07:43:43 GMT):
I'm using the /creds directory from the fabcar example. It seems that those certificates are not compatible with the chaincode-docker-devmode example?

Vadim (Tue, 26 Sep 2017 07:44:04 GMT):
which error do you get?

tbltzk (Tue, 26 Sep 2017 07:44:18 GMT):
I posted it above

Vadim (Tue, 26 Sep 2017 07:44:42 GMT):
this is the SDK error, not the network error

tbltzk (Tue, 26 Sep 2017 07:44:43 GMT):
below my script

tbltzk (Tue, 26 Sep 2017 07:45:15 GMT):
ok, wait a minute

Vadim (Tue, 26 Sep 2017 07:46:13 GMT):
just FYI: you need to point the SDK to the keystore, e.g. in fabcar it's done here: https://github.com/hyperledger/fabric-samples/blob/release/fabcar/invoke.js#L32

Vadim (Tue, 26 Sep 2017 07:46:35 GMT):
and the `wallet_path` is defined above at the line 16

tbltzk (Tue, 26 Sep 2017 07:48:04 GMT):
yeah, I adapted the scripts from the fabcar sample (the query.js, not the invoke.js, but they are the same in this point). I have the same code in my initClient() function

tbltzk (Tue, 26 Sep 2017 07:48:27 GMT):
seems that the call is already aborted within the sdk. No error message on the network

Vadim (Tue, 26 Sep 2017 07:48:40 GMT):
as I said, this is the SDK error

Vadim (Tue, 26 Sep 2017 07:48:49 GMT):
the call does not even reach the network

Vadim (Tue, 26 Sep 2017 07:49:25 GMT):
it complains that it cannot load the private key

tbltzk (Tue, 26 Sep 2017 07:50:38 GMT):
hmm, but this I don't understand, because the very same script works fine (without any modifications), if I start the fabcar network setup

Vadim (Tue, 26 Sep 2017 07:51:13 GMT):
so what is the difference?

tbltzk (Tue, 26 Sep 2017 07:52:22 GMT):
probably the genesis.block and the channel transaction

Vadim (Tue, 26 Sep 2017 07:52:42 GMT):
no, it does not even reach that point

tbltzk (Tue, 26 Sep 2017 07:53:22 GMT):
the fabcar scripts point to `../basic-network`, the devmode script uses its own artefacts

Vadim (Tue, 26 Sep 2017 07:53:23 GMT):
can you try to turn on advanced logging and post the log?

Vadim (Tue, 26 Sep 2017 07:53:26 GMT):
`export HFC_LOGGING='{"debug":"console"}'`

tbltzk (Tue, 26 Sep 2017 07:53:51 GMT):
ok, let me try

Vadim (Tue, 26 Sep 2017 07:54:12 GMT):
yes, but if you check query.js, then it fails in the very beginning where it tries to read the user

Vadim (Tue, 26 Sep 2017 07:54:26 GMT):
it does not do any network calls at that point yet

tbltzk (Tue, 26 Sep 2017 07:55:48 GMT):
what do you mean? the query.js works fine for me, if I run the basic-network setup

tbltzk (Tue, 26 Sep 2017 07:56:14 GMT):
debug: Successfully constructed a winston logger with configurations debug=console Create a client and the user debug: [FileKeyValueStore.js]: FileKeyValueStore.js - constructor debug: [FileKeyValueStore.js]: FileKeyValueStore -- getValue debug: [Client.js]: loadUserFromStateStore, cryptoSuite is not set, will load using defaults debug: [User.js]: fromString --start debug: [crypto_ecdsa_aes]: constructor, keySize: 256 debug: [crypto_ecdsa_aes]: Hash algorithm: SHA2, hash output size: 256 debug: [utils.CryptoKeyStore]: CryptoKeyStore, constructor - start debug: [utils.CryptoKeyStore]: constructor, no super class specified, using config: fabric-client/lib/impl/FileKeyValueStore.js debug: [crypto_ecdsa_aes]: importKey - start debug: [crypto_ecdsa_aes]: importKey - have the key [Circular] debug: [utils.CryptoKeyStore]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"C:\\Users\\T.LAT\\.hfc-key-store" }} debug: [FileKeyValueStore.js]: FileKeyValueStore.js - constructor debug: [utils.CryptoKeyStore]: _getKeyStore returning ks debug: [ecdsa/key.js]: ECDSA curve param X: 57575f98ac6c14a5a8ee8e8334121a21579b0823c033d0bfb0b06de29251adef debug: [ecdsa/key.js]: ECDSA curve param Y: 69584f7cec38d7668677825738f83a0f32d4e6051a9b3d5c18714be96d863ca7 debug: [FileKeyValueStore.js]: FileKeyValueStore -- setValue debug: [utils.CryptoKeyStore]: _getKeyStore resolving store debug: [FileKeyValueStore.js]: FileKeyValueStore -- getValue debug: [FileKeyValueStore.js]: FileKeyValueStore -- getValue error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: Error: Private key missing from key store. Can not establish t he signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\fabric-client\lib\User.js:255:11) error: [Client.js]: Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\fabric-client\lib\User.js:255:11) Error: Private key missing from key store. Can not establish the signing identity for user PeerAdmin at _cryptoSuite.importKey.then.then (C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\fabric-client\lib\User.js:255:11)

Vadim (Tue, 26 Sep 2017 07:57:37 GMT):
`This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"C:\\Users\\T.LAT\\.hfc-key-store"`

Vadim (Tue, 26 Sep 2017 07:57:48 GMT):
did you save your credentials there?

tbltzk (Tue, 26 Sep 2017 07:57:52 GMT):
ok, the path does not look correct

tbltzk (Tue, 26 Sep 2017 08:00:15 GMT):
The location contains the ...-pub file, but not the ...-priv file nor the PeerAdmin file.

Vadim (Tue, 26 Sep 2017 08:01:55 GMT):
I suggest you copy the missing files over there

Vadim (Tue, 26 Sep 2017 08:02:02 GMT):
perhaps the pub file too

tbltzk (Tue, 26 Sep 2017 08:02:06 GMT):
then the question remains, why does it look there, because I specified `walletPath: path.join(__dirname, './creds')` which should resolve to the fabcar/creds, I can double check this

Vadim (Tue, 26 Sep 2017 08:02:33 GMT):
can you run the fabcar and check what path it prints?

tbltzk (Tue, 26 Sep 2017 08:06:26 GMT):
wait a sec, copying the creds changed the behavior at least

tbltzk (Tue, 26 Sep 2017 08:06:58 GMT):
[crypto_ecdsa_aes]: ecdsa signature: negative=0, words=[44409881, 61117127, 13907950, 15136481, 66541054, 8876400, 50954053, 14194934, 157296 03, 2103358, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, negative=0, words=[54751345, 22853245, 15655481, 50853823, 24520781, 65489806, 54347 537, 33280576, 44487343, 1835274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, recoveryParam=1 debug: [Peer.js]: Peer.sendProposal - Start debug: [Peer.js]: Received proposal response from: grpc://localhost:7051 status: Error: Failed to deserialize creator identity, err MSP Org1MSP is un known error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\grpc\src\node\src\client.js:554:15 debug: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown debug: [Channel.js]: queryInfo - got responses=1 error: [Channel.js]: Failed Query channel info. Error: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\grpc\src\node\src\client.js:554:15 { Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at C:\Users\T.LAT\hyperledger\fabric-samples\fabcar\node_modules\grpc\src\node\src\client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } }

Vadim (Tue, 26 Sep 2017 08:07:24 GMT):
is your network configured?

tbltzk (Tue, 26 Sep 2017 08:07:36 GMT):
what do you mean?

Vadim (Tue, 26 Sep 2017 08:07:52 GMT):
channels created, peers joined the channels

tbltzk (Tue, 26 Sep 2017 08:08:46 GMT):
yes, this is done automatically by the script.sh (mounted into the cli container)

tbltzk (Tue, 26 Sep 2017 08:09:51 GMT):
https://github.com/hyperledger/fabric-samples/blob/ed285ef42dcd315c94ed0487251c292d56ed5194/chaincode-docker-devmode/script.sh

Vadim (Tue, 26 Sep 2017 08:09:53 GMT):
and that was successful I suppose?

tbltzk (Tue, 26 Sep 2017 08:10:17 GMT):
yeah, I can interact through the cli, but not through sdk

tbltzk (Tue, 26 Sep 2017 08:12:34 GMT):
I'll be back in 5 minutes. Thank you very much, for your help so far, otherwise I would be really stuck

tbltzk (Tue, 26 Sep 2017 08:38:15 GMT):
ok, it complains that Org1MSP is unknown, which is not astonishing, as it is not setup by the devMode network configuration. Isn't there a user in the devmode setup I can use right away?

tbltzk (Tue, 26 Sep 2017 08:41:18 GMT):

Message Attachments

tbltzk (Tue, 26 Sep 2017 08:42:29 GMT):
I basically need to do whatever the cli does to do the invoke. Somethint like `obtaining the default signing identity`

tbltzk (Tue, 26 Sep 2017 08:42:29 GMT):
I basically need to do whatever the cli does to do the invoke. Something like `obtaining the default signing identity`

tbltzk (Tue, 26 Sep 2017 09:29:53 GMT):
Different topic: is it possible to use node-sdk in the browser? Otherwise, is there any way to write a dapp (i.e. only browser and blockchain, no additional backend)?

bretharrison (Tue, 26 Sep 2017 12:55:50 GMT):
@tbltzk Both the state store and the crypto store need to be set up and assigned to the `client` especially when there are existing certificates and keys. ``` // first create the state store with a utility method - user state is stored here including the user certificates return Client.newDefaultKeyValueStore({path: }) .then((store) => { // assign the store to the current client instance client.setStateStore(store); // now create the crypto suite with a utility method var cryptoSuite = Client.newCryptoSuite(); // now create the crypto store for use by the crypto suite - user keys are stored here including the private key var crypto_store = Client.newCryptoKeyStore({path:}); // set the store on the current crypto instance cryptoSuite.setCryptoKeyStore(crypto_suite); // finally assign the crypto suite to the current client instance client.setCryptoSuite(cryptoSuite);

bretharrison (Tue, 26 Sep 2017 12:55:50 GMT):
@tbltzk Both the state store and the crypto store need to be set up and assigned to the `client` especially when there are existing certificates and keys. ``` // first create the state store with a utility method - user state is stored here including the user certificates return Client.newDefaultKeyValueStore({path: ''}) .then((store) => { // assign the store to the current client instance client.setStateStore(store); // now create the crypto suite with a utility method var cryptoSuite = Client.newCryptoSuite(); // now create the crypto store for use by the crypto suite - user keys are stored here including the private key var crypto_store = Client.newCryptoKeyStore({path:''}); // set the store on the current crypto instance cryptoSuite.setCryptoKeyStore(crypto_suite); // finally assign the crypto suite to the current client instance client.setCryptoSuite(cryptoSuite); ```

mna2017 (Tue, 26 Sep 2017 13:18:51 GMT):
@tbltzk @jimthematrix Can a fabric node sdk program read the blockchain data created by a composer playground business network?

Vadim (Tue, 26 Sep 2017 13:20:05 GMT):
@mna2017 it should be possible

mna2017 (Tue, 26 Sep 2017 13:21:14 GMT):
@Vadim I have been trying but no luck so far. I need an example code that does this.

Vadim (Tue, 26 Sep 2017 13:22:05 GMT):
@mna2017 so you want to go around composer tools and read the data directly from the underlying composer chaincode if I understand correctly?

mna2017 (Tue, 26 Sep 2017 13:22:53 GMT):
@Vadim Yes. That;s what I want to do. I am specifically interested in reading 1) blockchain height 2) block data by block0num.

Vadim (Tue, 26 Sep 2017 13:23:33 GMT):
well for that you don't need any composer chaincode, you can just use the fabric sdk methods directly

Vadim (Tue, 26 Sep 2017 13:23:53 GMT):
e.g. https://fabric-sdk-node.github.io/Channel.html#queryInfo

mna2017 (Tue, 26 Sep 2017 13:48:36 GMT):
@Vadim Thanks for the link! I know some of the nodeSDK calls I need to make, I had visited this class documentation and methods earlier. The page does not appear to have example code. I am looking for a code that has similar calls. I would clone the project, and make my changes to it as per the blockchainI am reading. This will help me avoid any errors due to incorrect project structure etc.

Vadim (Tue, 26 Sep 2017 13:49:37 GMT):
@mna2017 take e.g. fabcar as a base and change the call to whatever you need: https://github.com/hyperledger/fabric-samples/blob/release/fabcar/query.js#L54

mna2017 (Tue, 26 Sep 2017 13:52:19 GMT):
@Vadim wallet_path: path.join(__dirname, './creds') ==> If I understand this code correctly, this is the credentials directory that has 3 files i.e. "admin" "pub" and "priv". correct?

Vadim (Tue, 26 Sep 2017 13:52:57 GMT):
yes, but you need to provide there admin of your composer network

mna2017 (Tue, 26 Sep 2017 13:55:06 GMT):
For this code to run, do we need a connection_profile(i.e. connection.json) file? Or var options does this?

Vadim (Tue, 26 Sep 2017 13:55:41 GMT):
no, it does it in the code

Vadim (Tue, 26 Sep 2017 13:56:00 GMT):
so those parts you also might need to adjust a bit

mna2017 (Tue, 26 Sep 2017 13:56:48 GMT):
@Vadim right. I got it. Let me try setting up the program to read the blockchain that I created. I will give you an update whether I am successful or not. Thanks for the info so far!

Vadim (Tue, 26 Sep 2017 13:56:56 GMT):
good luck

gauthampamu (Tue, 26 Sep 2017 15:05:58 GMT):
I have a question on default endorsement policy, what is the behavior when you don't specify the endorsement policy when instantiate the chaincode and if you have two peers for the organization. Will the transaction fail if one of the peer is down ?

tbltzk (Tue, 26 Sep 2017 15:22:37 GMT):
@bretharrison: sorry for my late response! Sounds good, thanks a lot! I will try this tomorrow. At least this has the potential to solve my issue that I have to copy my creds to `~/.hfc-key-store`

tbltzk (Tue, 26 Sep 2017 15:26:18 GMT):
@mna2017 you can also look at my script I posted this morning. It does exactly that: getChannelInfo (containing the latest block Number), then retrieve the corresponding block

mna2017 (Tue, 26 Sep 2017 15:27:33 GMT):
@tbltzk Thanks. yes I have already copied your script :). i will use that in addition to the code in fabcar to get this information.

eetti (Tue, 26 Sep 2017 16:11:44 GMT):
How can we specify endorsement policy with node SDK

eetti (Tue, 26 Sep 2017 16:21:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JoZksv6oxnAJcr36k) @eetti https://github.com/hyperledger/fabric-sdk-node/blob/6f7310ccda8648473d0f794e28c5b390ac030480/test/integration/e2e/e2eUtils.js#L416

eetti (Tue, 26 Sep 2017 16:21:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JoZksv6oxnAJcr36k) @eetti I found it here based on @bretharrison 's answer a while back https://github.com/hyperledger/fabric-sdk-node/blob/6f7310ccda8648473d0f794e28c5b390ac030480/test/integration/e2e/e2eUtils.js#L416

gauthampamu (Tue, 26 Sep 2017 17:19:25 GMT):
@eetti My question more about..what is the default behavior when you don't specify the policy. Yes, I did look at the code you provided already and understand how to specify the policy with node.js.

gauthampamu (Tue, 26 Sep 2017 17:19:25 GMT):
@eetti My question was more about..what is the default behavior when you don't specify the policy. Yes, I did look at the code you provided already and understand how to specify the policy with node.js.

knagware9 (Tue, 26 Sep 2017 18:57:36 GMT):
hi

knagware9 (Tue, 26 Sep 2017 18:57:51 GMT):
Unable to install chaincode for marbles

knagware9 (Tue, 26 Sep 2017 18:59:11 GMT):
info: Now we install --------------------------------------- debug: [fcw] Installing Chaincode debug: [fcw] Sending install req targets=[grpc.primary_user_agent=grpc-node/1.2.4, _url=grpc://localhost:7051, addr=localhost:7051, , _request_timeout=90000, , _name=null], chaincodePath=marbles, chaincodeId=marbles, chaincodeVersion=v4 info: [packager/Golang.js]: packaging GOLANG from marbles error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed at /home/hertzpoc/work/src/github.com/hyperledger/marbles/node_modules/grpc/src/node/src/client.js:434:17 error: [fcw] Failed to obtain endorsement for transaction. code=14, error: [fcw] Error in install catch block object code=14, --------------------------------------- info: Install done. Errors: parsed=Blockchain network error - Connect Failed, raw=[code=14, ]

knagware9 (Tue, 26 Sep 2017 18:59:37 GMT):
In Ubuntu environment with docker version 17.05 ,chaincode installation is failing with sendPeersProposal -promise is rejected :Error connect failed.

knagware9 (Tue, 26 Sep 2017 18:59:56 GMT):
could you please help me to solve this

GiorgiBlockchain (Wed, 27 Sep 2017 00:34:45 GMT):
Has joined the channel.

GiorgiBlockchain (Wed, 27 Sep 2017 00:42:11 GMT):
Hello everyone, I have some issue while interacting with fabric. So I'm testing the balance-transfer example on ubuntu machine. I docerized node.js API in order to interact with fabric from remote app. Then I have exposed port 4000 on node.js and made a bridge with outside port to access the server. 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 a channel, etc. However with the Postman tool I was getting errors like: Error: Enrollment failed; ECONNREFUSED localhost:8054, ECONNREFUSED localhost:7054, port number depends on what user token I was using for the request. "Error: This client instance must be assigned a user context." That is my first problem. The second problem came today. Node.js uses JWS tokens for secure authentication and jwt token was expired after 10 hours 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 a 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!

bh4rtp (Wed, 27 Sep 2017 01:07:57 GMT):
@Vadim i have a question. does node sdk use eventing mechanism to wait for one transaction to commit before sending the next? how to avoid using this mechanism, because that will cause transaction latency.

GiorgiBlockchain (Wed, 27 Sep 2017 04:08:59 GMT):
Update on my issue. Since I'm getting error on localhost:7054 like this ` Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]` I inspected container of CA on org1 by running this command: `docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' d150835f7826` and I got the result: 172.20.0.2. Does it means that my ca container is not properly configured? /users method is requesting localhost:7054, but actually it is 172.20.0.2. If it's like this how I can configure the ip adress of sdk?

Vadim (Wed, 27 Sep 2017 06:50:54 GMT):
@bh4rtp to my knowledge, it does not have this mechanism

gentios (Wed, 27 Sep 2017 08:02:02 GMT):
I am trying to enroll a user and populate the /creds folder but I am keep getting *Cannot read property 'isEnrolled' of null* when deploying the network in the docker I have used this command * command: sh -c 'fabric-ca-server start -b admin:adminpw -d'* and now in the NodeSDK I am trying to enroll like this: ``` return caClient.enroll({ enrollmentID: username, enrollmentSecret: password, ``` but I keep getting that error

tbltzk (Wed, 27 Sep 2017 08:19:11 GMT):
@GiorgiBlockchain I try to run the balanceTransfer sample now. I'm on a windows10. installing and starting the app went smooth. Also enroll and create channel. Now I get stuck on joining the channel. I'm using SoapUI and send ``` POST http://localhost:4000/channels/mychannel/peers HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/json authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDY1MzUwOTIsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE1MDY0OTkwOTJ9.7r5EGe_6t8ylXi8WLJhNZeVepcasedl_LRAI29Z20VU ``` with data ``` { "peers": ["peer1","peer2"] } ``` ``` [2017-09-27 10:11:03.375] [INFO] Join-Channel - received member object for admin of the organization "org1": [2017-09-27 10:11:03.381] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"} [2017-09-27 10:11:03.417] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer1.org1.example.com","grpc.default_authority":"peer1.org1.example.com"} [2017-09-27 10:11:03.425] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-09-27 10:11:03.435] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed at C:\Users\T.LAT\hyperledger\fabric-samples\balance-transfer\node_modules\grpc\src\node\src\client.js:554:15 [2017-09-27 10:11:05.451] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } (node:10028) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'stack' of undefined ```

tbltzk (Wed, 27 Sep 2017 08:19:11 GMT):
@GiorgiBlockchain I try to run the balanceTransfer sample now. I'm on a windows10. installing and starting the app went smooth. Also enroll and create channel. Now I get stuck on joining the channel. I'm using SoapUI and send ```POST http://localhost:4000/channels/mychannel/peers HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/json authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDY1MzUwOTIsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE1MDY0OTkwOTJ9.7r5EGe_6t8ylXi8WLJhNZeVepcasedl_LRAI29Z20VU ```with data ``` { "peers": ["peer1","peer2"] } ``` The error message does not look like I can do much about it atm: ```[2017-09-27 10:11:03.375] [INFO] Join-Channel - received member object for admin of the organization "org1": [2017-09-27 10:11:03.381] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"} [2017-09-27 10:11:03.417] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer1.org1.example.com","grpc.default_authority":"peer1.org1.example.com"} [2017-09-27 10:11:03.425] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-09-27 10:11:03.435] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed at C:\Users\T.LAT\hyperledger\fabric-samples\balance-transfer\node_modules\grpc\src\node\src\client.js:554:15 [2017-09-27 10:11:05.451] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } (node:10028) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'stack' of undefined ```

mna2017 (Wed, 27 Sep 2017 08:36:03 GMT):
@Vadim I have cloned the "fabcar" repo and updated query.js to read from the blockchain that I deployed on cloud. I have updated the variable config to point to the blockchain(updated chaincodeID, peer URL etc). Now when I attempt to run, I get the error message "ERROR PEM Encoded Certificate is required". However, I do have a "creds" folder inside the repo with my own "priv" "pub" and "PeerAdmin" certificate files in it.

tbltzk (Wed, 27 Sep 2017 08:50:32 GMT):

Message Attachments

tbltzk (Wed, 27 Sep 2017 09:03:40 GMT):
I redid the whole thing. Same result:

tbltzk (Wed, 27 Sep 2017 09:06:22 GMT):
Ah, figured it out. it was a windows specifc issue with docker port forwarding (I have to forward every port explicitly on my machine). I forwarded the ports 7051-7054, and also 8051-8054. But I was missing 7056,7058,8056,8058. No I succeeded to join the channel

tbltzk (Wed, 27 Sep 2017 09:06:22 GMT):
Ah, figured it out. it was a windows specifc issue with docker port forwarding (I have to forward every port explicitly on my machine). I forwarded the ports 7051-7054, and also 8051-8054. But I was missing 7056,7058,8056,8058, needed for the second peers of the organisations. Now I succeeded to join the channel

GiorgiBlockchain (Wed, 27 Sep 2017 09:07:46 GMT):
Hey @tbltzk It might be depending on windows environment. For me joining channel went smoothly.

GiorgiBlockchain (Wed, 27 Sep 2017 09:09:01 GMT):
@tbltzk Oh, okay. Perfect. I also fixed my issue by changing 'localhost' to my Ubuntu server ip address in network-config.json file. Now I can enroll users from Postman.

tbltzk (Wed, 27 Sep 2017 09:10:10 GMT):
@knagware9: you seem to have this connect failed issue as well. What environment are you running on. Maybe it's also a port forwarding issue

tbltzk (Wed, 27 Sep 2017 09:11:50 GMT):
@GiorgiBlockchain I'm using docker toolbox, because otherwise volume mounting did not work on my machine. In turn, with docker toolbox, the network bridge does not work, so I'm using NAT and forward every single port (not possible to specify ranges!)

GiorgiBlockchain (Wed, 27 Sep 2017 09:18:01 GMT):
I see, good luck. Thank you for getting in touch.

mna2017 (Wed, 27 Sep 2017 09:32:29 GMT):
@tbltzk I have cloned the "fabcar" repo and updated query.js to read from the blockchain that I deployed on ibm cloud. I have updated the variable config to point to the blockchain(updated chaincodeID, peer URL etc). Now when I attempt to run, I get the error message "ERROR PEM Encoded Certificate is required". However, I do have a "creds" folder inside the repo with my own "priv" "pub" and "PeerAdmin" certificate files in it.

mna2017 (Wed, 27 Sep 2017 09:47:32 GMT):
@tbltzk The channel.addPeer call is apparently returning this error: function initChannel() { channel = client.newChannel(config.channelId); channel.addPeer(client.newPeer(config.peerUrl)); }

DarshanBc (Wed, 27 Sep 2017 10:04:52 GMT):
how to upgrade chaincode in balance transfer example

pd93 (Wed, 27 Sep 2017 11:58:41 GMT):
Hey, I'm looking for a nice lightweight docker container (preferably something official) to run my app in.. I've tried the `node:6.11-alpine` image, but I get build errors telling my there is no Python included. Are there any recommended docker images for app developers using Hyperledger Fabric?

DarshanBc (Wed, 27 Sep 2017 12:15:56 GMT):
After FAB-5303 how peer names are mapped to their URL What should to change peer names

bretharrison (Wed, 27 Sep 2017 12:25:08 GMT):
@mna2017 There is a missing cert to be used for TLS on the `newPeer(name, opts)` call. ``` let data = fs.readFileSync(path.join(__dirname, ORGS[org][key]['tls_cacerts'])); let peer = client.newPeer( ORGS[org][key].requests, { pem: Buffer.from(data).toString(),'ssl-target-name-override': ORGS[org][key]['server-hostname'] } ); ```

bretharrison (Wed, 27 Sep 2017 12:25:08 GMT):
@mna2017 There is a missing cert to be used for TLS on the `newPeer(name, opts)` call. ``` let data = fs.readFileSync(path.join(__dirname, ORGS[org][key]['tls_cacerts'])); let peer = client.newPeer( ORGS[org][key].requests, { pem: Buffer.from(data).toString(),'ssl-target-name-override': ORGS[org][key]['server-hostname'] } ); ```

bretharrison (Wed, 27 Sep 2017 12:25:08 GMT):
@mna2017 There is a missing cert to be used for TLS on the `newPeer(url, opts)` call. ``` let data = fs.readFileSync(path.join(__dirname, ORGS[org][key]['tls_cacerts'])); let peer = client.newPeer( 'URL', { pem: Buffer.from(data).toString(), 'ssl-target-name-override': 'server-hostname' } ); ```

bretharrison (Wed, 27 Sep 2017 12:25:08 GMT):
@mna2017 There is a missing cert to be used for TLS on the `newPeer(url, opts)` call. ``` let data = fs.readFileSync(path.join(__dirname, ' path to tls_cacerts')); let peer = client.newPeer( 'URL', { pem: Buffer.from(data).toString(), 'ssl-target-name-override': 'server-hostname' } ); ```

mna2017 (Wed, 27 Sep 2017 12:54:43 GMT):
@bretharrison Thanks for the reply. Where would I get this TLS certificate from? my deployed blockchain reside on IBM cloud.

mna2017 (Wed, 27 Sep 2017 17:35:08 GMT):
@bretharrison @jimthematrix I am still getting certificate related error while I try to execute modified fabcar code.

mna2017 (Wed, 27 Sep 2017 17:35:19 GMT):
function initChannel() { channel = client.newChannel(config.channelId); // channel.addPeer(client.newPeer(config.peerUrl)); let data = fs.readFileSync(path.join(__dirname, './tls_cacerts/tlsca.pem')); let peer = client.newPeer( config.peerUrl, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': 'server-hostname' }); channel.addPeer(peer); } error: [crypto_ecdsa_aes]: importKey - {} error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Does not understand PEM contents other than ECDSA private keys and certificates at CryptoSuite_ECDSA_AES.importKey (/home/mna2017/myworkspace/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:196:12) at User.fromString (/home/mna2017/myworkspace/fabcar/node_modules/fabric-client/lib/User.js:232:28) at /home/mna2017/myworkspace/fabcar/node_modules/fabric-client/lib/Client.js:975:22

mna2017 (Wed, 27 Sep 2017 17:46:27 GMT):
Can somebody please help me with fixing this error?

bretharrison (Wed, 27 Sep 2017 17:51:13 GMT):
@mna2017 The PEM error is during the loading of the user from the state store and not related to the peer and tls cert. However I do see that there needs to be a server hostname for 'ssl-target-name-override', something like "peer0.org1.example.com" in looking at at your code snippet

mna2017 (Wed, 27 Sep 2017 17:57:25 GMT):
@bretharrison Does this mean, I dont need any pem file or tlscert in my project repo?

bretharrison (Wed, 27 Sep 2017 17:58:59 GMT):
@mna2017 Yes you need the TLS certs to setup the connections

mna2017 (Wed, 27 Sep 2017 18:17:53 GMT):
@bretharrison I requested the certificates using the command "composer identity request -p bmx-hlfv1 -i admin -s PA55W0RD12". This created 3 files under .identityCredentials directory. And I have copy pasted these 3 files inside of my repo i.e. "fabcar/creds".

mna2017 (Wed, 27 Sep 2017 18:18:07 GMT):

Message Attachments

mna2017 (Wed, 27 Sep 2017 18:19:03 GMT):
Now when I execute I get the error "ERROR: PEM encoded certificate is required"

sam.doyle (Wed, 27 Sep 2017 18:53:47 GMT):
I'm trying to install chaincode on a peer in HSBN using the admin user for the CA, but I am getting this error: ``` Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]) ``` After getting the admin user cert using the sdk, do I need to upload the cert to the peer in order for this admin user to be validated and able to install chaincode?

bertrand_sirodot (Thu, 28 Sep 2017 01:41:44 GMT):
Hi everyone, thanks to the help from @bretharrison , I managed to get going on using the SDK to invoke a function from an installed chaincode, but I have ran into another issue. The javascript program I built was a mix of the test/integration/client.js file and the fabcar/invoke.js. When I run the script though, I am getting the following error when running the transaction proposal: `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority` . I know my issue is due to not using the right certificate, but I don't know where I am not using that correct certificate. I created the crypto-config directory using the following script: ```../src/github.com/hyperledger/fabric/build//bin/cryptogen generate --config=./crypto-config.yaml ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel --outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/CorpMSPanchors.tx -channelID $CHANNEL_NAME -asOrg CorpMSP ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/EngMSPanchors.tx -channelID $CHANNEL_NAME -asOrg EngMSP ``` . Here is the code where I add my peer and my channel: ```let data = fs.readFileSync(network[org].peers['peer1']['tls_cacerts']); var peer = client.newPeer( network[org].peers['peer1'].requests, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] }); console.log("- Peer set up, setting up channel"); channel = client.newChannel(utils.getConfigSetting('channelName')); channel.addPeer(peer); data = fs.readFileSync(network.orderer['tls_cacerts']); channel.addOrderer(client.newOrderer(network.orderer['url']), { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network.orderer['server-hostname'] }); target.push(peer); ``` and here is the configuration of my network: ``` { "tmpdir": "/tmp/hfc_test_kvs", "channelName" : "emcc", "chaincodeId" : "blockparty", "network-config": { "orderer": { "url": "grpcs://orderer.emc.com:7050", "server-hostname": "orderer.emc.com", "tls_cacerts": "./crypto-config/ordererOrganizations/emc.com/orderers/orderer.emc.com/msp/tlscacerts/tlsca.emc.com-cert.pem" }, "org1": { "name": "Corp", "mspid": "CorpMSP", "username": "Admin", "peers": { "peer1": { "requests": "grpcs://peer0.corp.emc.com:7051", "events": "grpcs://peer0.corp.emc.com:7053", "server-hostname": "peer0.corp.emc.com", "tls_cacerts": "./crypto-config/peerOrganizations/corp.emc.com/peers/peer0.corp.emc.com/tls/server.crt" }, "admin": { "key": "./crypto-config/peerOrganizations/corp.emc.com/users/Admin@corp.emc.com/msp/keystore", "cert": "./crypto-config/peerOrganizations/corp.emc.com/users/Admin@corp.emc.com/msp/signcerts" } }, ``` Any thoughts on which certificate I am supposed to use to properly submit the transaction proposal and then the transaction?

bertrand_sirodot (Thu, 28 Sep 2017 01:41:44 GMT):
Hi everyone, thanks to the help from @bretharrison , I managed to get going on using the SDK to invoke a function from an installed chaincode, but I have ran into another issue. The javascript program I built was a mix of the test/integration/client.js file and the fabcar/invoke.js. When I run the script though, I am getting the following error when running the transaction proposal: `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority` . I know my issue is due to not using the right certificate, but I don't know where I am not using that correct certificate. I created the crypto-config directory using the following script: ```../src/github.com/hyperledger/fabric/build//bin/cryptogen generate --config=./crypto-config.yaml ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel --outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/CorpMSPanchors.tx -channelID $CHANNEL_NAME -asOrg CorpMSP ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/EngMSPanchors.tx -channelID $CHANNEL_NAME -asOrg EngMSP ``` . Here is the code where I add my peer and my channel: ```let data = fs.readFileSync(network[org].peers['peer1']['tls_cacerts']); var peer = client.newPeer( network[org].peers['peer1'].requests, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] }); console.log("- Peer set up, setting up channel"); channel = client.newChannel(utils.getConfigSetting('channelName')); channel.addPeer(peer); data = fs.readFileSync(network.orderer['tls_cacerts']); channel.addOrderer(client.newOrderer(network.orderer['url']), { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network.orderer['server-hostname'] }); target.push(peer); ``` and here is the configuration of my network: ``` { "tmpdir": "/tmp/hfc_test_kvs", "channelName" : "emcc", "chaincodeId" : "blockparty", "network-config": { "orderer": { "url": "grpcs://orderer.emc.com:7050", "server-hostname": "orderer.emc.com", "tls_cacerts": "./crypto-config/ordererOrganizations/emc.com/orderers/orderer.emc.com/msp/tlscacerts/tlsca.emc.com-cert.pem" }, "org1": { "name": "Corp", "mspid": "CorpMSP", "username": "Admin", "peers": { "peer1": { "requests": "grpcs://peer0.corp.emc.com:7051", "events": "grpcs://peer0.corp.emc.com:7053", "server-hostname": "peer0.corp.emc.com", "tls_cacerts": "./crypto-config/peerOrganizations/corp.emc.com/peers/peer0.corp.emc.com/tls/server.crt" }, "admin": { "key": "./crypto-config/peerOrganizations/corp.emc.com/users/Admin@corp.emc.com/msp/keystore", "cert": "./crypto-config/peerOrganizations/corp.emc.com/users/Admin@corp.emc.com/msp/signcerts" } }, ``` Any thoughts on which certificate I am supposed to use to properly submit the transaction proposal and then the transaction?

bertrand_sirodot (Thu, 28 Sep 2017 01:41:44 GMT):
Hi everyone, thanks to the help from @bretharrison , I managed to get going on using the SDK to invoke a function from an installed chaincode, but I have ran into another issue. The javascript program I built was a mix of the test/integration/client.js file and the fabcar/invoke.js. When I run the script though, I am getting the following error when running the transaction proposal: `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority` . I know my issue is due to not using the right certificate, but I don't know where I am not using that correct certificate. I created the crypto-config directory using the following script: ```../src/github.com/hyperledger/fabric/build//bin/cryptogen generate --config=./crypto-config.yaml ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel --outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/CorpMSPanchors.tx -channelID $CHANNEL_NAME -asOrg CorpMSP ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/EngMSPanchors.tx -channelID $CHANNEL_NAME -asOrg EngMSP ``` . Here is the code where I add my peer and my channel: ``` let data = fs.readFileSync(network[org].peers['peer1']['tls_cacerts']); var peer = client.newPeer( network[org].peers['peer1'].requests, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] }); console.log("- Peer set up, setting up channel"); channel = client.newChannel(utils.getConfigSetting('channelName')); channel.addPeer(peer); data = fs.readFileSync(network.orderer['tls_cacerts']); channel.addOrderer(client.newOrderer(network.orderer['url']), { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network.orderer['server-hostname'] }); target.push(peer); ``` and here is the configuration of my network: ``` { "tmpdir": "/tmp/hfc_test_kvs", "channelName" : "emcc", "chaincodeId" : "blockparty", "network-config": { "orderer": { "url": "grpcs://orderer.emc.com:7050", "server-hostname": "orderer.emc.com", "tls_cacerts": "./crypto-config/ordererOrganizations/emc.com/orderers/orderer.emc.com/msp/tlscacerts/tlsca.emc.com-cert.pem" }, "org1": { "name": "Corp", "mspid": "CorpMSP", "username": "Admin", "peers": { "peer1": { "requests": "grpcs://peer0.corp.emc.com:7051", "events": "grpcs://peer0.corp.emc.com:7053", "server-hostname": "peer0.corp.emc.com", "tls_cacerts": "./crypto-config/peerOrganizations/corp.emc.com/peers/peer0.corp.emc.com/tls/server.crt" }, "admin": { "key": "./crypto-config/peerOrganizations/corp.emc.com/users/Admin@corp.emc.com/msp/keystore", "cert": "./crypto-config/peerOrganizations/corp.emc.com/users/Admin@corp.emc.com/msp/signcerts" } }, ``` Any thoughts on which certificate I am supposed to use to properly submit the transaction proposal and then the transaction?

bertrand_sirodot (Thu, 28 Sep 2017 01:41:44 GMT):
Hi everyone, thanks to the help from @bretharrison , I managed to get going on using the SDK to invoke a function from an installed chaincode, but I have ran into another issue. The javascript program I built was a mix of the test/integration/client.js file and the fabcar/invoke.js. When I run the script though, I am getting the following error when running the transaction proposal: `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority` . I know my issue is due to not using the right certificate, but I don't know where I am not using that correct certificate. I created the crypto-config directory using the following script: ```../src/github.com/hyperledger/fabric/build//bin/cryptogen generate --config=./crypto-config.yaml ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel --outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/CorpMSPanchors.tx -channelID $CHANNEL_NAME -asOrg CorpMSP ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/EngMSPanchors.tx -channelID $CHANNEL_NAME -asOrg EngMSP ``` . Here is the code where I add my peer and my channel: ``` let data = fs.readFileSync(network[org].peers['peer1']['tls_cacerts']); var peer = client.newPeer( network[org].peers['peer1'].requests, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] }); console.log("- Peer set up, setting up channel"); channel = client.newChannel(utils.getConfigSetting('channelName')); channel.addPeer(peer); data = fs.readFileSync(network.orderer['tls_cacerts']); channel.addOrderer(client.newOrderer(network.orderer['url']), { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network.orderer['server-hostname'] }); target.push(peer); ``` and here is the configuration of my network: ``` { "tmpdir": "/tmp/hfc_test_kvs", "channelName" : "emcc", "chaincodeId" : "blockparty", "network-config": { "orderer": { "url": "grpcs://orderer.emc.com:7050", "server-hostname": "orderer.emc.com", "tls_cacerts": "./crypto-config/ordererOrganizations/emc.com/orderers/orderer.emc.com/msp/tlscacerts/tlsca.emc.com-cert.pem" }, "org1": { "name": "Corp", "mspid": "CorpMSP", "username": "Admin", "peers": { "peer1": { "requests": "grpcs://peer0.corp.emc.com:7051", "events": "grpcs://peer0.corp.emc.com:7053", "server-hostname": "peer0.corp.emc.com", "tls_cacerts": "./crypto-config/peerOrganizations/corp.emc.com/peers/peer0.corp.emc.com/tls/server.crt" }, "admin": { "key": "./crypto-config/peerOrganizations/corp.emc.com/users/Admin@corp.emc.com/msp/keystore", "cert": "./crypto-config/peerOrganizations/corp.emc.com/users/Admin@corp.emc.com/msp/signcerts" } }, ``` Any thoughts on which certificate I am supposed to use to properly submit the transaction proposal and then the transaction?

bertrand_sirodot (Thu, 28 Sep 2017 01:41:44 GMT):
Hi everyone, thanks to the help from @bretharrison , I managed to get going on using the SDK to invoke a function from an installed chaincode, but I have ran into another issue. The javascript program I built was a mix of the test/integration/client.js file and the fabcar/invoke.js. When I run the script though, I am getting the following error when running the transaction proposal: `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority` . I know my issue is due to not using the right certificate, but I don't know where I am not using that correct certificate. I created the crypto-config directory using the following script: ```../src/github.com/hyperledger/fabric/build//bin/cryptogen generate --config=./crypto-config.yaml ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel --outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/CorpMSPanchors.tx -channelID $CHANNEL_NAME -asOrg CorpMSP ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/EngMSPanchors.tx -channelID $CHANNEL_NAME -asOrg EngMSP ``` . Here is the code where I add my peer and my channel: ``` let data = fs.readFileSync(network[org].peers['peer1']['tls_cacerts']); var peer = client.newPeer( network[org].peers['peer1'].requests, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] }); console.log("- Peer set up, setting up channel"); channel = client.newChannel(utils.getConfigSetting('channelName')); channel.addPeer(peer); data = fs.readFileSync(network.orderer['tls_cacerts']); channel.addOrderer(client.newOrderer(network.orderer['url']), { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network.orderer['server-hostname'] }); target.push(peer); ``` and here is the configuration of my network: ``` { "tmpdir": "/tmp/hfc_test_kvs", "channelName" : "mychannel", "chaincodeId" : "blockparty", "network-config": { "orderer": { "url": "grpcs://orderer.example.com:7050", "server-hostname": "orderer.example.com", "tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" }, "org1": { "name": "Corp", "mspid": "CorpMSP", "username": "Admin", "peers": { "peer1": { "requests": "grpcs://peer0.corp.example.com:7051", "events": "grpcs://peer0.corp.example.com:7053", "server-hostname": "peer0.corp.example.com", "tls_cacerts": "./crypto-config/peerOrganizations/corp.example.com/peers/peer0.corp.example.com/tls/server.crt" }, "admin": { "key": "./crypto-config/peerOrganizations/corp.example.com/users/Admin@corp.example.com/msp/keystore", "cert": "./crypto-config/peerOrganizations/corp.example.com/users/Admin@corp.example.com/msp/signcerts" } }, ``` Any thoughts on which certificate I am supposed to use to properly submit the transaction proposal and then the transaction?

bertrand_sirodot (Thu, 28 Sep 2017 01:41:44 GMT):
Hi everyone, thanks to the help from @bretharrison , I managed to get going on using the SDK to invoke a function from an installed chaincode, but I have ran into another issue. The javascript program I built was a mix of the test/integration/client.js file and the fabcar/invoke.js. When I run the script though, I am getting the following error when running the transaction proposal: `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority` . I know my issue is due to not using the right certificate, but I don't know where I am not using that correct certificate. I created the crypto-config directory using the following script: ```../src/github.com/hyperledger/fabric/build//bin/cryptogen generate --config=./crypto-config.yaml ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel --outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/CorpMSPanchors.tx -channelID $CHANNEL_NAME -asOrg CorpMSP ../src/github.com/hyperledger/fabric/build//bin/configtxgen --profile Channel -outputAnchorPeersUpdate ./channel-artifacts/EngMSPanchors.tx -channelID $CHANNEL_NAME -asOrg EngMSP ``` . Here is the code where I add my peer and my channel: ``` let data = fs.readFileSync(network[org].peers['peer1']['tls_cacerts']); var peer = client.newPeer( network[org].peers['peer1'].requests, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] }); console.log("- Peer set up, setting up channel"); channel = client.newChannel(utils.getConfigSetting('channelName')); channel.addPeer(peer); data = fs.readFileSync(network.orderer['tls_cacerts']); channel.addOrderer(client.newOrderer(network.orderer['url']), { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network.orderer['server-hostname'] }); target.push(peer); ``` and here is the configuration of my network: ``` { "tmpdir": "/tmp/hfc_test_kvs", "channelName" : "mychannel", "chaincodeId" : "blockparty", "network-config": { "orderer": { "url": "grpcs://orderer.example.com:7050", "server-hostname": "orderer.example.com", "tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" }, "org1": { "name": "Corp", "mspid": "CorpMSP", "username": "Admin", "peers": { "peer1": { "requests": "grpcs://peer0.corp.example.com:7051", "events": "grpcs://peer0.corp.example.com:7053", "server-hostname": "peer0.corp.example.com", "tls_cacerts": "./crypto-config/peerOrganizations/corp.example.com/peers/peer0.corp.example.com/tls/server.crt" }, "admin": { "key": "./crypto-config/peerOrganizations/corp.example.com/users/Admin@corp.example.com/msp/keystore", "cert": "./crypto-config/peerOrganizations/corp.example.com/users/Admin@corp.example.com/msp/signcerts" } }, ``` Any thoughts on which certificate I am supposed to use to properly submit the transaction proposal and then the transaction?

bh4rtp (Thu, 28 Sep 2017 01:59:13 GMT):
@Vadim https://pastebin.com/tiBE1mSv is sdk client, peer, orderer logs with timestamp. i found that the node sdk may have process the transaction not correctly. it waits the transaction having been written into the block and then return to process the next transaction. this will ignore the batch and buffering mechanism of the orderer and decrease the tps of the fabric network.

bh4rtp (Thu, 28 Sep 2017 01:59:13 GMT):
@Vadim https://pastebin.com/tiBE1mSv is sdk client, peer, orderer logs with timestamp. i found that the node sdk may have process the transaction not correctly. it waits the transaction having been written into the block and then return to process the next transaction. this will ignore the batch mechanism of the orderer and decrease the tps of the fabric network.

bh4rtp (Thu, 28 Sep 2017 01:59:13 GMT):
@Vadim i found that the node sdk may have process the transaction not correctly. it waits the transaction having been written into the block and then return to process the next transaction. this will ignore the batch mechanism of the orderer and decrease the tps of the fabric network. i asked this problem with @jyellick. he said he is certain that the SDKs all support the peer eventing mechanism, and many of the tests use this mechanism to wait for a transaction to commit.

bh4rtp (Thu, 28 Sep 2017 01:59:13 GMT):
@Vadim @jimthematrix i found that the node sdk may have process the transaction not correctly. it waits the transaction having been written into the block and then return to process the next transaction. this will ignore the batch mechanism of the orderer and decrease the tps of the fabric network. i asked this problem with @jyellick. he said he is certain that the SDKs all support the peer eventing mechanism, and many of the tests use this mechanism to wait for a transaction to commit. https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/invoke-transaction.js#L90-L123

DarshanBc (Thu, 28 Sep 2017 05:04:44 GMT):
How can I specify endorsement policy for balance transfer example

scott_xu (Thu, 28 Sep 2017 05:59:37 GMT):
Has joined the channel.

GiorgiBlockchain (Thu, 28 Sep 2017 06:06:35 GMT):
@DarshanBc That's also my concern.

GiorgiBlockchain (Thu, 28 Sep 2017 06:17:14 GMT):
I faced problem while interacting with chaincode on balance-transfer example with Postman API tool. Proposal is rejected by some reason. It happens with query or invoke methods. Bellow is the error from invoke: ```[2017-09-28 01:59:05.060] [DEBUG] SampleWebApp - Decoded from JWT token: username - Ricky, orgname - org1 [2017-09-28 01:59:05.061] [DEBUG] SampleWebApp - ==================== INVOKE ON CHAINCODE ================== [2017-09-28 01:59:05.061] [DEBUG] SampleWebApp - channelName : mychannel [2017-09-28 01:59:05.061] [DEBUG] SampleWebApp - chaincodeName : mycc [2017-09-28 01:59:05.061] [DEBUG] SampleWebApp - fcn : move [2017-09-28 01:59:05.061] [DEBUG] SampleWebApp - args : a,b,30 [2017-09-28 01:59:05.062] [DEBUG] invoke-chaincode - ============ invoke transaction on organization org1 ============ [2017-09-28 01:59:05.062] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-09-28 01:59:05.063] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-09-28 01:59:05.063] [DEBUG] Helper - [crypto_ecdsa_aes]: importKey - start [2017-09-28 01:59:05.063] [DEBUG] Helper - [crypto_ecdsa_aes]: importKey - have the key [Circular] [2017-09-28 01:59:05.064] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore resolving store [2017-09-28 01:59:05.064] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: e6366dd6ba503961f13522e7672a939a456812456cf6c07f8795660c0cd31a7f [2017-09-28 01:59:05.064] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: c5d9d2b4ef952358c2ce339a296719f725b0cab5ae07ed2e80b13f153b273a2e [2017-09-28 01:59:05.064] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-09-28 01:59:05.065] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore resolving store [2017-09-28 01:59:05.065] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue [2017-09-28 01:59:05.066] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: e6366dd6ba503961f13522e7672a939a456812456cf6c07f8795660c0cd31a7f [2017-09-28 01:59:05.067] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: c5d9d2b4ef952358c2ce339a296719f725b0cab5ae07ed2e80b13f153b273a2e [2017-09-28 01:59:05.067] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: e6366dd6ba503961f13522e7672a939a456812456cf6c07f8795660c0cd31a7f [2017-09-28 01:59:05.067] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: c5d9d2b4ef952358c2ce339a296719f725b0cab5ae07ed2e80b13f153b273a2e [2017-09-28 01:59:05.067] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: e6366dd6ba503961f13522e7672a939a456812456cf6c07f8795660c0cd31a7f [2017-09-28 01:59:05.069] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: c5d9d2b4ef952358c2ce339a296719f725b0cab5ae07ed2e80b13f153b273a2e [2017-09-28 01:59:05.069] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-09-28 01:59:05.069] [INFO] Helper - Successfully loaded member from persistence [2017-09-28 01:59:05.070] [DEBUG] invoke-chaincode - Sending transaction "{"_nonce":{"type":"Buffer","data":[42,190,204,23,210,193,145,22,135,62,160,209,130,207,187,94,22,48,49,166,95,80,151,234]},"_transaction_id":"497acba28c19d7192d4b2f40f5226f2349b65a798ac1c2f09a13f86e05e785d3"}" [2017-09-28 01:59:05.078] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/app/node_modules/fabric-client/lib/Peer.js:107:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/app/node_modules/fabric-client/lib/Peer.js:107:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-09-28 01:59:50.084] [ERROR] invoke-chaincode - transaction proposal was bad [2017-09-28 01:59:50.084] [ERROR] invoke-chaincode - transaction proposal was bad [2017-09-28 01:59:50.084] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-09-28 01:59:50.084] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined ``` Any thoughts what is the cause?

Hangyu (Thu, 28 Sep 2017 06:19:35 GMT):
Has joined the channel.

wy (Thu, 28 Sep 2017 06:25:23 GMT):
Hi guys, i am seeing an issue where chaincode containers are restarting during invoke after being idle for a period of time, causing a timeout error. I am using docker swarm on Azure servers. Does anyone know what might be the problem here?

DarshanBc (Thu, 28 Sep 2017 06:32:27 GMT):
@GiorgiBlockchain time taken to execute few process differs from one system to other hence increase the value of Request_timeout in balance-transfer/node_modules/fabric-client/config/default.json

GiorgiBlockchain (Thu, 28 Sep 2017 06:36:40 GMT):
@DarshanBc You mean if I increase the Request_timeout it might help?

DarshanBc (Thu, 28 Sep 2017 06:38:58 GMT):
I can see you have only timedout errror which means after 45 seconds its eliminating assuming there is an infinite loop so if you dont have an infinite loop increasing timedout value should solve your problem

GiorgiBlockchain (Thu, 28 Sep 2017 06:46:27 GMT):
I think timeout causes something else, but I'll check it anyway.

Vadim (Thu, 28 Sep 2017 07:00:50 GMT):
@bh4rtp perhaps the script you reusing is waiting for transactions? From my experience, the node sdk does not wait for blocks unless you explicitly doing that. E.g. in the sendBroadcast (https://github.com/hyperledger/fabric-sdk-node/blob/release/fabric-client/lib/Orderer.js#L76) you see that it waits for the confirmation of the request, but it does it over promise, which should not block the nodejs event loop. So if you simultaneously execute something like `Promisel.all([channel.sendTransaction(tx1), channel.sendTransaction(tx2)])`, then tx1 and tx2 will be sent independently of each other and should end up in the same block.

Vadim (Thu, 28 Sep 2017 07:02:45 GMT):
@GiorgiBlockchain it's rejected because it fails to receive a reply within 45 seconds and timeouts. So for start, try to increase that timeout with `Client.setConfigSetting('request-timeout', 120000);`

ArnabChatterjee (Thu, 28 Sep 2017 07:08:40 GMT):
Hi, I had an error in my chaincode and it did not propagate to a exception in the promise of my SDK. Although I got the following stacktrace in console error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: unexpected end of JSON input) at /home/ubuntu/app-network/app-server/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: unexpected end of JSON input) at /home/ubuntu/app-network/app-server/node_modules/grpc/src/node/src/client.js:434:17 Any clues? Thanks.

gentios (Thu, 28 Sep 2017 07:10:23 GMT):
@ArnabChatterjee , do you encode devode JSON properly ?

gentios (Thu, 28 Sep 2017 07:10:33 GMT):
@ArnabChatterjee do you send a valid JSON to the chaincode ?

subbu165 (Thu, 28 Sep 2017 07:12:23 GMT):
HI, Regarding https://jira.hyperledger.org/browse/FAB-156, "Rest Wrapper Around SDK" So If I make use of this, I don't need to write any nodeSDK API to Deploy, Install, Instantiate and call the chaincode transactions that I develop. All can be accomplished by REST based only by writing a REST API?

ArnabChatterjee (Thu, 28 Sep 2017 07:12:33 GMT):
@gentios - I am aware of the fact that I had a faulty chaincode, I am just want to emphasise the fact that there was no exception thrown to my node js controller layer from the SDK. I saw this error logged in my console. I want my controller to fail so that I can handle the error accordingly.

gentios (Thu, 28 Sep 2017 07:13:22 GMT):
than you should handle this in your chaincode

gentios (Thu, 28 Sep 2017 07:13:24 GMT):
for example

gentios (Thu, 28 Sep 2017 07:13:56 GMT):
```err0 := json.Unmarshal([]byte(values), &vector) if err0 != nil { fmt.Println("error:", err0) }

gentios (Thu, 28 Sep 2017 07:14:18 GMT):
```if err0 != nil { return shim.error(" your error message") }

gentios (Thu, 28 Sep 2017 07:14:18 GMT):
```if err0 != nil { shim.error(" your error message") }

ArnabChatterjee (Thu, 28 Sep 2017 07:15:17 GMT):
@gentios Actually, I am developing an utility to deploy the chaincode using the SDK. So, if I wish to deploy the chaincode using the utility, my utility wont know that there was an error in the chaincode, unless I go and see the logs of my utility.

ArnabChatterjee (Thu, 28 Sep 2017 07:16:03 GMT):
Its just a simple case of error propagation.

gentios (Thu, 28 Sep 2017 07:16:29 GMT):
@ArnabChatterjee well that is a different case

gentios (Thu, 28 Sep 2017 07:16:38 GMT):
anyway, golang won't throw any error on this

gentios (Thu, 28 Sep 2017 07:16:48 GMT):
if it is compiled without error

gentios (Thu, 28 Sep 2017 07:17:14 GMT):
so your chaincode will be deployed succesfully

gentios (Thu, 28 Sep 2017 07:17:22 GMT):
and within testing it will fail

gentios (Thu, 28 Sep 2017 07:17:52 GMT):
because it won't get the request structure that is waiting for

ArnabChatterjee (Thu, 28 Sep 2017 07:17:59 GMT):
yes. And I want that the SDK should tell me that it has failed, rather than the GRPC module.

gentios (Thu, 28 Sep 2017 07:18:22 GMT):
@ArnabChatterjee you just can deploy it

gentios (Thu, 28 Sep 2017 07:18:29 GMT):
and than handle the error when calling it

gentios (Thu, 28 Sep 2017 07:18:33 GMT):
like I mentioned abouve

gentios (Thu, 28 Sep 2017 07:18:39 GMT):
if that helps

gentios (Thu, 28 Sep 2017 07:19:00 GMT):
because if you do a ```shim.Error

gentios (Thu, 28 Sep 2017 07:19:26 GMT):
you can catch it in ```try { }catch((e)){ }

ArnabChatterjee (Thu, 28 Sep 2017 07:23:25 GMT):
@gentios - okay. try catches are for runtime errors. what if I get compile time errors?

gentios (Thu, 28 Sep 2017 07:25:06 GMT):
@ArnabChatterjee your chaincode won't get deployed if you get compile errors

Vadim (Thu, 28 Sep 2017 07:25:26 GMT):
@ArnabChatterjee I was able to intercept all errors with SDK when you send the proposal: e.g. ``` channel.sendInstantiateProposal(...) .then(result => ) .catch(errr => )

gentios (Thu, 28 Sep 2017 07:25:28 GMT):
@ArnabChatterjee check this out for chaincode for developers

gentios (Thu, 28 Sep 2017 07:25:28 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html

Vadim (Thu, 28 Sep 2017 07:26:42 GMT):
`sendTransactionProposal(tx).catch(err => ...)` will execute catch when you do return shim.Error() in your chaincode

Vadim (Thu, 28 Sep 2017 07:26:42 GMT):
`sendTransactionProposal(tx).catch(err => ...)` will execute catch when you do `return shim.Error()` in your chaincode

ArnabChatterjee (Thu, 28 Sep 2017 07:30:21 GMT):
@Vadim & @gentios - Thanks so much. I was using the balance transfer example as a base. I will check again if it works for you. Maybe here https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/install-chaincode.js#L40 , I need to add the catch block? Right?

Vadim (Thu, 28 Sep 2017 07:31:10 GMT):
this part ``` (err) => { logger.error('Failed to send install proposal due to error: ' + err.stack ? err.stack : err); throw new Error('Failed to send install proposal due to error: ' + err.stack ? err.stack : err); } ``` is the catch block

Vadim (Thu, 28 Sep 2017 07:31:10 GMT):
this part ``` (err) => { logger.error('Failed to send install proposal due to error: ' + err.stack ? err.stack : err); throw new Error('Failed to send install proposal due to error: ' + err.stack ? err.stack : err); } ``` is the equivalent of the catch block

gentios (Thu, 28 Sep 2017 07:31:27 GMT):
@ArnabChatterjee well yeah if ```return client.installChaincode(request); responses with an promies you can do

gentios (Thu, 28 Sep 2017 07:31:55 GMT):
```.then(()=>{ }).catch((e){ console.log(e) })

ArnabChatterjee (Thu, 28 Sep 2017 07:33:00 GMT):
Yes. Thanks a lot @Vadim & @gentios .

GiorgiBlockchain (Thu, 28 Sep 2017 07:54:19 GMT):
@DarshanBc @Vadim I increased the time, but got the same error: ```[2017-09-28 07:43:44.513] [INFO] Query - b now has Error: REQUEST_TIMEOUT after the move error: [Peer.js]: sendProposal - timed out after:120000 error: [Peer.js]: sendProposal - timed out after:120000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/app/node_modules/fabric-client/lib/Peer.js:107:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/usr/src/app/node_modules/fabric-client/lib/Peer.js:107:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)``` Any other solution? From the log we can see that it still prints out the Info Query: `[INFO] Query - b now has ..` but with error

sampath06 (Thu, 28 Sep 2017 09:34:36 GMT):
What is the procedure to upgrade a chaincode to a new version?

asadhayat (Thu, 28 Sep 2017 09:44:32 GMT):
Has joined the channel.

Vadim (Thu, 28 Sep 2017 10:03:47 GMT):
@sampath06 same as instantiate, but use upgrade instead

sampath06 (Thu, 28 Sep 2017 10:17:56 GMT):
@Vadim thanks. got it.

subbu165 (Thu, 28 Sep 2017 13:13:49 GMT):
HI, Regarding https://jira.hyperledger.org/browse/FAB-156, "Rest Wrapper Around SDK" So If I make use of this, I don't need to write any nodeSDK API to Deploy, Install, Instantiate and call the chaincode transactions that I develop. All can be accomplished by REST based only by writing a REST API?

gentios (Thu, 28 Sep 2017 13:21:36 GMT):
@subbu165 it existed for the Hyperledger Fabric 0.6 version the REST API

subbu165 (Thu, 28 Sep 2017 13:22:21 GMT):
@gentios yeah I know. But this JIRA talks about V1.0

mastersingh24 (Thu, 28 Sep 2017 13:40:42 GMT):
@subbu165 - https://github.com/hyperledger/fabric-sdk-rest

subbu165 (Thu, 28 Sep 2017 13:43:22 GMT):
@mastersingh24 I got that URL. But can you please confirm my understanding whether "If I make use of this, I don't need to write any nodeSDK API to Deploy, Install, Instantiate and call the chaincode transactions that I develop. All can be accomplished by REST based code only by writing a REST API?"

mastersingh24 (Thu, 28 Sep 2017 13:50:05 GMT):
looks like all of those functions are in scope: https://docs.google.com/document/d/1Kafw06IwtBbKFrUm8Hnwk8XYW7SyuqVbWad5VrPmvb8/edit#heading=h.3o7alnk

subbu165 (Thu, 28 Sep 2017 14:13:23 GMT):
Ok Thanks.

bertrand_sirodot (Thu, 28 Sep 2017 14:31:56 GMT):
Hi, as per my message above, I am having an issue with using the wrong certificate when submitting a transaction proposal. Any idea which certificate I should be using?

yedendra (Thu, 28 Sep 2017 17:51:09 GMT):
will the following warning be addressed in the next SDK ? ```npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in. npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated wrench@1.3.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years. ```

prmdmshra (Thu, 28 Sep 2017 19:52:33 GMT):
Do we have a sample web app/demo to use the Fabric SDK? I need to start using the SDK to deploy chain code and query the network.

prmdmshra (Thu, 28 Sep 2017 19:52:33 GMT):
Do we have a sample web app/demo to use the Fabric SDK? I need to start using the SDK to deploy chain code and query the network. Kindly suggest.

prmdmshra (Thu, 28 Sep 2017 19:52:33 GMT):
Do we have a sample web app/demo to use the Fabric SDK? I need to start using the SDK to deploy chain code and query the network. Kindly suggest.

bretharrison (Thu, 28 Sep 2017 23:30:42 GMT):
@yedendra Yes those will be addressed

yedendra (Thu, 28 Sep 2017 23:30:59 GMT):
@bretharrison thank you!

bertrand_sirodot (Fri, 29 Sep 2017 00:33:32 GMT):
@prmdmshra : If you clone the fabric-samples github repo, there are a couple of examples of the Fabric SDK, primarily in the fabcar and the balance-transfer directories.

jy (Fri, 29 Sep 2017 03:11:39 GMT):
Has joined the channel.

GiorgiBlockchain (Fri, 29 Sep 2017 03:26:12 GMT):

Message Attachments

GiorgiBlockchain (Fri, 29 Sep 2017 03:26:26 GMT):
Hi everyone. I'm reposting my issue. I was tweaking around, but couldn't figure out what is the problem.

GiorgiBlockchain (Fri, 29 Sep 2017 03:28:42 GMT):
I read that there was a bug: https://jira.hyperledger.org/browse/FAB-5154 but it was solved on Hyperledger v1.0.1. How can I know what version I am using, v1.0.0 or v1.0.1? Any suggestions are appreciated!

GiorgiBlockchain (Fri, 29 Sep 2017 03:31:15 GMT):
P.S. I'm using balance-transfer example. My Docker version 17.09.0-ce; docker-compose version 1.11.2. Node: Boron.

GiorgiBlockchain (Fri, 29 Sep 2017 03:33:21 GMT):
network-config.json ca ip address(org1, org2): My Ubuntu server ip Other ips like Orderers and peers (requests, events): localhost

GiorgiBlockchain (Fri, 29 Sep 2017 03:33:21 GMT):
network-config.json ca ip address(org1, org2): My Ubuntu server ip Other ips like Orderer and peers (requests, events): localhost

CodeReaper (Fri, 29 Sep 2017 04:41:31 GMT):
Hey, I've been registering and enrolling a user in my demo app. What I noticed is that every time I enroll him the public key I extracted from the user certificate in the chaincode was different ever time. i basically remove the check if the user is enrolled already and enrolled him anyway. Why does it send me different public Key?? I want to map all users based on the hash of public key my chaincode is getting. Real dilemma, any help appreciated.

Vadim (Fri, 29 Sep 2017 07:12:52 GMT):
@CodeReaper because enroll procedure generates a new cert for a user

gentios (Fri, 29 Sep 2017 10:09:09 GMT):
is it ok to all orderers run in one port :7050 ? I am getting a ``` error : Error: SERVICE_UNAVAILABLE ``` when trying to send requests from client side ``` error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone ``` any help on this ?

mna2017 (Fri, 29 Sep 2017 10:22:38 GMT):
Hi All, i have cloned the fabcar demo for nodeSDK. I have customised query.js. When I test query.js, I keep getting certificate related error. Can somebody please explaing 1) Where this certificates will be stored 2) How to get this certificate. Please note that I am running the blockchain on an iBM container(kubernetes).

mna2017 (Fri, 29 Sep 2017 10:25:01 GMT):

Message Attachments

mna2017 (Fri, 29 Sep 2017 10:29:50 GMT):
When I leave the "./creds" directory empty, the error pattern changes. When creds is empty I get hte following error

mna2017 (Fri, 29 Sep 2017 10:30:20 GMT):

Message Attachments

prmdmshra (Fri, 29 Sep 2017 11:36:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BTxqRNDqAhDfCfXfn) @bertrand_sirodot Thanks for the response! I am getting the following error on launching http://localhost:4000. Kindly suggest UnauthorizedError: No authorization token was found at middleware (/home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express-jwt/lib/index.js:76:21) at /home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express-unless/index.js:47:5 at Layer.handle [as handle_request] (/home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:317:13) at /home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:335:12) at next (/home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:275:10) at urlencodedParser (/home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/body-parser/lib/types/urlencoded.js:91:7) at Layer.handle [as handle_request] (/home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/pwc/Desktop/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:317:13)

gentios (Fri, 29 Sep 2017 12:20:36 GMT):
guys does anyone know why this error is happenning ?

gentios (Fri, 29 Sep 2017 12:20:36 GMT):
error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone

bertrand_sirodot (Fri, 29 Sep 2017 14:40:49 GMT):
@prmdmshra : Hi, can you please run `docker ps` and post the output? Also, how did you start the application? Did you run `./runApp.sh` or did you do `docker-compose -f artifacts/docker-compose.yaml up` and then `npm install` and then `PORT=4000 node app`?

prmdmshra (Fri, 29 Sep 2017 18:08:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MB5MsWLtXx4mBH862) @bertrand_sirodot Please find below the output of docker ps: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 547b456a723b dev-peer0.org1.example.com-mycc-v0 "chaincode -peer.a..." 16 seconds ago Up 15 seconds dev-peer0.org1.example.com-mycc-v0 27b31aad9b52 dev-peer1.org1.example.com-mycc-v0 "chaincode -peer.a..." 16 seconds ago Up 15 seconds dev-peer1.org1.example.com-mycc-v0 b49af14e4311 hyperledger/fabric-peer "peer node start" About a minute ago Up About a minute 0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp peer1.org1.example.com 06852ab8dcd0 hyperledger/fabric-peer "peer node start" About a minute ago Up About a minute 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com e9fe7b161eb0 hyperledger/fabric-peer "peer node start" About a minute ago Up About a minute 0.0.0.0:8056->7051/tcp, 0.0.0.0:8058->7053/tcp peer1.org2.example.com 3e6ed79e7586 hyperledger/fabric-peer "peer node start" About a minute ago Up About a minute 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.org2.example.com 9753b9f0893c hyperledger/fabric-ca "sh -c 'fabric-ca-..." About a minute ago Up About a minute 0.0.0.0:7054->7054/tcp ca_peerOrg1 5ec88ef5fe05 hyperledger/fabric-ca "sh -c 'fabric-ca-..." About a minute ago Up About a minute 0.0.0.0:8054->7054/tcp ca_peerOrg2 7a8a825169ad hyperledger/fabric-orderer "orderer" About a minute ago Up About a minute 0.0.0.0:7050->7050/tcp orderer.example.com I had launched http://localhost:4000 after executing ./runApp.sh. The error 'UnauthorizedError' is also displayed on launching the network using option 1(i.e docker-compose -f artifacts/docker-compose.yaml up)

bertrand_sirodot (Sat, 30 Sep 2017 03:50:51 GMT):
@prmdmshra I am not sure what is happening here. It seems to be an issue with JWT. At least that's what a quick google of the issue brings up.

sampath06 (Sat, 30 Sep 2017 03:58:51 GMT):
@prmdmshra How are you running the tests? You need to pass in the authentication token in the headers

prmdmshra (Sat, 30 Sep 2017 06:43:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hX37yMrX72QvPH8H6) @bertrand_sirodot I tried some of the solutions regarding Jwt, but the issue still persists. Could you please suggest whether I need to pass the token somewhere in the config files to launch the web url?

prmdmshra (Sat, 30 Sep 2017 06:43:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hX37yMrX72QvPH8H6) @bertrand_sirodot I tried some of the solutions regarding Jwt, but the issue still persists. Could you please suggest whether I need to pass the token somewhere in the config files to launch the web url as suggested in https://stackoverflow.com/questions/46338200/unauthorizederror-while-connecting-node-js-express-api-through-postman-on-hyperl

prmdmshra (Sat, 30 Sep 2017 06:45:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WqXyT6PmMrRwJGFyE) @sampath06 I am able to run all the tests using the rest APIs. I am unable to launch the Sample Web app for the same :-(

prmdmshra (Sat, 30 Sep 2017 06:45:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WqXyT6PmMrRwJGFyE) @sampath06 I am able to run all the tests using the rest APIs. I am unable to launch the Sample Web app for the same :-( I am looking to create a Web App using Node SDK to deploy chain codes and query the blockchain fabric network.

sampath06 (Sun, 01 Oct 2017 02:03:37 GMT):
@prmdmshra How are you passing the authentication token. Can you check the network call being made. If you dont find the issue, copy the network call and paste it here

sampath06 (Sun, 01 Oct 2017 02:16:00 GMT):
For the webapp you should initiate the login api and save the token returned by the app. You should then use that token in the header of the subsequent calls

wy (Mon, 02 Oct 2017 01:30:57 GMT):
Hello, is there anyway to retrieve a list of all participants within a channel?

Rick (Mon, 02 Oct 2017 09:23:51 GMT):
Has joined the channel.

gentios (Mon, 02 Oct 2017 14:17:39 GMT):
I am getting this error when sending transaction from client side

gentios (Mon, 02 Oct 2017 14:17:42 GMT):
any idea why

gentios (Mon, 02 Oct 2017 14:17:43 GMT):
```error : Error: SERVICE_UNAVAILABLE error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone

sam.doyle (Mon, 02 Oct 2017 14:26:57 GMT):
I have a user that is an admin on a peer on HSBN, and I can install/instantiate/upgrade chaincode on the peer using this user in the HSBN ui. Using the sdk, I only have access to the ca admin, which is not authorized to install chaincode on the peer. Using the node sdk, is there a way to get the certificate for the peer admin user from the CA, so that I can install chaincode on the peer using it's admin user?

gentios (Mon, 02 Oct 2017 14:28:46 GMT):
@sam.doyle check this https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/helper.js#L159

sam.doyle (Mon, 02 Oct 2017 14:32:05 GMT):
That method is using the certificate authority's admin user, correct?

sam.doyle (Mon, 02 Oct 2017 15:41:09 GMT):
Using the admin user returned from getAdminUser doesn't work for installing chaincode on HSBN. We need a user that has admin authority on the peer, which seems to be different

Alex (Mon, 02 Oct 2017 19:24:51 GMT):
Has joined the channel.

Alex (Mon, 02 Oct 2017 19:25:04 GMT):
Once the NodeSDK gets ProposalResponse back, how can it decode the encoded ProposalResponsePayload protobuf message? https://fabric-sdk-node.github.io/global.html#ProposalResponse__anchor

jrosmith (Mon, 02 Oct 2017 19:27:49 GMT):
@sam.doyle use `getOrgAdmin` from the balanceTransfer sdk example

jrosmith (Mon, 02 Oct 2017 19:28:22 GMT):
https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/helper.js#L270

jrosmith (Mon, 02 Oct 2017 19:34:12 GMT):
@Alex its just an array of bytes, parse it like you would any other buffer in node

jrosmith (Mon, 02 Oct 2017 19:35:58 GMT):
@gentios Connect failed means its not connected to the orderer, make sure your channel_network_config is pointed to the right address and that the orderer is indeed running.

Alex (Mon, 02 Oct 2017 19:37:01 GMT):
@jrosmith but the documentation states that it is encoded, that doesn't have to be decoded first?

jrosmith (Mon, 02 Oct 2017 19:41:35 GMT):
@Alex not that I've seen, just grab the buffer and call `.toString()` on it

Alex (Mon, 02 Oct 2017 20:34:18 GMT):
@jrosmith I did that and I am able to get the following ```============================================================= ���x�o�[;� ] �/X�����c�]|w�*F lR fabcarHF CAR10={"make":"Chevy","model":"Volt","colour":"Red","owner":"Nick"} lscc fabcar1.0 =============================================================```

Alex (Mon, 02 Oct 2017 20:34:30 GMT):
This is for fabcar tutorial example

Alex (Mon, 02 Oct 2017 20:34:54 GMT):
from printing out `proposalResponses[0].payload.toString()`

Alex (Mon, 02 Oct 2017 20:35:14 GMT):
is there a way to decode the encoded characters in here?

Alex (Mon, 02 Oct 2017 20:46:17 GMT):
Also according to the Hyperledger docs ```Since queries do not change ledger state, the client application will typically not submit these read-only transactions for ordering, validation, and commit. Although not typical, the client application can choose to submit the read-only transaction for ordering, validation, and commit, for example if the client wants auditable proof on the ledger chain that it had knowledge of specific ledger state at a certain point in time.``` There is a way to create a block with query transactions, does anyone know how this is accomplished using the Node SDK?

gauthampamu (Mon, 02 Oct 2017 23:04:00 GMT):
Fabric Node SDK Version: What version should you use when use Fabric v1.0.1, should we also use same version or can you cause higher version v1.0.2.

PushpalathaHiremath (Tue, 03 Oct 2017 05:07:40 GMT):
Hi All, I'm trying to use https://github.com/hyperledger/fabric-sdk-rest to call the fabric api's. I did set the GOPATH environment variable and given the relative path for the go chain code. But still i face the following issue. Can anyone give me a hint of what might be the issue? what could be missing? ERRO 00d Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/pmechainwalk: cannot find package "github.com/pmechainwalk" in any of: peer0Org1 | /opt/go/src/github.com/pmechainwalk (from $GOROOT) peer0Org1 | /chaincode/input/src/github.com/pmechainwalk (from $GOPATH) peer0Org1 | /opt/gopath/src/github.com/pmechainwalk

jethdg (Tue, 03 Oct 2017 07:05:14 GMT):
Anyone already encountered timeout error on EventHub? What would be the cause? ``` Error: EventHub has been shutdown at EventHub.disconnect (/app/node_modules/fabric-client/lib/EventHub.js:372:20) at Timeout._onTimeout (/app/invoke.js:94:20) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) Failed to send transaction and get notifications within the timeout period. ```

gentios (Tue, 03 Oct 2017 11:52:14 GMT):
@jethdg when you don't recevie a response from the orderer

gentios (Tue, 03 Oct 2017 11:52:31 GMT):
``` return Promise.all([txPromise, eventPromises])

bretharrison (Tue, 03 Oct 2017 12:11:39 GMT):
@gauthampamu It is best to keep Fabric and NodeSDK at the same version

bretharrison (Tue, 03 Oct 2017 12:15:20 GMT):
@wy There is no way for a NodeSDK fabric client to query for the peers (participants) on a channel. There is a way to ask for all the channels of a peer.

satheeshk (Tue, 03 Oct 2017 14:04:08 GMT):
Hello Guys, there is a ticket created https://jira.hyperledger.org/browse/BE-41

satheeshk (Tue, 03 Oct 2017 14:06:04 GMT):
Can one of you please take a look at it see if its valid for Node-SDK and take it up ?

bretharrison (Tue, 03 Oct 2017 14:30:33 GMT):
@satheeshk The Channel queryByChaincode() method is really just a convenience method that wraps the sendTransactionProposal(). So if the full response object is required and the proposal object then just use the sendTransactionProposal() method.

bretharrison (Tue, 03 Oct 2017 15:09:43 GMT):
@Alex How important is it to have a decode of the proposal results ... you could open a JIRA to have as part of the NodeSDK or would you just want a way to do it in the application code ?

bretharrison (Tue, 03 Oct 2017 15:09:43 GMT):
@Alex How important is it to have a decode of the proposal results ... you could open a JIRA to have as part of the NodeSDK or would you just want a way to do it in the application code ? Could also run the protobuf translator tool of fabric --- http://hyperledger-fabric.readthedocs.io/en/latest/configtxlator.html

Alex (Tue, 03 Oct 2017 15:56:25 GMT):
@bretharrison I am trying to find a way to decode proposal results just using the functions of Node SDK

bretharrison (Tue, 03 Oct 2017 15:57:04 GMT):
@Alex Those function do not exist, they would have to be added

Alex (Tue, 03 Oct 2017 15:59:17 GMT):
@bretharrison Thanks for the clarification! What about the functions for creating a block in the chain with query transactions using the Node SDK? Does that exist? The docs say that can be done.

bretharrison (Tue, 03 Oct 2017 16:00:15 GMT):
That is just using the normal sendTransactionProposal() and sendTransacton()

bretharrison (Tue, 03 Oct 2017 16:00:15 GMT):
That is just using the normal sendTransactionProposal() and sendTransaction()

bretharrison (Tue, 03 Oct 2017 16:00:15 GMT):
@Alex That is just using the normal sendTransactionProposal() and sendTransaction()

Alex (Tue, 03 Oct 2017 17:37:54 GMT):
@bretharrison so you are saying that whenever sendTransactionProposal() and sendTransaction() happens, it gets recorded on the chain *even for query transactions*. This was not the way in HL v0.6 if I am correct.

Alex (Tue, 03 Oct 2017 17:38:24 GMT):
And this means that there isn't really a _switch_ to turn this on or off for query, it always happens?

bretharrison (Tue, 03 Oct 2017 17:49:27 GMT):
@Alex Yes this is different than 0.6 ... keep in mind that there is a two phase for getting recorded ... getting the proposals signed by peers, then having orderer process it to be committed. Commits only happen on the sendTransaction() which takes as input the results of a one or more sendTransactionProposal(), so if the transaction was a query and it gets sent to the orderer (with the sendTransaction() method) then it will get committed.

bretharrison (Tue, 03 Oct 2017 17:50:47 GMT):
The queryByChaincode() method only does the sendTransactionProposal() and does not send the orderer.

bretharrison (Tue, 03 Oct 2017 17:50:47 GMT):
The queryByChaincode() method only does the sendTransactionProposal() and does not send to the orderer.

Alex (Tue, 03 Oct 2017 18:04:59 GMT):
@bretharrison Okay thanks, that makes sense

jethdg (Wed, 04 Oct 2017 03:28:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4Apztu5ScDQmK7MJx) @gentios Was able to fix it by adjusting orderer's batch timeout in configtx.yaml

rock_martin (Wed, 04 Oct 2017 06:01:56 GMT):
HI ,Can we access transaction id of the parent invocation of the transaction in chaincode?

levinkwong (Wed, 04 Oct 2017 07:12:09 GMT):
@jimthematrix https://github.com/hyperledger/fabric-sdk-node/blob/release/fabric-client/lib/EventHub.js#L560-L561 From the source code, a chaincode (with same ccid) can only have 1 registrant, this mean we cannot have multiple handlers for different events with same ccid, different event name? Is this by design or a bug?

Vadim (Wed, 04 Oct 2017 07:23:32 GMT):
@levinkwong https://github.com/hyperledger/fabric-sdk-node/blob/release/fabric-client/lib/EventHub.js#L808

Vadim (Wed, 04 Oct 2017 07:24:14 GMT):
when the event is fired, it finds the chaincode handler in the table and then checks whether there is an event handler registered for the event which was fired

Vadim (Wed, 04 Oct 2017 07:24:58 GMT):
so you can have multiple handlers for the same ccid

levinkwong (Wed, 04 Oct 2017 07:29:09 GMT):
@Vadim I see. Thanks. Actually we are facing a problem that only 1 event message returned (we sent 2) and are debugging. Sorry that I pointed out wrong.

Vadim (Wed, 04 Oct 2017 07:29:41 GMT):
@levinkwong you generate more than one event in your chaincode?

levinkwong (Wed, 04 Oct 2017 07:30:06 GMT):
@Vadim Yes, we are.

levinkwong (Wed, 04 Oct 2017 07:46:07 GMT):
@Vadim I have the following chaincode: ``` stub.SetEvent("event_test_2", []byte("event_test_2")) stub.SetEvent("event_test_1", []byte("event_test_1")) ``` And SDK code (I show the log of my registrant): ``` LEVIN TEST: Set { ChainCodeCBE { ccid: 'cc', eventNameFilter: /event_test_1/, onEvent: [Function: testEvent1Callback], onError: [Function] }, ChainCodeCBE { ccid: 'cc', eventNameFilter: /event_test_2/, onEvent: [Function: testEvent2Callback], onError: [Function] } } ``` When I run invoke the chaincode, only message 1 received, if I change the sequence to : ``` stub.SetEvent("event_test_1", []byte("event_test_1")) stub.SetEvent("event_test_2", []byte("event_test_2")) ``` Only message 2 received.... Any idea.....

Vadim (Wed, 04 Oct 2017 07:47:08 GMT):
@levinkwong never tried this, but I'd try to see whether both events are actually in the block or only the last one

levinkwong (Wed, 04 Oct 2017 07:47:26 GMT):
@Vadim How can I check the block content?

Vadim (Wed, 04 Oct 2017 07:48:40 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/release/fabric-client/lib/EventHub.js#L802 this looks suspicious, as if SDK expects only one event there

Vadim (Wed, 04 Oct 2017 07:49:13 GMT):
enable debug in sdk and check what it prints at the line 803

levinkwong (Wed, 04 Oct 2017 07:59:40 GMT):
@Vadim ``` debug: [EventHub.js]: _processChainCodeOnEvents block=11 debug: [EventHub.js]: _processChainCodeOnEvents - trans index=0 debug: [EventHub.js]: _processChainCodeOnEvents - ccEvent [object Object] ```

Vadim (Wed, 04 Oct 2017 08:00:38 GMT):
@levinkwong perhaps change `logger.debug('_processChainCodeOnEvents - ccEvent %s',ccEvent);` to `logger.debug('_processChainCodeOnEvents - ccEvent', JSON.stringify(ccEvent));`

levinkwong (Wed, 04 Oct 2017 08:06:53 GMT):
@Vadim ``` debug: [EventHub.js]: _processChainCodeOnEvents block=12 debug: [EventHub.js]: _processChainCodeOnEvents - trans index=0 debug: [EventHub.js]: _processChainCodeOnEvents - ccEvent {"chaincode_id":"agreementBilling-cc","tx_id":"9f8b045f7a96b58ea15f71d1cea93c064fee44f0c5795c59a1260b437793ef0b","event_name":"event_test_1","payload":{"type":"Buffer","data":[101,118,101,110,116,95,116,101,115,116,95,49]}} ``` Only one~~

Vadim (Wed, 04 Oct 2017 08:07:25 GMT):
@levinkwong then I guess only the last event gets into the tx

levinkwong (Wed, 04 Oct 2017 08:07:41 GMT):
So thats the bug from fabric ....

Vadim (Wed, 04 Oct 2017 08:07:52 GMT):
not sure this is bug, probably by design

Vadim (Wed, 04 Oct 2017 08:09:11 GMT):
but I agree, than perhaps sometimes one event is not enough

Vadim (Wed, 04 Oct 2017 08:10:39 GMT):
@levinkwong https://jira.hyperledger.org/browse/FAB-4603

levinkwong (Wed, 04 Oct 2017 08:13:50 GMT):
SOSAD

levinkwong (Wed, 04 Oct 2017 08:14:26 GMT):
We also find that, if I have a chaincode A which invoke chaincode B and chaincode B is emitting event. It will not work.

Vadim (Wed, 04 Oct 2017 08:16:38 GMT):
@levinkwong found this on the fabric channel https://chat.hyperledger.org/channel/fabric?msg=cjbWL99B93bK2Gh7s

levinkwong (Wed, 04 Oct 2017 08:17:22 GMT):
@Vadim Thanks so much, how do you find this so fast?

Vadim (Wed, 04 Oct 2017 08:17:35 GMT):
@levinkwong years of training

Dpkkmr (Wed, 04 Oct 2017 08:39:44 GMT):
Hi I am facing a strange issue. When I try to execute a transaction with 15~20 min gap between each I get an error for the first time, same transaction when I invoke again I get another error but third time every thing works fine. Error when I invoke for the first time: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) at /root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:434:17 [2017-10-04 02:38:49.389] [DEBUG] invoke-chaincode - [ { Error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) at /root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:434:17 code: 2, metadata: Metadata { _internal_repr: {} } } ] [2017-10-04 02:38:49.390] [ERROR] invoke-chaincode - transaction proposal was bad [2017-10-04 02:38:49.390] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-10-04 02:38:49.390] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined Error when I execute for second time: error: [Orderer.js]: sendBroadcast - on error: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:242:12)" [2017-10-04 02:38:59.490] [ERROR] invoke-chaincode - Failed to send transaction and get notifications within the timeout period. Third time when I invoke same transaction it works fine: [2017-10-04 02:39:09.461] [INFO] invoke-chaincode - The balance transfer transaction has been committed on peer ustr-erl2-1418.na.uis.unisys.com:7053 [2017-10-04 02:39:09.461] [DEBUG] invoke-chaincode - event promise all complete and testing complete [2017-10-04 02:39:09.461] [INFO] invoke-chaincode - Successfully sent transaction to the orderer. I thought error might be due to time-out so I modified invoke-transaction.js time out to 90000 from 30000. let txPromise = new Promise((resolve, reject) => { let handle = setTimeout(() => { eh.disconnect(); reject(); }, 90000); Is there any other place I need to change for increasing the time out?

Dpkkmr (Wed, 04 Oct 2017 08:46:30 GMT):
Hi All, I am facing a strange issue, when I am invoking a transaction with 10 min gap, I am getting an error(mentioned below) for the first time. When I retry for the second time I get another exception, when I try for the third time it works fine. First time invocation error: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) at /root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:434:17 [2017-10-04 02:38:49.389] [DEBUG] invoke-chaincode - [ { Error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) at /root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:434:17 code: 2, metadata: Metadata { _internal_repr: {} } } ] [2017-10-04 02:38:49.390] [ERROR] invoke-chaincode - transaction proposal was bad [2017-10-04 02:38:49.390] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-10-04 02:38:49.390] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined Second time invocation error: error: [Orderer.js]: sendBroadcast - on error: "Error: Endpoint read failed\n at ClientDuplexStream._emitStatusIfDone (/root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:201:19)\n at ClientDuplexStream._readsDone (/root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:169:8)\n at readCallback (/root/bt/11Sep-dynamic-channel/node_modules/grpc/src/node/src/client.js:242:12)" [2017-10-04 02:38:59.490] [ERROR] invoke-chaincode - Failed to send transaction and get notifications within the timeout period. Third time Success message: [2017-10-04 02:39:09.461] [INFO] invoke-chaincode - The balance transfer transaction has been committed on peer peer0:7053 [2017-10-04 02:39:09.461] [DEBUG] invoke-chaincode - event promise all complete and testing complete [2017-10-04 02:39:09.461] [INFO] invoke-chaincode - Successfully sent transaction to the orderer. I tried modifying timeout from 30000 to 90000 in invoke-transaction.js file. Still no facing this error. Can someone help me to resolve this issue? This issue occurs 3/10 times when I try.

Vadim (Wed, 04 Oct 2017 09:01:00 GMT):
@Dpkkmr in which environment do you run Fabric?

jethdg (Wed, 04 Oct 2017 09:02:53 GMT):
Also experiencing same problem with @Dpkkmr ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) at /app/node_modules/grpc/src/node/src/client.js:554:15 ```

Vadim (Wed, 04 Oct 2017 09:03:22 GMT):
@jethdg is it always like this or after some time?

jethdg (Wed, 04 Oct 2017 09:05:18 GMT):
its working smooth for some minutes..

Vadim (Wed, 04 Oct 2017 09:05:33 GMT):
which environment do you have?

jethdg (Wed, 04 Oct 2017 09:09:57 GMT):
Im having 1 orderer, 2 orgs with 1 peer each using docker images tagged with x86_64-1.0.2

Vadim (Wed, 04 Oct 2017 09:10:17 GMT):
is it Swarm?

jethdg (Wed, 04 Oct 2017 09:12:18 GMT):
nope

Vadim (Wed, 04 Oct 2017 09:13:00 GMT):
well, it should work, but you might try to set CORE_CHAINCODE_KEEPALIVE=300 on peer and see if that works

jethdg (Wed, 04 Oct 2017 10:26:33 GMT):
@Vadim same error still occur. I tried to invoke the chaincode inside peer container. Could it be a grpc error? ``` Error: Error endorsing query: rpc error: code = Unknown desc = Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) - ```

KevinLeyssens (Wed, 04 Oct 2017 10:48:23 GMT):
Has joined the channel.

SyneBlockChainTeam (Wed, 04 Oct 2017 11:12:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KQxNs7o8Scw7BcMBG) @SanketPanchamia Hi Sanket, Presently we have tried with 2 peers (with Node SDK) in same system. And its worked fine. Now we need to segregate these peers on physically different systems. Please could you suggest steps to follow for achieving this. Best Regards.

SyneBlockChainTeam (Wed, 04 Oct 2017 11:12:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KQxNs7o8Scw7BcMBG) @SanketPanchamia Hi Sanket, Have you found the solution to achieve your goal? Infect we have also tried with 2 peers (with Node-SDK) in single system. It worked fine. Now we need to segregate these peers on physically different systems. Please could you suggest steps to follow for achieving this. Best Regards.

SyneBlockChainTeam (Wed, 04 Oct 2017 11:30:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vwoAJq7ZF5nFDL43K) @MohammadObaid Hi, Have you found the solution to achieve your goal of setting-up peers on different machine ? Infect we have also tried with 2 peers (with Node-SDK) in single system. It worked fine. Now we need to segregate these peers on physically different systems. Please could you suggest steps to follow for achieving this. Best Regards.

SyneBlockChainTeam (Wed, 04 Oct 2017 11:31:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GFvKrP7RLSvibA6eh) @usman_shaik Hi, Any luck with your requirement? Thanks

eetti (Wed, 04 Oct 2017 12:29:38 GMT):
I get this error at random intervals, does anyone have an idea what causes it? ``` E1003 17:53:06.927877184 7236 ssl_transport_security.c:611] Could not load any root certificate. E1003 17:53:06.927900177 7236 ssl_transport_security.c:1348] Cannot load server root certificates. E1003 17:53:06.927910158 7236 security_connector.c:837] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E1003 17:53:06.927914651 7236 secure_channel_create.c:127] Failed to create secure subchannel for secure name 'x.x.x.x:7051' E1003 17:53:06.927917873 7236 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. ```

bretharrison (Wed, 04 Oct 2017 14:21:05 GMT):
@eetti Yes some folks are seeing this, maybe a GRPC issue https://github.com/grpc/grpc/issues/12642 https://jira.hyperledger.org/browse/FAB-6266?filter=-1

jy (Wed, 04 Oct 2017 15:09:12 GMT):
Hi, is it possible to enable GRPC trace at docker container level?

GiorgiBlockchain (Wed, 04 Oct 2017 15:22:09 GMT):
Hi all, I posted my issue several days ago and reposting now. My problem is described with details on this link: https://stackoverflow.com/questions/46481667/sendpeersproposal-promise-is-rejected-error-request-timeout-hyperledger-fab Basically I couldn't figure out how to interact with ledger through API from outside. Locally I'm able to invoke, query, etc. But while testing with POSTMAN I'm getting errors, like: `sendPeersProposal - Promise is rejected: Error: Connect Failed`. Any suggestions?

Vadim (Thu, 05 Oct 2017 06:26:14 GMT):
@jy yes

Vadim (Thu, 05 Oct 2017 06:26:40 GMT):
just set GRPC_VERBOSITY=DEBUG, GRPC_TRACE=all in the environment

kapilAtrey (Thu, 05 Oct 2017 10:22:45 GMT):
Hi everyone, just going through the helper.js file in the /balancetransfer/app and i am little bit confuse about what we mean by registration and enrollment, can anyone help me out , Thanks

bretharrison (Thu, 05 Oct 2017 10:35:34 GMT):
@kapilAtrey `registration` creates a new user on the CA, `enrollment` gets a certificate signed by the CA for a user

bretharrison (Thu, 05 Oct 2017 10:35:34 GMT):
@kapilAtrey `registration` creates a new user on the CA, `enrollment` gets a certificate signed by the CA for a user For example the following will register a new user with the CA. The admin user must have already been enrolled with the CA. ``` fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1'}, admin_user) // the promise will return a 'secret' that must be saved ``` Then once the user has been created on the CA, there can be an enrollment ``` fabric_ca_client.enroll({enrollmentID: 'user1', enrollmentSecret: secret}); // the promise will return a signed certificate from the CA ``` Now there is enough information to create a user object and assign it to the fabric client for use as the current user

kapilAtrey (Thu, 05 Oct 2017 10:37:39 GMT):
@bretharrison by `registration` you mean ?? and can you please share the source of information

kapilAtrey (Thu, 05 Oct 2017 10:37:39 GMT):
@bretharrison by `registration` you mean ?? and can you please share the source of information so that i can make it more clear

DarshanBc (Thu, 05 Oct 2017 10:52:52 GMT):
can someone explain what is this about transientMap exactly ```map that can be used by the chaincode during intialization, but not saved in the ledger. Data such as cryptographic information for encryption can be passed to the chaincode using this technique```

Vadim (Thu, 05 Oct 2017 11:07:29 GMT):
@DarshanBc this is the data which is visible to the chaincode upon execution, but which is not stored on the ledger. Normal input agrs for chaincode invokation are stored in plaintext.

Vadim (Thu, 05 Oct 2017 11:07:45 GMT):
So probably you want to send some encryption keys over transient map.

bertrand_sirodot (Thu, 05 Oct 2017 19:22:19 GMT):
Hi, has anybody seen this issue and knows how to fix it: ` Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority,.protos.Proposal,.common.Header`

wy (Fri, 06 Oct 2017 02:33:21 GMT):
Hi all, this is a snippet of the response i got from queryTransaction ```"version":{"block_num":{"low":53,"high":0,"unsigned":true},"tx_num":{"low":0,"high":0,"unsigned":true}}},{"key":"org2id","version":{"block_num":{"low":51,"high":0,"unsigned":true},"tx_num":{"low":0,"high":0,"unsigned":true}}},{"key":"org1id","version":{"block_num":{"low":54,"high":0,"unsigned":true},"tx_num":{"low":0,"high":0,"unsigned":true}}}],"range_queries_info":[],"writes":[{"key":"507cae7eeae02a085a84165f26ff34e8a69d0261df5548eed47f769fa745d2af","is_delete":false,"value":"{\"docType\":\"completedtx\",\"refID\":\"507cae7eeae02a085a84165f26ff34e8a69d0261df5548eed47f769fa745d2af\",\"sender\":\"org2id\",\"receiver\":\"org1id\",\"priority\":0,\"amount\":200000,\"currency\":\"dollar\",\"status\":\"SETTLED\",\"createTime\":\"2017-10-05T16:06:54.946Z\",\"updateTime\":\"2017-10-05T16:07:27.082Z\"}"}]}},{"namespace":"lscc","rwset":{"reads":[{"key":"chaincode","version":{"block_num":{"low":1,"high":0,"unsigned":true},"tx_num":{"low":0,"high":0,"unsigned":true}}}],"range_queries_info":[],"writes":[]}}]},"events":{"chaincode_id":"","tx_id":"","event_name":"","payload":{"type":"Buffer","data":[]}},"response":{"status":200,"message":"","payload":"{\"nettableTxList\":[\"507cae7eeae02a085a84165f26ff34e8a69d0261df5548eed47f769fa745d2af\"],\"wentToLoop\":true}"}}}```

wy (Fri, 06 Oct 2017 02:35:14 GMT):
im wondering why there may be multiple different block numbers for 1 transaction and also what the `high` and `low` fields represent/mean?

dave.enyeart (Fri, 06 Oct 2017 02:39:41 GMT):
@bretharrison ^^^^ It looks like for block num it is returning a two byte number with 53 in the low byte and 0 in the high byte (block num 53). Why would it be returned in this awkward format?

dave.enyeart (Fri, 06 Oct 2017 03:20:17 GMT):
I guess queryTransaction is returning a portion in the raw protobuf format. Any chance the integers could be prettied up?

dave.enyeart (Fri, 06 Oct 2017 03:21:32 GMT):
concerning the multiple block numbers, these are versions (block num / tran num) from the transaction's read set

linyuadam (Fri, 06 Oct 2017 06:23:43 GMT):
Hi, all if I invoke a chaincode with error, how can I get the error throw by shim.Error(err) in SDK

CodeReaper (Fri, 06 Oct 2017 07:18:01 GMT):
Hey @dave.enyeart , I had a query, because the node SDK keeps all the certificates and keys in artifacts.So I think we need to have one node app for each and every organization(or pehaps every peer), that only have certificates for their organization's peer??

CodeReaper (Fri, 06 Oct 2017 07:18:01 GMT):
Hey @dave.enyeart , I had a query, because the node SDK keeps all the certificates and keys in artifacts. So I think we need to have one node app for each and every organization(or pehaps every peer), that only have certificates for their organization's peer??

CodeReaper (Fri, 06 Oct 2017 07:18:53 GMT):
How would we transport the client and channel objects between these applications??

balaji.viswanathan (Fri, 06 Oct 2017 08:50:43 GMT):
Has joined the channel.

balaji.viswanathan (Fri, 06 Oct 2017 08:54:00 GMT):
@dave.enyeart @bretharrison w.r.t {"low":xx, "high":yy, "unsigned":true} in block decoder output, i think its becos how protobuf number is mapped to node.js object and then JSON.stringify of node.js object results in a number being encoded as low and high bits.

balaji.viswanathan (Fri, 06 Oct 2017 08:55:51 GMT):
and unsigned flag. its a single number, block number 53 which is written as such. this is true for both block_num and tx_num. We could pretty it by overriding the JSON.serialize function in node. let me try and post it

balaji.viswanathan (Fri, 06 Oct 2017 09:03:53 GMT):
common.proto define block_num as uint64 but javascript only supports upto 53bit integers for native Number type.

balaji.viswanathan (Fri, 06 Oct 2017 09:39:55 GMT):
Hi all, is it possible to mix and instantiate different cryptosuites in one application. Lets say, I have a software-crypto deployment which needs to do symmetric AES encryption. The symmetric AES encryption is available in bccsp_pkcs11 module and can be directly instantiate using new CryptoSuite_PKCS11(256, 'SHA3'); if so, What PKCS11 library can i use with it?

balaji.viswanathan (Fri, 06 Oct 2017 09:43:40 GMT):
'''var cryptoSuite = new CryptoSuite_PKCS11(req.keySzie, req.hashAlgo, { lib: "/usr/lib/softhsm/libsofthsm2.so", slot: 0, pin: 12345678 }); var key = cryptoSuite.importKey(Buffer.from(req.key.bytes, 'hex'), { algorithm: 'AES', ephemeral: true }) cryptoSuite.encrypt(key, Buffer.from(...), null);'''

AbhishekSeth (Fri, 06 Oct 2017 09:47:10 GMT):
hey all.. I have two orgs named `org1` and `org2`. I have modified my configtx.yaml and want to create a channel only for `org1`. After create-channel.js, when I try running join-channel.js for both the orgs, it says successful join for all the peers in both the orgs which should not be the case since my channel is only for org1. This should ideally throw some error. Isn't it the case??

bretharrison (Fri, 06 Oct 2017 11:51:27 GMT):
@AbhishekSeth What did you use as the source for the create channel, after modifying the configtx.yaml, did you run `configtxgen` http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#configuration-transaction-generator

nhrishi (Fri, 06 Oct 2017 12:05:17 GMT):
Hi i'm getting below error for user enrollment - Enrollment failed with errors [[{"code":400,"message":"Authorization failure

nhrishi (Fri, 06 Oct 2017 12:05:25 GMT):
Can someone pls advise urgently

bretharrison (Fri, 06 Oct 2017 12:07:08 GMT):
@nhrishi Delete the contents of the key value store ... the admin cert was probably created by a previous instance of the CA

nhrishi (Fri, 06 Oct 2017 12:07:34 GMT):
@bretharrison yes but we didnt restart CA & network for 2 days

nhrishi (Fri, 06 Oct 2017 12:07:48 GMT):
i removed key value store as well

bretharrison (Fri, 06 Oct 2017 12:13:19 GMT):
did you remove the state store and the crypto store ?

bretharrison (Fri, 06 Oct 2017 12:13:38 GMT):
they may be in same directory

nhrishi (Fri, 06 Oct 2017 12:13:45 GMT):
yes

nhrishi (Fri, 06 Oct 2017 12:14:18 GMT):
i've set one directorey to "keyValueStore" in config

bretharrison (Fri, 06 Oct 2017 12:14:39 GMT):
And the admin you are using was enrolled by this CA

nhrishi (Fri, 06 Oct 2017 12:17:33 GMT):
yes, btw we were able to login till last night. and its been working perfectly since Wed

nhrishi (Fri, 06 Oct 2017 12:20:07 GMT):
All I did is restarted the service and deleted crypto store before starting

bretharrison (Fri, 06 Oct 2017 12:20:10 GMT):
Maybe the CA log will help

bretharrison (Fri, 06 Oct 2017 12:25:57 GMT):
and you are sure you deleted the entry for the the admin user, so three files, the state file which has the cert in it and points to the private key, and the public and private keys

nhrishi (Fri, 06 Oct 2017 12:33:59 GMT):
yes just found the diskspace is 100% on the fabric server

nhrishi (Fri, 06 Oct 2017 12:34:09 GMT):
This could be the reason right?

bretharrison (Fri, 06 Oct 2017 12:42:23 GMT):
not sure

bretharrison (Fri, 06 Oct 2017 12:43:14 GMT):
do you mean on the CA server, as the that auth issue is just between the node client and the CA

bretharrison (Fri, 06 Oct 2017 12:43:14 GMT):
do you mean on the CA server, as that auth issue is just between the node client and the CA

nhrishi (Fri, 06 Oct 2017 12:46:43 GMT):
Yes. Confirmed. This is due to the linux server diskspace is 100%.

AbhishekSeth (Fri, 06 Oct 2017 12:56:10 GMT):
@bretharrison, yeah.... I am using configtxgen tool to generate the channel artifacts.

bretharrison (Fri, 06 Oct 2017 12:56:36 GMT):
@dave.enyeart @balaji.viswanathan I have opened JIRA to track getting the decoded block numbers more into a readable form https://jira.hyperledger.org/browse/FAB-6480

bretharrison (Fri, 06 Oct 2017 13:01:09 GMT):
@nhrishi So you are now able to enroll once you fixed the resource issue ?, if so we should note this issue with a JIRA to get a better error message so that the client apps will know to report this to a system administrator

nhrishi (Fri, 06 Oct 2017 13:05:30 GMT):
@bretharrison Yes Its working fine now. We should certainly look at error message.

bretharrison (Fri, 06 Oct 2017 13:10:48 GMT):
@nhrishi OK I opened a JIRA bug for Fabric CA https://jira.hyperledger.org/browse/FAB-6481

nhrishi (Fri, 06 Oct 2017 13:13:28 GMT):
@bretharrison Thanks a lot!!

bretharrison (Fri, 06 Oct 2017 13:14:18 GMT):
@nhrishi Thank you for finding this issue

tbrooke (Fri, 06 Oct 2017 13:26:03 GMT):
Has joined the channel.

asamk (Fri, 06 Oct 2017 15:12:19 GMT):
[did you get a chance to look into this, Thanks ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3pLgeXJhqSag8Tpbb) @SanketPanchamia

Menniti (Sat, 07 Oct 2017 02:34:40 GMT):
Has joined the channel.

AlekNS (Sun, 08 Oct 2017 14:32:38 GMT):
Has joined the channel.

knagware9 (Sun, 08 Oct 2017 18:32:18 GMT):
Hi,,Anyone facing these issue ?

knagware9 (Sun, 08 Oct 2017 18:33:01 GMT):

Message Attachments

jethdg (Mon, 09 Oct 2017 02:56:08 GMT):
Anyone encountering this error? I kept seeing this error even though the transaction is sent to orderer successfully ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Failed to execute transaction (Error sending TRANSACTION: txid:aabe1682c9fbb6413558e8af2a22e7872b5dc8ce62827f17d8b321826de313c4 exists) - make sure the chaincode invoice has been successfully instantiated and try again acu ```

SanketPanchamia (Mon, 09 Oct 2017 05:45:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TZA4Qm4e3Wcx3PBCh) @jethdg The error clearly says that the chaincode is not instantiated.

SanketPanchamia (Mon, 09 Oct 2017 05:46:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JedyWqo4n33JgorK7) @knagware9 Check your certificates. This issue comes up if there is a mismatch in the peer certificates

jarvis26 (Mon, 09 Oct 2017 10:03:40 GMT):
Hi...I want to setup a client node with the sdk so that the users can interact with the network (create channel and initiate transactions). Can somebody please guide me with the steps. I went through the balance transfer sample, the `network-config-aws.json` in the apps directory reads the admin keys, certificates and the ca certificates locally. Does that mean these have to be copied at the client node manually?

Menniti (Mon, 09 Oct 2017 11:47:50 GMT):
Hey guys, The fabric sdk node is working on production enviroment ?

nhrishi (Mon, 09 Oct 2017 11:54:56 GMT):
Hi, I've been running an app server that invokes a chaincode. Its been running perfectly fine for last 4-5 days. I'm running fabric and App server on 2 different VMs. Somehow invoke transaction has stopped working. Its giving me below errror ```error: [Peer.js]: sendProposal - timed out after:60000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (./node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-10-09 07:50:42.582] [ERROR] invoke-chaincode - transaction proposal was bad [2017-10-09 07:50:42.582] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-10-09 07:50:42.582] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined ```

nhrishi (Mon, 09 Oct 2017 11:54:56 GMT):
Hi, I've been running an app server that invokes a chaincode. Its been running perfectly fine for last 4-5 days. I'm running fabric and App server on 2 different VMs. Somehow invoke transaction has stopped working. Its giving me below errror. Can anyone please advise asap. This is little urgent. ```error: [Peer.js]: sendProposal - timed out after:60000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (./node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) [2017-10-09 07:50:42.582] [ERROR] invoke-chaincode - transaction proposal was bad [2017-10-09 07:50:42.582] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-10-09 07:50:42.582] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined ```

jarvis26 (Mon, 09 Oct 2017 12:03:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=i5R3yJHRB3Ld3pSNP) @jimthematrix , @gentios Could you please help. Thanks.

bretharrison (Mon, 09 Oct 2017 12:55:20 GMT):
@nhrishi You may wish to turn on debug logging `export HFC_LOGGING='{"debug":"console"}'`

ArnabChatterjee (Mon, 09 Oct 2017 14:10:37 GMT):
Hello folks. I wanted to understand one thing. I believe that node sdk uses grpc now. But as far as I would remember it used to use REST previously. If my understanding is correct, can you please let me know why grpc replaced REST? Thanks. :)

gentios (Mon, 09 Oct 2017 14:28:37 GMT):
@ArnabChatterjee there is also a REST repo in github

gentios (Mon, 09 Oct 2017 14:28:44 GMT):
https://github.com/hyperledger/fabric-sdk-rest this is the link

pschnap (Mon, 09 Oct 2017 15:21:23 GMT):
Has joined the channel.

pschnap (Mon, 09 Oct 2017 16:33:43 GMT):
Is the membership service URL in the Node SDK just the URL of one of the CAs? or is it different?

julian (Mon, 09 Oct 2017 17:13:24 GMT):
Has joined the channel.

nhrishi (Mon, 09 Oct 2017 17:38:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NaPRofMipW5TwjENN) @bretharrison I did. but not much help. My app server was able invoke around and 10 transactions and all of sudden, it started giving me this error message. do you think this could be because of Peer is not accessible.

bretharrison (Mon, 09 Oct 2017 17:46:49 GMT):
@nhrishi can you show me the log

nhrishi (Mon, 09 Oct 2017 17:51:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9rkwoYXsxAQJq982S) @bretharrison Here is a log - ```^[[34mdebug^[[39m: [Channel.js]: sendTransactionProposal - start ^[[34mdebug^[[39m: [Channel.js]: sendTransactionProposal - request has targets Send Tran Proposal::globalchannel{"targets":[{"_options":{"grpc.ssl_target_name_override":"peer0.global.example.com","grpc.default_authority":"peer0.global.example.com","grpc.primary_user_agent":"grpc-node/1.2.4"},"_url":"grpcs://10.21.135.15:13051","_endpoint":{"addr":"10.21.135.15:13051","creds":{}},"_request_timeout":60000,"_endorserClient":{"$channel":{}},"_name":null}],"chaincodeId":"ReferenceDataCC","fcn":"invoke","args":["newSecuritySetup","{\"SecurityData\":{\"ISIN\":\"US912810RS96\",\"MasterSecID\":\"912810RS9\",\"RefClientID\":\"global\",\"CUSIP\":\"912810RS9\",\"Name\":\"UNITED STATES TREASURY BONDS\",\"StricePrice\":\"223.5\",\"Rate\":\"2.5\",\"IssueMaturityDate\":\"05/15/2046\",\"IssueDatedDate\":\"05/15/2016\",\"IssueFirstCouponDate\":\"11/15/2016\",\"RefFrequencyID\":\"Semi-annual\",\"RefDayCountID\":\"Actual/Actual\",\"RefSecTypeID\":\"USTR\"}}"],"chainId":"globalchannel","txId":{"_nonce":{"type":"Buffer","data":[90,118,58,188,40,207,63,105,202,148,108,69,216,18,23,199,36,8,205,130,79,101,87,8]},"_transaction_id":"12d577d9cf40c14f274ff9ab1a4ed01199fe76bd720912c0ba08f7e24613c5cd"}} ^[[34mdebug^[[39m: [Channel.js]: sendTransactionProposal - adding function arg:invoke ^[[34mdebug^[[39m: [Channel.js]: sendTransactionProposal - adding arg:newSecuritySetup ^[[34mdebug^[[39m: [Channel.js]: sendTransactionProposal - adding arg:{"SecurityData":{"ISIN":"US912810RS96","MasterSecID":"912810RS9","RefClientID":"global","CUSIP":"912810RS9","Name":"UNITED STATES TREASURY BONDS","StricePrice":"223.5","Rate":"2.5","IssueMaturityDate":"05/15/2046","IssueDatedDate":"05/15/2016","IssueFirstCouponDate":"11/15/2016","RefFrequencyID":"Semi-annual","RefDayCountID":"Actual/Actual","RefSecTypeID":"USTR"}} ^[[34mdebug^[[39m: [Channel.js]: sendTransactionProposal - not adding the argument :: argbytes ^[[34mdebug^[[39m: [client-utils.js]: buildChannelHeader - type 3 channel_id globalchannel tx_id NaN epoch % chaincode_id null ReferenceDataCC ^[[34mdebug^[[39m: [client-utils.js]: buildProposal - not adding a transientMap ^[[36m[2017-10-09 13:10:11.398] [DEBUG] Helper - ^[[39m[crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } ^[[34mdebug^[[39m: [Peer.js]: Peer.sendProposal - Start ^[[34mdebug^[[39m: [Client.js]: saveUserToStateStore, store.setValue, result = {"name":"admin","mspid":"globalMSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"eb621d5edc89392b87a7250ceb7bb32c6b667d05bddcabe0741a9e8c2970336e","identity":{"certificate":"-----BEGIN CERTIFICATE-----\nMIICCTCCAbCgAwIBAgIUP961AijuIbSDO1ixAimTLOSfQp0wCgYIKoZIzj0EAwIw\ngYsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMSUwIwYDVQQKExxicm9hZHJpZGdlZ2xvYmFsLmV4YW1wbGUu\nY29tMSgwJgYDVQQDEx9jYS5icm9hZHJpZGdlZ2xvYmFsLmV4YW1wbGUuY29tMB4X\nDTE3MTAwOTE3MDUwMFoXDTE4MTAwOTE3MDUwMFowEDEOMAwGA1UEAxMFYWRtaW4w\nWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQ+RHSAOUuAaAVEJCuRdfhPHlBheC3Z\nQSem5PsPqUhIpq6U/mKlk0orwYo0u3hnR5yl8CwO5WC61wnbCTVaFywjo2wwajAO\nBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUyLYMO5163Mgl\njG0y+81/smcfv2cwKwYDVR0jBCQwIoAgr3kylR/Shdc4N+dcZxQ0rpjJeXZgssFy\nZMItX1BP8WgwCgYIKoZIzj0EAwIDRwAwRAIgVjDNHI1eYzoAk2QxJUhh7CgPY+E7\npAmkuufmxKxYGVQCIGESRkT9zNrh4JaeUflqsJ9zJ2Z0yHI7dgt9GpqL8w17\n-----END CERTIFICATE-----\n"}}} ^[[31merror^[[39m: [Peer.js]: sendProposal - timed out after:60000 ^[[31merror^[[39m: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/repo_sdk_client_qa_package/repo_sdk_Globalinvoke_server/node_modules/fabric-client/lib/Peer.js:121:19) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) ^[[34mdebug^[[39m: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT ^[[31m[2017-10-09 13:11:11.406] [ERROR] invoke-chaincode - ^[[39mtransaction proposal was bad ^[[31m[2017-10-09 13:11:11.407] [ERROR] invoke-chaincode - ^[[39mFailed to send Proposal or receive valid response. Response null or status is not 200. exiting... ^[[31m[2017-10-09 13:11:11.407] [ERROR] invoke-chaincode - ^[[39mFailed to order the transaction. Error code: undefined```

qxh (Tue, 10 Oct 2017 02:27:10 GMT):
Has joined the channel.

sunhwei (Tue, 10 Oct 2017 06:57:30 GMT):
Has joined the channel.

Amitchandra (Tue, 10 Oct 2017 06:57:43 GMT):
Has joined the channel.

Souvik.Dey (Tue, 10 Oct 2017 07:20:59 GMT):
How to get string return by chaincode in channel.sendTransaction?

nhrishi (Tue, 10 Oct 2017 08:31:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hMHZEmr7nBv5NBzsW) @nhrishi @bretharrison Do you see any issue here. I've now started getting the error for other peers as well.

mna2016 (Tue, 10 Oct 2017 09:13:28 GMT):
Has joined the channel.

mna2016 (Tue, 10 Oct 2017 09:14:51 GMT):
Hi All, channel.queryInfo() is returning the error - "missing userContext Parameter". Please see the screenshot/

mna2016 (Tue, 10 Oct 2017 09:16:19 GMT):

Message Attachments

mna2016 (Tue, 10 Oct 2017 09:17:02 GMT):

Message Attachments

bretharrison (Tue, 10 Oct 2017 10:58:40 GMT):
@mna2016 Be sure to assign a user object to the client object, do you have a `setUserContext(user)`

mna2016 (Tue, 10 Oct 2017 11:01:47 GMT):
@bretharrison I am trying to test query.js of "fabcar" from fabric-samples.

mna2016 (Tue, 10 Oct 2017 11:02:52 GMT):

Message Attachments

mna2016 (Tue, 10 Oct 2017 11:03:48 GMT):
There is "getUserContext" but no setUserContext.

bretharrison (Tue, 10 Oct 2017 11:08:03 GMT):
@mna2016 is it possible the getUserContext did not return anything

bretharrison (Tue, 10 Oct 2017 11:08:52 GMT):
@nhrishi Have you checked the Peer logs, have you restarted the peer ?

nhrishi (Tue, 10 Oct 2017 11:10:42 GMT):
@bretharrison I did. I don't see anything in the peer log. Looks like the invoke transaction(transaction proposal) is not reaching peer. Can we restart only specific peer without restarting entire network. Also I'm seeing this issue for other peers as well today (working till yesterday)

Vadim (Tue, 10 Oct 2017 11:12:39 GMT):
@nhrishi does it recover if you send a new tx to the same peer?

nhrishi (Tue, 10 Oct 2017 11:13:14 GMT):
No

nhrishi (Tue, 10 Oct 2017 11:13:39 GMT):
It just doesnt respond

Vadim (Tue, 10 Oct 2017 11:13:42 GMT):
do the peers run on the same machine?

mna2016 (Tue, 10 Oct 2017 11:13:53 GMT):
@bretharrison Its quite possible getUserContext returned an error. But in that case some console messages must hve been generated(which i dont see)

nhrishi (Tue, 10 Oct 2017 11:13:55 GMT):
yes all peers are running on the same machine

Vadim (Tue, 10 Oct 2017 11:15:38 GMT):
@nhrishi same docker environment?

nhrishi (Tue, 10 Oct 2017 11:16:28 GMT):
yes Same docker environment

Vadim (Tue, 10 Oct 2017 11:17:12 GMT):
if you restart the node app, does it recover?

nhrishi (Tue, 10 Oct 2017 11:19:04 GMT):
I did restart several times. But same issue. Looks like connectivity issue with the docker container. I did telnet and its getting connected.

nhrishi (Tue, 10 Oct 2017 11:19:30 GMT):
I'm running node app and fabric on 2 different RHEL servers

Vadim (Tue, 10 Oct 2017 11:19:54 GMT):
do you have the issue if they are on the same server?

nhrishi (Tue, 10 Oct 2017 11:20:54 GMT):
No Btw I'm running this setup for last 5 days without issue. All of sudden, it has started giving me issue with one peer till yesterday and today other peers.

nhrishi (Tue, 10 Oct 2017 11:21:34 GMT):
I'm still able to invoke transaction into a newer docker container (recently launched)

Vadim (Tue, 10 Oct 2017 11:21:47 GMT):
seems like something with your server-to-server communication

Vadim (Tue, 10 Oct 2017 11:22:00 GMT):
maybe some firewall?

Vadim (Tue, 10 Oct 2017 11:22:08 GMT):
or load balancer?

bretharrison (Tue, 10 Oct 2017 11:22:59 GMT):
@mna2016 Have you seen a debug log ? export HFC_LOGGING='{"debug":"console"}'

bretharrison (Tue, 10 Oct 2017 11:22:59 GMT):
@mna2016 Have you seen a debug log ? `export HFC_LOGGING='{"debug":"console"}'`

bretharrison (Tue, 10 Oct 2017 11:22:59 GMT):
@mna2016 Have you seen a NodeSDK debug log ? `export HFC_LOGGING='{"debug":"console"}'`

nhrishi (Tue, 10 Oct 2017 11:23:43 GMT):
Btw interesting part is, I did a query and peer log does show me query output (JSON) but node app doesnt receive anything.

mna2016 (Tue, 10 Oct 2017 11:40:42 GMT):

Message Attachments

mna2016 (Tue, 10 Oct 2017 11:40:55 GMT):
@bretharrison after setting export HFC_LOGGING='{"debug":"console"}'

mna2016 (Tue, 10 Oct 2017 11:42:18 GMT):
@bretharrison so the user 'admin' was not loaded. I guess this is because I am missing things inside of "/creds" subdirectory.

mna2016 (Tue, 10 Oct 2017 11:42:45 GMT):
@bretharrison What all should be there inside creds subdirectory?

bretharrison (Tue, 10 Oct 2017 11:51:35 GMT):
@mna2016 It depends ... if you are running with a CA, then you will not need anything, however if you are not enrolling the admin with the CA to return a signed certificate, then you must have a pervious NodeSDK serialized state object that contains a signed cert and a pointer to the private key, the private key may likely be in the same directory as the serialized state if the crypto store defined on the crypto suite points to the same place as the client's state store.

mna2016 (Tue, 10 Oct 2017 12:01:33 GMT):
@bretharrison How can I run this fabcar/query.js with a CA and enroll admin? a code sample will be a big help.

mna2016 (Tue, 10 Oct 2017 12:06:00 GMT):
@bretharrison Or if you could point me to a detailed documentation about this?

bretharrison (Tue, 10 Oct 2017 12:15:20 GMT):

Message Attachments

mna2016 (Tue, 10 Oct 2017 14:52:47 GMT):
@bretharrison Thanks! I will try to use this.

mna2016 (Tue, 10 Oct 2017 15:13:30 GMT):
@bretharrison so the authentication now works.

eetti (Tue, 10 Oct 2017 16:54:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5LGQHudbwELshyMdB) @bretharrison Please what openssl version do you have on the machine/server that you serve a nodeJS server using the fabric-sdk-node lib

bretharrison (Tue, 10 Oct 2017 16:55:17 GMT):
@eetti OpenSSL 0.9.8zh 14 Jan 2016

eetti (Tue, 10 Oct 2017 16:55:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZNueqNC7oeTfkrauz) @bretharrison I have this version OpenSSL 1.0.1e-fips 11 Feb 2013 . Could that be the reason I am getting the GRPC errors ?

bretharrison (Tue, 10 Oct 2017 16:59:20 GMT):
@eetti Sorry I do not know

bretharrison (Tue, 10 Oct 2017 18:05:13 GMT):
@eetti Have you tried the new GRPC, I see there is a 1.6.6 out there now https://www.npmjs.com/package/grpc

eetti (Tue, 10 Oct 2017 18:05:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jB9v7jxWh5HtNXzME) @bretharrison Let me try that.

pschnap (Tue, 10 Oct 2017 18:55:07 GMT):
The `Promise` returned by `FabricCAServices.enroll` doesn't seem to be getting executed, any ideas?

pschnap (Tue, 10 Oct 2017 18:55:07 GMT):
I'm trying to connect to a fabric instance (with TLS enabled) using the `FabricCAServices` to enroll a user for communication. The `Promise` returned by `FabricCAServices.enroll` doesn't seem to be getting executed, any ideas?

eetti (Tue, 10 Oct 2017 19:00:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jkcMT5irynDT4mg4e) @eetti It still produces that error :(

pschnap (Tue, 10 Oct 2017 19:50:28 GMT):
nvm, needed to upgrade node, got things working

eetti (Tue, 10 Oct 2017 21:59:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bvqyufzn4K9YAjPzc) @eetti Is it possible that this issue is related to the method used in creating the certs? In my case I used fabric CA and the root cert was a self signed cert reated with openssl

eetti (Tue, 10 Oct 2017 21:59:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bvqyufzn4K9YAjPzc) @eetti Is it possible that this issue is related to the method used in creating the certs? In my case I used fabric CA and the root cert was a self signed cert reated with openssl. I dont see this issue when using certs from cryptogen

eetti (Tue, 10 Oct 2017 21:59:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bvqyufzn4K9YAjPzc) @eetti Is it possible that this issue is related to the method used in creating the certs? In my case I used fabric CA and the root cert was a self signed cert created with openssl. I dont see this issue when using certs from cryptogen

vu3mmg (Wed, 11 Oct 2017 03:05:50 GMT):
How to get the blockchain transaction for a given Key , for a (K,V) in the world state

amolpednekar (Wed, 11 Oct 2017 05:17:00 GMT):
Has joined the channel.

thakkarparth007 (Wed, 11 Oct 2017 06:18:25 GMT):
How does node-sdk handle large payloads? Let's say in the transaction proposal I want to upload a large file (1-10 MB, say), will the sdk handle it as a stream, or block the rest of the client?

thakkarparth007 (Wed, 11 Oct 2017 06:25:56 GMT):
Nvm, just saw the code. It'll block the rest of the client.

Lavanya5896 (Wed, 11 Oct 2017 08:32:41 GMT):
Hi,can anyone assist me how can we provide userlevel read and write permissions in hyperledger fabric1.0

Souvik.Dey (Wed, 11 Oct 2017 08:59:54 GMT):
How to define endorsement in nodeSdK?

jaswanth (Wed, 11 Oct 2017 10:51:52 GMT):
iam using windows 10 home . i got error in `npm install` . no able to proceed further any help @here . Got ``` npm ERR! pkcs11js@1.0.9 install: `npm run build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pkcs11js@1.0.9 install script 'npm run build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pkcs11js package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pkcs11js npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pkcs11js npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\jaswanth.gorripati\hyperledger\devSetup\fabric-samples\balance-transfer\npm-debug.log```

dave.enyeart (Wed, 11 Oct 2017 10:52:50 GMT):
@jaswanth Please do not use at-here, and please do not paste same question into multiple channels.

mastersingh24 (Wed, 11 Oct 2017 10:56:02 GMT):
@jaswanth - did you follow all of the prereq steps here: http://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html (especially http://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#windows-extras )

mastersingh24 (Wed, 11 Oct 2017 10:56:31 GMT):
We might also need the contents of npm-debug.log

Lavanya5896 (Wed, 11 Oct 2017 11:23:57 GMT):

Message Attachments

mna2016 (Wed, 11 Oct 2017 12:09:49 GMT):
Hi All, while running a customized "fabcar/query.js" I am getting the error "peer.sendproposal" is not a function error.

mna2016 (Wed, 11 Oct 2017 12:12:51 GMT):

Message Attachments

mna2016 (Wed, 11 Oct 2017 12:13:44 GMT):
Initially I thought that some library is missing, but npm install did not do any help and I still get the error.

mkhb654 (Wed, 11 Oct 2017 17:03:19 GMT):
Has joined the channel.

bretharrison (Wed, 11 Oct 2017 18:38:25 GMT):
@mna2016 Would you mind posting here the query.js that you are using

bretharrison (Wed, 11 Oct 2017 18:40:38 GMT):
@Lavanya5896 Do you know which fabric-client version you are using ?

hamptonsmith (Wed, 11 Oct 2017 19:07:36 GMT):
When registering a block listener with https://fabric-sdk-node.github.io/EventHub.html#registerBlockEvent__anchor , I seem to stop receiving events after a short amount of time (> 10 minutes, < 1 hour). isconnected() continues to return true. Is it expected behavior for this connection to "time out"? Is there a more robust way to detect when it has done so, so that I can reestablish the connection?

bretharrison (Wed, 11 Oct 2017 20:13:46 GMT):
@hamptonsmith what version are you running ?

hamptonsmith (Wed, 11 Oct 2017 20:16:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GFFfumXz9mHhZcqqs) @bretharrison 1.0.2

bretharrison (Wed, 11 Oct 2017 20:20:14 GMT):
@hamptonsmith you could try `eventHub._checkConnection(true,true);`

bretharrison (Wed, 11 Oct 2017 20:20:38 GMT):
this is internal method used to check things when a new registration comes in

bretharrison (Wed, 11 Oct 2017 20:21:17 GMT):
And have you tried messing with the GRPC stay alive settings

bretharrison (Wed, 11 Oct 2017 20:21:17 GMT):
And have you tried messing with the GRPC stay alive settings ?

hamptonsmith (Wed, 11 Oct 2017 20:22:31 GMT):
@bretharrison I haven't done any futzing with the underlying GRPC so I wouldn't know where to begin. Is there some documentation on that?

bretharrison (Wed, 11 Oct 2017 20:26:01 GMT):
@hamptonsmith not really ... but I have good luck with grpc.keepalive_time_ms set to 360000

bretharrison (Wed, 11 Oct 2017 20:26:01 GMT):
@hamptonsmith not really ... but I have good luck with grpc.keepalive_time_ms set to 360000 add this to the opt list when you build your event up, right with the ssl_target.. setting

hamptonsmith (Wed, 11 Oct 2017 20:30:27 GMT):
@bretharrison Ok, thanks for the info! In the mean time, perhaps I'm asking the wrong question. Certainly "observing updates to the blockchain" is a common use case, is there a better path to that? Or am I supposed to poll?

bretharrison (Wed, 11 Oct 2017 20:39:47 GMT):
@hamptonsmith I think that monitoring the block events is the way to go

bretharrison (Wed, 11 Oct 2017 20:39:47 GMT):
@hamptonsmith I think that monitoring the block events is the way to go, however since that is not really guarantied, that a poll once in awhile to get the last known block number

bretharrison (Wed, 11 Oct 2017 20:39:47 GMT):
@hamptonsmith I think that monitoring the block events is the way to go, however since that is not really guaranteed, that a poll once in awhile to get the last known block number

bertrand_sirodot (Thu, 12 Oct 2017 00:33:21 GMT):
Hi, when querying chaincode using a similar code as the `fabcar/query.js` example, is there a way to return a value that isn't a promise? For example, I have a `queryChaincode` function which calls a function in the chaincode that returns a string. How can I have the `queryChaincode` function return that string? Here is my `queryChaincode` function: ``` var queryChaincode = function(org, chaincode, fcn, args) { hfc.addConfigFile("./network-config.json"); var network = utils.getConfigSetting('network-config', 'notfound'); var channelId = utils.getConfigSetting("channelName", 'notfound'); var chaincodeId = chaincode; utils.setConfigSetting('key-value-store', 'fabric-client/lib/impl/FileKeyValueStore.js'); utils.setConfigSetting('crypto-keysize', 256); var prvKey = network[org].admin.key; var sgnCert = network[org].admin.cert; var keyStoreOpts = { path: utils.getConfigSetting('tmpdir') + "_" + org }; var cryptoSuite = hfc.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(hfc.newCryptoKeyStore(keyStoreOpts)); console.log("- Create a client and set the store location"); client = new hfc(); client.setCryptoSuite(cryptoSuite); return utils.newKeyValueStore(keyStoreOpts).then((store) => { console.log("- Setting the new key store " + utils.getConfigSetting('tmpdir') + "_" + org); console.log("- Set wallet path, and associate user ", network[org].username, " with application"); client.setStateStore(store); console.log("- Store set"); return''; }).then(() => { console.log("- Adding user Admin to the store"); return client.createUser({ username: network[org].username, mspid: network[org].mspid, cryptoContent: { privateKey: prvKey, signedCert: sgnCert} }); }, (err) => { console.log("- Failed to add user Admin to the store"); return; }).then((user) => { console.log("- User successfully added to the store"); console.log("- Setting up channel with name" + channelId); let data = fs.readFileSync(network[org].peers['peer1']['tls_cacerts']); channel = client.newChannel(channelId, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] }); console.log("- Channel setup, now setting up peer"); var peer = client.newPeer( network[org].peers['peer1'].requests, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] } ); console.log("- Peer set up, adding peer to channel"); channel.addPeer(peer) return; }).then(() => { console.log("- Making query"); var tx_id = client.newTransactionID(); console.log("- Assigning transaction_id: ", tx_id._transaction_id); const request = { chaincodeId: chaincodeId, txId: tx_id, fcn: fcn, args: args }; return channel.queryByChaincode(request); }).then((query_responses) => { console.log("returned from query"); if (!query_responses.length) { console.log("No payloads were returned from query"); } else { console.log("Query result count = ", query_responses.length) } if (query_responses[0] instanceof Error) { console.error("error from query = ", query_responses[0]); } console.log("Response is ", query_responses[0].toString()); resolve(query_responses[0]); }).catch((err) => { console.error("Caught Error", err); }); } ```

bertrand_sirodot (Thu, 12 Oct 2017 00:33:21 GMT):
Hi, when querying chaincode using a similar code as the `fabcar/query.js` example, is there a way to return a value that isn't a promise? For example, I have a `queryChaincode` function which calls a function in the chaincode that returns a string. How can I have the `queryChaincode` function return that string? Here is my `queryChaincode` function: ``` var queryChaincode = function(org, chaincode, fcn, args) { hfc.addConfigFile("./network-config.json"); var network = utils.getConfigSetting('network-config', 'notfound'); var channelId = utils.getConfigSetting("channelName", 'notfound'); var chaincodeId = chaincode; utils.setConfigSetting('key-value-store', 'fabric-client/lib/impl/FileKeyValueStore.js'); utils.setConfigSetting('crypto-keysize', 256); var prvKey = network[org].admin.key; var sgnCert = network[org].admin.cert; var keyStoreOpts = { path: utils.getConfigSetting('tmpdir') + "_" + org }; var cryptoSuite = hfc.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(hfc.newCryptoKeyStore(keyStoreOpts)); console.log("- Create a client and set the store location"); client = new hfc(); client.setCryptoSuite(cryptoSuite); return utils.newKeyValueStore(keyStoreOpts).then((store) => { console.log("- Setting the new key store " + utils.getConfigSetting('tmpdir') + "_" + org); console.log("- Set wallet path, and associate user ", network[org].username, " with application"); client.setStateStore(store); console.log("- Store set"); return''; }).then(() => { console.log("- Adding user Admin to the store"); return client.createUser({ username: network[org].username, mspid: network[org].mspid, cryptoContent: { privateKey: prvKey, signedCert: sgnCert} }); }, (err) => { console.log("- Failed to add user Admin to the store"); return; }).then((user) => { console.log("- User successfully added to the store"); console.log("- Setting up channel with name" + channelId); let data = fs.readFileSync(network[org].peers['peer1']['tls_cacerts']); channel = client.newChannel(channelId, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] }); console.log("- Channel setup, now setting up peer"); var peer = client.newPeer( network[org].peers['peer1'].requests, { pem: Buffer.from(data).toString(), 'ssl-target-name-override': network[org].peers['peer1']['server-hostname'] } ); console.log("- Peer set up, adding peer to channel"); channel.addPeer(peer) return; }).then(() => { console.log("- Making query"); var tx_id = client.newTransactionID(); console.log("- Assigning transaction_id: ", tx_id._transaction_id); const request = { chaincodeId: chaincodeId, txId: tx_id, fcn: fcn, args: args }; return channel.queryByChaincode(request); }).then((query_responses) => { console.log("returned from query"); if (!query_responses.length) { console.log("No payloads were returned from query"); } else { console.log("Query result count = ", query_responses.length) } if (query_responses[0] instanceof Error) { console.error("error from query = ", query_responses[0]); } console.log("Response is ", query_responses[0].toString()); return(query_responses[0]); }).catch((err) => { console.error("Caught Error", err); }); } ``` As you can see, it returns `query_reponses[0]`, but that's a promise, not the actual value being returned by the chaincode. How can I have it return the actual value?

luomin (Thu, 12 Oct 2017 01:13:04 GMT):
Has joined the channel.

jimthematrix (Thu, 12 Oct 2017 03:24:57 GMT):
@bertrand_sirodot the last `then()` handler is expected to return a value synchronously instead of returning another promise, and that's what you are doing already. so when you call queryChaincode(), it's `then()` handler will be passed that value: ``` queryChaincode(...) .then((response) => { // here the "response" has the value returned from "query_responses[0]" });

tamajit (Thu, 12 Oct 2017 05:49:41 GMT):
Has joined the channel.

rajasekharpippalla (Thu, 12 Oct 2017 06:41:12 GMT):
how we can identify all transactions which are related to particular user , i am working on balance-transfer example in fabric-samples ?

mna2016 (Thu, 12 Oct 2017 07:53:37 GMT):
@bretharrison I ran the registerAdmin.js(that you shared earlier) as a standalone node program. this run created a few certificates that i saved inside of /creds subdirectory. now I am running query.js which is showing error "peer.sendproposal is not a function. here is the query.js code

mna2016 (Thu, 12 Oct 2017 07:56:54 GMT):

query (copy)_js.txt

bretharrison (Thu, 12 Oct 2017 08:39:34 GMT):
@mna2016 Notice that you passing the url to queryInfo, it should be the actual peer object or nothing to let it default to the peer added to the channel. I also notice that you are not using TLS, is TLS also turned off in the Docker compose you are running ?

Amitchandra (Thu, 12 Oct 2017 08:49:12 GMT):
When a Chaincode is changed, how is the version control maintained across the Network in the Organizations.

mna2016 (Thu, 12 Oct 2017 08:55:33 GMT):
@bretharrison I am currently attempting to connect query.js to the blockchain network I have deployed on "kubernetes" cluster. I did not specifically set tls=off anywhere.

mna2016 (Thu, 12 Oct 2017 08:57:00 GMT):
@bretharrison I would like to make calls to blockchain to know its current height as well as block content, block hash etc.

mna2016 (Thu, 12 Oct 2017 10:55:12 GMT):
@bretharrison yes it seems tls is turned off in the blockchain in installed on this container.

mna2016 (Thu, 12 Oct 2017 10:55:12 GMT):
@bretharrison yes it seems tls is turned off in the blockchain i installed on this container.

DarshanBc (Thu, 12 Oct 2017 11:07:29 GMT):
Hi I am trying to add role for a user from sdk like this but I am getting an error ``` return caClient.register({ enrollmentID: username, affiliation: userOrg + '.department1' role:"admin" }, member); ``` this is the error ``` node app /home/rtcin/go/src/github.com/hyperledger/fabric-samples/D-Twin-4org/app/helper.js:244 role:"admin" ^^^^ SyntaxError: Unexpected identifier at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/rtcin/go/src/github.com/hyperledger/fabric-samples/D-Twin-4org/app.js:34:14) at Module._compile (module.js:570:32) ``` https://fabric-sdk-node.github.io/FabricCAClient.html#register__anchor I followed this

Vadim (Thu, 12 Oct 2017 11:10:10 GMT):
@DarshanBc you need to put a comma on the previous line

DarshanBc (Thu, 12 Oct 2017 11:10:45 GMT):
oops!!!! Thank you

CodeReaper (Thu, 12 Oct 2017 12:18:06 GMT):
hey, can hfc.addConfigfile help us save any config required to our app or a proper format is required??

eetti (Thu, 12 Oct 2017 15:07:11 GMT):
How can we _manually_ (without using the SDK) create the user files (certs,pub/priv key) in kvs folder with the use of fabric-ca.

bertrand_sirodot (Thu, 12 Oct 2017 15:52:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dnDQCKHn6k3W5oBTP) @jimthematrix : when I run `response = query.queryChaincode(...)` then `response` is a promise and not the actual value of `query_responses[0]`, so I am not sure I am following you.

jimthematrix (Thu, 12 Oct 2017 16:19:26 GMT):
@bertrand_sirodot see my sample code snippet in my original response, since queryChaincode() is an asycn function, you have to get the returned value via "then()"

jimthematrix (Thu, 12 Oct 2017 16:19:26 GMT):
@bertrand_sirodot see my sample code snippet in my original response, since queryChaincode() is an asycn function, you have to get the returned value via "then()", this is the standard way for promise based functions communicate the return value back to the caller. not sure if I'm missing something in your question ...

hamptonsmith (Thu, 12 Oct 2017 17:25:26 GMT):
channel.queryInfo() returns a Long object for its height, but do I understand correctly that https://fabric-sdk-node.github.io/Channel.html#queryBlock__anchor only takes a javascript number? Are blocks with number unrepresentable as an IEEE double thus inaccessible?

bretharrison (Thu, 12 Oct 2017 17:44:20 GMT):
@CodeReaper Yes you can use the config system to store your application settings, the format is important, see the fabric-client/config/default.json for an example of how to structure the key value pairs , basically just valid JSON.

bretharrison (Thu, 12 Oct 2017 17:47:40 GMT):
@eetti http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html?highlight=cryptogen#crypto-generator

bertrand_sirodot (Thu, 12 Oct 2017 19:29:28 GMT):
@jimthematrix : I was trying to get access to the returned value outside of the `.then`, but it doesn't look like it is possible. :(

jimthematrix (Thu, 12 Oct 2017 22:26:31 GMT):
@bertrand_sirodot if your environment allows node 8, it supports the `await` syntax that returns the promised value directly without the `.then()` handlers

pete913 (Fri, 13 Oct 2017 02:23:41 GMT):
Has joined the channel.

jaswanth (Fri, 13 Oct 2017 05:22:19 GMT):
hi all iam using windows 10 . when i tried to run balance-transfer example in docs .. its falling at enrollment .

jaswanth (Fri, 13 Oct 2017 05:22:19 GMT):
hi all iam using windows 10 . when i tried to run balance-transfer example in docs ..Enrollment failed with below error

jaswanth (Fri, 13 Oct 2017 05:22:40 GMT):

Screenshot (357).png

jaswanth (Fri, 13 Oct 2017 05:22:40 GMT):

Screenshot (357).png

CodeReaper (Fri, 13 Oct 2017 06:21:42 GMT):
I saw admins array inside config,json ehsich was included in config of hfc in balance transfer. The credential is that of the CA's admin itself??

DarshanBc (Fri, 13 Oct 2017 14:05:07 GMT):
Can someone help me [ ](https://chat.hyperledger.org/channel/fabric-ca?msg=GJ5sFHFqsNPpjBCHZ)

bertrand_sirodot (Fri, 13 Oct 2017 15:12:27 GMT):
@jimthematrix : I am not sure if I can use node 8, so let me do some investigation on that as the `await` syntax would be interesting to me.

jrosmith (Fri, 13 Oct 2017 19:24:24 GMT):
@DarshanBc the bones of attribute based access control are there but are not implemented. they should be in the v1.1 release

DarshanBc (Sat, 14 Oct 2017 01:59:57 GMT):
@jrosmith Really!!!!!! Because the ca section of the document is updated about ABAC hence I pulled source codes from Master branch so you mean that b also doesn't work?

vu3mmg (Mon, 16 Oct 2017 02:13:38 GMT):
@mastersingh24 can we specify targets in the request for channel.sendInstantiateProposal(request); . In the new balance transfer example , I am not able to find the targets .

jaswanth (Mon, 16 Oct 2017 05:31:18 GMT):
Can i get roles from the enrolled user. like i registered a user with `hf.role = manager` when i enroll a user only the manager can do some specific operations , but when i looked into the enrolled user i dint find any `role = manager` value .Is there a way of getting it in my nodejs. any help here

DarshanBc (Mon, 16 Oct 2017 05:39:11 GMT):
@jaswanth check this piece of code ```var X509 = require('x509'); function checkoutCertForAttributes(t, pem, should_find, attr_name) { var attr = null; let cert = X509.parseCert(pem); let found = false; if(cert && cert.extensions && cert.extensions['1.2.3.4.5.6.7.8.1']) { let attr_string = cert.extensions['1.2.3.4.5.6.7.8.1']; let attr_object = JSON.parse(attr_string); let attrs = attr_object.attrs; if(attrs && attrs[attr_name]) { logger.debug(' Found attribute %s with value of %s',attr_name, attrs[attr_name]); found = true; } } }```

DarshanBc (Mon, 16 Oct 2017 05:39:11 GMT):
@jaswanth check this piece of code ```var X509 = require('x509'); function checkoutCertForAttributes( pem, attr_name) { var attr = null; let cert = X509.parseCert(pem); let found = false; if(cert && cert.extensions && cert.extensions['1.2.3.4.5.6.7.8.1']) { let attr_string = cert.extensions['1.2.3.4.5.6.7.8.1']; let attr_object = JSON.parse(attr_string); let attrs = attr_object.attrs; if(attrs && attrs[attr_name]) { logger.debug(' Found attribute %s with value of %s',attr_name, attrs[attr_name]); found = true; } } }```

jaswanth (Mon, 16 Oct 2017 05:43:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GduFW8mAxacofLDRE) @DarshanBc Thank you . I'll look into that.

tejasborawake (Mon, 16 Oct 2017 11:36:26 GMT):
@jimthematrix we are trying to setup multiple machine setup using node sdk. we got out orderer,ca for both org1 and org2 and all peers of both orgs up and running. We also able to generate token from both machines. but when org2 machine is gets the call to join channel created by orderer from machine where both orderer and org2 peers are placed, it gives below error: [Orderer.js]: sendDeliver - on error code 14: "Error: Connect Failed\n[ERROR] Join-Channel - Error: SERVICE_UNAVAILABLE could you please help us with the issue?

tejasborawake (Mon, 16 Oct 2017 11:36:26 GMT):
@jimthematrix we are trying to setup multiple machine setup using node sdk. we got out orderer,ca for both org1 and org2 and all peers of both orgs up and running. We also able to generate token from both machines. but when org2 machine is gets the call to join channel created by orderer from machine where both orderer and org1 peers are placed, org2's node app gives below error: [Orderer.js]: sendDeliver - on error code 14: "Error: Connect Failed\n[ERROR] Join-Channel - Error: SERVICE_UNAVAILABLE could you please help us with the issue?

jrosmith (Mon, 16 Oct 2017 15:29:54 GMT):
@DarshanBc I'd double check with one of the maintainers but at the hackfest in Chicago I left with the impression that full support won't be out till v1.1

jtclark (Mon, 16 Oct 2017 16:48:43 GMT):
Has joined the channel.

DarshanBc (Tue, 17 Oct 2017 05:32:23 GMT):
Can anyone help me with steps to install node sdk from github not npm

DarshanBc (Tue, 17 Oct 2017 05:32:23 GMT):
ok fine @jrosmith Can anyone help me with steps to install node sdk from github not npm

DarshanBc (Tue, 17 Oct 2017 05:32:23 GMT):
ok fine @jrosmith Can you help me with steps to install node sdk from github not npm

jrosmith (Tue, 17 Oct 2017 15:51:40 GMT):
@DarshanBc i've only installed via npm, sorry man!

einarpersson (Tue, 17 Oct 2017 18:20:26 GMT):
Has joined the channel.

einarpersson (Tue, 17 Oct 2017 18:26:18 GMT):
I'm thinking of transferring from hyperledger composer to working directly with fabric through the node sdk. Is it a good or bad idea? ^^ does anyone here have experience of both and can elaborate a bit on what capabilities working with fabric directly bring and other pro's/con's? Supervague question I know but I'd appreciate whatever thoughts you have!

bretharrison (Tue, 17 Oct 2017 20:45:46 GMT):
@vu3mmg Yes you may specify the targets on the `sendInstantiateProposal(request, timeout)` https://fabric-sdk-node.github.io/Channel.html#sendInstantiateProposal__anchor

bretharrison (Tue, 17 Oct 2017 20:46:41 GMT):
The request object parameter takes a `targets : [ peer, peer]`

outis (Wed, 18 Oct 2017 01:08:12 GMT):
Is there any way to get serial/aki of the certificate of a registered user via sdk? Also, is it possible to set expiration date when registering a user?

DarshanBc (Wed, 18 Oct 2017 13:52:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oQRZufZy937hBfe7G) issue resolved

knagware9 (Wed, 18 Oct 2017 20:02:34 GMT):
@einarpersson ..Yes i have used fabric with node sdk ,,node sdk is enough mature to do production ready application

BrianOtieno (Thu, 19 Oct 2017 05:10:48 GMT):
Has joined the channel.

alexandra_g (Thu, 19 Oct 2017 07:42:29 GMT):
Hi All, I'm testing out the fabcar sample application and after trying to make a query I'm getting the following error ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com") ```

alexandra_g (Thu, 19 Oct 2017 07:42:41 GMT):
If anyone knows what I should adjust that would be helpful! Thanks in advance!

jrosmith (Thu, 19 Oct 2017 14:22:29 GMT):
@alexandra_g looks like your signing identity is messed up, how did you go about registering the user that is signing the transaction proposal?

MohammadObaid (Thu, 19 Oct 2017 15:11:55 GMT):
Hi everyone I just want to ask which approach is better in terms of deployment ? using hyperledger-fabric with ibm bluemix or deploy locally using fabric-node-sdk ?

alexandra_g (Thu, 19 Oct 2017 17:48:23 GMT):
@jrosmith -- I am using basic_network in the fabric-samples --> wondering if the last line of start.sh file is causing problems? https://github.com/hyperledger/fabric-samples/blob/release/basic-network/start.sh

outis (Fri, 20 Oct 2017 05:11:23 GMT):
Anyone know where the cert files are stored when registering a user via sdk?

outis (Fri, 20 Oct 2017 05:11:23 GMT):
Anyone knows where the cert files are stored when registering a user via sdk?

abdfaye (Fri, 20 Oct 2017 09:43:52 GMT):
Has joined the channel.

abdfaye (Fri, 20 Oct 2017 09:44:20 GMT):
Hi, I am interested in using a pkcs11 cryptosuite with the fabric balance transfer sample. My first tests show me that the client node sdk pkcs11 implementation is not adapted to build the balance transfert yet (some issues to enroll users). Am I right?

hoffin (Fri, 20 Oct 2017 09:54:58 GMT):
Has joined the channel.

rameshthoomu (Fri, 20 Oct 2017 13:53:23 GMT):
@bretharrison I see fabric-sdk-node merge builds are failing on platforms https://jenkins.hyperledger.org/view/fabric-sdk-node/job/fabric-sdk-node8-merge-x86_64/34/consoleFull

rameshthoomu (Fri, 20 Oct 2017 13:53:57 GMT):
is this known problem?

bretharrison (Fri, 20 Oct 2017 13:57:32 GMT):
@rameshthoomu I showed Jim yesterday, looks like something with the node.js chaincode execution. Just started failing yesterday.

rameshthoomu (Fri, 20 Oct 2017 13:58:09 GMT):
yes.. I see that.. Do you have JIRA item for this?

bretharrison (Fri, 20 Oct 2017 13:58:18 GMT):
no

rameshthoomu (Fri, 20 Oct 2017 14:02:10 GMT):
Will create one and assign it to you.

bretharrison (Fri, 20 Oct 2017 14:02:31 GMT):
it is problem on fabric side

bretharrison (Fri, 20 Oct 2017 14:02:44 GMT):
not in NodeSDK

rameshthoomu (Fri, 20 Oct 2017 14:03:42 GMT):
ok

rameshthoomu (Fri, 20 Oct 2017 14:32:13 GMT):
@bretharrison FYI https://jira.hyperledger.org/browse/FAB-6689

pd93 (Fri, 20 Oct 2017 14:59:52 GMT):
Hey, Does anyone know how I can catch this error? It happens when the network goes down while my node app is connected ``` { Error: Endpoint read failed at ClientDuplexStream._emitStatusIfDone (...../node_modules/grpc/src/node/src/client.js:255:19) at ClientDuplexStream._receiveStatus (...../node_modules/grpc/src/node/src/client.js:233:8) at ...../node_modules/grpc/src/node/src/client.js:757:12 code: 14, metadata: Metadata { _internal_repr: {} } } ```

vu3mmg (Sat, 21 Oct 2017 08:00:06 GMT):
could you please point me to an example to create a ChaincodeDeploymentSpec

VoR0220 (Sat, 21 Oct 2017 19:57:28 GMT):
Has joined the channel.

VoR0220 (Sat, 21 Oct 2017 20:02:06 GMT):
so it appears that ya'll used to have typescript types declared and no longer do. Why is this?

kostas (Sun, 22 Oct 2017 00:02:34 GMT):
Has joined the channel.

kostas (Sun, 22 Oct 2017 00:03:33 GMT):
I know it used to be the case that SDK client would tear down the Broadcast RPC and bring it up for every message. Is that still the case? @jimthematrix

bretharrison (Mon, 23 Oct 2017 10:17:35 GMT):
@kostas Yes it is

bretharrison (Mon, 23 Oct 2017 10:29:05 GMT):
@VoR0220 see https://gerrit.hyperledger.org/r/#/c/14203/

bretharrison (Mon, 23 Oct 2017 10:33:48 GMT):
@vu3mmg The NodeSDK shields users from having to work with protobufs like ChaincodeDeploymentSpec, however if you wish to see it, see `Client.js` at about line 988.

rexxie (Mon, 23 Oct 2017 14:37:07 GMT):
Has joined the channel.

rexxie (Mon, 23 Oct 2017 14:37:53 GMT):
var endorsementdata={ identities: [ { role: { name: "member", mspId: "Org1MSP" }}, { role: { name: "member", mspId: "Org2MSP" }} ], policy: { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } }

rexxie (Mon, 23 Oct 2017 14:40:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YGYDRaDQBJ5XdcPMD) this Endorsement Policy can run ,but not submit Successfully。。。can you help me what‘s problem

Asara (Mon, 23 Oct 2017 14:40:51 GMT):
@rexxie if you put triple backticks around your code it will look much nicer

Asara (Mon, 23 Oct 2017 14:41:01 GMT):
var endorsementdata={ identities: [ { role: { name: "member", mspId: "Org1MSP" }}, { role: { name: "member", mspId: "Org2MSP" }} ], policy: { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } } ```

Asara (Mon, 23 Oct 2017 14:41:01 GMT):
``` var endorsementdata={ identities: [ { role: { name: "member", mspId: "Org1MSP" }}, { role: { name: "member", mspId: "Org2MSP" }} ], policy: { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } } ```

rexxie (Mon, 23 Oct 2017 14:46:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gQN8MBEMTD84kNq3F) @Asara how to fix it?

jrosmith (Mon, 23 Oct 2017 14:48:54 GMT):
@rexxie rocket.chat supports markdown: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#user-content-code-and-syntax-highlighting

VoR0220 (Mon, 23 Oct 2017 18:15:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vmLHdrZPu4Z83wwEy) @bretharrison Okay, I see, you're in the process of making them. Okay then. Second question. How would I import this using the current package? I'm currently just importing the entire fabric-client, but certainly there has to be a better way. https://fabric-sdk-node.github.io/CouchDBKeyValueStore.html

VoR0220 (Mon, 23 Oct 2017 18:22:35 GMT):
nvm think I figured something out...but it appears to not recognize it as a constructor.

VoR0220 (Mon, 23 Oct 2017 18:22:35 GMT):
nvm think I figured something out...but it appears to not recognize it as containing a constructor...weird...

outis (Tue, 24 Oct 2017 01:26:51 GMT):
Assuming the balance transfer example, does anyone know how to revoke the certificate of Jim/Barry? I tried to get aki/serial to use `revoke` in vain. The certificates are in /tmp/fabric-client-kvs_peerOrg1/ etc, but running openssl gives me an error.

outis (Tue, 24 Oct 2017 01:26:51 GMT):
Assuming the balance transfer example, does anyone know how to revoke the certificate of Jim/Barry? I tried to get aki/serial to use `revoke` in vain. The certificates are in /tmp/fabric-client-kvs_peerOrg1/ etc, but running openssl gives me an error. More generally, what is the procedure that revoke api assumes to obtain the aki/serial? If it is not doable (for the moment), I would like to know as such.

jaswanth (Tue, 24 Oct 2017 06:00:49 GMT):
I am trying to do some access control based on invoker of the tx. Imported "github.com/hyperledger/fabric/core/chaincode/lib/cid", in my chaincode ...but got error as ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/example_cc/example_cc.go:25:2: 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) /chaincode/input/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid "```

CodeReaper (Tue, 24 Oct 2017 07:29:28 GMT):
Hey, Can I get the config block of a channel through SDK?? If yes, then how?? I want to use it for configtxlator, so is it important to get it into .pb extension or I can get the json object as it is and write it in file and then use it?? Any hints??

Vadim (Tue, 24 Oct 2017 07:33:37 GMT):
@CodeReaper https://fabric-sdk-node.github.io/Channel.html#getChannelConfig__anchor

CodeReaper (Tue, 24 Oct 2017 07:36:58 GMT):
@Vadim I tried that, but how do I link the result to the input that configtxlator takes? Can I feed the changes in json object directly and feed it as a file to configtxlator when I want to update it??

CodeReaper (Tue, 24 Oct 2017 07:39:26 GMT):
Is there any channel dedicated to these tools??

jrosmith (Tue, 24 Oct 2017 13:27:07 GMT):
@jaswanth please move this question to #chaincode-dev

Menniti (Tue, 24 Oct 2017 16:19:58 GMT):
https://www.edx.org/course/blockchain-business-introduction-linuxfoundationx-lfs171x

Menniti (Tue, 24 Oct 2017 16:20:09 GMT):
Hey guys, Maybe someone is interested Hyperledger Course in EdX https://www.edx.org/course/blockchain-business-introduction-linuxfoundationx-lfs171x

jimthematrix (Wed, 25 Oct 2017 02:07:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9KCfxiC63JpAWngjB) @kostas late response, but that's not the case any longer, the connection to the orderer for broadcasting transactions will re-use the same grpc stream, so no re-negotiating tls for every message

username343 (Wed, 25 Oct 2017 05:32:04 GMT):
Has joined the channel.

zhaochy (Wed, 25 Oct 2017 06:00:24 GMT):
Has joined the channel.

geek07 (Wed, 25 Oct 2017 06:21:50 GMT):
Has joined the channel.

levinkwong (Wed, 25 Oct 2017 07:43:14 GMT):
Hi guys, I have a Node.js application that used as the middleware to expose REST endpoint for client to talk to Hyperledger Fabric. I found that when the Node.js application runs for long time, it has *MANY* TCP socket opened .... any idea?? or what direction can I investigate?

Vadim (Wed, 25 Oct 2017 07:43:45 GMT):
@levinkwong to which ports?

levinkwong (Wed, 25 Oct 2017 07:45:03 GMT):

Screen Shot 2017-10-25 at 3.44.44 PM.png

levinkwong (Wed, 25 Oct 2017 07:45:18 GMT):
Left hand side no idea, righ hand side is the port of my application

Vadim (Wed, 25 Oct 2017 07:45:44 GMT):
seems like it's sdk-to-peer connection

levinkwong (Wed, 25 Oct 2017 07:45:46 GMT):
I guess it is the port of the peer?

Vadim (Wed, 25 Oct 2017 07:46:09 GMT):
is your peer running in docker?

Vadim (Wed, 25 Oct 2017 07:46:09 GMT):
is your peer running in docker swarm?

levinkwong (Wed, 25 Oct 2017 07:46:50 GMT):
yes

levinkwong (Wed, 25 Oct 2017 07:47:05 GMT):

Screen Shot 2017-10-25 at 3.46.34 PM.png

Vadim (Wed, 25 Oct 2017 07:47:24 GMT):
is grpc keepalive enabled on all connections?

levinkwong (Wed, 25 Oct 2017 07:47:27 GMT):
This is server side, these TCP sockets are not in use, hundreds of them!!

levinkwong (Wed, 25 Oct 2017 07:47:48 GMT):
How to check ?

Vadim (Wed, 25 Oct 2017 07:48:24 GMT):
perhaps not, since you asking this

levinkwong (Wed, 25 Oct 2017 07:49:31 GMT):
https://github.com/hyperledger/composer/issues/2317 Is this from you ?

Vadim (Wed, 25 Oct 2017 07:49:39 GMT):
@levinkwong try providing for peer connections: ``` { 'grpc.keepalive_timeout_ms': 60000, 'grpc.http2.max_pings_without_data': 0, 'grpc.keepalive_time_ms': 400000, 'grpc.keepalive_permit_without_calls': 1, } ```

Vadim (Wed, 25 Oct 2017 07:49:39 GMT):
@levinkwong try providing for peer or orderer connections: ``` { 'grpc.keepalive_timeout_ms': 60000, 'grpc.http2.max_pings_without_data': 0, 'grpc.keepalive_time_ms': 400000, 'grpc.keepalive_permit_without_calls': 1, } ```

Vadim (Wed, 25 Oct 2017 07:50:06 GMT):
for eventhubs, remove 'grpc.keepalive_permit_without_calls': 1,

Vadim (Wed, 25 Oct 2017 07:50:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NWFAHTCtgKHhEwBG6) yes

levinkwong (Wed, 25 Oct 2017 07:50:48 GMT):
where to provide this JSON

Vadim (Wed, 25 Oct 2017 07:52:47 GMT):
whenever you make a Peer, Orderer or EventHub instance in your code

Vadim (Wed, 25 Oct 2017 07:53:04 GMT):
e.g.

Vadim (Wed, 25 Oct 2017 07:53:08 GMT):
``` channel.addOrderer(new Orderer(c.orgs[key].url, { 'pem': c.readCerts(c.orgs[key].tls_cacerts), 'ssl-target-name-override': c.orgs[key]['server-hostname'], 'grpc.keepalive_timeout_ms': 60000, 'grpc.http2.max_pings_without_data': 0, 'grpc.keepalive_time_ms': 400000, 'grpc.keepalive_permit_without_calls': 1, } ));

levinkwong (Wed, 25 Oct 2017 07:57:21 GMT):
@Vadim Checked, we didn't set it... If a connection is timeout , the disconnected socket will still hangs there? In one of our environment, the number of sockets reach 1024 (the ulimit) and no more connection can be established

Vadim (Wed, 25 Oct 2017 07:58:36 GMT):
seems like it

levinkwong (Wed, 25 Oct 2017 08:01:18 GMT):
Is this the problem from SDK (the client) or Fabric (the server)?

levinkwong (Wed, 25 Oct 2017 08:01:18 GMT):
This the problem from SDK (the client) or Fabric (the server)?

levinkwong (Wed, 25 Oct 2017 08:01:18 GMT):
Is the problem from SDK (the client) or Fabric (the server)?

Vadim (Wed, 25 Oct 2017 08:04:09 GMT):
problem is from docker swarm

levinkwong (Wed, 25 Oct 2017 08:04:15 GMT):
oh...

levinkwong (Wed, 25 Oct 2017 08:04:17 GMT):
!

Vadim (Wed, 25 Oct 2017 08:04:57 GMT):
it's not really a problem, it's how it works and it's correct

levinkwong (Wed, 25 Oct 2017 08:05:42 GMT):
How so, shouldn't the socket be closed after timeout? why still remaining there

Vadim (Wed, 25 Oct 2017 08:05:51 GMT):
because it's not closed

Vadim (Wed, 25 Oct 2017 08:06:13 GMT):
it's load balancer which stops routing packets after 15 min of inactivity

Vadim (Wed, 25 Oct 2017 08:06:27 GMT):
but the socket is "open"

levinkwong (Wed, 25 Oct 2017 08:07:15 GMT):
But after no activity for a long time, wouldn't the grpc connection closed?

Vadim (Wed, 25 Oct 2017 08:07:42 GMT):
no

Vadim (Wed, 25 Oct 2017 08:08:03 GMT):
at least not in case of swarm

levinkwong (Wed, 25 Oct 2017 08:08:29 GMT):
``` // After a duration of this time if the server doesn't see any activity it pings the client to see if the transport is still alive. Time time.Duration // The current default value is 2 hours. // After having pinged for keepalive check, the server waits for a duration of Timeout and if no activity is seen even after that // the connection is closed. Timeout time.Duration // The current default value is 20 seconds. ```

levinkwong (Wed, 25 Oct 2017 08:08:49 GMT):
I thought after 2hours and some ping, the connection will be closed

Vadim (Wed, 25 Oct 2017 08:08:59 GMT):
where is this from?

levinkwong (Wed, 25 Oct 2017 08:09:06 GMT):
https://github.com/grpc/grpc-go/blob/master/keepalive/keepalive.go

Vadim (Wed, 25 Oct 2017 08:10:01 GMT):
I guess load balancer prevents from that

levinkwong (Wed, 25 Oct 2017 08:10:21 GMT):
After enabling the setting you provide, why `15 min of inactivity` will be worked around?

Vadim (Wed, 25 Oct 2017 08:10:29 GMT):
yes

levinkwong (Wed, 25 Oct 2017 08:10:43 GMT):
there will be some activity?

Vadim (Wed, 25 Oct 2017 08:10:48 GMT):
yes

levinkwong (Wed, 25 Oct 2017 08:11:08 GMT):
ok thanks! We will give it a try~~

levinkwong (Wed, 25 Oct 2017 08:11:39 GMT):
And move on to Kubernetes :sweat_smile:

Vadim (Wed, 25 Oct 2017 08:11:53 GMT):
not sure it behaves differently

levinkwong (Wed, 25 Oct 2017 08:18:38 GMT):
@Vadim Thanks a lot!

levinkwong (Wed, 25 Oct 2017 10:03:19 GMT):
@Vadim After adding the configs, the number of sockets still increasing~~ 3 sockets per transaction ...

vladyslavmunin (Wed, 25 Oct 2017 14:24:02 GMT):
Hi all! I faced with error : PayloadTooLargeError

vladyslavmunin (Wed, 25 Oct 2017 14:24:47 GMT):

Clipboard - October 25, 2017 5:24 PM

vladyslavmunin (Wed, 25 Oct 2017 14:25:25 GMT):
Does anyone know which size is max for payload ? and how I can control it>

Vadim (Wed, 25 Oct 2017 14:28:21 GMT):
@vladyslavmunin maybe try to set "grpc.max_receive_message_length: -1" in your node app on peer connections (-1 == unlimited)

vladyslavmunin (Wed, 25 Oct 2017 14:59:58 GMT):
@Vadim thanks. it looks working now

kostas (Wed, 25 Oct 2017 15:39:58 GMT):
@jimthematrix: Thanks!

VoR0220 (Wed, 25 Oct 2017 20:58:01 GMT):
how would I enroll someone via LDAP using the CA-client? Is this the correct way to enroll someone?

pchandra (Thu, 26 Oct 2017 05:06:24 GMT):
Has joined the channel.

agiledeveloper (Thu, 26 Oct 2017 08:01:20 GMT):
hi guys: can you advice on where to check for this error : `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed dentity, err MSP EGArtMSP is unknown at /home/agiledeveloper/HLF/fabric-samples/artforgery/artapp/node_modules/grp:554:15 Bad Response `

agiledeveloper (Thu, 26 Oct 2017 08:01:20 GMT):
hi guys: can you advice on where to check for this error : ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed dentity, err MSP EGArtMSP is unknown at /home/agiledeveloper/HLF/fabric-samples/artforgery/artapp/node_modules/grp:554:15 Bad Response ```

agiledeveloper (Thu, 26 Oct 2017 08:01:20 GMT):
hi guys: can you advice on where to check for this error : ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed dentity, err MSP EGArtMSP is unknown at /home/agiledeveloper/HLF/fabric-samples/artforgery/artapp/node_modules/grp:554:15 Bad Response ```

agiledeveloper (Thu, 26 Oct 2017 08:01:20 GMT):
*Solved* hi guys: can you advice on where to check for this error : ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed dentity, err MSP EGArtMSP is unknown at /home/agiledeveloper/HLF/fabric-samples/artforgery/artapp/node_modules/grp:554:15 Bad Response ```

gentios (Thu, 26 Oct 2017 14:02:32 GMT):
@agiledeveloper your authentication to CA failed

SimonOberzan (Fri, 27 Oct 2017 13:01:32 GMT):
Hi. I have registered and enrolled a new peer using fabric-ca-client. Enroll call returned me an object with certificate and a key. What I wanna do, is save those two to a file. I have successfuly written the certificate to a file, because it is a string, but I don't know how to transform the key (https://pastebin.com/raw/4LSbiFPp) to a PEM format that I can write to a file. Help much appreciated.

SimonOberzan (Fri, 27 Oct 2017 13:01:32 GMT):
Hi. I have registered and enrolled a new peer using fabric-ca-client. Enroll call returned me an object with certificate and a key. What I wanna do, is save those two to a file. I have successfuly written the certificate to a file, because it is a string, but I don't know how to transform the key (https://pastebin.com/raw/4LSbiFPp) to a PEM format that I can write to a file. Any help much appreciated.

SimonOberzan (Fri, 27 Oct 2017 13:01:32 GMT):
Hi. I have registered and enrolled a new peer using fabric-ca-client. Enroll call returned me an object with certificate and a key. What I wanna do, is save those two to a file. I have successfuly written the certificate to a file, because it is a string, but I don't know how to transform the key (https://pastebin.com/raw/4LSbiFPp) to a PEM format that I can write to a file. Any help would be much appreciated.

Vadim (Fri, 27 Oct 2017 13:24:07 GMT):
@SimonOberzan have you tried toString() on it?

mitrashan (Fri, 27 Oct 2017 13:24:17 GMT):
Has joined the channel.

mitrashan (Fri, 27 Oct 2017 13:25:02 GMT):
While trying to invoke from the balance-transfer getting this error. I'm sure this is because of the TLS which is not properly setup with my custom network with 6 peers, 6 orgs. But, at the same time I am not able to run the invoke over 'http' too. Can anyone please help me either with some guideline to setup the network with TLS or how to invoke over no-tls, I am really not sure about the certificates those are generated by the cryptogen are signed or not or how to use the signed certs. *error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority.

Vadim (Fri, 27 Oct 2017 13:26:46 GMT):
@mitrashan it's not because of tls, it's because the identity used to send the proposal is not signed by a certificate which is trusted by your peers

mitrashan (Fri, 27 Oct 2017 13:36:19 GMT):
Thanks @Vadim ... as I am new to hyper ledger fabric v1.0 thus, can you please suggest me how should I go ahead to run the balance-transfer on my production network? I have gone through the Fabric CA setup guide thoroughly but seems I'm missing something. By-the-way, when I am trying to register an user using the SDK over HTTP it is returning the token correctly, but using that token when I am proceeding for the invoke it's failing. Any pointer towards resolution to this issue would be really helpful for me.

SimonOberzan (Fri, 27 Oct 2017 13:40:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eF6EqsfdApedeTXwR) @Vadim I have just tried. It returns : [object Object]

Vadim (Fri, 27 Oct 2017 13:43:23 GMT):
@SimonOberzan and toBytes()?

Vadim (Fri, 27 Oct 2017 13:44:08 GMT):
@mitrashan you need to provide the CA certificate to Fabric-CA which is the same as in the trusted root of your network (I suppose you used cryptogen?)

Vadim (Fri, 27 Oct 2017 13:47:01 GMT):
@mitrashan e.g. fabric-samples/first-network has a e2e template which also starts properly provisioned CAs

SimonOberzan (Fri, 27 Oct 2017 13:47:54 GMT):
@Vadim That worked! Thank you

mitrashan (Fri, 27 Oct 2017 13:50:11 GMT):
@Vadim .. yes I'm using 'CRYPTOGEN' only, and while trying to communicate with the network I am using the same /tls/ca.crt from my peers folder (in the network-config.json). Is there anything wrong am I doing at this step? I will check the byfn once again but, I can't use the certificates as my certificates are with specific names mentioned by the client.

Vadim (Fri, 27 Oct 2017 13:51:04 GMT):
@mitrashan your CA was not initialized with root certs from cryptogen and generated its own, so that's why peers don't trust it

Vadim (Fri, 27 Oct 2017 13:51:39 GMT):
you need to start CA with cert from the folder artifacts/peerOrgs/peerOrg0/ca or something like that

Vadim (Fri, 27 Oct 2017 13:52:21 GMT):
set them to CA like this: https://github.com/hyperledger/fabric-samples/blob/release/first-network/docker-compose-e2e-template.yaml#L21

mitrashan (Fri, 27 Oct 2017 13:53:21 GMT):
'ca.importer-org.smbc.com: image: hyperledger/fabric-ca environment: - FABRIC_CA_HOME=/opt/smbc/config/ - FABRIC_CA_SERVER_CA_CERTFILE=/opt/smbc/config/crypto-config/peerOrganizations/importer-org.smbc.com/ca/ca.importer-org.smbc.com-cert.pem - FABRIC_CA_SERVER_CA_KEYFILE=/opt/smbc/config/crypto-config/peerOrganizations/importer-org.smbc.com/ca/5ba0b4ee9d09be4a475d884555da73a7495ba0c53032700522b4e5d69b3f000e_sk - FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_TLS_CERTFILE=/opt/smbc/config/crypto-config/peerOrganizations/importer-org.smbc.com/ca/ca.importer-org.smbc.com-cert.pem - FABRIC_CA_SERVER_TLS_KEYFILE=/opt/smbc/config/crypto-config/peerOrganizations/importer-org.smbc.com/ca/5ba0b4ee9d09be4a475d884555da73a7495ba0c53032700522b4e5d69b3f000e_sk ports: - "7054:7054" command: sh -c 'fabric-ca-server start -c /opt/smbc/config/fabric-ca-server-config.yaml -b admin:adminpw -d' volumes: - ./config/crypto-config/peerOrganizations/importer-org.smbc.com/ca/:/etc/hyperledger/fabric-ca-server-config/importer-org.smbc.com/ca - ./config/crypto-config/peerOrganizations/importer-org.smbc.com/tlsca/:/etc/hyperledger/fabric-ca-server-config/importer-org.smbc.com/tlsca - ./config/fabric-server-config/importer-org.smbc.com/:/opt/smbc/config/fabric-server-config/ container_name: ca.importer-org.smbc.com'

mitrashan (Fri, 27 Oct 2017 13:57:20 GMT):
@Vadim this is how I created my docker-compose.yaml and tried to run the CA from there .. the cert folder is mounted properly too .. is this alright? I checked the BYFN compose .. I missed the --ca.keyfile /etc/hyperledger/fabric-ca-server-config/CA1_PRIVATE_KEY ... is it giving trouble due to that?

Vadim (Fri, 27 Oct 2017 14:22:00 GMT):
@mitrashan yes

Vadim (Fri, 27 Oct 2017 14:22:25 GMT):
and --ca.certfile

scmchan (Fri, 27 Oct 2017 14:33:33 GMT):
Has joined the channel.

kostas (Sun, 29 Oct 2017 16:41:30 GMT):
Has left the channel.

vu3mmg (Sun, 29 Oct 2017 16:55:05 GMT):
one basic query - node sdk is completely asynchronous ?

vu3mmg (Sun, 29 Oct 2017 16:55:31 GMT):
is there any function we need to take care to avoid blocking

luxus (Mon, 30 Oct 2017 01:04:21 GMT):
Has joined the channel.

mitrashan (Mon, 30 Oct 2017 04:23:54 GMT):
@Vadim thank you so much ... I implemented as per your suggestion and changed some mounting details and it worked. Regarding, mounting when I was mounting my crypto files on the */opt/smbc/config/fabric-server-config* then I don't know why but .pem files got mounted but, the _sk file did not get mounted but, in case of mounting inside /etc/... all the files got mounted .......... Thank you so much!!

mmick (Mon, 30 Oct 2017 10:40:51 GMT):
Has joined the channel.

mmick (Mon, 30 Oct 2017 10:42:05 GMT):
hi people! i want to implement a telehealth system that "Electronic medical records are very sensitive and must be kept secure to ensure privacy of patients. These records can be stored in the blockchain in order to provide easy access to health records upon multi-signature approvals between patients and practitioners or providers. Furthermore, the payment systems can also be integrated with the system to automatically bill the patient for the provided service."

mmick (Mon, 30 Oct 2017 10:43:10 GMT):
i want to make front end based on vue js backed by validity. what do you guys suggest ?

ascatox (Mon, 30 Oct 2017 15:35:05 GMT):
Has joined the channel.

MohammadObaid (Mon, 30 Oct 2017 16:38:40 GMT):
Hey anyone have tried fabric-node-sdk with hyperledger cello? I need little help regarding this

dave.enyeart (Tue, 31 Oct 2017 19:33:34 GMT):
@rjones In fabric we can rebuild instead of reverify, to just re-do one of the four CIs. Is the same possible in fabric-sdk-node?

rjones (Tue, 31 Oct 2017 19:33:34 GMT):
Has joined the channel.

rjones (Tue, 31 Oct 2017 19:34:10 GMT):
@dave.enyeart I don't know if I added it for that project, but I could if I haven't

dave.enyeart (Tue, 31 Oct 2017 19:34:26 GMT):
thanks, could you please check and add if needed

dave.enyeart (Tue, 31 Oct 2017 19:35:32 GMT):
@bretharrison look what @rjones is going to do for you :)

rjones (Tue, 31 Oct 2017 19:35:50 GMT):
well, you know, the ci-management repo is public. :)

dave.enyeart (Tue, 31 Oct 2017 19:36:29 GMT):
that would require skill of the level of @rjones

RezwanKabir (Tue, 31 Oct 2017 19:37:19 GMT):
how can I define the anchor peer for Org1 on more channels ?

rjones (Tue, 31 Oct 2017 19:38:14 GMT):
@dave.enyeart low bar. Do you want the three verify jobs?

dave.enyeart (Tue, 31 Oct 2017 19:39:47 GMT):
@bretharrison is the expert in this area, i'll defer to him which of the CI jobs he'd want to re-execute individually

rjones (Tue, 31 Oct 2017 19:40:48 GMT):
the only other one is the `vulnerable` test job

bretharrison (Tue, 31 Oct 2017 19:41:41 GMT):
Yes the three verify jobs would be great

rjones (Tue, 31 Oct 2017 19:47:02 GMT):
I think I'll generate GUIDs - will reduce collisions. that way you can just comment with a GUID and I can check for that GUID

rjones (Tue, 31 Oct 2017 19:47:19 GMT):
no possible downsides

bretharrison (Tue, 31 Oct 2017 20:01:12 GMT):
sounds good, thanks

rjones (Tue, 31 Oct 2017 20:08:00 GMT):
I added both of you to the CR

jrosmith (Tue, 31 Oct 2017 20:12:36 GMT):
@vu3mmg the majority of node_sdk functions return promises

rjones (Tue, 31 Oct 2017 21:18:55 GMT):
@bretharrison @dave.enyeart feel free to try the three new verbs: https://gerrit.hyperledger.org/r/#/c/15017/

natchapon.pa (Wed, 01 Nov 2017 09:53:39 GMT):
Has joined the channel.

vu3mmg (Thu, 02 Nov 2017 03:59:02 GMT):
@jrosmith thank you

vu3mmg (Thu, 02 Nov 2017 03:59:15 GMT):
I am facing a strange with event hub.

vu3mmg (Thu, 02 Nov 2017 03:59:16 GMT):
Users/maheshgovind/pilot/ir/node_modules/fabric-client/lib/EventHub.js:412 event.setCreator(user.getIdentity().serialize()); ^ TypeError: Cannot read property 'getIdentity' of null at EventHub._sendRegistration (/Users/maheshgovind/pilot/ir/node_modules/fabric-client/lib/EventHub.js:412:24) at EventHub._disconnect (/Users/maheshgovind/pilot/ir/node_modules/fabric-client/lib/EventHub.js:387:

vu3mmg (Thu, 02 Nov 2017 03:59:29 GMT):
when i start sending a large number of messages.

vu3mmg (Thu, 02 Nov 2017 03:59:42 GMT):
any one faced similiar issues

vu3mmg (Thu, 02 Nov 2017 04:41:01 GMT):
When i send messages one by one there seems to be no problem

JoshuaBarker (Thu, 02 Nov 2017 08:08:57 GMT):
Has joined the channel.

linyuadam (Thu, 02 Nov 2017 13:08:09 GMT):
Hi, all, is there a good way to secure the crytostore (not just plaintext for the private key in file system)

jrosmith (Thu, 02 Nov 2017 13:24:18 GMT):
@vu3mmg i've run into the same issue. if you're using the example code from balance transfer it does not handle high volumes well because it the clients are constantly switching contexts. from the docs: ``` **It is important to understand that switching userContexts with the same client instance is considered an anti-pattern.** This is the direct result of the stateful design. A JIRA work item has been opened to discuss adding support for stateless usage of the SDK: FAB-4563 ``` FAB-4563 here: https://jira.hyperledger.org/browse/FAB-4563 In the docs it also has this suggestion: ``` - Use a dedicated client instance per authenticated user. Create a new instance for each authenticated user. You can enroll each authenticated user separately so that each user gets its own signing identity. - Use a shared client instance and a common signing identity among authenticated users. ``` I went with the first suggestion and haven't seen the issue again

jrosmith (Thu, 02 Nov 2017 13:24:18 GMT):
@vu3mmg i've run into the same issue. if you're using the example code from balance transfer it does not handle high volumes well because it the clients are constantly switching contexts. from the docs: ```It is important to understand that switching userContexts with the same client instance is considered an anti-pattern. This is the direct result of the stateful design. A JIRA work item has been opened to discuss adding support for stateless usage of the SDK: FAB-4563 ``` FAB-4563 here: https://jira.hyperledger.org/browse/FAB-4563 In the docs it also has this suggestion: ```- Use a dedicated client instance per authenticated user. Create a new instance for each authenticated user. You can enroll each authenticated user separately so that each user gets its own signing identity. - Use a shared client instance and a common signing identity among authenticated users. ``` I went with the first suggestion and haven't seen the issue again

vu3mmg (Thu, 02 Nov 2017 13:25:28 GMT):
@jrosmith Thank you

vu3mmg (Thu, 02 Nov 2017 13:25:34 GMT):
I ran load on my laptop

vu3mmg (Thu, 02 Nov 2017 13:25:38 GMT):
and facing other issues

vu3mmg (Thu, 02 Nov 2017 13:25:40 GMT):
such as

vu3mmg (Thu, 02 Nov 2017 13:26:12 GMT):
sendPeersProposal - Promise is rejected: Error: Connect Failed

vu3mmg (Thu, 02 Nov 2017 13:26:33 GMT):
9000 140737251808192 ssl_transport_security.c:583] Could not add root certificate to ssl context. E1102 18:55:56.031881000 140737251808192 ssl_transport_security.c:1375] Cannot load server root certificates. E1102 18:55:56.031907000 140737251808192 security_connector.c:855] Handshaker factory creation failed with TSI_INTERNAL_ERROR. E1102 18:55:56.031912000 140737251808192 secure_channel_create.c:112] Failed to create secure subchannel for secure name 'peer1.org2.example.com:8056'

vu3mmg (Thu, 02 Nov 2017 13:26:41 GMT):
have you faced this type of scenario

vu3mmg (Thu, 02 Nov 2017 13:26:52 GMT):
I think this is from node-sdk GRPC ?

jrosmith (Thu, 02 Nov 2017 13:27:58 GMT):
@vu3mmg unfortunately i haven't run into those errors before. definitely an SSL error though, i'd double check your certs

vu3mmg (Thu, 02 Nov 2017 13:28:07 GMT):
certs are valid

vu3mmg (Thu, 02 Nov 2017 13:28:20 GMT):
occationally I am getting above erros

vu3mmg (Thu, 02 Nov 2017 13:28:58 GMT):
because there errors are not there when running manually

vu3mmg (Thu, 02 Nov 2017 13:29:04 GMT):
or at very low traffic

vu3mmg (Thu, 02 Nov 2017 13:31:04 GMT):
https://github.com/grpc/grpc/issues/12642

vu3mmg (Thu, 02 Nov 2017 13:31:12 GMT):
any clue ?

jrosmith (Thu, 02 Nov 2017 13:31:52 GMT):
no idea, sorry man :/

vu3mmg (Thu, 02 Nov 2017 13:32:25 GMT):
:-)

vu3mmg (Thu, 02 Nov 2017 13:32:39 GMT):
as per that git issue , there is some concurrency problem

vu3mmg (Thu, 02 Nov 2017 13:42:25 GMT):
@jrosmith is it a design pattern to wait for events in invoke-transaction ? . I could see that is done in balance-transfer and fabcar invoke-transaction

jrosmith (Thu, 02 Nov 2017 13:59:50 GMT):
@vu3mmg i think thats a bit of taste at that point. if you do not wait and return a success condition technically youre just informing clients that the proposal responses were valid. waiting for the event means the success condition informs clients that the block was actually committed. the block will get committed regardless, but depending on transaction volume there could be some issues. for example, lets say you do not wait for the commitment event and return a success condition to the client. if they go to query for the transaction before the commitment process has completed, they will get an error saying that the transaction doesn't exist in the ledger yet and technically thats true as its still in the commitment queue.

vu3mmg (Thu, 02 Nov 2017 14:02:30 GMT):
@jrosmith Thank

vu3mmg (Thu, 02 Nov 2017 14:02:31 GMT):
you

vu3mmg (Thu, 02 Nov 2017 14:02:48 GMT):
do you you why we are enrolling JIM each time in balance transfer app

jrosmith (Thu, 02 Nov 2017 14:12:07 GMT):
pretty sure because it's just the default user to help people get started, you should be able to register and enroll whomever

jrosmith (Thu, 02 Nov 2017 14:12:07 GMT):
pretty sure because it's just the default user to help people get started, you should be able to register and enroll whoever

vu3mmg (Thu, 02 Nov 2017 14:13:58 GMT):
one mistake i did was copy pasted balance transfer code

vu3mmg (Thu, 02 Nov 2017 14:14:08 GMT):
i think i should avoid that

jrosmith (Thu, 02 Nov 2017 14:15:10 GMT):
it depends. i definitely used it to get started but then tailored it to my exact needs. its a good jumping off point

vu3mmg (Thu, 02 Nov 2017 14:18:37 GMT):
ok

vu3mmg (Thu, 02 Nov 2017 14:19:27 GMT):
mu use case involves , writing financial remittance requests to ledger . This can come in a reasonable volume .

vu3mmg (Thu, 02 Nov 2017 14:19:59 GMT):
each transaction is a separate (K,V)

gauthampamu (Thu, 02 Nov 2017 16:00:53 GMT):
Retry Logic: Looked at the retry logic in Marbles sample. Is there any plan to include this functionality in the SDK. Also how should you handle the retry with Orderers. Is there any sample on how to implement retry with Orderers.

SuperSeiyan (Thu, 02 Nov 2017 17:39:11 GMT):
Has joined the channel.

SuperSeiyan (Thu, 02 Nov 2017 17:41:21 GMT):
Hello all, I would like to know about how to list peer from channel and show the result like command `peer channel list` on cli Thank you

aviralwal (Thu, 02 Nov 2017 20:43:02 GMT):
Has joined the channel.

Jonny (Fri, 03 Nov 2017 01:17:24 GMT):
hi guys, any idea why I getting this for balance transfer example ``` [2017-11-03 04:54:19.058] [DEBUG] SampleWebApp - End point : /users [2017-11-03 04:54:19.058] [DEBUG] SampleWebApp - User name : Jim [2017-11-03 04:54:19.058] [DEBUG] SampleWebApp - Org name : primary [2017-11-03 04:54:19.066] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor [2017-11-03 04:54:19.070] [ERROR] Helper - Failed to get registered user: Jim, error: TypeError: Cannot read property 'setStateStore' of undefined at hfc.newDefaultKeyValueStore.then (/app/helper.js:208:9) ```

rameshthoomu (Fri, 03 Nov 2017 20:25:37 GMT):
@bretharrison Reverted new build phrases (rebuild-node6-x, rebuild-node8-x, rebuild-node-z) from Jenkins jobs. Will add this over weekend

rameshthoomu (Fri, 03 Nov 2017 20:25:49 GMT):
reverify works as expected..

bretharrison (Fri, 03 Nov 2017 20:26:18 GMT):
thanks

mmick (Sat, 04 Nov 2017 08:43:50 GMT):
when to use hyperledger composer vs SDK's (java, node)?

kenmazsyma (Sun, 05 Nov 2017 00:19:09 GMT):
Has joined the channel.

kenmazsyma (Sun, 05 Nov 2017 01:58:44 GMT):
Hi all, I am new to developing Fabric application and I am writing a code for connecting to channel from client with fabric-sdk-node as below. It succeeds to be executed to `client.createUser`, but both `eh.connect()` and `eh.registerBlockEvent()` are not return any response. Does anyone let me know the points I should check? ``` Promise.resolve().then(()=> { client = new Client(); channel = client.newChannel('mychannel'); channel.addOrderer( client.newOrderer( 'grpc://localhost:7050' ) ); return Client.newDefaultKeyValueStore({ path: path.join(os.tmpdir(), 'hfc/hfc_org') }); }).then((store) => { client.setStateStore(store); var keyPath = path.join(__dirname, 'path/to/orderer/msp/keystore'); var keyPEM = Buffer.from(readAllFiles(keyPath)[0]).toString(); var certPath = path.join(__dirname, 'path/to/orderer/msp/signcerts'); var certPEM = readAllFiles(certPath)[0]; return client.createUser({ username : 'ordererAdmin', mspid : 'OrdererMSP', cryptoContent: { privateKeyPEM: keyPEM.toString(), signedCertPEM: certPEM.toString() } }); }).then((admin) => { return channel.getGenesisBlock({ txId: client.newTransactionID(), orderer: { url : 'grpc:localhost:7050' } }); }).then((block)=> { genesis_block = block; client._userContext = null; var keyPath = path.join(__dirname, 'path/to/peerOrg1/msp/keystore'); var keyPEM = Buffer.from(readAllFiles(keyPath)[0]).toString(); var certPath = path.join(__dirname, 'path/to/peerOrg1/msp/signcerts'); var certPEM = readAllFiles(certPath)[0]; var cryptoSuite = Client.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(Client.newCryptoKeyStore({path: path.join(os.tmpdir(), 'hfc/hfc_org1')})); client.setCryptoSuite(cryptoSuite); return client.createUser({ username: 'peerOrg1Admin', mspid: 'Org1MSP', cryptoContent: { privateKeyPEM: keyPEM.toString(), signedCertPEM: certPEM.toString() } }); }).then((admin) => { console.log('successfully prepared admin user:' ); let p = { rpc : 'grpc://locahost:7051', evtrpc : 'grpc://locahost:7053' }; let request = { targets : [client.newPeer( p['rpc'] )], block : genesis_block, txId : client.newTransactionID() }; let eh = client.newEventHub(); eh.setPeerAddr(p['evtrpc']); eh.connect(); let txPromise = new Promise((resolve, reject) => { let handle = setTimeout(reject, 30000); eh.registerBlockEvent((block) => { clearTimeout(handle); if(block.data.data.length === 1) { var channel_header = block.data.data[0].payload.header.channel_header; if (channel_header.channel_id === channel_name) { resolve(); } else { reject(); } } }); }); let sendPromise = channel.joinChannel(request); return Promise.all([txPromise, sendPromise]); }).then((results)=> { console.log('successfully prepared.:' + results); }).catch((err)=> { console.log(err); }); ```

kenmazsyma (Sun, 05 Nov 2017 02:01:47 GMT):
Hi all, I am new to developing Fabric application and I am writing a code for connecting to channel from client with fabric-sdk-node as below. It succeeds to be executed to `client.createUser()`, but both `eh.registerBlockEvent()` and `channel.joinChannel()` are not return any response. Does anyone let me know the points I should check? ``` Promise.resolve().then(()=> { client = new Client(); channel = client.newChannel('mychannel'); channel.addOrderer( client.newOrderer( 'grpc://localhost:7050' ) ); return Client.newDefaultKeyValueStore({ path: path.join(os.tmpdir(), 'hfc/hfc_org') }); }).then((store) => { client.setStateStore(store); var keyPath = path.join(__dirname, 'path/to/orderer/msp/keystore'); var keyPEM = Buffer.from(readAllFiles(keyPath)[0]).toString(); var certPath = path.join(__dirname, 'path/to/orderer/msp/signcerts'); var certPEM = readAllFiles(certPath)[0]; return client.createUser({ username : 'ordererAdmin', mspid : 'OrdererMSP', cryptoContent: { privateKeyPEM: keyPEM.toString(), signedCertPEM: certPEM.toString() } }); }).then((admin) => { return channel.getGenesisBlock({ txId: client.newTransactionID(), orderer: { url : 'grpc:localhost:7050' } }); }).then((block)=> { genesis_block = block; client._userContext = null; var keyPath = path.join(__dirname, 'path/to/peerOrg1/msp/keystore'); var keyPEM = Buffer.from(readAllFiles(keyPath)[0]).toString(); var certPath = path.join(__dirname, 'path/to/peerOrg1/msp/signcerts'); var certPEM = readAllFiles(certPath)[0]; var cryptoSuite = Client.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(Client.newCryptoKeyStore({path: path.join(os.tmpdir(), 'hfc/hfc_org1')})); client.setCryptoSuite(cryptoSuite); return client.createUser({ username: 'peerOrg1Admin', mspid: 'Org1MSP', cryptoContent: { privateKeyPEM: keyPEM.toString(), signedCertPEM: certPEM.toString() } }); }).then((admin) => { console.log('successfully prepared admin user:' ); let p = { rpc : 'grpc://locahost:7051', evtrpc : 'grpc://locahost:7053' }; let request = { targets : [client.newPeer( p['rpc'] )], block : genesis_block, txId : client.newTransactionID() }; let eh = client.newEventHub(); eh.setPeerAddr(p['evtrpc']); eh.connect(); let txPromise = new Promise((resolve, reject) => { let handle = setTimeout(reject, 30000); eh.registerBlockEvent((block) => { clearTimeout(handle); if(block.data.data.length === 1) { var channel_header = block.data.data[0].payload.header.channel_header; if (channel_header.channel_id === channel_name) { resolve(); } else { reject(); } } }); }); let sendPromise = channel.joinChannel(request); return Promise.all([txPromise, sendPromise]); }).then((results)=> { console.log('successfully prepared.:' + results); }).catch((err)=> { console.log(err); }); ```

kenmazsyma (Sun, 05 Nov 2017 05:46:30 GMT):
I already resolved above problem. Thank you.

bh4rtp (Sun, 05 Nov 2017 07:15:32 GMT):
@kenmazsyma how do you solve it? let us learn.

kenmazsyma (Sun, 05 Nov 2017 07:58:32 GMT):
@bh4rtp I'm sorry but not sure. My code got to successfully complete after changing as below. before : grpc://localhost:(port) after : grpc://127.0.0.1 :(port) But I can't reproduce same phenomenon even through I try to back.

bh4rtp (Sun, 05 Nov 2017 08:02:30 GMT):
@kenmazsyma yes. fabric-samples use `grpc://localhost:port` too. maybe the network had not started up.

bh4rtp (Sun, 05 Nov 2017 08:02:30 GMT):
@kenmazsyma yes. `fabric-samples` use `grpc://localhost:port` too. maybe the network had not started up.

kenmazsyma (Sun, 05 Nov 2017 08:05:38 GMT):
@bh4rtp I also think so. Thank you for replying. :)

vu3mmg (Sun, 05 Nov 2017 12:02:52 GMT):
Dear Experts ,

vu3mmg (Sun, 05 Nov 2017 12:03:17 GMT):
I am getting frequent connection issues when running the client in a continuous mode

vu3mmg (Sun, 05 Nov 2017 12:03:23 GMT):
do you know the "ConnectionOpts"

vu3mmg (Sun, 05 Nov 2017 12:03:25 GMT):
to be used

vu3mmg (Sun, 05 Nov 2017 12:03:28 GMT):
for pooling

vu3mmg (Sun, 05 Nov 2017 12:03:29 GMT):
?

agiledeveloper (Sun, 05 Nov 2017 15:20:36 GMT):
hi expers, I am getting error `TypeError: Cannot read property 'sendBroadcast' of undefined at Channel.sendTransaction (/home/agiledeveloper/HLF/HyperledgerProjects/artprovenance/app/server/node_modules/fabric-client/lib/Channel.js:1515:17) at sendOrderer (/home/agiledeveloper/HLF/HyperledgerProjects/artprovenance/app/server/egymuseum.js:73:20) at enrolUser.then.then.results (/home/agiledeveloper/HLF/HyperledgerProjects/artprovenance/app/server/egy`

agiledeveloper (Sun, 05 Nov 2017 15:20:36 GMT):
hi expers, I am getting error ```TypeError: Cannot read property 'sendBroadcast' of undefined at Channel.sendTransaction (/home/agiledeveloper/HLF/HyperledgerProjects/artprovenance/app/server/node_modules/fabric-client/lib/Channel.js:1515:17) at sendOrderer (/home/agiledeveloper/HLF/HyperledgerProjects/artprovenance/app/server/egymuseum.js:73:20) at enrolUser.then.then.results (/home/agiledeveloper/HLF/HyperledgerProjects/artprovenance/app/server/egy```

agiledeveloper (Sun, 05 Nov 2017 15:21:13 GMT):
my app ```'use strict'; /* Client flow:- 1- Create new client 2- Enrol user 3- Init network communication 1- Transaction proposal 2- Proposal response Inspect 3- Send to Orderer */ const hfc = require('fabric-client'); const client = new hfc(); const target = []; //array of peers let channel; var options = { "EGArt": { wallet_path: './certs', user_id: 'EGArtAdmin', channel_id: 'mainchannel', peer_url: 'grpc://localhost:7051', orderer_url: 'grpc://locallhost:7050', chaincode_id: 'artmanager', fcn: 'addNewArtifact' } } //here we use local files to get user const enrolUser = function(client, options) { return hfc.newDefaultKeyValueStore({ path: options.wallet_path }) .then(wallet => { client.setStateStore(wallet); return client.getUserContext(options.user_id, true); }) } //here we define client, channel, peers const initNetwork = function(client, option, target) { let channel; try { channel = client.newChannel(option.channel_id); const peer = client.newPeer(option.peer_url); target.push(peer); channel.addPeer(target); const orderer = client.newOrderer(option.orderer_url); console.log("!!!!!!!!Orderer====>" + orderer); channel.addOrderer(orderer); } catch (err) /*error if channel already exists*/ { channel = client.getChannel(option.channel_id); } return channel; } const transactionProposal = function(client, channel, request) { request.txId = client.newTransactionID(); return channel.sendTransactionProposal(request); } const responseInspect = function(results) { if (results[0] && results[0].length > 0 && results[0][0].response && results[0][0].response.status === 200) { return true; } return false; } const sendOrderer = function(channel, request) { return channel.sendTransaction(request); } function invoke(opt, param) { return enrolUser(client, opt) .then(user => { if (typeof user === "undefined" || !user.isEnrolled() || !user) { throw "user is not enrolled" }; channel = initNetwork(client, opt, target); const request = { targets: target, chaincodeId: opt.chaincode_id, txId: null, // transientMap: null, fcn: 'addNewArtifact', args: param, chainId: opt.channel_id, }; return transactionProposal(client, channel, request); }) .then(results => { if (responseInspect(results)) { const request = { proposalResponses: results[0], proposal: results[1], header: results[2] }; console.log(channel); console.log('###################'); console.log(request); return sendOrderer(channel, request); } else { throw "response is bad"; } }) .catch(error => { console.log(error); throw error; }); }; //server const express = require("express"); const app = express(); const http = require("http"); const bodyParser = require("body-parser"); const server = http.createServer(app).listen(4000, function() {}); app.use(bodyParser.json()); app.post('/invoke', function(req, res, next) { const args = req.body.args; invoke(options[args[0]], args.slice(1)) .then(() => res.send("Chaincode invoked")) .catch(err => { res.status(500); res.send(err.toString()); }); })```

agiledeveloper (Sun, 05 Nov 2017 15:24:46 GMT):
here is a raw dump of channel and request parameters ```Channel { _name: 'mainchannel', _peers: [], _anchor_peers: [], _orderers: [], _kafka_brokers: [], _clientContext: Client { _cryptoSuite: null, _channels: { mainchannel: [Circular] }, _stateStore: FileKeyValueStore { _dir: './certs' }, _userContext: User { _name: 'EGArtAdmin', _roles: null, _affiliation: '', _enrollmentSecret: '', _identity: [Object], _signingIdentity: [Object], _mspId: 'EGArtMSP', _cryptoSuite: [Object] }, _msps: Map {}, _devMode: false }, _msp_manager: MSPManager { _msps: {} } } ################### { proposalResponses: [ { version: 1, timestamp: null, response: [Object], payload: , endorsement: [Object] } ], proposal: { header: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 1007, littleEndian: false, noAssert: false }, payload: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 60, littleEndian: false, noAssert: false }, extension: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } }, header: { channel_header: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 113, littleEndian: false, noAssert: false }, signature_header: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 889, littleEndian: false, noAssert: false } } } ```

agiledeveloper (Sun, 05 Nov 2017 15:25:38 GMT):
I see that both orderer and peers are empty ? where can I check, I am able to invoke my chain code using the peer CLI successfuly

SimonOberzan (Mon, 06 Nov 2017 14:49:42 GMT):
Hi. I have a fabric client running inside a docker container. Logger inside my files (create_channel.js for example), run like it is supposed to, but logs inside fabric-client files does not print anything in my console. Is there a setting to turn them on? Or maybe they are printed in some log file?

SimonOberzan (Mon, 06 Nov 2017 14:49:42 GMT):
Hi. I have a fabric client running inside a docker container. Logger inside my files (create_channel.js for example), runs like it is supposed to, but logs inside fabric-client files does not print anything in my console. Is there a setting to turn them on? Or maybe they are printed in some log file?

SimonOberzan (Mon, 06 Nov 2017 14:49:42 GMT):
Hi. I have a fabric client running inside a docker container. Logger inside my files (create_channel.js for example), runs like it is supposed to, but logger inside fabric-client files does not print anything in my console. Is there a setting to turn them on? Or maybe they are printed in some log file?

zdmob (Tue, 07 Nov 2017 02:18:18 GMT):
Has joined the channel.

MoulaliMvg (Tue, 07 Nov 2017 06:44:03 GMT):
Can some one tell me how to create a second channel in balance transfer

Vadim (Tue, 07 Nov 2017 08:33:52 GMT):
@SimonOberzan try to set `HFC_LOGGING='{"debug":"console"}'`

SimonOberzan (Tue, 07 Nov 2017 08:36:27 GMT):
@Vadim Where do I set this? I'm still quite new to Node SDK

Vadim (Tue, 07 Nov 2017 08:36:55 GMT):
in your console `export HFC_LOGGING='{"debug":"console"}'`

SimonOberzan (Tue, 07 Nov 2017 08:45:41 GMT):
@Vadim It works. Thank you

shken (Tue, 07 Nov 2017 08:59:52 GMT):
Has joined the channel.

shken (Tue, 07 Nov 2017 09:02:38 GMT):
I'll let you know what I did.

shken (Tue, 07 Nov 2017 09:05:00 GMT):
1.git clone ~/fabric-sdk-node.git 2.cd fabric-sdk-node && npm install 3.cd ~/fabric && make docker 4.cd ~/fabric-ca && make docker 5.rm -rf /tmp/hfc-* && rm -rf ~/.hfc-key-store 6.gulp test

shken (Tue, 07 Nov 2017 09:05:16 GMT):
But, this problem..

shken (Tue, 07 Nov 2017 09:05:54 GMT):
** CouchDBKeyValueStore tests ok 229 Error checking in the constructor: missing opts ok 230 Error checking in the constructor: opts object missing required "url" not ok 231 Error: Error creating member_db database to store membership data: Error: getaddrinfo EAI_AGAIN dummyurl:80 at Object.exports._errnoException (util.js:1020:11) at errnoException (dns.js:33:15) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26) at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/impl/CouchDBKeyValueStore.js:9:3163 at Request._callback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/nano/lib/nano.js:199:16) at self.callback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:186:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:878:8) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at connectErrorNT (net.js:1025:8) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) --- operator: fail at: CDBKVS.then.catch (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/unit/couchdb-key-value-store.js:53:6) stack: |- Error: Error: Error creating member_db database to store membership data: Error: getaddrinfo EAI_AGAIN dummyurl:80 at Object.exports._errnoException (util.js:1020:11) at errnoException (dns.js:33:15) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26) at /opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/fabric-client/lib/impl/CouchDBKeyValueStore.js:9:3163 at Request._callback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/nano/lib/nano.js:199:16) at self.callback (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:186:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/request/request.js:878:8) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at connectErrorNT (net.js:1025:8) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) at Test.assert [as _assert] (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:212:54) at Test.bound [as _assert] (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:64:32) at Test.fail (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:277:10) at Test.bound [as fail] (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:64:32) at CDBKVS.then.catch (/opt/gopath/src/github.com/hyperledger/fabric-sdk-node/test/unit/couchdb-key-value-store.js:53:6) at process._tickCallback (internal/process/next_tick.js:109:7)

shken (Tue, 07 Nov 2017 09:18:15 GMT):

error-couchdbkeyvaluestore.png

mastersingh24 (Tue, 07 Nov 2017 13:44:52 GMT):
@shken - EAI_AGAIN is an error indicating that your DNS request timed out as I recall. So perhaps there's something wrong with your local connectivity?

mastersingh24 (Tue, 07 Nov 2017 22:17:58 GMT):
@brankoterzic - not sure I understand the issue? (https://chat.hyperledger.org/channel/general?msg=hmq3ZPtXwXLK8RpPm)

brankoterzic (Tue, 07 Nov 2017 22:17:58 GMT):
Has joined the channel.

shken (Tue, 07 Nov 2017 23:50:02 GMT):
@mastersingh24 How do I check my local connection?

mastersingh24 (Tue, 07 Nov 2017 23:52:38 GMT):
see what happens if if do a `ping dummyurl`

shken (Wed, 08 Nov 2017 00:29:27 GMT):
@mastersingh24

shken (Wed, 08 Nov 2017 00:30:00 GMT):

ping-dummyurl.png

shiyj93 (Wed, 08 Nov 2017 01:39:18 GMT):
Has joined the channel.

mastersingh24 (Wed, 08 Nov 2017 01:47:07 GMT):
hmm - how about `gethostip -d dummyurl`

shken (Wed, 08 Nov 2017 01:53:15 GMT):
@mastersingh24

shken (Wed, 08 Nov 2017 01:53:23 GMT):

gethostip-ddummyurl.png

Subramanyam (Wed, 08 Nov 2017 06:11:00 GMT):
Hi all, I want to generate an Org3 with 1 peer peer3.Org3 in hyperledger fabric framework with a genesis block and channel creation

Subramanyam (Wed, 08 Nov 2017 06:11:07 GMT):
Can anyone assist

levinkwong (Wed, 08 Nov 2017 06:52:53 GMT):
Hi, I have register & enroll a member using fabric-ca cli. How can I using the cert I get to create a user object in node sdk?? No luck with ``` member = new User('LevinAdmin') let LevinAdminKey = fs.readFileSync('../environment/cert/user/LevinAdmin.key').toString() let LevinAdminCert = fs.readFileSync('../environment/cert/user/LevinAdmin.pem').toString() let LevinMSPId = 'LevinPeerMSPId' return member.setEnrollment(LevinAdminKey, LevinAdminCert, LevinMSPId) ``` Seems this way The key is not what the function expecting and get a error ``` (node:85250) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: this._signingIdentity._signer._key.getSKI is not a function (node:85250) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ^[[1;10D ```

levinkwong (Wed, 08 Nov 2017 06:54:22 GMT):
In my other codes , I can use the sdk to register and enroll the user: ``` return hfCAClient.enroll({ enrollmentID: username, enrollmentSecret: password }).then((enrollment) => { logger.info(username, 'user enroll successfully') member = new User(username, client) return member.setEnrollment(enrollment.key, enrollment.certificate, mspID) }, (err) => { logger.error('Enroll User ' + username + ' failed with error ' + err) reject(err) }).then(() => { return client.setUserContext(member) } ```

levinkwong (Wed, 08 Nov 2017 07:14:58 GMT):
My colleague helped me~ for anyone's interest, should use ``` client.createUser({ username: name, mspid: mspid, cryptoContent: { privateKeyPEM: keyPEM, signedCertPEM: certPEM } } ```

brankoterzic (Wed, 08 Nov 2017 07:20:26 GMT):
@mastersingh24 When I try to enrol admin user using Node SDK, i get this error: 2017-11-07 21:32:37.669] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2017-11-07 21:32:37.778] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140524812986176:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2520: 140524812986176:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3550: ] at ClientRequest. (/home/brankoterzic/Desktop/devGC/txman/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:711:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at onwriteError (_stream_writable.js:343:10) at onwrite (_stream_writable.js:361:5) at WritableState.onwrite (_stream_writable.js:90:5) at fireErrorCallbacks (net.js:467:13) [2017-11-07 21:32:37.779] [DEBUG] Helper - Pera failed to register [2017-11-07 21:32:37.779] [ERROR] Helper - Pera enrollment failed (node:25523) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot save null userContext. (node:25523) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property '_enrollmentSecret' of null I was following the fabric-sample: https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer

brankoterzic (Wed, 08 Nov 2017 07:43:38 GMT):
Also I get this on my network output: ca_peerOrg1 | 2017/11/07 19:32:37 http: TLS handshake error from 172.19.0.1:55906: EOF

asadhayat (Wed, 08 Nov 2017 07:51:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zgMSEujnZ5wcPPmE9) @levinkwong Can you give specific example/sample for *privateKeyPEM* and *signedCertPEM*? say we are doing this for peer0.org1 from sample network, what would this object should be.

levinkwong (Wed, 08 Nov 2017 08:07:15 GMT):
the file content of your key & cert, ``` keyPEM = fs.readFileSync('path').toString() ```

Umar12 (Wed, 08 Nov 2017 08:36:16 GMT):
Has joined the channel.

asadhayat (Wed, 08 Nov 2017 08:49:33 GMT):
@levinkwong I am having a bit trouble understanding these msp files structure. With basic network setup, for `peer0.org2.example.com` will these be `server.cert` and `server.key` files in path `basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls`

levinkwong (Wed, 08 Nov 2017 08:50:42 GMT):
I think no, cert under tls is used for TLS, should be the ones under msp~(I don't under stand these files clearly too)

asadhayat (Wed, 08 Nov 2017 08:54:46 GMT):
what specific files are you providing for `keyPEM` and `certPEM`? there are 5 sub folders in `msp` four with `.pem` files and `keystore` folder have a private key.

asadhayat (Wed, 08 Nov 2017 08:54:46 GMT):
@levinkwong what specific files are you providing for `keyPEM` and `certPEM`? there are 5 sub folders in `msp` four with `.pem` files and `keystore` folder have a private key.

levinkwong (Wed, 08 Nov 2017 09:00:51 GMT):
@asadhayat `signcerts` and `keystore`

shkhssn (Wed, 08 Nov 2017 09:31:47 GMT):
Has joined the channel.

levinkwong (Wed, 08 Nov 2017 10:37:39 GMT):
Hi guys ... I receive error when sending endorsement proposal : ``` request: { targets: [ Peer { _options: [Object], _url: 'grpc://localhost:7051', _endpoint: [Object], _request_timeout: 45000, _endorserClient: [Object], _name: null } ], chaincodeId: 'mycc', fcn: 'invoke', args: [ 'newBusiness', '{}' ], chainId: 'mychannel', txId: TransactionID { _nonce: , _transaction_id: 'b31cb3541d5f972a4ee2039d7c0bb8613abda2231716afbc8e9e11d62465d3cc' } } Levin 1234356 2 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: The creator's signature over the proposal is not valid, err The signature is invalid at /Users/LevinLMKwong/Work/Blockchain/Manulife/Development/chaincode/role-base-access-control/mw/node_modules/grpc/src/node/src/client.js:554:15 [2017-11-08 18:30:53.997] [ERROR] fabric/invoke_transaction.js - Transaction proposal for peer 0 was bad [2017-11-08 18:30:53.997] [ERROR] fabric/invoke_transaction.js - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-11-08 18:30:53.997] [ERROR] fabric/invoke_transaction.js - Error: The creator's signature over the proposal is not valid, err The signature is invalid ``` *HOWEVER*, the logs from the peer says: ``` 2017-11-08 10:30:53.988 UTC [protoutils] ValidateProposalMessage -> DEBU 512 ValidateProposalMessage starts for signed proposal 0xc4232f6510 2017-11-08 10:30:53.988 UTC [protoutils] validateChannelHeader -> DEBU 513 validateChannelHeader info: header type 3 2017-11-08 10:30:53.989 UTC [protoutils] checkSignatureFromCreator -> DEBU 514 checkSignatureFromCreator starts 2017-11-08 10:30:53.989 UTC [protoutils] checkSignatureFromCreator -> DEBU 515 checkSignatureFromCreator info: creator is &{ManulifePeerMSP 33abb9024e002ec83f2fca551e379f20a64c2debac42749450904679119c4867} 2017-11-08 10:30:53.990 UTC [protoutils] checkSignatureFromCreator -> DEBU 516 checkSignatureFromCreator info: creator is valid 2017-11-08 10:30:53.992 UTC [endorser] ProcessProposal -> DEBU 517 Exit ``` Any idea ? ...

levinkwong (Wed, 08 Nov 2017 10:38:11 GMT):
It is very frustrating that one say valid and the other say not valid ....

levinkwong (Wed, 08 Nov 2017 10:44:53 GMT):
Seems that I used the wrong private key ... ! sorry guys

vu3mmg (Wed, 08 Nov 2017 13:49:26 GMT):
@mastersingh24 do we have some insights into number of concurrents requests possible by nodejs client

vu3mmg (Wed, 08 Nov 2017 13:50:11 GMT):
I am getting grpc errors when I reach around 5-6 parrllel requests

swapnilpatil (Wed, 08 Nov 2017 16:12:05 GMT):
Has joined the channel.

alexliu (Thu, 09 Nov 2017 02:53:24 GMT):
hey guys,I can't understand whats the difference between `FabricCAServices` and `FabricCAClient` in `fabric-ca-client`, can anyone explain it?thanks in advance!

levinkwong (Thu, 09 Nov 2017 04:08:22 GMT):
No idea, I just use `FabricCAClient`. I guess the `FabricCAServices` is just how they implement the SDK~ Not good at javascript

Umar12 (Thu, 09 Nov 2017 12:02:22 GMT):
```{ "host":"localhost", "port":"4000", "jwt_expiretime": "36000", "channelName":"mychannel", "GOPATH":"../artifacts", "keyValueStore":"/tmp/fabric-client-kvs", "eventWaitTime":"30000", "orderer":"grpcs://localhost:7050", "users":[ { "username":"admin", "secret":"adminpw" } ] } ```

Umar12 (Thu, 09 Nov 2017 12:03:03 GMT):
here for channelName I've two channels so I'm giving in array like `[ "mychannel", "channelUMR"]` but it is throwing error like

Umar12 (Thu, 09 Nov 2017 12:03:17 GMT):
```[2017-11-09 17:07:10.903] [ERROR] Join-Channel - Error: Illegal value for Message.Field .common.ChannelHeader.channel_id of type string: object (no array expected) at Error (native)```

Vadim (Thu, 09 Nov 2017 12:04:02 GMT):
@Umar12 it apparently tries to tell you that it can only accept one channel at a time

Vadim (Thu, 09 Nov 2017 12:04:02 GMT):
@Umar12 it apparently tries to tell you that it can only accept one channel name at a time

Umar12 (Thu, 09 Nov 2017 12:04:32 GMT):
So what to do If I have 2 channels

Vadim (Thu, 09 Nov 2017 12:05:05 GMT):
first one channel, then the second channel or modify the code of your example that it can accept and work with an array

mastersingh24 (Thu, 09 Nov 2017 12:14:51 GMT):
@alexliu - there's not such a difference between them anymore. FabricCAClient was originally more of a standalone client and had know ties to fabric-client. FabricCAServices was originally developed to implement an interface that the fabric-client would be able to leverage for membership services. FabricCAServices uses FabricCAClient under the covers but I'd use FabricCAServices (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wkfCw2T9WiyfkK7ET)

SimonOberzan (Thu, 09 Nov 2017 12:47:56 GMT):
Hi. I have a fabric network where I can dynamically add new peers and other components via SDK api. On the server side I create a client for every organization and those clients have the _network_configs that describes the state of the network. Now if the server crashes or is turned off, it loses that information and I cannot recreate it. How could I go about saving the state of the network or client?

SimonOberzan (Thu, 09 Nov 2017 12:47:56 GMT):
Hi. I have a fabric network where I can dynamically add new peers and other components via SDK api. On the server side I create a client for every organization and those clients have the _network_configs that describe the state of the network. Now if the server crashes or is turned off, it loses that information and I cannot recreate it. How could I go about saving the state of the network or client?

Vadim (Thu, 09 Nov 2017 12:52:11 GMT):
@SimonOberzan not sure I understood correctly, but perhaps this could help you? https://fabric-sdk-node.github.io/tutorial-network-config.html

Vadim (Thu, 09 Nov 2017 12:52:20 GMT):
this is a feature of 1.1-preview

SimonOberzan (Thu, 09 Nov 2017 13:00:57 GMT):
@Vadim I have read it, but maybe I don't think it helps my problem. For example I create my network by loading the connection profile configuration that let's say has an org with 2 peers. Than I create an API that lets users create new peers. Now the client object of that org "knows" about all the peers (initial 2 and all subsequently added ones). But then let's say the server crashes and I have to create an new client object, but now the connection profile only includes the 2 peers. What would be the best way of saving the configs of the network, when those change (for example a new peer is added), so I can restart the server?

SimonOberzan (Thu, 09 Nov 2017 13:00:57 GMT):
@Vadim I have read it, but I don't think it helps my problem. For example I create my network by loading the connection profile configuration that let's say has an org with 2 peers. Than I create an API that lets users create new peers. Now the client object of that org "knows" about all the peers (initial 2 and all subsequently added ones). But then let's say the server crashes and I have to create an new client object, but now the connection profile only includes the 2 peers. What would be the best way of saving the configs of the network, when those change (for example a new peer is added), so I can restart the server?

Vadim (Thu, 09 Nov 2017 13:02:25 GMT):
@SimonOberzan well, one thing is that you can update a conn profile whenever you add a peer. I've also seen a jira ticket about dynamic peer discovery, I can try to find it again.

Vadim (Thu, 09 Nov 2017 13:03:16 GMT):
https://jira.hyperledger.org/browse/FAB-5451

SimonOberzan (Thu, 09 Nov 2017 13:03:20 GMT):
@Vadim Yeah I know I could append to the conn profile, but I was hoping for a "cleaner" solution

SimonOberzan (Thu, 09 Nov 2017 13:11:52 GMT):
@Vadim The issue you pasted will solve my problem till than I guess I'll resort to some dirtier approach. Thank you

SimonOberzan (Thu, 09 Nov 2017 13:11:52 GMT):
@Vadim The issue you pasted will solve my problem till than I guess I'll resort to some dirtier approach. Thank you

SimonOberzan (Thu, 09 Nov 2017 15:18:29 GMT):
One more question. How can I invoke a system chaincode using SDK? I have the following request but I don't know how to call it: ``````

SimonOberzan (Thu, 09 Nov 2017 15:18:29 GMT):
One more question. How can I invoke a system chaincode using SDK? I have the following request but I don't know how to call it: ```const request = { chaincodeId : "cscc", txId: 213213123123, // Some random transaction id fcn: "GetChannels", args: [''] }```

SimonOberzan (Thu, 09 Nov 2017 15:18:29 GMT):
One more question. How can I invoke a system chaincode using SDK? I have the following request but I don't know how to call it: ```const request = { chaincodeId : "cscc", txId: {some_number}, // Some random transaction id fcn: "GetChannels", args: [''] }```

Vadim (Thu, 09 Nov 2017 15:20:08 GMT):
@SimonOberzan check it here: https://github.com/hyperledger/fabric-sdk-node/blob/release/fabric-client/lib/Client.js#L501

Vadim (Thu, 09 Nov 2017 15:20:29 GMT):
GetChannels is also implemented in SDK already

SimonOberzan (Thu, 09 Nov 2017 15:21:49 GMT):
@Vadim Oh nice. Thank you

markparz (Thu, 09 Nov 2017 15:52:30 GMT):
Start using Node JS Chaincode w/ v1.1 preview.... see how to here, with @jimthematrix 's new video!!! https://youtu.be/dzwR0dwzXNs

niteshsolanki (Thu, 09 Nov 2017 16:24:27 GMT):
Has joined the channel.

tom.appleyard (Thu, 09 Nov 2017 17:33:01 GMT):
What is the npm version of `fabric-client` that we can use for 1.0.3?

jimthematrix (Thu, 09 Nov 2017 21:38:24 GMT):
@tom.appleyard the supported versions are specified in the package.json for the npm package, so once it's installed, open node_modules/fabric-client/package.json and check the `engines` property

bh4rtp (Fri, 10 Nov 2017 01:42:03 GMT):
there are `addOrderer` and `addPeer` methods in the `Channel` class. can these methods be used to add orderer and peer dynamically into the existing network?

bretharrison (Fri, 10 Nov 2017 02:51:37 GMT):
@bh4rtp Those API's are client side calls where a SDK object is assigned to the client side SDK 'Channel' object. The 'peer' and 'orderer' objects represent existing peers and orderers in the actual network. Adding these to the channel object allows for making network calls without specifying the targets.

bh4rtp (Fri, 10 Nov 2017 02:54:43 GMT):
@bretharrison thanks. i am interested in dynamically add peers to existing network. find these functions in sdk and feel exciting. :slight_smile:

bh4rtp (Fri, 10 Nov 2017 02:54:43 GMT):
@bretharrison thanks. i am interested in dynamically adding peers to existing network. find these functions in sdk and feel exciting. :slight_smile:

bretharrison (Fri, 10 Nov 2017 02:58:30 GMT):
to add a new peer to an existing channel you will have to look at the join channel process

bh4rtp (Fri, 10 Nov 2017 03:16:16 GMT):
@bretharrison do you mean currently it can be realized using sdk?

bretharrison (Fri, 10 Nov 2017 03:20:16 GMT):
The last part of this tutorial show how to join channel https://fabric-sdk-node.github.io/tutorial-channel-create.html

bjwswang (Fri, 10 Nov 2017 03:54:27 GMT):
Has joined the channel.

Subramanyam (Fri, 10 Nov 2017 05:25:27 GMT):
I am working on hyperledger fabric sdk, in that fabric-sample i am creating a channel with a name my channel1.tx to an org1, when i want to join to org1 but it shows that same ledger exists for both channels mychannel.tx and mychannel1.tx. How can i join my channel to that existing channel org1. please suggest

Subramanyam (Fri, 10 Nov 2017 05:29:21 GMT):

mychannel 1 creation.png

Subramanyam (Fri, 10 Nov 2017 05:29:47 GMT):

join channel.png

tom.appleyard (Fri, 10 Nov 2017 08:02:41 GMT):
@jimthematrix I meant which is compatible with Fabric 1.0.3, the engines proprtyy only says about node.js

tom.appleyard (Fri, 10 Nov 2017 08:02:58 GMT):
Or is the 1.1 version of the library backwards compatible

niteshsolanki (Fri, 10 Nov 2017 09:59:06 GMT):
hi. I have a question. node SDK is using sjcl and sjcl-codec library to compute the sha-256 hash of the paylaod (transaction proposal response) before the client signs and sends the txn to the orderer. Are any parameters of the library overriden ? if yes, which parameters and why ? The reason i am asking this question is bcoz i was noticed that node SDK is taking very long time to compute the has if the paylaod (transaction proposal response) is very large.

niteshsolanki (Fri, 10 Nov 2017 09:59:06 GMT):
hi. I have a question. node SDK is using sjcl and sjcl-codec library to compute the sha-256 hash of the paylaod (transaction proposal response) before the client signs and sends the txn to the orderer. Are any parameters of the library overriden ? if yes, which parameters and why ? The reason i am asking this question is bcoz i noticed that node SDK is taking very long time to compute the has if the paylaod (transaction proposal response) is very large (>50MB). and if I try to use the sjcl library separately to compute the hash of very large file it computes the hash quickly.

niteshsolanki (Fri, 10 Nov 2017 09:59:06 GMT):
hi. I have a question. node SDK is using sjcl and sjcl-codec library to compute the sha-256 hash of the paylaod (transaction proposal response) before the client signs and sends the txn to the orderer. Are any parameters of the library overriden ? if yes, which parameters and why ? The reason i am asking this question is bcoz i noticed that node SDK is taking very long time to compute the hash if the paylaod (transaction proposal response) is very large (>15MB). and if I try to use the sjcl library separately to compute the hash of very large file it computes the hash quickly.

shubhamvrkr (Fri, 10 Nov 2017 11:24:38 GMT):
Has joined the channel.

mastersingh24 (Fri, 10 Nov 2017 12:51:54 GMT):
@niteshsolanki - take a look at https://jira.hyperledger.org/browse/FAB-6958

mastersingh24 (Fri, 10 Nov 2017 12:53:19 GMT):
Most likely you are not properly using sjcl / sjcl-codec in your sample code. But to answer your question, the SDK does not override anything

mastersingh24 (Fri, 10 Nov 2017 12:53:32 GMT):
But sjcl does things using bits and not bytes

mastersingh24 (Fri, 10 Nov 2017 12:53:54 GMT):
``` var crypto = require('crypto'); var sjcl = require('sjcl'); var sjcl_codec = require('sjcl-codec'); var sha256 = crypto.createHash('sha256'); var buf = Buffer.alloc(5000000,'A'); console.log('sjcl:'); console.log(Date.now()); //h = hash.sha2_256(buf); h = sjcl_codec.hex.fromBits((new sjcl.hash.sha256()).update(sjcl_codec.bytes.toBits(buf)).finalize()); console.log(Date.now()); console.log(h) console.log('native:'); console.log(Date.now()); h2 = sha256.update(buf).digest('hex'); console.log(Date.now()); console.log(h2); ```

mastersingh24 (Fri, 10 Nov 2017 12:53:54 GMT):
``` var crypto = require('crypto'); var sjcl = require('sjcl'); var sjcl_codec = require('sjcl-codec'); var sha256 = crypto.createHash('sha256'); var buf = Buffer.alloc(5000000,'A'); console.log('sjcl:'); console.log(Date.now()); //h = hash.sha2_256(buf); h = sjcl_codec.hex.fromBits((new sjcl.hash.sha256()).update(sjcl_codec.bytes.toBits(buf)).finalize()); console.log(Date.now()); console.log(h) console.log('native:'); console.log(Date.now()); h2 = sha256.update(buf).digest('hex'); console.log(Date.now()); console.log(h2); ```

mastersingh24 (Fri, 10 Nov 2017 12:55:08 GMT):
The above code shows how to use sjcl the same way the SDK currently does and then shows how if we replace that with the native crypto module performance increases significantly

niteshsolanki (Fri, 10 Nov 2017 13:19:25 GMT):
@mastersingh24 thanks for the response. So if I run the above code with 100MB of data, sjcl gives quick response(

niteshsolanki (Fri, 10 Nov 2017 13:19:25 GMT):
@mastersingh24 thanks for the response. So if I run the above code with 100MB of data, sjcl gives quick response(<3s). Then why does Hyperledger SDK takes 20 minutes to compute the hash of payload of 17MB if it's using the same sjcl?

mastersingh24 (Fri, 10 Nov 2017 13:21:40 GMT):
I just tested - it's the version of sjcl

mastersingh24 (Fri, 10 Nov 2017 13:21:51 GMT):
The SDK uses sjcl@1.0.3

mastersingh24 (Fri, 10 Nov 2017 13:21:59 GMT):
sjcl@1.0.7 is much faster

niteshsolanki (Fri, 10 Nov 2017 13:23:09 GMT):
ohh I see..so best would be to use native crypto in SDK, right?

mastersingh24 (Fri, 10 Nov 2017 13:25:37 GMT):
Yeah - but I'll also update the sjcl version as well

niteshsolanki (Fri, 10 Nov 2017 13:26:28 GMT):
Ohk. :thumbsup:

mastersingh24 (Fri, 10 Nov 2017 13:37:25 GMT):
I will implement these later today. Gotta run out to some meetings

CodeReaper (Fri, 10 Nov 2017 13:42:02 GMT):
@mastersingh24 Building authentication system for login for dynamically added users seems to be handled directly by enrollment id and enrollment secrets. Although the enrollment is supposed to be a one time process by itself. Now building a separate authentication system where their own app constraints the use of their private key and certificate is fine too I guess but in case they loose their identity it'll be hustle. The code example covered in balance -transfer, is it an alright way to go?? What could be security flaws?

vu3mmg (Fri, 10 Nov 2017 17:17:54 GMT):
node sdk - Is rto value hardcoded: sendProposal - timed out after:45000

vu3mmg (Fri, 10 Nov 2017 17:17:55 GMT):
?

bretharrison (Fri, 10 Nov 2017 17:40:12 GMT):
@vu3mmg 45000 is the default setting in the default.json config file, can be overridden by doing ` Client.setConfigSetting('request-timeout', 60000);` or by adding a tiimeout to the call `channel.sendTransactionProposal(request, 60000)`

bretharrison (Fri, 10 Nov 2017 17:40:12 GMT):
@vu3mmg 45000 is the default setting in the default.json config file, can be overridden by doing ` Client.setConfigSetting('request-timeout', 60000);` or by adding a timeout to the call `channel.sendTransactionProposal(request, 60000)`

SharedMocha (Fri, 10 Nov 2017 20:40:23 GMT):
Has joined the channel.

SharedMocha (Fri, 10 Nov 2017 20:41:21 GMT):
Hello All - Can one of you pls share any docs/info on how to dynamically add new orgs to channels .We have a requirment where we need to dynamically add orgs based on certain criteria

vu3mmg (Sat, 11 Nov 2017 02:01:36 GMT):
@bretharrison when I tried channel.sendTransactionProposal(request, 60000) , this was not working, but when i modified rto in Peer.js it was getting into effect .

vu3mmg (Sat, 11 Nov 2017 02:02:29 GMT):
@bretharrison one more query , could we pass grpc options to nodesdk, I am getting SSL layer error , when running continuously

vu3mmg (Sat, 11 Nov 2017 02:03:06 GMT):
E1110 06:40:10.136634810 10701 ssl_transport_security.c:583] Could not add root certificate to ssl context. E1110 06:40:10.136688236 10701 ssl_transport_security.c:1375] Cannot load server root certificates. E1110 06:40:10.136709602 10701 security_connector.c:855] Handshaker factory creation failed with TSI_INTERNAL_ERROR. E1110 06:40:10.136717605 10701 secure_channel_create.c:112] Failed to create secure subchannel for secure name 'peer0.org1.example.com:7051' E1110 06:40:10.136724139 10701 secure_channel_create.c:143] Failed to create subchannel arguments during subchannel creation.

comeback4you (Sat, 11 Nov 2017 04:32:46 GMT):
Has joined the channel.

comeback4you (Sat, 11 Nov 2017 04:34:25 GMT):
Hello Everyone, Yesterday watched new video, Node JS Chaincode support for Hyperledger Fabric v1.1. I'm following all the commands but getting error while registering chaincode, =============Command========== CORE_CHAINCODE_ID_NAME="mycc:v0" npm start -- --peer.address grpc://192.168.1.64:7052 =============Error=============== Chat stream with peer - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/Users/Thacker/HyperLedger/Fabric/Chaincode/a/node_modules/grpc/src/client.js:255:19)\n at ClientDuplexStream._readsDone (/UsersThacker/HyperLedger/Fabric/Chaincode/a/node_modules/grpc/src/client.js:221:8)\n at readCallback (/Users/Thacker/HyperLedger/Fabric/Chaincode/a/node_modules/grpc/src/client.js:283:12)"

comeback4you (Sat, 11 Nov 2017 10:05:42 GMT):
issue solved with ip local 'grpc://0.0.0.0:7052'

comeback4you (Sat, 11 Nov 2017 10:06:23 GMT):
i'm trying to solved out above issue from last 24hours.

mitrashan (Sat, 11 Nov 2017 14:09:19 GMT):
Fabric Client is randomly throwing error and stopping further 'Invoke' ... below is the Node App console log - '''[2017-11-11 19:55:16.643] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Failed to execute transaction (Error sending TRANSACTION: txid:bcad8cfa44eb896a52577dd69e1f96d65e4436d4754b5d3ac90bda519353dcea exists) - make sure the chaincode smbccc has been successfully instantiated and try again at /Users/mgxc2/Documents/WebstormProjects/SMBCNodeProcessorBluemix/SMBCNodeProcessor/node_modules/grpc/src/node/src/client.js:554:15 transaction proposal was good �OU���5_&�Ӟ*�غent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "{"Result":"CN00000053"}", endorsement signature: 0E!����U�� W��P) p4� _fd��&>��9cm|p��St�w info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"importer.importer-org.smbc.com","grpc.default_authority":"importer.importer-org.smbc.com"} [2017-11-11 19:55:16.687] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } [2017-11-11 19:55:16.692] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2017-11-11 19:55:18.899] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } The transaction has been committed on peer 127.0.0.1:7053 event promise all complete and testing complete Successfully sent transaction to the orderer.'''

mitrashan (Sat, 11 Nov 2017 14:12:12 GMT):
The above error is coming from second invoke onwards but, very random and not showing any particular pattern. Has anybody encountered this? I am using the code from the balance-transfer, sometimes able to do 2-3 invoke at one go and sometimes just keep failing after 2nd invoke ... once restarting the NodeJS app again giving 2-3 or single chance ....

mitrashan (Sat, 11 Nov 2017 14:15:23 GMT):
*After node gives this error the peer log shows* - '2017-11-11 13:06:08.609 UTC [chaincode] ExecuteChaincode -> ERRO 9c30 Error executing chaincode: Failed to execute transaction (Error sending TRANSACTION: txid:84df727eb7c622917b7ffcc86fbf79a36b877d26559f488c481c4d4195ca05c3 exists)'

jimthematrix (Sun, 12 Nov 2017 02:51:17 GMT):
@mitrashan you need to check the chaincode container's log, they are named "dev-peerXXXX"

auxillium (Sun, 12 Nov 2017 03:34:01 GMT):
Has joined the channel.

mitrashan (Sun, 12 Nov 2017 15:24:13 GMT):
Hi @jimthematrix checked the dev-XXXX log for the peer importer.importer-org.smbc.com and surprising is that sometimes (really not all the time) the target invoke method like - createPo or createSc or updateSc is getting called twice but, not throwing any error on the logs ... it just doing nothing like below -

mitrashan (Sun, 12 Nov 2017 15:27:31 GMT):

Clipboard - November 12, 2017 9:14 PM

Banggijin (Mon, 13 Nov 2017 01:52:52 GMT):
Has joined the channel.

Banggijin (Mon, 13 Nov 2017 01:53:47 GMT):
hello I am using fabric-samples/balance-transfer example and trying to connect to my other nodes' peers, orderers, and cas I edited app/network-config.json, crypto-config( which has been used to make our fabric network), and config.js [2017-11-09 15:26:43.784] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140736281539520:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2520: 140736281539520:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3550: ] at ClientRequest. (/Users/coinplug/fabric-samples/balance-transfer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:711:12) at emitOne (events.js:115:13) at ClientRequest.emit (events.js:210:7) at TLSSocket.socketErrorListener (_http_client.js:401:9) at emitOne (events.js:115:13) at TLSSocket.emit (events.js:210:7) at onwriteError (_stream_writable.js:392:12) at onwrite (_stream_writable.js:414:5) at _destroy (internal/streams/destroy.js:39:7) at TLSSocket.Socket._destroy (net.js:556:3) [2017-11-09 15:26:43.784] [INFO] Helper - in getRegisteredUsers : null [2017-11-09 15:26:43.784] [DEBUG] Helper - Jim failed to register [2017-11-09 15:26:43.784] [ERROR] Helper - Jim enrollment failed and I turned on my app '$ node app' I've got above error please help me

dv29 (Mon, 13 Nov 2017 07:14:46 GMT):
Has joined the channel.

mastersingh24 (Mon, 13 Nov 2017 12:39:39 GMT):
@Banggijin - the TLS certificates you are using for your CA do not have the proper extended key usage

comeback4you (Mon, 13 Nov 2017 13:00:54 GMT):
@Banggijin fabric-client-kv-org1 fabric-client-kv-org2 every time remove both the dir before run the script.

simcan (Mon, 13 Nov 2017 13:50:06 GMT):
Hi, can I use the Node SDK without establishing a CA ? I am generating the certificates using cryptogen

Dpkkmr (Mon, 13 Nov 2017 14:23:32 GMT):
Hi All, I am doing performance testing for node SDK. I am invoking 100 transactions from three different systems simultaneously to a single node app. Applications works fine for few minutes(I am able to get transaction IDs on each system) after few minutes Node app crashes/stops working with below mentioned error message. Can some one suggest how I can improve the performance of the system? Any solution for this error? Error from node app console before crashing: [2017-11-13 13:07:33.056] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue /usr/src/app/node_modules/fabric-client/lib/EventHub.js:411 event.setCreator(user.getIdentity().serialize()); ^ TypeError: Cannot read property 'getIdentity' of null at EventHub._sendRegistration (/usr/src/app/node_modules/fabric-client/lib/EventHub.js:411:24) at EventHub._disconnect (/usr/src/app/node_modules/fabric-client/lib/EventHub.js:386:9) at EventHub.disconnect (/usr/src/app/node_modules/fabric-client/lib/EventHub.js:372:8) at Timeout.setTimeout (/usr/src/app/app/invoke-transaction.js:93:10) at ontimeout (timers.js:386:11) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) npm ERR! Linux 4.4.0-1022-aws npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v6.11.5 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! balancetransfer-client-app@1.0.0 start: `node app.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the balancetransfer-client-app@1.0.0 start script 'node app.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pharmatrack-client-app package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node app.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs balancetransfer-client-app npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls balancetransfer-client-app npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /usr/src/app/npm-debug.log ubuntu@dpkkmr:/$ PuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY6cPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY6cPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY6cPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY Thanks in Advance!

jimthematrix (Mon, 13 Nov 2017 14:43:26 GMT):
@mitrashan I would suggest to pr my out the transaction IDs from both the sdk as they get sent out, and from the chaincode (call stub.GetTxID()) to see if all tx are accounted for. If not, I would then browse the peers log to see if the txs have arrived at the peer. That way you can start narrowing down to where the failure was

jimthematrix (Mon, 13 Nov 2017 14:48:18 GMT):
@comeback4you yes, you can reference the doc on Client.createUser()

john.d.sheehan (Mon, 13 Nov 2017 16:48:39 GMT):
Has joined the channel.

john.d.sheehan (Mon, 13 Nov 2017 16:50:04 GMT):
Is it possible to fetch the sdk from the npm repos, or must I clone it from github and build?

vu3mmg (Tue, 14 Nov 2017 02:30:48 GMT):
Does the node SDK support GRPC connection pooling. If so How to configure the same . Also could you please let me know the how to pass ConnectionOptions .

vu3mmg (Tue, 14 Nov 2017 06:08:08 GMT):
@jimthematrix could you please help me to get some view related to the above .

linyuadam (Tue, 14 Nov 2017 07:05:04 GMT):
Hi, all, is the current EventHub Block Event not including the Read/Write Set

Subramanyam (Tue, 14 Nov 2017 09:03:47 GMT):
Hi all, how can i append the channel to already existing peers to an organisation please suggest some solutions

Subramanyam (Tue, 14 Nov 2017 09:04:12 GMT):

Screenshot from 2017-11-13 17-19-56.png

Subramanyam (Tue, 14 Nov 2017 09:04:48 GMT):

Screenshot from 2017-11-13 17-09-28.png

MohammadObaid (Tue, 14 Nov 2017 09:04:52 GMT):
Hi @jimthematrix and others I have setup fabric environment on multiple amazon aws instances and all docker containers and everything run accordingly. Now Is there anyway to connect node sdk with my existing network?

jaswanth (Tue, 14 Nov 2017 10:06:17 GMT):
Hi . i have 2 (channel.tx, channel1.tx) channel configuration files and created 2 channels .. is there a way that i can create an other channel say `mychannel` ( i dont have mychannel.tx file ) through node sdk . i just want to know is dynamic creation of channel possible .

brankoterzic (Tue, 14 Nov 2017 10:38:28 GMT):
@jaswanth https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app.js

brankoterzic (Tue, 14 Nov 2017 10:38:38 GMT):
here you can find the example you need

jaswanth (Tue, 14 Nov 2017 10:44:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nBYndym7Fe4Pf528c) @brankoterzic Thanks for the link .. In the link i did not find anything related to creating a dynamic channel ( with creating dynamic channel configuration ) .

brankoterzic (Tue, 14 Nov 2017 10:46:16 GMT):
If you see the logger.info('<<<<<<<<<<<<<<<<< C R E A T E C H A N N E L >>>>>>>>>>>>>>>>>'); section, you can reference your channel configuration and create the channel, is that what you need?

kenmazsyma (Tue, 14 Nov 2017 11:29:39 GMT):
Hi all. I'm trying to invoke my chaincode through node-sdk but the peer always returns with error `err:could not find chaincode '(my chaincode)'`. As far as I checked the log, both installing and instantiating my chaincode were succeeded. I'm doughting my chaincode is not committed nevertheless successfully instantiated. Does anyone let me know what the cause is? My network is launched with 1 orderer, 2 organizations with 1 peer each. Please find attached log.

kenmazsyma (Tue, 14 Nov 2017 11:29:53 GMT):

out.log

AuHuR (Tue, 14 Nov 2017 12:59:29 GMT):
Has left the channel.

jimthematrix (Tue, 14 Nov 2017 13:33:20 GMT):
@vu3mmg in general connection options are passed when you construct the Peer/Orderer instances: https://fabric-sdk-node.github.io/Peer.html. You really don't need to consider connection pooling because grpc is over http2 which is a multiplexed connection. there's only one connection per domain. you should be able to send over that single pipe as many requests as your configurations allow

jimthematrix (Tue, 14 Nov 2017 13:36:07 GMT):
@MohammadObaid take a look here as an example of how to configure node SDK based clients to fabric deployed in AWS: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/network-config-aws.json

jimthematrix (Tue, 14 Nov 2017 13:38:48 GMT):
@Subramanyam when you say "append the channel to existing peers", what did you mean exactly? from the error the peer already has the channel. what are you trying to do?

jrosmith (Tue, 14 Nov 2017 13:40:53 GMT):
@Dpkkmr i'm assuming your node application is based off of the sample code for balance transfer. unfortunately this sample code is not the best for handling a large volume of transactions as it uses one `client` object and switches the user context. from the docs: ```An important aspect of the current design of the Client class is that it is stateful. An instance must be configured with a userContext before it can be used to talk to the fabric backend. A userContext is an instance of the User class, which encapsulates the ability to sign requests. If the SDK is used in a multi-user environment, there are two recommended techniques to manage the authenticated users and instances of clients. 1. Use a dedicated client instance per authenticated user. Create a new instance for each authenticated user. You can enroll each authenticated user separately so that each user gets its own signing identity. 2. Use a shared client instance and a common signing identity among authenticated users. It is important to understand that switching userContexts with the same client instance is considered an anti-pattern. This is the direct result of the stateful design. A JIRA work item has been opened to discuss adding support for stateless usage of the SDK: FAB-4563 ``` i used to have the same problem and got around it by using option one as suggested in the snippet above

Jonny (Tue, 14 Nov 2017 14:29:28 GMT):
Hello. Can someone please help me to understand the balance transfer example. For example, I just enrolled for user "Jim" and then after than. I want query the transaction for other user. How the system work to reject the request if I'm using the Jim

Jonny (Tue, 14 Nov 2017 14:29:28 GMT):
Hello. Can someone please help me to understand the balance transfer example. For example, I just enrolled for user "Jim" and then after than. I want query the transaction for other user. How the system work to reject the request if I'm using the Jim's token

SharedMocha (Tue, 14 Nov 2017 18:27:32 GMT):
Hello All -Can someone pls help with how to setup an API server around nodejs SDK to handle HTTP requests from web browser ?

eetti (Tue, 14 Nov 2017 20:19:47 GMT):
Hi, I am using the node sdk to install/init/upgrade/create channel/join channel. I get errors when I run the node js code multiple times for different operation. What I need help on is how to close the socket openned by gRPC for peer connection from the javascript code. When I make the request multiple times, I always get this err ``` E0918 16:31:23.880760460 8681 ssl_transport_security.c:575] Could not add root certificate to ssl context. E0918 16:31:23.880782242 8681 ssl_transport_security.c:1297] Cannot load server root certificates. E0918 16:31:23.880801987 8681 security_connector.c:857] Handshaker factory creation failed with TSI_INTERNAL_ERROR. E0918 16:31:23.880809411 8681 secure_channel_create.c:112] Failed to create secure subchannel for secure name 'localhost:9998' E0918 16:31:23.880815629 8681 secure_channel_create.c:143] Failed to create subchannel arguments during subchannel creation. ```

bretharrison (Tue, 14 Nov 2017 23:36:44 GMT):
@kenmazsyma check all the places where you are using the channel id ... log shows and empty string as the channel name when the peer is looking at the proposal

bretharrison (Tue, 14 Nov 2017 23:41:24 GMT):
@SharedMocha check the balance transfer sample https://github.com/hyperledger/fabric-samples

bretharrison (Tue, 14 Nov 2017 23:42:46 GMT):
@linyuadam Are you not seeing it ?

kenmazsyma (Wed, 15 Nov 2017 00:01:29 GMT):
@bretharrison Thank you for letting me know. I'll check my codes following your advice.

bh4rtp (Wed, 15 Nov 2017 01:21:19 GMT):
why does node sdk name the field `tls_cacerts` in the `network-config.json`? may this field configured with multiple certs?

bh4rtp (Wed, 15 Nov 2017 01:21:19 GMT):
why does node sdk name the field `tls_cacerts` in the `network-config.json`? may this field be configured with multiple certs?

Subramanyam (Wed, 15 Nov 2017 05:00:44 GMT):
@jimthematrix I am trying to do that i want to create and join a channel with a name was mychannel2 to org1. But it was getting some error and it is not linked to org1. But the channel was created successfully

Subramanyam (Wed, 15 Nov 2017 05:02:58 GMT):

Screenshot from 2017-11-13 17-19-56.png

Subramanyam (Wed, 15 Nov 2017 05:03:36 GMT):

Screenshot from 2017-11-13 17-09-28.png

Subramanyam (Wed, 15 Nov 2017 05:04:04 GMT):
@jimthematrix In this case how can i resolve the issue

ajksharma (Wed, 15 Nov 2017 08:09:36 GMT):
Has joined the channel.

mitrashan (Wed, 15 Nov 2017 09:15:07 GMT):
@jimthematrix thank you so much for helping. I resolved the issue. The problem was coming from the line targets.push(peer) now I had a single peer in one org (network-config.json) and when I was trying to hit the invoke from the sdk layer the call was repeatedly adding the same peer and eventhub with the same peer thus, from the second call onwards it was saying a duplicate id. Now, I'm able to do anything - multiple invoke (with little time gap, query). Thanks once again.

eetti (Wed, 15 Nov 2017 10:55:00 GMT):
Please how to close the tcp socket opened by grpc to send invoke/query requests to the peers.

ArnabChatterjee (Wed, 15 Nov 2017 12:05:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CtCvuKEHJ6L9XPema) @akashmar - Any updates on the following?

Dpkkmr (Wed, 15 Nov 2017 12:53:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yJrys4nbapGLCzayr) @jrosmith Thanks a lot for your information. :)

jimthematrix (Wed, 15 Nov 2017 14:53:00 GMT):
@eetti a `close()` method was added in v1.1: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Peer.js#L63

SimonOberzan (Wed, 15 Nov 2017 15:19:01 GMT):
Hi. I'm trying to join the channel using node SDK. I'm using a join-channel file from balance-transfer sample project. But I get the following error connected to eventHub when I call the channel.joinChannel() function: http://prntscr.com/hatscl. Could someone with more understanding of the process behind it look at it?. I have ran the blance-transfer, and there was `grpc stream state: 2` while I get `grpc stream state: 3` so I guess there is something wrong but I can't figure what to do.

SimonOberzan (Wed, 15 Nov 2017 15:19:01 GMT):
Hi. I'm trying to join the channel using node SDK. I'm using a join-channel file from balance-transfer sample project. But I get the following error connected to eventHub when I call the channel.joinChannel() function: http://prntscr.com/hatscl. Could someone with more understanding of the process behind it look at it?. I have ran the blance-transfer, and there was `grpc stream state: 2` while I get `grpc stream state: 3` so I guess there is something wrong but I can't figure out what to do.

SimonOberzan (Wed, 15 Nov 2017 15:19:01 GMT):
Hi. I'm trying to join the channel using node SDK. I'm using a modified join-channel file from balance-transfer sample project. But I get the following error connected to eventHub when I call the channel.joinChannel() function: http://prntscr.com/hatscl. Could someone with more understanding of the process behind it look at it?. I have ran the blance-transfer, and there was `grpc stream state: 2` while I get `grpc stream state: 3` so I guess there is something wrong but I can't figure out what to do.

SimonOberzan (Wed, 15 Nov 2017 15:19:01 GMT):
Hi. I'm trying to join the channel using node SDK. I'm using a modified join-channel file from balance-transfer sample project. But I get the following error connected to eventHub when I call the channel.joinChannel() function: http://prntscr.com/hatscl. Could someone with more understanding of the process behind it look at it?. I have ran the base blance-transfer, and there was `grpc stream state: 2` while I get `grpc stream state: 3` so I guess there is something wrong but I can't figure out what to do.

johnfilippone (Wed, 15 Nov 2017 15:46:57 GMT):
Has joined the channel.

johnfilippone (Wed, 15 Nov 2017 15:52:01 GMT):
Greetings! Has anyone else encountered any issues with the SDK timing out after sending a transaction proposal? We found that this happens from time to time and we have implemented a retry policy in our app to remedy this. When the SDK times out we just try sending the transaction again and that basically works every time. We also noticed that our app does not handle concurrent requests very well and we believe it is caused at the SDK level. Has anyone else experienced issues with concurrent requests?

eetti (Wed, 15 Nov 2017 16:52:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XHdDw2a5kTWvDp2Zm) @jimthematrix Thank you, I checked out 1.0.1 , didn't see it was added on the master branch.

rathishks (Wed, 15 Nov 2017 20:11:31 GMT):
Has joined the channel.

aspyn (Thu, 16 Nov 2017 02:56:40 GMT):
Has joined the channel.

jaswanth (Thu, 16 Nov 2017 04:49:17 GMT):
Hi all , how can i specify an endorsment policy from the node sdk instantiate request ?

daijianw (Thu, 16 Nov 2017 05:47:00 GMT):
@jimthematrix Jim, is there any api to query the list of channels in the network? Thx.

ArnabChatterjee (Thu, 16 Nov 2017 06:12:41 GMT):
@jaswanth - see https://github.com/hyperledger/fabric-sdk-node/blob/release/test/integration/e2e/e2eUtils.js#L431

ArnabChatterjee (Thu, 16 Nov 2017 06:13:57 GMT):
@johnfilippone - yes I have faced the same. Btw, can you share the retry policy?

Nate_Y (Thu, 16 Nov 2017 11:03:41 GMT):
Has joined the channel.

Nate_Y (Thu, 16 Nov 2017 11:06:54 GMT):
Hi all, we have a basic network using leveldb and simple chaincode logic. We use fabric-sdk-node to add data to the blockchain. Now the TPS is roughly 50, is this normal?

Amjadnz (Thu, 16 Nov 2017 12:48:23 GMT):
Someone here that can be any help? ```[Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/tts/official/src/tts/ubn/nodejs/fabric-sdk-node/node_modules/grpc/src/client.js:255:19)\n at ClientDuplexStream._readsDone (/tts/official/src/tts/ubn/nodejs/fabric-sdk-node/node_modules/grpc/src/client.js:221:8)\n at readCallback (/tts/official/src/tts/ubn/nodejs/fabric-sdk-node/node_modules/grpc/src/client.js:283:12)" not ok 9 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/tts/official/src/tts/ubn/nodejs/fabric-sdk-node/node_modules/fabric-client/lib/Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (/tts/official/src/tts/ubn/nodejs/fabric-sdk-node/node_modules/grpc/src/client.js:258:12) at ClientDuplexStream._readsDone (/tts/official/src/tts/ubn/nodejs/fabric-sdk-node/node_modules/grpc/src/client.js:221:8) at readCallback (/tts/official/src/tts/ubn/nodejs/fabric-sdk-node/node_modules/grpc/src/client.js:283:12)```

Amjadnz (Thu, 16 Nov 2017 12:49:58 GMT):
I have a set of config setup and am using NODE JS e2e sample code to get it working. I have my own set of crypto gen for orgs and it is working fine in a NON NODE JS environment. i.e - I can create ch/join/install/intantiate/query/invoke from individual docker containers acting as peer to a single orderer.

Amjadnz (Thu, 16 Nov 2017 12:51:03 GMT):
When I issue this command `node ./test/integration/e2e/create-channel.js ` I get the above message in step #9

Amjadnz (Thu, 16 Nov 2017 12:51:44 GMT):
It is complaining about orderer not been able to be found as the connection to the orderer - i presume is not TLS enabled.

Amjadnz (Thu, 16 Nov 2017 12:52:08 GMT):
In the orderer I get this message ` grpc: Server.Serve failed to complete security handshake from "172.20.0.1:59768": EOF`

SimonOberzan (Thu, 16 Nov 2017 13:31:19 GMT):
Hi. I have a project which I forked from balance-transfer sample project. I have a problem with creating an eventHub. On org 1 I created 3 peers, 2 with default ports and on 1 I have changed them. When I join the channel with my peer, and proposals get sent, the first 2 peers recieve the block, but the peer with changed ports gets a `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` error. What did I miss? Here is my docker-compose file with which I have started the 3rd peer: https://pastebin.com/0DtJiUwW Help much appreciated.

SimonOberzan (Thu, 16 Nov 2017 13:31:19 GMT):
Hi. I have a project which I forked from balance-transfer sample project. I have a problem with creating an eventHub. On org 1 I created 3 peers, 2 with default ports and on 1 I have changed them. When I join the channel with my peer, and proposals get sent, the first 2 peers recieve the block, but the peer with changed ports gets a `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` error. What did I miss? Here is my docker-compose file with which I have started the 3rd peer: https://pastebin.com/0DtJiUwW Help much appreciated. Those are all the logs on the peer: ```2017-11-16 12:51:46.483 UTC [eventhub_producer] validateEventMessage -> DEBU 1ee ValidateEventMessage starts for signed event 0xc421eef890 2017-11-16 12:51:46.484 UTC [eventhub_producer] validateEventMessage -> DEBU 1ef ValidateEventMessage starts for signed event 0xc421f524e0 2017-11-16 12:51:46.485 UTC [eventhub_producer] registerHandler -> DEBU 1f0 registering event type: BLOCK 2017-11-16 12:51:46.486 UTC [eventhub_producer] registerHandler -> DEBU 1f1 registering event type: BLOCK ```

SimonOberzan (Thu, 16 Nov 2017 13:31:19 GMT):
Hi. I have a project which I forked from balance-transfer sample project. I have a problem with creating an eventHub. On org 1 I created 3 peers, 2 with default ports and on 1 I have changed them. When I join the channel with my peer, and proposals get sent, the first 2 peers recieve the block, but the peer with changed ports gets a `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` error. What did I miss? Here is my docker-compose file with which I have started the 3rd peer: https://pastebin.com/0DtJiUwW. Those are all the logs on the peer: ```2017-11-16 12:51:46.483 UTC [eventhub_producer] validateEventMessage -> DEBU 1ee ValidateEventMessage starts for signed event 0xc421eef890 2017-11-16 12:51:46.484 UTC [eventhub_producer] validateEventMessage -> DEBU 1ef ValidateEventMessage starts for signed event 0xc421f524e0 2017-11-16 12:51:46.485 UTC [eventhub_producer] registerHandler -> DEBU 1f0 registering event type: BLOCK 2017-11-16 12:51:46.486 UTC [eventhub_producer] registerHandler -> DEBU 1f1 registering event type: BLOCK ```

SimonOberzan (Thu, 16 Nov 2017 13:31:19 GMT):
Hi. I have a project which I forked from balance-transfer sample project. I have a problem with creating an eventHub. On org 1 I created 3 peers, 2 with default ports and on 1 I have changed them. When I join the channel with my peer, and proposals get sent, the first 2 peers recieve the block, but the peer with changed ports gets a `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` error. What did I miss? Here is my docker-compose file with which I have started the 3rd peer: https://pastebin.com/0DtJiUwW. Those are all the logs on the peer: ```2017-11-16 12:51:46.483 UTC [eventhub_producer] validateEventMessage -> DEBU 1ee ValidateEventMessage starts for signed event 0xc421eef890 2017-11-16 12:51:46.484 UTC [eventhub_producer] validateEventMessage -> DEBU 1ef ValidateEventMessage starts for signed event 0xc421f524e0 2017-11-16 12:51:46.485 UTC [eventhub_producer] registerHandler -> DEBU 1f0 registering event type: BLOCK 2017-11-16 12:51:46.486 UTC [eventhub_producer] registerHandler -> DEBU 1f1 registering event type: BLOCK ```Help much appreciated.

SimonOberzan (Thu, 16 Nov 2017 13:31:19 GMT):
Hi. I have a project which I forked from balance-transfer sample project. I have a problem with creating an eventHub. On org 1 I created 3 peers, 2 with default ports and on 1 I have changed them. When I join the channel with my peer, and proposals get sent, the first 2 peers recieve the block, but the peer with changed ports gets a `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` error. What did I miss? Here is my docker-compose file with which I have started the 3rd peer: https://pastebin.com/0DtJiUwW. Those are all the logs on the third peer: ```2017-11-16 12:51:46.483 UTC [eventhub_producer] validateEventMessage -> DEBU 1ee ValidateEventMessage starts for signed event 0xc421eef890 2017-11-16 12:51:46.484 UTC [eventhub_producer] validateEventMessage -> DEBU 1ef ValidateEventMessage starts for signed event 0xc421f524e0 2017-11-16 12:51:46.485 UTC [eventhub_producer] registerHandler -> DEBU 1f0 registering event type: BLOCK 2017-11-16 12:51:46.486 UTC [eventhub_producer] registerHandler -> DEBU 1f1 registering event type: BLOCK ```Help much appreciated.

SimonOberzan (Thu, 16 Nov 2017 13:31:19 GMT):
Hi. I have a project which I forked from balance-transfer sample project. I have a problem with creating an eventHub. On org 1 I created 3 peers, 2 with default ports and on 1 I have changed them. When I join the channel with my peer, and proposals get sent, the first 2 peers recieve the block, but the peer with changed ports gets a `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` error. What did I miss? Here is my docker-compose file with which I have started the 3rd peer: https://pastebin.com/0DtJiUwW. Those are all the logs on the third peer: ```2017-11-16 12:51:46.483 UTC [eventhub_producer] validateEventMessage -> DEBU 1ee ValidateEventMessage starts for signed event 0xc421eef890 2017-11-16 12:51:46.484 UTC [eventhub_producer] validateEventMessage -> DEBU 1ef ValidateEventMessage starts for signed event 0xc421f524e0 2017-11-16 12:51:46.485 UTC [eventhub_producer] registerHandler -> DEBU 1f0 registering event type: BLOCK 2017-11-16 12:51:46.486 UTC [eventhub_producer] registerHandler -> DEBU 1f1 registering event type: BLOCK ```I have also set the peer in network-config to : ```peer2.org1.example.com: url: grpc://peer2.org1.example.com:7151 eventUrl: grpc://peer2.org1.example.com:7153``` Help much appreciated.

SimonOberzan (Thu, 16 Nov 2017 13:31:19 GMT):
Hi. I have a project which I forked from balance-transfer sample project. I have a problem with creating an eventHub. On org 1 I created 3 peers, 2 with default ports and on 1 I have changed them. When I join the channel with my peer, and proposals get sent, the first 2 peers recieve the block, but the peer with changed ports gets a `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` error. What did I miss? Here is my docker-compose file with which I have started the 3rd peer: https://pastebin.com/0DtJiUwW. Those are all the logs on the third peer: ```2017-11-16 12:51:46.483 UTC [eventhub_producer] validateEventMessage -> DEBU 1ee ValidateEventMessage starts for signed event 0xc421eef890 2017-11-16 12:51:46.484 UTC [eventhub_producer] validateEventMessage -> DEBU 1ef ValidateEventMessage starts for signed event 0xc421f524e0 2017-11-16 12:51:46.485 UTC [eventhub_producer] registerHandler -> DEBU 1f0 registering event type: BLOCK 2017-11-16 12:51:46.486 UTC [eventhub_producer] registerHandler -> DEBU 1f1 registering event type: BLOCK ```I have also set the peer in network-config to : ```peer2.org1.example.com: url: grpc://peer2.org1.example.com:7151 eventUrl: grpc://peer2.org1.example.com:7153``` Help much appreciated.

SimonOberzan (Thu, 16 Nov 2017 13:31:19 GMT):
Hi. I have a project which I forked from balance-transfer sample project. I have a problem with creating an eventHub. On org 1 I created 3 peers, 2 with default ports and on 1 I have changed them. When I join the channel with my peer, and proposals get sent, the first 2 peers recieve the block, but the peer with changed ports gets a `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` error. What did I miss? Here is my docker-compose file with which I have started the 3rd peer: https://pastebin.com/0DtJiUwW. Those are all the logs on the third peer: ```2017-11-16 12:51:46.483 UTC [eventhub_producer] validateEventMessage -> DEBU 1ee ValidateEventMessage starts for signed event 0xc421eef890 2017-11-16 12:51:46.484 UTC [eventhub_producer] validateEventMessage -> DEBU 1ef ValidateEventMessage starts for signed event 0xc421f524e0 2017-11-16 12:51:46.485 UTC [eventhub_producer] registerHandler -> DEBU 1f0 registering event type: BLOCK 2017-11-16 12:51:46.486 UTC [eventhub_producer] registerHandler -> DEBU 1f1 registering event type: BLOCK ```I have also set the peer in network-config to : ```peer2.org1.example.com: url: grpc://peer2.org1.example.com:7151 eventUrl: grpc://peer2.org1.example.com:7153``` Help much appreciated.

Amjadnz (Thu, 16 Nov 2017 14:16:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=m73oasNT6Hokjq6yu) Further to my question ```"orderer": { "url": "grpcs://orderer.ubn.ae:7050", "server-hostname": "orderer.ubn.ae", "tls_cacerts": "../../../../../test/sampleconfig/ordererOrganizations/orderer.ubn.ae/tlsca/tlsca.orderer.ubn.ae-cert.pem" }```

Amjadnz (Thu, 16 Nov 2017 14:16:35 GMT):
this is my orderer part of config.json (from e2e0

Amjadnz (Thu, 16 Nov 2017 14:16:35 GMT):
this is my orderer part of config.json (from e2e)

albert.lacambra (Thu, 16 Nov 2017 14:24:54 GMT):
Has left the channel.

johnfilippone (Thu, 16 Nov 2017 15:28:24 GMT):
Has anyone else has issues with concurrent transactions through the SDK?

Vadim (Thu, 16 Nov 2017 15:29:27 GMT):
which issues?

Amjadnz (Thu, 16 Nov 2017 15:50:09 GMT):
Node.js app not able to communicate to an Orderer Container Orderer is TLS enabled Certs are all configured properly - As I tested the startup processes. But when a NODE JS app is the channel create option always returns SERVICE_UNAVAILABLE. From the code this is error code 14. The error in orderer logs is for INVALID TLS. `grpc: Server.Serve failed to complete security handshake from "172.20.0.1:59830": EOF`

Amjadnz (Thu, 16 Nov 2017 15:50:09 GMT):
Node.js app not able to communicate to an Orderer Container Orderer is TLS enabled Certs are all configured properly - As I tested the startup processes. But when a NODE JS app in the channel create option always returns SERVICE_UNAVAILABLE. From the code this is error code 14. The error in orderer logs is for INVALID TLS. `grpc: Server.Serve failed to complete security handshake from "172.20.0.1:59830": EOF`

Amjadnz (Thu, 16 Nov 2017 15:51:37 GMT):
Any help is appreciated.

Vadim (Thu, 16 Nov 2017 15:51:40 GMT):
@Amjadnz this seems like your nodejs app does not trust the orderer cert. Verify that the nodejs TLS CA cert is the same which signed the orderer tls cert.

Amjadnz (Thu, 16 Nov 2017 15:52:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AffRnz4j9Jzi3QY8t) @Vadim Thanks would verify that through openssl and return back.

Vadim (Thu, 16 Nov 2017 15:54:35 GMT):
@Amjadnz you can also try to enable grpc log in your nodejs app by setting env vars `GRPC_TRACE=all GRPC_VERBOSITY=DEBUG`, maybe that one will give more details

rameshthoomu (Thu, 16 Nov 2017 16:01:14 GMT):
@bretharrison I see fabric-sdk-node merge job is failing consistently.. ``` "webAdmin" but using invalid affiliation 00:14:44.664 not ok 1049 Error: fabric-ca request register failed with errors [[{"code":43,"message":"Registrar does not have attribute 'hf.Registrar.Attributes' thus can't register any attributes"}]] at IncomingMessage. (/w/workspace/fabric-sdk-node8-merge-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-ca-client/lib/FabricCAClientImpl.js:9:26662) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1056:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9) ```

rameshthoomu (Thu, 16 Nov 2017 16:02:28 GMT):
see this one https://jenkins.hyperledger.org/view/fabric-sdk-node/job/fabric-sdk-node8-merge-x86_64/72/console

bretharrison (Thu, 16 Nov 2017 16:04:22 GMT):
@rameshthoomu thanks, I am looking at that

Amjadnz (Thu, 16 Nov 2017 16:13:23 GMT):
@Vadim - on analysis I could find that all are pointing to the same directory structure. ``` |-- admincerts | -- Admin@orderer.ubn.ae-cert.pem |-- cacerts | -- ca.orderer.ubn.ae-cert.pem |-- keystore | -- d673259807d9fc4ccd1d89ad5f0d8f971a85369f907af836d18908e80b368353_sk |-- signcerts | -- orderer.orderer.ubn.ae-cert.pem |-- tlscacerts -- tlsca.orderer.ubn.ae-cert.pem```

Amjadnz (Thu, 16 Nov 2017 16:13:23 GMT):
@Vadim - on analysis I could find that all are pointing to the same directory structure. `test/sampleconfig/ordererOrganizations/orderer.ubn.ae/orderers/orderer.orderer.ubn.ae/msp/` ``` |-- admincerts | -- Admin@orderer.ubn.ae-cert.pem |-- cacerts | -- ca.orderer.ubn.ae-cert.pem |-- keystore | -- d673259807d9fc4ccd1d89ad5f0d8f971a85369f907af836d18908e80b368353_sk |-- signcerts | -- orderer.orderer.ubn.ae-cert.pem |-- tlscacerts -- tlsca.orderer.ubn.ae-cert.pem```

Amjadnz (Thu, 16 Nov 2017 16:14:32 GMT):
NodeJS settings is as follows ```"orderer": { "url": "grpcs://orderer.ubn.ae:7050", "server-hostname": "orderer.ubn.ae", "tls_cacerts": "../../../../../test/sampleconfig/ordererOrganizations/orderer.ubn.ae/orderers/orderer.orderer.ubn.ae/msp/tlscacerts/tlsca.orderer.ubn.ae-cert.pem" }```

jeroiraz (Thu, 16 Nov 2017 16:26:02 GMT):
Has joined the channel.

C.Jason.Phelps (Thu, 16 Nov 2017 16:31:01 GMT):
Has joined the channel.

C.Jason.Phelps (Thu, 16 Nov 2017 16:31:40 GMT):
is there node based fabric example somewhere that I can begin to follow ?

jeroiraz (Thu, 16 Nov 2017 16:32:58 GMT):
@C.Jason.Phelps I found this one very simple yet useful: https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/, or you could see the marbles example that's more elaborated

C.Jason.Phelps (Thu, 16 Nov 2017 16:35:24 GMT):
thank just needed a place to start and everything I was finding was 'go' based

knagware9 (Thu, 16 Nov 2017 17:29:12 GMT):
@SimonOberzan --use the grpcs instead of grpc ..I think it will work

C.Jason.Phelps (Thu, 16 Nov 2017 19:53:12 GMT):
```[2017-11-16 19:52:11.069] [DEBUG] Helper - [NetworkConfig101.js]: getChannel - name mychannel [2017-11-16 19:52:11.069] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org1.example.com [2017-11-16 19:52:11.070] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer1.org1.example.com [2017-11-16 19:52:11.070] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org2.example.com [2017-11-16 19:52:11.070] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer1.org2.example.com [2017-11-16 19:52:11.071] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name orderer.example.com [2017-11-16 19:52:11.089] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /home/ubuntu/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15 [2017-11-16 19:52:11.116] [INFO] instantiate-chaincode - instantiate proposal was good [2017-11-16 19:52:11.116] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-11-16 19:52:11.116] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse [2017-11-16 19:52:11.116] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:17598) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:17598) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ```

C.Jason.Phelps (Thu, 16 Nov 2017 19:54:17 GMT):
trying to utilize the basic balance transfer example and run into this error when trying to Instantiate chaincode

C.Jason.Phelps (Thu, 16 Nov 2017 19:54:17 GMT):
trying to utilize the basic balance transfer example and ran into this error when trying to Instantiate chaincode

dave.enyeart (Thu, 16 Nov 2017 21:28:02 GMT):
@rameshthoomu @bretharrison what happened to the node.js sdk docs? The page looks broken to me, e.g.: https://fabric-sdk-node.github.io/tutorial-network-config.html . Could you check it out?

rameshthoomu (Thu, 16 Nov 2017 21:29:16 GMT):
yes.. this was broken recently..

rameshthoomu (Thu, 16 Nov 2017 21:30:17 GMT):
I am trying to re-run the fabric-sdk-node merge job to make sure it pushes all the files like css, html etc..

rameshthoomu (Thu, 16 Nov 2017 21:30:54 GMT):
But we are seeing issues in latest commits.

jimthematrix (Thu, 16 Nov 2017 21:47:45 GMT):
@dave.enyeart I alerted @bretharrison yesterday about the broken doc site...

jimthematrix (Thu, 16 Nov 2017 21:48:05 GMT):
maybe something Ramesh needs to look into...

bretharrison (Thu, 16 Nov 2017 22:57:37 GMT):
@Amjadnz Is your application reading the cert file and passing it on the orderer create ?

bretharrison (Thu, 16 Nov 2017 23:05:06 GMT):
@Subramanyam Check your names when you ran Configtxgen tool, when you issued the create channel using the NodeSDK and when you did the join channel using the NodeSDK.

bretharrison (Thu, 16 Nov 2017 23:17:35 GMT):
@C.Jason.Phelps How are you specifying the peers to be the targets? It looks as if one of the targets does not like the MSP Org1MSP. You may wish to specify only the peer(s) from that org (Org1MSP) in the `targets` parameter of the request.

eetti (Thu, 16 Nov 2017 23:21:29 GMT):
is it possible to update the tls certs used for peers/orderers? Would I also have to change the tlscacert used in the genesis block (i.e modifiy channel config) ?

ArnabChatterjee (Fri, 17 Nov 2017 03:04:49 GMT):
Hi All. Is there any upper restriction on setting an endorsement policy that I cannot require OK signatures of all the organizations in the network? For example if I have org 1 and org 2 then such kind of an endorsement policy is giving me an error 'ENDORSEMENT_POLICY_FAILURE' : 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } } whereas this is not : 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '1-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } }

ArnabChatterjee (Fri, 17 Nov 2017 03:04:49 GMT):
Hi All. Is there any upper restriction on setting an endorsement policy that I cannot require OK signatures of all the organizations in the network? For example if I have org 1 and org 2 then such kind of an endorsement policy is giving me an error 'ENDORSEMENT_POLICY_FAILURE' : 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } } whereas this is not : 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '1-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } } I have sent invoke requests to all peers in both orgs.

ArnabChatterjee (Fri, 17 Nov 2017 03:04:49 GMT):
Hi All. Is there any upper restriction on setting an endorsement policy that I cannot require OK signatures of all the organizations in the network? For example if I have org 1 and org 2 then such kind of an endorsement policy is giving me an error 'ENDORSEMENT_POLICY_FAILURE' : 1 >> 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } } whereas this is not : 2 >> 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '1-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } } I have sent invoke requests to all peers in both orgs.

ArnabChatterjee (Fri, 17 Nov 2017 03:05:08 GMT):
@Any ideas @jimthematrix @dave.enyeart @Vadim

ArnabChatterjee (Fri, 17 Nov 2017 03:05:08 GMT):
Any ideas @jimthematrix @dave.enyeart @Vadim

ArnabChatterjee (Fri, 17 Nov 2017 03:05:13 GMT):
Thanks.:)

jimthematrix (Fri, 17 Nov 2017 03:50:33 GMT):
@ArnabChatterjee the policy looks fine to me, can you double check that 1) you sent the proposal requests to peers in both orgs, and 2) proposal responses from peers in both orgs are included in the transaction sent to the orderer?

ArnabChatterjee (Fri, 17 Nov 2017 04:03:18 GMT):
@jimthematrix - Thanks Jim. I will check and revert. :)

Amjadnz (Fri, 17 Nov 2017 04:05:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GWqqeJm6zHdyHEb8m) @bretharrison it is the standard e2e samples and only the crypto materials have changed.

ArnabChatterjee (Fri, 17 Nov 2017 04:15:12 GMT):
@jimthematrix - I know this is strange, but I checked it for 2 types of invokes. One is passing and the other is with ENDORSEMENT_POLICY_FAILURE. Although both are using the same common function to invoke transaction as mentioned in balance transfer example

ArnabChatterjee (Fri, 17 Nov 2017 04:20:45 GMT):
are there any restrictions in terms of the chaincode for endorsement policies.

ArnabChatterjee (Fri, 17 Nov 2017 04:20:45 GMT):
are there any restrictions in terms of the chaincode for endorsement policies?

Amjadnz (Fri, 17 Nov 2017 04:38:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oxsTwgXgztCbpSuQQ) - Resolved it now. My orderer was not started with a TLS CERT - it was started with normal non-TLS CERT. Once I changed it - it is now able to communicate with the orderer. Thanks for the help @Vadim and @bretharrison

ArnabChatterjee (Fri, 17 Nov 2017 05:18:15 GMT):
Okay after struggling for 3 days of understanding endorsement and stuff, this is what I understood. Kindly confirm/correct my understanding. Thanks. :) ``` To instantiate a transaction properly. The instantiation request must be sent to one or more endorsing peers in all the organizations of whom endorsement is required. During the time of invoke, it is the responsibility of the invoking application to send it to all concerned organization's peers for endorsements. For example, if we have 2 organizations with 2 endorsing peers in each organization (Org1EP0, Org1EP1, Org2EP0 and Org2EP1) and an endorsement policy as follows: 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } } which requires the signature of both organizations to pass endorsement. Then it is the responsibility of the application to instantiate the chaincode in all the endorsing peers (Org1EP0, Org1EP1, Org2EP0 and Org2EP1). During the time of invocation, it would be the responsibility of the application to send transactionProposal to atleast one peer out of both organizations ( Org1EP0/Org1EP1 and Org2EP0/Org2EP1) to get an a valid transaction. After all the proposal responses has been accumulated in the application, it needs to send all the recieved proposal responses and the proposal itself to the orderer for ordering. The orderer shall verify the proposal and its responses and then send them to the committing peers for committing in the ledger. Side Note: 1. In case the transaction fails to be valid in terms of endorsement, it still gets committed in the ledger. 2. All endorsing peers sign the transaction after simulation, hence signature of each endorsing peer (TO WHOM TRANSACTION PROPOSAL WAS SENT) will be present in the transaction 3. Judgement whether transaction is valid is determined by the orderer. Orderer will compare the proposal responses and mark it valid as per the endorsement policy. This response will be captured by the peers who have subscribed to the events for the given transaction (as event hubs). Only peers belonging to the transaction invoking organization can listen for events. ```

ArnabChatterjee (Fri, 17 Nov 2017 05:18:15 GMT):
Okay after struggling for 3 days of understanding endorsement and stuff, this is what I understood. Kindly confirm/correct my understanding. Thanks. :) ``` To instantiate a transaction properly. The instantiation request must be sent to one or more endorsing peers in all the organizations of whom endorsement is required. During the time of invoke, it is the responsibility of the invoking application to send it to all concerned organization's peers for endorsements. For example, if we have 2 organizations with 2 endorsing peers in each organization (Org1EP0, Org1EP1, Org2EP0 and Org2EP1) and an endorsement policy as follows: 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } } which requires the signature of both organizations to pass endorsement. Then it is the responsibility of the application to instantiate the chaincode in all the endorsing peers (Org1EP0, Org1EP1, Org2EP0 and Org2EP1). During the time of invocation, it would be the responsibility of the application to send transactionProposal to atleast one peer of both organizations ( Org1EP0/Org1EP1 and Org2EP0/Org2EP1) to get an a valid transaction. After all the proposal responses has been accumulated in the application, it needs to send all the recieved proposal responses and the proposal itself to the orderer for ordering. The orderer shall verify the proposal and its responses and then send them to the committing peers for committing in the ledger. Side Note: 1. In case the transaction fails to be valid in terms of endorsement, it still gets committed in the ledger. 2. All endorsing peers sign the transaction after simulation, hence signature of each endorsing peer (TO WHOM TRANSACTION PROPOSAL WAS SENT) will be present in the transaction 3. Judgement whether transaction is valid is determined by the orderer. Orderer will compare the proposal responses and mark it valid as per the endorsement policy. This response will be captured by the peers who have subscribed to the events for the given transaction (as event hubs). Only peers belonging to the transaction invoking organization can listen for events. ```

ArnabChatterjee (Fri, 17 Nov 2017 05:18:15 GMT):
Okay after struggling for 3 days of understanding endorsement and stuff, this is what I understood. Kindly confirm/correct my understanding. Thanks. :) ``` To instantiate a transaction properly. The instantiation request must be sent to one or more endorsing peers in all the organizations of whom endorsement is required. During the time of invoke, it is the responsibility of the invoking application to send it to all concerned organization's peers for endorsements. For example, if we have 2 organizations with 2 endorsing peers in each organization (Org1EP0, Org1EP1, Org2EP0 and Org2EP1) and an endorsement policy as follows: 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }} ], policy: { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1}] } } which requires the signature of both organizations to pass endorsement. Then it is the responsibility of the application to instantiate the chaincode in all the endorsing peers (Org1EP0, Org1EP1, Org2EP0 and Org2EP1). During the time of invocation, it would be the responsibility of the application to send transactionProposal to atleast one peer of both organizations ( Org1EP0/Org1EP1 and Org2EP0/Org2EP1) to get an a valid transaction. After all the proposal responses has been accumulated in the application, it needs to send all the recieved proposal responses and the proposal itself to the orderer for ordering. The orderer shall order the transaction and forward it to the committing peers for committing in the ledger which verifies the endorsement policy using the system chaincode VSCC. Side Note: 1. In case the transaction fails to be valid in terms of endorsement, it still gets committed in the ledger. 2. All endorsing peers sign the transaction after simulation, hence signature of each endorsing peer (TO WHOM TRANSACTION PROPOSAL WAS SENT) will be present in the transaction 3. Judgement whether transaction is valid is determined by the committing peer. Committing peer will compare the proposal (again, in case client did not) responses and mark it valid as per the endorsement policy. This response will be captured by the Client app who have subscribed to the events for the given transaction (as event hubs). ```

ArnabChatterjee (Fri, 17 Nov 2017 05:29:10 GMT):
@jimthematrix - I verified it. I was not instantiating the chaincode in all endorsing peers. Can you check my understanding in the above post? Thanks a lot Jim for your support. :)

Subramanyam (Fri, 17 Nov 2017 05:51:17 GMT):
@bretharrison I checked with that configtxgen tool, fabric sample balance transfer i created a channel mychannel2.tx and i want to join the channel to the existing channel mychannel.tx to an org1. is it possible to join another channel to the same org1

Subramanyam (Fri, 17 Nov 2017 08:52:34 GMT):
How can we validates endorsement policies in chaincode transactions in hyperledger fabric, how we can customize the endorsement policies in chaincode transactions. suggest with an example

Subramanyam (Fri, 17 Nov 2017 08:52:34 GMT):
@ArnabChatterjee How can we validates endorsement policies in chain code transactions in hyperledger fabric, how we can customise the endorsement policies in chain code transactions. suggest with an example

SimonOberzan (Fri, 17 Nov 2017 09:00:35 GMT):
Hi. I have a problem with eventHubs when joining peers to the channel using project forked from balance-transfer. I have 1 org with 3 peers. When I ran the channel.join(...), one peer gots connectected, 1 peer returned the following error: `[client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err expected MSP ID Org2MSP, received Org1MSP`. But than I reinstalled my project and ran it again, and now first two eventHubs work, while the third one fails with the same error as previously the second one did. Where could the problem be? I strongly suspect it has nothing to do with wrongly adressing the MSP as the problem just seems to disappear sometimes. Help much appreciated as I have been working on this for 3 days now, I will provide any info that you deem important.

SimonOberzan (Fri, 17 Nov 2017 09:00:35 GMT):
Hi. I have a problem with eventHubs when joining peers to the channel using project forked from balance-transfer. I have 1 org with 3 peers. When I ran the channel.join(...), one peer gots connectected, 1 peer returned the following error: `[client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err expected MSP ID Org2MSP, received Org1MSP`. But than I reinstalled my project and ran it again, and now first two eventHubs work, while the third one fails with the same error as previously the second one did. Where could the problem be? I strongly suspect it has nothing to do with wrongly adressing the MSP as the problem just seems to disappear sometimes. Help much appreciated as I have been working on this for 3 days now, I will provide any info that you deem important. PS: I have Org1 and Org2 but in this example all peers belong to Org1.

SimonOberzan (Fri, 17 Nov 2017 09:00:35 GMT):
Hi. I have a problem with eventHubs when joining peers to the channel using project forked from balance-transfer. I have 1 org with 3 peers. When I ran the channel.join(...), one peer gots connectected, 1 peer returned the following error: `[client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err expected MSP ID Org2MSP, received Org1MSP`. But than I reinstalled my project and ran it again, and now first two eventHubs work, while the third one fails with the same error as previously the second one did. Where could the problem be? I strongly suspect it has nothing to do with wrongly adressing the MSP as the problem just seems to disappear sometimes. Help much appreciated as I have been working on this for 3 days now, I will provide any info that you deem important. PS: I have Org1 and Org2 but in this example all peers belong to Org1.

Vadim (Fri, 17 Nov 2017 09:03:51 GMT):
@SimonOberzan have you checked the MSP cert of the peer? Is it org1 or org2?

SimonOberzan (Fri, 17 Nov 2017 09:04:03 GMT):
Org1

SimonOberzan (Fri, 17 Nov 2017 09:04:03 GMT):
Org1. Everything is Org1

SimonOberzan (Fri, 17 Nov 2017 09:04:03 GMT):
Org1. Everything is Org1. As I said for second peer simple reinstallation of my project solved the problem, so the certs and settings stayed the same

Vadim (Fri, 17 Nov 2017 09:07:23 GMT):
@SimonOberzan what about user cert? Is it also org1?

SimonOberzan (Fri, 17 Nov 2017 09:07:33 GMT):
@Vadim My network config: https://pastebin.com/mBE2G9Ap

SimonOberzan (Fri, 17 Nov 2017 09:08:38 GMT):
@Vadim Yes, user Jimmy for Org1, like in balance-transfer

Vadim (Fri, 17 Nov 2017 09:09:07 GMT):
so you say that evetything is org1, but yet your peer complains about org2

SimonOberzan (Fri, 17 Nov 2017 09:10:10 GMT):
I know I suspect the error is wrong as it solved itself when I reinstalled the project

Vadim (Fri, 17 Nov 2017 09:10:51 GMT):
something with your config is wrong

Vadim (Fri, 17 Nov 2017 09:11:11 GMT):
which peer reports that?

SimonOberzan (Fri, 17 Nov 2017 09:11:36 GMT):
sometimes the second one sometimes the third one

Vadim (Fri, 17 Nov 2017 09:12:59 GMT):
I don't see second or third peers in the config you posted

SimonOberzan (Fri, 17 Nov 2017 09:13:26 GMT):
Sorry peer1.org1.example.com and peer2.org1.example.com

SimonOberzan (Fri, 17 Nov 2017 09:13:26 GMT):
Sorry I ment peer1.org1.example.com and peer2.org1.example.com

SimonOberzan (Fri, 17 Nov 2017 09:13:26 GMT):
Sorry I meant peer1.org1.example.com and peer2.org1.example.com

Vadim (Fri, 17 Nov 2017 09:17:24 GMT):
can you show your docker-compose.yaml @SimonOberzan

Vadim (Fri, 17 Nov 2017 09:17:24 GMT):
can you show your docker-compose.yaml @SimonOberzan ?

SimonOberzan (Fri, 17 Nov 2017 09:19:19 GMT):
@Vadim peer1: https://pastebin.com/cHeae73X, peer2: https://pastebin.com/yjGdK9AX

SimonOberzan (Fri, 17 Nov 2017 09:19:19 GMT):
@Vadim Sure peer1: https://pastebin.com/cHeae73X, peer2: https://pastebin.com/yjGdK9AX

Vadim (Fri, 17 Nov 2017 09:24:43 GMT):
can you also post configtx.yaml?

yunxi.zhang (Fri, 17 Nov 2017 09:26:26 GMT):
Has joined the channel.

yunxi.zhang (Fri, 17 Nov 2017 09:26:30 GMT):
Hi All, I'm using an AWS Ubuntu 16.04 LTS following Hyperledger Fabric readthedocs tutorial. I followed steps in "Writing Your First Applications". When I ran "node enrollAdmin.js", a eCert and key material is expected to be generated in a hfc-key-store directory, but nothing is generated in this folder, which means the folder is still empty after running the command. I looked into the code in this js file, in lines 54-55, only two arguments are provided, but from the API from this link:https://jimthematrix.github.io/FabricCAClient.html#enroll__anchor, the fabric_ca_client.enroll function should receive three arguments, which means the third argument 'csr' is not given in the js file. Strangely, no error information is shown after running the command, and the only information i got from the terminal is "store path: $mypath/hfc-key-store". Any one knows what the problem occurs?Thanks

SimonOberzan (Fri, 17 Nov 2017 09:27:47 GMT):
@Vadim configtx.yaml: https://pastebin.com/0KuqDtMm

Vadim (Fri, 17 Nov 2017 09:29:16 GMT):
@yunxi.zhang it's because sdk calls this method: https://fabric-sdk-node.github.io/FabricCAServices.html#enroll__anchor

Vadim (Fri, 17 Nov 2017 09:29:44 GMT):
also, the standard keystore path is ~/.hfc-key-store

yunxi.zhang (Fri, 17 Nov 2017 09:31:44 GMT):
@Vadim, thanks for you response. Actually, my .hfc-key-store is in the path of ~/.hfc-key-store. in my instance, the linux username is ubuntu, so this folder is in the /home/ubuntu/.hfc-key-store

Vadim (Fri, 17 Nov 2017 09:32:21 GMT):
@yunxi.zhang ~ is a shortcut for user home folder

Subramanyam (Fri, 17 Nov 2017 09:32:58 GMT):
@Vadim How can we validates endorsement policies in chain code transactions in hyperledger fabric, how we can customise the endorsement policies in chain code transactions. suggest with an example

yunxi.zhang (Fri, 17 Nov 2017 09:33:26 GMT):
@Vadim , i know ~ s a shortcut for user home folder, and my user home folder is /home/ubuntu, so i think .hfc-key-store is in the right place

Vadim (Fri, 17 Nov 2017 09:34:34 GMT):
@SimonOberzan in the configs you posted I don't see any obvious errors. What I would do is I'd stopped all services and removed all artifacts and certs (including ~/.hfc-key-store), then regenerated everything and started the network again.

Vadim (Fri, 17 Nov 2017 09:35:11 GMT):
also, I suppose you run your network across several hosts, are you sure that these artifacts are all the same across all hosts?

Vadim (Fri, 17 Nov 2017 09:36:10 GMT):
@Subramanyam for the validation of the policy you don't need to do anything, it's done automatically by each peer when the tx is committed

Vadim (Fri, 17 Nov 2017 09:38:55 GMT):
@Subramanyam read more about policies here: http://hyperledger-fabric.readthedocs.io/en/latest/policies.html?highlight=NOutOf

Vadim (Fri, 17 Nov 2017 09:38:55 GMT):
@Subramanyam read more about policies here: http://hyperledger-fabric.readthedocs.io/en/latest/policies.html

Vadim (Fri, 17 Nov 2017 09:40:58 GMT):
@Subramanyam also, I don't know about good tutorial for policies in node sdk, but here is some code: https://github.com/hyperledger/fabric-sdk-node/blob/6f7310ccda8648473d0f794e28c5b390ac030480/test/unit/channel.js#L425

SimonOberzan (Fri, 17 Nov 2017 09:41:29 GMT):
@Vadim Yes I use ansible to create a network across many hosts, I generated certs on 1 host than copy it to others. I have checked once more and there are all the certs on all hosts. I have reinstalled everything many times already, and as I said before it sometimes helps so that peer1 works, but I can't make it work for all 3 peers. Will try it once more but I doubt i will see different results.

SimonOberzan (Fri, 17 Nov 2017 09:41:29 GMT):
@Vadim Yes I use ansible to create a network across many hosts, I generate certs on 1 host than copy it to others. I have checked once more and there are all the certs on all hosts. I have reinstalled everything many times already, and as I said before it sometimes helps so that peer1 works, but I can't make it work for all 3 peers. Will try it once more but I doubt i will see different results.

SimonOberzan (Fri, 17 Nov 2017 09:43:46 GMT):
@Vadim It is also weird that there are no errors on any of the peers, just errors on the server

SimonOberzan (Fri, 17 Nov 2017 09:43:46 GMT):
@Vadim It is also weird that there are no errors or warnings on any of the peers, just errors on the server

yunxi.zhang (Fri, 17 Nov 2017 09:46:04 GMT):
@Vadim, since .hfc-key-store is in the right directory, why can't the eCert file be generated in this folder?

Subramanyam (Fri, 17 Nov 2017 09:46:46 GMT):
@Vadim But i want to customise the endorsement policies to validate the transactions. Is there any example. Thanks in advance

Vadim (Fri, 17 Nov 2017 09:52:02 GMT):
@Subramanyam as I said, check the example policies from the node sdk tests: https://github.com/hyperledger/fabric-sdk-node/blob/6f7310ccda8648473d0f794e28c5b390ac030480/test/unit/channel.js#L425

Vadim (Fri, 17 Nov 2017 09:53:51 GMT):
@SimonOberzan try to remove org2 completely and see if that works

Vadim (Fri, 17 Nov 2017 09:54:03 GMT):
leave only everything org1-related

SimonOberzan (Fri, 17 Nov 2017 09:55:17 GMT):
@Vadim Will try that

SimonOberzan (Fri, 17 Nov 2017 09:58:01 GMT):
@Vadim BTW, just completed restarting of the full project and now got that error for ALL peers so that error seems like it is wrong.

Vadim (Fri, 17 Nov 2017 09:58:37 GMT):
what do you mean "error is wrong"?

SimonOberzan (Fri, 17 Nov 2017 10:01:16 GMT):
@Vadim That it seems to report the wrong error. This are the logs on peer0 so you can see that it processes the proposal just fine: https://pastebin.com/90jAxDVe

Vadim (Fri, 17 Nov 2017 10:02:15 GMT):
I checked the peer's code, when it encounters "failed to deserealize", it just returns the error but does not print anything to the log

SimonOberzan (Fri, 17 Nov 2017 10:03:11 GMT):
Oh I see

Vadim (Fri, 17 Nov 2017 10:04:08 GMT):
I think for success you should see "checkSignatureFromCreator info: creator is valid"

SimonOberzan (Fri, 17 Nov 2017 10:05:16 GMT):
@Vadim It is in the logs: 2017-11-17 09:55:28.013 UTC [protoutils] checkSignatureFromCreator -> DEBU 1ee checkSignatureFromCreator info: creator is valid

Vadim (Fri, 17 Nov 2017 10:05:50 GMT):
yes, but you send a long log and probably that was when the proposal was successful

Vadim (Fri, 17 Nov 2017 10:06:29 GMT):
so if you check the code, you either get back "failed to deserealize" or "creator is valid", cannot be both

SimonOberzan (Fri, 17 Nov 2017 10:08:13 GMT):
@Vadim I don't follow. Peer got proposal success so why did the server recieve the error? The logs I posted are all the response of the proposal that was sent from server

Vadim (Fri, 17 Nov 2017 10:08:51 GMT):
do you run peers from org2?

SimonOberzan (Fri, 17 Nov 2017 10:09:21 GMT):
Yes I run them but I only register an user on org1 and join peers from org1

Vadim (Fri, 17 Nov 2017 10:09:34 GMT):
and then you use that config you posted, right?

SimonOberzan (Fri, 17 Nov 2017 10:09:41 GMT):
yes

Vadim (Fri, 17 Nov 2017 10:09:55 GMT):
and when you ssend proposal, do you explicitly specify peers?

SimonOberzan (Fri, 17 Nov 2017 10:10:20 GMT):
```curl -s -X POST \ http://localhost:4000/channels/businesschannel/peers \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.org1.example.com","peer1.org1.example.com","peer2.org1.example.com"] }'```

SimonOberzan (Fri, 17 Nov 2017 10:10:20 GMT):
Yes ```curl -s -X POST \ http://localhost:4000/channels/businesschannel/peers \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.org1.example.com","peer1.org1.example.com","peer2.org1.example.com"] }'```

Vadim (Fri, 17 Nov 2017 10:10:49 GMT):
and in the code?

SimonOberzan (Fri, 17 Nov 2017 10:10:54 GMT):
Oh on the server side i have an array with names so yeah

Vadim (Fri, 17 Nov 2017 10:11:22 GMT):
can you check the logs of org2 peers?

SimonOberzan (Fri, 17 Nov 2017 10:11:28 GMT):
```let join_request = { targets: peers, //using the peer names which only is allowed when a connection profile is loaded txId: client.newTransactionID(true), //get an admin based transactionID block: genesis_block }; logger.debug('Joining channel ' + channel_name); let join_promise = channel.joinChannel(join_request);```

SimonOberzan (Fri, 17 Nov 2017 10:12:05 GMT):
I can't as I have started the project with only 1 org now

Vadim (Fri, 17 Nov 2017 10:12:35 GMT):
how do you determine which peer sends the error message?

Vadim (Fri, 17 Nov 2017 10:14:19 GMT):
also can you try: 1) run in one terminal the logs for peer which you think fails `docker service logs -f ` 2) invoke 3) check which logs you see appeared on that peer

SimonOberzan (Fri, 17 Nov 2017 10:14:42 GMT):
@Vadim Just lost the logs from before, but usually i have a on.data or on.error response and i print the peer url

SimonOberzan (Fri, 17 Nov 2017 11:06:18 GMT):
@Vadim The logs I posted were all from the invoke

SimonOberzan (Fri, 17 Nov 2017 12:39:07 GMT):
@Vadim I have successfully ran it with only 1 org. But the thing is that I have refereced same certificates, so I still have no idea why it expected Org2MSP before. Do you have any idea? I generate the same user on same client and everything..

SimonOberzan (Fri, 17 Nov 2017 12:39:07 GMT):
@Vadim I have successfully ran it with only 1 org. But the thing is that I have refereced same certificates, so I still have no idea why it expected Org2MSP before. Do you have any idea? I generate the same user on a client of the same org and everything..

SimonOberzan (Fri, 17 Nov 2017 12:39:07 GMT):
@Vadim I have successfully ran it with only 1 org. But the thing is that I have refereced same certificates, so I still have no idea why it expected Org2MSP before. Do you have any idea? I generate the same user on a client of the same org and same userContext..

suvpatil (Fri, 17 Nov 2017 13:28:43 GMT):
Has joined the channel.

suvpatil (Fri, 17 Nov 2017 13:32:59 GMT):
Hi ... I am trying to run balance-transfer from fabric-samples repository. But when I put curl command for Register and enroll new users in Organization, got the below error : TypeError: Cannot read property 'name' of undefined at getOrgName (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/app/helper.js:96:19) at Object.getRegisteredUsers (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/app/helper.js:206:27) at /home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/app.js:128:9 at Layer.handle [as handle_request] (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/node_modules/express/lib/router/layer.js:95:5) at next (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/node_modules/express/lib/router/layer.js:95:5) at /home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:335:12) at next (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:275:10)

gentios (Fri, 17 Nov 2017 13:43:57 GMT):
@suvpatil you can simply debug it you have an undefined variable

gentios (Fri, 17 Nov 2017 13:44:03 GMT):
check if you pass the parameters correctly

C.Jason.Phelps (Fri, 17 Nov 2017 14:52:12 GMT):
@bretharrison I am following this to get a simple start up application https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer

C.Jason.Phelps (Fri, 17 Nov 2017 14:52:12 GMT):
@bretharrison I am following this to get a simple start up application https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer ... so the Org1MSP I beleive to be set during the user create call assigning them to organization

bretharrison (Fri, 17 Nov 2017 15:36:36 GMT):
@Subramanyam A channel will contain the organizations that are allowed on the channel. This is part of a config block, which the genesis block (the first block of the ledger) is a config block. When new organizations are added to the channel, as with other changes to the channel configuration, a new config block will be added. A peer will represent an organization by having the organization's credentials. A peer may join multiple channels. The channels the peer is allowed to join must have the organization it represents defined in the channel. The input file to the configtxgen tool will define the organizations of the channel.

C.Jason.Phelps (Fri, 17 Nov 2017 15:58:21 GMT):
I am trying to follow the example here https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer however I get an error at step with Instantiate chaincode ```[2017-11-17 15:54:50.761] [DEBUG] Helper - getClientForOrg - ****** END Org1 Jim [2017-11-17 15:54:50.761] [DEBUG] instantiate-chaincode - Successfully got the fabric client for the organization "Org1" [2017-11-17 15:54:50.761] [DEBUG] Helper - [NetworkConfig101.js]: getChannel - name mychannel [2017-11-17 15:54:50.761] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org1.example.com [2017-11-17 15:54:50.762] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer1.org1.example.com [2017-11-17 15:54:50.762] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org2.example.com [2017-11-17 15:54:50.762] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer1.org2.example.com [2017-11-17 15:54:50.763] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name orderer.example.com [2017-11-17 15:54:50.768] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown at /home/ubuntu/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15 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: no Go files in /chaincode/input/src/github.com/example_cc " at /home/ubuntu/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15 [2017-11-17 15:54:51.281] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-11-17 15:54:51.282] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-11-17 15:54:51.282] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse [2017-11-17 15:54:51.282] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:17664) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:17664) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ``` I would like to get this to work for node implementation but both, node and go, seem to run into same error if nothing else is there a working node example that uses node chaincode?

bretharrison (Fri, 17 Nov 2017 17:49:39 GMT):
@C.Jason.Phelps I just pulled the latest `fabric-samples` and ran the balance-transfer, following the instructions in the `README.md` and using the `./testAPIs.sh -l node` command to use node chaincode and it all works.

C.Jason.Phelps (Fri, 17 Nov 2017 18:30:04 GMT):
@bretharrison did you run through docker compose or terminal scripts

bretharrison (Fri, 17 Nov 2017 18:31:09 GMT):
@C.Jason.Phelps I ran the `./runApp.sh` then ran the `./testAPIs.sh`

bretharrison (Fri, 17 Nov 2017 18:47:42 GMT):
I played with the commands from the readme and I see that some do not work

bretharrison (Fri, 17 Nov 2017 18:47:42 GMT):
@C.Jason.Phelps I played with the commands from the readme and I see that some do not work

bretharrison (Fri, 17 Nov 2017 18:51:58 GMT):
@C.Jason.Phelps would you want to edit the readme and with the correct commands ?

bretharrison (Fri, 17 Nov 2017 18:51:58 GMT):
@C.Jason.Phelps would you want to edit the readme with the correct commands ?

C.Jason.Phelps (Fri, 17 Nov 2017 18:53:19 GMT):
@bretharrison I ran through the using the docker compose and ran into my issues, were you able to get all the command to work correct using the command line execution ?

bretharrison (Fri, 17 Nov 2017 18:54:11 GMT):
@C.Jason.Phelps No I was not able to use all the commands as listed in the Readme.md to work

C.Jason.Phelps (Fri, 17 Nov 2017 18:54:33 GMT):
I will try to the command line execution methos and see if I run into same issues

bretharrison (Fri, 17 Nov 2017 18:55:53 GMT):
@C.Jason.Phelps Just to be clear ... I ran the `./testAPIs.sh` script, which runs the curl commands for you, that is what worked for me

C.Jason.Phelps (Fri, 17 Nov 2017 21:19:06 GMT):
@bretharrison thanks for your help figured out that the step instructions dont include the second user/channel etc... looked through the test command to find the extra command not included in the readme info... repeating testing to verify but worked once already just want to make sure to walk all the way through it

berserkr (Sat, 18 Nov 2017 07:15:35 GMT):
@C.Jason.Phelps could be that the new channel needs a tx file

berserkr (Sat, 18 Nov 2017 07:15:57 GMT):
I had issues before where I could not create a channel, and it was because I did not have the right artifacts created

Amjadnz (Sat, 18 Nov 2017 09:12:17 GMT):
Another question - if anyone has come across ```Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Existing config does not contain element for [Values] /Channel/Consortium but was in the read set ```

thakkarparth007 (Sat, 18 Nov 2017 14:03:19 GMT):
Is there an API to check if the readwrite sets of different endorsements are the same?

thakkarparth007 (Sat, 18 Nov 2017 14:03:19 GMT):
Is there an API to check if the readwrite sets of different endorsements are the same, or to get the readwrite sets? I inspected the ProposalResponse object but it didn't seem to contain that information.

aspyn (Sat, 18 Nov 2017 21:01:09 GMT):
Hi, we are modifying the log statements in balance transfer (just to check that our changes are being made) and are trying to redeploy with our changes, however, our changes do not show up and the original log statements still print. How do we go about making sure the peers use the latest chaincode? We are running this on our own local network

Amjadnz (Sun, 19 Nov 2017 06:27:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SK6dnm3JYdEFBKECY) [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SK6dnm3JYdEFBKECY) Resolved. Just if someone comes across - it is to do with passing channelID with the `-outputBlock` configtxgen command.

ankitkamra (Mon, 20 Nov 2017 09:35:59 GMT):
Has joined the channel.

MartinC (Mon, 20 Nov 2017 10:28:13 GMT):
For those interested in `fabric-sdk-rest` we have updated the master branch. The main changes since the last update is LDAP authentication to the REST server, command line options, and improved test suite coverage. We'd welcome any feedback either through DMs (to @MartinC or @chrispoole) or via JIRA items.

SimonOberzan (Mon, 20 Nov 2017 12:09:04 GMT):
Hi. I have ran the joining of peers successfuly on my channel, with peers using default ports. But when I have changed ports on one of my peer's docker-compose file to "7151:7051" that proposal gets ```[ERROR] Join-Channel - Failed to join all peers to channel. cause:Error: Problem setting up the event hub :Error: Connect Failed``` error. There are no logs on that peer from that proposal. Do I have to change anything else than ports mapping?

SimonOberzan (Mon, 20 Nov 2017 12:11:19 GMT):
I also changed the network-configs to correctly use the new port so the next line after the error was: `[Peer.js]: Received proposal response from: grpc://peer1.org1.example.com:7151 status: Error: Connect Failed`

SimonOberzan (Mon, 20 Nov 2017 12:11:19 GMT):
I have also changed the network-configs to correctly use the new port so the next line after the error was: `[Peer.js]: Received proposal response from: grpc://peer1.org1.example.com:7151 status: Error: Connect Failed`

Lavanya5896 (Mon, 20 Nov 2017 12:14:37 GMT):
Hi,How can we implement custom events in fabric1.0 setup.

Vadim (Mon, 20 Nov 2017 12:18:12 GMT):
@Lavanya5896 https://fabric-sdk-node.github.io/EventHub.html#registerChaincodeEvent

Ferdoran (Mon, 20 Nov 2017 14:44:40 GMT):
Has joined the channel.

Ferdoran (Mon, 20 Nov 2017 14:47:27 GMT):
Hello everybody. I have a problem regarding TLS and GRPCS. When I want to invoke or query with my node-js REST server I get the following error: `PEM encoded certificate is required` In the client.newPeer() function I pass the PEM. So far I have tried the "pem" argument with: a) The path to the pem file b) The content of the pem file c) The content of the pem file including \n after each line d) The content of the pem file including \r\n after each line However I still get the same error as mentioned above.

Vadim (Mon, 20 Nov 2017 14:49:32 GMT):
@Ferdoran here is how it's done in the samples: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/helper.js#L61

Vadim (Mon, 20 Nov 2017 14:49:37 GMT):
are you doing the same?

Vadim (Mon, 20 Nov 2017 14:50:14 GMT):
here is how the cert should look like: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem

Ferdoran (Mon, 20 Nov 2017 14:52:55 GMT):
@Vadim I did it similar to the sample. I tried it with parsing the pem file with fs.readFile or simply copying the content into a variable and give it to the "pem" option in client.newPeer() function

Vadim (Mon, 20 Nov 2017 14:53:14 GMT):
how does your cert look like?

Ferdoran (Mon, 20 Nov 2017 14:54:04 GMT):
@Vadim ```-----BEGIN CERTIFICATE----- MIICBDCCAaqgAwIBAgIQch/lKpffXyMB7CWTEo8D6zAKBggqhkjOPQQDAjBlMQsw CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy YW5jaXNjbzESMBAGA1UEChMJenVyaWNoLmRlMRUwEwYDVQQDEwxjYS56dXJpY2gu ZGUwHhcNMTcxMTIwMTMwMzA0WhcNMjcxMTE4MTMwMzA0WjBUMQswCQYDVQQGEwJV UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEY MBYGA1UEAxMPcGVlcjAuenVyaWNoLmRlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD QgAEQb6cmgAiMWadqSn6oFZpjKr0nCr7GBoXg5sZG6zn50HwxpKPHjoKh6wYcCxT Scw0bKA8Je/jQwgMsHf3QEEoUKNNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB /wQCMAAwKwYDVR0jBCQwIoAgyDTfuSy3omhvDoWR9B1sX8DYhLe77mJV38anLAKR 2EwwCgYIKoZIzj0EAwIDSAAwRQIhAM4uYqCxyEhOvd95N+yhuV9SRU6DoZNxbH/h 6d52VxUhAiB7Ja5qp1ggJRxFNBi8wTjc0+IvbMAG/Ia8VnpU47zYTA== -----END CERTIFICATE----- ```

Vadim (Mon, 20 Nov 2017 14:54:34 GMT):
are you sure the error is coming from that line?

Ferdoran (Mon, 20 Nov 2017 15:01:52 GMT):
@Vadim hmm seems like I passed it wrong. But now I got another problem: ```E1120 16:00:05.578824055 25597 ssl_transport_security.c:592] Could not load any root certificate. E1120 16:00:05.578866267 25597 ssl_transport_security.c:1375] Cannot load server root certificates. E1120 16:00:05.578885127 25597 security_connector.c:855] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E1120 16:00:05.578895947 25597 secure_channel_create.c:112] Failed to create secure subchannel for secure name 'localhost:7051' E1120 16:00:05.578902388 25597 secure_channel_create.c:143] Failed to create subchannel arguments during subchannel creation. error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/roland/dev/blockchain-car-sharing/blockchain-rest-server/node_modules/fabric-client/lib/Peer.js:107:19) at ontimeout (timers.js:478:11) at tryOnTimeout (timers.js:302:5) at Timer.listOnTimeout (timers.js:262:5)```

vu3mmg (Mon, 20 Nov 2017 15:05:54 GMT):
Does node-sdk reuses GRPC connection or will create a new connection each time

vu3mmg (Mon, 20 Nov 2017 15:06:02 GMT):
i was not able to find a mechnism to control the same

Vadim (Mon, 20 Nov 2017 15:06:19 GMT):
@Ferdoran still seems like it's something wrong with your tls setup

vu3mmg (Mon, 20 Nov 2017 15:06:24 GMT):
i am hitting issues related to connection time out, or error if i run the invocation in a loop

Vadim (Mon, 20 Nov 2017 15:06:25 GMT):
@vu3mmg reuses

vu3mmg (Mon, 20 Nov 2017 15:07:53 GMT):
@vadim I am calling send_proposal , followed by a sendTxn each time when i get a messsage from application

Ferdoran (Mon, 20 Nov 2017 15:08:32 GMT):
@Vadim Do you have an idea where the tls setup problem might be ?

vu3mmg (Mon, 20 Nov 2017 15:08:54 GMT):
confused - how to store the context of the connection

Vadim (Mon, 20 Nov 2017 15:09:08 GMT):
@Ferdoran are you running some example?

Vadim (Mon, 20 Nov 2017 15:10:02 GMT):
@vu3mmg afaik you don't need to take care of storing context, it's all managed by grpc

Ferdoran (Mon, 20 Nov 2017 15:10:26 GMT):
@Vadim I copied the first-network example and then customized it (added new Orgs, Peers, renamed them, etc)

Vadim (Mon, 20 Nov 2017 15:10:43 GMT):
so you apparently made a mistake somewhere?

Vadim (Mon, 20 Nov 2017 15:11:32 GMT):
try taking the sample as it is and then modifying it feature by feature and testing whether it works after every modification

vu3mmg (Mon, 20 Nov 2017 15:21:55 GMT):
@vadim channel.sendTransactionProposal(request); is the only way by which i could send a proposal out . Does this means , channel object retains the connection ? Is this the right pattern

vu3mmg (Mon, 20 Nov 2017 15:22:04 GMT):
or am I making some pattern mistake

Ferdoran (Mon, 20 Nov 2017 15:24:33 GMT):
@Vadim It seems like the CLI is not configured properly OR the crypto-config.yaml is not correct. I am passing a not existing path to *CORE_PEER_TLS_CERT_FILE* , *CORE_PEER_TLS_KEY_FILE*, *CORE_PEER_TLS_ROOTCERT_FILE* and *CORE_PEER_MSPCONFIGPATH* environment variables.

Vadim (Mon, 20 Nov 2017 15:25:10 GMT):
why do you pass a non-existing path?

Ferdoran (Mon, 20 Nov 2017 15:29:06 GMT):
@Vadim Because of a typo in the organisation name lol

vu3mmg (Mon, 20 Nov 2017 15:31:22 GMT):
@vadim could you please let me know the possible values of ConnectionOpts for a peer , I was not able to find the right documentation for the same

vu3mmg (Mon, 20 Nov 2017 15:32:04 GMT):
This is in the context of node-sdk

Ferdoran (Mon, 20 Nov 2017 15:32:50 GMT):
@vu3mmg https://fabric-sdk-node.github.io/global.html#ConnectionOpts

vu3mmg (Mon, 20 Nov 2017 15:33:22 GMT):
@Ferdoran it does not have much meaning ful stuff .

Ferdoran (Mon, 20 Nov 2017 15:37:01 GMT):
@vu3mmg *pem* contains the content (as a string) of the corresponding pem certificate. *ssl-target-name-override* contains the hostname of the target (e.g. peer0.example.com)

vu3mmg (Mon, 20 Nov 2017 15:37:30 GMT):
I am looking for some parameter , which will help me to do keep alive or prevent me from establishing a new connection

vu3mmg (Mon, 20 Nov 2017 15:37:41 GMT):
the node-sdk docuemntation is vauge , in that sense

vu3mmg (Mon, 20 Nov 2017 15:38:10 GMT):
it is difficult to derive the right pattern which could be used in production

Vadim (Mon, 20 Nov 2017 15:38:12 GMT):
@vu3mmg it's https://fabric-sdk-node.github.io/global.html#ConnectionOpts and all kinds of grpc options which you can find in grpc documentation

vu3mmg (Mon, 20 Nov 2017 15:38:25 GMT):
"all kinds of grpc options" is the problem for me

vu3mmg (Mon, 20 Nov 2017 15:38:42 GMT):
i searched in nodejs grpc documentation

vu3mmg (Mon, 20 Nov 2017 15:38:47 GMT):
it is not clear there

vu3mmg (Mon, 20 Nov 2017 15:39:35 GMT):
I am cripping because I think I am hitting some basic hidden configuration /usage pattern , with node-sdk , which needs to be done for using the same in production

vu3mmg (Mon, 20 Nov 2017 15:40:15 GMT):
the upperlevel apis does not expose much , or explains how connection reuse is happening

vu3mmg (Mon, 20 Nov 2017 15:40:51 GMT):
the sendProposal is tied to a channel , in which you need to set the targets (the peers)

vu3mmg (Mon, 20 Nov 2017 15:41:04 GMT):
now when I do that , each time i send the Proposal a new connection is being created

vu3mmg (Mon, 20 Nov 2017 15:41:21 GMT):
and after few hundered txns , resources are getting exhausted

vu3mmg (Mon, 20 Nov 2017 15:41:54 GMT):
how does we use this apis beyond "balance transfer application " ?

Ferdoran (Mon, 20 Nov 2017 15:42:29 GMT):
@vu3mmg This is what I found: https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html

vu3mmg (Mon, 20 Nov 2017 15:43:20 GMT):
@Ferdoran in the file Remote.js in the fabric-client , they use other options also .

Vadim (Mon, 20 Nov 2017 15:51:46 GMT):
@vu3mmg for me it always reuses the existing connection

vu3mmg (Mon, 20 Nov 2017 15:52:12 GMT):
@vadim I just put a print in var Endpoint , in Remote.js

vu3mmg (Mon, 20 Nov 2017 15:52:29 GMT):
each time when an invoke is done I can see the print , that End point is created

vu3mmg (Mon, 20 Nov 2017 15:52:57 GMT):
based on your input , i think i might be doing some wrong pattern ....., but I dont know which is the right pattern

vu3mmg (Mon, 20 Nov 2017 15:53:08 GMT):
var Endpoint = class { constructor(url /*string*/ , pem /*string*/ ) { console.log(" ENDPOINT created ")

vu3mmg (Mon, 20 Nov 2017 15:53:28 GMT):
I assume , ideally we need to have only one end point per peer ?

Vadim (Mon, 20 Nov 2017 15:53:49 GMT):
@vu3mmg here are all parameters: https://grpc.io/grpc/core/group__grpc__arg__keys.html

Vadim (Mon, 20 Nov 2017 15:54:17 GMT):
what is Endpoint?

vu3mmg (Mon, 20 Nov 2017 15:54:28 GMT):
It is an object in Remote.js

vu3mmg (Mon, 20 Nov 2017 15:54:34 GMT):
in fabric-client/lib

Vadim (Mon, 20 Nov 2017 15:55:11 GMT):
I don't think it's meant to be used directly

vu3mmg (Mon, 20 Nov 2017 15:55:48 GMT):
i am not using it directly

Vadim (Mon, 20 Nov 2017 15:56:09 GMT):
you posted some code, is it yours?

vu3mmg (Mon, 20 Nov 2017 15:58:00 GMT):
i just put print there . to see how it is called

Vadim (Mon, 20 Nov 2017 15:58:06 GMT):
e.g. you can see how sdk is configured in balance-transfer: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/helper.js

vu3mmg (Mon, 20 Nov 2017 15:58:19 GMT):
i have been debugging helper.js

vu3mmg (Mon, 20 Nov 2017 15:59:00 GMT):
it wont work in load

vu3mmg (Mon, 20 Nov 2017 15:59:05 GMT):
i am pretty sure

Vadim (Mon, 20 Nov 2017 15:59:11 GMT):
you can also use connection profile in https://fabric-sdk-node.github.io/tutorial-network-config.html in v1.1

Vadim (Mon, 20 Nov 2017 15:59:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RLWyTmY8vdnAvvax3) this is most likely related not to how you configure sdk, but how you invoke/query

vu3mmg (Mon, 20 Nov 2017 16:05:20 GMT):
@vadim i went through the doc , but does not explain about the connection management , and when you call channel.sendTransactionProposal() , it will end up in calling the Remote.js and the Endpoint obj there

Ferdoran (Mon, 20 Nov 2017 16:08:29 GMT):
@Vadim [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7a4B4CabQgwBcQEYP) If you look at this error messages it tells that no certificates could be loaded. Does the certificate have to include /r/n or not (e.g. if I put it in a variable) ?

vu3mmg (Mon, 20 Nov 2017 16:10:02 GMT):
@Ferdoran you hit the same issue

vu3mmg (Mon, 20 Nov 2017 16:10:07 GMT):
which i am facing

vu3mmg (Mon, 20 Nov 2017 16:10:10 GMT):
:-)

Ferdoran (Mon, 20 Nov 2017 16:10:35 GMT):
If I use /r/n I get the following error: ```E1120 17:05:14.702494992 2267 ssl_transport_security.c:970] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.```

vu3mmg (Mon, 20 Nov 2017 16:10:55 GMT):
I have been running around about this for weeks

Ferdoran (Mon, 20 Nov 2017 16:11:54 GMT):
@vu3mmg As we can see it is an issue with SSL/TLS. But it seems like nobody knows what the issue is about

vu3mmg (Mon, 20 Nov 2017 16:12:23 GMT):
it is trying to created many connections and certificate loading is failing

vu3mmg (Mon, 20 Nov 2017 16:12:30 GMT):
you can put a print in Endpoint and see

vu3mmg (Mon, 20 Nov 2017 16:12:34 GMT):
in remote.js

Ferdoran (Mon, 20 Nov 2017 16:15:43 GMT):
@vu3mmg It seems to me that there is a certificate problem, not a problem with creating many connections

vu3mmg (Mon, 20 Nov 2017 16:16:05 GMT):
``` E1120 16:00:05.578824055 25597 ssl_transport_security.c:592] Could not load any root certificate. E1120 16:00:05.578866267 25597 ssl_transport_security.c:1375] Cannot load server root certificates.

vu3mmg (Mon, 20 Nov 2017 16:16:06 GMT):
?

Ferdoran (Mon, 20 Nov 2017 16:16:19 GMT):
Exactly

vu3mmg (Mon, 20 Nov 2017 16:16:22 GMT):
but why does this happens randomly

vu3mmg (Mon, 20 Nov 2017 16:16:23 GMT):
?

vu3mmg (Mon, 20 Nov 2017 16:16:32 GMT):
if it is a certificate problem ,

Ferdoran (Mon, 20 Nov 2017 16:16:32 GMT):
It does'nt

vu3mmg (Mon, 20 Nov 2017 16:16:40 GMT):
it should happen for every message

Ferdoran (Mon, 20 Nov 2017 16:16:48 GMT):
It happens for every message

vu3mmg (Mon, 20 Nov 2017 16:16:52 GMT):
i am getting the above when i send 300-400 messages

vu3mmg (Mon, 20 Nov 2017 16:17:02 GMT):
then it will recover

vu3mmg (Mon, 20 Nov 2017 16:17:08 GMT):
and some times connection times out

vu3mmg (Mon, 20 Nov 2017 16:17:37 GMT):
if you find a solution please let me know

Ferdoran (Mon, 20 Nov 2017 16:17:50 GMT):
If I use \r\n in my certs I get: `E1120 17:05:14.702494992 2267 ssl_transport_security.c:970] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.` If I don't use \r\n in my cert I get: ``` E1120 16:00:05.578824055 25597 ssl_transport_security.c:592] Could not load any root certificate. E1120 16:00:05.578866267 25597 ssl_transport_security.c:1375] Cannot load server root certificates.```

Ferdoran (Mon, 20 Nov 2017 16:19:55 GMT):
And if I look at my container logs / console outputs I don't see anything new logged -> It must be some ssl validation / config problem

eetti (Mon, 20 Nov 2017 16:26:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xiukQn6rBkeW2SiQD) @vu3mmg If the version of grpc that you are using is > 1.2.4, you will get this error. fabric-sdk-node with versions >= 1.0.2 uses versions of grpc >=1.3.5 <2.0.0 . And the error comes out in grpc npm packages within that range.

vu3mmg (Tue, 21 Nov 2017 00:22:26 GMT):
@eetti GRPC version is 1.7.0 . please let me know the best version of GRPC to be used

eetti (Tue, 21 Nov 2017 00:24:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=73f6F4NFeTFEAsy2x) @vu3mmg If you use 1.2.4 I am certain you won't get the TLS errors. The error was reported here https://github.com/grpc/grpc/issues/12642

eetti (Tue, 21 Nov 2017 00:24:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=73f6F4NFeTFEAsy2x) @vu3mmg If you use 1.2.4 I am certain you won't get the TLS errors. The error was reported here https://github.com/grpc/grpc/issues/12642 . And there is no resolution to it yet

vu3mmg (Tue, 21 Nov 2017 00:25:05 GMT):
OK, thank you .. I will try that

vu3mmg (Tue, 21 Nov 2017 00:27:26 GMT):
@eetti have you tried to run sendTxnProposal and sendTxn in a continuous manner from node sdk ?

eetti (Tue, 21 Nov 2017 00:27:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HwEgM5rKDttWKuwmu) @vu3mmg Yes I have

vu3mmg (Tue, 21 Nov 2017 00:28:00 GMT):
could you please give me some insights into the load you tried

vu3mmg (Tue, 21 Nov 2017 00:28:24 GMT):
in my case , i am breaking at pretty low loads

vu3mmg (Tue, 21 Nov 2017 00:29:18 GMT):
any idea number of concurrent requests possible with node sdk .

vu3mmg (Tue, 21 Nov 2017 00:29:46 GMT):
whether you were setting targets in each of the new proposals

eetti (Tue, 21 Nov 2017 00:31:33 GMT):
Have you seen this? https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LDD3R86GNePJ5o7Wg

eetti (Tue, 21 Nov 2017 00:31:33 GMT):
@vu3mmg Have you seen this? https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LDD3R86GNePJ5o7Wg

eetti (Tue, 21 Nov 2017 00:32:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RjwNrerTFQ9ho6Jpo) @vu3mmg I tried to many things, I am not certain at this moment what I may have changed but It doesn't complain with the too much load. Also try changing the grpc version first

vu3mmg (Tue, 21 Nov 2017 00:33:14 GMT):
ok

vu3mmg (Tue, 21 Nov 2017 00:47:57 GMT):
@eeti after moving to grpc 1.24 , i am still getting the same error

vu3mmg (Tue, 21 Nov 2017 00:47:57 GMT):
@eetti after moving to grpc 1.24 , i am still getting the same error

vu3mmg (Tue, 21 Nov 2017 00:47:58 GMT):
E1121 06:15:03.216512000 140735762244544 ssl_transport_security.c:583] Could not add root certificate to ssl context. E1121 06:15:03.216609000 140735762244544 ssl_transport_security.c:1375] Cannot load server root certificates. E1121 06:15:03.216654000 140735762244544 security_connector.c:855] Handshaker factory creation failed with TSI_INTERNAL_ERROR. E1121 06:15:03.216665000 140735762244544 secure_channel_create.c:112] Failed to create secure subchannel for secure name 'peer0.org1.example.com:7051' E1121 06:15:03.216672000 140735762244544 secure_channel_create.c:143] Failed to create subchannel arguments during subchannel creation. error: [Peer.js]: sendProposal - timed out after:45000

vu3mmg (Tue, 21 Nov 2017 00:48:15 GMT):
after 900 transactions

vu3mmg (Tue, 21 Nov 2017 00:48:22 GMT):
and then getting a time out

Ryo (Tue, 21 Nov 2017 05:33:09 GMT):
Has joined the channel.

MadhavaReddy (Tue, 21 Nov 2017 06:22:14 GMT):
Has joined the channel.

MadhavaReddy (Tue, 21 Nov 2017 06:22:20 GMT):
Hi All, am trying to run balance transfer and while enrolling user am getting below error can you please help me to fix the issue [2017-11-21 04:45:38.829] [ERROR] Helper - Failed to get registered user: Jim with error: Error: Network configuration is missing this client's organization and certificate authority [2017-11-21 04:45:38.829] [DEBUG] SampleWebApp - Successfully returned from registering the username Jim for organization Org1

SimonOberzan (Tue, 21 Nov 2017 07:26:12 GMT):
Hi. I have joined the channel successfully by opening default ports in docker-compose file like "7051:7051", but when I changed ports to "8051:7051" I have recieved the Connect Failed error. In addition to peer's docker-compose file I have also changed network-config file to the new port. What did I forget here? This is my docker-compose for the peer: https://pastebin.com/iGTZA1H1

SimonOberzan (Tue, 21 Nov 2017 07:26:12 GMT):
Hi. I have joined the channel successfully by opening default ports in docker-compose file like "7051:7051", but when I changed ports to "7151:7051" I have recieved the Connect Failed error. In addition to peer's docker-compose file I have also changed network-config file to the new port. What did I forget here? This is my docker-compose for the peer: https://pastebin.com/iGTZA1H1

SimonOberzan (Tue, 21 Nov 2017 07:26:12 GMT):
Hi. I have joined the channel successfully by opening default ports in docker-compose file like "7051:7051", but when I changed ports to "7151:7051" I have recieved the Connect Failed error. In addition to peer's docker-compose file I have also changed network-config file to the new ports. What did I forget here? This is my docker-compose for the peer: https://pastebin.com/iGTZA1H1

SimonOberzan (Tue, 21 Nov 2017 08:11:18 GMT):
@Vadim Do you have any idea about my problem?

Vadim (Tue, 21 Nov 2017 08:16:24 GMT):
@SimonOberzan I need your `docker ps` output and logs from your app

SimonOberzan (Tue, 21 Nov 2017 08:18:51 GMT):
@Vadim Logs: https://pastebin.com/GD7QuuES, docker ps on the failing peer's host: `6efd29134fc9 hyperledger/fabric-peer:x86_64-1.1.0-preview "peer node start" 15 minutes ago Up 15 minutes 7050/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:7151->7051/tcp, 0.0.0.0:7153->7053/tcp blockchainX_peer1-org1`

SimonOberzan (Tue, 21 Nov 2017 08:18:51 GMT):
@Vadim Logs: https://pastebin.com/GD7QuuES, docker ps on the failing peer's host: `6efd29134fc9 hyperledger/fabric-peer:x86_64-1.1.0-preview "peer node start" 15 minutes ago Up 15 minutes 7050/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:7151->7051/tcp, 0.0.0.0:7153->7053/tcp blockchainX_peer1-org1`

SimonOberzan (Tue, 21 Nov 2017 08:18:51 GMT):
@Vadim Logs: https://pastebin.com/GD7QuuES, docker ps on the failing peer's host: `6efd29134fc9 hyperledger/fabric-peer:x86_64-1.1.0-preview "peer node start" 15 minutes ago Up 15 minutes 7050/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:7151->7051/tcp, 0.0.0.0:7153->7053/tcp blockchainX_peer1-org1`

Vadim (Tue, 21 Nov 2017 08:20:35 GMT):
so you have only one peer running?

SimonOberzan (Tue, 21 Nov 2017 08:27:29 GMT):
@Vadim No 3 host, each with 1 peer. 2 peers use default ports (7051 & 7053) and work fine, but on the peer1.org1.example.com i have changed the ports to 7151 & 7153 and it returns the Connect failed error.

Vadim (Tue, 21 Nov 2017 08:29:07 GMT):
your app is also running in some container?

SimonOberzan (Tue, 21 Nov 2017 08:29:48 GMT):
my client? Yes

SimonOberzan (Tue, 21 Nov 2017 08:29:48 GMT):
my client? Yes. It only has opened port 4000:4000 if that matters

Vadim (Tue, 21 Nov 2017 08:32:39 GMT):
and if you revert to 7051/7053, everything works?

SimonOberzan (Tue, 21 Nov 2017 08:32:44 GMT):
Yes

Vadim (Tue, 21 Nov 2017 08:33:04 GMT):
perhaps these ports are taken by something else running on your host?

SimonOberzan (Tue, 21 Nov 2017 08:33:15 GMT):
They are not

Vadim (Tue, 21 Nov 2017 08:33:23 GMT):
can you try with 10051/10053?

SimonOberzan (Tue, 21 Nov 2017 08:33:39 GMT):
Ok, sure. It will take some time

Vadim (Tue, 21 Nov 2017 08:34:34 GMT):
I also don't really see in the app logs which endpoint the eventhub is trying to use

Vadim (Tue, 21 Nov 2017 08:35:43 GMT):
however, it's not only EventHub, it's a Peer too: `debug: [Peer.js]: Received proposal response from: grpc://peer1.org1.example.com:7151 status: Error: Connect Failed`

SimonOberzan (Tue, 21 Nov 2017 08:35:51 GMT):
For failing peer: https://pastebin.com/xZ7HnrMB

SimonOberzan (Tue, 21 Nov 2017 08:36:17 GMT):
Yes, there are no logs on that peer, from that proposal

SimonOberzan (Tue, 21 Nov 2017 08:38:13 GMT):
My network-config: https://pastebin.com/GR0mv5hR

Vadim (Tue, 21 Nov 2017 08:38:52 GMT):
well network config is correct, it just cannot connect to peer

Vadim (Tue, 21 Nov 2017 08:39:03 GMT):
it's clear from the logs you posted

SimonOberzan (Tue, 21 Nov 2017 08:46:34 GMT):
@Vadim Changing ports to 10051 and 10053 didn't make any difference

Vadim (Tue, 21 Nov 2017 08:47:26 GMT):
app and peer are running on the same host?

SimonOberzan (Tue, 21 Nov 2017 08:48:39 GMT):
Host 1: peer0, ca-org1, orderer, client Host 2: peer1 (the failing one) Host 3: peer2

Vadim (Tue, 21 Nov 2017 08:49:17 GMT):
and if you change ports on peer0, does that work?

SimonOberzan (Tue, 21 Nov 2017 08:49:25 GMT):
Will try

SimonOberzan (Tue, 21 Nov 2017 09:02:08 GMT):
@Vadim Still no difference

Vadim (Tue, 21 Nov 2017 09:02:25 GMT):
you mean you cannot connect to peer0?

Vadim (Tue, 21 Nov 2017 09:02:25 GMT):
you mean you cannot connect to peer0 if you change its ports?

SimonOberzan (Tue, 21 Nov 2017 09:02:34 GMT):
Yeah

SimonOberzan (Tue, 21 Nov 2017 09:03:21 GMT):
Yeah, I changed the ports ont he peer on the same host as the client

SimonOberzan (Tue, 21 Nov 2017 09:03:21 GMT):
Yeah, I changed the ports on the peer which is on the same host as the client

SimonOberzan (Tue, 21 Nov 2017 09:03:21 GMT):
Yeah, I changed the ports on the peer which is on the same host as the client, and it still cannot connect

Vadim (Tue, 21 Nov 2017 09:11:34 GMT):
I have no idea

SimonOberzan (Tue, 21 Nov 2017 10:06:05 GMT):
@Vadim Thanks anyway

MadhavaReddy (Tue, 21 Nov 2017 12:26:56 GMT):
Hi All, am using balance transfer example and would like to see all blocks in a particular channel and transaction count

MadhavaReddy (Tue, 21 Nov 2017 12:27:48 GMT):
can you please refer some example node sdk code to get these details

Vadim (Tue, 21 Nov 2017 12:29:32 GMT):
@MadhavaReddy https://fabric-sdk-node.github.io/Channel.html#queryInfo__anchor to get blockchain height and then https://fabric-sdk-node.github.io/Channel.html#queryBlock__anchor to query individual blocks

MadhavaReddy (Tue, 21 Nov 2017 12:32:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KRSZ8Maa2qKzdqssD) @Vadim Thank you and also help me with streaming all ledger/block details, basically am trying to use blockchain explorer but its not working from other chaneel/chaincode so am planning to create my own services

MadhavaReddy (Tue, 21 Nov 2017 13:20:02 GMT):
Hll what would be the input parameters for "BlockchainInfo" method, its not clear in the documentation

Vadim (Tue, 21 Nov 2017 13:23:39 GMT):
where do you see this method?

MadhavaReddy (Tue, 21 Nov 2017 13:27:03 GMT):
https://fabric-sdk-node.github.io/global.html#BlockchainInfo__anchor

Vadim (Tue, 21 Nov 2017 13:27:49 GMT):
it's not a method, it's an object which is returned in the promise callback when queryInfo() promise is resolved

Vadim (Tue, 21 Nov 2017 13:28:48 GMT):
´´´ channel.queryInfo() .then(blockchainInfo => console.log('bc height', blockchainInfo.height)) .catch(err => console.log(err));

Vadim (Tue, 21 Nov 2017 13:28:48 GMT):
``` channel.queryInfo() .then(blockchainInfo => console.log('bc height', blockchainInfo.height)) .catch(err => console.log(err));

MadhavaReddy (Tue, 21 Nov 2017 13:31:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JQicKkyR3pmwzHwMA) @Vadim ok basically need to call queryInfo(target, useAdmin) to get the current height of the chaneel , am i correct

Vadim (Tue, 21 Nov 2017 13:32:16 GMT):
I just posted a code

MadhavaReddy (Tue, 21 Nov 2017 13:35:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2BZ5gkrwGwnf6iq3q) @Vadim Thank you

MadhavaReddy (Tue, 21 Nov 2017 13:40:45 GMT):
Vadim, can you please help with streaming on blockchain info also

Vadim (Tue, 21 Nov 2017 13:41:25 GMT):
what do you mean by that?

MadhavaReddy (Tue, 21 Nov 2017 13:46:29 GMT):
reading all blocks from genesis block

MadhavaReddy (Tue, 21 Nov 2017 13:48:23 GMT):
in 0.6 there was an rest API which will show all block details, i know that same is not available in 1.* but through websocket we can see all block details

MartinC (Tue, 21 Nov 2017 13:57:07 GMT):
I am working on the Hyperledger project `fabric-sdk-rest` which provides a REST API server that allows individual blocks to be queried. If you take a look I'd be happy to have feedback on the current capabilities.

MartinC (Tue, 21 Nov 2017 13:59:09 GMT):
If blockchain-explorer is supposed to do what you want but doesn't have you considered raising a JIRA requirement to get it added?

MadhavaReddy (Tue, 21 Nov 2017 14:00:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XQpgdBBBKCYerwc7F) @MartinC can you please share the project details

MartinC (Tue, 21 Nov 2017 14:01:14 GMT):
The github mirror is here https://github.com/hyperledger/fabric-sdk-rest

MartinC (Tue, 21 Nov 2017 14:02:15 GMT):
We only have a few items in JIRA under component fabric-sdk-node but with a label fabric-sdk-rest

SimonOberzan (Tue, 21 Nov 2017 14:16:11 GMT):
@Vadim I have logged tcpdump on peer0(success): https://pastebin.com/cNgEarw7, peer1(fail): https://pastebin.com/trmMa4u5, client: https://pastebin.com/qNaEBHur. Does it maybe give you any hint?

SimonOberzan (Tue, 21 Nov 2017 14:16:11 GMT):
@Vadim I have logged tcpdump on peer0(success): https://pastebin.com/cNgEarw7, peer1(fail): https://pastebin.com/trmMa4u5, client: https://pastebin.com/qNaEBHur. Does it maybe give you any hint on what may be wrong here?

MartinC (Tue, 21 Nov 2017 14:28:16 GMT):
@SimonOberzan The client log (I may be misreading it) looks like it is trying to use port 8053 for peer1 `blockchainX_peer1-org1.blockchainX.8053` From your comments above I think you have it configured on different port.

SimonOberzan (Tue, 21 Nov 2017 14:29:32 GMT):
@MartinC What I'm trying to do here is to map a port like "8051:7051" instead of using default "7051:7051" which works in my case.

MartinC (Tue, 21 Nov 2017 14:30:13 GMT):
Sorry, I should have read the peer1 log too

SimonOberzan (Tue, 21 Nov 2017 14:30:17 GMT):
Everything seems to be configured like it should be but I just keep getting connection refused

SimonOberzan (Tue, 21 Nov 2017 14:30:17 GMT):
Everything seems to be configured like it should be but I just keep getting connection failed

SimonOberzan (Tue, 21 Nov 2017 14:30:17 GMT):
Everything seems to be configured correctly but I just keep getting connection failed

MartinC (Tue, 21 Nov 2017 14:38:29 GMT):
I've not played with the 1.1 sdk with the connection profile yet so this could be a red herring, but I notice that peer1 has `eventSource: false` and the nnn53 port is typically used for events. Given that peer2 also has that config I doubt it is that but thought I'd mention it just in case

SimonOberzan (Tue, 21 Nov 2017 14:39:55 GMT):
Yeah that doesn't seem likely but I'll try as I have no more ideas

SimonOberzan (Tue, 21 Nov 2017 14:53:02 GMT):
@MartinC Nope, no difference

Dpkkmr (Tue, 21 Nov 2017 14:53:58 GMT):
Hi All, I am observing inconsistent behaviour when invoking a transaction. When I invoke a tranasaction some times transaction returns an error message however on try of same request, it works second time. I am curious to know the root cause of this error message and how to avoid it? [2017-11-16 09:59:43.359] [INFO] invoke-chaincode - transaction proposal was good [2017-11-16 09:59:43.359] [DEBUG] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - "", e���p����nt signature: 0D #O�3سi&����b��NP�

GirijaShankarMishra (Tue, 21 Nov 2017 15:07:48 GMT):
Hey Guys, I am getting the following issues on redHat 7.2 while invoking a batch of transaction the first transaction fails for that batch error: Failed to order the transaction. Error code: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... After that all the transactions for that batch are invoked successfully.This works fine while running on ubuntu 16.04 We are using hyperledger fabric v1 and using swarm network to deploy the chaincode. Thank you

MartinC (Tue, 21 Nov 2017 15:15:08 GMT):
@SimonOberzan Is your client running inside the same Docker network as the peers? If so isn't the mapped port only used to connect from outside that network to a container inside?

MartinC (Tue, 21 Nov 2017 15:15:08 GMT):
@SimonOberzan Is your client running inside the same Docker network as the peers? If so isn't the mapped port only used to connect from outside that network to a container inside?

MartinC (Tue, 21 Nov 2017 15:15:08 GMT):
@SimonOberzan Is your client running inside the same Docker network as the peers? If so isn't the mapped port only used to connect from outside that network to a container inside? So from inside the network you use the hostname and original port.

SimonOberzan (Tue, 21 Nov 2017 15:22:31 GMT):
@MartinC I don't compleately understand how it works, but I thought of that but didn't find a solution. I want to have a peer availible from outside my network and also from the inside. So it should work if I set docker-compose `ports` to "8051:7051" and also exposed "7051" so network participants could access it. But when I specified both `ports` and `expose` to the same port, the expose got ignored so only 0.0.0.0:8051 -> 7051 was set. Do you know how I should go abot this?

MartinC (Tue, 21 Nov 2017 15:24:34 GMT):
The way you have it now is fine, outside the network a client should use 0.0.0.0:8051 to connect, inside the network it should use peer1.org1.example.com:7051

MartinC (Tue, 21 Nov 2017 15:24:54 GMT):
That does assume the client outside the network is running on the same machine as the docker network

SimonOberzan (Tue, 21 Nov 2017 15:25:51 GMT):
so if i set 8051:7051 at the same time I expose 7051 to other participants in the docker network?

MartinC (Tue, 21 Nov 2017 15:26:46 GMT):
I believe so.

Vadim (Tue, 21 Nov 2017 15:28:06 GMT):
@SimonOberzan MartinC is right, when you write "8051:7051" you tell docker to expose port 7051 from container as port 8051 *on the host*, so within docker network it is still 7051

SimonOberzan (Tue, 21 Nov 2017 15:29:27 GMT):
Oh didn't know that. That seem like it might solve my problem.

SimonOberzan (Tue, 21 Nov 2017 15:29:27 GMT):
Oh didn't know that. That seems like it might solve my problem.

SimonOberzan (Tue, 21 Nov 2017 15:41:41 GMT):
@MartinC @Vadim It works now. Thank you both very much!

lkolisko (Tue, 21 Nov 2017 16:54:44 GMT):
Has joined the channel.

yingmsky (Wed, 22 Nov 2017 07:19:24 GMT):
Has joined the channel.

MohammadObaid (Wed, 22 Nov 2017 09:05:49 GMT):
Hi @jimthematrix and others I have deployed network on aws and configure aws network config file according to my network but when I run user enroll query I am getting following error

MohammadObaid (Wed, 22 Nov 2017 09:06:13 GMT):

connectionrefused.png

Vadim (Wed, 22 Nov 2017 09:07:22 GMT):
is your CA running on the localhost? That seems suspicious.

MohammadObaid (Wed, 22 Nov 2017 09:19:23 GMT):
@Vadim Yeah. Actually I cloned that node sdk on particular aws instance so ca still reside on local host . Here is my updated network config file https://gist.github.com/mohammadobaid1/a1b4e0c1702bf480233a682201a30e1b

Vadim (Wed, 22 Nov 2017 09:20:03 GMT):
config is correct, just check there is really a CA running

MohammadObaid (Wed, 22 Nov 2017 09:21:49 GMT):

ca.png

MohammadObaid (Wed, 22 Nov 2017 09:21:53 GMT):
Following containers are running

Vadim (Wed, 22 Nov 2017 09:30:14 GMT):
@MohammadObaid does not look like CA's port is exposed on host

MohammadObaid (Wed, 22 Nov 2017 09:31:40 GMT):
I suspect too What command should I run?

Vadim (Wed, 22 Nov 2017 09:33:41 GMT):
how did you launch your network?

MohammadObaid (Wed, 22 Nov 2017 09:35:33 GMT):
I launch using ansible scriptt https://github.com/hyperledger/cello/tree/master/src/agent/ansible . When I do `ping 127.0.0.1 7054` I didnt get any reply back. If port is opened it should get right?

Vadim (Wed, 22 Nov 2017 09:40:40 GMT):
no, ping cannot be used to test if the port is open or not

MohammadObaid (Wed, 22 Nov 2017 09:43:59 GMT):
Hmm . So how can I diagnose this? Any trick or workaround?

Vadim (Wed, 22 Nov 2017 09:46:38 GMT):
`nc -z localhost 7054`

MohammadObaid (Wed, 22 Nov 2017 09:48:55 GMT):
Nothing happend neither any logs or output

Vadim (Wed, 22 Nov 2017 09:49:19 GMT):
nc -z localhost 7054; echo $?

Vadim (Wed, 22 Nov 2017 09:49:26 GMT):
if it's non-zero, port is closed

MohammadObaid (Wed, 22 Nov 2017 09:50:47 GMT):

notzero.png

Vadim (Wed, 22 Nov 2017 09:52:17 GMT):
try copy-pasting my message correctly

MohammadObaid (Wed, 22 Nov 2017 09:56:39 GMT):
Yeah same output . Another thing I noticed that when I do `docker inspect ca1st-orgf` and view network setting it shows port is not mapped. Also if you can take a look at this ansible file https://github.com/hyperledger/cello/blob/master/src/agent/ansible/roles/deploy_compose/fabricsetup/templates/ca-compose.j2 there is no command which can mapped port . May be that's the issue

Vadim (Wed, 22 Nov 2017 09:57:15 GMT):
what do you mean same output?

Vadim (Wed, 22 Nov 2017 09:57:24 GMT):
you have to run `nc -z localhost 7054; echo $?`

Vadim (Wed, 22 Nov 2017 09:57:33 GMT):
"?" is also a part of the command

Vadim (Wed, 22 Nov 2017 09:58:17 GMT):
there is no command and it can be the issue I guess

MohammadObaid (Wed, 22 Nov 2017 09:58:22 GMT):
yeah sorry I got 1

Vadim (Wed, 22 Nov 2017 09:58:32 GMT):
so the port is closed

Vadim (Wed, 22 Nov 2017 09:59:02 GMT):
should be like this I guess: https://github.com/hyperledger/fabric/blob/release/examples/e2e_cli/docker-compose-e2e.yaml#L18

MohammadObaid (Wed, 22 Nov 2017 09:59:45 GMT):
Hmm. Thanks. :) I will edit that file and will try again

SimonOberzan (Wed, 22 Nov 2017 15:25:53 GMT):
Hi. I have encountered another problem. I run the following configuration: Host1: peer0.org1(7051->7051 & 7053->7053), peer0.org2, ca-org1, client docker ps: ```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 42b2bbae1f72 blockchainx_server "bash -c 'tcpdump ..." 8 minutes ago Up 8 minutes 0.0.0.0:4000->4000/tcp blockchainX_server 9df198dcb123 hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 12 minutes ago Up 12 minutes 7050/tcp, 0.0.0.0:7051->7051/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:7053->7053/tcp blockchainX_peer0-org1 5087b322878a hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 12 minutes ago Up 12 minutes 7050-7059/tcp blockchainX_peer0-org2 3a32c5a5de66 hyperledger/fabric-ca:x86_64-1.1.0-preview "fabric-ca-server ..." 14 minutes ago Up 14 minutes 7054/tcp blockchainX_ca-org1 bf5141da2869 hyperledger/fabric-orderer:x86_64-1.1.0-preview "orderer start" 14 minutes ago Up 14 minutes 7050/tcp blockchainX_orderer 352291bd485d hyperledger/fabric-tools:x86_64-1.1.0-preview "bash -c 'cat /cry..." 16 minutes ago Up 16 minutes blockchainX_cli ``` Host2: peer1.org1(8051->7051 & 8053->7053), peer1.org2, ca-org2 docker ps: ```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1431e68941fa hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 7 minutes ago Up 7 minutes 7050/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp blockchainX_peer1-org1 51d52c44285d hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 7 minutes ago Up 7 minutes 7050-7059/tcp blockchainX_peer1-org2 5d52edad2fe5 hyperledger/fabric-ca:x86_64-1.1.0-preview "fabric-ca-server ..." 9 minutes ago Up 9 minutes 7054/tcp blockchainX_ca-org2``` Host3: peer2.org1 The client error: http://prntscr.com/hdta35. The results are not consistant as in the last 3 times I have ran my project, it has worked once. I believe the problem has to do something with ports, but I can't figure out what is wrong. The tcpdump show some weird behavior: - client: https://pastebin.com/y4CgfHjk - peer0.org1: https://pastebin.com/nYHQ93Tu - peer1.org1: https://pastebin.com/p0VTtz8H - peer0.org2: https://pastebin.com/nTq6ugwt - peer1.org2: https://pastebin.com/nvavjTRH Why is client sending proposal to peer0-org2 (logs: https://pastebin.com/iC4f3Rru)? Also peer2.org1 logs: https://pastebin.com/u9G9YmW4. Logs on peer0.org1 and peer1.org1 look OK.

SimonOberzan (Wed, 22 Nov 2017 15:25:53 GMT):
Hi. I have encountered another problem. I run the following configuration: Host1: peer0.org1(7051->7051 & 7053->7053), peer0.org2, ca-org1, client docker ps: ```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 42b2bbae1f72 blockchainx_server "bash -c 'tcpdump ..." 8 minutes ago Up 8 minutes 0.0.0.0:4000->4000/tcp blockchainX_server 9df198dcb123 hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 12 minutes ago Up 12 minutes 7050/tcp, 0.0.0.0:7051->7051/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:7053->7053/tcp blockchainX_peer0-org1 5087b322878a hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 12 minutes ago Up 12 minutes 7050-7059/tcp blockchainX_peer0-org2 3a32c5a5de66 hyperledger/fabric-ca:x86_64-1.1.0-preview "fabric-ca-server ..." 14 minutes ago Up 14 minutes 7054/tcp blockchainX_ca-org1 bf5141da2869 hyperledger/fabric-orderer:x86_64-1.1.0-preview "orderer start" 14 minutes ago Up 14 minutes 7050/tcp blockchainX_orderer 352291bd485d hyperledger/fabric-tools:x86_64-1.1.0-preview "bash -c 'cat /cry..." 16 minutes ago Up 16 minutes blockchainX_cli ``` Host2: peer1.org1(8051->7051 & 8053->7053), peer1.org2, ca-org2 docker ps: ```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1431e68941fa hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 7 minutes ago Up 7 minutes 7050/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp blockchainX_peer1-org1 51d52c44285d hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 7 minutes ago Up 7 minutes 7050-7059/tcp blockchainX_peer1-org2 5d52edad2fe5 hyperledger/fabric-ca:x86_64-1.1.0-preview "fabric-ca-server ..." 9 minutes ago Up 9 minutes 7054/tcp blockchainX_ca-org2``` Host3: peer2.org1 The client error: http://prntscr.com/hdta35. The results are not consistant as in the last 3 times I have ran my project, it has worked once. I believe the problem has to do something with ports, but I can't figure out what is wrong. The tcpdump show some weird behavior: - client: https://pastebin.com/y4CgfHjk - peer0.org1: https://pastebin.com/nYHQ93Tu - peer1.org1: https://pastebin.com/p0VTtz8H - peer0.org2: https://pastebin.com/nTq6ugwt - peer1.org2: https://pastebin.com/nvavjTRH Why is client sending proposal to peer0-org2 (logs: https://pastebin.com/iC4f3Rru)? Also peer2.org1 logs: https://pastebin.com/u9G9YmW4. Logs on peer0.org1 and peer1.org1 look OK. @Vadim @MartinC do you have any idea about this?

SimonOberzan (Wed, 22 Nov 2017 15:25:53 GMT):
Hi. I have encountered another problem. I run the following configuration: Host1: peer0.org1(7051->7051 & 7053->7053), peer0.org2, ca-org1, client docker ps: ```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 42b2bbae1f72 blockchainx_server "bash -c 'tcpdump ..." 8 minutes ago Up 8 minutes 0.0.0.0:4000->4000/tcp blockchainX_server 9df198dcb123 hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 12 minutes ago Up 12 minutes 7050/tcp, 0.0.0.0:7051->7051/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:7053->7053/tcp blockchainX_peer0-org1 5087b322878a hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 12 minutes ago Up 12 minutes 7050-7059/tcp blockchainX_peer0-org2 3a32c5a5de66 hyperledger/fabric-ca:x86_64-1.1.0-preview "fabric-ca-server ..." 14 minutes ago Up 14 minutes 7054/tcp blockchainX_ca-org1 bf5141da2869 hyperledger/fabric-orderer:x86_64-1.1.0-preview "orderer start" 14 minutes ago Up 14 minutes 7050/tcp blockchainX_orderer 352291bd485d hyperledger/fabric-tools:x86_64-1.1.0-preview "bash -c 'cat /cry..." 16 minutes ago Up 16 minutes blockchainX_cli ``` Host2: peer1.org1(8051->7051 & 8053->7053), peer1.org2, ca-org2 docker ps: ```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1431e68941fa hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 7 minutes ago Up 7 minutes 7050/tcp, 7052/tcp, 7054-7059/tcp, 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp blockchainX_peer1-org1 51d52c44285d hyperledger/fabric-peer:x86_64-1.1.0-preview "bash -c 'apt-get ..." 7 minutes ago Up 7 minutes 7050-7059/tcp blockchainX_peer1-org2 5d52edad2fe5 hyperledger/fabric-ca:x86_64-1.1.0-preview "fabric-ca-server ..." 9 minutes ago Up 9 minutes 7054/tcp blockchainX_ca-org2``` Host3: peer2.org1 The client error: http://prntscr.com/hdta35. Before the proposals are sent there are printed the right 3 peers, but the tcpdump seems to not send proposals to those peers. The results are not consistant as in the last 3 times I have ran my project, it has worked once. I believe the problem has to do something with ports, but I can't figure out what is wrong. The tcpdump show some weird behavior: - client: https://pastebin.com/y4CgfHjk - peer0.org1: https://pastebin.com/nYHQ93Tu - peer1.org1: https://pastebin.com/p0VTtz8H - peer0.org2: https://pastebin.com/nTq6ugwt - peer1.org2: https://pastebin.com/nvavjTRH Why is client sending proposal to peer0-org2 (logs: https://pastebin.com/iC4f3Rru)? Also peer2.org1 logs: https://pastebin.com/u9G9YmW4. Logs on peer0.org1 and peer1.org1 look OK. @Vadim @MartinC do you have any idea about this?

MartinC (Wed, 22 Nov 2017 15:40:13 GMT):
@SimonOberzan the client error in the first link appears to be to do with the eventhub receiving events it can't handle.

SimonOberzan (Wed, 22 Nov 2017 15:41:39 GMT):
Yeah but think that error comes from peer0.org2, as you can see in the log

SimonOberzan (Wed, 22 Nov 2017 15:43:05 GMT):
At least that is the only peer that has the same error in its log as the client.

MartinC (Wed, 22 Nov 2017 15:44:06 GMT):
I haven't played with events but as I understand it the client configures which peers to connect to to receive events separately from which peers it targets for proposals.

SimonOberzan (Wed, 22 Nov 2017 15:44:09 GMT):
Also I don't understand why client starts communicating with peer0.org2 as soon as proposals get sent

MartinC (Wed, 22 Nov 2017 15:50:09 GMT):
Does it happen the same way every time? I would guess that peer0.org2 has just sent an event indicating it has accepted a new block, but the client is not configured to handle events from org2 and bombs out. I would suggest reviewing your config to see why it connects to that peer for events.

SimonOberzan (Wed, 22 Nov 2017 15:51:43 GMT):
No last time it acctualy worked, and all 3 peers succefully joined the channel, but that time the peer1.org1 got the error about deserializing, but it seems it didn't matter to client.

SimonOberzan (Wed, 22 Nov 2017 15:51:43 GMT):
No last time I ran it, it actualy worked, and all 3 peers succefully joined the channel, but that time the peer1.org1 got the error about deserializing, but it seems it didn't matter to client.

SimonOberzan (Wed, 22 Nov 2017 15:53:51 GMT):
And I have all the peers' eventSource set to true (in network-config). Might this be the problem?

SimonOberzan (Wed, 22 Nov 2017 15:59:11 GMT):
Also here I'm only joining peers from Org1 to the channel

MartinC (Wed, 22 Nov 2017 16:05:39 GMT):
Perhaps.

MartinC (Wed, 22 Nov 2017 16:06:22 GMT):
I've not used the 1.1 SDK either but I know pre-1.1 that I had to call the initialize() method on a channel so that the client could verify messages from other orgs, it might be an issue like that in your client?

SimonOberzan (Wed, 22 Nov 2017 16:08:13 GMT):
I was thinking there is a problem because I'm only joining peers from org1 but also having eventSource on peers from org2. I will try changing that tommorow.

SimonOberzan (Wed, 22 Nov 2017 16:08:13 GMT):
I was thinking there might be a problem because I'm only joining peers from org1 but also having eventSource on peers from org2. I will try changing that tommorow.

MohammadObaid (Wed, 22 Nov 2017 17:17:31 GMT):
Hi . when I do enroll user I am getting this error . Any trick to solve this

MohammadObaid (Wed, 22 Nov 2017 17:17:57 GMT):

enrollerror.png

MohammadObaid (Wed, 22 Nov 2017 17:27:13 GMT):
I am unable to understand what causing this problem. On ca logs I got nothing

MohammadObaid (Wed, 22 Nov 2017 18:25:22 GMT):
In production environment or in deployment normally there is no channel artifacts folder rather everything is mounted inside docker container like msp's channel configuration etc. In such cases how we construct network-config file or should channela artifacts folder be present in host os?

CodeReaper (Thu, 23 Nov 2017 04:44:09 GMT):
Hey, I was running my POC with fabric 1.0.0 or 1.0.1 versions, but lately when i installed the latest fabric-client and fabric-ca-client modules(along with grpc) it started giving me handshake errors. Hinting something like the domain name where my docker containers are running dont match with the service names such as peer1.or1.example.com. When i downgraded my npm modules it worked again just fine. Is this by design? If yes then why??

jaswanth (Thu, 23 Nov 2017 04:51:18 GMT):
Hi all , i have problems getting endorsement certificate, when i enroll first time using the id,secret able to get the enrollment certificate, but when i enroll him again (` Successfully loaded member from persistence ` ) here i tried to get certificate , but it says ` no data in BIO. ` .Any help here

jaswanth (Thu, 23 Nov 2017 04:51:18 GMT):
Hi all , i have problems getting endorsement certificate, when i enroll first time using the id,secret able to get the enrollment certificate, but when i enroll him again (` Successfully loaded member from persistence ` ) here i tried to get certificate , but it says ` no data in BIO. ` .Any help here

jaswanth (Thu, 23 Nov 2017 04:51:18 GMT):
Hi all , i have problems getting endorsement certificate, when i enroll first time using the id,secret able to get the enrollment certificate, but when i enroll him again ( ` Successfully loaded member from persistence ` ) here i tried to get certificate , but it says ` no data in BIO. ` .Any help here

SimonOberzan (Thu, 23 Nov 2017 07:59:13 GMT):
@Vadim @MartinC I have reran my project with all peers having ports exposed only to the network and only peer0.org1 having `eventSource: true`. Yet is still get `Error: Problem setting up the event hub :Error: event message validation failed: [failed deserializing event creator: [expected MSP ID Org2MSP, received Org1MSP]]` error which now comes from peer1.org2. Why do peers from org2 even get "invoked"? Here are the logs from peer2: ```2017-11-23 07:51:21.075 UTC [eventhub_producer] validateEventMessage -> DEBU 1c2 ValidateEventMessage starts for signed event 0xc421b7cc60 2017-11-23 07:51:21.075 UTC [eventhub_producer] validateEventMessage -> DEBU 1c3 ValidateEventMessage starts for signed event 0xc4202b5d40 2017-11-23 07:51:21.075 UTC [eventhub_producer] Chat -> ERRO 1c4 Error handling message: event message validation failed: [failed deserializing event creator: [expected MSP ID Org2MSP, received Org1MSP]] 2017-11-23 07:51:21.076 UTC [eventhub_producer] Chat -> ERRO 1c5 Error handling message: event message validation failed: [failed deserializing event creator: [expected MSP ID Org2MSP, received Org1MSP]] ```

SimonOberzan (Thu, 23 Nov 2017 07:59:13 GMT):
@Vadim @MartinC I have reran my project with all peers having ports exposed only to the network and only peer0.org1 having `eventSource: true`. Yet I still get `Error: Problem setting up the event hub :Error: event message validation failed: [failed deserializing event creator: [expected MSP ID Org2MSP, received Org1MSP]]` error which now comes from peer1.org2. Why do peers from org2 even get "invoked"? Here are the logs from peer2: ```2017-11-23 07:51:21.075 UTC [eventhub_producer] validateEventMessage -> DEBU 1c2 ValidateEventMessage starts for signed event 0xc421b7cc60 2017-11-23 07:51:21.075 UTC [eventhub_producer] validateEventMessage -> DEBU 1c3 ValidateEventMessage starts for signed event 0xc4202b5d40 2017-11-23 07:51:21.075 UTC [eventhub_producer] Chat -> ERRO 1c4 Error handling message: event message validation failed: [failed deserializing event creator: [expected MSP ID Org2MSP, received Org1MSP]] 2017-11-23 07:51:21.076 UTC [eventhub_producer] Chat -> ERRO 1c5 Error handling message: event message validation failed: [failed deserializing event creator: [expected MSP ID Org2MSP, received Org1MSP]] ```

Vadim (Thu, 23 Nov 2017 08:06:13 GMT):
@SimonOberzan have you tried without specifying eventUrl on peers?

SimonOberzan (Thu, 23 Nov 2017 08:07:08 GMT):
@Vadim I set them just like I did urls in network-config

Vadim (Thu, 23 Nov 2017 08:07:48 GMT):
have you tried without setting them?

SimonOberzan (Thu, 23 Nov 2017 08:07:54 GMT):
@Vadim Oh without? Like no eventUrls on any peer?

MartinC (Thu, 23 Nov 2017 08:08:00 GMT):
@SimonOberzan Every peer in the channel will be sent blocks from the orderer and it will be that causing the events to occur in each peer. Why your client has connected to those peers to listen to events I do not know, I would guess at some config issue.

Vadim (Thu, 23 Nov 2017 08:08:30 GMT):
not on any, just on those you don't want to have eventHubs

SimonOberzan (Thu, 23 Nov 2017 08:08:42 GMT):
Got it, will try

Vadim (Thu, 23 Nov 2017 08:11:03 GMT):
I also grep'ed "eventSource" on fabric-client source code, it does not appear that it's used anywhere, at least on 1.1-preview (not master branch)

SimonOberzan (Thu, 23 Nov 2017 08:44:35 GMT):
Again client starts asking about peer0.org2 as soon as proposals are sent... :https://pastebin.com/EDJ8X7Bq.

Vadim (Thu, 23 Nov 2017 08:47:04 GMT):
what errors do you have? still the same?

SimonOberzan (Thu, 23 Nov 2017 08:47:33 GMT):
Yeah but this time on peer0.org2

SimonOberzan (Thu, 23 Nov 2017 08:47:54 GMT):
```2017-11-23 08:37:31.417 UTC [eventhub_producer] validateEventMessage -> DEBU 1bd ValidateEventMessage starts for signed event 0xc4226422a0 2017-11-23 08:37:31.418 UTC [eventhub_producer] validateEventMessage -> DEBU 1be ValidateEventMessage starts for signed event 0xc421dee330 2017-11-23 08:37:31.418 UTC [eventhub_producer] Chat -> ERRO 1bf Error handling message: event message validation failed: [failed deserializing event creator: [expected MSP ID Org2MSP, received Org1MSP]] 2017-11-23 08:37:31.420 UTC [eventhub_producer] Chat -> ERRO 1c0 Error handling message: event message validation failed: [failed deserializing event creator: [expected MSP ID Org2MSP, received Org1MSP]] 2017-11-23 08:37:31.422 UTC [endorser] ProcessProposal -> DEBU 1c1 Entry 2017-11-23 08:37:31.422 UTC [protoutils] ValidateProposalMessage -> DEBU 1c2 ValidateProposalMessage starts for signed proposal 0xc421dee630 2017-11-23 08:37:31.422 UTC [protoutils] validateChannelHeader -> DEBU 1c3 validateChannelHeader info: header type 3 2017-11-23 08:37:31.423 UTC [protoutils] checkSignatureFromCreator -> DEBU 1c4 checkSignatureFromCreator starts 2017-11-23 08:37:31.423 UTC [endorser] ProcessProposal -> DEBU 1c5 Exit ```

MartinC (Thu, 23 Nov 2017 08:50:26 GMT):
I had a look in the SDK 1.1 code and couldn't spot any dynamic creation of EventHub instances. How is your client setting up the connections? I suspect there are potentially 2 issues here, 1 is that the client is connecting to an Org2 event listener (why that happens need to be determined) and the second is that an Org2 peer can't successfully receive blocks on the channel created by Org1.

MartinC (Thu, 23 Nov 2017 08:52:18 GMT):
Though I may be misunderstanding what you mean by "on peer0.org2", are they errors occuring in the peer's log or are they on the client application?

mastersingh24 (Thu, 23 Nov 2017 08:52:45 GMT):
@SimonOberzan - have you posted your version of "network.yaml" anywhere for review?

SimonOberzan (Thu, 23 Nov 2017 08:53:44 GMT):
@MartinC Error that you can see in the logs on peer0.org2 can than be seen in client logs. This is my slightly modified join-channel.js: https://pastebin.com/3uxSvpUt

mastersingh24 (Thu, 23 Nov 2017 08:55:28 GMT):
@SimonOberzan - You cannot use an admin from org1 to join a peer from org2 to channel

mastersingh24 (Thu, 23 Nov 2017 08:55:28 GMT):
@SimonOberzan - You cannot use an admin from org1 to join a peer from org2 to a channel

SimonOberzan (Thu, 23 Nov 2017 08:55:39 GMT):
@mastersingh24 network-config: https://pastebin.com/VezQnJwJ

SimonOberzan (Thu, 23 Nov 2017 08:55:54 GMT):
I know I'm only joining peers from org1 in this step

MartinC (Thu, 23 Nov 2017 09:00:48 GMT):
@SimonOberzan How are the Org2 peers joining the channel?

SimonOberzan (Thu, 23 Nov 2017 09:01:53 GMT):
@MartinC I'm trying to join peers from Org1 first, and than right after peers from Org2, just like in balance-transfer

mastersingh24 (Thu, 23 Nov 2017 09:03:40 GMT):
@SimonOberzan - I'd suggest that you double check the config for each of your peers and make sure that you have properly set `CORE_PEER_LOCALMSPID` for your org1 peers

SimonOberzan (Thu, 23 Nov 2017 09:05:53 GMT):
@mastersingh24 Checked again, everything is ok

SimonOberzan (Thu, 23 Nov 2017 09:05:53 GMT):
@mastersingh24 Checked again, everything is set correctly

SimonOberzan (Thu, 23 Nov 2017 09:05:53 GMT):
@mastersingh24 Checked again, it is set correctly

SimonOberzan (Thu, 23 Nov 2017 09:05:53 GMT):
@mastersingh24 Checked again, it is set correctly. The peers of Org1 do not have any errors, the error comes from peers of Org2.

MohammadObaid (Thu, 23 Nov 2017 09:08:09 GMT):
@mastersingh24 @MartinC When node sdk create fabric network what configuration file is used for fabric-ca for user enroll?

MartinC (Thu, 23 Nov 2017 09:21:31 GMT):
@SimonOberzan Are you certain in your join_channel() the array of peers passed in is just for org1?

SimonOberzan (Thu, 23 Nov 2017 09:25:19 GMT):
@MartinC Yes

MartinC (Thu, 23 Nov 2017 09:51:48 GMT):
@SimonOberzan Just a thought, could `helper.getClientForOrg(org_name, username)` be picking up the wrong user from the config? I noticed in the config both ca1 and ca2 have an `admin` user and ca2 is first in the list.

SimonOberzan (Thu, 23 Nov 2017 09:53:07 GMT):
@MartinC I will check that. The order is like that cause I generate it using ansible.

SimonOberzan (Thu, 23 Nov 2017 09:53:07 GMT):
@MartinC I will check that. The order is like that because I generate it using ansible.

MartinC (Thu, 23 Nov 2017 09:56:10 GMT):
I can't think of anything else that might cause it. When you work out the cause I'd be interested to know as at some point I will update `fabric-sdk-rest` to use the 1.1 SDK and the connection profile format and would prefer not to hit the same problem.

SimonOberzan (Thu, 23 Nov 2017 14:00:06 GMT):
Ahhhh. Everything I touch doesn't work.. Before I was trying to enroll user in Org1 -> Create channel -> Join channel with Org1's peers. Now I went back and just tried to enroll user in Org1 -> enroll user in Org2. And it is failing to enroll the second one. Except sometimes it works. There must be something wrong here that is connected with my previous problem. This are the logs on the ca-org1: ```2017/11/23 13:43:28 [INFO] signed certificate with serial number 337639758149615447461930748822521824513829908451 2017/11/23 13:43:29 [INFO] 10.0.0.11:47378 POST /api/v1/enroll 200 0 "OK" 2017/11/23 13:43:29 [INFO] 10.0.0.11:47380 POST /api/v1/register 200 0 "OK" 2017/11/23 13:43:29 [INFO] signed certificate with serial number 297380877737125464818491302513767154318358703297 2017/11/23 13:43:29 [INFO] 10.0.0.11:47382 POST /api/v1/enroll 200 0 "OK" 2017/11/23 13:43:29 [INFO] 10.0.0.11:47388 POST /api/v1/register 404 19 "CA 'ca-org2' does not exist"``` And this are the ones from ca-org2: ```2017/11/23 13:43:29 [INFO] signed certificate with serial number 575477698270833267963730883002615646956558375009 2017/11/23 13:43:29 [INFO] 10.0.0.11:44342 POST /api/v1/enroll 200 0 "OK"``` When it ran successfully the logs on both CAs looked something like this: ```2017/11/23 12:58:05 [INFO] signed certificate with serial number 422329156869249734073473278439074150961095852530 2017/11/23 12:58:05 [INFO] 10.0.0.11:46458 POST /api/v1/enroll 200 0 "OK" 2017/11/23 12:58:05 [INFO] 10.0.0.11:46460 POST /api/v1/register 200 0 "OK" 2017/11/23 12:58:06 [INFO] signed certificate with serial number 498766241664460336943082913609761489858628080854 2017/11/23 12:58:06 [INFO] 10.0.0.11:46462 POST /api/v1/enroll 200 0 "OK" ``` So to me it seems that ca-org1 is somehow getting POST calls meant for ca-org2 and than rejecting it because it is in fact not ca-org2. Any ideas @MartinC @Vadim?

SimonOberzan (Thu, 23 Nov 2017 14:04:22 GMT):
Client logs when enrolling user in Org2: https://pastebin.com/TJKCpzi5, where you can see that the configs look right `Successfully constructed Fabric CA client from options - {"caname":"ca-org2","protocol":"http","hostname":"ca.org2.example.com","port":7054,"tlsOptions":{"trustedRoots":[],"verify":false}}`

SimonOberzan (Thu, 23 Nov 2017 14:05:12 GMT):
All CA containers have port opened like: 7050-7059/tcp

SimonOberzan (Thu, 23 Nov 2017 14:05:12 GMT):
All CA containers have port opened like: 7050-7059/tcp and are in the same docker swarm network

SimonOberzan (Thu, 23 Nov 2017 14:06:28 GMT):
Its such a PITA debugging anything when results are not consistent...

MartinC (Thu, 23 Nov 2017 15:01:12 GMT):
@SimonOberzan From the description my guess would be that there is a race condition between setting the second ca to talk to and sending the request in the client. Perhaps one of the layers when setting the CA to talk to is failing to wait on a promise?

SimonOberzan (Thu, 23 Nov 2017 15:03:20 GMT):
@MartinC I dont compleately understand what you mean. Can you expalain a bit more in detail pleas?

SimonOberzan (Thu, 23 Nov 2017 15:03:20 GMT):
@MartinC I dont compleately understand what you mean. Can you expalain a bit more in detail please?

MartinC (Thu, 23 Nov 2017 15:06:34 GMT):
Sometimes it works and the 2 enroll requests get sent to the correct CA, one each, but sometimes it fails and the 2 enroll requests get sent to the first CA. Is that correct?

SimonOberzan (Thu, 23 Nov 2017 15:08:33 GMT):
Something like that. In the above example, there looks like 3 post request are made on ca with a successfull enrollment. But when it failed above, ca-org1 got 4 and ca-org2 got 1.

SimonOberzan (Thu, 23 Nov 2017 15:08:33 GMT):
Something like that. In the above example, there looks like 3 post request are made on ca with a successfull enrollment. But when it failed above, ca-org1 got 4 and ca-org2 got 1, the last one didn't happen because there was an error.

MartinC (Thu, 23 Nov 2017 15:11:35 GMT):
To rephrase what I think is happening, there are 2 processes occurring, one process (p1) that is setting the endpoint (CA) to org2 and one process (p2) that is sending the request. If p1 completes before p2 runs all is fine as p2 will send to org2, however if p2 runs before p1, p1 will send to the previous endpoint (org1's CA) and go wrong.

MartinC (Thu, 23 Nov 2017 15:11:35 GMT):
To rephrase what I think is happening, there are 2 processes occurring, one process (p1) that is setting the endpoint (CA) to org2 and one process (p2) that is sending the request. If p1 completes before p2 runs all is fine as p2 will send to org2, however if p2 runs before p1, p2 will send to the previous endpoint (org1's CA) and go wrong.

SimonOberzan (Thu, 23 Nov 2017 15:12:30 GMT):
That might be the case yeah, but that would be a bug in the node-sdk right?

MartinC (Thu, 23 Nov 2017 15:14:39 GMT):
Possibly, it depends how many calls the client app uses to enroll/register a user and if those calls return promises that need to be waited for.

SimonOberzan (Thu, 23 Nov 2017 15:16:41 GMT):
The whole error including the message about successfully constructing Fabric CA client happens inside client.getUserContext(..), so I guess that would be where the problem is.

SimonOberzan (Thu, 23 Nov 2017 15:16:41 GMT):
The whole error including the message about successfully constructing Fabric CA client happens inside client.getUserContext(..), so I guess that would be where the problem is. I will look into it.

MadhavaReddy (Thu, 23 Nov 2017 15:45:23 GMT):
Hi All, am trying to run fabric explorer using balance transfer crypto files and getting below error, please suggests what is the issue here [2017-11-23 15:40:59.781] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: Parse Error] at ClientRequest. (/home/ubuntu/work/src/github.com/hyperledger/explorer/fabric-explorer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:711:12) at emitOne (events.js:115:13) at ClientRequest.emit (events.js:210:7) at Socket.socketOnData (_http_client.js:459:9) at emitOne (events.js:115:13) at Socket.emit (events.js:210:7) at addChunk (_stream_readable.js:266:12) at readableAddChunk (_stream_readable.js:253:11) at Socket.Readable.push (_stream_readable.js:211:10) at TCP.onread (net.js:585:20) [2017-11-23 15:40:59.781] [ERROR] Helper - admin enrollment failed [2017-11-23 15:40:59.781] [ERROR] Query - Error: Missing userContext parameter at new TransactionID (/home/ubuntu/work/src/github.com/hyperledger/explorer/fabric-explorer/node_modules/fabric-client/lib/TransactionID.js:43:10) at Channel.queryInfo (/home/ubuntu/work/src/github.com/hyperledger/explorer/fabric-explorer/node_modules/fabric-client/lib/Channel.js:765:14) at helper.getRegisteredUsers.then (/home/ubuntu/work/src/github.com/hyperledger/explorer/fabric-explorer/app/query.js:175:18) at at process._tickCallback (internal/process/next_tick.js:188:7)

MadhavaReddy (Thu, 23 Nov 2017 19:10:25 GMT):
Hi All, am trying to use fabric ca latest images and facing below issue when try to enroll a user through node sdk can you please help me to fix the issue [2017-11-23 19:06:48.337] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } [2017-11-23 19:06:48.345] [ERROR] Helper - Failed to get registered user: Jim with error: Error: fabric-ca request register failed with errors [[{"code":0,"message":"No identity type provided. Please provide identity type"}]]

jackeyliliang (Fri, 24 Nov 2017 03:02:16 GMT):
Has joined the channel.

eetti (Fri, 24 Nov 2017 05:09:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TEDcsuH2Lc9HscFNa) The reason I had this error was because I didn't have a new line at the end of my cert file. So adding a new line at the top/bottom fixed this for me.

MohammadObaid (Fri, 24 Nov 2017 14:16:41 GMT):
Hi all. When I try to get channel info in balance transfer I am getting following error

MohammadObaid (Fri, 24 Nov 2017 14:16:56 GMT):

grpcerror.png

MohammadObaid (Fri, 24 Nov 2017 14:17:38 GMT):
I beleive node sdk failed to connect with grpc but how can I debug what causes for connection to be failed. Anyone can help me on this?

SimonOberzan (Fri, 24 Nov 2017 15:22:20 GMT):
@MartinC I have successfully ran the network now. It think that recreating my docker-swarm solved the issue

Vadim (Fri, 24 Nov 2017 15:24:05 GMT):
nice

MuhammadSalah (Fri, 24 Nov 2017 16:23:10 GMT):
Has joined the channel.

mastersingh24 (Fri, 24 Nov 2017 16:44:42 GMT):
@MohammadObaid - you can try turning on gRPC debug and trace: `GRPC_VERBOSITY=DEBUG GRPC_TRACE=all` or `GRPC_VERBOSITY=DEBUG GRPC_TRACE=channel,call_error,client_channel` should work as well

MohammadObaid (Fri, 24 Nov 2017 16:45:21 GMT):
in which files I need to add this line? docker compose file?

MohammadObaid (Fri, 24 Nov 2017 16:45:21 GMT):
@mastersingh24 in which files I need to add this line? docker compose file?

mastersingh24 (Fri, 24 Nov 2017 19:35:02 GMT):
@MohammadObaid - sorry - we're off today so was out for a bit. Looks like you are running the Node app from the command line, so you can just do: `GRPC_VERBOSITY=DEBUG GRPC_TRACE=all node YOUR_JS_FILE`

MohammadObaid (Sat, 25 Nov 2017 13:18:18 GMT):
@mastersingh24 No problem. It seems like node sdk is getting connection refused from peer address. Just one thing I want to know is it necessary to expose docker ports for grpc commnication as I have seen in network-config file ```"org1": { "name": "peerOrg1", "mspid": "Org1MSP", "ca": "https://localhost:7054", "peer1": { "requests": "grpcs://localhost:7051", "events": "grpcs://localhost:7053", "server-hostname": "peer0.org1.example.com", "tls_cacerts": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, ```

MohammadObaid (Sat, 25 Nov 2017 13:19:14 GMT):
I have setup docker containers in multihost environment and each docker container has its own private ip address so I didnt expose any ports

mastersingh24 (Sat, 25 Nov 2017 13:35:59 GMT):
So if your peer containers are running on multiple hosts, did you change "localhost" in the network-config file to the appropriate hostname / IP address where your peer is?

MohammadObaid (Sat, 25 Nov 2017 13:37:25 GMT):
Yes. I was able to enroll user but not able to query data about channel or do other stuffs. On log I am getting connection refused or not able to connect.

mastersingh24 (Sat, 25 Nov 2017 13:38:03 GMT):
maybe your CA is on the same machine that you are running the Node app?

MohammadObaid (Sat, 25 Nov 2017 13:38:12 GMT):
but from peer containers I am able to invoke queries

MohammadObaid (Sat, 25 Nov 2017 13:39:12 GMT):
I have configure node app in a machine where 1 ca conatiner , two peer contianer and container for kafka running

MohammadObaid (Sat, 25 Nov 2017 13:39:33 GMT):
All containers have seperate ip's

mastersingh24 (Sat, 25 Nov 2017 13:42:28 GMT):
Can you run `ss -lnp|grep 7051` and post the output ?

mastersingh24 (Sat, 25 Nov 2017 13:42:28 GMT):
Can you run `netstat -lnp|grep 7051` and post the output ?

MohammadObaid (Sat, 25 Nov 2017 13:44:45 GMT):
Sure. I am just bringing up a network. It will take few minutes then I will post output here

MohammadObaid (Sat, 25 Nov 2017 14:16:07 GMT):
@mastersingh24 I am not getting any ouptut .

MohammadObaid (Sat, 25 Nov 2017 14:17:04 GMT):
This is the error I am getting on node console

MohammadObaid (Sat, 25 Nov 2017 14:17:24 GMT):

handshakefailed.png

MohammadObaid (Sat, 25 Nov 2017 14:18:09 GMT):
And my network-config file is as below ```{ "network-config": { "orderer": { "url": "grpcs://172.16.50.6:7050", "server-hostname": "orderer2nd-orgc", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgc/orderers/orderer2nd-orgc.orgc/tls/ca.crt" }, "orderer": { "url": "grpcs://172.16.50.7:7050", "server-hostname": "orderer2nd-orgd", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgd/orderers/orderer2nd-orgd.orgd/tls/ca.crt" }, "orgb": { "name": "orgb", "mspid": "peer1st-orgb.orgb", "ca": "http://172.16.50.3:7054", "peers": { "peer1st-orgb": { "requests": "grpcs://172.16.50.10:7051", "events": "grpcs://172.16.50.10:7053", "server-hostname": "peer1st-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer1st-orgb.orgb/tls/ca.crt" }, "peer2nd-orgb": { "requests": "grpcs://172.16.50.9:7056", "events": "grpcs://172.16.50.9:7058", "server-hostname": "peer2nd-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer2nd-orgb.orgb/tls/ca.crt" } }, "admin": { "key": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/keystore", "cert": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/signcerts" } } } } ```

MohammadObaid (Sat, 25 Nov 2017 14:18:09 GMT):
And my network-config file is as below ```{ "network-config": { "orderer": { "url": "grpcs://172.16.50.6:7050", "server-hostname": "orderer2nd-orgc", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgc/orderers/orderer2nd-orgc.orgc/tls/ca.crt" }, "orderer": { "url": "grpcs://172.16.50.7:7050", "server-hostname": "orderer2nd-orgd", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgd/orderers/orderer2nd-orgd.orgd/tls/ca.crt" }, "orgb": { "name": "orgb", "mspid": "peer1st-orgb.orgb", "ca": "http://172.16.50.3:7054", "peers": { "peer1st-orgb": { "requests": "grpcs://172.16.50.10:7051", "events": "grpcs://172.16.50.10:7053", "server-hostname": "peer1st-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer1st-orgb.orgb/tls/ca.crt" }, "peer2nd-orgb": { "requests": "grpcs://172.16.50.9:7056", "events": "grpcs://172.16.50.9:7058", "server-hostname": "peer2nd-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer2nd-orgb.orgb/tls/ca.crt" } }, "admin": { "key": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/keystore", "cert": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/signcerts" } } } } ``` And this si the query I am using to get channelinfo ```echo "GET query Channels" echo curl -s -X GET \ "http://localhost:4000/channels?peer=peer1st-orgb" \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" echo echo ```

MohammadObaid (Sat, 25 Nov 2017 14:18:09 GMT):
And my network-config file is as below ```{ "network-config": { "orderer": { "url": "grpcs://172.16.50.6:7050", "server-hostname": "orderer2nd-orgc", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgc/orderers/orderer2nd-orgc.orgc/tls/ca.crt" }, "orderer": { "url": "grpcs://172.16.50.7:7050", "server-hostname": "orderer2nd-orgd", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgd/orderers/orderer2nd-orgd.orgd/tls/ca.crt" }, "orgb": { "name": "orgb", "mspid": "peer1st-orgb.orgb", "ca": "http://172.16.50.3:7054", "peers": { "peer1st-orgb": { "requests": "grpcs://172.16.50.10:7051", "events": "grpcs://172.16.50.10:7053", "server-hostname": "peer1st-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer1st-orgb.orgb/tls/ca.crt" }, "peer2nd-orgb": { "requests": "grpcs://172.16.50.9:7056", "events": "grpcs://172.16.50.9:7058", "server-hostname": "peer2nd-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer2nd-orgb.orgb/tls/ca.crt" } }, "admin": { "key": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/keystore", "cert": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/signcerts" } } } } ``` And this si the query I am using to get channelinfo ``` echo "GET query Channels" echo curl -s -X GET \ "http://localhost:4000/channels?peer=peer1st-orgb" \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" echo echo ```

MohammadObaid (Sat, 25 Nov 2017 14:18:09 GMT):
And my network-config file is as below ```{ "network-config": { "orderer": { "url": "grpcs://172.16.50.6:7050", "server-hostname": "orderer2nd-orgc", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgc/orderers/orderer2nd-orgc.orgc/tls/ca.crt" }, "orderer": { "url": "grpcs://172.16.50.7:7050", "server-hostname": "orderer2nd-orgd", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgd/orderers/orderer2nd-orgd.orgd/tls/ca.crt" }, "orgb": { "name": "orgb", "mspid": "peer1st-orgb.orgb", "ca": "http://172.16.50.3:7054", "peers": { "peer1st-orgb": { "requests": "grpcs://172.16.50.10:7051", "events": "grpcs://172.16.50.10:7053", "server-hostname": "peer1st-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer1st-orgb.orgb/tls/ca.crt" }, "peer2nd-orgb": { "requests": "grpcs://172.16.50.9:7056", "events": "grpcs://172.16.50.9:7058", "server-hostname": "peer2nd-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer2nd-orgb.orgb/tls/ca.crt" } }, "admin": { "key": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/keystore", "cert": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/signcerts" } } } } ``` And this si the query I am using to get channelinfo ``` echo "GET query Channels" echo curl -s -X GET \ "http://localhost:4000/channels?peer=peer1st-orgb" \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" echo echo ```

MohammadObaid (Sat, 25 Nov 2017 14:18:09 GMT):
And my network-config file is as below ```{ "network-config": { "orderer": { "url": "grpcs://172.16.50.6:7050", "server-hostname": "orderer2nd-orgc", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgc/orderers/orderer2nd-orgc.orgc/tls/ca.crt" }, "orderer": { "url": "grpcs://172.16.50.7:7050", "server-hostname": "orderer2nd-orgd", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgd/orderers/orderer2nd-orgd.orgd/tls/ca.crt" }, "orgb": { "name": "orgb", "mspid": "peer1st-orgb.orgb", "ca": "http://172.16.50.3:7054", "peers": { "peer1st-orgb": { "requests": "grpcs://172.16.50.10:7051", "events": "grpcs://172.16.50.10:7053", "server-hostname": "peer1st-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer1st-orgb.orgb/tls/ca.crt" }, "peer2nd-orgb": { "requests": "grpcs://172.16.50.9:7056", "events": "grpcs://172.16.50.9:7058", "server-hostname": "peer2nd-orgb", "tls_cacerts": "../../../etc/hyperledger/allorgs/orgb/peers/peer2nd-orgb.orgb/tls/ca.crt" } }, "admin": { "key": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/keystore", "cert": "../../../etc/hyperledger/allorgs/orgb/users/Admin@orgb/msp/signcerts" } } } } ``` And this is the query I am using to get channelinfo ` ``` echo "GET query Channels" echo curl -s -X GET \ "http://localhost:4000/channels?peer=peer1st-orgb" \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" echo echo ```

MohammadObaid (Sat, 25 Nov 2017 14:21:30 GMT):
Output of `netstat -l` is as follows

MohammadObaid (Sat, 25 Nov 2017 14:21:53 GMT):

netstatl.png

mastersingh24 (Sat, 25 Nov 2017 20:16:13 GMT):
Do you have TLS enabled for your peers? (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XkD6v8K9gv6RpPm2q) @MohammadObaid

MadhavaReddy (Sun, 26 Nov 2017 03:39:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=q3d9qgDhRbmWJ5sRY) @MohammadObaid Did you genarate artifacts and idetity certificates using CA or are you using same artificates & crypto files which already there in balance transfer project? if you regenerated those files using crypto tool this will not work

MohammadObaid (Sun, 26 Nov 2017 05:56:52 GMT):
@mastersingh24 No tls is enableed false. This is the core.yaml file mounted on peer container

MohammadObaid (Sun, 26 Nov 2017 05:56:52 GMT):
@mastersingh24 No tls is enableed false. This is some part of core.yaml file mounted on peer container ```logging: peer: info cauthdsl: warning gossip: warning ledger: info msp: warning policies: warning grpc: error format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}' peer: networkId: dev listenAddress: 0.0.0.0:7051 addressAutoDetect: false gomaxprocs: -1 gossip: bootstrap: 127.0.0.1:7051 endpoint: maxBlockCountToStore: 100 maxPropagationBurstLatency: 10ms maxPropagationBurstSize: 10 propagateIterations: 1 propagatePeerNum: 3 pullInterval: 4s pullPeerNum: 3 requestStateInfoInterval: 4s publishStateInfoInterval: 4s stateInfoRetentionInterval: publishCertPeriod: 10s skipBlockVerification: false dialTimeout: 3s connTimeout: 2s recvBuffSize: 20 sendBuffSize: 20 digestWaitTime: 1s endpoint: maxBlockCountToStore: 100 maxPropagationBurstLatency: 10ms maxPropagationBurstSize: 10 propagateIterations: 1 propagatePeerNum: 3 pullInterval: 4s pullPeerNum: 3 requestStateInfoInterval: 4s publishStateInfoInterval: 4s stateInfoRetentionInterval: publishCertPeriod: 10s skipBlockVerification: false dialTimeout: 3s connTimeout: 2s recvBuffSize: 20 sendBuffSize: 20 digestWaitTime: 1s requestWaitTime: 1s responseWaitTime: 2s aliveTimeInterval: 5s aliveExpirationTimeout: 25s reconnectInterval: 25s externalEndpoint: election: startupGracePeriod: 15s membershipSampleInterval: 1s leaderAliveThreshold: 10s leaderElectionDuration: 5s events: address: 0.0.0.0:7053 buffersize: 100 timeout: 10ms tls: enabled: false cert: ```

MohammadObaid (Sun, 26 Nov 2017 08:16:40 GMT):
@MadhavaReddy Regenerate artifacts and certificates using CA . I dont think crypto certificates is an issue here. I am able to invoke transactions from peer containers and there is no issue in that. I think issue is client like node sdk is unable to communaicte with peer on given port

MadhavaReddy (Sun, 26 Nov 2017 08:18:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9sF6PmjJNHrwGmjNw) @MohammadObaid you mean through CLI or using curl from the cmd line, if it working through curl mean yes its issue with sdk

MohammadObaid (Sun, 26 Nov 2017 08:22:44 GMT):
@MadhavaReddy I mean from peer cli

MohammadObaid (Sun, 26 Nov 2017 08:22:59 GMT):

peercli.png

MadhavaReddy (Sun, 26 Nov 2017 08:27:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=S8ugiYLJdC5b34rY9) @MohammadObaid its mostly the certificate issue, if you notice here your not passing user enrolment keys but through sdk for balance transfer the enrolement keys are must, you need to use the artifcats and crypto what they given in balance transfer as is or you need to generate new keys if changed anything in crypto and configtxt yaml files using Fabric CA

MadhavaReddy (Sun, 26 Nov 2017 08:27:55 GMT):
https://github.com/hyperledger/fabric-samples/fabric-ca

MadhavaReddy (Sun, 26 Nov 2017 08:30:29 GMT):
you can follow this to create new files but what i observed with fabric ca scripts is its not creating generating keys for each peer only creating single key for all peers under one org, have posted a q in fabric ca channel and awaiting for reply

MohammadObaid (Sun, 26 Nov 2017 08:48:54 GMT):
@MadhavaReddy Alright. All channel artifacts and crypto material is mounted on peer containers. So what I did is copy all materials from that container to host and give path to network-config.json file.

MohammadObaid (Sun, 26 Nov 2017 08:51:34 GMT):
One more thing I want to know is we gave `tls_cacerts` in network-config file. If tls is not enabled then what path should be given?

mastersingh24 (Sun, 26 Nov 2017 09:53:49 GMT):
@MohammadObaid (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jkj2CvZM8jFquCh4E)

sasiedu (Sun, 26 Nov 2017 09:54:45 GMT):
Has joined the channel.

mastersingh24 (Sun, 26 Nov 2017 09:54:52 GMT):
@MohammadObaid - So in your network-config, you need to change `grpcs` to `grpc` since TLS is not enabled (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jkj2CvZM8jFquCh4E)

MohammadObaid (Sun, 26 Nov 2017 11:55:41 GMT):
@mastersingh24 Great :) It solved that issue. However I am getting another error ```[2017-11-26 11:51:39.898] [ERROR] Query - Error: Failed to deserialize creator identity, err Expected MSP ID orgb, received peer1st-orgb.orgb at /home/ubuntu/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:554:15 ``` . Is this error related to network-config file or the org token we passed in curl command to query channle data?

MohammadObaid (Sun, 26 Nov 2017 15:56:45 GMT):
@mastersingh24 Thanks .:) It works for query `channelinfo` and I am getting list of channels joined but when I do `chaincodeInfo` query using same token and same peer I get an error `MSP orga is unknown` . From docker inspect I check that my core msp id is `orga` but still it is giving that error

MohammadObaid (Sun, 26 Nov 2017 15:56:45 GMT):
@mastersingh24 Thanks .:) It works for query `channelinfo` and I am getting list of channels joined but when I do `chaincodeInfo` query and other using same token and same peer I get an error `MSP orga is unknown` . From docker inspect I check that my core msp id is `orga` but still it is giving that error

MohammadObaid (Sun, 26 Nov 2017 16:22:58 GMT):

dockerversion.png

MohammadObaid (Sun, 26 Nov 2017 16:23:47 GMT):
Is docker version creating the issue here as someone ask that in mailing list https://lists.hyperledger.org/pipermail/hyperledger-fabric/2017-October/001957.html . I assume fabcar is also one of node sdk application

MohammadObaid (Sun, 26 Nov 2017 16:45:03 GMT):
Here is docker version I am using ```Client: Version: 1.13.1 API version: 1.26 Go version: go1.6.2 Git commit: 092cba3 Built: Thu Nov 2 20:40:23 2017 OS/Arch: linux/amd64 Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Go version: go1.6.2 Git commit: 092cba3 Built: Thu Nov 2 20:40:23 2017 OS/Arch: linux/amd64 Experimental: false ```

ArnabChatterjee (Mon, 27 Nov 2017 05:35:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yJrys4nbapGLCzayr) @jrosmith - Can you please share how you have employed technique 1? I am particularly confused on what you have set as peers and channel for each user's client object? Any thoughts @dave.enyeart , @Vadim ?

JayJong (Mon, 27 Nov 2017 06:29:46 GMT):
Has joined the channel.

wangdong (Mon, 27 Nov 2017 09:23:10 GMT):
Please help to review https://gerrit.hyperledger.org/r/15719

jeevas (Mon, 27 Nov 2017 11:06:08 GMT):
Has joined the channel.

jeevas (Mon, 27 Nov 2017 11:12:53 GMT):
while calling getChainInfo method i am getting error in Missing userContext parameter is null. but other methods are working properly.. can you please guide me what is the issues?

bretharrison (Mon, 27 Nov 2017 19:31:23 GMT):
@jeevas do you have the exact error message or stack trace ?

ArnabChatterjee (Tue, 28 Nov 2017 08:54:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a8mjZMyPYfZNfzhhc) @vdods - Can anyone let me know why we face this issue?

CodeReaper (Tue, 28 Nov 2017 09:03:30 GMT):
If i want crypto material for a peer how do I register its identity? Should i mention the role as 'peer' in the registering method of client object? What is it by default? And also what is the difference in enrollment id and crypto material of a user and a peer? Any help appreciated, thanks.

ArnabChatterjee (Tue, 28 Nov 2017 09:06:07 GMT):
Okay, let me simplify the question. In https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/helper.js can anyone let me know what is the technical difference between getOrgAdmin() vs getAdminUser() function? I understand that the former one is used to create channels, join channel, etc. and the latter one is used to create new user. But I cannot understand the difference between the two.

jeevas (Tue, 28 Nov 2017 09:12:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5MTmH5XLjC2uKgYLg) @bretharrison getting below error. Error: Missing userContext parameter at new TransactionID (/home/jeeva/gerrit/blockchain-explorer/node_modules/fabric-client/lib/TransactionID.js:43:10) at Channel.queryInfo (/home/jeeva/gerrit/blockchain-explorer/node_modules/fabric-client/lib/Channel.js:765:14) at getChainInfo (/home/jeeva/gerrit/blockchain-explorer/app/query.js:71:18) at Object.getChannelHeight (/home/jeeva/gerrit/blockchain-explorer/app/query.js:166:9) at getMaxBlockNum (/home/jeeva/gerrit/blockchain-explorer/service/blockscanner.js:91:18) at Object.syncBlock (/home/jeeva/gerrit/blockchain-explorer/service/blockscanner.js:31:9) at Timeout._onTimeout (/home/jeeva/gerrit/blockchain-explorer/listener/blocklistener.js:38:22) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)

CodeReaper (Tue, 28 Nov 2017 09:31:14 GMT):
@ArnabChatterjee getAdminUser loads the context of admin user of the CA (admin , adminpw). getOrgAdmin loads the identity of the admin of the organization by the loading the private key and certificate of it.

CodeReaper (Tue, 28 Nov 2017 09:32:05 GMT):
There are basically two types admins, one for each organization and one for each CA.

ArnabChatterjee (Tue, 28 Nov 2017 09:32:14 GMT):
@CodeReaper - Thanks for your reply. Does it imply I cannot use the admin of the organization to create new users of the organization?

ArnabChatterjee (Tue, 28 Nov 2017 09:33:38 GMT):
These new users would be able to invoke and query chaincodes

ArnabChatterjee (Tue, 28 Nov 2017 09:34:32 GMT):
And how do I create a new user using the admin of the CA?

CodeReaper (Tue, 28 Nov 2017 09:34:42 GMT):
No you can't,at least not by default orgAdmin created by cryptogen in byfn or balance transfer. Whether any sort of modification will do the trick, I dont know.

CodeReaper (Tue, 28 Nov 2017 09:35:40 GMT):
just try breaking down the code outside in. /users route is specifically to enroll new users, you can break it down from there and implement your own

CodeReaper (Tue, 28 Nov 2017 09:36:36 GMT):
*register & enroll new users

ArnabChatterjee (Tue, 28 Nov 2017 09:37:26 GMT):
okay I went down the /users path in the example. How do I specify to create a new org admin over there?

CodeReaper (Tue, 28 Nov 2017 09:38:26 GMT):
why do you want to create a new org admin? Just a normal user would be able invoke and query chaincode

ArnabChatterjee (Tue, 28 Nov 2017 09:38:43 GMT):
I want to make the org to join / create channel... etc.

CodeReaper (Tue, 28 Nov 2017 09:39:37 GMT):
You already have the crypto material of the org admin in artifacts to make a new channel. You dont need to create new

ArnabChatterjee (Tue, 28 Nov 2017 09:39:44 GMT):
I do not want to go down the path of creating an admin based on the existing certs as mentioned in the example. As : client.createUser

ArnabChatterjee (Tue, 28 Nov 2017 09:40:15 GMT):
Or is it the only way to do it?

CodeReaper (Tue, 28 Nov 2017 09:41:02 GMT):
youve already made the crypto material of an admin, Im not sure why you want to recreate it.

ArnabChatterjee (Tue, 28 Nov 2017 09:43:28 GMT):
Okay. Actually I was using the example crypto material of the example. So I need to regenerate new crypto material for the admin again as per my needs. So the thing is I can only create org admins after generating sufficient crypto material who can create / join channels etc.

ArnabChatterjee (Tue, 28 Nov 2017 09:43:33 GMT):
Is it right?

CodeReaper (Tue, 28 Nov 2017 09:45:34 GMT):
Use cryptogen to create new crypto material. Make sure you pass that crypto material only to your docker containers through .yaml files at time of bootstrapping. You can always make new organizaions, just make their crypto material first.

ArnabChatterjee (Tue, 28 Nov 2017 09:46:59 GMT):
Okay. Thanks. At the timebeing, is there any way I can create crypto material dynamically?

CodeReaper (Tue, 28 Nov 2017 09:59:41 GMT):
Through node SDK, by the object of fabric-ca-client. registering and enrolling Jim in the balance transfer example. I'm trying to understand how to make crypto material for a peer _not_ at bootstrap.

ArnabChatterjee (Tue, 28 Nov 2017 10:18:20 GMT):
okay. Thanks. Keep posting. :)

matrisis (Tue, 28 Nov 2017 14:59:40 GMT):
Has joined the channel.

sk (Tue, 28 Nov 2017 18:44:31 GMT):
Has joined the channel.

ashablyg (Tue, 28 Nov 2017 18:56:38 GMT):
Has joined the channel.

MohammadObaid (Tue, 28 Nov 2017 19:23:12 GMT):
Hey @jimthematrix @mastersingh24 . This function `getChannelForOrg` https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/query.js#L183 returns channel joined by org right ? I have orga which joined channel `firstchannel` which I can see it when I query channel list from orga peer container but this `getCHannelForOrg` return channelname `mychannel` . Is this expected behavior or should it return `firstchannel` name?

MohammadObaid (Tue, 28 Nov 2017 19:23:25 GMT):

channel.png

MohammadObaid (Tue, 28 Nov 2017 19:25:08 GMT):
These are three parmaters `target` `channel` `client` value received https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/query.js#L182-L184 which I beleive is not correct . Am I right? I should get channel name `firstchannel` and in client variable I shold get some value instead of `undefined`

yoheiueda (Wed, 29 Nov 2017 04:53:17 GMT):
In Orderer.js, `broadcast.end();` in Line 144 has been commented out, and has been moved to Line 99. https://github.com/hyperledger/fabric-sdk-node/blob/v1.1.0-preview/fabric-client/lib/Orderer.js#L144

yoheiueda (Wed, 29 Nov 2017 04:53:21 GMT):
Does anyone knows why this change is necessary? I think the original code should also work correctly, and eager closing of streams reduces resources usages.

yoheiueda (Wed, 29 Nov 2017 04:53:21 GMT):
Does anyone know why this change is necessary? I think the original code should also work correctly, and eager closing of streams reduces resources usages.

ArnabChatterjee (Wed, 29 Nov 2017 07:52:23 GMT):
Hi, I am posting a transactionProposal via SDK and getting the error : error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Transaction is not valid. Got [e1655d861ca94402682c1cde7d9f4b255d3c54f1a1d15da2a5968296fb6f0ee1], expected [a60162913ab22752cd5269c12ccb5f418b6b138eca08c5e5d92c4aa97878b0f7] at /home/ubuntu/sysconfig-network/sysconfig-server/node_modules/grpc/src/node/src/client.js:434:17

ArnabChatterjee (Wed, 29 Nov 2017 07:52:29 GMT):
Any ideas?

ArnabChatterjee (Wed, 29 Nov 2017 07:53:12 GMT):
@Vadim

Vadim (Wed, 29 Nov 2017 07:53:43 GMT):
I don't recognize that error message

Vadim (Wed, 29 Nov 2017 07:53:50 GMT):
which project is this?

ArnabChatterjee (Wed, 29 Nov 2017 07:54:40 GMT):
balance transfer. But I have modified the code to accomodate separate client objects per user to send invokes/queries

ArnabChatterjee (Wed, 29 Nov 2017 07:55:04 GMT):
I have created N users and set the userContexts for each client.

Vadim (Wed, 29 Nov 2017 07:55:22 GMT):
where does the error come from? I don't think it's from grpc

Vadim (Wed, 29 Nov 2017 07:55:40 GMT):
seems like some txid mismatch which some code checks

ArnabChatterjee (Wed, 29 Nov 2017 07:55:57 GMT):
If you see the stack it says line 434 of client.js in grpc

ArnabChatterjee (Wed, 29 Nov 2017 07:56:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=brQNiYWPJEjRiPYSo) @Vadim Any ideas where this check is done? Actually I am not getting 200 after transaction proposal

Vadim (Wed, 29 Nov 2017 07:57:04 GMT):
I see the line, but I don't think grpc validates transactions

ArnabChatterjee (Wed, 29 Nov 2017 07:58:12 GMT):
yes. Actually I was curious where in SDK in sendPeersProposal this check is done and under what circumstances this could come?

ArnabChatterjee (Wed, 29 Nov 2017 08:06:28 GMT):
Since I am sending it to 4 peers for validation I am getting response code = 2

ArnabChatterjee (Wed, 29 Nov 2017 11:37:32 GMT):
@Vadim - I finally solved the issue. This was because the txId generated with client.newTransactionId() using usercontext and nonce was not matching with the one calculated with the help of the headers set in channel.sendTransactionProposal(). This latter was caluclated by endorsing peers using the creator set in channel object.

CodeReaper (Wed, 29 Nov 2017 11:47:57 GMT):
@ArnabChatterjee make sure you're getting the txid for the transaction proposal after changing the user context of the client object.

CodeReaper (Wed, 29 Nov 2017 11:48:16 GMT):
oh you found the error, never mind

ArnabChatterjee (Wed, 29 Nov 2017 11:48:59 GMT):
:) Thanks @CodeReaper . I figured out that I need to get the channel object from the client object itself.

ArnabChatterjee (Wed, 29 Nov 2017 11:52:31 GMT):
So One more thing. Any idea what is the reason a client.newPeer has to do inside the client class?

ArnabChatterjee (Wed, 29 Nov 2017 11:52:45 GMT):
I could not see anything but a new statement using the Peer class

ArnabChatterjee (Wed, 29 Nov 2017 11:53:15 GMT):
Actually I was confused that the peer has got to do with the client

Vadim (Wed, 29 Nov 2017 11:56:28 GMT):
@ArnabChatterjee e.g. when you do `channel.sendTransaction()` it will use the peer objects from the client

ArnabChatterjee (Wed, 29 Nov 2017 11:57:21 GMT):
but wasnt the sendTransaction meant for the orderer?

Vadim (Wed, 29 Nov 2017 11:59:28 GMT):
ok, I said it wrong, you add peers to channel anyway, not to client

jimthematrix (Wed, 29 Nov 2017 12:51:46 GMT):
@MohammadObaid ‘helper.getChannelForOrg()’ is a simple convenient method that returns the channel statically configured for the app at bootstrap. If you want to dynamically query for the channels from a peer you should used ‘Client.queryChannels()’ which makes live queries against the specified peer

CodeReaper (Wed, 29 Nov 2017 13:19:09 GMT):
@Vadim @jimthematrix Can I register a peer with the help of node SDK? What is it by default? And also what is the difference in a user and a peer in terms of enrollment id and crypto material? Any help appreciated, thanks.

joshhw (Wed, 29 Nov 2017 15:52:45 GMT):
Is there documentation on connecting Fabric to Node?

joshhw (Wed, 29 Nov 2017 15:53:11 GMT):
I've built custom fabric server based on the "first network" example. But I'm not sure how to load this into a Node server

Asara (Wed, 29 Nov 2017 15:55:35 GMT):
@joshhw https://fabric-sdk-node.github.io/

dlingenau (Wed, 29 Nov 2017 17:06:10 GMT):
Has joined the channel.

joshhw (Wed, 29 Nov 2017 18:49:28 GMT):
@Asara I've read that, but it doesn't point me in the direction of coding a customized Fabric build.

Asara (Wed, 29 Nov 2017 18:50:13 GMT):
Don't understand the question. Most of the core components are written in golang

Asara (Wed, 29 Nov 2017 18:50:32 GMT):
You can use the node SDK to interact with your fabric cluster

Asara (Wed, 29 Nov 2017 18:53:15 GMT):
@joshhw if you are referencing the chaincode, https://github.com/hyperledger/fabric-chaincode-node

Asara (Wed, 29 Nov 2017 18:53:19 GMT):
would be a good starting point

joshhw (Wed, 29 Nov 2017 18:56:48 GMT):
how are the certs that I generate with cryptogen used in Node?

MohammadObaid (Wed, 29 Nov 2017 19:04:30 GMT):
Hey if I am getting this error `Failed to deserialize creator identity, orga is unknown` what does that mean? Although in my channel artifacts folder there is folder of orga where peer crypto materials and other ca stuff exist then why I am getting this error?

saikris12 (Wed, 29 Nov 2017 20:46:55 GMT):
Has joined the channel.

holocron (Wed, 29 Nov 2017 23:04:37 GMT):
I'm trying some things with the node sdk and am having some trouble with the event hub. When I try to `registerTxEvent` I get `Error: unknown service protos.Events`. Any clues as to what to investigate?

john111 (Thu, 30 Nov 2017 03:24:03 GMT):
Has joined the channel.

aaron_z7 (Thu, 30 Nov 2017 05:42:54 GMT):
Has joined the channel.

kojima714 (Thu, 30 Nov 2017 06:06:02 GMT):
Has joined the channel.

dipeekapatil (Thu, 30 Nov 2017 07:19:12 GMT):
Has joined the channel.

dipeekapatil (Thu, 30 Nov 2017 07:32:03 GMT):
Hi, I am new to blockchain. I am trying to run gulp test fabric-sdk-node https://github.com/hyperledger/fabric-sdk-node. I have done vagrant box set up using fabric devenv vagrant file. https://github.com/hyperledger/fabric . I am able to do npm install for fabric sdk node but getting following error for gulp test stream.js:74 throw er; // Unhandled stream error in pipe. ^ Error: Cannot find module 'grpc'

dipeekapatil (Thu, 30 Nov 2017 07:32:03 GMT):
Hi, I am new to blockchain. I am trying to run gulp test fabric-sdk-node https://github.com/hyperledger/fabric-sdk-node. I have done vagrant box set up using fabric devenv vagrant file. https://github.com/hyperledger/fabric . I am able to do npm install for fabric sdk node but getting following error for gulp test stream.js:74 throw er; // Unhandled stream error in pipe. ^ Error: Cannot find module 'grpc'

dipeekapatil (Thu, 30 Nov 2017 07:32:03 GMT):
Hi, I am new to blockchain. I am trying to run gulp test fabric-sdk-node https://github.com/hyperledger/fabric-sdk-node. I have done vagrant box set up using fabric devenv vagrant file. https://github.com/hyperledger/fabric . I am able to do npm install for fabric sdk node but getting following error for gulp test stream.js:74 throw er; // Unhandled stream error in pipe. ^ Error: Cannot find module 'grpc'. I have tried to install grpc module locally and globally as well. but it didnt solve problem. grpc npm dependency is not listed in package.json for fabric-sdk-node.

matrisis (Thu, 30 Nov 2017 10:40:13 GMT):
Has left the channel.

KangkanBora (Thu, 30 Nov 2017 11:15:30 GMT):
Has joined the channel.

taourirt1981 (Thu, 30 Nov 2017 12:11:01 GMT):
Has joined the channel.

MohammadObaid (Thu, 30 Nov 2017 16:28:02 GMT):
Hi all. what are the possible causes of getting this error `Failed to deserialize creator identity, err MSP orga is unknown ` . I have been stuck in this issue for a while now and seems out of ideas how to fix this. Any clue ? In peer section of network-config file I define msp as `orga` . When I changed that msp id from `orga` to `peer1st-orga.orga` I got an error `Expected MSP orga , received peer1st-orga.orga` and when I change mspid to `orga` I am getting error `msp id is unknown`

MohammadObaid (Thu, 30 Nov 2017 16:28:02 GMT):
Hi all. what are the possible causes of getting this error `Failed to deserialize creator identity, err MSP orga is unknown` . I have been stuck in this issue for a while now and seems out of ideas how to fix this. Any clue ? In peer section of network-config file I define msp as `orga` . When I changed that msp id from `orga` to `peer1st-orga.orga` I got an error `Expected MSP orga , received peer1st-orga.orga` and when I change mspid to `orga` I am getting error `msp id is unknown`

joshhw (Thu, 30 Nov 2017 16:58:14 GMT):
Has anyone figured out what goes in trustedRoots?

joshhw (Thu, 30 Nov 2017 17:08:02 GMT):
when trying to build a fabric node setup?

bretharrison (Thu, 30 Nov 2017 22:44:53 GMT):
@jeevas are you still having problems ... be sure that your `Client` instance has a user assigned.

bretharrison (Thu, 30 Nov 2017 22:48:43 GMT):
@ArnabChatterjee Be sure to get a transactionid object build by the same identity that is signing the proposal. The balance transfer sample has been rewritten to use connection profiles and sometimes gets an admin based transactionID object and then also uses the admin identity to sign the request that will include the transaction ID. I believe that you have a miss match in the two calls, the one that gets the transactionID and the one that sends the proposal.

bretharrison (Thu, 30 Nov 2017 22:55:42 GMT):
@ArnabChatterjee The application should only have to do a `var Client = require('fabric-client');` and then be able to get all objects from the `Client` that are needed, including a `Peer`

bretharrison (Thu, 30 Nov 2017 22:55:42 GMT):
@ArnabChatterjee The application should only have to do a `var Client = require('fabric-client');` and then `var client = new Client();` and will then be able to get all objects from the `client` instance that are needed, including a `Peer`

bretharrison (Thu, 30 Nov 2017 22:58:33 GMT):
@holocron Check the eventHub port address, it may be the same as the Peer

ArnabChatterjee (Thu, 30 Nov 2017 23:55:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7yBY7HKaGiXkWLJqa) @bretharrison - Thanks for your response. I could not understand this. Is the `Client` stateless now? My requirement is to have separate users invoking the chaincode. As mentioned in the documentation, having to switch `userContexts` is considered an anti-pattern. Can you elaborate a bit how having one `var Client = require('fabric-client');` and a `Peer` is going to help me?

ArnabChatterjee (Fri, 01 Dec 2017 02:42:02 GMT):
Also, I would like to understand the concept behind storing 2 user contexts. One inside each channel and one inside the client. @Vadim @jimthematrix @bretharrison

MohammadObaid (Fri, 01 Dec 2017 08:00:19 GMT):
@Vadim Can we increase timeout period of getting endorsement signatures . When I invoke transaction I am getting this error

MohammadObaid (Fri, 01 Dec 2017 08:00:38 GMT):

endorsmenttransaction.png

MohammadObaid (Fri, 01 Dec 2017 08:00:55 GMT):
My endorsement policy is as follows `-P "AND ('orga.member','orgb.member')"`

Vadim (Fri, 01 Dec 2017 08:19:01 GMT):
@MohammadObaid do you send the proposal only to orga members?

ArnabChatterjee (Fri, 01 Dec 2017 08:22:42 GMT):
@MohammadObaid - Can you try setting request-timeout parameter? `node app.js --request-timeout 60000` ?

MohammadObaid (Fri, 01 Dec 2017 09:30:48 GMT):
@Vadim I defined orgb as well in network-config.json file. Although orgb peers is on another server but all docker peers container accessible by private ip's

Vadim (Fri, 01 Dec 2017 09:32:30 GMT):
@MohammadObaid make sure you send proposals to that peers. The error message (ENDORSEMENT_POLICY_FAILURE) means that the peer when committing the tx could not validate the endorsement policy, meaning that some signatures were missing

MohammadObaid (Fri, 01 Dec 2017 09:33:02 GMT):
Yeah I understood but how can I check that. I assume sdk would do that

Vadim (Fri, 01 Dec 2017 09:33:14 GMT):
in the log I also see two orga peers, but no orgb peers

Vadim (Fri, 01 Dec 2017 09:34:23 GMT):
@MohammadObaid get all peers from the channel and check whether orgb peers are also there

Vadim (Fri, 01 Dec 2017 09:34:46 GMT):
and then check your code, maybe it discards peers from other org somewhere

MohammadObaid (Fri, 01 Dec 2017 09:41:53 GMT):
Is there any docs which tell how to get all peers of the channel? I cant find

Vadim (Fri, 01 Dec 2017 09:43:50 GMT):
https://fabric-sdk-node.github.io/Channel.html, channel.getPeers()

MohammadObaid (Fri, 01 Dec 2017 09:56:08 GMT):
Alright. One thing I want to know in latest node sdk versions, we dont pass `peers` paramter in invoke queries then how does sdk send that to endorsing peers?

Vadim (Fri, 01 Dec 2017 09:57:34 GMT):
it takes peers which are registered on a channel

MohammadObaid (Fri, 01 Dec 2017 10:02:42 GMT):
ok

MohammadObaid (Fri, 01 Dec 2017 11:55:17 GMT):
@Vadim You are right. Proposal is only sending to one peer. Seems like problem lies here https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/invoke-transaction.js#L31 . `peerNames` varaible contain two peers `peer1st-orga` and `peer1st-orgb` while `target` varaible returns only url path of `peer1st-orga` . I dont know why it is returning url of only one peer while I clearly defined ip of all peers in network-config.json file

MohammadObaid (Fri, 01 Dec 2017 11:56:12 GMT):
Is it something related to this? https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/config.json#L2

Vadim (Fri, 01 Dec 2017 11:57:16 GMT):
I think it's because it retrieves peers for a specific org as the `helper.newPeers(peerNames, org) ` suggests

MohammadObaid (Fri, 01 Dec 2017 12:17:00 GMT):
Hmm. So how does node sdk normally perform transaction with AND endorsement policy ? Should org contains an array containing orgname ? After hard coding `org='orgb'` . I was able to get endorsement signature from orgb peers

Vadim (Fri, 01 Dec 2017 12:18:07 GMT):
@MohammadObaid you as a developer need to make sure that you pass proposals to peers according to the policy

Vadim (Fri, 01 Dec 2017 12:18:52 GMT):
you either add all peers to channel and then don't specify `targets` property on sendProposal, or you pass the necessary peers using that property

joshhw (Fri, 01 Dec 2017 14:20:52 GMT):
has anyone run into issues with TLS length?

Vadim (Fri, 01 Dec 2017 14:45:33 GMT):
what is the issue @joshhw ?

joshhw (Fri, 01 Dec 2017 15:11:39 GMT):
@Vadim ``` 'use strict'; /* * Copyright IBM Corp All Rights Reserved * * SPDX-License-Identifier: Apache-2.0 */ /* * Enroll the admin user */ var Fabric_Client = require('fabric-client'); var Fabric_CA_Client = require('fabric-ca-client'); var path = require('path'); var util = require('util'); var os = require('os'); var fs = require('fs'); // var fabric_client = new Fabric_Client(); var fabric_ca_client = null; var admin_user = null; var member_user = null; var keyPath = path.join(__dirname, '/crypto-config/peerOrganizations/org.example.com/users/Admin\@org.example.com/msp/keystore/1180beb83d88289e5f183268853efc694403ed5c149b2f79e9239e80b250a3f4_sk'); var keyPEM = Buffer.from(fs.readFileSync(keyPath)).toString(); var certPath = path.join(__dirname, '/crypto-config/peerOrganizations/org.example.com/users/Admin\@org.example.com/msp/signcerts/Admin\@org.example.com-cert.pem'); var certPEM = Buffer.from(fs.readFileSync(certPath)).toString(); var store_path = path.join(__dirname, 'hfc-key-store'); console.log(' Store path:'+store_path); console.log('certPem: ' + certPEM.toString()); console.log('keyPEM:' + keyPEM.toString()) // create the key value store as defined in the fabric-client/config/default.json 'key-value-store' setting Fabric_Client.newDefaultKeyValueStore({ path: store_path }).then((state_store) => { // assign the store to the fabric client fabric_client.setStateStore(state_store); var crypto_suite = Fabric_Client.newCryptoSuite(); // use the same location for the state store (where the users' certificate are kept) // and the crypto store (where the users' keys are kept) var crypto_store = Fabric_Client.newCryptoKeyStore({path: store_path}); crypto_suite.setCryptoKeyStore(crypto_store); fabric_client.setCryptoSuite(crypto_suite); var tlsOptions = { trustedRoots: [], verify: false }; // be sure to change the http to https when the CA is running TLS enabled fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', tlsOptions , 'ca.org.example.com', crypto_suite); // first check to see if the admin is already enrolled return fabric_client.getUserContext('Admin', true); }).then((user_from_store) => { console.log("user:" + user_from_store); if (user_from_store && user_from_store.isEnrolled()) { console.log('Successfully loaded admin from persistence'); admin_user = user_from_store; return null; } else { // need to enroll it with CA server return fabric_ca_client.enroll({ enrollmentID: 'admin', enrollmentSecret: 'adminpw' }).then((enrollment) => { console.log('Successfully enrolled admin user "admin"'); return fabric_client.createUser( {username: 'Admin', mspid: 'PayerMSP', cryptoContent: { privateKeyPEM: keyPEM.toString(), signedCertPEM: certPEM.toString() } }); }).then((user) => { admin_user = user; return fabric_client.setUserContext(admin_user); }).catch((err) => { console.error('Failed to enroll and persist admin. Error: ' + err.stack ? err.stack : err); throw new Error('Failed to enroll admin'); }); } }).then(() => { console.log('Assigned the admin user to the fabric client ::' + admin_user.toString()); }).catch((err) => { console.error('Failed to enroll admin: ' + err); }); ```

joshhw (Fri, 01 Dec 2017 15:12:05 GMT):
@Vadim So I've been trying to get this to work, and I've modified it to pass in the certs generated by the cryptogen

Vadim (Fri, 01 Dec 2017 15:12:12 GMT):
use pastebin for this kind of things

joshhw (Fri, 01 Dec 2017 15:12:23 GMT):
@Vadim my bad. I'll reformat and send again

joshhw (Fri, 01 Dec 2017 15:15:13 GMT):
@Vadim http://pasted.co/c6677b96

bretharrison (Fri, 01 Dec 2017 15:16:47 GMT):
@ArnabChatterjee The `Client` from the `require('fabric-client`)` provides a utility that we can get a `client` instance from and from the `client` we can get the other needed objects, like peers and channels.

joshhw (Fri, 01 Dec 2017 15:17:26 GMT):
@Vadim so when I run that command this error occurs on the CA:

joshhw (Fri, 01 Dec 2017 15:17:26 GMT):
@Vadim so when I run that command this error occurs on the CA: ``` 2017/12/01 15:16:46 http: TLS handshake error from 172.19.0.1:44022: tls: oversized record received with length 21536

Vadim (Fri, 01 Dec 2017 15:18:02 GMT):
I don't think you need to use CA if you use user certs from cryptogen

joshhw (Fri, 01 Dec 2017 15:18:14 GMT):
don't I need a CA to generate new users?

joshhw (Fri, 01 Dec 2017 15:18:33 GMT):
or members is what I think they're called

joshhw (Fri, 01 Dec 2017 15:18:41 GMT):
for the client side of the blockchain

Vadim (Fri, 01 Dec 2017 15:18:47 GMT):
you said you use cryptogen?

Vadim (Fri, 01 Dec 2017 15:18:47 GMT):
you said you use cryptogen users?

joshhw (Fri, 01 Dec 2017 15:19:05 GMT):
I use cryptogen to generate the certs, but this doesn't generate usernames/passwords

Vadim (Fri, 01 Dec 2017 15:20:19 GMT):
which fabric-sample do you use? I think they already handle new user creation with ca.

joshhw (Fri, 01 Dec 2017 15:21:04 GMT):
@Vadim I've attempted to manipulate fabcar

joshhw (Fri, 01 Dec 2017 15:21:22 GMT):
I'm modifiing everything based on what that example code does

Vadim (Fri, 01 Dec 2017 15:21:47 GMT):
but registerUser.js seems to do user registration

joshhw (Fri, 01 Dec 2017 15:22:44 GMT):
right, but I would need an admin account first

joshhw (Fri, 01 Dec 2017 15:22:55 GMT):
so I was trying to register the Admin account I had created with Cryptogen

Vadim (Fri, 01 Dec 2017 15:23:45 GMT):
you don't need Admin from cryptogen to register new users

joshhw (Fri, 01 Dec 2017 15:23:51 GMT):
why is that?

Vadim (Fri, 01 Dec 2017 15:24:06 GMT):
you need CA admin user and registerUser already handles that

joshhw (Fri, 01 Dec 2017 15:24:23 GMT):
so what are the certs I generated for?

joshhw (Fri, 01 Dec 2017 15:24:31 GMT):
if I'm pointing them to the CA server

Vadim (Fri, 01 Dec 2017 15:25:03 GMT):
that admin is org admin and peer admin at the same time and it's used to create/join channels and install/instantiate chaincodes

joshhw (Fri, 01 Dec 2017 15:25:16 GMT):
the admin from certs?

joshhw (Fri, 01 Dec 2017 15:25:21 GMT):
cryptogen that is

Vadim (Fri, 01 Dec 2017 15:25:26 GMT):
yes

joshhw (Fri, 01 Dec 2017 15:25:39 GMT):
so how would my node server go about instantiating chaincode?

Vadim (Fri, 01 Dec 2017 15:25:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hadBuAZPYXzKu8Ywz) that's correct in case you are talking about org CA certs

joshhw (Fri, 01 Dec 2017 15:25:59 GMT):
would it use my CA admin account?

joshhw (Fri, 01 Dec 2017 15:26:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fWThwJtmerLtZEnKp) @Vadim I am

joshhw (Fri, 01 Dec 2017 15:26:23 GMT):
but what does that do then?

Vadim (Fri, 01 Dec 2017 15:26:25 GMT):
no, you need to load Org admin for that

Vadim (Fri, 01 Dec 2017 15:27:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yozrftH6emPpmP9FF) this will enable CA to correctly sign the user certs that you register and those user will be able to submit proposals/transactions to the network

joshhw (Fri, 01 Dec 2017 15:27:20 GMT):
is there a better example set of node setup I should be looking at?

joshhw (Fri, 01 Dec 2017 15:27:37 GMT):
I'm trying to link my fabric instance to a node server so I can start building rest calls and a front end

Vadim (Fri, 01 Dec 2017 15:28:32 GMT):
check balance-transfer since it implements rest calls

joshhw (Fri, 01 Dec 2017 15:29:02 GMT):
@Vadim ok, have you messed around with the 1.1 release?

joshhw (Fri, 01 Dec 2017 15:29:10 GMT):
that balance transfer uses

Vadim (Fri, 01 Dec 2017 15:29:19 GMT):
with 1.1-preview yes

Vadim (Fri, 01 Dec 2017 15:29:28 GMT):
also, you can switch back to 1.0.4

joshhw (Fri, 01 Dec 2017 15:29:38 GMT):
@Vadim referring here to the master branch of the fabric samples repo

Vadim (Fri, 01 Dec 2017 15:29:58 GMT):
if you switch to release branch, that should be compatible with 1.0.4 I think

joshhw (Fri, 01 Dec 2017 15:30:08 GMT):
@Vadim ok.

joshhw (Fri, 01 Dec 2017 15:30:21 GMT):
@Vadim have you built a custom fabric setup with node yet?

Vadim (Fri, 01 Dec 2017 15:30:30 GMT):
well yes

joshhw (Fri, 01 Dec 2017 15:31:10 GMT):
@Vadim what were some pitfalls, if any, that you experienced but now understand that someone such as myself will eventually run into?

joshhw (Fri, 01 Dec 2017 15:33:12 GMT):
@Vadim no need to answer if its something long. I'm trying to spot the potholes before I run them over is all.

nharshita (Fri, 01 Dec 2017 15:36:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8fF9ttfkQuTRuHcZf) @MohammadObaid release version of balance-transfer code doesn't send proposals only to the organization, derived from token we pass while invoking the request

MohammadObaid (Fri, 01 Dec 2017 15:40:17 GMT):
@nharshita Can we set var `org` as `[orga,orgb]` in https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/invoke-transaction.js#L31 . ? Rightnow org datatype is set to `string` which takes input only one org name as `org=orga` .This causing me a problem because I have set endorsment policy `AND`with two different organization and since `helper.newPeers()` function take `orgname , peer name` and return url of that peer , it sets orgname same for both peers belonging to two different organization and sending proposal to only one peer and thus breaking endorsement policy .

nharshita (Fri, 01 Dec 2017 15:45:49 GMT):
which is done newPeers function in helper.js code. So to send request proposal to second organization (with 2-of policy from different MSPs required), I updated newPeers to add org2 peer details also .. this is crude way of simulation //My addition let data = fs.readFileSync(path.join(__dirname, ORGS['org2']['peer2']['tls_cacerts'])); targets.push(new Peer('grpcs://' + 'localhost:8051', { pem: Buffer.from(data).toString(), 'ssl-target-name-override': "peer2" }));

nharshita (Fri, 01 Dec 2017 15:47:19 GMT):
I have also tried to remove this hardcoding for org2. but needs changes in other files too.

nharshita (Fri, 01 Dec 2017 15:47:57 GMT):
not sure whether i'll be able to give you a patch here, let me try once

nharshita (Fri, 01 Dec 2017 15:48:44 GMT):

endorse_test_code_changes_v1.0.4.txt

nharshita (Fri, 01 Dec 2017 15:58:11 GMT):
Coming to v1.1.0-preview version of balance-transfer, endorsement requests are send to all endorsers from different organizations. SDK handles this internally. This can be simulated with the help of 1) endorsingPeer flag in artifacts/network-config.yaml. 2) pass targets (optional parameter in the transaction porposal request) from the command -- needs minor code changes to the balance-transfer

MohammadObaid (Fri, 01 Dec 2017 16:00:58 GMT):
Hmm and rightnow balance transfe is of version 1.0.2 right?

nharshita (Fri, 01 Dec 2017 16:04:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XGT3RM2mdWkjwrTyu) @MohammadObaid this doesn't help, when i tested similar to your idea (mentioned below), i saw target->peer object is not populated properly (few fields like objects, endpoint ) var targets = (peerNames) ? helper.newPeers(peerNames, org) : undefined; var tgt = helper.newPeers(peerNames, "org2"); targets.push(tgt);

MohammadObaid (Fri, 01 Dec 2017 16:05:45 GMT):
Yeah . I am looking for some solution . Some sort of loop I guess wil work to populate tagets variable but I am not sure

MohammadObaid (Fri, 01 Dec 2017 16:05:45 GMT):
Yeah . I am looking for some solution . Some sort of loop I guess wil work to populate targets variable but I am not sure

nharshita (Fri, 01 Dec 2017 16:05:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=i8if5T3iZ48RM8nkf) @MohammadObaid v1.1.0-preview is the latest tag, where as v1.0.2 is old when compared

nharshita (Fri, 01 Dec 2017 16:07:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6oeroj9M8k3D6QSMj) @MohammadObaid you can try with the patch i have uploaded for release version. with that should be able to test AND policy successfully. I have tested it successfully

Vadim (Fri, 01 Dec 2017 16:10:23 GMT):
@MohammadObaid have you tried to set `targets = undefined` here https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/invoke-transaction.js#L31 ? Then it should just send the data to all peers registered on a channel (assuming that the example adds all peers from network-config to the channel object)

Vadim (Fri, 01 Dec 2017 16:11:46 GMT):
maybe even you can omit the targets parameter in the POST request, should have the same effect I guess

Vadim (Fri, 01 Dec 2017 16:13:03 GMT):
not targets but peers or orgname

MohammadObaid (Fri, 01 Dec 2017 16:13:39 GMT):
@Vadim Yeah initially I did this but problem is it only picking peers from one org only . My problem is all peers are not running on localhost rather it is running on local network with each docker container assingned a private ip.

MohammadObaid (Fri, 01 Dec 2017 16:13:53 GMT):
I ran ansible scripts to constrcut fabric network

Vadim (Fri, 01 Dec 2017 16:13:56 GMT):
but is it in your network-config?

Vadim (Fri, 01 Dec 2017 16:14:03 GMT):
it does not matter how your network is run

Vadim (Fri, 01 Dec 2017 16:14:11 GMT):
it matters what the nodejs app does

MohammadObaid (Fri, 01 Dec 2017 16:14:41 GMT):
Yeah I mentioned all endorsing organization with correct ip address in network-config file but I dont know why it fails to pick other org mentioned in network-config file

Vadim (Fri, 01 Dec 2017 16:15:52 GMT):
well, I quickly browsed the code, it seems it's very much org scoped. So you need to tell it which org peers to load and then it does it

nharshita (Fri, 01 Dec 2017 16:16:26 GMT):
If you are okay, to switch to v1.1.0-preview balance-transfer, no patches needed to test endorsement policy. Unless you want to try passing target peers from command line. That is easy to figure out, anyway. https://github.com/hyperledger/fabric-sdk-node/blob/v1.1.0-preview/fabric-client/lib/Channel.js#L1702 does targets population based on artifacts/network-config.yaml

nharshita (Fri, 01 Dec 2017 16:18:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GZmcFTtoxAgrtPsPt) @Vadim This is only true wrt release version. in latest v1.1.0-preview , endorsing peers are populated properly https://github.com/hyperledger/fabric-sdk-node/blob/v1.1.0-preview/fabric-client/lib/Channel.js#L1260

Vadim (Fri, 01 Dec 2017 16:18:46 GMT):
@nharshita I know

Vadim (Fri, 01 Dec 2017 16:18:56 GMT):
I'm using it myswlf

Vadim (Fri, 01 Dec 2017 16:18:56 GMT):
I'm using it myself

nharshita (Fri, 01 Dec 2017 16:20:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NmATcCbr2edKG6uv3) @Vadim Okay, I'm just trying to be specific, wrt version differences.

MohammadObaid (Fri, 01 Dec 2017 16:21:38 GMT):
Aright thanks :) I will try it with latest v1.1.0 and let you know the results

MohammadObaid (Fri, 01 Dec 2017 16:23:05 GMT):
@Vadim [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GZmcFTtoxAgrtPsPt) how can we tell which org peers to load . As far as I know only way to do it in network-config file . Is there any other files which I need to take care of?

Vadim (Fri, 01 Dec 2017 16:24:03 GMT):
@MohammadObaid check helper.newRemotes, it just takes peers from an org section in network-config

Vadim (Fri, 01 Dec 2017 16:24:35 GMT):
maybe you can try to move peers from orgb to orga too, maybe that will work

Vadim (Fri, 01 Dec 2017 16:24:35 GMT):
maybe you can try to move peers from orgb to orga in network-config, maybe that will work

MohammadObaid (Fri, 01 Dec 2017 16:31:04 GMT):
Hmm . Thanks :) I will try that but I think this will break couple of things like mspid , admincerts in network-config.json file

C.Jason.Phelps (Fri, 01 Dec 2017 16:58:18 GMT):
`sendPeersProposal - Promise is rejected: Error: Unknown chaincodeType: NODE`

C.Jason.Phelps (Fri, 01 Dec 2017 18:59:36 GMT):
fabric balance-transfer example is now giving me the above error when trying to instantiate the chain code. I have pulled down newer versions of docker images nd dont recall the previous version I was using(dont know if that is the issue or not)

C.Jason.Phelps (Fri, 01 Dec 2017 18:59:36 GMT):
fabric balance-transfer example is now giving me the above error when trying to instantiate the chain code. I have pulled down fresh versions of docker images and dont recall the previous version I was using(dont know if that is the issue or not)

bretharrison (Fri, 01 Dec 2017 19:15:25 GMT):
@C.Jason.Phelps Check your docker images, looks as if the peer is not at 1.1.xxx, or pull down an older/release version of balance-transfer

MohammadObaid (Fri, 01 Dec 2017 19:18:37 GMT):
@nharshita if I applied your patch on v1.0.2 do I need to convert network-config.json file to network-config.yaml file and update node to 8.4 or will it work with existing setup?

nharshita (Fri, 01 Dec 2017 21:12:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3kQfNBf4MJZMS6ucM) @MohammadObaid unless you have changed your network, patch itself is sufficient for the testing. In other words, The setup which you have it for running balance-transfer without endorsement policy is enought. BTW, the patch is for fabric-samples/balance-transfer release version (b99e1b8da2bc4d17f689c152078d96e8f6428a27). So

nharshita (Fri, 01 Dec 2017 21:13:47 GMT):
(as you may know), please look for conflicts, if you are applying it (with patch command) to 1.0.2

nharshita (Fri, 01 Dec 2017 21:24:20 GMT):
Logic similar to that of the one in the patch should be applied for older versions (prior to v1.1.0-preview) like 1.0.2, 1.0.0. You may check comments present in the patch for information on code changes. hope it helps.

nharshita (Fri, 01 Dec 2017 21:40:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SrLDaZeHtWzgTig7r) @ArnabChatterjee As I understand it, side note point 3 'transaction validation' is done by committing peers (specifically *VSCC*) instead of orderer.

ArnabChatterjee (Sat, 02 Dec 2017 03:47:32 GMT):
@nharshita - Yes you are right. Some one has corrected me in the following conversation. :)

nharshita (Sat, 02 Dec 2017 03:57:58 GMT):
oh, okay, missed the conversation. Sorry

ArnabChatterjee (Sat, 02 Dec 2017 04:01:43 GMT):
@MohammadObaid - I faced similar problem. I had an endorsement policy that required signature of both orgs to pass and since I ommitted the targets from the request only peers within the same org were receiving the request. I tried all sorts of combos and finally learnt that with SDK v1.0.x app needs to set the targets variable manually to all EP of all orgs it was interested in getting the endorsement from. So, I think you have to manually reset the targets array and send it explicitly in the request.

ArnabChatterjee (Sat, 02 Dec 2017 04:07:49 GMT):
You can refer to my post https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SrLDaZeHtWzgTig7r

MohammadObaid (Sat, 02 Dec 2017 09:01:20 GMT):
@nharshita @Vadim Thanks a lot for your helps . Preview release works fine for me :)

Amjadnz (Sun, 03 Dec 2017 06:24:45 GMT):
Can anyone put this into perspective I have policy of "1 of 2" - and am submitting a query transaction to the validating peer. ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed evaluating policy on signed data during check policy on channel [adx-agm-channel] with policy [/Channel/Application/Writers]: [Failed to reach implicit threshold of 1 sub-policies, required 1 remaining]```

Amjadnz (Sun, 03 Dec 2017 06:26:38 GMT):
```sudo node ./test/integration/e2e/create-channel.js sudo node ./test/integration/e2e/join-channel.js sudo node ./test/integration/e2e/install-chaincode.js sudo node ./test/integration/e2e/instantiate-chaincode.js```

Amjadnz (Sun, 03 Dec 2017 06:27:17 GMT):
All these work fine - when I see the instantiated images I get the following as docker images

Amjadnz (Sun, 03 Dec 2017 06:27:17 GMT):
All these work fine - when I see the instantiated images I get the following as docker containers

Amjadnz (Sun, 03 Dec 2017 06:27:55 GMT):
```a7e69954c09a dev-peer0.auditor.ubn.ae-adxagmchannel-v0-b29d2353dffa352bc71a6ef211f76bacc514e62bf1fe6ab165755f66ff30600a "chaincode -peer.a..." 12 minutes ago Up 12 minutes dev-peer0.auditor.ubn.ae-adxagmchannel-v0 21f75751673d dev-peer0.adx.ubn.ae-adxagmchannel-v0-1e9afbd5d07dd81fa56c8ed941ff597013d53bc6b4cccff764de5200f5dbb150 "chaincode -peer.a..." 12 minutes ago Up 12 minutes dev-peer0.adx.ubn.ae-adxagmchannel-v0 07a7258a9405 dev-peer0.broker.ubn.ae-adxagmchannel-v0-04815f622c24face358484ff06a06cd0f2b35e3a15439e6ee5fbf71918e9db5c "chaincode -peer.a..." 12 minutes ago Up 12 minutes dev-peer0.broker.ubn.ae-adxagmchannel-v0 f556cd06c2b8 dev-peer0.sca.ubn.ae-adxagmchannel-v0-e241adae435df6ddac58216d166f807c5a6a82f302906158c7fd040660affc2e "chaincode -peer.a..." 12 minutes ago Up 12 minutes dev-peer0.sca.ubn.ae-adxagmchannel-v0 2ea49fd3de56 dev-peer0.online.ubn.ae-adxagmchannel-v0-81b08770d0522aa3a003afbd7c9182c55706734ce02818806942695e14703ca0 "chaincode -peer.a..." 12 minutes ago Up 12 minutes dev-peer0.online.ubn.ae-adxagmchannel-v0 ```

Amjadnz (Sun, 03 Dec 2017 06:28:56 GMT):
But I when I query the same code - the example_cc used with the nodejs kit `sudo node ./test/integration/e2e/query.js` I get the above error

MohammadObaid (Sun, 03 Dec 2017 09:39:19 GMT):
@ArnabChatterjee Have you worked on eventhub in node sdk?

MohammadObaid (Sun, 03 Dec 2017 15:20:48 GMT):
Hi all . Can I listen to an event for committed blocks using node sdk ? I think this is the code for eventhub https://github.com/hyperledger/fabric-samples/blob/v1.1.0-preview/balance-transfer/app/invoke-transaction.js#L86-L121 but I am not sure how to setup a listener on ubuntu terminal so that everytime block is committed , event will be triggered on my terminal !!

LadarX (Mon, 04 Dec 2017 01:59:25 GMT):
Has joined the channel.

nharshita (Mon, 04 Dec 2017 05:54:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FkP45ubtYzkhvFEH6) @MohammadObaid Do you mean to setup listener on a system (other than client app)?

MohammadObaid (Mon, 04 Dec 2017 05:58:53 GMT):
On a client

nharshita (Mon, 04 Dec 2017 05:59:07 GMT):
If it is the case, you may try running block-listener chaincode https://github.com/hyperledger/fabric/tree/v1.1.0-preview/examples/events/block-listener on the required machine, as an option.

MohammadObaid (Mon, 04 Dec 2017 06:00:13 GMT):
@nharshita can't we do it using node sdk ?

nharshita (Mon, 04 Dec 2017 06:01:28 GMT):
the lines you have mentioned are the ones responsible

nharshita (Mon, 04 Dec 2017 06:04:33 GMT):
oh, you are looking for block addition right? code you pointed listens for transaction events. Similarly we have it for block, API is https://fabric-sdk-node.github.io/EventHub.html#registerBlockEvent

nharshita (Mon, 04 Dec 2017 06:09:15 GMT):
You can find the sample use in fabric-samples/balance-transfer/app/join-channel.js

MohammadObaid (Mon, 04 Dec 2017 06:15:44 GMT):
Yeah . thanks :) I found that in join-channel.js code . I can also make a seperate function in js file for block event and then call using curl to listen for block event right?

MohammadObaid (Mon, 04 Dec 2017 06:21:34 GMT):
if I connect node sdk with my existing network then I dont think this joinchannel.js file called

C0rnelius (Mon, 04 Dec 2017 08:24:22 GMT):
Has joined the channel.

nharshita (Mon, 04 Dec 2017 09:52:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SWd5KZv2anrBrDsuJ) @MohammadObaid Hope you meant to say, Some code (similar to the one in join channel) should be keep on listening for the block event to occur at the client side.

MohammadObaid (Mon, 04 Dec 2017 09:53:03 GMT):
@nharshita yeah .

nharshita (Mon, 04 Dec 2017 09:57:42 GMT):
okay. yes.

Ferdoran (Mon, 04 Dec 2017 15:05:06 GMT):
Hello everybody, I am having a problem with the CA I guess. I am using the helper.js from the *balance_transfer* example in my code. But when I try to query the ledger I get the following problem: ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority``` It seems like wrong certificates are being used or passed. I checked my cert files, paths, etc. multiple times and I am really sure they are all correct. Is this maybe a bug?

Ferdoran (Mon, 04 Dec 2017 15:05:49 GMT):
I am using Docker Version 17.09.0-ce

Vadim (Mon, 04 Dec 2017 15:22:57 GMT):
@Ferdoran did you use cryptogen to generate certs for your network?

Ferdoran (Mon, 04 Dec 2017 15:33:21 GMT):
@Vadim Yes I did. I just solved this issue. I was generating new certs on every startup of the network and did not update the ca.certfile and ca.keyfile in the docker-compose.yaml

Vadim (Mon, 04 Dec 2017 15:33:35 GMT):
all right

MohammadObaid (Mon, 04 Dec 2017 15:46:32 GMT):
@nharshita @Vadim for `registerTxEvent` https://fabric-sdk-node.github.io/EventHub.html#EventHub__anchor one has to pass txid to setup listener am I right? If yes then we can pass txid from curl query to listen for tx event status ?

Vadim (Mon, 04 Dec 2017 15:47:25 GMT):
@MohammadObaid yes, yes.

jrosmith (Mon, 04 Dec 2017 16:43:25 GMT):
hey all, how long is it taking you to install chaincode via the node sdk? I'm installing a ~20 MB tar file and its taking close to 20 minutes to actually receive a proposal response

bretharrison (Mon, 04 Dec 2017 17:48:51 GMT):
@MohammadObaid The process to listen to block events is the same as listening to a specific transaction, it might be a bit harder to process as you will have to know what to look for in the block that is returned when your callback called. Used the `registerBlockEvent` to register for block events with the eventHub and register your callback to get called.

bretharrison (Mon, 04 Dec 2017 17:50:03 GMT):
@jrosmith Use the latest NodeSDK, there has been some changes to speed up the hashing should really help with the chaincode install.

MohammadObaid (Mon, 04 Dec 2017 17:51:10 GMT):
Yeah I am having a hard time in getting this.I am able to get blockevents in main node console but I wanted to get all block notiifcations in seperate console for which I tried to call this api using curl but not been able to get any event . I think I am doing it in a wrong way. i tried to add timedelay but it didnt work. ``` app.post('/channels/:channelName/peers', async function(req, res) { logger.info('<<<<<<<<<<<<<<<<< J O I N C H A N N E L >>>>>>>>>>>>>>>>>'); var channelName = req.params.channelName; var peers = req.body.peers; logger.debug('channelName : ' + channelName); logger.debug('peers : ' + peers); logger.debug('username :' + req.username); logger.debug('orgname:' + req.orgname); if (!channelName) { res.json(getErrorMessage('\'channelName\'')); return; } if (!peers || peers.length == 0) { res.json(getErrorMessage('\'peers\'')); return; } let message = await join.joinChannel(channelName, peers, req.username, req.orgname); ```

MohammadObaid (Mon, 04 Dec 2017 17:51:10 GMT):
@bretharrison Yeah I am having a hard time in getting this.I am able to get blockevents in main node console but I wanted to get all block notiifcations in seperate console for which I tried to call this api using curl but not been able to get any event . I think I am doing it in a wrong way. i tried to add timedelay but it didnt work. ``` app.post('/channels/:channelName/peers', async function(req, res) { logger.info('<<<<<<<<<<<<<<<<< J O I N C H A N N E L >>>>>>>>>>>>>>>>>'); var channelName = req.params.channelName; var peers = req.body.peers; logger.debug('channelName : ' + channelName); logger.debug('peers : ' + peers); logger.debug('username :' + req.username); logger.debug('orgname:' + req.orgname); if (!channelName) { res.json(getErrorMessage('\'channelName\'')); return; } if (!peers || peers.length == 0) { res.json(getErrorMessage('\'peers\'')); return; } let message = await join.joinChannel(channelName, peers, req.username, req.orgname); ```

jrosmith (Mon, 04 Dec 2017 18:02:11 GMT):
@bretharrison thank you!

bretharrison (Mon, 04 Dec 2017 20:12:08 GMT):
@MohammadObaid How are you registering for the block event ?

MohammadObaid (Mon, 04 Dec 2017 20:25:55 GMT):
@bretharrison I used this code from join-channel.js to register block event https://github.com/hyperledger/fabric-samples/blob/v1.1.0-preview/balance-transfer/app/join-channel.js#L16-L93

bretharrison (Mon, 04 Dec 2017 20:48:23 GMT):
@MohammadObaid That code is promise based on the join channel promise and within a REST service. I would think that you not want to have a promise/REST in the middle of a long running event registration and the callback, not sure how the fabric-client NodeSDK REST service would be able to call back to a REST client. Is your service going to keep that block events somewhere in storage for the REST client would do a post to see them ?

bretharrison (Mon, 04 Dec 2017 20:48:23 GMT):
@MohammadObaid That code is promise based on the join channel promise and within a REST service. I would think that you not want to have a promise/REST in the middle of a long running event registration and the callback, not sure how the fabric-client NodeSDK REST service would be able to call back to a REST client. Is your service going to keep the block events somewhere in storage for the REST client would do a post to get a list of block event that have occurred on the peer?

bretharrison (Mon, 04 Dec 2017 20:48:23 GMT):
@MohammadObaid That code is promise based on the join channel promise and within a REST service. I would think that you not want to have a promise/REST in the middle of a long running event registration and the callback, not sure how the fabric-client NodeSDK REST service would be able to call back to a REST client. Is your service going to keep the block events somewhere in storage for the REST client would do a post to get a list of block events that have occurred on the peer?

bretharrison (Mon, 04 Dec 2017 20:48:23 GMT):
@MohammadObaid That code is promise based on the join channel action and within a REST service. I would think that you not want to have a promise/REST in the middle of a long running event registration and the callback, not sure how the fabric-client NodeSDK REST service would be able to call back to a REST client. Is your service going to keep the block events somewhere in storage for the REST client would do a post to get a list of block events that have occurred on the peer?

bretharrison (Mon, 04 Dec 2017 20:48:23 GMT):
@MohammadObaid That code is promise based on the join channel action and within a REST service. I would think that you not want to have a promise/REST in the middle of a long running event registration and the callback, not sure how the fabric-client NodeSDK REST service would be able to call back to a REST client. Is your service going to keep the block events somewhere in storage for the REST client to do a post to get a list of block events that have occurred on the peer?

MohammadObaid (Mon, 04 Dec 2017 21:04:35 GMT):
Yeah that's what I want to . Let's say I have a UI which logs all the block event so that if user of particular org logs in, he will get all block committed event

abc123 2 (Tue, 05 Dec 2017 05:47:55 GMT):
Has joined the channel.

abc123 2 (Tue, 05 Dec 2017 07:40:00 GMT):
Hi is there any possibility terminate the created channel in fabric-sdk?

kamisdy (Tue, 05 Dec 2017 08:51:52 GMT):
Has joined the channel.

balakrishna.devasani (Tue, 05 Dec 2017 11:06:16 GMT):

Clipboard - December 5, 2017 4:36 PM

balakrishna.devasani (Tue, 05 Dec 2017 11:06:16 GMT):
Hi all, I'm facing "permission" error when trying to deploy(install) go chaincode into bluemix enterprise blockchain network. Error : chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])) Any help would be greatly appreciated.

Vadim (Tue, 05 Dec 2017 11:50:55 GMT):
@balakrishna.devasani you have to use peer admin identity for installation

balakrishna.devasani (Tue, 05 Dec 2017 12:16:42 GMT):
@Vadim I don't see any users like peer admin in bluemix enterprise credentials file. I can see only "admin" user

Vadim (Tue, 05 Dec 2017 12:23:11 GMT):
@balakrishna.devasani I'm not familiar with bluemix setup, but the error tells you that it needs peer admin

Vadim (Tue, 05 Dec 2017 12:23:11 GMT):
@balakrishna.devasani I'm not familiar with bluemix setup, but the error tells you that the user you use is not authorized to install chaincodes

balakrishna.devasani (Tue, 05 Dec 2017 12:25:01 GMT):
@Vadim I'm trying to debug the issue, ensuring that I'm using the right admin user. Thank you for your reply.

simcan (Tue, 05 Dec 2017 14:44:07 GMT):
Hello, I successfully invoked a chaincode using CLI in a network without any fabric CA. Now I want to use the node SDK to make queries and invocations. What should I do?

ashablyg (Tue, 05 Dec 2017 15:51:07 GMT):
@simcan I would recommend starting with the balance-transfer sample. It has a pretty good setup for Node. You might want to consider looking into CA Server though.

simcan (Tue, 05 Dec 2017 15:54:30 GMT):
Thanks for your reply!

simcan (Tue, 05 Dec 2017 15:57:40 GMT):
I have read some code in that sample. I think I need to add a CA to my network

ashablyg (Tue, 05 Dec 2017 15:59:31 GMT):
Yeah so the CA should register your "client" so you can communicate with the fabric using node SDK

ashablyg (Tue, 05 Dec 2017 15:59:54 GMT):
There's a way to do it without the CA, but I've yet to figure that out =/

simcan (Tue, 05 Dec 2017 16:02:24 GMT):
ok i'll try it

ArnabChatterjee (Wed, 06 Dec 2017 07:55:12 GMT):
Hi. I have read in the SDK documentation https://fabric-sdk-node.github.io/Channel.html#addOrderer__anchor , it says SDK would use only the first orderer to broadcast messages to orderer backend. I exactly do not understand this. If I have multiple orderers for a channel using Kafka-Zookeeper ensemble, does the SDK automatically switch to the other orderers in case the first one fails ? Thanks :)

Vadim (Wed, 06 Dec 2017 08:05:58 GMT):
@ArnabChatterjee it does not, it takes the first orderer on the channel object or the orderer explicitly provided by the caller

ArnabChatterjee (Wed, 06 Dec 2017 08:06:45 GMT):
@Vadim - Thanks Vadim. Any ideas on how I could make my SDK fault tolerant against the orderer?

Vadim (Wed, 06 Dec 2017 08:07:33 GMT):
send request to orderer0, wait if you see error "SERVICE NOT AVAILABLE", repeat request to orderer1 and so on

ArnabChatterjee (Wed, 06 Dec 2017 08:07:59 GMT):
@Vadim - Thanks. :) Will try that.

SimonOberzan (Wed, 06 Dec 2017 09:12:46 GMT):
Does 'FABRIC_CA_SERVER_CA_NAME' on CA have to equal the CA's cert CN? Or is that not mandatory?

SimonOberzan (Wed, 06 Dec 2017 09:12:46 GMT):
Does `FABRIC_CA_SERVER_CA_NAME` on CA have to equal the CA's cert CN? Or is that not mandatory?

simcan (Wed, 06 Dec 2017 10:48:52 GMT):
Hello, I started the Balance Transfer sample. At the beginning I had problems in registering the user but I fixed it by putting the org variable to lower case. Now I have another problem int creating channel

simcan (Wed, 06 Dec 2017 10:49:08 GMT):

jwt.PNG

simcan (Wed, 06 Dec 2017 14:25:44 GMT):
I solved it

PatrickOrtell (Wed, 06 Dec 2017 15:12:59 GMT):
Has joined the channel.

jarias (Wed, 06 Dec 2017 15:33:39 GMT):
Has joined the channel.

jarias (Wed, 06 Dec 2017 15:37:15 GMT):
Hi all, I'm trying to run through the balance transfer sample, but I'm having trouble instatiating the chaincode. I'm sending the requests through postman with the correct headers and body, but I'm getting the following error ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP PayerMSP is unknown at /Users/jarias18/Documents/DME/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15```

jarias (Wed, 06 Dec 2017 15:37:15 GMT):
Hi all, I'm trying to run through the balance transfer sample, but I'm having trouble instatiating the chaincode. I'm sending the requests through postman with the correct headers and body, but I'm getting the following error ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP MSP is unknown at /Users/jarias18/Documents/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15```

bretharrison (Wed, 06 Dec 2017 18:48:49 GMT):
@SimonOberzan The docker compose environment setting of `FABRIC_CA_SERVER_CA_NAME` must be the same as the `caname:` setting when you create a new `FabricCAServices`

SimonOberzan (Wed, 06 Dec 2017 18:50:45 GMT):
@bretharrison I thought so, it has solved my problem

C.Jason.Phelps (Wed, 06 Dec 2017 19:46:46 GMT):

Unknown node type

ashablyg (Wed, 06 Dec 2017 21:45:14 GMT):
Hey guys. Have anyone tried mounting go chaincode with packages through node skd? Looking at balance-transfer sample, and trying to install cc that is in multiple go files. Thanks :)

ashablyg (Wed, 06 Dec 2017 21:45:14 GMT):
Hey guys. Has anyone tried mounting go chaincode with packages through node skd? Looking at balance-transfer sample, and trying to install cc that is in multiple go files. Thanks :)

ashablyg (Wed, 06 Dec 2017 21:45:14 GMT):
Hey guys. Has anyone tried mounting go chaincode with packages through node sdk? Looking at balance-transfer sample, and trying to install cc that is in multiple go files. Thanks :)

ArnabChatterjee (Thu, 07 Dec 2017 00:48:08 GMT):
Hello All, I am trying to setup kafka cluster with 2 orderers in my application with 4 kakfa instances with 3 zookeeper. When using the SDK to create the channel, I am getting a SERVICE UNAVAILABLE error. Upon checking logs of orderer, it was throwing the logs : ``` 2017-12-06 11:10:05.502 UTC [orderer/kafka] Enqueue -> DEBU 4dc [channel: testchainid] Enqueueing envelope... 2017-12-06 11:10:05.502 UTC [orderer/kafka] Enqueue -> WARN 4dd [channel: testchainid] Will not enqueue, consenter for this channel hasn't started yet 2017-12-06 11:10:05.502 UTC [orderer/main] func1 -> DEBU 4de Closing Broadcast stream 2017-12-06 11:10:09.924 UTC [orderer/kafka] try -> DEBU 4df [channel: testchainid] Connecting to the Kafka cluster . . . 2017-12-06 11:12:14.924 UTC [orderer/kafka] try -> DEBU 4f8 [channel: testchainid] Connecting to the Kafka cluster 2017-12-06 11:12:19.834 UTC [grpc] Printf -> DEBU 4f9 grpc: Server.Serve failed to complete security handshake from "172.19.0.1:37570": EOF 2017-12-06 11:12:19.924 UTC [orderer/kafka] try -> DEBU 4fa [channel: testchainid] Connecting to the Kafka cluster . . . 2017-12-06 11:15:00.678 UTC [orderer/kafka] retry -> DEBU 51b [channel: testchainid] Switching to the long retry interval 2017-12-06 11:15:00.678 UTC [orderer/kafka] try -> DEBU 51c [channel: testchainid] Retrying every 5m0s for a total of 12h0m0s . . . 2017-12-06 23:15:00.678 UTC [orderer/kafka] try -> DEBU 5ac [channel: testchainid] Connecting to the Kafka cluster 2017-12-06 23:15:01.431 UTC [orderer/kafka] startThread -> CRIT 5ad [channel: testchainid] Cannot set up producer = kafka: client has run out of available brokers to talk to (Is your cluster reachable?) panic: [channel: testchainid] Cannot set up producer = kafka: client has run out of available brokers to talk to (Is your cluster reachable?) goroutine 19 [running]: panic(0xb31bc0, 0xc420366c30) /opt/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panicf(0xc4201c0600, 0xc6ca2d, 0x29, 0xc420904ae0, 0x2, 0x2) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:194 +0x127 github.com/hyperledger/fabric/orderer/kafka.startThread(0xc420790cf0) /opt/gopath/src/github.com/hyperledger/fabric/orderer/kafka/chain.go:153 +0xfca created by github.com/hyperledger/fabric/orderer/kafka.(*chainImpl).Start /opt/gopath/src/github.com/hyperledger/fabric/orderer/kafka/chain.go:94 +0x3f ``` Mysteriously it was also trying to check for a channel `testchainid` which I dont remember having configured anywhere. `2017-12-06 23:15:00.678 UTC [orderer/kafka] try -> DEBU 5ac [channel: testchainid] Connecting to the Kafka cluster` Any ideas? 🙂 Thanks.

rjones (Thu, 07 Dec 2017 00:59:08 GMT):
Has left the channel.

tallharish (Thu, 07 Dec 2017 01:13:13 GMT):
Has joined the channel.

ash1234singh (Thu, 07 Dec 2017 04:01:17 GMT):
Has joined the channel.

Dpkkmr (Thu, 07 Dec 2017 07:49:44 GMT):
Hi I have a Hyperledger fabric setup using Node SDK with SOLO orderer system. I am interested to switch from SOLO to Kafka based orderer system. Is there any way to migrate the SOLO based system to Kafka based without loosing any transaction data ? or Should I start a new network from beginning?

SimonOberzan (Thu, 07 Dec 2017 08:27:09 GMT):
Hi. When I try to join my peers to the channel, I get a ```[ERROR] Join-Channel - Error: Problem setting up the event hub :Error: event message validation failed: [failed deserializing event creator: [the supplied identity is not valid: x509: certificate signed by unknown authority]] at eh.registerBlockEvent (/app/join-channel.js:94:13) at closer (/app/node_modules/fabric-client/lib/EventHub.js:430:5) ``` error after the channel-join proposals are sent to the peers. Those are the logs of the response on one of the peers: ```2017-12-07 08:10:07.668 UTC [eventhub_producer] validateEventMessage -> DEBU 1e3 ValidateEventMessage starts for signed event 0xc422322510 2017-12-07 08:10:07.669 UTC [eventhub_producer] Chat -> ERRO 1e4 Error handling message: event message validation failed: [failed deserializing event creator: [the supplied identity is not valid: x509: certificate signed by unknown authority]] 2017-12-07 08:10:07.669 UTC [eventhub_producer] validateEventMessage -> DEBU 1e5 ValidateEventMessage starts for signed event 0xc422322c90 2017-12-07 08:10:07.669 UTC [eventhub_producer] Chat -> ERRO 1e6 Error handling message: event message validation failed: [failed deserializing event creator: [the supplied identity is not valid: x509: certificate signed by unknown authority]]``` Now what certificate is that referring to? The previous steps of enrolling an admin and creating channel worked just fine. - ca1.org1 cert: https://pastebin.com/AswPsFhv - peer1.org1 cert: https://pastebin.com/1nAf9Kht - server logs: https://pastebin.com/cuih3STu

SimonOberzan (Thu, 07 Dec 2017 08:27:09 GMT):
Hi. When I try to join my peers to the channel, I get a ```[ERROR] Join-Channel - Error: Problem setting up the event hub :Error: event message validation failed: [failed deserializing event creator: [the supplied identity is not valid: x509: certificate signed by unknown authority]] at eh.registerBlockEvent (/app/join-channel.js:94:13) at closer (/app/node_modules/fabric-client/lib/EventHub.js:430:5) ``` error after the channel-join proposals are sent to the peers. Those are the logs of the response on one of the peers: ```2017-12-07 08:10:07.668 UTC [eventhub_producer] validateEventMessage -> DEBU 1e3 ValidateEventMessage starts for signed event 0xc422322510 2017-12-07 08:10:07.669 UTC [eventhub_producer] Chat -> ERRO 1e4 Error handling message: event message validation failed: [failed deserializing event creator: [the supplied identity is not valid: x509: certificate signed by unknown authority]] 2017-12-07 08:10:07.669 UTC [eventhub_producer] validateEventMessage -> DEBU 1e5 ValidateEventMessage starts for signed event 0xc422322c90 2017-12-07 08:10:07.669 UTC [eventhub_producer] Chat -> ERRO 1e6 Error handling message: event message validation failed: [failed deserializing event creator: [the supplied identity is not valid: x509: certificate signed by unknown authority]]``` Now what certificate is that referring to? The previous steps of enrolling a user and creating channel worked just fine. - ca1.org1 cert: https://pastebin.com/AswPsFhv - peer1.org1 cert: https://pastebin.com/1nAf9Kht - server logs: https://pastebin.com/cuih3STu

ArnabChatterjee (Thu, 07 Dec 2017 09:38:57 GMT):
Hi I was trying to generate custom certs for 2 orgs by changing the name of the domain and all. I went through all the steps in balance transfer but I am unable to do invoke/query transactions of the user admin. I am getting this error : Promise is rejected: Error: ``` Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.Jcompany.domain.com") ``` using node js sdk. I know this is an old query and asked many times. But I want to know the exact process of the deserialization procedure. Can anyone help me out? Thanks. :)

Vadim (Thu, 07 Dec 2017 09:52:03 GMT):
@ArnabChatterjee this means that the cert of the sender of proposal is not trusted by the network, or in other words, the signer of the cert is not among trusted roots in the config block

ArnabChatterjee (Thu, 07 Dec 2017 10:16:55 GMT):
@Vadim - What defines the identity of the root certificate?

Vadim (Thu, 07 Dec 2017 10:17:22 GMT):
I don't understand the question

ArnabChatterjee (Thu, 07 Dec 2017 10:18:15 GMT):
You said that "signer of the cert is not among trusted roots in the config block". Does the trusted root means the rot certificate?

ArnabChatterjee (Thu, 07 Dec 2017 10:18:15 GMT):
You said that "signer of the cert is not among trusted roots in the config block". Does the trusted root means the root certificate?

Vadim (Thu, 07 Dec 2017 10:18:30 GMT):
yes

ArnabChatterjee (Thu, 07 Dec 2017 10:21:03 GMT):
And by config block you mean the configs in configtx.yaml?

Vadim (Thu, 07 Dec 2017 10:21:52 GMT):
I mean what the configtxgen generates

ArnabChatterjee (Thu, 07 Dec 2017 10:27:27 GMT):
Okay. I am unable to understand one thing, if signer is not in the trusted roots, how am I able to create the channel, join it, install and instantiate CC using the same admin cert with which I am doing the invoke with.

ArnabChatterjee (Thu, 07 Dec 2017 10:27:27 GMT):
Okay. I am unable to understand one thing, if signer (admin) is not in the trusted roots, how am I able to create the channel, join it, install and instantiate CC using the same signer(admin) cert with which I am doing the invoke with.

Vadim (Thu, 07 Dec 2017 10:29:06 GMT):
to join/install you normally need a peer admin, are you sure you are using the same one for invoke?

Vadim (Thu, 07 Dec 2017 10:30:19 GMT):
how do you obtain admin for invoke?

ArnabChatterjee (Thu, 07 Dec 2017 10:31:05 GMT):
yes I am using the same admin for invoke

Vadim (Thu, 07 Dec 2017 10:31:59 GMT):
so it's balance-transfer, right?

ArnabChatterjee (Thu, 07 Dec 2017 10:32:01 GMT):
I am using the same client object with the same userContext

ArnabChatterjee (Thu, 07 Dec 2017 10:32:03 GMT):
yes

Vadim (Thu, 07 Dec 2017 10:32:28 GMT):
did you do any changes in balance-transfer?

ArnabChatterjee (Thu, 07 Dec 2017 10:33:14 GMT):
yes. A lot, related to my biz req. Actually I am having separate client objects per logged in user

ArnabChatterjee (Thu, 07 Dec 2017 10:33:32 GMT):
and using the peerAdmin to do the first login request

Vadim (Thu, 07 Dec 2017 10:34:29 GMT):
well I can't really say then about your case, but based what I see in balance-transfer, it loads peer admin certs for install and so on, and for invoke it obtains users from the ca

ArnabChatterjee (Thu, 07 Dec 2017 10:37:51 GMT):
hmm.

ArnabChatterjee (Thu, 07 Dec 2017 10:38:03 GMT):
okay. Thank you @Vadim :)

nharshita (Thu, 07 Dec 2017 10:39:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PbqXrYhu4TdkQdMev) @ArnabChatterjee Hope you are using newTransactionID with admin flag enabled (tx_id = client.newTransactionID(true)), in your invoke/query requests as in install/instantiate?

Vadim (Thu, 07 Dec 2017 10:41:14 GMT):
@nharshita for him install/instantiate works, invoke doesn't

nharshita (Thu, 07 Dec 2017 10:47:23 GMT):
install and invoke uses the flag, by default in the balance-transfer (as those 2 operations to be done by the admin of the org, as you may know). Which is not the case with invoke/query chaincode. There are few query functions like queryInstalledChaincodes where they use the flag to execute the query as admin.

nharshita (Thu, 07 Dec 2017 10:48:43 GMT):
This is the line i'm referring to https://github.com/hyperledger/fabric-samples/blob/v1.1.0-preview/balance-transfer/app/install-chaincode.js#L37 incase if install

ArnabChatterjee (Thu, 07 Dec 2017 10:57:03 GMT):
@nharshita - You are right. setting the admin flag solved the problem. Thanks. :)

nharshita (Thu, 07 Dec 2017 10:58:46 GMT):
okay. good to know that it worked

nharshita (Thu, 07 Dec 2017 11:21:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LNRnwZaACY8TAihwK) @MohammadObaid Not sure, whether you could progress on this. But here i see that querying with curl doesn't work, unless the asyn operation of the specified txid transaction commit happens.

Vadim (Thu, 07 Dec 2017 11:32:54 GMT):
@ArnabChatterjee the way I see it, it does not solve your problem as it uses the same admin for all invoke operations

SimonOberzan (Thu, 07 Dec 2017 11:40:16 GMT):
@Vadim Could you please take a look at my question above? I cannot figure it out myself as the certificates look fine

Vadim (Thu, 07 Dec 2017 11:41:44 GMT):
@SimonOberzan seems like the user which sets up an event hub is not trusted by the network

SimonOberzan (Thu, 07 Dec 2017 11:42:31 GMT):
Hmm, that seem weird because the user was created just seconds prior and was also used to create the channel?

Vadim (Thu, 07 Dec 2017 11:42:56 GMT):
which fabric-sample is this?

SimonOberzan (Thu, 07 Dec 2017 11:43:20 GMT):
I have a project similar to balance-transfer

SimonOberzan (Thu, 07 Dec 2017 11:45:40 GMT):
Those are the calls to my server: https://paste.ee/p/rd674

Vadim (Thu, 07 Dec 2017 11:47:04 GMT):
is it 1.0 or 1.1 examples?

SimonOberzan (Thu, 07 Dec 2017 11:47:59 GMT):
11

SimonOberzan (Thu, 07 Dec 2017 11:47:59 GMT):
1.1

Vadim (Thu, 07 Dec 2017 11:48:36 GMT):
so when you create a channel, it implicitly does it with an org admin

Vadim (Thu, 07 Dec 2017 11:48:56 GMT):
so perhaps it's another identity when it registers with eventhub

SimonOberzan (Thu, 07 Dec 2017 11:53:05 GMT):
That seem like it could be the problem, I'll look itno it

SimonOberzan (Thu, 07 Dec 2017 11:53:05 GMT):
That seem like it could be the problem, I'll look into it

SimonOberzan (Thu, 07 Dec 2017 12:01:05 GMT):
So the channel is created with org admin because the getClientForOrg is called without an user?

SimonOberzan (Thu, 07 Dec 2017 12:01:05 GMT):
So the channel is created with an org admin because the getClientForOrg is called without an user?

Vadim (Thu, 07 Dec 2017 12:31:31 GMT):
@SimonOberzan https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Client.js#L547-L549

Vadim (Thu, 07 Dec 2017 12:34:52 GMT):
@SimonOberzan https://github.com/hyperledger/fabric-samples/blob/v1.1.0-preview/balance-transfer/app/create-channel.js#L45

SimonOberzan (Thu, 07 Dec 2017 12:36:35 GMT):
@Vadim But the same is then specified in join-channel: https://github.com/hyperledger/fabric-samples/blob/v1.1.0-preview/balance-transfer/app/join-channel.js#L97

Vadim (Thu, 07 Dec 2017 12:37:33 GMT):
correct, but it fails when it tries to connect over eventhub, and that is done not on behalf of admin

Vadim (Thu, 07 Dec 2017 12:37:51 GMT):
so the join request itself should work

SimonOberzan (Thu, 07 Dec 2017 12:38:05 GMT):
What changes do your propose then?

Vadim (Thu, 07 Dec 2017 12:39:02 GMT):
you need to make sure that the user (should be the one with "username" here: https://github.com/hyperledger/fabric-samples/blob/v1.1.0-preview/balance-transfer/app/join-channel.js#L34) has a cert which is trusted by the network...

Vadim (Thu, 07 Dec 2017 12:39:33 GMT):
e.g. in case of cryptogen, the common mistake I've seen people make is that the CA is not running with the certs provisioned by cryptogen

SimonOberzan (Thu, 07 Dec 2017 12:42:04 GMT):
Hmm, I'll take a look at that. It's weird cause I could create the channel. And also, I can check cets of peers/cas/orderers with openssl and compare AKs, SKs, but how can I check if the users are trusted by the network?

Vadim (Thu, 07 Dec 2017 12:42:41 GMT):
the channel uses the org admin, as that admin cert you reference in the connection profile by providing its certs from cryptogen

Vadim (Thu, 07 Dec 2017 12:42:57 GMT):
the CA is not participating in this

SimonOberzan (Thu, 07 Dec 2017 12:45:10 GMT):
Ok, thanks it a bit clearerto me now, I'll check a bit more

SimonOberzan (Thu, 07 Dec 2017 12:45:10 GMT):
Ok, thanks it a bit clearer to me now, I'll check a bit more

Vadim (Thu, 07 Dec 2017 12:46:02 GMT):
@SimonOberzan check the certificates from the CA (https://github.com/hyperledger/fabric-samples/blob/release/basic-network/docker-compose.yml#L17-L18) and ensure they are exactly the same as peerOrganisations/yourorg/ca

SimonOberzan (Thu, 07 Dec 2017 13:12:46 GMT):
@Vadim You got it right, there was a problem in `FABRIC_CA_SERVER_CA_CERTFILE` path... Thank you very much.

brankoterzic (Thu, 07 Dec 2017 15:43:44 GMT):
Hi I am getting the following error after involving Kafka cluster for my orderer: endPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown

brankoterzic (Thu, 07 Dec 2017 15:43:44 GMT):
Hi I am getting the following error after involving Kafka cluster for my orderer: endPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown

brankoterzic (Thu, 07 Dec 2017 15:43:44 GMT):
@Vadim Hi I am getting the following error after involving Kafka cluster for my orderer: endPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown

brankoterzic (Thu, 07 Dec 2017 15:44:27 GMT):
I have followed this stackoverflow question: https://stackoverflow.com/questions/45015611/error-client-utils-js-sendpeersproposal-promise-is-rejected-error-failed

brankoterzic (Thu, 07 Dec 2017 15:44:27 GMT):
I have followed this stackoverflow question: https://stackoverflow.com/questions/45015611/error-client-utils-js-sendpeersproposal-promise-is-rejected-error-failed sugesting updating the docker to 17.03.0-ce and above to solve this problem

brankoterzic (Thu, 07 Dec 2017 15:44:27 GMT):
I have followed this stackoverflow question: https://stackoverflow.com/questions/45015611/error-client-utils-js-sendpeersproposal-promise-is-rejected-error-failed sugesting updating the docker to 17.03.0-ce and above to solve this problem, but this could not solve this problem.

brankoterzic (Thu, 07 Dec 2017 15:45:06 GMT):
my docker version is 17.09.0-ce

jrosmith (Thu, 07 Dec 2017 15:48:02 GMT):
hey all, is there a way to get visibility in the specifics of a read-write set of a block via the node-sdk? is that encoded anywhere in the block event?

MohammadObaid (Thu, 07 Dec 2017 16:06:14 GMT):
@brankoterzic Based on my experience with this error , please check channel name in config.js file . It should be same with the channel you are running

MohammadObaid (Thu, 07 Dec 2017 16:06:14 GMT):
@brankoterzic Based on my experience with this error , please check channel name in config.json file . It should be same with the channel you are running

brankoterzic (Thu, 07 Dec 2017 16:11:29 GMT):
@MohammadObaid It is the same. This problem started when I involved Kafka cluster instead of the single orderer.

jrosmith (Thu, 07 Dec 2017 16:37:06 GMT):
building on this, with the sdk i can step through whats returned when i create a block event listener and access something called `ns_rwset`, which I think is what I want. the only issue is that it is an array of length 0 for the invoke i have submitted. does this not get populated for any specific reason or is there something i need to do to access the read/write set? [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nub5NK4pXqzfSGTWc)

bretharrison (Thu, 07 Dec 2017 20:14:21 GMT):
@jrosmith You may wish to post your question on the `fabric-ledger` channel

ArnabChatterjee (Thu, 07 Dec 2017 23:46:43 GMT):
@Vadim - Thanks Vadim. Actually, I am having Application user mapped with fabric org users. So, at the time of application login (which fetches some data using the CC), I have no option to invoke the CC via the admin cert of the organization. Once the user is logged in I switch to the logged in user's client object (containing the _userContext) of the logged in user and I use that to do the transaction (invoke/query). So the case you are pointing is applicable to only at the time of login. (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NwNniFXRuRC8uA4bq) But thanks a lot for your support. :)

nharshita (Fri, 08 Dec 2017 04:46:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ccbPwbhdYErocPKZA) @brankoterzic Hi, It may be trivial, but can you make sure the MSPID used in channel configuration file (configtx.yaml to produce mychannel.tx for eg., in case of balance-transfer) and the MSPId specified in the docker compose file are same. If they are not same we see MSP unknown error, based on my observations

Vadim (Fri, 08 Dec 2017 06:21:03 GMT):
@ArnabChatterjee when you set `tx_id = client.newTransactionID(true);` it will implicitly use the admin user, regardless of your _userContext. This means that if you set that for invoke, from the cc perspective it looks like the admin user is doing all proposals, not the user which is logged in.

ArnabChatterjee (Fri, 08 Dec 2017 06:23:03 GMT):
@Vadim - `when you set `tx_id = client.newTransactionID(true);` it will implicitly use the admin user, regardless of your _userContext.` How will it use the admin user without the _userContext? Can you kindly explain?

ArnabChatterjee (Fri, 08 Dec 2017 06:23:03 GMT):
@Vadim - `when you set tx_id = client.newTransactionID(true);` it will implicitly use the admin user, regardless of your _userContext.` How will it use the admin user without the _userContext? Can you kindly explain?

ArnabChatterjee (Fri, 08 Dec 2017 06:23:03 GMT):
@Vadim - `when you set tx_id = client.newTransactionID(true); it will implicitly use the admin user, regardless of your _userContext.` How will it use the admin user without the _userContext? Can you kindly explain?

Vadim (Fri, 08 Dec 2017 06:27:22 GMT):
@ArnabChatterjee this is how it retrieves the identity when you sendTxProposal: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Channel.js#L1330, so if admin=true, then `clientContext._getSigningIdentity(true)`; check what _getSigningIdentity does - it's t his part: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/Client.js#L1159-L1161. As you can see, the clientContext caches the admin signing identity and uses it when you set `client.newTransactionID(true)`

ArnabChatterjee (Fri, 08 Dec 2017 07:12:28 GMT):
Okay @Vadim - I get your point, After certain amount of investigation. Coming back to my original question. So where are the root of trust present in the peer container. I want to check them. Is it /etc/hyperledger/crypto/peer/msp or /etc/hyperledger/fabric/peer/msp

ArnabChatterjee (Fri, 08 Dec 2017 07:12:28 GMT):
Okay @Vadim - I get your point, After certain amount of investigation. Coming back to my original question. So where are the root of trust present in the peer container. I want to check them. Is it `/etc/hyperledger/crypto/peer/msp` or `/etc/hyperledger/fabric/peer/msp` ?

Vadim (Fri, 08 Dec 2017 07:14:54 GMT):
it's in config block (for all orgs) or local msp (own org), where it's present depends how you mounted the directory in your docker-compose. If I were you, however, I'd check that the CA is running with org certs. Check the certificates from the CA (https://github.com/hyperledger/fabric-samples/blob/release/basic-network/docker-compose.yml#L17-L18) and ensure they are exactly the same as peerOrganisations/yourorg/ca (if you use cryptogen)

ArnabChatterjee (Fri, 08 Dec 2017 07:43:04 GMT):
I think the Client.js you have referred to is for versions > 1.0. I am using fabric-client 1.0 and I cannot find signing identity in the code

Vadim (Fri, 08 Dec 2017 07:45:58 GMT):
@ArnabChatterjee you said before you use 1.1 I think and if I'm not mistaken, the tx_id = client.newTransactionID(true); is a feature of 1.1

ArnabChatterjee (Fri, 08 Dec 2017 07:46:48 GMT):
Yes. I made a mistake. I checked the source and found out that client.newTransactionId() does not take any args

ArnabChatterjee (Fri, 08 Dec 2017 07:47:47 GMT):
I need to find out the difference in cert issuance b/w CA server and cryptogen

ArnabChatterjee (Fri, 08 Dec 2017 07:48:24 GMT):
You were right about that. I am able to use the Admin certs generated by cryptogen to invoke transactions

Vadim (Fri, 08 Dec 2017 07:48:32 GMT):
@ArnabChatterjee is you CA initialized with cryptogen cert?

ArnabChatterjee (Fri, 08 Dec 2017 07:48:41 GMT):
no

ArnabChatterjee (Fri, 08 Dec 2017 07:49:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wsEGcQDdDZMWmohn8) @Vadim You mean CA server right?

ArnabChatterjee (Fri, 08 Dec 2017 07:49:07 GMT):
Yes

ArnabChatterjee (Fri, 08 Dec 2017 07:49:35 GMT):
I have passed the generated the certs as arguments in docker compose

Vadim (Fri, 08 Dec 2017 07:49:35 GMT):
make sure that it is, take the cert the CA is running with and compare it with cryptogen CA cert

ArnabChatterjee (Fri, 08 Dec 2017 07:50:10 GMT):
I changed the CSR part of the CA server config file

Vadim (Fri, 08 Dec 2017 07:50:12 GMT):
you need to compare, because if you made a mistake (e.g. wrong path or cert name) the CA generates its own and you get that error

ArnabChatterjee (Fri, 08 Dec 2017 07:50:22 GMT):
does it matter?

ArnabChatterjee (Fri, 08 Dec 2017 07:50:27 GMT):
I mean CSER

ArnabChatterjee (Fri, 08 Dec 2017 07:50:27 GMT):
I mean CSR ?

Vadim (Fri, 08 Dec 2017 07:50:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=E2XawYifF3amwabQF) the error is not caused by this

ArnabChatterjee (Fri, 08 Dec 2017 07:51:55 GMT):
Because, I have passed CSR info in crypto-config.yaml but it was not working completely, i.e the Subject in the certs generated by cryptogen vs the subject in the certs generated by CA server are different

ArnabChatterjee (Fri, 08 Dec 2017 07:52:26 GMT):
I used openssl to check it

Vadim (Fri, 08 Dec 2017 07:52:38 GMT):
this is not the problem

Vadim (Fri, 08 Dec 2017 07:53:14 GMT):
the signature is a problem, i.e. CA signs with wrong cert all CSRs, so the network does not trust it

Vadim (Fri, 08 Dec 2017 07:53:45 GMT):
also, can you show the logs of your CA? I'm interested in the first 30 lines after startup

ArnabChatterjee (Fri, 08 Dec 2017 07:54:01 GMT):
Ok. please wait.

ArnabChatterjee (Fri, 08 Dec 2017 07:59:11 GMT):
https://paste.ee/p/b8wwT

ArnabChatterjee (Fri, 08 Dec 2017 07:59:11 GMT):
I pasted both CA logs : https://paste.ee/p/b8wwT

Vadim (Fri, 08 Dec 2017 08:01:29 GMT):
so at the line 28 it says that it generated certs for CA

Vadim (Fri, 08 Dec 2017 08:01:39 GMT):
which means it does not use certs from cryptogen

Vadim (Fri, 08 Dec 2017 08:02:33 GMT):
or is it supposed to be intermediate cert?

ArnabChatterjee (Fri, 08 Dec 2017 08:03:22 GMT):
no I am not using intermediates

Vadim (Fri, 08 Dec 2017 08:03:34 GMT):
so then something is not correct

Vadim (Fri, 08 Dec 2017 08:05:03 GMT):
this is part of the log from my CA which uses the cryptogen cert/key: ``` 2017/12/08 07:59:42 [DEBUG] CA Home Directory: /etc/hyperledger/fabric-ca-server 2017/12/08 07:59:42 [DEBUG] Initializing BCCSP: &{ProviderName:SW SwOpts:0xc42024ffb0 Pkcs11Opts:} 2017/12/08 07:59:42 [DEBUG] Initializing BCCSP with software options &{SecLevel:256 HashFamily:SHA2 Ephemeral:false FileKeystore:0xc42028ce80 DummyKeystore:} 2017/12/08 07:59:42 [DEBUG] Initialize key material 2017/12/08 07:59:42 [DEBUG] Making CA filenames absolute 2017/12/08 07:59:42 [INFO] The CA key and certificate files already exist 2017/12/08 07:59:42 [INFO] Key file location: /etc/hyperledger/fabric-ca-server-config/3f1af5ed588e1511dee99aab3316e34f7e70e5bfeb2d65fec65a5117a55033e1_sk 2017/12/08 07:59:42 [INFO] Certificate file location: /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem ```

ArnabChatterjee (Fri, 08 Dec 2017 08:05:41 GMT):
So the cert file on line 27 should match the one I am passing from docker compose

Vadim (Fri, 08 Dec 2017 08:07:02 GMT):
maybe post the link to your log on #fabric-ca , I think you messed up the ca config somehow

Vadim (Fri, 08 Dec 2017 08:07:40 GMT):
now it generates its own cert but signs it with root cert instead of just using the root cert (if I correctly understood the log)

Vadim (Fri, 08 Dec 2017 08:08:32 GMT):
as a quickfix, I recommend you to remove the config.yaml and have CA generate its own... it works for me like that

Vadim (Fri, 08 Dec 2017 08:08:32 GMT):
as a quickfix, I recommend you to remove the fabric-ca-config.yaml and have CA generate its own... it works for me like that

ArnabChatterjee (Fri, 08 Dec 2017 08:21:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=R6nh7Gs7greYHD5cs) @Vadim I didnt understand this

Vadim (Fri, 08 Dec 2017 08:25:49 GMT):
@ArnabChatterjee have you tried this? [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XNZ4zfojDLWNmR2Yg)

ArnabChatterjee (Fri, 08 Dec 2017 08:26:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NwAMSZFTFWtpANLFF) @Vadim Yes

ArnabChatterjee (Fri, 08 Dec 2017 08:26:28 GMT):
I am getting `2017/12/08 08:24:19 [INFO] Created default configuration file at /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml`

Vadim (Fri, 08 Dec 2017 08:26:35 GMT):
that's ok

ArnabChatterjee (Fri, 08 Dec 2017 08:26:48 GMT):
and also `2017/12/08 08:24:19 [INFO] The CA key and certificate were generated for CA`

Vadim (Fri, 08 Dec 2017 08:26:54 GMT):
that's wrong

Vadim (Fri, 08 Dec 2017 08:27:13 GMT):
how do you tell CA which key and cert to use?

ArnabChatterjee (Fri, 08 Dec 2017 08:29:09 GMT):
``` - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.Jcompany.myapp.test-cert.pem - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/43f639928b30f9bbabb38bb496303cb80a04137a11ac430fe28858c993e0b9bc_sk - FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/tlsca.Jcompany.myapp.test-cert.pem - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/5b86346866fa2b7cd15dd510d0ec07451559232736612f387ec3db238f50ec58_sk ```

Vadim (Fri, 08 Dec 2017 08:29:46 GMT):
are you sure they exists in container?

ArnabChatterjee (Fri, 08 Dec 2017 08:31:34 GMT):
https://paste.ee/p/KDoJm

ArnabChatterjee (Fri, 08 Dec 2017 08:31:39 GMT):
Can you please check this

ArnabChatterjee (Fri, 08 Dec 2017 08:31:40 GMT):
?

Vadim (Fri, 08 Dec 2017 08:32:36 GMT):
check the certs in container, do they exist?

ArnabChatterjee (Fri, 08 Dec 2017 08:33:07 GMT):
yes they exist. But I checked that the certs content dont match because ca server is generating that

Vadim (Fri, 08 Dec 2017 08:33:37 GMT):
key name is correct? same as in ./channel/crypto-config/peerOrganizations/Jcompany.myapp.test/ca?

ArnabChatterjee (Fri, 08 Dec 2017 08:34:04 GMT):
yes. I checked

Vadim (Fri, 08 Dec 2017 08:34:12 GMT):
well then I don't know

sasiedu (Fri, 08 Dec 2017 20:39:24 GMT):
hi, how can i save the key from enrollment into mongodb?

sasiedu (Fri, 08 Dec 2017 20:39:42 GMT):
the private key

ashablyg (Fri, 08 Dec 2017 21:06:45 GMT):
Hey guys, has anyone encountered the fabric node server from balance-transfer reseting connection when spun up on AWS? The inbound security rules are open for incoming traffic

brankoterzic (Sat, 09 Dec 2017 08:21:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=e84E5FdfgfTimh6vd) @nharshita Yes they are the same. I had up and running system until I have added my Kafka cluster.

alvaradojl (Sun, 10 Dec 2017 09:13:45 GMT):
Has joined the channel.

asamk (Sun, 10 Dec 2017 15:56:37 GMT):
Testing load on the modified(new function to store an object) balance-transfer sample, running into the following errors and it is occurring randomly, The clientContext has not been properly initialized, missing userContext seems to be happening in invoke-transaction.js during event hub processing and the invoke fails with Failed to order the transaction. Error code: undefined using fabric 1.0.5 and the latest samples can someone help on this.

asamk (Sun, 10 Dec 2017 16:01:23 GMT):
Can someone one provide/point to a sample deployment/configuration with multiple orgs/peers in multiple hosts, like host-1 - orderer, org1-CA, org1-peer1 host-2 - org2-CA, org2-peer1 host-3 - org3-CA, org3-peer1 Thanks

vu3mmg (Mon, 11 Dec 2017 05:18:33 GMT):
Do we have a nodesdk function which will help to do peer channel signconfigtx and submit a configtx to orderer this will help to automate the changes in config txn

ArnabChatterjee (Mon, 11 Dec 2017 06:00:10 GMT):
Hi. I am using version 1.0 of fabric SDK and want that the users I have created and persisted would be able to query the chaincodes via the channel even after the node server has restarted (network is intact). I am trying to load the users (from the persisted user objects) and invoke the chaincode with the recreated client objects but I am getting the following error: ``` sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP org1MSP is unknown at /home/ubuntu/sysconfig-network/sysconfig-server-shot3/node_modules/grpc/src/node/src/client.js:434:17 ````

ArnabChatterjee (Mon, 11 Dec 2017 06:00:10 GMT):
Hi. I am using version 1.0 of fabric SDK and want that the users I have created and persisted would be able to query the chaincodes via the channel even after the node server has restarted (network is intact). I am trying to load the users (from the persisted user objects) and invoke the chaincode with the recreated client objects but I am getting the following error: ``` sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP org1MSP is unknown at /home/ubuntu/sysconfig-network/sysconfig-server-shot3/node_modules/grpc/src/node/src/client.js:434:17 ```` Any ideas? Thanks :)

ArnabChatterjee (Mon, 11 Dec 2017 06:00:10 GMT):
Hi. I am using version 1.0 of fabric SDK and want that the users I have created and persisted would be able to query the chaincodes via the channel even after the node server has restarted (network is intact). I am trying to load the users (from the persisted user objects) and invoke the chaincode with the recreated client objects but I am getting the following error: ``` sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP org1MSP is unknown at /home/ubuntu/sysconfig-network/sysconfig-server-shot3/node_modules/grpc/src/node/src/client.js:434:17 ```` BTW, I am skipping the following steps once the node server restarts (create channel, join channel, install & instantiate CC). Any ideas? Thanks :)

Ferdoran (Mon, 11 Dec 2017 09:42:23 GMT):
Hello everybody, I have a problem while sending transactions with an *AND* endorsement policy. I am using the helper.js from the _balance-transfer_ example. The error code is: ``` [2017-12-11 10:35:33.578] [ERROR] invoke-chaincode - The balance transfer transaction was invalid, code = ENDORSEMENT_POLICY_FAILURE [2017-12-11 10:35:33.579] [ERROR] invoke-chaincode - Failed to send transaction and get notifications within the timeout period. [2017-12-11 10:35:33.579] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined ```

Vadim (Mon, 11 Dec 2017 09:43:56 GMT):
@Ferdoran are you sending proposals to all orgs as your policy specifies?

Ferdoran (Mon, 11 Dec 2017 09:45:57 GMT):
@Vadim If I do so I get another error that the transaction proposal is bad: ``` [2017-12-11 10:45:44.024] [ERROR] invoke-chaincode - transaction proposal was bad [2017-12-11 10:45:44.024] [ERROR] invoke-chaincode - transaction proposal was bad [2017-12-11 10:45:44.025] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2017-12-11 10:45:44.025] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined ```

Vadim (Mon, 11 Dec 2017 09:46:24 GMT):
@Ferdoran seems like the chaincode returned some error

Vadim (Mon, 11 Dec 2017 09:47:14 GMT):
check the peer logs

Ferdoran (Mon, 11 Dec 2017 09:50:56 GMT):
@Vadim The log of one peer tells me this: ``` 2017-12-11 09:35:33.560 UTC [txvalidator] VSCCValidateTxForCC -> ERRO 1532 VSCC check failed for transaction txid=7f60b0874b027fa36494296ea068504f555b6f3b3161f8e4db08fbd27de57348, error VSCC error: policy evaluation failed, err Failed to authenticate policy 2017-12-11 09:35:33.560 UTC [lockbasedtxmgr] Done -> DEBU 1533 Done with transaction simulation / query execution [5b45ce9e-8f29-425d-96e6-473202666e65] 2017-12-11 09:35:33.560 UTC [txvalidator] Validate -> ERRO 1534 VSCCValidateTx for transaction txId = 7f60b0874b027fa36494296ea068504f555b6f3b3161f8e4db08fbd27de57348 returned error VSCC error: policy evaluation failed, err Failed to authenticate policy 2017-12-11 09:35:33.560 UTC [statevalidator] ValidateAndPrepareBatch -> WARN 1539 Block [8] Transaction index [0] marked as invalid by committer. Reason code [10] ```

Darumada (Mon, 11 Dec 2017 09:51:09 GMT):
Has joined the channel.

Darumada (Mon, 11 Dec 2017 09:51:38 GMT):
Hi , how can i get return falue from shim.succes in invoke fcn?

Ferdoran (Mon, 11 Dec 2017 09:53:20 GMT):
@Darumada are you using the balance-transfer invoke-transaction.js ?

Darumada (Mon, 11 Dec 2017 09:55:30 GMT):

Снимок экрана от 2017-12-11 14-51-25.png

Darumada (Mon, 11 Dec 2017 09:55:44 GMT):
strings*

Vadim (Mon, 11 Dec 2017 09:56:13 GMT):
@Darumada in the sdk, you receive the result as soon as the promise is resolved

Darumada (Mon, 11 Dec 2017 09:56:39 GMT):
Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK" { status: 200, message: 'OK', payload: }

Ferdoran (Mon, 11 Dec 2017 09:57:15 GMT):
@Darumada take the payload and toString() it

Darumada (Mon, 11 Dec 2017 09:57:43 GMT):
ok I will try

Darumada (Mon, 11 Dec 2017 09:57:47 GMT):
ty

Ferdoran (Mon, 11 Dec 2017 10:01:38 GMT):
@Vadim Do you have an idea why the policy authentication fails?

Vadim (Mon, 11 Dec 2017 10:01:57 GMT):
have you send proposals to all orgs in policy?

Ferdoran (Mon, 11 Dec 2017 10:02:10 GMT):
yes

Ferdoran (Mon, 11 Dec 2017 10:02:25 GMT):
peer0.org1.example.com and peer0.org2.example.com

Vadim (Mon, 11 Dec 2017 10:02:26 GMT):
are you sure?

Vadim (Mon, 11 Dec 2017 10:02:56 GMT):
what is your policy?

Ferdoran (Mon, 11 Dec 2017 10:03:06 GMT):
yes, the target urls are grpcs:localhost:7051 and grpcs:localhost:8051

Ferdoran (Mon, 11 Dec 2017 10:04:22 GMT):
The policy is AND ('Org1MSP.member', 'Org2MSP.member')

Vadim (Mon, 11 Dec 2017 10:09:38 GMT):
@Ferdoran well the error you get suggests that the tx did not contain enough signatures, so carefully check log output in e.g. nodejs app to verify whether all peers respond with correct results or not

Ferdoran (Mon, 11 Dec 2017 10:14:33 GMT):
@Vadim it seems like I'm just getting 1 signature, although sending the transaction to both organisations.

ArnabChatterjee (Mon, 11 Dec 2017 10:21:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mHeMrgJFLNyaPMJm6) Any ideas @Vadim ?

NiketYende (Mon, 11 Dec 2017 10:38:08 GMT):
Hi, I am trying to setup a multi-channel network using the new crypto material generated. I have performed the necessary changes docker-compose.yaml and config.json files in the node-sdk. However, i receive a handshake error.

NiketYende (Mon, 11 Dec 2017 10:40:44 GMT):

Handshake error

elie (Mon, 11 Dec 2017 10:43:14 GMT):
Has joined the channel.

NiketYende (Mon, 11 Dec 2017 10:44:35 GMT):

docker-compose.txt

Ferdoran (Mon, 11 Dec 2017 10:45:38 GMT):
@Vadim I found the problem why not all transaction proposals were good. It seems like I built the targets incorrectly. But now after building them correctly I get the error from before: *ENDORSEMENT POLICY FAILURE*

NiketYende (Mon, 11 Dec 2017 10:46:09 GMT):

config.txt

NiketYende (Mon, 11 Dec 2017 10:47:27 GMT):
@jimthematrix @mastersingh24 @jeffgarratt Could any one help me with this?

NiketYende (Mon, 11 Dec 2017 10:51:33 GMT):

configtx.txt

Ferdoran (Mon, 11 Dec 2017 12:46:55 GMT):
I found out that my channel instance in my node app does not have all peers in it because the channel instance is just created for an organisation scope. However, I added the peers of both organisations in the targets. Does the channel instance in my node app have to contain the peers from both organisations ? [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fb4P4SJsZrDrfJM3M) @Vadim

mschmidt (Mon, 11 Dec 2017 12:47:27 GMT):
Has joined the channel.

MarcoReitano (Mon, 11 Dec 2017 12:51:02 GMT):
Has joined the channel.

Vadim (Mon, 11 Dec 2017 13:33:58 GMT):
@Ferdoran I remembered that balance-transfer app was not built to support sending endorsements to peers from different orgs, you need to make some adjustments

Ferdoran (Mon, 11 Dec 2017 13:38:47 GMT):
@Vadim Do you know where I have to adjust it?

Vadim (Mon, 11 Dec 2017 13:39:17 GMT):
somewhere in the code where it retrieves targets to send proposal to

Ferdoran (Mon, 11 Dec 2017 13:41:45 GMT):
@Vadim I assume I just have to add the peer of org2 to the targets array?

Vadim (Mon, 11 Dec 2017 13:42:12 GMT):
I'm not sure what targets array you are talking about

Ferdoran (Mon, 11 Dec 2017 13:43:08 GMT):
@Vadim This one: ``` var client = helper.getClientForOrg(org); var channel = helper.getChannelForOrg(org)[channelName]; var targets = (peerNames) ? helper.newPeers(peerNames, org) : undefined; ```

Vadim (Mon, 11 Dec 2017 13:43:49 GMT):
yes, but check what helper does as you need the Peer object in that array

Ferdoran (Mon, 11 Dec 2017 13:47:36 GMT):
@Vadim There are 2 Peer objects inside: peer0.org1 and peer0.org2: ``` targets: [ Peer { _options: [Object], _url: 'grpcs://localhost:7051', _endpoint: [Endpoint], _request_timeout: 45000, _endorserClient: [ServiceClient], _name: null }, Peer { _options: [Object], _url: 'grpcs://localhost:8051', _endpoint: [Endpoint], _request_timeout: 45000, _endorserClient: [ServiceClient], _name: null } ] } ```

Ferdoran (Mon, 11 Dec 2017 13:51:39 GMT):
The proposal is good for both targets

vu3mmg (Tue, 12 Dec 2017 04:27:15 GMT):
Hello, Do we have apis for "peer channel signconfigtx" and udpate the configuration

guolidong (Tue, 12 Dec 2017 06:10:31 GMT):
Has joined the channel.

NiketYende (Tue, 12 Dec 2017 06:50:33 GMT):
Could some one help in this regard? I am currently on v1.0.2, any help would be appreciated [Handshake issue ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6dNXehFbTTkxqoRYp)

Vadim (Tue, 12 Dec 2017 07:56:33 GMT):
@NiketYende have you replaced the crypto material in your nodejs app with the new crypto material?

nharshita (Tue, 12 Dec 2017 08:28:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PrK4tHs95wrRTb67G) @Ferdoran You may check the patch i have uploaded [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uDnXbJZEeis5Wn33X) endorse_test_code_changes_v1.0.4.txt on December 1st and also refer [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rYDmJuaHLYxsqrNR7) for gist if the tweak

nharshita (Tue, 12 Dec 2017 08:28:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PrK4tHs95wrRTb67G) @Ferdoran You may check the patch i have uploaded [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uDnXbJZEeis5Wn33X) endorse_test_code_changes_v1.0.4.txt on December 1st and also refer [ (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rYDmJuaHLYxsqrNR7)] for gist if the tweak

nharshita (Tue, 12 Dec 2017 08:28:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PrK4tHs95wrRTb67G) @Ferdoran You may check the [patch](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uDnXbJZEeis5Wn33X) endorse_test_code_changes_v1.0.4.txt i have uploaded on December 1st and also refer [ (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rYDmJuaHLYxsqrNR7)] for gist if the tweak

nharshita (Tue, 12 Dec 2017 08:28:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PrK4tHs95wrRTb67G) @Ferdoran You may check the [patch](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uDnXbJZEeis5Wn33X) endorse_test_code_changes_v1.0.4.txt i have uploaded on December 1st and also refer (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rYDmJuaHLYxsqrNR7) for gist if the tweak

nharshita (Tue, 12 Dec 2017 08:36:45 GMT):
With the patch i'm able to send proposal request to second organization peers also. For debugging, i suggest you to look for endorser peer logs for *ValidateProposalMessage* and *Validating block* (then peer.ValidateTransaction) on both the organizations. With out the code patch you will not be able to see *ValidateProposalMessage* on the second organization peer.

nharshita (Tue, 12 Dec 2017 08:36:45 GMT):
With the patch i'm able to send proposal request to second organization peers also. For debugging, i suggest you to look for endorser peer logs for *ValidateProposalMessage* and *Validating block* (then peer.ValidateTransaction) on both the organizations. With out the code update (as in patch) you will not be able to see *ValidateProposalMessage* on the second organization peer.

NiketYende (Tue, 12 Dec 2017 08:49:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZRu3xkEdhCFYcStnB) @Vadim Yes. For reference i have attached docker-compose file above.

Vadim (Tue, 12 Dec 2017 08:49:28 GMT):
@NiketYende docker-compose does not show whether you replaced the crypto material in your _nodejs_ app

NiketYende (Tue, 12 Dec 2017 08:50:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nbBp7GLea5uy8SjBb) @Vadim I mean, i have pointed it to the newly generated crypto material.

Vadim (Tue, 12 Dec 2017 08:52:02 GMT):
@NiketYende handshake errors usually caused by incompatible crypto either at the network, or at the client (nodejs) side. Since your network operates well (i.e. peers connect to orderers without problems), the conclusion is that something is wrong on the client's side. Check that the ca certificates you give to nodejs are really the ones the the network is running with

NiketYende (Tue, 12 Dec 2017 08:56:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fLZ5msr7dQhijKXpz) @Vadim I have used the same certificates while creating the network as well as for the nodejs code. Just to confirm these CA certificate paths present in docker-compose.yaml & util.js should match right?

Vadim (Tue, 12 Dec 2017 08:57:13 GMT):
@NiketYende I'd compared the content of the certs, not the path

NiketYende (Tue, 12 Dec 2017 08:58:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SKjZQXyksqKG9M7CC) @Vadim Okay, let me compare the files then.

NiketYende (Tue, 12 Dec 2017 09:35:51 GMT):
I managed to solve this, please specify the same ca-cert in config.json as specified in the docker-compose.yaml file. The "tlscacerts" folder within the msp made it bit misleading while setting the "tls_cacerts" config value. @Vadim Thanks for the help :)

DarshanBc (Tue, 12 Dec 2017 10:11:39 GMT):
Hi I am upgrading my setup to v1.1 preview when I run balace transfer I get this I have node version 6.10.0 ```/home/rtcin/go/src/github.com/hyperledger/fabric-samples/v1.1preview/fabric-samples/balance-transfer/app.js:109 app.post('/users', async function(req, res) { ^^^^^ SyntaxError: missing ) after argument list at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3 ```

Vadim (Tue, 12 Dec 2017 10:12:09 GMT):
@DarshanBc you need nodejs > 8

satheeshk (Tue, 12 Dec 2017 10:12:23 GMT):
Hey all, I am trying to get a list of peers from the network. Is there a method that I can use ?

DarshanBc (Tue, 12 Dec 2017 10:12:41 GMT):
@Vadim Thank you

satheeshk (Tue, 12 Dec 2017 10:13:07 GMT):
the `getPeers()` method doesn't query the network.. I essentially want something that returns this information by querying the network

Vadim (Tue, 12 Dec 2017 10:14:28 GMT):
@satheeshk I don't think there is such method. It was a ticket on Jira to handle this, let me check,

satheeshk (Tue, 12 Dec 2017 10:14:58 GMT):
Thanks @Vadim

satheeshk (Tue, 12 Dec 2017 10:15:40 GMT):
Is there any challenge with getting that information ?

Vadim (Tue, 12 Dec 2017 10:15:56 GMT):
@satheeshk https://jira.hyperledger.org/browse/FAB-5451

Vadim (Tue, 12 Dec 2017 10:16:13 GMT):
no challenge, just basic search skills

satheeshk (Tue, 12 Dec 2017 10:19:25 GMT):
No, I meant implementing that ticket

satheeshk (Tue, 12 Dec 2017 10:19:33 GMT):
:D

Vadim (Tue, 12 Dec 2017 10:19:49 GMT):
it's planned for 1.2 as you can see

satheeshk (Tue, 12 Dec 2017 10:29:52 GMT):
thanks @Vadim glad to know

Selvam_Annamalai (Tue, 12 Dec 2017 10:35:50 GMT):
I am new HFC node JS application. Can you please share some useful links to write a node js application to invoke chaincode methods?

Vadim (Tue, 12 Dec 2017 10:37:14 GMT):
check https://github.com/hyperledger/fabric-samples

Selvam_Annamalai (Tue, 12 Dec 2017 10:41:09 GMT):
@Vadim I am looking for some useful links for a client application which was written using Hyperledger Fabric Client SDK. Please help..

Vadim (Tue, 12 Dec 2017 10:41:31 GMT):
just send a repo with such apps to you

jackeyliliang (Tue, 12 Dec 2017 11:30:43 GMT):
Hi,I use fabric-client@1.0.0 and hit the fd leak problem which is fixed in newer version. I update the fabric-client/lib/Peer.js and hit this._endorserClient.close is not a function.

jackeyliliang (Tue, 12 Dec 2017 11:31:52 GMT):
The code I add in the fabric-client/lib/Peer.js is close(){ if(this._endorserClient){ this._endorserClient.close(); } }

jackeyliliang (Tue, 12 Dec 2017 11:38:32 GMT):
Does anyone know how to fix this in version 1.0.0? thx

kamisdy (Tue, 12 Dec 2017 11:39:01 GMT):
TypeError: Cannot read property 'sendDeliver' of undefined. does anyone know? when i call the function getChannelConfig

bretharrison (Tue, 12 Dec 2017 11:40:19 GMT):
@kamisdy be sure to add an orderer to your channel

kamisdy (Tue, 12 Dec 2017 11:40:52 GMT):
:joy: I see

jworthington (Tue, 12 Dec 2017 19:33:03 GMT):
Trying to get endorsements from peer in another Org. I read all the above. Everything is 1.1.0-preview, peers, orderers, ca, sdk. Using new Client.loadFromConfig. I get ValidateProposalMessage on Org1 peer1, but Org2 peer1 does not and goes straight to ValidateTransaction. Am I missing something or do I need to push the other org's peers to targets manually as in 'the patch'? The docs read as if it should work fine in 1.1.x. Policy is -P "AND('Org1.member', 'Org2.member')" and config has the peers. (2 each per org).

ersudiplama (Tue, 12 Dec 2017 19:39:50 GMT):
Hi, we have develop application using node sdk and using Enterprise IBM blockchain. When we tested it with few hundreds of line items it worked fine as it was less then a KB. Now when we are trying to upload data of 1200 lines items with 300KB csv file size it threw some error so we divided in to 3 files of 200, 400 and 600 it worked fine and I see the records in Blockchain network using Blockchain service. But When I use query from node js it throws and error. So is that issue of blockchian node SDK or blockchain service? Actually we wanted to upload 100,000 line items of 20Mb of one asset and 7MB and 700kb so it is possible with current version of Blockchain ? We also have multichannel operation for 700kb data. Thank you for any comments or answer

jworthington (Tue, 12 Dec 2017 20:19:11 GMT):
How are you loading data? If you do it in node, using an async file read, then you will likely get memory errors, etc. I did. So I used the CLI synchronously and can load 1M records no problem. That file is 121MB. I'm sure there is a node solution, but since I only need to do that once I just used the CLI.

jworthington (Tue, 12 Dec 2017 20:19:43 GMT):
However, I just discovered the CLI can not get endorsements from other peers, so a Policy

jworthington (Tue, 12 Dec 2017 20:20:21 GMT):
requiring endorsements will need to use an SDK.

ersudiplama (Tue, 12 Dec 2017 20:50:11 GMT):
We used the Marble as template and uploaded each record as one transaction through looping

ersudiplama (Tue, 12 Dec 2017 20:50:29 GMT):
and we have changed block delay from 1000 ms to 1ms

ersudiplama (Tue, 12 Dec 2017 20:50:57 GMT):
*Marble App

jworthington (Tue, 12 Dec 2017 21:03:17 GMT):
Is the looping async? If not, shouldn't be a problem except it will take 2 -3 seconds per transaction to wait on completion. That's a day or two for 100k records. You could try fire and forget, but I think you'll still have mem issues for 100k if async. Reading is so much faster and you end up with a lot of open requests and write connections.

ersudiplama (Tue, 12 Dec 2017 22:49:17 GMT):
Thanks @jworthington we will try that .... But I have current problem with query where we are trying to get 1200 unique in one query transaction

ersudiplama (Tue, 12 Dec 2017 22:49:26 GMT):
and it throws and error

jworthington (Tue, 12 Dec 2017 22:55:02 GMT):
If it's an error like message size greater than max, then it's a server setting that IBM controls. If not it's something else, as I handle 5k records with all default settings. I get the message size error at about 6k records. I just haven't changed the server settings yet.

jworthington (Tue, 12 Dec 2017 22:56:55 GMT):
Error: Received message larger than max (5153926 vs. 4194304)

ersudiplama (Wed, 13 Dec 2017 01:32:55 GMT):
we have 1200 records of 300KB so

muasif80 (Wed, 13 Dec 2017 05:22:25 GMT):
Has joined the channel.

muasif80 (Wed, 13 Dec 2017 05:30:26 GMT):
Hi

muasif80 (Wed, 13 Dec 2017 05:30:39 GMT):
I am new to blockchain hyperledger. Started a couple of weeks.

muasif80 (Wed, 13 Dec 2017 05:30:51 GMT):
Now trying to setup node sdk and run its examples.

muasif80 (Wed, 13 Dec 2017 06:09:07 GMT):
I got this error

muasif80 (Wed, 13 Dec 2017 06:09:07 GMT):
Error: Cannot find module './api.js'

NiketYende (Wed, 13 Dec 2017 07:52:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Fd297S3SYCzzttSjX) @muasif80 you need to run gulp ca.. check https://github.com/hyperledger/fabric-sdk-node/tree/release to install gulp

muasif80 (Wed, 13 Dec 2017 07:59:11 GMT):
Ok

muasif80 (Wed, 13 Dec 2017 07:59:27 GMT):
I have got an error like in the attached file

muasif80 (Wed, 13 Dec 2017 08:01:30 GMT):
error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (C:\\work\\blockchain\\fabric-sdk-node-release\\node_modules\\grpc\\src\\client.js:255:19 )\n at ClientDuplexStream._readsDone (C:\\work\\blockchain\\fabric-sdk-node-release\\node_modules\\grpc\\src\\client.js:221:8)\n at readCallback (C:\\work\\blockchain\\fabric-sdk-node-release\\node_ modules\\grpc\\src\\client.js:283:12)" not ok 9 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (C:\work\blockchain\fabric-sdk-node-release\node_modules\fabric-client\lib\Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDu plexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (C:\work\blockchain\fabric-sdk-node-release\node_modules\grpc\src\client.js:258:12) at ClientDuplexStream._readsDone (C:\work\bloc kchain\fabric-sdk-node-release\node_modules\grpc\src\client.js:221:8) at readCallback (C:\work\blockchain\fabric-sdk-node-release\node_modules\grpc\src\client.js:283:12) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then.then.then.then (C:\work\blockchain\fabric-sdk-node-release\test\integration\e2e\create-channel.js:211:5) stack: |- Error: Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (C:\work\blockchain\fabric-sdk-node-release\node_modules\fabric-client\lib\Orderer.js:128:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at ClientDuplexStream._emitStatusIfDone (C:\work\blockchain\fabric-sdk-node-release\node_modules\grpc\src\client.js:258:12) at ClientDuplexStream._readsDone (C:\work\blockchain\fabric-sdk-node-release\node_modules\grpc\src\client.js:221:8) at readCallback (C:\work\blockchain\fabric-sdk-node-release\node_modules\grpc\src\client.js:283:12) at Test.assert [as _assert] (C:\work\

Vadim (Wed, 13 Dec 2017 08:03:23 GMT):
@muasif80 what do the orderer logs say?

muasif80 (Wed, 13 Dec 2017 08:04:32 GMT):
I think I don't know exactly how to run it. I think Orderer node is not up

muasif80 (Wed, 13 Dec 2017 08:04:40 GMT):
So what should i do in order to run this test.

muasif80 (Wed, 13 Dec 2017 08:05:34 GMT):
Is it the one required node that i must put up manually before running this e2e test?

Vadim (Wed, 13 Dec 2017 08:06:34 GMT):
which test?

muasif80 (Wed, 13 Dec 2017 08:09:41 GMT):
The fabric-node-sdk test

muasif80 (Wed, 13 Dec 2017 08:09:58 GMT):
It has a docker-compose.yaml file should i use it to launch docker nodes first and then run the test

Vadim (Wed, 13 Dec 2017 08:10:14 GMT):
yes

muasif80 (Wed, 13 Dec 2017 08:10:19 GMT):
This test https://github.com/hyperledger/fabric-sdk-node/blob/release/test/integration/e2e.js

muasif80 (Wed, 13 Dec 2017 08:10:35 GMT):
Ok thanks.

muasif80 (Wed, 13 Dec 2017 08:17:04 GMT):
@Vadim Its successful and i got this message at the end

muasif80 (Wed, 13 Dec 2017 08:17:07 GMT):
1..88 # tests 88 # pass 88 # ok

muasif80 (Wed, 13 Dec 2017 08:19:13 GMT):
I have got a few messages like these

muasif80 (Wed, 13 Dec 2017 08:19:16 GMT):
ok 24 Successfully enrolled user 'admin' info: [packager/Golang.js]: packaging GOLANG from github.com/example_cc error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator s atisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])) at C:\work\blockchain\fabric-sdk-node-release\node_modules\grpc\src\client.js:554:15 error: [E2E testing]: install proposal was bad ok 25 Error: Failed to send install Proposal or receive valid response: Error: chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's crea tor satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])) at Client.newDefaultKeyValueStore.then.then.then (C:\work\blockchain\fabric-sdk-no de-release\test\integration\e2e\e2eUtils.js:143:10) error: [E2E install-chaincode-fail]: Failed to install chaincode in peers of organization "org1". o

muasif80 (Wed, 13 Dec 2017 08:19:39 GMT):
Are they errors or the induced errors for testing purposes

Vadim (Wed, 13 Dec 2017 08:19:59 GMT):
check in the code, most likely yes since the test passws

Vadim (Wed, 13 Dec 2017 08:19:59 GMT):
check in the code, most likely yes since the test passes

muasif80 (Wed, 13 Dec 2017 08:20:05 GMT):
Ok

jworthington (Wed, 13 Dec 2017 11:39:13 GMT):
Trying to get endorsements from peer in another Org. I read all the above. Everything is 1.1.0-preview, peers, orderers, ca, sdk. Using new Client.loadFromConfig. I get ValidateProposalMessage on Org1 peer1, but Org2 peer1 does not and goes straight to ValidateTransaction. Am I missing something or do I need to push the other org's peers to targets manually as in 'the patch'? The docs read as if it should work fine in 1.1.x. Policy is -P "AND('Org1.member', 'Org2.member')" and config has the peers. (2 each per org).

Amjadnz (Wed, 13 Dec 2017 14:54:56 GMT):
Can some one help here? I am trying to query the example chaincode _02 and am getting the following error. I have my crypto generated and is used to create containers for each fabric ca per ORG and 2 peers per org. ```Error: Failed evaluating policy on signed data during check policy on channel [adx-agm-channel] with policy [/Channel/Application/Writers]: [Failed to reach implicit threshold of 1 sub-policies, required 1 remaining]```

Amjadnz (Wed, 13 Dec 2017 14:55:28 GMT):
CreateChannel, JoinChannel and Install and Instantiate are all working fine.

Amjadnz (Wed, 13 Dec 2017 14:56:28 GMT):
I could see the instantiate in each PEER log - to confirm. The ERROR seems to be from the `queryChaincode` method when it is preparing and sending the proposal to query

Amjadnz (Wed, 13 Dec 2017 14:56:28 GMT):
I could see the instantiate in each PEER log - to confirm. The ERROR seems to be from the `queryChaincode` - of e2eUtils - method when it is preparing and sending the proposal to query

Amjadnz (Wed, 13 Dec 2017 14:57:41 GMT):
As part of Samples - I send the below command to execute the query `e2eUtils.queryChaincode('adx', 'v0', '300', t)`

Amjadnz (Wed, 13 Dec 2017 15:27:11 GMT):
Resolve it people - no issues now. In my queryChaincode method variable issue.

Amjadnz (Wed, 13 Dec 2017 15:27:11 GMT):
Resolve it people - no issues now. It was In my queryChaincode method - Wrong variable issue.

alexvicegrab (Wed, 13 Dec 2017 17:40:05 GMT):
Has joined the channel.

rameshthoomu (Wed, 13 Dec 2017 20:50:39 GMT):
@jimthematrix @bretharrison published fabric-shim-crypto https://www.npmjs.com/package/fabric-shim-crypto

MuhammadSalah (Thu, 14 Dec 2017 01:46:36 GMT):
Did anyone run into the error while working with Fabric-CA server; what is the identity type? Because I get this following error. Failed to register: Error: fabric-ca request register failed with errors [[{"code":0,"message":"No identity type provided. Please provide identity type"}]] I got that while working with fabcar example.

DarshanBc (Thu, 14 Dec 2017 05:19:32 GMT):
how to get list of the org in my network

DarshanBc (Thu, 14 Dec 2017 05:19:32 GMT):
how to get list of the org in my channel

mychewcents (Thu, 14 Dec 2017 09:16:49 GMT):
Has left the channel.

NiketYende (Thu, 14 Dec 2017 10:20:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZTjNFr2ArpQ9BDxZG) @DarshanBc channel.getOrganizations()

NiketYende (Thu, 14 Dec 2017 10:27:36 GMT):
eh.registerTxEvent is getting timed out with the below error: not ok 3 Failed to send instantiate transaction and get notifications within the timeout period. --- operator: fail at: Promise.all.then.catch (/opt/workspace/multichannel_bare_bones/test/integration/e2e/e2eUtils.js:402:7) stack: |- Error: Failed to send instantiate transaction and get notifications within the timeout period. at Test.assert [as _assert] (/opt/workspace/multichannel_bare_bones/node_modules/tape/lib/test.js:212:54) at Test.bound [as _assert] (/opt/workspace/multichannel_bare_bones/node_modules/tape/lib/test.js:64:32) at Test.fail (/opt/workspace/multichannel_bare_bones/node_modules/tape/lib/test.js:277:10) at Test.bound [as fail] (/opt/workspace/multichannel_bare_bones/node_modules/tape/lib/test.js:64:32) at Promise.all.then.catch (/opt/workspace/multichannel_bare_bones/test/integration/e2e/e2eUtils.js:402:7) ... Can some one help me with this?

NiketYende (Thu, 14 Dec 2017 10:31:30 GMT):
I am getting this error while trying to instantiate-chaincode, all the passes till registerTxEvent call are getting successfully passed. Any solution to this will be really helpful.

leezie (Thu, 14 Dec 2017 14:02:29 GMT):
Has joined the channel.

vu3mmg (Thu, 14 Dec 2017 14:21:42 GMT):
Hello I have a query regarding signing config updates for adding an organization . Do we have a nodejs function which is equivalent to peer channel signconfigtx . can we use the function signChannelConfig () to get the signature of the peers to add an organization at a consortium level?

bretharrison (Thu, 14 Dec 2017 15:19:41 GMT):
@vu3mmg The `signChannelConfig()` is a function to get the user identity assigned to the NodeSDK client instance to sign the `config` bytes. So if the NodeSDK user is the admin within the organization, then yes that function may be used.

bretharrison (Thu, 14 Dec 2017 15:20:42 GMT):
@NiketYende You may wish to turn on debug logging, this may help see

bretharrison (Thu, 14 Dec 2017 15:20:42 GMT):
@NiketYende You may wish to turn on debug logging, this may help see -- `export HFC_LOGGING='{"debug":"console"}'`

vu3mmg (Thu, 14 Dec 2017 15:36:02 GMT):
@bretharrison Thank you . One more following query regarding adding an org to a consortium ,which is not listed at consortium level . is signChannelConfig is for an existing channel and associated with a channel. ? what I want to do is to first create an org . then create a new channel and peers to that org .

bretharrison (Thu, 14 Dec 2017 15:41:33 GMT):
@vu3mmg The NodeSDK does not help much with the creation of the actual configuration, it is really only used to gather the needed signatures. Maybe checking this tutorial will help https://fabric-sdk-node.github.io/tutorial-channel-create.html

vu3mmg (Thu, 14 Dec 2017 16:04:38 GMT):
@bretharrison The point for which I am struggling is to find the right apis so that I can automate the creation of channels . The point of confusion is , all the signature gathering in node sdk seems to be in the context of a channel . But if we have to add an org at the consortium level which is not with any channel is signChannelConfig() a right choice ? Apologies if I am overlooking some thing here . Or the notion of consortium only a syntactic sugar ?

Roger12 1 (Thu, 14 Dec 2017 16:38:09 GMT):
Has joined the channel.

Roger12 1 (Thu, 14 Dec 2017 16:39:03 GMT):
hi, how to edit crypto config yaml file to generate crypto for four organization and also wants to change the name of organization from org1 to something else i.e instead of org1 I would like to have name like 'Unisef' and also wants to change domain from example.com to "KPLO.com" .so, Is it possible to do this in hyperledger 1.0 ??? because when I tried doing this changes , during user enroll i'm getting error : unable to fine the keyvaulestore. and when I'll again change the organization name to default i.e just 'org1' and domain to 'example.com'. Then everything works fine..? So what I'm trying to do is that thing is possible or not??? I want my network peer should look like Unisef.KPLO.com instead of org1.example.com?? Pls help..I'm using sdk-node and enrolling user through node

bretharrison (Thu, 14 Dec 2017 16:42:30 GMT):
@vu3mmg I will have to do some research on your question to see what other teams are doing in the area of channel create.

holocron (Thu, 14 Dec 2017 23:16:49 GMT):
I'm attempting to join a peer to a channel that I've created -- I'm able to get the genesis block with `channel.getGenesisBlock(genesis_request);` but when I try to use this in a channel.joinChannel request to a target peer, I get the following message: ``` sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: "JoinChain" request failed authorization checkfor channel [mychannel2]: [Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]]) ``` The peer's log shows ``` 2017-12-14 20:48:04.515 UTC [endorser] ProcessProposal -> ERRO 49e27 simulateProposal() resulted in chaincode response status 500 for txid: be9d5a5a59e7a969cc08cb42bd960d30851044d298e421ce39de5dc7e2776a3c ``` I'm certain that I'm using the admin ID for both the peer org and the orderer org...

SuperSeiyan (Fri, 15 Dec 2017 03:27:41 GMT):
Generally, for *invoking chaincode* we use transaction event to confirm transaction commited to blockchain network. would it be possible to use both transaction event and chaincode event to confirm transaction and get response from chaincode event together or I need to choose only one event for this purpose ? thank you.

holocron (Fri, 15 Dec 2017 04:18:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5gcSXibmHum8AZLBM) Can someone explain to me what's going on here with the username? I"d thought to use `admin` .. not `peerorg1Admin` or whatever it gets resolved to... In IBP Enterprise, it ends up being `PeerOrg1Admin`. I don't have credentials for this ID, but I guess it uses the same key and cert PEM as the org's `admin` id?

holocron (Fri, 15 Dec 2017 04:18:00 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/release/test/unit/util.js#L178 Can someone explain to me what's going on here with the username? I"d thought to use `admin` .. not `peerorg1Admin` or whatever it gets resolved to... In IBP Enterprise, it ends up being `PeerOrg1Admin`. I don't have credentials for this ID, but I guess it uses the same key and cert PEM as the org's `admin` id?

holocron (Fri, 15 Dec 2017 04:18:39 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/release/test/unit/util.js#L178 Can someone explain to me what's going on here with the username? I"d thought to use `admin` .. not `peerorg1Admin` or whatever it gets resolved to... In IBP Enterprise, it ends up being `PeerOrg1Admin`. I don't have credentials for this ID, but I guess it uses the same key and cert PEM as the org's `admin` id?

holocron (Fri, 15 Dec 2017 04:18:39 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/release/test/unit/util.js#L178 Can someone explain to me what's going on here with the username? I'd thought to use `admin` .. not `peerorg1Admin` or whatever it gets resolved to... In IBP Enterprise, it ends up being `PeerOrg1Admin`. I don't have credentials for this ID, but I guess it uses the same key and cert PEM as the org's `admin` id?

NiketYende (Fri, 15 Dec 2017 08:17:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4c3yJnSishS4CMKeh) @bretharrison Hi, i tried to use the debug logs.

NiketYende (Fri, 15 Dec 2017 08:17:12 GMT):
info: [E2E testing]: instantiate proposal was good ok 2 Successfully sent Proposal and received ProposalResponse debug: [E2E testing]: Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK", metadata - " multi_channel_1v0escc"vscc*A Org1MSP Org2MSP Org1MSP2D �� 6Ee%�=�8i�� �����\��C�om&U� ���CICuٶp񳑺��B?J Aė�.$�����: �L�-:-�v�т�v�EF�|��7>��aB Org1MSP", endorsement signature: 0E!����h+���4s� r� �7��:��0��C� 0�����x�� 듁� =�6��XVm�� ���� debug: [EventHub.js]: registerTxEvent txid 2586e62afcc0076cc6489916725b1abdf935fb1ade961e09b6ca277028bf2aff debug: [EventHub.js]: _checkConnection - start throw_error true, force_reconnect false debug: [Remote.js]: getUrl::grpcs://localhost:7053 debug: [EventHub.js]: _checkConnection - this hub grpcs://localhost:7053 is connected or trying to connect with stream channel state 2 debug: [E2E testing]: register eventhub localhost:7053 with tx=2586e62afcc0076cc6489916725b1abdf935fb1ade961e09b6ca277028bf2aff debug: [Channel.js]: sendTransaction - start :: channel {"name":"mychannel1","orderers":" Orderer : {url:grpcs://localhost:7050}|"} debug: [crypto_ecdsa_aes]: ecdsa signature: negative=0, words=[25461683, 15097182, 10997624, 30690848, 43173098, 9582150, 66595755, 51276051, 31687241, 852890, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, negative=0, words=[6351916, 3178236, 52249439, 67084035, 27900405, 5222044, 41533329, 7882810, 55146212, 1494585], length=10, red=null, recoveryParam=0 debug: [Orderer.js]: sendBroadcast - start debug: [Orderer.js]: sendBroadcast - sent message debug: [Orderer.js]: sendBroadcast - on data response: {"status":"SUCCESS"} debug: [Orderer.js]: sendBroadcast - resolve with SUCCESS debug: [Orderer.js]: sendBroadcast - on end: not ok 3 Failed to send instantiate transaction and get notifications within the timeout period. --- operator: fail at: Promise.all.then.catch (/opt/workspace/multichannel_bare_bones/test/integration/e2e/e2eUtils.js:398:7) stack: |- Error: Failed to send instantiate transaction and get notifications within the timeout period. at Test.assert [as _assert] (/opt/workspace/multichannel_bare_bones/node_modules/tape/lib/test.js:212:54) at Test.bound [as _assert] (/opt/workspace/multichannel_bare_bones/node_modules/tape/lib/test.js:64:32) at Test.fail (/opt/workspace/multichannel_bare_bones/node_modules/tape/lib/test.js:277:10) at Test.bound [as fail] (/opt/workspace/multichannel_bare_bones/node_modules/tape/lib/test.js:64:32) at Promise.all.then.catch (/opt/workspace/multichannel_bare_bones/test/integration/e2e/e2eUtils.js:398:7) ...

NiketYende (Fri, 15 Dec 2017 08:19:30 GMT):
It times out when trying to return the broadcast message from the Orderer.js. Any clue why this might be happening?

Vadim (Fri, 15 Dec 2017 08:31:21 GMT):
@NiketYende you tried to look at the orderer logs?

NiketYende (Fri, 15 Dec 2017 08:33:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tPj7s52PetTNvk9Pk) @Vadim yes i did, there were no errors in the orderer log. However , when i checked the peer log. I could see this error:

NiketYende (Fri, 15 Dec 2017 08:33:45 GMT):
2017-12-15 05:37:22.678 UTC [ConnProducer] NewConnection -> ERRO 3f5 Failed connecting to orderer.example.com:7050 , error: x509: certificate signed by unknown authority 2017-12-15 05:37:22.678 UTC [deliveryClient] connect -> DEBU 3f6 Connected to 2017-12-15 05:37:22.678 UTC [deliveryClient] connect -> ERRO 3f7 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] 2017-12-15 05:37:22.678 UTC [deliveryClient] try -> WARN 3f8 Got error: Could not connect to any of the endpoints: [orderer.example.com:7050] ,at 7 attempt. Retrying in 1m4s 2017-12-15 05:38:26.681 UTC [ConnProducer] NewConnection -> ERRO 3f9 Failed connecting to orderer.example.com:7050 , error: x509: certificate signed by unknown authority 2017-12-15 05:38:26.681 UTC [deliveryClient] connect -> DEBU 3fa Connected to 2017-12-15 05:38:26.681 UTC [deliveryClient] connect -> ERRO 3fb Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] 2017-12-15 05:38:26.681 UTC [deliveryClient] try -> WARN 3fc Got error: Could not connect to any of the endpoints: [orderer.example.com:7050] ,at 8 attempt. Retrying in 2m8s 2017-12-15 05:38:55.718 UTC [eventhub_producer] validateEventMessage -> DEBU 3fd ValidateEventMessage starts for signed event 0xc4218f8780 2017-12-15 05:38:55.719 UTC [eventhub_producer] deRegisterHandler -> DEBU 3fe deregistering event type: BLOCK 2017-12-15 05:38:55.720 UTC [eventhub_producer] Chat -> DEBU 3ff Received EOF, ending Chat 2017-12-15 05:40:34.683 UTC [ConnProducer] NewConnection -> ERRO 400 Failed connecting to orderer.example.com:7050 , error: x509: certificate signed by unknown authority 2017-12-15 05:40:34.683 UTC [deliveryClient] connect -> DEBU 401 Connected to 2017-12-15 05:40:34.683 UTC [deliveryClient] connect -> ERRO 402 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] 2017-12-15 05:40:34.683 UTC [deliveryClient] try -> WARN 403 Got error: Could not connect to any of the endpoints: [orderer.example.com:7050] ,at 9 attempt. Retrying in 4m16s 2017-12-15 05:44:50.685 UTC [ConnProducer] NewConnection -> ERRO 404 Failed connecting to orderer.example.com:7050 , error: x509: certificate signed by unknown authority 2017-12-15 05:44:50.686 UTC [deliveryClient] connect -> DEBU 405 Connected to 2017-12-15 05:44:50.686 UTC [deliveryClient] connect -> ERRO 406 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050]

NiketYende (Fri, 15 Dec 2017 08:36:20 GMT):
I am surprised as to why i am getting this, since docker-composer.yaml and config.json files are referencing the same ca-certs.

Vadim (Fri, 15 Dec 2017 08:37:43 GMT):
is it logs from a peer?

Vadim (Fri, 15 Dec 2017 08:38:03 GMT):
seems like your peer cannot authenticate an orderer

NiketYende (Fri, 15 Dec 2017 08:46:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iTcMzevThmpKSemB8) @Vadim yes, its from peer0.org1. I have used the new crypto content generated. But create-channel, join-channel, install-channel work seamlessly.

NiketYende (Fri, 15 Dec 2017 08:49:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gnPx5E9auMdsacbee) @Vadim It stops at broadcast.on('end', function (response) { logger.debug('sendBroadcast - on end:'); clearTimeout(broadcast_timeout); broadcast.cancel(); }); from the Orderer.js

Vadim (Fri, 15 Dec 2017 08:50:11 GMT):
@NiketYende your network seems to be misconfigured, it's not only client app

nakamuratomohiko (Fri, 15 Dec 2017 08:53:47 GMT):
Has joined the channel.

NiketYende (Fri, 15 Dec 2017 08:53:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tmQx6DcLaGe8DDNXR) @Vadim Do you mean the definitions from configtx.yaml & crypto-config.yaml? I have made use of the sample template and done necessary changes. Also docker-compose file is almost similar to the sample provided with the fabric-sdk-node.

Vadim (Fri, 15 Dec 2017 08:57:51 GMT):
@NiketYende I don't know where you made mistake exactly, but it seems you have a mix of old and new crypto material that your network is running with, so the nodes don't trust each other.

NiketYende (Fri, 15 Dec 2017 08:59:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hYEejnQ7YNTWobKXP) @Vadim Okay, let me retry creating the crypto and try again. Also the fabric and fabric-sdk-node are on the same version that is v1.0.2.

Vadim (Fri, 15 Dec 2017 08:59:58 GMT):
1.0.2 should be compatible with the latest stable release (1.0.5)

huruikagi (Fri, 15 Dec 2017 09:00:28 GMT):
Has joined the channel.

NiketYende (Fri, 15 Dec 2017 09:02:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ao8SD5krofFZrY2EH) @Vadim so 1.0.2 crypto content should be compatible with fabric-sdk-node latest release?

Vadim (Fri, 15 Dec 2017 09:03:03 GMT):
yes, but that's not the point, the point is that peer does not trust the orderer for some reason, possible because peer (or orderer) is running with an old crypto material

nakamuratomohiko (Fri, 15 Dec 2017 09:03:46 GMT):
Sorry for machine translation Im new to fabric Is there anyone who can answer this question? https://stackoverflow.com/questions/47666087/about-type-definition-of-hyperledger-fabric-sdk-for-node-js

asuchit (Fri, 15 Dec 2017 10:08:42 GMT):
Has joined the channel.

muasif80 (Fri, 15 Dec 2017 12:32:07 GMT):
Hello

kapilAtrey (Fri, 15 Dec 2017 12:54:25 GMT):
hey i wanted to know when using couchDb why every document inserted is starting with *marbles* as with the *initMarbles* function of the *marblechaincode02* of example chaincode it gives two documents *marblescolor~namebluemarble1* while writing the state for the composite key and *marblesmarble1* as per the *http://localhost:6984/_utils/#database/mychannel/_all_docs* for the marble initialize with args ["initMarble","marble1","blue","35","tom"] the id should be marble1 not marblesmarble1 from where it is getting this name and how it is useful in querying ? thanks in advance

bretharrison (Fri, 15 Dec 2017 15:56:20 GMT):
@SuperSeiyan You may use as many event's as you like. The backed fabric peer event service only has block registration, so the NodeSDK registers to get all new blocks. When a new block is received by the NodeSDK eventHub, it will check all the event registered with it for a match. So if you registered for both a transaction and chaincode event, both callbacks would get called if the same incoming block contained that transaction and that chaincode event. Since transaction IDs are unique, the transaction callback will not be called again, however the chaincode event is a pattern match, so it could be called more than once.

bretharrison (Fri, 15 Dec 2017 15:56:20 GMT):
@SuperSeiyan You may use as many event's as you like. The back end fabric peer event service only has block registration, so the NodeSDK registers to get all new blocks. When a new block is received by the NodeSDK eventHub, it will check all the event registered with it for a match. So if you registered for both a transaction and chaincode event, both callbacks would get called if the same incoming block contained that transaction and that chaincode event. Since transaction IDs are unique, the transaction callback will not be called again, however the chaincode event is a pattern match, so it could be called more than once.

bretharrison (Fri, 15 Dec 2017 15:56:20 GMT):
@SuperSeiyan You may use as many event's as you like. The back end fabric peer event service only has block registration, so the NodeSDK registers to get all new blocks. When a new block is received by the NodeSDK eventHub, it will check all the events registered with it for a match. So if you registered for both a transaction and chaincode event, both callbacks would get called if the incoming block contained that transaction and that chaincode event. Since transaction IDs are unique, the transaction callback will not be called again, however the chaincode event is a pattern match, so it could be called more than once.

ArnabChatterjee (Mon, 18 Dec 2017 00:33:45 GMT):
Hi everyone, Can anyone let me know why are we not joining anchor peers in the channel and the balance-transfer example? I want to know the benefit and disadvantage if any of defining anchor peers. Also, please let me know what is the effect of not having anchor peers on election or behavior of leading peer. Thank you. :)

zonked 1 (Mon, 18 Dec 2017 04:24:49 GMT):
Has joined the channel.

Ferdoran (Mon, 18 Dec 2017 07:58:21 GMT):
Hello everyone, When I'm trying to instantiate my chaincode via the node-sdk (using the *instantiate-chaincode.js* from the balance-transfer example) I'm getting an error that my some go package cannot be found. Error: ``````

Ferdoran (Mon, 18 Dec 2017 07:58:21 GMT):
Hello everyone, When I'm trying to instantiate my chaincode via the node-sdk (using the *instantiate-chaincode.js* from the balance-transfer example) I'm getting an error that my some go package cannot be found. Error: ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/car-cc/car.go:9:2: cannot find package "github.com/satori/go.uuid" in any of: /opt/go/src/github.com/satori/go.uuid (from $GOROOT) /chaincode/input/src/github.com/satori/go.uuid (from $GOPATH) /opt/gopath/src/github.com/satori/go.uuid " at /home/roland/dev//blockchain-rest-server/node_modules/fabric-client/node_modules/grpc/src/client.js:554:15 [2017-12-18 08:52:08.210] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-12-18 08:52:08.210] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-12-18 08:52:08.210] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

Ferdoran (Mon, 18 Dec 2017 07:58:21 GMT):
Hello everyone, When I'm trying to instantiate my chaincode via the node-sdk (using the *instantiate-chaincode.js* from the balance-transfer example) I'm getting an error that my some go package cannot be found. Error: ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/car-cc/car.go:9:2: cannot find package "github.com/satori/go.uuid" in any of: /opt/go/src/github.com/satori/go.uuid (from $GOROOT) /chaincode/input/src/github.com/satori/go.uuid (from $GOPATH) /opt/gopath/src/github.com/satori/go.uuid " at /home/roland/dev/blockchain-rest-server/node_modules/fabric-client/node_modules/grpc/src/client.js:554:15 [2017-12-18 08:52:08.210] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-12-18 08:52:08.210] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-12-18 08:52:08.210] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined ```

Ferdoran (Mon, 18 Dec 2017 08:03:30 GMT):
does the chaincode not get deployed correctly?

kapilAtrey (Mon, 18 Dec 2017 09:47:15 GMT):
hi everyone if i can query from the couchdb with function *GetQueryResult* can i update the document with the same

Ferdoran (Mon, 18 Dec 2017 10:25:21 GMT):
Anybody an idea for that? [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cozsQTCK27XcHBKLa)

ArnabChatterjee (Mon, 18 Dec 2017 10:39:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KzDkdGGysL9zSpvL4) Any ideas @Vadim ? Thanks. :)

fch22 (Mon, 18 Dec 2017 10:40:13 GMT):
Has joined the channel.

fch22 (Mon, 18 Dec 2017 10:44:12 GMT):
Hello all, I'm trying to make a query from SDK to my network created from "my first network" the result of the `node query.js`with debug activated is : ``` debug: [Channel.js]: sendTransactionProposal - start debug: [Client.js]: getTargetPeers - start debug: [Channel.js]: sendTransactionProposal - adding function arg:queryNode debug: [Channel.js]: sendTransactionProposal - adding arg:NODE1 debug: [Channel.js]: sendTransactionProposal - not adding the argument :: argbytes debug: [client-utils.js]: buildChannelHeader - type 3 channel_id nkoinchannel tx_id NaN epoch % chaincode_id null nkoincc debug: [client-utils.js]: buildProposal - not adding a transientMap debug: [crypto_ecdsa_aes]: ecdsa signature: negative=0, words=[32897915, 49912153, 2087778, 10631079, 2534145, 51107004, 36271291, 51040241, 37880077, 2935389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, negative=0, words=[37545902, 25248638, 15166513, 19121882, 51669284, 58470304, 45706943, 26791352, 23762752, 989315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], length=10, red=null, recoveryParam=1 debug: [Peer.js]: Peer.sendProposal - Start debug: [Peer.js]: Received proposal response from: grpc://localhost:7051 status: Error: Stream removed error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Stream removed ``` enrollAdmin and register was ok , and the network is up and running. I can query the chaincode from the CLI without problem Any suggestion on the origin of such error?

fch22 (Mon, 18 Dec 2017 10:44:20 GMT):
thanks in advance

CodeReaper (Mon, 18 Dec 2017 13:37:04 GMT):

Clipboard - December 18, 2017 7:06 PM

CodeReaper (Mon, 18 Dec 2017 13:37:04 GMT):
Hey, I was going through the endorsement policies and I saw that we can mention the whether the endorsement is to done by the 'member' or the 'admin'. Endorsements is done by the peers, so how is it classified as members and admins??

fch22 (Mon, 18 Dec 2017 14:29:14 GMT):
anyone has an idea on the origin of the error `Received proposal response from: grpc://localhost:7051 status: Error: Stream removed` during a `node query.js`

fch22 (Mon, 18 Dec 2017 14:29:14 GMT):
anyone has an idea on the origin of the error `Received proposal response from: grpc://localhost:7051 status: Error: Stream removed` during a `node query.js` ?

fch22 (Mon, 18 Dec 2017 14:56:33 GMT):
I set the debug level for grpc from the peer

fch22 (Mon, 18 Dec 2017 14:56:41 GMT):

Clipboard - December 18, 2017 3:56 PM

Vadim (Mon, 18 Dec 2017 14:57:31 GMT):
@fch22 you tried to enable grpc debug in nodejs?

fch22 (Mon, 18 Dec 2017 14:57:38 GMT):
that create new log from the peer:` `2017-12-18 14:50:43.628 UTC [grpc] Printf -> DEBU 73a transport: http2Server.HandleStreams failed to read frame: read tcp 172.18.0.5:7051->172.18.0.5:33720: read: connection reset by peer`

fch22 (Mon, 18 Dec 2017 14:57:55 GMT):
no I got it, but was trying to get more logs from the container

fch22 (Mon, 18 Dec 2017 14:58:07 GMT):
I found the way using the peer setlevel command

fch22 (Mon, 18 Dec 2017 14:58:26 GMT):
now when I see the error this should come from the TLS enable in docker-compose file

Vadim (Mon, 18 Dec 2017 14:58:30 GMT):
@fch22 check on the client side

Vadim (Mon, 18 Dec 2017 14:58:34 GMT):
GRPC_VERBOSITY=DEBUG GRPC_TRACE=all

fch22 (Mon, 18 Dec 2017 14:59:11 GMT):
@Vadim good, I wil test

fch22 (Mon, 18 Dec 2017 15:00:14 GMT):
thanks, more logs effectively, will analyze , thanks

muasif80 (Mon, 18 Dec 2017 17:33:07 GMT):
Fabric Explorer is in nodejs

muasif80 (Mon, 18 Dec 2017 17:33:21 GMT):
So i have a question if i want to build it before running what option i have?

muasif80 (Mon, 18 Dec 2017 17:33:32 GMT):
For example ./start.sh has node main.js

muasif80 (Mon, 18 Dec 2017 17:33:46 GMT):
But rather than doing node main.js i want to build the project

muasif80 (Mon, 18 Dec 2017 17:33:50 GMT):
How can i do that?

muasif80 (Mon, 18 Dec 2017 17:34:14 GMT):
For example i have done a change in the template and i want to compile it into index-gen.html

muasif80 (Mon, 18 Dec 2017 17:36:33 GMT):
Oh it is to be built using webpack

FaysalAhmed (Tue, 19 Dec 2017 04:10:41 GMT):
Has joined the channel.

labcoinpoc (Tue, 19 Dec 2017 07:48:32 GMT):
Has joined the channel.

matrisis (Tue, 19 Dec 2017 10:51:21 GMT):
Has joined the channel.

muasif80 (Tue, 19 Dec 2017 12:06:45 GMT):
Hello

muasif80 (Tue, 19 Dec 2017 12:07:40 GMT):
@Vadim Is it the case that whenever we want to do anything in the blockchain we have to enroll the user identity to the orderer before executing that transaction?

Vadim (Tue, 19 Dec 2017 12:08:02 GMT):
no

muasif80 (Tue, 19 Dec 2017 12:08:02 GMT):
and our transaction will occur in the scope of that identity?

muasif80 (Tue, 19 Dec 2017 12:08:17 GMT):
Ok

muasif80 (Tue, 19 Dec 2017 12:09:01 GMT):
I have this output for the test run on the node sdk

muasif80 (Tue, 19 Dec 2017 12:09:02 GMT):
C:\work\blockchain\fabric-sdk-node-release>node test/integration/e2e/invoke-transaction.js info: [TestUtil]: ******************************************************************************* ******************************************************************************* * * Using temp dir: C:\Users\asif\AppData\Local\Temp\hfc * ******************************************************************************* ******************************************************************************* TAP version 13 # ***** End-to-end flow: invoke transaction to move money ***** ok 1 Successfully enrolled user 'admin' ok 2 Successfully enrolled user 'admin' info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.org2.example.com","grpc.default_authority":"peer0.org2.example.com","grpc.http2.keepalive_time ":15} # ***************************************************************************** # stop and start the peer event hub ---- N O W ----- you have 0 millis # ***************************************************************************** ok 3 transaction proposal has response status of good ok 4 transaction proposal signature and endorser are valid ok 5 transaction proposal has response status of good ok 6 transaction proposal signature and endorser are valid ok 7 compareProposalResponseResults exection did not throw an error ok 8 All proposals have a matching read/writes sets ok 9 Successfully sent Proposal and received ProposalResponse ok 10 The balance transfer transaction has been committed on peer localhost:8053 ok 11 Successfully sent transaction to the orderer. # ****************************************************************** # To manually run /test/integration/query.js, set the following environment variables: # export E2E_TX_ID='fe68f9471b316a74d63efb8281291bb814b96501df9acc23944ce64ee40cf7d8' # ****************************************************************** ok 12 Successfully invoke transaction chaincode on channel 1..12 # tests 12 # pass 12 # ok

muasif80 (Tue, 19 Dec 2017 12:09:30 GMT):
It says "ok 1 Successfully enrolled user 'admin'" what does this mean then?

Vadim (Tue, 19 Dec 2017 12:11:03 GMT):
it means it goes to ca and gets admin cert signed by it

Vadim (Tue, 19 Dec 2017 12:11:10 GMT):
nothing to do with orderer

Vadim (Tue, 19 Dec 2017 12:11:25 GMT):
transaction is then sent on behalf of that admin

muasif80 (Tue, 19 Dec 2017 12:12:11 GMT):
Ok.

muasif80 (Tue, 19 Dec 2017 12:12:33 GMT):
When transaction is sent to the fabric, the fabric will in turn verify that admin from the ca again?

Vadim (Tue, 19 Dec 2017 12:14:25 GMT):
peers/orderers verify that the tx is signed by any of the root certs with is in the channel config. The CA is using to sign one of that certs, so the check passes.

muasif80 (Tue, 19 Dec 2017 12:15:22 GMT):
Ok right thanks

krabradosty (Tue, 19 Dec 2017 22:03:57 GMT):
Has joined the channel.

zonked 1 (Tue, 19 Dec 2017 22:40:39 GMT):
Hi there

zonked 1 (Tue, 19 Dec 2017 22:40:42 GMT):
Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054] at ClientRequest. (/home/zonked/InfoTrac_Fabric/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:711:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at emitErrorNT (net.js:1281:8) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

zonked 1 (Tue, 19 Dec 2017 22:40:52 GMT):
Has anyone managed to solve this issue before?

zonked 1 (Tue, 19 Dec 2017 23:29:33 GMT):
solved by replacing the ip of local host with the ca docker ip

zonked 1 (Tue, 19 Dec 2017 23:29:45 GMT):
new error

zonked 1 (Tue, 19 Dec 2017 23:29:46 GMT):
Error: Enrollment failed with errors [[{"code":0,"message":"CA 'ca.a.example.com' does not exist"}]] at IncomingMessage. (/home/zonked/InfoTrac_Fabric/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:698:22) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) Failed to enroll admin: Error: Failed to enroll admin

matrisis (Wed, 20 Dec 2017 09:21:06 GMT):
Hi, where can i fin a complete documentation for i.e. `APIstub.GetStateByRange` ?

matrisis (Wed, 20 Dec 2017 09:21:06 GMT):
Hi, where can i find a complete documentation for i.e. `APIstub.GetStateByRange` ?

Vadim (Wed, 20 Dec 2017 09:24:52 GMT):
https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L103-L112

matrisis (Wed, 20 Dec 2017 09:26:48 GMT):
Thx you're the best !

CodeReaper (Wed, 20 Dec 2017 09:51:08 GMT):
getting this error a lot while instantiating chaincode- 'launched and wa iting for registration'

CodeReaper (Wed, 20 Dec 2017 09:51:08 GMT):
getting this error a lot while instantiating chaincode- 'launched and waiting for registration'. any idea?

Vadim (Wed, 20 Dec 2017 09:51:39 GMT):
peer is waiting for chaincode container to start

CodeReaper (Wed, 20 Dec 2017 12:17:46 GMT):
All peers have started the chaincode container. The peer which gives this doesnt launch it even long after

CodeReaper (Wed, 20 Dec 2017 12:18:38 GMT):
It sometimes comes for one one peer, if i launch another chaincode next time it comes from different amount of peers

CodeReaper (Wed, 20 Dec 2017 12:19:41 GMT):
Waiting one or two minutes doesnt change the outcone. Have to launch multiple chaincodes with dfferent names until one is finally launched by all

joshhw (Wed, 20 Dec 2017 16:14:42 GMT):
has anyone dealt with container communication across multiple EC2/AWS instances?

joshhw (Wed, 20 Dec 2017 16:14:59 GMT):
is there a way to configure my containers to know where to each other container is?

ArnabChatterjee (Thu, 21 Dec 2017 04:42:08 GMT):
I know this question has been asked numerous times but I can't seem to find a solution. Can you please help me out in this ? ``` E1220 21:32:20.577147990 19040 ssl_transport_security.c:1348] Cannot load server root certificates. E1220 21:32:20.577174899 19040 security_connector.c:837] Handshaker factory creation failed with TSI_INTERNAL_ERROR. E1220 21:32:20.577181025 19040 secure_channel_create.c:127] Failed to create secure subchannel for secure name 'peer0.org1.test:7051' E1220 21:32:20.577185307 19040 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. E1220 21:32:49.853180816 19040 client_auth_filter.c:350] assertion failed: auth_context != NULL ``` I face this when I have concurrent requests. (https://github.com/grpc/grpc/issues/12642)

ArnabChatterjee (Thu, 21 Dec 2017 04:42:08 GMT):
I know this question has been asked numerous times but I can't seem to find a solution. Can you please help me out in this ? ``` E1220 21:32:20.577147990 19040 ssl_transport_security.c:1348] Cannot load server root certificates. E1220 21:32:20.577174899 19040 security_connector.c:837] Handshaker factory creation failed with TSI_INTERNAL_ERROR. E1220 21:32:20.577181025 19040 secure_channel_create.c:127] Failed to create secure subchannel for secure name 'peer0.org1.test:7051' E1220 21:32:20.577185307 19040 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. E1220 21:32:49.853180816 19040 client_auth_filter.c:350] assertion failed: auth_context != NULL ``` I face this when I have concurrent requests. (https://github.com/grpc/grpc/issues/12642)

ArnabChatterjee (Thu, 21 Dec 2017 04:42:08 GMT):
I know this question has been asked numerous times but I can't seem to find a solution. Can you please help me out in this ? ``` E1220 21:32:20.577147990 19040 ssl_transport_security.c:1348] Cannot load server root certificates. E1220 21:32:20.577174899 19040 security_connector.c:837] Handshaker factory creation failed with TSI_INTERNAL_ERROR. E1220 21:32:20.577181025 19040 secure_channel_create.c:127] Failed to create secure subchannel for secure name 'peer0.org1.test:7051' E1220 21:32:20.577185307 19040 secure_channel_create.c:158] Failed to create subchannel arguments during subchannel creation. E1220 21:32:49.853180816 19040 client_auth_filter.c:350] assertion failed: auth_context != NULL ``` I face this when I have concurrent requests. I am using fabric-sdk-node v1.0 . Ref :(https://github.com/grpc/grpc/issues/12642)

ArnabChatterjee (Thu, 21 Dec 2017 04:42:42 GMT):
@Vadim @jimthematrix

ArnabChatterjee (Thu, 21 Dec 2017 05:16:32 GMT):
@joshhw - you can try using hostnames of AWS instances instead of using localhost and it should work normally. It does not need to know the existence of docker containers. You only need to take care of the ports exposed by docker containers.

zhai2005 (Thu, 21 Dec 2017 05:57:46 GMT):
Has joined the channel.

zhai2005 (Thu, 21 Dec 2017 06:34:34 GMT):
Can some one help me? [2017-12-21 11:03:38.015] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140063596390208:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:825: ] at ClientRequest. (/home/jack/nodeTest/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:724:12) at emitOne (events.js:125:13) at ClientRequest.emit (events.js:221:7) at TLSSocket.socketErrorListener (_http_client.js:389:9) at emitOne (events.js:125:13) at TLSSocket.emit (events.js:221:7) at onwriteError (_stream_writable.js:409:12) at onwrite (_stream_writable.js:431:5) at _destroy (internal/streams/destroy.js:39:7) at TLSSocket.Socket._destroy (net.js:565:3) [2017-12-21 11:03:38.015] [DEBUG] Helper - pony failed to register [2017-12-21 11:03:38.015] [ERROR] Helper - pony enrollment failed (node:3137) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Cannot save null userContext. (node:3137) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property '_enrollmentSecret' of null

NiketYende (Thu, 21 Dec 2017 10:55:10 GMT):
Hi, i am using channel.queryBlock(block_num) from the node-sdk code to get the details of the block, however the input section of the chaincode_proposal_payload.input section contains encrypted content. I am currently using chaincode_proposal_payload.input.toString('utf8') to covert to a more readable string but this string is not allowed to convert to json format due to some unwanted characters. Is there any other way to parse chaincode_proposal_payload.input and convert it to a more readable string ? @Vadim

NiketYende (Thu, 21 Dec 2017 10:55:10 GMT):
Hi, i am using channel.queryBlock(block_num) from the node-sdk code to get the details of the block, however the input section of the "chaincode_proposal_payload.input" contains encrypted content. I am currently using chaincode_proposal_payload.input.toString('utf8') to covert to a more readable string but this string is not allowed to convert to json format due to some unwanted characters. Is there any other way to parse chaincode_proposal_payload.input and convert it to a more readable string ? @Vadim

mastersingh24 (Thu, 21 Dec 2017 10:57:32 GMT):
Is TLS enabled on the fabric-ca? I believe the error is TLS mismatch between client and server (https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qyN67WbrDft5BcYtb) @zhai2005

CorentinPacaud (Thu, 21 Dec 2017 11:00:27 GMT):
Has joined the channel.

CorentinPacaud (Thu, 21 Dec 2017 11:00:43 GMT):
Hi everyone.

zhai2005 (Thu, 21 Dec 2017 11:00:47 GMT):
@mastersingh24 thx。I have modified https to http, now it's work.

CorentinPacaud (Thu, 21 Dec 2017 11:01:28 GMT):
I have some issue when using a query in NodeJs. the "==" clause seems not working

CorentinPacaud (Thu, 21 Dec 2017 11:01:46 GMT):
``` var query = bizNetworkConnection.buildQuery('SELECT org.odm.assets.SharedHolder WHERE (iban == _$input)'); bizNetworkConnection.query(query, { input: iban }) .then(function (assets) { console.log("Result SH by iban : ", assets); ```

mastersingh24 (Thu, 21 Dec 2017 11:03:05 GMT):
Looks like you are using Composer? Might want to try the #composer channel @CorentinPacaud

CorentinPacaud (Thu, 21 Dec 2017 11:03:13 GMT):
Oh sry

NiketYende (Thu, 21 Dec 2017 11:47:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Lj2J22y2fDRJnZkm2) Can some one help me with this ?

CorentinPacaud (Thu, 21 Dec 2017 12:09:19 GMT):
Has left the channel.

jonathan-blood (Thu, 21 Dec 2017 15:37:45 GMT):
Has joined the channel.

ArnabChatterjee (Fri, 22 Dec 2017 00:26:54 GMT):
Hello, I am facing an issue with chaincode instantiation. Environment : Org1 - peer0 - peer1 Org 2 - peer0 - peer1 Fabric v1.0 & Node SDK v1.0 Scenario: 1. Install CC on Org1 -> peer0 & peer1 2. Install CC on Org2 -> peer0 & peer1 3. Instantiate CC on Org2 4. docker kill Org1.peer0 container 5. docker start Org1.peer0 container --> peer container started but CC container did not start 6. docker kill Org2.peer0 container 7. docker start Org2.peer0 container --> peer & CC container started successfully I checked the logs and found the following error: ``` 2017-12-21 08:31:18.797 UTC [chaincode] ExecuteChaincode -> ERRO ac0 Error executing chaincode: Could not get deployment transaction from LSCC for mycc:v0 - Get ChaincodeDeploymentSpec for mycc/skkchannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-12-21 08:31:18.797 UTC [endorser] callChaincode -> DEBU ac1 Exit 2017-12-21 08:31:18.797 UTC [endorser] simulateProposal -> ERRO ac2 failed to invoke chaincode name:"mycc" on transaction 70ccee281fd614962924b5bebeef2ab5fc34a5d9d9a785c2751a1267d75eb8a4, error: Error executing chaincode: Could not get deployment transaction from LSCC for mycc:v0 - Get ChaincodeDeploymentSpec for mycc/skkchannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-12-21 08:31:18.797 UTC [endorser] simulateProposal -> DEBU ac3 Exit ``` Any clues ? I checked : https://jira.hyperledger.org/browse/FAB-7065 & https://jira.hyperledger.org/browse/FAB-5476

ArnabChatterjee (Fri, 22 Dec 2017 00:28:05 GMT):
@Vadim @mastersingh24 @jimthematrix

ArnabChatterjee (Fri, 22 Dec 2017 00:41:21 GMT):
User User_1 added by ArnabChatterjee.

ArnabChatterjee (Fri, 22 Dec 2017 00:41:57 GMT):
User User_2 added by ArnabChatterjee.

ArnabChatterjee (Fri, 22 Dec 2017 00:43:13 GMT):
@muralisr

vikimeng (Fri, 22 Dec 2017 01:07:16 GMT):
Has joined the channel.

vikimeng (Fri, 22 Dec 2017 01:47:12 GMT):
Hello, i am working on chaincode. Follow this link http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html i create the signed package, but this is no place to introduce how to use the signed package. When i use node-sdk to install chaincode with "chaincodePackage" params, it install success but when instantiate fail, the error message is `[client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (500): {"message":"Error processing tar file(exit status 1): unexpected EOF"}`. Is any one know how to use the signed package to install and instantiate chaincode?

vikimeng (Fri, 22 Dec 2017 02:17:57 GMT):
look at the sdk source code https://github.com/hyperledger/fabric-sdk-node/blob/v1.0.2/fabric-client/lib/Client.js#L1151 it looks like the chaincodePackage should be go tar file, not a singed package

muralisr (Fri, 22 Dec 2017 13:23:52 GMT):
@ArnabChatterjee I intend to look at https://jira.hyperledger.org/browse/FAB-7065... meanwhile suggest using "peer chaincode package ... " and "peer chaincode install " where is the output from "peer chaincode package..". This way you'll install the same package on both peers

ArnabChatterjee (Fri, 22 Dec 2017 13:25:58 GMT):
@muralisr - Thanks for your response. I will do so. BTW, can you please let me know whether it has got anything to do with setting gossip addresses/configs in my peer container? Currently, I am using AWS multi instance env. and do not have any environment variable related to gossip set in my docker compose.

muralisr (Fri, 22 Dec 2017 13:27:04 GMT):
@ArnabChatterjee doesn't sound like it would have anything to do with gossip properties

muralisr (Fri, 22 Dec 2017 13:28:52 GMT):
@vikimeng the signed package based install is supported only with CLI currently.

ArnabChatterjee (Fri, 22 Dec 2017 15:42:58 GMT):
@muralisr - doesnt the ChaincodeData get synced from the other peers once a peer recovers from a crash?

muralisr (Sat, 23 Dec 2017 12:40:50 GMT):
@ArnabChatterjee if it is committed in the ledger, its should be synced up when the peer comes up.

gauravgiri (Sun, 24 Dec 2017 16:43:29 GMT):
Has joined the channel.

gauravgiri (Sun, 24 Dec 2017 16:43:57 GMT):
We have a custom node.js(fabric-sdk-node v1.0.2) application, and the blockchain network is also build using images :x86_64-1.0.2. Through this application as a first step we are trying to create channel using a modified version of https://github.com/hyperledger/fabric-sdk-node/blob/v1.0.2/test/integration/e2e/create-channel.js. However, client.createChannel(request), results in error as below, any suggestions/pointers for the same?: error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST not ok 9 Error: BAD_REQUEST at ClientDuplexStream. (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/node_modules/grpc/src/client.js:299:14) --- operator: fail at: Client.newDefaultKeyValueStore.then.then.then.then.then.then (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/create-channel.js:207:5) stack: |- Error: Error: BAD_REQUEST at ClientDuplexStream. (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/node_modules/fabric-client/lib/Orderer.js:106:21) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/node_modules/grpc/src/client.js:299:14) at Test.assert [as _assert] (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/node_modules/tape/lib/test.js:212:54) at Test.bound [as _assert] (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/node_modules/tape/lib/test.js:64:32) at Test.fail (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/node_modules/tape/lib/test.js:277:10) at Test.bound [as fail] (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/node_modules/tape/lib/test.js:64:32) at Client.newDefaultKeyValueStore.then.then.then.then.then.then (/home/giri_cloud02/source/aig/mm-mvp-chaincode/_fabricDeployment/scripts/create-channel.js:207:5) at process._tickCallback (internal/process/next_tick.js:109:7) At the same time the orderer logs are as below: 2017-12-24 15:38:47.472 UTC [fsblkstorage] newBlockfileStream -> DEBU 148 newBlockfileStream(): filePath=[/var/hyperledger/production/orderer/chains/mychannel/blockfile_000000], startOffset=[0] 2017-12-24 15:38:47.472 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 149 Remaining bytes=[14265], Going to peek [8] bytes 2017-12-24 15:38:47.472 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 14a Returning blockbytes - length=[14263], placementInfo={fileNum=[0], startOffset=[0], bytesOffset=[2]} 2017-12-24 15:38:47.473 UTC [orderer/multichain] newChainSupport -> DEBU 14b [channel: mychannel] Retrieved metadata for tip of chain (blockNumber=0, lastConfig=0, lastConfigSeq=0): 2017-12-24 15:38:47.474 UTC [orderer/multichain] NewManagerImpl -> INFO 14c Starting with system channel mychannel and orderer type solo 2017-12-24 15:38:47.474 UTC [orderer/main] main -> INFO 14d Beginning to serve requests 2017-12-24 15:42:07.526 UTC [orderer/main] Broadcast -> DEBU 14e Starting new Broadcast handler 2017-12-24 15:42:07.526 UTC [orderer/common/broadcast] Handle -> DEBU 14f Starting new broadcast loop 2017-12-24 15:42:07.526 UTC [orderer/common/broadcast] Handle -> DEBU 150 Preprocessing CONFIG_UPDATE 2017-12-24 15:42:07.526 UTC [orderer/configupdate] Process -> DEBU 151 Processing channel reconfiguration request for channel mychannel 2017-12-24 15:42:07.526 UTC [common/configtx] addToMap -> DEBU 152 Adding to config map: [Groups] /Channel 2017-12-24 15:42:07.526 UTC [common/configtx] addToMap -> DEBU 153 Adding to config map: [Groups] /Channel/Application 2017-12-24 15:42:07.526 UTC [common/configtx] addToMap -> DEBU 154 Adding to config map: [Groups] /Channel/Application/Org1MSP 2017-12-24 15:42:07.526 UTC [common/configtx] addToMap -> DEBU 155 Adding to config map: [Groups] /Channel/Application/Org2MSP 2017-12-24 15:42:07.526 UTC [common/configtx] addToMap -> DEBU 156 Adding to config map: [Values] /Channel/Consortium 2017-12-24 15:42:07.526 UTC [orderer/common/broadcast] Handle -> WARN 157 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Existing config does not contain element for [Values] /Channel/Consortium but was in the read set

Cavan2477 (Tue, 26 Dec 2017 01:57:50 GMT):
Has joined the channel.

AmarshAnand (Tue, 26 Dec 2017 02:08:46 GMT):
Has joined the channel.

AmarshAnand (Tue, 26 Dec 2017 02:09:42 GMT):
Hi all ... just posted on SO : 0 down vote favorite I have just started working with Hyperledger Fabric. I was looking for a tool that would demonstrate graphically the entire network and its operations. ( https://stackoverflow.com/questions/47973275/hyperledger-fabric-discover-network-topology-graphically )

AmarshAnand (Tue, 26 Dec 2017 02:09:42 GMT):
I have just started working with Hyperledger Fabric. I was looking for a tool that would demonstrate graphically the entire network and its operations. ( https://stackoverflow.com/questions/47973275/hyperledger-fabric-discover-network-topology-graphically )

crj (Tue, 26 Dec 2017 03:04:50 GMT):
Has joined the channel.

NiketYende (Tue, 26 Dec 2017 10:44:22 GMT):
Any multi-channel setup example using fabric-sdk-node ? @bretharrison @jimthematrix

DannyWong (Wed, 27 Dec 2017 02:16:17 GMT):
Seems that the development progress of NodeSDK is slowing down a lot than the Go SDK...

DannyWong (Wed, 27 Dec 2017 02:16:47 GMT):
Any community call for Node SDK?

kapilAtrey (Wed, 27 Dec 2017 06:08:56 GMT):
Hi, So look what i've done I created a 2 org channel( org1 and org2 ) and register and enrolled a user from org1 install chaincode normally but while instantiating the chaincode i modified the node application a little i provide an extra key value pair as per below

kapilAtrey (Wed, 27 Dec 2017 06:08:57 GMT):
var endorseObject={ identities: [ { role: { name: "member", mspId: "Org1MSP" }}, { role: { name: "member", mspId: "Org2MSP" }} ], policy: { "2-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } } // send proposal to endorser var request = { chaincodeId: chaincodeName, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, endorsement:endorseObject };

kapilAtrey (Wed, 27 Dec 2017 06:10:45 GMT):
so when i am invoking the chaincode from org1's user what i was expecting that it'll not let me do this transaction and throw me some endorsing error but you know what i recieved a tx_id in return which means that transaction is committed So am i taking the endorcing in a wrong manner or what it is ??

kapilAtrey (Wed, 27 Dec 2017 06:12:07 GMT):
*the code snippet i mentioned above is from instantiate chaincode of the app folder intantiate-chaincode.js*

kapilAtrey (Wed, 27 Dec 2017 06:13:35 GMT):
and i get the endorsement object from here https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest__anchor

kapilAtrey (Wed, 27 Dec 2017 06:13:44 GMT):
Thank you

GaneshSharma (Wed, 27 Dec 2017 16:55:35 GMT):
Has joined the channel.

Preetam007 (Thu, 28 Dec 2017 19:45:15 GMT):
Has joined the channel.

Kaltrak (Fri, 29 Dec 2017 02:54:21 GMT):
Has joined the channel.

Lucifer (Fri, 29 Dec 2017 08:22:08 GMT):
Has joined the channel.

Lucifer (Fri, 29 Dec 2017 08:52:55 GMT):
hi, i want to sent encryption data through transientMap field amd for that using the following format : transientMap: '{"PUBKEY":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FESEt5NVNCYi9EV1dCRVVtR2JWQjNnN2lyVAplV0dpRlZuR3JBRDMxbEpJNmQ0OUtiNWVwVCt2dnFMRStsNlY3UlVCakJSa2ZyQlcvQ1IwYWZFM2hFR3JQZlRwCklGanljbGJCSEdvOGV4NmpoZVp2THN0anNXb3h2ZnZnWWRLTFFObUFuWWVzZnVKcjBGbGZmUGxubjBHc29ScEkKT1ZrYXIvSXZ6M1dzRm1HU1d3SURBUUFCCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo="}' }

Lucifer (Fri, 29 Dec 2017 08:54:20 GMT):
but chaincode can't detect the value for PUBKEY.

Lucifer (Fri, 29 Dec 2017 08:55:05 GMT):
just wanted to know, if there is any error in this format

Lucifer (Fri, 29 Dec 2017 08:55:08 GMT):
?

Subramanyam (Fri, 29 Dec 2017 10:36:49 GMT):
Hi Good Evening Can you please Let me know how to install hyperledger fabric Node sdk in centos

zerppen (Sun, 31 Dec 2017 20:31:20 GMT):
Has joined the channel.

kamisdy (Tue, 02 Jan 2018 08:32:58 GMT):
Hi,I has a problem here. When i user sdk to addPeer or addOrderer into the channel, I found that it will create a socket connection, and it wouldn't close as soon as it's work has been done, such as create channel, getConfig. etc. And if I call some function or use a new cleint to addPeer so many times, It will hold so many connections , is it normal?

vikimeng (Tue, 02 Jan 2018 11:07:57 GMT):
@kapilAtrey From the node sdk code, the endorsement policy in request should be 'endorsement-policy' not 'endorsement' , you use the policy "2-of" means you need org1 and org2 sign. It can instantiate success, but invoke fail

vikimeng (Tue, 02 Jan 2018 11:15:33 GMT):
Is someone can tell me how to make the invoke success when use endorsement policy as `{ "identities": [ {"role": {"name": "member","mspId": "Org1MSP"}}, {"role": {"name": "member","mspId": "Org2MSP"}} ], "policy": { "2-of": [ {"signed-by": 0}, {"signed-by": 1} ] } }` I have org1 and org2, both have 2 peers and the 4 peers join to same channel. Install same chaincode to the 4 peers and instantiate on any peer. Then invoke, it give me error `"Error: ENDORSEMENT_POLICY_FAILURE\n at eh.registerTxEvent (/root/development/app/invoke-transaction.js:100:14)\n at EventHub._processTxOnEvents (/root/development/node_modules/fabric-client/lib/EventHub.js:775:5)\n at ClientDuplexStream. (/root/development/node_modules/fabric-client/lib/EventHub.js:310:10)\n at emitOne (events.js:96:13)\n at ClientDuplexStream.emit (events.js:188:7)\n at readableAddChunk (_stream_readable.js:176:18)\n at ClientDuplexStream.Readable.push (_stream_readable.js:134:10)\n at readCallback (/root/development/node_modules/grpc/src/client.js:299:14)" and from docker log, it gives me ` [txvalidator] VSCCValidateTxForCC -> ERRO 963 VSCC check failed for transaction txid=2cb729960e608341a3499f95f78f1b75d6591484e29b5f18a546c0207f10d8ac, error VSCC error: policy evaluation failed, err Failed to authenticate policy [lockbasedtxmgr] Done -> DEBU 964 Done with transaction simulation / query execution [c050e642-e17a-4261-8004-346c53bcbbfb] [txvalidator] Validate -> ERRO 965 VSCCValidateTx for transaction txId = 2cb729960e608341a3499f95f78f1b75d6591484e29b5f18a546c0207f10d8ac returned error VSCC error: policy evaluation failed, err Failed to authenticate policy` }` But when change the policy to `"1-of"`, the invoke work success. Not sure how to make `"2-of"` policy work.

matrisis (Tue, 02 Jan 2018 15:34:08 GMT):
Has left the channel.

sativ01.ca (Tue, 02 Jan 2018 16:17:15 GMT):
Has joined the channel.

bretharrison (Tue, 02 Jan 2018 18:42:39 GMT):
@kamisdy You may wish to try the `close()` method on the Peer and Orderer objects.

bretharrison (Tue, 02 Jan 2018 19:13:08 GMT):
@vikimeng The proposal must be endorsed by a peer in org1 and a peer in org2, the transaction submitted to the orderer must include both the endorsements when using a `2-of` endorsement policy.

bretharrison (Tue, 02 Jan 2018 19:13:08 GMT):
@vikimeng The proposal must be endorsed by a peer in org1 and a peer in org2, the transaction submitted to the orderer must include both proposal endorsements when using a `2-of` endorsement policy.

bretharrison (Tue, 02 Jan 2018 19:34:59 GMT):
@Lucifer what type of chain code are you using

jsrhome (Tue, 02 Jan 2018 19:43:01 GMT):
Has joined the channel.

jsrhome (Tue, 02 Jan 2018 19:58:38 GMT):
@bretharrison When instantiating node chain code using cli, I'm regularly getting an npm EINTEGRITY error. I can run the exact same script (based on startFabric.sh from the fabcar example), and the chain code installs perfectly. I haven't seen any documentation on how the cli installs node chain code, and don't have any idea how to diagnose and fix the problem. The package where npm fails the integrity check seems to be random. I have run "npm cache verify" on my local machine, which sometimes seems to clear the problem. But not always. I don't even know if cli is using my local npm, or where it is doing the install before packaging it and producing the chain code docker image. When it fails, there is no chain code docker image. Is there a place where I can read more about how this process works, and how to possibly avoid this problem?

bretharrison (Tue, 02 Jan 2018 20:07:08 GMT):
@kapilAtrey Endorsement policies are for the execution of the chaincode, not for the instanstiate

bretharrison (Tue, 02 Jan 2018 20:07:08 GMT):
@kapilAtrey Endorsement policies are for the execution of the chaincode, not for the instantiation of chaincode

bretharrison (Tue, 02 Jan 2018 20:11:28 GMT):
@gauravgiri BAD_REQUEST many times means that the channel already exist. Be sure to run configtx to generate a new channel config

elias_p (Tue, 02 Jan 2018 22:56:16 GMT):
Has joined the channel.

vikimeng (Wed, 03 Jan 2018 01:43:23 GMT):
@bretharrison The endorsement policies are added when instantiate on org1, how to make a peer in org2 endorsed when using `2-of` policy?

kamisdy (Wed, 03 Jan 2018 02:19:33 GMT):
Hi,I has a problem here. When i user sdk to addPeer or addOrderer into the channel, I found that it will create a socket connection, and it wouldn't close as soon as it's work has been done, such as create channel, getConfig. etc. And if I call some function or use a new cleint to addPeer so many times, It will hold so many connections , is it normal?

kapilAtrey (Wed, 03 Jan 2018 04:36:33 GMT):
@vikimeng you need to modify the channel object in helper.js and modify the setup peer function to join both org's peers to the channel i did the same and now i am able to do it successfully i mean invoke it

kapilAtrey (Wed, 03 Jan 2018 04:39:14 GMT):
@bretharrison if i want that no one can instantiate new chaincode without the signature of org1's peers,org2's peers and admin how to achieve this ? and one more question in the documentation of fabric sdk node they used default endorsement policy , i was just curious where it is defined

Lucifer (Wed, 03 Jan 2018 05:27:07 GMT):
@bretharrison chaincode is in golang, and problem is solved

vikimeng (Wed, 03 Jan 2018 07:31:14 GMT):
@kapilAtrey not sure what need change channel object and setup peer function in helper.js. I have org1 and org2 both have 2 peers, use curl to make the 4 peers join same channel and install same chaincode. Instantiate with policy `2-of` on org1 peers. When invoke, get `ENDORSEMENT_POLICY_FAILURE`

kapilAtrey (Wed, 03 Jan 2018 07:45:34 GMT):
@vikimeng look the function setup peers is doing what it is joining the peers of org1 and org2 as per the network-config.json so the peers in this object recieves the request proposal to sign and all and when you are using the setup peers function it only add peers of that organization only so it'll fail always as the peers of org2 are not receiving any transaction to be signed so we need to add them to our channel object and that is why you need to add org 2's peer to the channel object of org1 .......... in one line i am asking you to join org2's peer to org1's channel object and vice versa and then you can invoke

alexliu (Wed, 03 Jan 2018 09:10:08 GMT):
Hi could someone tell me the difference between chaincode installation and chaincode instantiation?

vikimeng (Wed, 03 Jan 2018 09:11:27 GMT):
@kapilAtrey Thank you very much. It works now. This is really very interesting. From the code, create channel and make all peers in different orgs and join this channel not mean all peers in same channel.

kapilAtrey (Wed, 03 Jan 2018 09:12:37 GMT):
;-)

kapilAtrey (Wed, 03 Jan 2018 09:12:37 GMT):
:-)

allonblocks21 (Thu, 04 Jan 2018 11:08:07 GMT):
Has joined the channel.

tennenjl (Thu, 04 Jan 2018 22:12:48 GMT):
Has joined the channel.

gauravgiri (Fri, 05 Jan 2018 06:16:40 GMT):
Hi, anyone aware of fabric-sdk-node API changes from version 1.0.0-alpha to 1.0.2. This is with regards to API's of enrollment, invoke and query

nagarajants (Fri, 05 Jan 2018 14:24:08 GMT):
Has joined the channel.

nagarajants (Fri, 05 Jan 2018 14:26:23 GMT):
we are migrating an poc built by IBM from 1.0.0-alpha to 1.0.2 on ibm cloud. is there a migration guide we can use

mastersingh24 (Fri, 05 Jan 2018 14:35:38 GMT):
@nagarajants - nope. that's the risk of using an alpha :disappointed_relieved:

nagarajants (Fri, 05 Jan 2018 14:37:26 GMT):
@mastersingh24 we are bound by what IBM cloud offers, 9 month back it was just alpha that was available :-(

nagarajants (Fri, 05 Jan 2018 14:37:40 GMT):
thank you for the prompt response

mastersingh24 (Fri, 05 Jan 2018 14:43:52 GMT):
I know (I work for IBM and work on the cloud ;) )

einarpersson (Fri, 05 Jan 2018 15:13:20 GMT):
http://hyperledger-fabric.readthedocs.io/en/v1.1.0-preview/write_first_app.html I've followed this tutorial but when running `node enrollAdmin.js`i get the following error

einarpersson (Fri, 05 Jan 2018 15:13:58 GMT):

Clipboard - January 5, 2018 4:13 PM

einarpersson (Fri, 05 Jan 2018 15:14:51 GMT):
any ideas? using node 6.9.5 and py2

stevehooperjr (Fri, 05 Jan 2018 21:08:27 GMT):
Has joined the channel.

stevehooperjr (Fri, 05 Jan 2018 21:12:56 GMT):
I've set up a network using the node SDK with an orderer, 2 orgs, 2 CAs, etc. I'm attempting to invoke a transaction and getting hit with this: 'error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN' I've had to pretty much configure the network from scratch by trial and error, so it's hard to say why the orderer is rejecting my proposal. Can anyone help me troubleshoot this?

stevehooperjr (Fri, 05 Jan 2018 21:12:56 GMT):
I've set up a network using the node SDK with an orderer, 2 orgs, 2 CAs, etc. I'm attempting to invoke a transaction and getting hit with this: `error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN` I've had to pretty much configure the network from scratch by trial and error, so it's hard to say why the orderer is rejecting my proposal. Can anyone help me troubleshoot this?

stevehooperjr (Fri, 05 Jan 2018 21:12:56 GMT):
I've set up a network using the node SDK with an orderer, 2 orgs, 2 CAs, etc. I'm attempting to invoke a transaction and getting hit with this: `error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN` I've had to pretty much configure the network from scratch by trial and error, so it's hard to say why the orderer is rejecting my proposal. Can anyone help me troubleshoot this? I'm using a slightly modified version of the `invoke-transaction.js` in the fabric-client module's tests.

vdods (Sat, 06 Jan 2018 09:20:32 GMT):
Has left the channel.

sukesannn (Sun, 07 Jan 2018 01:27:23 GMT):
Has joined the channel.

javrevasandeep (Sun, 07 Jan 2018 07:39:51 GMT):
Has joined the channel.

javrevasandeep (Sun, 07 Jan 2018 07:40:47 GMT):
how to add new peer through node sdk in the existing fabric network

javrevasandeep (Sun, 07 Jan 2018 10:08:35 GMT):
@mastersingh24 Could you please let me know whether fabric node sdk has capability to add new peers dynamically to existing organization and already up and running blockchain network

javrevasandeep (Sun, 07 Jan 2018 10:10:09 GMT):
@mastersingh24 or are there any steps to add peers dynamically to existing organization in running blockchain network by some other means if not through sdk

javrevasandeep (Sun, 07 Jan 2018 10:12:09 GMT):
@mastersingh24 Is there any framework available where we can test performance of blockchain network by switching in our customized chaincode

yacovm (Sun, 07 Jan 2018 10:17:31 GMT):
I don't think you necessarily have to tag a person at the start of each line, @javrevasandeep

javrevasandeep (Sun, 07 Jan 2018 10:18:31 GMT):
sorry for that. I am new to this forum. can you pls help me.

yacovm (Sun, 07 Jan 2018 10:18:54 GMT):
you can add peers dynamically yes

mastersingh24 (Sun, 07 Jan 2018 10:22:10 GMT):
@javrevasandeep - Adding a peer to an existing organization is quite simple: 1) You need to get the enrollment material from the CA for that organization 2) You then need to install any chaincode you want that peer to run 3) You then need to join that peer to any existing (or new channels) Steps 2) and 3) are easily done with the Node SDK (same as it the peer was part of the original network) For step 1), you can use the fabric-ca-client package in the SDK to register and then enroll an identity for the peer (although it's probably easier to just use the actual fabric-ca-client binary to do so)

mastersingh24 (Sun, 07 Jan 2018 10:22:10 GMT):
@javrevasandeep - Adding a peer to an existing organization is quite simple: 1) You need to get the enrollment material from the CA for that organization 2) You then need to install any chaincode you want that peer to run 3) You then need to join that peer to any existing (or new channels) Steps 2) and 3) are easily done with the Node SDK (same as if the peer was part of the original network) For step 1), you can use the fabric-ca-client package in the SDK to register and then enroll an identity for the peer (although it's probably easier to just use the actual fabric-ca-client binary to do so)

javrevasandeep (Sun, 07 Jan 2018 10:31:30 GMT):
For Step 1 - could you please let me know the APIs to do so

javrevasandeep (Sun, 07 Jan 2018 10:35:22 GMT):
I explored hyperledger fabric node sdk and could found fabric-ca-client can do below functionalities. Is ithe same way as registering and enrolling a new user. if yes, then what are the attributes we need to change in order to register and enroll peer instead of user. . register a new user . enroll a user to obtain the enrollment certificate signed by the Fabric CA . revoke an existing user by enrollment ID or revoke a specific certificate . customizable persistence store

javrevasandeep (Sun, 07 Jan 2018 10:37:16 GMT):
@mastersingh24 @yacovm - could you please point me to some working example if any related to this

sasiedu (Sun, 07 Jan 2018 11:55:44 GMT):
Hi all, i keep getting this error ```error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n``` when trying to create a channel. But my orderer is on the same url i'm passing to create a newOrderer from client.

mastersingh24 (Sun, 07 Jan 2018 12:41:00 GMT):
@javrevasandeep - For Step 1 - I'd actually advise starting off with the fabric-ca-client binary to register / enroll the new peer identity. It will be easier for you to deal with the required MSP file structure. Take a look at http://hyperledger-fabric-ca.readthedocs.io/en/stable/users-guide.html#registering-a-new-identity (the last part describes registering a peer identity and then the following section shows how to enroll the identity and use it)

mastersingh24 (Sun, 07 Jan 2018 12:41:20 GMT):
@sasiedu - Do you see anything in the orderer logs?

mastersingh24 (Sun, 07 Jan 2018 12:41:20 GMT):
@sasiedu - Do you see anything in the orderer logs? You can also set the following environment variables prior to running your NodeJS app for addtional debugging: `GRPC_VERBOSITY=debug` `GRPC_TRACE=`api,call_error,client_channel`

javrevasandeep (Sun, 07 Jan 2018 12:45:56 GMT):
@mastersingh24 thanks for quick help. actually i am using docker for ca and other components. so do i need to go inside docker container and try to register and enroll peer and which path do i need to give for -M flag while doing fabric-ca-client enroll -u <> -M

mastersingh24 (Sun, 07 Jan 2018 12:47:52 GMT):
You should be able to use any directory that you can mount as a volume on the container you are using for your new peer

javrevasandeep (Mon, 08 Jan 2018 14:09:13 GMT):
Hi guys, I am using fabric samples balance transfer example and trying to add new peer dynamically to org1 in existing and running network but I am facing error Cannot run peer because error when setting up MSP from directory /etc/hyperledger/fabric/msp: err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority while trying to set up new peer with name peer2.org1.example.com. Below given are the steps that i followed.

javrevasandeep (Mon, 08 Jan 2018 14:10:03 GMT):
1) In CA container (ca_peerOrg1) export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin fabric-ca-client enroll -u http://admin:adminpw@localhost:7054 fabric-ca-client register --id.name peer2.org1.example.com --id.type peer --id.affiliation org1.department1 --id.secret peer2.org1.example.compw export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/peer2.org1.example.com fabric-ca-client enroll -u http://peer2.org1.example.com:peer2.org1.example.compw@localhost:7054 -M $FABRIC_CA_CLIENT_HOME/msp And I am gtting the error: Post failure [Post http://localhost:7054/enroll : malformed HTTP response "\x15\x03\x01\x00\x02\x02\x16"] ; not sending 2) I have replace hostname to container id (e2598895c822) while executing the command , Still getting the same error 3) error in ca_peerOrg1 container log: error : ca_peerOrg1 | 2017/05/03 11:43:02 http: TLS handshake error from [::1]:55913: tls: oversized record received with length 21536

javrevasandeep (Mon, 08 Jan 2018 14:10:13 GMT):
4) I observed docker composed yaml file is staring the ca_peerOrg1 container with command tag (sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/org2.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/464d550fe9bf9e7d8976cdf59d1a5d472598f54c058c3546317c5c5fb0ddfd6e_sk -b admin:adminpw' -d) I add one more CA server details in docker compose file with command tag (sh -c 'fabric-ca-server start -b admin:adminpw) as: fabric-ca-server: image: hyperledger/fabric-ca:latest container_name: fabric-ca-server ports: - "9054:7054" environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server volumes: - "./fabric-ca-server:/etc/hyperledger/fabric-ca-server" command: sh -c 'fabric-ca-server start -b admin:adminpw' 5) Then I have login to the fabric-ca-server container and excuted below commands fabric-ca-client enroll -u http://admin:adminpw@localhost:7054 fabric-ca-client register --id.name peer2.org1.example.com --id.type peer --id.affiliation org1.department1 --id.secret peer2pw export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/peer2.org1.example.com fabric-ca-client enroll -u http://peer2.org1.example.com:peer2pw@localhost:7054 -M $FABRIC_CA_CLIENT_HOME/msp And this time it was successful. And MSP folder got created (with cacert,keystore,signcerts) in container.

javrevasandeep (Mon, 08 Jan 2018 14:10:24 GMT):
6) Since I was trying add Peer in org1 , so I login to again container ca_peerOrg1 and got the cerificate from fabric-ca-server using below commands export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/peer2.org1.example.com fabric-ca-client getcacert -u http://fabric-ca-server:7054 -M $FABRIC_CA_CLIENT_HOME/msp And observed that msp folder got imported to ca_peerOrg1. 7) created one folder peer2.org1.example.com in /home/bteam/go/src/github.com/hyperledger/FabricNodeApp1.0/artifacts/crypto-config/peerOrganizations/org1.example.com/peers and copied the newly created cacert,keystore,signcerts folders with certificates. And renamed /home/bteam/go/src/github.com/hyperledger/FabricNodeApp1.0/artifacts/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/msp/cacerts/localhost-7054.pem to /home/bteam/go/src/github.com/hyperledger/FabricNodeApp1.0/artifacts/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem msp/admincerts and tls folder i have copied from peer0 folder 8) updated the /hyperledger/fabric-sdk-node/test/integration/e2e/config.json with peer2 entry in org1

javrevasandeep (Mon, 08 Jan 2018 14:10:32 GMT):
{ "network-config": { "orderer": [{ "url": "grpcs://localhost:7050", "server-hostname": "orderer0.example.com", "tls_cacerts": "../artifacts/crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/ca.crt" },{ "url": "grpcs://localhost:8050", "server-hostname": "orderer1.example.com", "tls_cacerts": "../artifacts/crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/tls/ca.crt" },{ "url": "grpcs://localhost:9050", "server-hostname": "orderer2.example.com", "tls_cacerts": "../artifacts/crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/ca.crt" }], "org1": { "name": "peerOrg1", "mspid": "Org1MSP", "ca": "https://localhost:7054", "peer1": { "requests": "grpcs://localhost:7051", "events": "grpcs://localhost:7053", "server-hostname": "peer0.org1.example.com", "tls_cacerts": "../artifacts/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, "peer2": { "requests": "grpcs://localhost:8051", "events": "grpcs://localhost:8053", "server-hostname": "peer1.org1.example.com", "tls_cacerts": "../artifacts/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, "peer3": { "requests": "grpcs://localhost:11051", "events": "grpcs://localhost:11053", "server-hostname": "peer2.org1.example.com", "tls_cacerts": "../artifacts/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/tls/ca.crt" }, "admin": { "key": "../artifacts/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore", "cert": "../artifacts/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts" } }, "org2": { "name": "peerOrg2", "mspid": "Org2MSP", "ca": "https://localhost:8054", "peer1": { "requests": "grpcs://localhost:9051", "events": "grpcs://localhost:9053", "server-hostname": "peer0.org2.example.com", "tls_cacerts": "../artifacts/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, "peer2": { "requests": "grpcs://localhost:10051", "events": "grpcs://localhost:10053", "server-hostname": "peer1.org2.example.com", "tls_cacerts": "../artifacts/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, "admin": { "key": "../artifacts/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore", "cert": "../artifacts/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts" } } } }

javrevasandeep (Mon, 08 Jan 2018 14:10:41 GMT):
10)Created one more docker file “docker-compose_peer2.org1.example.com.yaml” , which contains only details of peer2.org1.example.com and started docker compose and now these containers are up (ca_peerOrg2, ca_peerOrg1, orderer0.example.com, orderer1.example.com, orderer2.example.com , couchdb1, couchdb2, peer1.org2.example.com,peer0.org2.example.com, peer0.org1.example.com, peer1.org1.example.com, zookeeper0, zookeeper1, zookeeper2 kafka0, kafka1, kafka2, kafka3 fabric-ca-server) But peer2.org1.example.com container is showing in restarting state with error "Cannot run peer because error when setting up MSP from directory /etc/hyperledger/fabric/msp: err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority"

Vadim (Mon, 08 Jan 2018 14:12:49 GMT):
@javrevasandeep your ca is probably expecting tls

javrevasandeep (Mon, 08 Jan 2018 14:13:50 GMT):
so can you pls suggest me right way of doing with tls. what changes exactly do i need to do in above commands

Vadim (Mon, 08 Jan 2018 14:14:02 GMT):
the second ca that you run uses self-generated root certs and the identity it creates are not trusted by the network

Vadim (Mon, 08 Jan 2018 14:14:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=77c9f33hFTh8mTTZr) use "https" instead of "http"

Vadim (Mon, 08 Jan 2018 14:16:06 GMT):
also, for the fabric-ca-client you probably need this too: https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#enabling-tls

javrevasandeep (Mon, 08 Jan 2018 14:29:40 GMT):
@vadim i again started fabric-ca-server container and login to container and then edit fabric-ca-client-config.yaml file with tls

javrevasandeep (Mon, 08 Jan 2018 14:29:42 GMT):
tls: # Enable TLS (default: false) enabled: true certfiles: - root.pem client: certfile: tls_client-cert.pem keyfile: tls_client-key.pem

javrevasandeep (Mon, 08 Jan 2018 14:30:48 GMT):
in certfiles: i have given ca-cert.pem which is given at /etc/hyperledger/fabric-ca-server folder

javrevasandeep (Mon, 08 Jan 2018 14:31:23 GMT):
what should i keep in certfile: and keyfile: fields..

jrosmith (Mon, 08 Jan 2018 18:16:45 GMT):
hey guys, trying to figure out an eventhub issue. as part of my transaction workflow, i create an eventhub instance, register a txn event, connect, and when the invoke has been committed i unregister the txn event and call disconnect. according to the debug logs disconnect is successfully called and the stream is removed, but the according to netstat on the peer there is still an active connection to the event port. any ideas on what could be going on here?

jrosmith (Mon, 08 Jan 2018 18:16:45 GMT):
hey guys, trying to figure out an eventhub issue. as part of my transaction workflow, i create an eventhub instance, register a txn event, connect, and when the invoke has been committed i unregister the txn event and call disconnect. according to the debug logs disconnect is successfully called and the stream is removed, but the according to netstat on the peer there is still an established connection to the event port. any ideas on what could be going on here?

antoniovassell (Mon, 08 Jan 2018 18:39:19 GMT):
Hey, fabric-sdk-node tests are failing with HSM on the master branch, and also on a changeset that was to help with it: https://gerrit.hyperledger.org/r/#/c/16401/, should a ticket be created to track this issue?

antoniovassell (Mon, 08 Jan 2018 20:36:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6FhGp54MTZqMc7gqC) https://jira.hyperledger.org/browse/FAB-7654

javrevasandeep (Tue, 09 Jan 2018 04:54:48 GMT):
Hi guys. I am not able to enroll/register peer through fabric-ca with tls option enabled. Any pointer to some code doing this via node sdk or fabric-ca binary. I am using balance transfer example and wanted to add new peer dynamically to the existing org1

Vadim (Tue, 09 Jan 2018 06:22:21 GMT):
@javrevasandeep you don't need to specify anything for the client

Vadim (Tue, 09 Jan 2018 06:22:21 GMT):
@javrevasandeep you don't need to specify anything for the client certs

CodeReaper (Tue, 09 Jan 2018 07:58:21 GMT):
Is the node SDK suppose to do sendTransaction for committing tranasactions to all orderers in the network or any one of the orderer?

SanketPanchamia (Tue, 09 Jan 2018 10:37:40 GMT):
I have two questions for fabric sdk node 1) What is the use of the eventhub and how does it work? I am observing my transactions getting committed to the ledger but it fails from the eventhub with a timeout exception. And its not consistent. Maybe 3/10 will have this issue. Transaction is persisted and i can retrieve by querying it. 2) After an idle time, any call to invoke a transaction may fail the first couple of time and will start working normally later on. Any idea why?

SanketPanchamia (Tue, 09 Jan 2018 10:37:40 GMT):
I have two questions for fabric sdk node 1) What is the use of the eventhub and how does it work? I am observing my transactions getting committed to the ledger but it fails from the eventhub with a timeout exception. And its not consistent. Maybe 3/10 will have this issue. Transaction is persisted and i can retrieve by querying it. 2) After an idle time, any call to invoke a transaction may fail the first couple of time and will start working normally later on. Any idea why? PS: I am using docker swarm network for truly distributing my code on AWS.

javrevasandeep (Tue, 09 Jan 2018 12:05:49 GMT):
can someone pls help me with the error sendToEndpoint -> WARN Failed obtaining connection for peer3.org1.example.com:7051, PKIid:[147 183 148 145 207 91 110 56 176 50 130 248 85 201 254 71 243 222 64 195 34 145 56 207 114 3 38 39 135 60 67 44] reason: x509: certificate signed by unknown authority

javrevasandeep (Tue, 09 Jan 2018 12:06:12 GMT):
I am trying to add new peer dynamically in balance transfer example

javrevasandeep (Tue, 09 Jan 2018 12:07:06 GMT):
First I logged into container ca_peerOrg1 and then run below commands

javrevasandeep (Tue, 09 Jan 2018 12:07:22 GMT):
export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin fabric-ca-client enroll -d -u https://admin:adminpw@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME --csr.hosts ca.org1.example.com --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin fabric-ca-client register -d -u https://admin:adminpw@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME --id.name peer3 --id.type peer --id.affiliation org1.department1 --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem password - yIjaZmkoyiQO export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/peer3 fabric-ca-client enroll -u https://peer3:yIjaZmkoyiQO@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME/msp --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem fabric-ca-client enroll -d --enrollment.profile tls -u https://peer3:yIjaZmkoyiQO@ca.org1.example.com:7054 -M /tmp/tls --csr.hosts peer3.org1.example.com --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem

javrevasandeep (Tue, 09 Jan 2018 12:08:24 GMT):
I copied certificates to ../crypto-config..../../../peer3.org1.example.com

javrevasandeep (Tue, 09 Jan 2018 12:10:20 GMT):
and forced start peer3 container through docker compose

javrevasandeep (Tue, 09 Jan 2018 12:10:43 GMT):
with orderers as dependency

gentios (Tue, 09 Jan 2018 12:17:49 GMT):
Does the fabric-node-sdk works with Node.js: V.8.9.4 ?

nkl199 (Tue, 09 Jan 2018 13:18:15 GMT):
Has joined the channel.

javrevasandeep (Tue, 09 Jan 2018 13:28:11 GMT):
can someone help me with adding new peer dynamically to balance transfer network. I have tried a lot and couldn't able to get it working. Though able to start new peer container but getting error sendToEndpoint -> WARN Failed obtaining connection for peer3.org1.example.com:7051, PKIid:[147 183 148 145 207 91 110 56 176 50 130 248 85 201 254 71 243 222 64 195 34 145 56 207 114 3 38 39 135 60 67 44] reason: x509: certificate signed by unknown authority

javrevasandeep (Tue, 09 Jan 2018 13:29:41 GMT):
I am following the below steps

javrevasandeep (Tue, 09 Jan 2018 13:30:00 GMT):
First I logged into container ca_peerOrg1 and then run below commands export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin fabric-ca-client enroll -d -u https://admin:adminpw@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME --csr.hosts ca.org1.example.com --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin fabric-ca-client register -d -u https://admin:adminpw@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME --id.name peer3 --id.type peer --id.affiliation org1.department1 --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem password - yIjaZmkoyiQO export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/peer3 fabric-ca-client enroll -u https://peer3:yIjaZmkoyiQO@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME/msp --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem fabric-ca-client enroll -d --enrollment.profile tls -u https://peer3:yIjaZmkoyiQO@ca.org1.example.com:7054 -M /tmp/tls --csr.hosts peer3.org1.example.com --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem I copied certificates to ../crypto-config..../../../peer3.org1.example.com and started peer3 container through docker compose with orderer as dependency

ThomasYuan (Tue, 09 Jan 2018 15:12:35 GMT):
Has joined the channel.

tennenjl (Tue, 09 Jan 2018 16:07:26 GMT):
Hi Team, dummy question. Is the call to compareProposalResponseResults the client's responsibility. I assume so, but just want to verify. Thanks!

jrosmith (Tue, 09 Jan 2018 16:41:10 GMT):
hey all, trying to get the balance transfer example working. i follow setup option 1 from https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer. i have my docker containers and the sample server running and am trying to issue the following curl command: ```curl -s -X POST http://loc -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1'``` but am receiving the following error on the webapp ```[2018-01-09 11:25:11.659] [ERROR] Helper - Failed to get registered user: Jim with error: Error: fabric-ca request register failed with errors [[{"code":0,"message":"No identity type provided. Please provide identity type"}]]``` and the following from docker ```ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Successful authentication of 'admin' ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Register request received ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Received registration request from admin: &{RegistrationRequest:{Name:Jim Type: Secret:<> MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:ca-org1}} ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] canRegister - Check to see if user admin can register ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] DB: Getting identity admin ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Registration of 'Jim' failed: No identity type provided. Please provide identity type ca_peerOrg1 | 2018/01/09 16:25:12 [INFO] 172.19.0.1:56968 - "POST /api/v1/register" 0 ``` not sure where i'm supposed to be providing the identity type?

jrosmith (Tue, 09 Jan 2018 16:41:10 GMT):
hey all, trying to get the balance transfer example working. i follow setup option 1 from https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer. i have my docker containers and the sample server running and am trying to issue the following curl command: ```curl -s -X POST http://loc -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' ``` but am receiving the following error on the webapp ```[2018-01-09 11:25:11.659] [ERROR] Helper - Failed to get registered user: Jim with error: Error: fabric-ca request register failed with errors [[{"code":0,"message":"No identity type provided. Please provide identity type"}]]``` and the following from docker ```ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Successful authentication of 'admin' ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Register request received ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Received registration request from admin: &{RegistrationRequest:{Name:Jim Type: Secret:<> MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:ca-org1}} ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] canRegister - Check to see if user admin can register ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] DB: Getting identity admin ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Registration of 'Jim' failed: No identity type provided. Please provide identity type ca_peerOrg1 | 2018/01/09 16:25:12 [INFO] 172.19.0.1:56968 - "POST /api/v1/register" 0 ``` not sure where i'm supposed to be providing the identity type?

jrosmith (Tue, 09 Jan 2018 16:41:10 GMT):
hey all, trying to get the balance transfer example working. i follow setup option 1 from https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer. i have my docker containers and the sample server running and am trying to issue the following curl command: ```curl -s -X POST http://loc -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' ``` but am receiving the following error on the webapp ```[2018-01-09 11:25:11.659] [ERROR] Helper - Failed to get registered user: Jim with error: Error: fabric-ca request register failed with errors [[{"code":0,"message":"No identity type provided. Please provide identity type"}]] ``` and the following from docker ```ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Successful authentication of 'admin' ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Register request received ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Received registration request from admin: &{RegistrationRequest:{Name:Jim Type: Secret:<> MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:ca-org1}} ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] canRegister - Check to see if user admin can register ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] DB: Getting identity admin ca_peerOrg1 | 2018/01/09 16:25:12 [DEBUG] Registration of 'Jim' failed: No identity type provided. Please provide identity type ca_peerOrg1 | 2018/01/09 16:25:12 [INFO] 172.19.0.1:56968 - "POST /api/v1/register" 0 ``` not sure where i'm supposed to be providing the identity type?

philviana (Tue, 09 Jan 2018 16:45:18 GMT):
Has joined the channel.

philviana (Tue, 09 Jan 2018 16:46:36 GMT):
Hi. I'm trying to understand the implementation of the `fabcar` example, particularly the wallet. In `invoke.js` there's a line `wallet_path: path.join(__dirname, './creds')`. The directory contains a private key, public key and JSON file with signing metadata. It's not clear how the JSON file was generated or where the keys came from exactly. Can someone please advise?

philviana (Tue, 09 Jan 2018 16:47:59 GMT):
By looking at the code, it invokes the `sdkUtils.newKeyValueStore()` method, but it's not clear what it does in the background either.

philviana (Tue, 09 Jan 2018 16:52:25 GMT):
FYI: I understand that this is the SDK-node channel - the implementation of the wallet variable points to SDK-node code.

jrosmith (Tue, 09 Jan 2018 18:43:59 GMT):
solved. in balance-transfer/app/helper.js i had to add a key/value pair of `role: 'client'` to the register request on line 89 [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9xwELuqfvspsctwuT)

cchalc (Tue, 09 Jan 2018 20:45:35 GMT):
Has joined the channel.

dgale (Tue, 09 Jan 2018 23:54:40 GMT):
Has joined the channel.

pb (Wed, 10 Jan 2018 06:58:04 GMT):
Has joined the channel.

javrevasandeep (Wed, 10 Jan 2018 07:27:00 GMT):
As a user, I think there should some easy way to add new peer dynamically to the existing network via some sdk to support horizontal scaling. Found some interesting blog on this. I think this definitely requires to be implemented via some sdk support in a more user friendly manner.

javrevasandeep (Wed, 10 Jan 2018 07:27:04 GMT):
I). Scaling the capability of a single peer: In an existing distributed network, any peer might end up reaching the upper limit of its capability, in our concerns, it’s mostly the storage capability of that peer to hold blocks of the blockchain. After reaching the storage limit it will be impossible for that peer to hold more blocks without being scaled up to acquire more storage capacity, and that right there where we require scaling up the peer vertically. II). Scaling the existing network by adding more organizations with its peer(s): On the other hand, at any later point of time there can be a scenario where we will be in need to add more peers to the existing support network and to do that the option we have in hand is to add organization which has its own peer(s) to the network. But why we need to add an entire organization with its peer(s) just to add a new peer? An organization in the hyperledger network is basically a Membership Service Provider (MSP) which provides an abstraction of the membership operation architecture. In this way, an MSP abstracts away all cryptographic mechanism and protocols for issuing and validating the certificate, and user authentication. Peers in the permissioned network needs a secure permissioned way of communication with each other, for adding permissioned access and hiding all cryptographic details of permissions access theses peers are stored in an organization. MSP governs the entire network and handles the identity management in the network, so for any peer to be recognized network-wide it has to come through its own MSP or Organization. This way adding more organization with peers falls under scaling the hyperledger network horizontally. Fabric versions supporting scaling Hyperledger Fabric natively supports both types of scaling of the network. The latest stable version of fabric is v 1.0.4 whereas earlier the first stable version was v0.6 and both of these versions supports scaling, but its the tools required and user friendly access of these tools that make all the difference. In the Fabric version 1.0.4, the use of these tools to read the network configurations of MSP and then modifying these configurations to add a new organization to the already live network is very time taking even for the experienced professionals. To be enabled to update the network configurations for adding more peers to the network in these versions one has to collect the configurational signatures manually which is also hard to automate.

javrevasandeep (Wed, 10 Jan 2018 07:29:45 GMT):
link to the above blog http://www.oodlestechnologies.com/blogs/Scaling-Up-The-Hyperledger-Fabric

MoulaliMvg (Wed, 10 Jan 2018 09:01:28 GMT):
can we update the ledger with same key

javrevasandeep (Wed, 10 Jan 2018 09:28:49 GMT):
can someone help me with adding new peer dynamically to balance transfer network. I have tried a lot and couldn't able to get it working. Though able to start new peer container but getting error sendToEndpoint -> WARN Failed obtaining connection for peer3.org1.example.com:7051, PKIid:[147 183 148 145 207 91 110 56 176 50 130 248 85 201 254 71 243 222 64 195 34 145 56 207 114 3 38 39 135 60 67 44] reason: x509: certificate signed by unknown authority I am following the below steps First I logged into container ca_peerOrg1 and then run below commands export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin fabric-ca-client enroll -d -u https://admin:adminpw@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME --csr.hosts ca.org1.example.com --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin fabric-ca-client register -d -u https://admin:adminpw@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME --id.name peer3 --id.type peer --id.affiliation org1.department1 --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem password - yIjaZmkoyiQO export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/peer3 fabric-ca-client enroll -u https://peer3:yIjaZmkoyiQO@ca.org1.example.com:7054 -M $FABRIC_CA_CLIENT_HOME/msp --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem fabric-ca-client enroll -d --enrollment.profile tls -u https://peer3:yIjaZmkoyiQO@ca.org1.example.com:7054 -M /tmp/tls --csr.hosts peer3.org1.example.com --tls.certfiles /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem I copied certificates to ../crypto-config..../../../peer3.org1.example.com and started peer3 container through docker compose with orderer as dependency

DRSK (Wed, 10 Jan 2018 09:56:25 GMT):
Has joined the channel.

bretharrison (Wed, 10 Jan 2018 16:22:07 GMT):
@tennenjl Yes the client application might want to do that, the NodeSDK does not evaluate the endorsed proposals on the `sendTranaction` call before sending them to the orderer

bretharrison (Wed, 10 Jan 2018 16:25:56 GMT):
@gentios Have you had problem with 8.9.4, it should work with all 8.9.x releases

sudheesh001 (Thu, 11 Jan 2018 05:57:01 GMT):
Has joined the channel.

sudheesh001 (Thu, 11 Jan 2018 05:59:26 GMT):
@here I seem to be having an issue while trying to make nodejs invoke a smart contract. https://chat.hyperledger.org/channel/fabric?msg=h7hiw7JwWNhC7nWH8 This is what my code looks like, I receive an error sometimes that Eventhub is shutdown while infact it is working

sudheesh001 (Thu, 11 Jan 2018 06:15:18 GMT):
This happens after I receive a ProposalResponse with `Status -> 200` and `message -> OK`

sudheesh001 (Thu, 11 Jan 2018 06:15:52 GMT):
It looks like the `Eventhub` connects before throwing this error ``` info: [EventHub.js]: _connect - options {} ```

tuxy (Thu, 11 Jan 2018 07:32:46 GMT):
Has joined the channel.

sudheesh001 (Thu, 11 Jan 2018 08:24:27 GMT):
@here Where does the node sdk log the EventHub.js logs? How can I read the logging?

Vadim (Thu, 11 Jan 2018 08:24:42 GMT):
@sudheesh001 stop using here pls

sudheesh001 (Thu, 11 Jan 2018 08:25:11 GMT):
Sure, it's just that the queries seem to be ignored all the time and the bug reports filed not addressed

Vadim (Thu, 11 Jan 2018 08:25:36 GMT):
and you think annoying people is the best way to solve it?

sudheesh001 (Thu, 11 Jan 2018 08:25:36 GMT):
please advise on how to proceed if this is the case

sudheesh001 (Thu, 11 Jan 2018 08:25:58 GMT):
well, i've been helping on other channels too if that's what the others in the community find annoying

Vadim (Thu, 11 Jan 2018 08:26:07 GMT):
e.g. if you search this channel on node logging, you find that export HFC_LOGGING='{"debug":"console"}' turns on extended logging

sudheesh001 (Thu, 11 Jan 2018 08:26:52 GMT):
Thanks a lot!

rajasekharpippalla (Thu, 11 Jan 2018 08:28:45 GMT):
is there any option to disable SSL to invoke grpc calls in balance-transfer example?

sudheesh001 (Thu, 11 Jan 2018 09:43:19 GMT):
I've been noticing very strange results while invoking chaincode for endorsement and committing a transaction. I've debugged the required functions in `EventHub.js` and `BlockDecoder.js` Run 1: `proto_kv_rw_set` doesn't have a function `getNamespace()`, I realized during debug that `proto_ns_rwset` doesn't have any information and ideally isn't supposed to enter the `for` loop in the function `decodeReadWriteSets(rw_sets_bytes)` but however it does, the debug trace is as follows: ``` break in ~app\node_modules\fabric-client\lib\BlockDecoder.js:1178 1176 if (proto_tx_read_write_set.getDataModel() === _rwsetProto.TxReadWriteSet.DataModel.KV) { 1177 tx_read_write_set.ns_rwset = []; >1178 let proto_ns_rwset = proto_tx_read_write_set.getNsRwset(); 1179 for (let i in proto_ns_rwset) { 1180 let kv_rw_set = {}; debug> n break in ~app\node_modules\fabric-client\lib\BlockDecoder.js:1179 1177 tx_read_write_set.ns_rwset = []; 1178 let proto_ns_rwset = proto_tx_read_write_set.getNsRwset(); >1179 for (let i in proto_ns_rwset) { 1180 let kv_rw_set = {}; 1181 let proto_kv_rw_set = proto_ns_rwset[i]; debug> repl Press Ctrl + C to leave debug repl > proto_ns_rwset [] debug> s break in ~app\node_modules\fabric-client\lib\BlockDecoder.js:1179 1177 tx_read_write_set.ns_rwset = []; 1178 let proto_ns_rwset = proto_tx_read_write_set.getNsRwset(); >1179 for (let i in proto_ns_rwset) { 1180 let kv_rw_set = {}; 1181 let proto_kv_rw_set = proto_ns_rwset[i]; debug> s break in ~app\node_modules\fabric-client\lib\BlockDecoder.js:1180 1178 let proto_ns_rwset = proto_tx_read_write_set.getNsRwset(); 1179 for (let i in proto_ns_rwset) { >1180 let kv_rw_set = {}; 1181 let proto_kv_rw_set = proto_ns_rwset[i]; 1182 kv_rw_set.namespace = proto_kv_rw_set.getNamespace(); debug> (To exit, press ^C again or type .exit) debug> ``` Run 2: Running the same function to invoke chaincode. This time by `proto_ns_rwset` ``` break in C:\Users\t-sus\Documents\Blockchain\vishrambh-fabric\tuna-app\node_modules\fabric-client\lib\BlockDecoder.js:1180 1178 if (proto_tx_read_write_set.getDataModel() === _rwsetProto.TxReadWriteSet.DataModel.KV) { 1179 tx_read_write_set.ns_rwset = []; >1180 let proto_ns_rwset = proto_tx_read_write_set.getNsRwset(); 1181 for (let i in proto_ns_rwset) { 1182 let kv_rw_set = {}; debug> n break in C:\Users\t-sus\Documents\Blockchain\vishrambh-fabric\tuna-app\node_modules\fabric-client\lib\BlockDecoder.js:1181 1179 tx_read_write_set.ns_rwset = []; 1180 let proto_ns_rwset = proto_tx_read_write_set.getNsRwset(); >1181 for (let i in proto_ns_rwset) { 1182 let kv_rw_set = {}; 1183 let proto_kv_rw_set = proto_ns_rwset[i]; debug> repl Press Ctrl + C to leave debug repl > proto_ns_rwset [] debug> s break in C:\Users\t-sus\Documents\Blockchain\vishrambh-fabric\tuna-app\node_modules\fabric-client\lib\BlockDecoder.js:1193 1191 } 1192 >1193 return tx_read_write_set; 1194 } 1195 debug> ```

milliger (Thu, 11 Jan 2018 14:14:04 GMT):
Has joined the channel.

bretharrison (Thu, 11 Jan 2018 18:14:57 GMT):
@sudheesh001 Have you written a JIRA on your block decode issue. What version of `fabric-client` are you using ?

huy.tranibm (Thu, 11 Jan 2018 23:56:18 GMT):
Has joined the channel.

huy.tranibm (Thu, 11 Jan 2018 23:57:19 GMT):
Howdy everyone, can someone help me with this error ```2018/01/11 23:47:32 [DEBUG] Registration of 'kemp@sc.com-client--' failed: Failed getting affiliation 'sc': sql: no rows in result set``` I have set FABRIC_CA_SERVER_AFFILIATIONS_ORG1=sc in the yaml file before docker-compose up, any ideas?

NiketYende (Fri, 12 Jan 2018 05:42:47 GMT):
Hello, i have a question regarding the channel.queryBlock(block_num) from the fabric-sdk-node which returns a block. The data is returned fine in an unecoded format, however the input section of the "chaincode_proposal_payload.input" still remains encoded. Temporary solution is to use "chaincode_proposal_payload.input.toString('utf8')" to covert input into a more readable string, but this string contains some additional characters which restricts it from being converted to a json object. Is there any other way to parse chaincode_proposal_payload.input into a json? @Vadim @jimthematrix @bretharrison @mastersingh24

NiketYende (Fri, 12 Jan 2018 05:43:11 GMT):
Any leads would be really helpful. :)

CodeReaper (Fri, 12 Jan 2018 07:29:02 GMT):
Hi I tried to override the timeout in channel.sendTransactionProposal method by adding the timeout field in second parameter, i dont think it works because the transactions still went through even when I set the timeout to 5 millisecond or even 1 millisecond. Anyone got any idea?

navdevl (Fri, 12 Jan 2018 08:56:21 GMT):
Has joined the channel.

john.d.sheehan (Fri, 12 Jan 2018 10:21:09 GMT):
Hi, is there an official hyperledger fabric-client and fabric-ca-client for 1.0.x available somewhere on npm?

sudheesh001 (Fri, 12 Jan 2018 11:52:39 GMT):
@bretharrison I haven't written a Jira, I could do that. However, I seemed to figure the problem out. I had an `Array.prototype.mymethod = function() { }` written somewhere in my program which seemed to be the reason why it was somehow picking the `mymethod` and entering the loop. However, since the `[]` is empty the `getNamespace()` throws an error. However, I strongly believe that adding a prototype method to an array should ideally not be breaking this part of the code.

Apurv29 (Fri, 12 Jan 2018 11:56:18 GMT):
Has joined the channel.

sudheesh001 (Fri, 12 Jan 2018 11:57:01 GMT):
An alternative obviously in our case was to use `Object.defineProperty()` and do the same actions, which doesn't show up `mymethod` in `[]`

john.d.sheehan (Fri, 12 Jan 2018 12:20:52 GMT):
How do I invoke the fabric-client logger? Is seems I have to do ``` var utils = require("fabric-client/lib/utils.js"); var loggerMsg = "--> "; var logger = utils.getLogger(loggerMsg); ``` to get access to it ... is this correct?

sudheesh001 (Fri, 12 Jan 2018 12:54:09 GMT):
@john.d.sheehan Do you mean detailed logging from SDK?

sudheesh001 (Fri, 12 Jan 2018 12:54:33 GMT):
`export HFC_LOGGING='{"debug":"console"}' ` turns on the extended logging from the SDK

john.d.sheehan (Fri, 12 Jan 2018 13:01:58 GMT):
@sudheesh001 as in, how do I log something, is it just `console.log()`?

sudheesh001 (Fri, 12 Jan 2018 13:03:01 GMT):
Do you want to log something that's happening inside the SDK or in your application? if it's the latter then a regular `console.log()` or `console.info()` etc.., should do

sudheesh001 (Fri, 12 Jan 2018 13:03:29 GMT):
the SDK uses the `winston` logger https://github.com/winstonjs/winston

sudheesh001 (Fri, 12 Jan 2018 13:03:38 GMT):
so you could use that in your application too if you'd like

john.d.sheehan (Fri, 12 Jan 2018 13:04:09 GMT):
Ah, ok - thanks @sudheesh001 for clearing that up

sudheesh001 (Fri, 12 Jan 2018 13:04:16 GMT):
You're welcome!

CodeReaper (Fri, 12 Jan 2018 15:50:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5J3u7WkAdvbs4WTDM) Can anyone direct on this

bretharrison (Fri, 12 Jan 2018 16:21:53 GMT):
@CodeReaper Which version of NodeSDK, I noticed the same issue, however it should be fixed now

bretharrison (Fri, 12 Jan 2018 16:27:19 GMT):
@sudheesh001 I have opened https://jira.hyperledger.org/browse/FAB-7711 to track the decode issue

bretharrison (Fri, 12 Jan 2018 16:27:19 GMT):
@sudheesh001 I have opened https://jira.hyperledger.org/browse/FAB-7711 to track the block decode issue

bretharrison (Fri, 12 Jan 2018 16:38:44 GMT):
@john.d.sheehan Yes, to install `npm install fabric-client@1.0.2` ... to see all available released versions `npm show fabric-client@* version` .... same for `fabric-ca-client`

bretharrison (Fri, 12 Jan 2018 16:46:35 GMT):
@john.d.sheehan if you want the latest for 1.1, (which is not released yet) then `npm install fabric-client@unstable` ... which right now will be `fabric-client@1.1.0-snapshot.42`

bretharrison (Fri, 12 Jan 2018 17:17:39 GMT):
@NiketYende You may wish to check the file `/lib/protos/peer/transaction.proto` ... and if you need a deeper understanding post to the `fabric-peer-endorser-committer` . Then if you need some service from the NodeSDK to help open a JIRA.

nagarajants (Fri, 12 Jan 2018 19:17:03 GMT):
what are the pros and cons of using fabric-sdk-node vs fabric-sdk-java

smithbk (Fri, 12 Jan 2018 19:48:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6Sp2qkSqh6uwEprxL) @huy.tranibm It just means that "sc" is not a valid affiliation name. See the fabric-ca-server-config.yaml file for a list of affiliations. By default, "org1" and "org1.department1" are two examples of affiliations if they weren't changed

smithbk (Fri, 12 Jan 2018 19:50:12 GMT):
If you want to change affiliations names, then you must edit the yaml file, stop server, delete the fabric-ca-server.db, and restart the server.

smithbk (Fri, 12 Jan 2018 19:51:14 GMT):
At least that is true unless you're using the latest code in the master branch, which will allow you to dynamically manage affiliations with fabric-ca-client

sudheesh001 (Sat, 13 Jan 2018 11:50:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2D8qY3XtGhRp8dPxE) @bretharrison Thank you very much. I just commented on that issue with a way to replay the steps and confirm the bug. Thanks again

sivagurusrinivas (Sat, 13 Jan 2018 12:18:01 GMT):
Has joined the channel.

pkarolis (Sun, 14 Jan 2018 13:06:56 GMT):
Has joined the channel.

CodeReaper (Mon, 15 Jan 2018 06:25:34 GMT):
@bretharrison I'm using 6.9.0. The timeout just doesnt seem to override.

CodeReaper (Mon, 15 Jan 2018 12:21:32 GMT):
Hey, client.getUserContext seems to return the the user object if the private key is stored inside the default keyValueStore of client object which stores private key, public key and the certificate for every user. This requires that the keys are stored as it is and cant be stored in encrypted fashion. Any way out of this??

sasiedu (Mon, 15 Jan 2018 17:10:14 GMT):
anyone know why i'm getting this error ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Unknown chaincodeType: NODE)```

muralisr (Mon, 15 Jan 2018 17:12:45 GMT):
https://chat.hyperledger.org/channel/fabric-peer-endorser-committer?msg=knqzGrZqnyfLr95sf

muralisr (Mon, 15 Jan 2018 17:13:02 GMT):
@bretharrison ^^^ just FYI

bretharrison (Mon, 15 Jan 2018 17:31:55 GMT):
@CodeReaper Which version of the NodeSDK ?

bretharrison (Mon, 15 Jan 2018 17:50:46 GMT):
@CodeReaper The user context actually does not have direct access to the private key, this is done through the cryptosuite object that is assigned to the user context. If you have requirements for special handling of the private key then see https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/api.js#L71 You will notice that the NodeSDK has a couple implementations of the `CryptoSuite`, with the default being `fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js`.

bretharrison (Mon, 15 Jan 2018 17:53:30 GMT):
@sasiedu Check your fabric level, sounds like you have new NodeSDK and old Fabric

bretharrison (Mon, 15 Jan 2018 18:58:20 GMT):
@NiketYende see https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/protos/peer/transaction.proto#L94 describes the `ChaincodeActionPayload.chaincode_proposal_payload`

paul.sitoh (Mon, 15 Jan 2018 19:04:16 GMT):
Anyone know how to set fabric-client cryptoStore to a location other than `~/.hf-key-store`?

paul.sitoh (Mon, 15 Jan 2018 19:05:34 GMT):
Anyone know what is the data type for tlsOptions_p in ```FabricCAClient(constructor(url_p, tlsOptions_p, caName_p, cryptoSuite_p)```

paul.sitoh (Mon, 15 Jan 2018 19:06:03 GMT):
Is it ```{ pem: , 'ssl-target-name-override': }```?

olrraju (Tue, 16 Jan 2018 01:51:41 GMT):
Has joined the channel.

zonked 1 (Tue, 16 Jan 2018 04:52:34 GMT):
zonked@fabcar:~/fabric-samples/fabcar$ node invoke Store path:/home/zonked/fabric-samples/fabcar/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: 0b872fcb9ac35bb4700edb4ccbca4e60fd4a949f470944248063c101a41cb54a error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Invalid Smart Contract function name.) at /home/zonked/fabric-samples/fabcar/node_modules/grpc/src/client.js:554:15 Transaction proposal was bad Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... Failed to invoke successfully :: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...

zonked 1 (Tue, 16 Jan 2018 04:52:34 GMT):
zonked@fabcar:~/fabric-samples/fabcar$ node invoke Store path:/home/zonked/fabric-samples/fabcar/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: 0b872fcb9ac35bb4700edb4ccbca4e60fd4a949f470944248063c101a41cb54a error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Invalid Smart Contract function name.) at /home/zonked/fabric-samples/fabcar/node_modules/grpc/src/client.js:554:15 Transaction proposal was bad Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... Failed to invoke successfully :: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...

zonked 1 (Tue, 16 Jan 2018 04:52:34 GMT):
```zonked@fabcar:~/fabric-samples/fabcar$ node invoke Store path:/home/zonked/fabric-samples/fabcar/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: 0b872fcb9ac35bb4700edb4ccbca4e60fd4a949f470944248063c101a41cb54a error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Invalid Smart Contract function name.) at /home/zonked/fabric-samples/fabcar/node_modules/grpc/src/client.js:554:15 Transaction proposal was bad Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... Failed to invoke successfully :: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...````

zonked 1 (Tue, 16 Jan 2018 04:52:51 GMT):
Im getting this error when running fabcar

sasiedu (Tue, 16 Jan 2018 06:33:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TJ4bpDaMA93PDB2jt) @bretharrison is it the peer image?

CodeReaper (Tue, 16 Jan 2018 07:04:00 GMT):
@bretharrison I'm seeing few methods in CryptoSUite_ECDSA_AES class, They're written as 'To be implemented'. Do you reckon they will provide functionality of storing private keys encrypted with AES keys??

CodeReaper (Tue, 16 Jan 2018 07:04:06 GMT):

Clipboard - January 16, 2018 12:34 PM

sasiedu (Tue, 16 Jan 2018 07:11:54 GMT):
@CodeReaper do you know why i'm getting this error ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: failed to init chaincode: handler not found for chaincode go_cc:v1.0```

CodeReaper (Tue, 16 Jan 2018 07:15:02 GMT):
Check that the init function is as mentioned in your chaincode. SDK picks 'init' as default. And do check the arguments you are sending.

sasiedu (Tue, 16 Jan 2018 07:38:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8jFz2EiTD6Fownn6o) @CodeReaper thanks. I found the reason but it's a bit strange. I started the peer with ```--peer-chaincodedev=true``` and i got that error. Any idea why

sudheesh001 (Tue, 16 Jan 2018 08:07:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Q5p8CpWyMJwKnfmvS) @zonked 1 It looks like the function name in the smart contract and that you're passing in `request` from the node script are different, maybe a typo?

john.d.sheehan (Tue, 16 Jan 2018 10:14:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KzurqJR5K85aAHtDc) @bretharrison Cheers

milliger (Tue, 16 Jan 2018 11:40:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SwpYWhf3chdjZhdFo) @paul.sitoh I think you can do:

milliger (Tue, 16 Jan 2018 11:40:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SwpYWhf3chdjZhdFo) @paul.sitoh I think you can do: ```client.newCryptoKeyStore({path: '...'})```

paul.sitoh (Tue, 16 Jan 2018 11:41:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nwt8kMnjtwta5WweN) @milliger How can it be done?

paul.sitoh (Tue, 16 Jan 2018 11:43:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nwt8kMnjtwta5WweN) @milliger Unfortunately it does not change the default key store. It only relocate folders for private keys

paul.sitoh (Tue, 16 Jan 2018 11:43:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nwt8kMnjtwta5WweN) @milliger Unfortunately it does not change the default key (public keys) store. It only relocate folders for private keys

paul.sitoh (Tue, 16 Jan 2018 11:43:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nwt8kMnjtwta5WweN) @milliger Unfortunately it does not change the default key (public keys `~/.hf-key-store`) store. It only relocate folders for private keys

javrevasandeep (Tue, 16 Jan 2018 11:48:03 GMT):
I am facing issues when trying to customize fabric-samples balance transfer example with kafka configuration

javrevasandeep (Tue, 16 Jan 2018 11:49:57 GMT):
I am doing setup on two machines. Org1 with orderer0 and kafka configuration on one machine and Org2 with orderer1 on second machine.

javrevasandeep (Tue, 16 Jan 2018 11:50:23 GMT):
However its working fine when not using kafka

javrevasandeep (Tue, 16 Jan 2018 11:52:53 GMT):
even with kafka configuration, I can successfully create channel, join Org1 peer and install chaincode on org1 peer on machine 1. However on second machine I am not able to join org2 peers to the existing channel "mychannel" (created on machine 1)

javrevasandeep (Tue, 16 Jan 2018 11:53:41 GMT):
when checked orderer1.example.com logs, I can see below warning messages.

javrevasandeep (Tue, 16 Jan 2018 11:54:20 GMT):
2018-01-16 11:32:27.847 UTC [orderer/consensus/kafka/sarama] func1 -> DEBU 7f0 producer/broker/1 state change to [retrying] on mychannel/0 because kafka server: Request was for a topic or partition that does not exist on this broker. 2018-01-16 11:32:27.847 UTC [orderer/consensus/kafka] try -> DEBU 7f1 [channel: mychannel] Retrying every 5m0s for a total of 12h0m0s 2018-01-16 11:33:12.736 UTC [orderer/common/server] Deliver -> DEBU 7f2 Starting new Deliver handler 2018-01-16 11:33:12.737 UTC [orderer/common/deliver] Handle -> DEBU 7f3 Starting new deliver loop for 172.18.0.1:42098 2018-01-16 11:33:12.737 UTC [orderer/common/deliver] Handle -> DEBU 7f4 Attempting to read seek info message from 172.18.0.1:42098 2018-01-16 11:33:12.737 UTC [orderer/common/deliver] deliverBlocks -> WARN 7f5 [channel: mychannel] Rejecting deliver request for 172.18.0.1:42098 because of consenter error 2018-01-16 11:33:12.738 UTC [orderer/common/deliver] Handle -> DEBU 7f6 Waiting for new SeekInfo from 172.18.0.1:42098 2018-01-16 11:33:12.738 UTC [orderer/common/deliver] Handle -> DEBU 7f7 Attempting to read seek info message from 172.18.0.1:42098 2018-01-16 11:33:12.738 UTC [orderer/common/deliver] Handle -> DEBU 7f8 Received EOF from 172.18.0.1:42098, hangup 2018-01-16 11:33:12.738 UTC [orderer/common/server] func1 -> DEBU 7f9 Closing Deliver stream 2018-01-16 11:34:26.128 UTC [orderer/common/server] Deliver -> DEBU 7fa Starting new Deliver handler 2018-01-16 11:34:26.128 UTC [orderer/common/deliver] Handle -> DEBU 7fb Starting new deliver loop for 172.18.0.1:42198 2018-01-16 11:34:26.128 UTC [orderer/common/deliver] Handle -> DEBU 7fc Attempting to read seek info message from 172.18.0.1:42198 2018-01-16 11:34:26.128 UTC [orderer/common/deliver] deliverBlocks -> WARN 7fd [channel: mychannel] Rejecting deliver request for 172.18.0.1:42198 because of consenter error 2018-01-16 11:34:26.128 UTC [orderer/common/deliver] Handle -> DEBU 7fe Waiting for new SeekInfo from 172.18.0.1:42198 2018-01-16 11:34:26.128 UTC [orderer/common/deliver] Handle -> DEBU 7ff Attempting to read seek info message from 172.18.0.1:42198 2018-01-16 11:34:26.128 UTC [orderer/common/deliver] Handle -> DEBU 800 Received EOF from 172.18.0.1:42198, hangup 2018-01-16 11:34:26.128 UTC [orderer/common/server] func1 -> DEBU 801 Closing Deliver stream 2018-01-16 11:36:31.467 UTC [orderer/common/server] Deliver -> DEBU 802 Starting new Deliver handler 2018-01-16 11:36:31.467 UTC [orderer/common/deliver] Handle -> DEBU 803 Starting new deliver loop for 172.18.0.1:42406 2018-01-16 11:36:31.467 UTC [orderer/common/deliver] Handle -> DEBU 804 Attempting to read seek info message from 172.18.0.1:42406 2018-01-16 11:36:31.467 UTC [orderer/common/deliver] deliverBlocks -> WARN 805 [channel: mychannel] Rejecting deliver request for 172.18.0.1:42406 because of consenter error 2018-01-16 11:36:31.467 UTC [orderer/common/deliver] Handle -> DEBU 806 Waiting for new SeekInfo from 172.18.0.1:42406 2018-01-16 11:36:31.467 UTC [orderer/common/deliver] Handle -> DEBU 807 Attempting to read seek info message from 172.18.0.1:42406 2018-01-16 11:36:31.468 UTC [orderer/common/deliver] Handle -> DEBU 808 Received EOF from 172.18.0.1:42406, hangup 2018-01-16 11:36:31.468 UTC [orderer/common/server] func1 -> DEBU 809 Closing Deliver stream

javrevasandeep (Tue, 16 Jan 2018 11:55:03 GMT):
can someone pls help me in resolving this issue

zafartm (Tue, 16 Jan 2018 12:47:31 GMT):
Has joined the channel.

zafartm (Tue, 16 Jan 2018 12:50:52 GMT):
while following this tutorial http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html , I am getting [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err the supplied identity is not valid: x509: certificate signed by unknown authority at /home/administrator/fabric-samples/fabcar/node_modules/grpc/src/client.js:554:15 when I run *node query.js* what is the solution?

CodeReaper (Tue, 16 Jan 2018 15:17:36 GMT):
Hi, Im not seeing maxEnrollments field take effect in register method of fabricCaClient

CodeReaper (Tue, 16 Jan 2018 15:18:07 GMT):
we can enroll any user any times even when Im setting it to one.

CodeReaper (Tue, 16 Jan 2018 15:18:41 GMT):

Clipboard - January 16, 2018 8:48 PM

Vanitha (Tue, 16 Jan 2018 18:09:42 GMT):
Has joined the channel.

philviana (Tue, 16 Jan 2018 21:31:03 GMT):
@here Has anyone seen the problem below? ```E0116 15:29:51.075077587 12685 ssl_transport_security.cc:594] Could not load any root certificate. E0116 15:29:51.076304493 12685 ssl_transport_security.cc:1383] Cannot load server root certificates. E0116 15:29:51.076361324 12685 security_connector.cc:1046] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0116 15:29:51.076387379 12685 secure_channel_create.cc:113] Failed to create secure subchannel for secure name 'dal-zbc03c.5.secure.blockchain.ibm.com:31333' E0116 15:29:51.076462888 12685 secure_channel_create.cc:145] Failed to create subchannel arguments during subchannel creation. ``` I found an issue in JIRA but after applying the fix it I am still hitting the same problem... https://gerrit.hyperledger.org/r/#/c/15719/

philviana (Tue, 16 Jan 2018 21:31:03 GMT):
Has anyone seen the problem below? ```E0116 15:29:51.075077587 12685 ssl_transport_security.cc:594] Could not load any root certificate. E0116 15:29:51.076304493 12685 ssl_transport_security.cc:1383] Cannot load server root certificates. E0116 15:29:51.076361324 12685 security_connector.cc:1046] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0116 15:29:51.076387379 12685 secure_channel_create.cc:113] Failed to create secure subchannel for secure name 'dal-zbc03c.5.secure.blockchain.ibm.com:31333' E0116 15:29:51.076462888 12685 secure_channel_create.cc:145] Failed to create subchannel arguments during subchannel creation. ``` I found an issue in JIRA but after applying the fix it I am still hitting the same problem... https://gerrit.hyperledger.org/r/#/c/15719/

Asara (Tue, 16 Jan 2018 21:31:38 GMT):
Please don't use (at)here

jrosmith (Tue, 16 Jan 2018 21:31:51 GMT):
@philviana please do not use (at) here

Ratnakar (Tue, 16 Jan 2018 21:46:36 GMT):
@philviana when did you see this issue ? What call is failing from SDK ? have you used the right certs

philviana (Tue, 16 Jan 2018 21:47:24 GMT):
@Ratnakar I think I was using the right certs. I cleaned my current dir and started a new network. I was running the `invoke.js` file for fabcar, but a modified version to send the PEM since I'm using Bluemix

philviana (Tue, 16 Jan 2018 21:49:25 GMT):
from here: https://www.ibm.com/developerworks/cloud/library/cl-deploy-sample-application-ibm-blockchain-platform/index.html

philviana (Tue, 16 Jan 2018 21:49:33 GMT):
I enabled logging and the debug log shows this:

philviana (Tue, 16 Jan 2018 21:51:00 GMT):
```{"level":"debug","message":"[TransactionID.js]: const - start","timestamp":"2018-01-16T21:25:37.833Z"} {"level":"debug","message":"[TransactionID.js]: const - transaction_id 33c709d51509ee92385022393bb5bdadd711db3995fe9fbe531c247d3bb48309","timestamp":"2018-01-16T21:25:37.836Z"} {"level":"debug","message":"[Channel.js]: sendTransactionProposal - start","timestamp":"2018-01-16T21:25:37.836Z"} {"level":"debug","message":"[Channel.js]: sendTransactionProposal - request does not have targets using this channels endorsing peers","timestamp":"2018-01-16T21:25:37.836Z"} {"level":"debug","message":"[Channel.js]: getPeers - list size: 1.","timestamp":"2018-01-16T21:25:37.836Z"} {"level":"debug","message":"[Channel.js]: sendTransactionProposal - adding function arg:initLedger","timestamp":"2018-01-16T21:25:37.836Z"} {"level":"debug","message":"[Channel.js]: sendTransactionProposal - adding arg:","timestamp":"2018-01-16T21:25:37.836Z"} {"level":"debug","message":"[Channel.js]: sendTransactionProposal - not adding the argument :: argbytes","timestamp":"2018-01-16T21:25:37.836Z"} {"level":"debug","message":"[client-utils.js]: buildChannelHeader - type 3 channel_id cmas-mvp3 tx_id NaN epoch % chaincode_id null fabcar","timestamp":"2018-01-16T21:25:37.836Z"} {"level":"debug","message":"[client-utils.js]: buildProposal - not adding a transientMap","timestamp":"2018-01-16T21:25:37.838Z"} {"r":{"negative":0,"words":[52552270,63955021,39605447,3976608,56348787,36709155,6858077,16355098,14608855,1850011,0,0,0,0,0,0,0,0,0,0],"length":10,"red":null},"s":{"negative":0,"words":[46892219,3493124,37931620,36572063,31732904,24195382,10760006,58176625,53335606,781463,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"length":10,"red":null},"recoveryParam":0,"level":"debug","message":"[crypto_ecdsa_aes]: ecdsa signature: ","timestamp":"2018-01-16T21:25:37.847Z"} {"level":"debug","message":"[Peer.js]: Peer.sendProposal - Start","timestamp":"2018-01-16T21:25:37.848Z"} ```

philviana (Tue, 16 Jan 2018 21:51:23 GMT):
I'm wondering if "request does not have targets using this channels endorsing peers" means something for this particular error...

huy.tranibm (Wed, 17 Jan 2018 00:29:05 GMT):
Does anyone here have documentation on endorsement policy, there seems to be some sort of but with the order of endorsements

newlife 1 (Wed, 17 Jan 2018 03:35:34 GMT):
Has joined the channel.

javrevasandeep (Wed, 17 Jan 2018 07:00:40 GMT):
Can anyone point me to some existing performance framework to measure performance of the running network. I want to measure performance of my customized balance transfer network

wangdong (Wed, 17 Jan 2018 11:21:28 GMT):
@philviana Hi, I have saw two kinds of this ssl problem. First one have been addressed by the path FAB-6266. The other one from my side, it is the used of the cert. 1. check your cert to see if it is integrate. As you say the cert is OK. Would you please show some of your code?

scottz (Wed, 17 Jan 2018 14:00:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=A5svi2L4ythqrAYTB) @javrevasandeep The Performance Traffic Engine (PTE) tool is updated and maintained in fabric-test repository. It uses the fabric and fabric-sdk-node. Plenty of other tests and readme files to examine. Lots of flexibility. https://github.com/hyperledger/fabric-test/tree/master/tools/PTE

boriskazmin (Wed, 17 Jan 2018 14:28:05 GMT):
Has joined the channel.

boriskazmin (Wed, 17 Jan 2018 14:29:12 GMT):
Hello! I have problems with receiving evenhub events using HFC Node SDK 1.0.2. The issue is not permanent as I receive the events from time to time. Accoding to the SDK logs the eventhub is succesfully connected on one side and according to the peer logs - the peer succesfully sends the block events as those are created. It looks like the event messages are lost somewhere between the peer and hfc (they're running on one VM). Would appreciate for any ideas on this. Thank you in advance!

philviana (Wed, 17 Jan 2018 16:38:12 GMT):
@wangdong @Ratnakar One of my certificates was corrupt! Strange thing is that the tool that extracts them (from the developerWorks article) was always the same, but the certificate was good a few times and corrupt other times. I found a fix for it. Thanks for your help

nicholas (Wed, 17 Jan 2018 16:48:52 GMT):
Has joined the channel.

BenjaminPeters (Wed, 17 Jan 2018 18:56:15 GMT):
Has joined the channel.

paul.sitoh (Wed, 17 Jan 2018 21:53:19 GMT):
For those interested in shifting you crypto store to a location other than `~/.hf-key-store` this is actually a two step process. First, set your cryptosuite to a location other than `~/.hf-key-store`. Second set your client to the cryptosuite as described in the first step.

huy.tranibm (Thu, 18 Jan 2018 01:30:00 GMT):
Hello guys, my program is geting stuck at sendTransactionProposal(), any idea what would cause this? i've confirmed orderer and peer is added to channel

huy.tranibm (Thu, 18 Jan 2018 01:30:15 GMT):
seems like its just idling there

Devender_Singh (Thu, 18 Jan 2018 05:14:11 GMT):
Has joined the channel.

ParveenPandit (Thu, 18 Jan 2018 09:07:44 GMT):
Has joined the channel.

silentspark (Thu, 18 Jan 2018 09:11:41 GMT):
Hello, I opened an issue FAB-7706 in Jira. Channel configuration (add org) fails via node sdk (refer to fabric-sdk-node/test/integration/configtxlator.js). could SDK developer take a look? P.S. I can add an org via command line "peer channel update" successfully.

Manish.Sharma (Thu, 18 Jan 2018 09:13:29 GMT):
Has joined the channel.

RasmusThorsoee (Thu, 18 Jan 2018 09:17:56 GMT):
Has joined the channel.

RasmusThorsoee (Thu, 18 Jan 2018 09:36:50 GMT):
Hi there! I am having some issues installing and initiating chaincode via the fabric SDK. It seems to install fine on my peer at "/var/hyperledger/production/chaincodes/mycc.1.1". However, when i try to instantiate the chaincode i get an error: "launchAndWaitForRegister failed Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "stat github.com/hyperledger/experiments/example_cc.go: no such file or directory". This is referencing the source code of my chaincode. Anyone have any pointers as to what could be going wrong? Or why it is trying to reference my sourcecode? Should it not just be looking for the executable?

RasmusThorsoee (Thu, 18 Jan 2018 09:39:45 GMT):
ls

mastersingh24 (Thu, 18 Jan 2018 10:05:57 GMT):
@RasmusThorsoee - My guess is that when you installed the chaincode via the SDK, somehow it did not pick up the source code / file for your chaincode

mastersingh24 (Thu, 18 Jan 2018 10:06:48 GMT):
Probably means the path you set to the chaincode was not correct and/or you did not properly set the GOPATH environment variable to point to your golang src directory where the chaincode source resides

paul.sitoh (Thu, 18 Jan 2018 10:36:57 GMT):
One more thing. For those we wish to deploy your app in the cloud and having to deal with cryposuite, you need to be aware that in general cloud services does not have a "premounted" volume, especially if you plan to use PaaS. Hence you will need to mount you volume to some Storage as a Service (SaaS) such as S3, etc. To do that unlike, v0.6, it looks like you will need to override the cryptosuite class and handle volume from there. I have not done it and have come to this conclusion from reading the code. However, if anyone know of a better approach please let me know.

paul.sitoh (Thu, 18 Jan 2018 10:36:57 GMT):
One more thing. For those we wish to deploy your app (i.e. cryposuite) in the cloud you'll need to be aware that in general cloud services does not have a "premounted" volume, especially if you plan to use PaaS. Hence you will need to mount you volume to some Storage as a Service (SaaS) such as S3, etc. To do that unlike, v0.6, it looks like you will need to override the cryptosuite class and handle volume from there. I have not done it and have come to this conclusion from reading the code. However, if anyone know of a better approach please let me know.

paul.sitoh (Thu, 18 Jan 2018 10:36:57 GMT):
One more thing. For those we wish to deploy your app (i.e. cryposuite) in the cloud you'll need to be aware that in general cloud services does not have a "premounted" volume, especially if you plan to use PaaS (Containers, elastic beanstalk or cloud foundry). Hence you will need to mount you volume to some Storage as a Service (SaaS) such as S3, etc. To do that unlike, v0.6, it looks like you will need to override the cryptosuite class and handle volume from there. I have not done it and have come to this conclusion from reading the code. However, if anyone know of a better approach please let me know.

paul.sitoh (Thu, 18 Jan 2018 10:36:57 GMT):
One more thing. For those we wish to deploy your app (i.e. cryposuite) in a PaaS (Containers, elastic beanstalk or cloud foundry), most PaaS instance don't come with "premounted" volume. Hence you will need to mount you volume to some Storage as a Service (SaaS) such as S3, etc. To do that unlike, v0.6, it looks like you will need to override the cryptosuite class and handle volume from there. I have not done it and have come to this conclusion from reading the code. However, if anyone know of a better approach please let me know.

paul.sitoh (Thu, 18 Jan 2018 10:36:57 GMT):
One more thing. For those who wish to deploy your app (i.e. cryposuite) in a PaaS (Containers, elastic beanstalk or cloud foundry), most PaaS instance don't come with "premounted" volume. Hence you will need to mount you volume to some Storage as a Service (SaaS) such as S3, etc. To do that unlike, v0.6, it looks like you will need to override the cryptosuite class and handle volume from there. I have not done it and have come to this conclusion from reading the code. However, if anyone know of a better approach please let me know.

paul.sitoh (Thu, 18 Jan 2018 10:36:57 GMT):
One more thing. For anyone who wish to deploy his/her app (i.e. cryposuite) in a PaaS (Containers, elastic beanstalk or cloud foundry), most PaaS instance don't come with "premounted" volume. Hence you will need to mount you volume to some Storage as a Service (SaaS) such as S3, etc. To do that unlike, v0.6, it looks like you will need to override the cryptosuite class and handle volume from there. I have not done it and have come to this conclusion from reading the code. However, if anyone know of a better approach please let me know.

javrevasandeep (Thu, 18 Jan 2018 10:56:44 GMT):
i am getting the error Failed to invoke chaincode. cause:Error: Problem setting up the event hub :Error: EventHub has been shutdown after storing around 3000 records in blockchain. This error is going away automatically after few minutes and the same error appearing again after storing few more records. I am using balance transfer example

javrevasandeep (Thu, 18 Jan 2018 10:57:11 GMT):
more information below

javrevasandeep (Thu, 18 Jan 2018 10:57:12 GMT):
[2018-01-18 10:55:14.310] [ERROR] invoke-chaincode - REQUEST_TIMEOUT:localhost:7053 [2018-01-18 10:55:14.314] [ERROR] invoke-chaincode - Problem setting up the event hub :Error: EventHub has been shutdown [2018-01-18 10:55:14.322] [ERROR] invoke-chaincode - Error: Problem setting up the event hub :Error: EventHub has been shutdown at eh.registerTxEvent (/home/bteam/go/src/github.com/hyperledger/fabric-samples/smartProperty24Nov/app/invoke-transaction.js:115:14) at closer (/home/bteam/go/src/github.com/hyperledger/fabric-samples/smartProperty24Nov/node_modules/fabric-client/lib/EventHub.js:433:5) at EventHub._closeAllCallbacks (/home/bteam/go/src/github.com/hyperledger/fabric-samples/smartProperty24Nov/node_modules/fabric-client/lib/EventHub.js:443:3) at EventHub._disconnect (/home/bteam/go/src/github.com/hyperledger/fabric-samples/smartProperty24Nov/node_modules/fabric-client/lib/EventHub.js:384:8) at EventHub.disconnect (/home/bteam/go/src/github.com/hyperledger/fabric-samples/smartProperty24Nov/node_modules/fabric-client/lib/EventHub.js:373:8) at Timeout.setTimeout (/home/bteam/go/src/github.com/hyperledger/fabric-samples/smartProperty24Nov/app/invoke-transaction.js:93:10) at ontimeout (timers.js:469:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5)

vikimeng (Thu, 18 Jan 2018 13:03:52 GMT):
ENDORSEMENT_POLICY_FAILURE I have 2 remote ubuntu server, in server1 has orderer and org1 with peer0 and peer1, in server2 has org2 with peer0 and peer1. The 2 server and 4 peers can communicate with each other and also with orderer. In org1 server, login with org1 user and create a channel named mychannel, join the 2 peers. Still in org1, login with org2 uses and make the org2 2 peers join to this channel. Install same chaincode on the 4 peers and instantiate with endorsement policy ```"identities": [ {"role": {"name": "member","mspId": "Org1MSP"}}, {"role": {"name": "member","mspId": "org3MSP"}} ], "policy": { "2-of": [ {"signed-by": 0}, {"signed-by": 1} ] } }``` means need both org to endorse. But when invoke, get the result ```ENDORSEMENT_POLICY_FAILURE at eh.registerTxEvent (/root/development/app/invoke-transaction.js:105:14) at EventHub._processTxOnEvents (/root/development/node_modules/fabric-client/lib/EventHub.js:775:5) at ClientDuplexStream. (/root/development/node_modules/fabric-client/lib/EventHub.js:310:10) at emitOne (events.js:96:13) at ClientDuplexStream.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at ClientDuplexStream.Readable.push (_stream_readable.js:134:10) at readCallback (/root/development/node_modules/grpc/src/client.js:299:14)``` As I noticed there a 4 good transaction proposal was good, not sure why event hub make it fail. As check in docker log, for both org1 peer1 and org2 peer2 have same error ```2018-01-18 10:02:07.196 UTC [txvalidator] VSCCValidateTxForCC -> ERRO ac9 VSCC check failed for transaction txid=30078147de5318e4c76c4bdbeb4a1449a5f279c5c59d86aa1a88ef43a40f316e, error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-18 10:02:07.196 UTC [lockbasedtxmgr] Done -> DEBU aca Done with transaction simulation / query execution [e599b0c0-5e61-42a4-b048-e6c72a966879] 2018-01-18 10:02:07.197 UTC [txvalidator] Validate -> ERRO acb VSCCValidateTx for transaction txId = 30078147de5318e4c76c4bdbeb4a1449a5f279c5c59d86aa1a88ef43a40f316e returned error VSCC error: policy evaluation failed, err Failed to authenticate policy``` and check inside the docker all peers installed the same chaincode. The same code work if the 2 orgs is in one server. Is anyone know how to fix it? Using docker image x86_64-1.0.4 or x86_64-1.0.2 and node_sdk 1.0.2

Amjadnz (Thu, 18 Jan 2018 14:43:31 GMT):
Ok - anyone with info on this item `0118 18:35:34.460819000 140735282204672 ssl_transport_security.c:970] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0118 18:35:34.469035000 140735282204672 ssl_transport_security.c:970] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed` I think my certs for CA are not fine - as per the message. I configured the TLS CA CERTS (.pem) in config.json (part of SDK) and then in the docker yaml too. I get this error - when I run the following command `sudo node ./test/integration/e2e/join-channel.js`

Amjadnz (Thu, 18 Jan 2018 14:43:31 GMT):
Ok - anyone with info on this item ```0118 18:35:34.460819000 140735282204672 ssl_transport_security.c:970] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0118 18:35:34.469035000 140735282204672 ssl_transport_security.c:970] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed``` I think my certs for CA are not fine - as per the message. I configured the TLS CA CERTS (.pem) in config.json (part of SDK) and then in the docker yaml too. I get this error - when I run the following command `sudo node ./test/integration/e2e/join-channel.js`

Amjadnz (Thu, 18 Jan 2018 14:44:57 GMT):
This is my cert settings - if that can help. ```"adx": { "name": "peerAdx", "mspid": "AdxOrg", "ca": { "url": "https://ca.adx.ubn.ae:7054", "name": "ca_adx" }, "peer1": { "requests": "grpcs://peer0.adx.ubn.ae:7051", "events": "grpcs://peer0.adx.ubn.ae:7053", "server-hostname": "peer0.adx.ubn.ae", "tls_cacerts": "../../../../../test/sampleconfig/peerOrganizations/adx.ubn.ae/tlsca/tlsca.adx.ubn.ae-cert.pem" }, "peer2": { "requests": "grpcs://peer1.adx.ubn.ae:27051", "events": "grpcs://peer1.adx.ubn.ae:27053", "server-hostname": "peer1.adx.ubn.ae", "tls_cacerts": "../../../../../test/sampleconfig/peerOrganizations/adx.ubn.ae/tlsca/tlsca.adx.ubn.ae-cert.pem" } },```

Amjadnz (Thu, 18 Jan 2018 14:45:19 GMT):
in config.json

wangdong (Thu, 18 Jan 2018 14:55:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5xhX47EhPAprjrckM) @silentspark I saw that unexpected EOF which I think may be the problem of your json file? Please check it.

wangdong (Thu, 18 Jan 2018 14:59:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eirYroJvx4GziYin7) @Amjadnz It seems that your certificate is not good. Please make sure you have the right one.

Amjadnz (Thu, 18 Jan 2018 15:01:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XvkG4b9AFEkTB8GpJ) @wangdong thanks.

Amjadnz (Thu, 18 Jan 2018 15:01:23 GMT):
Which cert could be the issue - the PEER TLS CERT or the CA TLS CERT

wangdong (Thu, 18 Jan 2018 15:07:07 GMT):
every peer got a tls ca cert, this should be the one

silentspark (Thu, 18 Jan 2018 15:08:33 GMT):
@wangdong I used same json file in command line way ---- "peer channel update" is successful, so I think the json is ok. I uploaded the code and json file in the Jira issue, you can review it if you have time.

Amjadnz (Thu, 18 Jan 2018 15:10:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=atLAXkhfhTbZW4gAi) @wangdong Thanks - would do another round of verification

ArnabChatterjee (Fri, 19 Jan 2018 00:28:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SSK5AX5A9CEp5jKRd) @vikimeng Make sure you are sending your chaincode to all necessary peers of the organization to endorse as well as that you have a deterministic chaincode, outputting the same RW sets.

ArnabChatterjee (Fri, 19 Jan 2018 00:28:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SSK5AX5A9CEp5jKRd) @vikimeng Make sure you are sending your chaincode to all necessary peers of the organization to endorse as well as that you have a deterministic chaincode, outputting the same RW sets. Also, you can use compareProposalResponseResults method to determine determinism of your chaincode. (https://fabric-sdk-node.github.io/Channel.html#compareProposalResponseResults__anchor)

ascatox (Fri, 19 Jan 2018 09:26:56 GMT):
Hi All! Someone knows if in the fabric-ca-client node is possible to enroll an identity passing the parameter **-M** as in the cli command (`fabric-ca-client enroll -u http://peer1:peer1pw@localhost:7054 -M $FABRIC_CA_CLIENT_HOME/msp``

ascatox (Fri, 19 Jan 2018 09:26:56 GMT):
Hi All! Someone knows if in the fabric-ca-client node is possible to enroll an identity passing the parameter **-M** as in the cli command (fabric-ca-client enroll -u http://peer1:peer1pw@localhost:7054 **-M $FABRIC_CA_CLIENT_HOME/msp**

rakeshkanaparthi (Fri, 19 Jan 2018 12:07:35 GMT):
Has joined the channel.

rakeshkanaparthi (Fri, 19 Jan 2018 12:09:40 GMT):
please provide a sample boilerplate for nodejs

rakeshkanaparthi (Fri, 19 Jan 2018 12:10:02 GMT):
fabricnodesdk

jrosmith (Fri, 19 Jan 2018 16:25:36 GMT):
@rakeshkanaparthi https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer/app

guillermo.correa (Fri, 19 Jan 2018 19:08:49 GMT):
Has joined the channel.

Brucepark (Sat, 20 Jan 2018 06:16:51 GMT):
Has joined the channel.

juni (Sat, 20 Jan 2018 12:04:04 GMT):
Has joined the channel.

juni (Sat, 20 Jan 2018 12:05:16 GMT):
hii , i am running the fabric-sdk on windows , after running the runApp.sh my contaniers are closng itself

juni (Sat, 20 Jan 2018 12:06:16 GMT):
nd when i am starting them again it is still closed and can be seen on docker ps -a command

juni (Sat, 20 Jan 2018 12:06:52 GMT):

Clipboard - January 20, 2018 5:06 PM

juni (Sat, 20 Jan 2018 12:11:24 GMT):
i have done with all prequisties given in first page of hyperledgerdocs

Amjadnz (Sat, 20 Jan 2018 13:02:35 GMT):
Ok another message while starting up the base nodeJS sdk distribution ```node test/integration/e2e.js module.js:471 throw err; ^ Error: Cannot find module './api.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/tts/official/src/tts/v3-ubn/fabric-sdk-node/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:19:11) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)```

Amjadnz (Sat, 20 Jan 2018 13:04:08 GMT):
Thought its my dev/deploy issue - cloned to a new location and tried and got the same message.

mastersingh24 (Sat, 20 Jan 2018 14:21:44 GMT):
@Amjadnz - did you run `npm install`

wangdong (Sat, 20 Jan 2018 14:22:41 GMT):
@Amjadnz I think the README may help. Please read this file firstly before you want to play with node sdk.

mastersingh24 (Sat, 20 Jan 2018 14:22:49 GMT):
Actually, you likely need to run npm install gulp ca npm install

Amjadnz (Sat, 20 Jan 2018 15:29:42 GMT):
Yea did the npm install

Amjadnz (Sat, 20 Jan 2018 15:29:49 GMT):
need to do the gulp ca though.

Amjadnz (Sat, 20 Jan 2018 15:29:54 GMT):
check me check that

Amjadnz (Sat, 20 Jan 2018 15:29:54 GMT):
let me check that

Amjadnz (Sat, 20 Jan 2018 15:49:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qGqvvG5AWSjXedXju) @mastersingh24 Thanks - as always that helped. Moving along now. Strange enough is I did the `gulp test` - but `gulp ca` was not mentioned as part of the readme at the sdk home at github.

bh4rtp (Sun, 21 Jan 2018 03:59:42 GMT):
hi, i am using the latest master branch of `fabric`, `fabric-ca`, `fabric-sdk-node` and `fabric-samples`. when running `node app` in the `balance-transfer`, node will coredump saying: `Bus error (core dumped)`.

rjones (Sun, 21 Jan 2018 05:50:42 GMT):

wangdong (Sun, 21 Jan 2018 22:31:26 GMT):
@rjones what is the room topic now?

rjones (Sun, 21 Jan 2018 22:31:26 GMT):
Has joined the channel.

bh4rtp (Mon, 22 Jan 2018 00:38:09 GMT):
i am running `balance-transfer`. yesterday it was ok. but today it can not join the channel. ```error: [Client.js]: Failed to load user "Allen" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user Allen at _cryptoSuite.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/energytrade-solo/node_modules/fabric-client/lib/User.js:255:11) at error: [Client.js]: Failed to load an instance of requested user "Allen" from the state store on this Client instance. Error: Error: Private key missing from key store. Can not establish the signing identity for user Allen at _cryptoSuite.importKey.then.then (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/energytrade-solo/node_modules/fabric-client/lib/User.js:255:11) at [2018-01-22 08:34:23.330] [ERROR] Helper - Failed to get registered user: Allen with error: Error: Private key missing from key store. Can not establish the signing identity for user Allen```

kamisdy (Mon, 22 Jan 2018 02:36:12 GMT):
Hi, everyone. I have a problem. There are three orderer nodes in the network. And How can I know whether the target orderer is not working. If I try the orderer by calling func, it will take so much time.

juni (Mon, 22 Jan 2018 06:59:24 GMT):
is there anyone had perfectly installed the hyperledger on Windows ?? is that after running RunApp.sh got only 2 containers running??

vikimeng (Mon, 22 Jan 2018 07:20:14 GMT):
@ArnabChatterjee Thank you for your reply. But the invoke for chaincode with `2-of` endorsement policy in the 2 remote servers(each has 2 peers) And i check all peers install the same chaincode and version. The chaincode is `fabric-samples` fabcar. Using channel.compareProposalResponseResults(proposalResponses) also gives me true. And even use foeeach all response proposal and use channel.verifyProposalResponse(proposalResponse) also give me true. Also log some other information ```channel.getOrganizations: [ { id: 'Org1MSP' }, { id: 'Org2MSP' }] channel.getMSPManager: MSPManager { _msps: { Org1MSP: MSP { _rootCerts: [Object], _intermediateCerts: [], _signer: undefined, _admins: [Object], cryptoSuite: [Object], _id: 'Org1MSP', _organization_units: [] }, Org2MSP: MSP { _rootCerts: [Object], _intermediateCerts: [], _signer: undefined, _admins: [Object], cryptoSuite: [Object], _id: 'Org2MSP', _organization_units: [] } } }``` From all the 4 peers docker container, get the similar log ```2018-01-22 05:16:06.507 UTC [vscc] deduplicateIdentity -> DEBU c6b Signature set is of size 3 out of 3 endorsement(s) 2018-01-22 05:16:06.510 UTC [vscc] Invoke -> WARN c6c Endorsement policy failure for transaction txid=9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447, err: Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [shim] func1 -> DEBU c6d [cb8f9327]Transaction completed. Sending COMPLETED```, ```2018-01-22 05:16:06.514 UTC [txvalidator] VSCCValidateTxForCC -> ERRO c76 VSCC check failed for transaction txid=9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447, error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [lockbasedtxmgr] Done -> DEBU c77 Done with transaction simulation / query execution [648c93b5-3f91-4cec-aa97-97ed988e848d] 2018-01-22 05:16:06.514 UTC [txvalidator] Validate -> ERRO c78 VSCCValidateTx for transaction txId = 9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447 returned error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [txvalidator] Validate -> DEBU c79 END Block Validation```, ```2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> DEBU c7b New block arrived for validation:&common.Block{Header:(*common.BlockHeader)(0xc42155e940), Data:(*common.BlockData)(0xc421396ae0), Metadata:(*common.BlockMetadata)(0xc421396b20)}, doMVCCValidation=true 2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> DEBU c7c Validating a block with [1] transactions 2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> WARN c7d Block [8] Transaction index [0] marked as invalid by committer. Reason code [10]``` Not sure what need check to find out the endorsement `2-of` problem.

vikimeng (Mon, 22 Jan 2018 07:20:14 GMT):
@ArnabChatterjee Thank you for your reply. But the invoke for chaincode with `2-of` endorsement policy in the 2 remote servers(each has 2 peers) And i check all peers install the same chaincode and version. The chaincode is `fabric-samples` fabcar. Using channel.compareProposalResponseResults(proposalResponses) also gives me true. And even use foeeach all response proposal and use channel.verifyProposalResponse(proposalResponse) also give me true. Also log some other information ```channel.getOrganizations: [ { id: 'Org1MSP' }, { id: 'Org2MSP' }] channel.getMSPManager: MSPManager { _msps: { Org1MSP: MSP { _rootCerts: [Object], _intermediateCerts: [], _signer: undefined, _admins: [Object], cryptoSuite: [Object], _id: 'Org1MSP', _organization_units: [] }, Org2MSP: MSP { _rootCerts: [Object], _intermediateCerts: [], _signer: undefined, _admins: [Object], cryptoSuite: [Object], _id: 'Org2MSP', _organization_units: [] } } }``` From all the 4 peers docker container, get the similar log ```2018-01-22 05:16:06.507 UTC [vscc] deduplicateIdentity -> DEBU c6b Signature set is of size 3 out of 3 endorsement(s) 2018-01-22 05:16:06.510 UTC [vscc] Invoke -> WARN c6c Endorsement policy failure for transaction txid=9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447, err: Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [shim] func1 -> DEBU c6d [cb8f9327]Transaction completed. Sending COMPLETED```, ```2018-01-22 05:16:06.514 UTC [txvalidator] VSCCValidateTxForCC -> ERRO c76 VSCC check failed for transaction txid=9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447, error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [lockbasedtxmgr] Done -> DEBU c77 Done with transaction simulation / query execution [648c93b5-3f91-4cec-aa97-97ed988e848d] 2018-01-22 05:16:06.514 UTC [txvalidator] Validate -> ERRO c78 VSCCValidateTx for transaction txId = 9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447 returned error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [txvalidator] Validate -> DEBU c79 END Block Validation``` , ```2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> DEBU c7b New block arrived for validation:&common.Block{Header:(*common.BlockHeader)(0xc42155e940), Data:(*common.BlockData)(0xc421396ae0), Metadata:(*common.BlockMetadata)(0xc421396b20)}, doMVCCValidation=true 2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> DEBU c7c Validating a block with [1] transactions 2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> WARN c7d Block [8] Transaction index [0] marked as invalid by committer. Reason code [10]``` Not sure what need check to find out the endorsement `2-of` problem.

vikimeng (Mon, 22 Jan 2018 07:20:14 GMT):
@ArnabChatterjee Thank you for your reply. But the invoke for chaincode with `2-of` endorsement policy in the 2 remote servers(each has 2 peers) still fail. And i check all peers install the same chaincode and version. The chaincode is `fabric-samples` fabcar , invoke use `createCar` or `initLedger`. Using channel.compareProposalResponseResults(proposalResponses) also gives me true. And even use foeeach all response proposal and use channel.verifyProposalResponse(proposalResponse) also give me true. Also log some other information ```channel.getOrganizations: [ { id: 'Org1MSP' }, { id: 'Org2MSP' }] channel.getMSPManager: MSPManager { _msps: { Org1MSP: MSP { _rootCerts: [Object], _intermediateCerts: [], _signer: undefined, _admins: [Object], cryptoSuite: [Object], _id: 'Org1MSP', _organization_units: [] }, Org2MSP: MSP { _rootCerts: [Object], _intermediateCerts: [], _signer: undefined, _admins: [Object], cryptoSuite: [Object], _id: 'Org2MSP', _organization_units: [] } } }``` From all the 4 peers docker container, get the similar log ```2018-01-22 05:16:06.507 UTC [vscc] deduplicateIdentity -> DEBU c6b Signature set is of size 3 out of 3 endorsement(s) 2018-01-22 05:16:06.510 UTC [vscc] Invoke -> WARN c6c Endorsement policy failure for transaction txid=9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447, err: Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [shim] func1 -> DEBU c6d [cb8f9327]Transaction completed. Sending COMPLETED```, ```2018-01-22 05:16:06.514 UTC [txvalidator] VSCCValidateTxForCC -> ERRO c76 VSCC check failed for transaction txid=9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447, error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [lockbasedtxmgr] Done -> DEBU c77 Done with transaction simulation / query execution [648c93b5-3f91-4cec-aa97-97ed988e848d] 2018-01-22 05:16:06.514 UTC [txvalidator] Validate -> ERRO c78 VSCCValidateTx for transaction txId = 9c3672c7d333992a028a9890e50742b4574d55aa3e4b6bfe1db1c7f6e3395447 returned error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-22 05:16:06.514 UTC [txvalidator] Validate -> DEBU c79 END Block Validation``` , ```2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> DEBU c7b New block arrived for validation:&common.Block{Header:(*common.BlockHeader)(0xc42155e940), Data:(*common.BlockData)(0xc421396ae0), Metadata:(*common.BlockMetadata)(0xc421396b20)}, doMVCCValidation=true 2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> DEBU c7c Validating a block with [1] transactions 2018-01-22 05:16:06.514 UTC [statevalidator] ValidateAndPrepareBatch -> WARN c7d Block [8] Transaction index [0] marked as invalid by committer. Reason code [10]``` Not sure what need check to find out the endorsement `2-of` problem.

Amjadnz (Mon, 22 Jan 2018 08:46:22 GMT):
A question. Getting this message my logs of late ```peer0.sca.ubn.ae | 2018-01-22 08:30:12.627 UTC [ConnProducer] NewConnection -> ERRO 340 Failed connecting to orderer.ubn.ae:7050 , error: x509: certificate signed by unknown authority```

Amjadnz (Mon, 22 Jan 2018 08:47:31 GMT):
the ROOT cas have been set in the orderer peer as follows ```- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/msp/orderer/cacerts/ca.ubn.ae-cert.pem, /etc/hyperledger/msp/peerAdx/cacerts/ca.adx.ubn.ae-cert.pem, /etc/hyperledger/msp/peerAuditor/cacerts/ca.auditor.ubn.ae-cert.pem, /etc/hyperledger/msp/peerBroker/cacerts/ca.broker.ubn.ae-cert.pem, /etc/hyperledger/msp/peerMedia/cacerts/ca.media.ubn.ae-cert.pem, /etc/hyperledger/msp/peerPrint/cacerts/ca.print.ubn.ae-cert.pem, /etc/hyperledger/msp/peerOnline/cacerts/ca.online.ubn.ae-cert.pem, /etc/hyperledger/msp/peerSca/cacerts/ca.sca.ubn.ae-cert.pem]```

Amjadnz (Mon, 22 Jan 2018 08:50:04 GMT):
and am using the same ca-certs in my config.json to connect to orderer. ``` "sca": { "name": "peerSca", "mspid": "ScaMSP", "ca": { "url": "https://localhost:7074", "name": "ca_peerSca" }, "peer1": { "requests": "grpcs://localhost:7071", "events": "grpcs://localhost:7073", "server-hostname": "peer0.sca.ubn.ae", "tls_cacerts": "../../fixtures/channel/crypto-config/peerOrganizations/sca.ubn.ae/peers/peer0.sca.ubn.ae/msp/cacerts/ca.sca.ubn.ae-cert.pem" }, "peer2": { "requests": "grpcs://localhost:7075", "events": "grpcs://localhost:7077", "server-hostname": "peer1.sca.ubn.ae", "tls_cacerts": "../../fixtures/channel/crypto-config/peerOrganizations/sca.ubn.ae/peers/peer1.sca.ubn.ae/msp/cacerts/ca.sca.ubn.ae-cert.pem" } }```

Amjadnz (Mon, 22 Jan 2018 08:51:48 GMT):
these code bases were taken from samples - so it should have been straight forward - but somehow I manage to spoil it :-)

Amjadnz (Mon, 22 Jan 2018 08:51:53 GMT):
Any help is greatly appreciated.

Amjadnz (Mon, 22 Jan 2018 08:55:31 GMT):
Let me try with ROOTCAS as tls certs

rakeshkanaparthi (Mon, 22 Jan 2018 09:02:49 GMT):
fabcar sample i am getting below error

rakeshkanaparthi (Mon, 22 Jan 2018 09:02:51 GMT):
ERROR: manifest for hyperledger/fabric-couchdb:latest not found

rakeshkanaparthi (Mon, 22 Jan 2018 09:03:14 GMT):
can you guys please help

MarcoReitano (Mon, 22 Jan 2018 10:02:41 GMT):
Heyho, we are trying to make a transaction on a channel with an AND-Endoresment peer (with the two peers belonging to different organisation) and we are getting "an read/writes sets do not match index=1" error, any hints?

Ferdoran (Mon, 22 Jan 2018 12:28:20 GMT):
Hello everybody, We have a problem during load testing our fabric-sdk-node REST server. We are load testing with the *artillery* framework. Currently we test with an arrivalRate of 2 and a duration of 5 (which obviously isn't much). After some time we are getting errors like: ``` event.setCreator(user.getIdentity().serialize()); ^ TypeError: Cannot read property 'getIdentity' of null at EventHub._sendRegistration (/home/roland/dev/blockchain-car-sharing/blockchain-rest-server/node_modules/fabric-client/lib/EventHub.js:411:25) at EventHub._disconnect (/home/roland/dev/blockchain-car-sharing/blockchain-rest-server/node_modules/fabric-client/lib/EventHub.js:386:9) at EventHub.disconnect (/home/roland/dev/blockchain-car-sharing/blockchain-rest-server/node_modules/fabric-client/lib/EventHub.js:372:8) at eh.registerTxEvent (/home/roland/dev/blockchain-car-sharing/blockchain-rest-server/functions/invoke.functions.js:107:10) at EventHub._processTxOnEvents (/home/roland/dev/blockchain-car-sharing/blockchain-rest-server/node_modules/fabric-client/lib/EventHub.js:775:5) at ClientDuplexStream. (/home/roland/dev/blockchain-car-sharing/blockchain-rest-server/node_modules/fabric-client/lib/EventHub.js:310:10) at ClientDuplexStream.emit (events.js:160:13) at addChunk (_stream_readable.js:269:12) at readableAddChunk (_stream_readable.js:256:11) at ClientDuplexStream.Readable.push (_stream_readable.js:213:10) ```

Ferdoran (Mon, 22 Jan 2018 12:30:34 GMT):
This error only occurs after some time, when the rate of requests to the REST server has risen

Amjadnz (Mon, 22 Jan 2018 14:21:50 GMT):
Can someone put some light on this item ```2018-01-22 14:20:44.266 UTC [ConnProducer] NewConnection -> ERRO 2ad Failed connecting to orderer.ubn.ae:7050 , error: x509: certificate signed by unknown authority 2018-01-22 14:20:44.266 UTC [deliveryClient] connect -> DEBU 2ae Connected to 2018-01-22 14:20:44.266 UTC [deliveryClient] connect -> ERRO 2af Failed obtaining connection: Could not connect to any of the endpoints: [orderer.ubn.ae:7050] 2018-01-22 14:20:44.266 UTC [deliveryClient] try -> WARN 2b0 Got error: Could not connect to any of the endpoints: [orderer.ubn.ae:7050] ,at 1 attempt. Retrying in 1s```

Amjadnz (Mon, 22 Jan 2018 14:22:05 GMT):
Tried all options - but nothing seems to work.

Amjadnz (Mon, 22 Jan 2018 14:22:47 GMT):
the ROOT_CAS array is pointing to the same CA CERTS that I'm using in config.json tls_cacerts

Amjadnz (Mon, 22 Jan 2018 14:22:47 GMT):
the Orderer ROOT_CAS array is pointing to the same CA CERTS that I'm using in config.json tls_cacerts

Amjadnz (Mon, 22 Jan 2018 14:23:43 GMT):
the same Orderer ROOT TLS (that is set in docker-compose.yaml) is set in config.json for NodeJS Sdk.

Amjadnz (Mon, 22 Jan 2018 14:27:09 GMT):
Is this is complaining about orderer certificate (tls_cacerts) that is configured in config.json is not correct *OR* The peer certificates not setup correctly *OR* The orderer cert is not in order The create channel went fine. But joining channel is not happening with TLS enabled. PS: without TLS all is going fine as expected - so TLS and my crypto is causing this issue Can someone take a look please?

Vadim (Mon, 22 Jan 2018 14:29:51 GMT):
@Amjadnz is this coming from your peer?

Amjadnz (Mon, 22 Jan 2018 14:30:05 GMT):
Yes

Amjadnz (Mon, 22 Jan 2018 14:30:14 GMT):
when I do a logs -f

Vadim (Mon, 22 Jan 2018 14:30:27 GMT):
so the problem is then that the peer does not trust the orderer, nothing to do with the sdk

Vadim (Mon, 22 Jan 2018 14:31:29 GMT):
check that the orderer uses the certificates issued by the root which is the same as in the config block

Vadim (Mon, 22 Jan 2018 14:31:49 GMT):
(the error message implies that it's not the case)

Amjadnz (Mon, 22 Jan 2018 14:33:21 GMT):
Ok so if I have an org like example.com then orderer should be orderer.orderer.example.com and peer can be peer1.org1.example.com

Vadim (Mon, 22 Jan 2018 14:33:42 GMT):
you need to check the certificates

Amjadnz (Mon, 22 Jan 2018 14:34:22 GMT):
Ok - I would do that now. Thanks.

Vadim (Mon, 22 Jan 2018 14:34:59 GMT):
I'm actually not sure where the TLS root certs are recorded,but I guess it should be in the config block

wangdong (Mon, 22 Jan 2018 15:00:49 GMT):
@rakeshkanaparthi I got this error before. I just fix it with x86_64-1.0.0 appended not latest. You can try this. I am not sure if this the issue of couchdb. you can verify this.

wangdong (Mon, 22 Jan 2018 15:03:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=m3YY6GMF9XyKXXLBY) @silentspark Hi, I just saw your node code. You just try to add this org without a channel created. This is the cause. you may refer to this: http://hyperledger-fabric.readthedocs.io/en/release/configtxlator.html

Amjadnz (Mon, 22 Jan 2018 15:24:11 GMT):
What is the speciality of `ORDERER_GENERAL_TLS_ROOTCAS` array in terms of ORDERERS and then do we have a specific trusted for peers as well

Amjadnz (Mon, 22 Jan 2018 15:24:11 GMT):
What is the speciality of `ORDERER_GENERAL_TLS_ROOTCAS` array in terms of ORDERERS and then do we have a specific trusted for peers as well like `CORE_PEER_TLS_ROOTCAS`

Amjadnz (Mon, 22 Jan 2018 15:24:35 GMT):
I assume these are arrays of ROOT CAs that can communicate with the orderer.

Amjadnz (Mon, 22 Jan 2018 15:24:53 GMT):
Or peers that have a certificate issued by these ROOT CAS

Amjadnz (Mon, 22 Jan 2018 15:38:32 GMT):
Hi @mastersingh24 - I saw this post of yours hence this question if you can help. https://stackoverflow.com/questions/45891862/what-crypto-config-yaml-and-configtx-yaml-generate-msp-and-orderer-blcok-about-f What If we want to generate 2 orgs with same CA. As per your comment in SO post - the template does give me the ways to use a spec. But is it possible to share the same CA?

Amjadnz (Mon, 22 Jan 2018 15:39:01 GMT):
Using cryptogen

Amjadnz (Mon, 22 Jan 2018 15:40:29 GMT):
The base of my question which @vadim clarified is an error that I'm getting in my peer logs ```2018-01-22 14:20:44.266 UTC [ConnProducer] NewConnection -> ERRO 2ad Failed connecting to orderer.ubn.ae:7050 , error: x509: certificate signed by unknown authority 2018-01-22 14:20:44.266 UTC [deliveryClient] connect -> DEBU 2ae Connected to 2018-01-22 14:20:44.266 UTC [deliveryClient] connect -> ERRO 2af Failed obtaining connection: Could not connect to any of the endpoints: [orderer.ubn.ae:7050] 2018-01-22 14:20:44.266 UTC [deliveryClient] try -> WARN 2b0 Got error: Could not connect to any of the endpoints: [orderer.ubn.ae:7050] ,at 1 attempt. Retrying in 1s```

Amjadnz (Mon, 22 Jan 2018 15:40:29 GMT):
The base of my question which @Vadim clarified is an error that I'm getting in my peer logs ```2018-01-22 14:20:44.266 UTC [ConnProducer] NewConnection -> ERRO 2ad Failed connecting to orderer.ubn.ae:7050 , error: x509: certificate signed by unknown authority 2018-01-22 14:20:44.266 UTC [deliveryClient] connect -> DEBU 2ae Connected to 2018-01-22 14:20:44.266 UTC [deliveryClient] connect -> ERRO 2af Failed obtaining connection: Could not connect to any of the endpoints: [orderer.ubn.ae:7050] 2018-01-22 14:20:44.266 UTC [deliveryClient] try -> WARN 2b0 Got error: Could not connect to any of the endpoints: [orderer.ubn.ae:7050] ,at 1 attempt. Retrying in 1s```

Amjadnz (Mon, 22 Jan 2018 15:42:23 GMT):
my org (adx) ca is ca.adx.ubn.ae and for orderer is ca.orderer.ubn.ae - the certificates are not issued by the same CA hence the complaint of the peer of non trust worthy orderer certs.

Amjadnz (Mon, 22 Jan 2018 15:51:09 GMT):
Or to be more precise how do we trust the certs issued by by ca.orderer.ubn.ae by a peer

Vadim (Mon, 22 Jan 2018 15:51:43 GMT):
@Amjadnz the setup you are describing should work, it seems that the certificates that you use with orderer and the ones that peer validates against are not the same

Amjadnz (Mon, 22 Jan 2018 15:53:55 GMT):
Ok - in my orderer (docker.yaml) I use the following config: ```- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/orderer/msp/keystore/5c4c1382f56953bf617bb79a17678a220f1ef284505e88ae9756ddc59d8c84aa_sk - ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/orderer/msp/signcerts/orderer.ubn.ae-cert.pem - ORDERER_GENERAL_TLS_ROOTCERT_FILE=/etc/hyperledger/orderer/msp/cacerts/ca.ubn.ae-cert.pem```

Amjadnz (Mon, 22 Jan 2018 15:54:44 GMT):
So my private key/cert/root cert are set for orderer.

Vadim (Mon, 22 Jan 2018 15:55:58 GMT):
I _think_ that the peer uses the TLS root CA cert from the config block, can you make sure (i.e. compare the certs using their hashes) that it's the same as ORDERER_GENERAL_TLS_ROOTCERT_FILE?

Devender_Singh (Mon, 22 Jan 2018 15:56:13 GMT):
Hi, I want to customize the response which I am receiving from Fabric invoke API after adding an asset to the ledger. DO we have any SDK available in the node which can help me returning a customize response in version1.1?

Amjadnz (Mon, 22 Jan 2018 15:57:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FSizbF9TbimmcEanC) @Vadim - Right away sire :-)

Amjadnz (Mon, 22 Jan 2018 15:59:22 GMT):
Ok here is my peer config ``` - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/peer/msp/keystore/28c7077ce2a46f34ef7d4f1d55daab9b34708265e1ad07d401f8c9409d8fbb2b_sk - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/peer/msp/signcerts/peer0.adx.ubn.ae-cert.pem - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/peer/msp/cacerts/ca.adx.ubn.ae-cert.pem```

Amjadnz (Mon, 22 Jan 2018 16:00:13 GMT):
they are using 2 different ROOTCERTs - which the way it should be right?

Amjadnz (Mon, 22 Jan 2018 16:01:25 GMT):
As we have it in the sample sdk code - orderer.example.com and peer1.org1.example.com

Amjadnz (Mon, 22 Jan 2018 17:02:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FSizbF9TbimmcEanC) @Vadim By the way config block mean the Spec in the crypto-config.yaml right?

Amjadnz (Mon, 22 Jan 2018 17:05:35 GMT):
The certificate compare is now done and this is the current state: Org ADX has its own ca (ca.adx.ubn.ae) Org Orderer has it own ca (ca.ubn.ae) the ROOTCAS on orderer is allowing all the CAs from adx (ca.adx.ubn.ae) Now the older issue is still there - the peer (or rather I believe its the orderer) that is still complaining about invalid signature.

Amjadnz (Mon, 22 Jan 2018 17:06:37 GMT):
Do we do any importing in NodeJS sdk - that has a pre generated CERTS - that have a common CA for all the orgs. In fact I checked the org1.example.com and org2.example.com - all are generated with sepeate CAs. So mine setup is similar to the NODEJS example.

rjones (Mon, 22 Jan 2018 19:31:19 GMT):
@wangdong the old topic was some screwed up HTML that linked to this room, so I deleted it

ArnabChatterjee (Tue, 23 Jan 2018 02:07:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PxQeRS5sCybtBd2cS) @vikimeng Strange problem. I would insist you to re-verify the proposal responses and check you are getting enough endorsements and all your proposal responses (proposalResponses[i].payload) match. Can you also post your endorsement policy?

vikimeng (Tue, 23 Jan 2018 03:58:37 GMT):
@ArnabChatterjee The proposalResponses[1].payload is binary data and they are same. The endorsement policy not change, still is ```{ "identities": [ {"role": {"name": "member","mspId": "Org1MSP"}}, {"role": {"name": "member","mspId": "Org2MSP"}} ], "policy": { "2-of": [ {"signed-by": 0}, {"signed-by": 1} ] } }``` I am check the fabric-sdk-node code, https://github.com/hyperledger/fabric-sdk-node/blob/v1.0.2/fabric-client/lib/Channel.js#L1367 In this line, it only sign the proposal with current org user but the endorsement policy require 2 orgs to endorse, I think this maybe the problem of cause the ```[txvalidator] VSCCValidateTxForCC -> ERRO ac9 VSCC check failed for transaction txid=30078147de5318e4c76c4bdbeb4a1449a5f279c5c59d86aa1a88ef43a40f316e, error VSCC error: policy evaluation failed, err Failed to authenticate policy```. Is it the root cause of this problem and it's fabric-sdk-node bug?

ArnabChatterjee (Tue, 23 Jan 2018 04:05:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Edw5z9iBindJFQAzB) @vikimeng No, it is the signature of the creator application. The signature of atleast one of the peers belonging to Org1MSP and Org2MSP is required. In total, the minimum of 2 distinct signature in your transaction should be enough for it to pass.

ParveenPandit (Tue, 23 Jan 2018 05:05:55 GMT):
How to implement chaincode encryption in node.js

Amjadnz (Tue, 23 Jan 2018 05:44:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5ohpF42fMwYk4Y6fi) - This I got it resolved guys thank @Vadim

Amjadnz (Tue, 23 Jan 2018 05:44:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5ohpF42fMwYk4Y6fi) - This I got it resolved guys thanks @Vadim

Amjadnz (Tue, 23 Jan 2018 05:45:42 GMT):
the item is not mentioned in the docs but testing it with comparing sample codes.

Amjadnz (Tue, 23 Jan 2018 05:46:26 GMT):
ALL the CA CERTS (TLS and no TLS) has to be in the cacerts folder of the orderer - in order for it to get it authenticated and authorize ordering transactions.

Amjadnz (Tue, 23 Jan 2018 05:46:59 GMT):
Once I out all my 7 orgs certs there so far I can move ahead on the join channel part.

Amjadnz (Tue, 23 Jan 2018 05:46:59 GMT):
Once I put all my 7 orgs certs there so far I can move ahead on the join channel part.

rakeshkanaparthi (Tue, 23 Jan 2018 06:33:17 GMT):

Clipboard - January 23, 2018 12:01 PM

rakeshkanaparthi (Tue, 23 Jan 2018 06:33:56 GMT):
it's running fine in yesterday

Amjadnz (Tue, 23 Jan 2018 06:34:47 GMT):
check your docker.yaml file for hidden chars after 7053 port

Amjadnz (Tue, 23 Jan 2018 06:35:28 GMT):
the message shows that you have a space or char `fa` at the end of port number.

kapilAtrey (Tue, 23 Jan 2018 06:59:10 GMT):
Hi, i am using 3orgs for my network and registration is all good for first two orgs but the third one gives an error of affiliation so i wanted to know where we define affiliation I've included the successful registration and the failed registration

kapilAtrey (Tue, 23 Jan 2018 06:59:19 GMT):

Clipboard - January 23, 2018 12:29 PM

kapilAtrey (Tue, 23 Jan 2018 06:59:19 GMT):

Clipboard - January 23, 2018 12:29 PM

kapilAtrey (Tue, 23 Jan 2018 07:00:48 GMT):

Clipboard - January 23, 2018 12:30 PM

kapilAtrey (Tue, 23 Jan 2018 07:00:48 GMT):

Clipboard - January 23, 2018 12:30 PM

kapilAtrey (Tue, 23 Jan 2018 07:00:48 GMT):

Clipboard - January 23, 2018 12:30 PM

mastersingh24 (Tue, 23 Jan 2018 09:33:52 GMT):
@kapilAtrey - With fabric-ca v1.0.x (I assume that's what you are using), affiliations are statically defined in the config file for the fabric-ca-server. Assuming you are using the fabric-ca Docker image, then the only top-level affiliations which are defined by default are "org1" and "org2"

rakeshkanaparthi (Tue, 23 Jan 2018 09:50:06 GMT):
@Amjadnz Thank you ,Working fine now.

kapilAtrey (Tue, 23 Jan 2018 09:51:40 GMT):
@mastersingh24 I went through the fabric-ca-server-config.yaml and i found 3 hardcoded affiliations 2 for org1 and 1 for org2 , How to overwrite the default affiliations for fabric-ca-server

juni (Tue, 23 Jan 2018 11:38:09 GMT):
hii , plz anyone had install Hyperledger fabric in windows could help me

juni (Tue, 23 Jan 2018 11:38:20 GMT):

Clipboard - January 23, 2018 4:38 PM

Amjadnz (Tue, 23 Jan 2018 13:13:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Tee74vTugzpgpHkrQ) @juni - although possible to get it up and running on windows - I found it very tricky. If you are exploring FABRIC to go with UBUNTU - as a virtual machine (like VMWARE Player free version).

javrevasandeep (Tue, 23 Jan 2018 13:58:40 GMT):
Hi guys. can anyone pls help me with create channel issue. I am using 2 orgs with 2 peer and 1 CA each and kafka based ordering service. I have 2 orderers, 3 zookeepers and 4 kafka brokers on on 1st VM. Org1 peers and its CA on 2nd VM. Org2 peers and its CA on 3rd VM. I am invoking all the calls from node-sdk on 4th VM. I am getting error while creating channel

javrevasandeep (Tue, 23 Jan 2018 13:58:40 GMT):
error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: Connect Failed\n at createStatusError (/home/bteam/go/src/github.com/hyperledger/fabric-samples-latest/fabric-samples/smartPropertyKafka/node_modules/grpc/src/client.js:65:15)\n at ClientDuplexStream._emitStatusIfDone (/home/bteam/go/src/github.com/hyperledger/fabric-samples-latest/fabric-samples/smartPropertyKafka/node_modules/grpc/src/client.js:271:19)\n at ClientDuplexStream._readsDone (/home/bteam/go/src/github.com/hyperledger/fabric-samples-latest/fabric-samples/smartPropertyKafka/node_modules/grpc/src/client.js:237:8)\n at readCallback (/home/bteam/go/src/github.com/hyperledger/fabric-samples-latest/fabric-samples/smartPropertyKafka/node_modules/grpc/src/client.js:297:12)" [2018-01-23 13:53:26.962] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE

javrevasandeep (Tue, 23 Jan 2018 14:01:00 GMT):
when i checked orderer0.example.com logs. I can see the below error

javrevasandeep (Tue, 23 Jan 2018 14:01:01 GMT):
transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 172.18.0.9:7050->10.0.1.6:47326: read: connection reset by peer

javrevasandeep (Tue, 23 Jan 2018 14:04:47 GMT):
i am sharing my docker-compose files

javrevasandeep (Tue, 23 Jan 2018 14:06:36 GMT):

docker-compose-orderer-kafka-vm1.txt

javrevasandeep (Tue, 23 Jan 2018 14:06:45 GMT):

docker-compose-org1-vm2.txt

javrevasandeep (Tue, 23 Jan 2018 14:06:45 GMT):

docker-compose-org1-vm2.txt

javrevasandeep (Tue, 23 Jan 2018 14:06:54 GMT):

docker-compose-org2-vm3.txt

javrevasandeep (Tue, 23 Jan 2018 14:07:01 GMT):

network-config-vm4.txt

samuel.alencar (Tue, 23 Jan 2018 17:31:47 GMT):
Has joined the channel.

vikimeng (Wed, 24 Jan 2018 03:56:17 GMT):
@ArnabChatterjee if org1 and org2 and orderer in localhost, the endorsement policy `2-of` works, but if split the org1 and org2 with there peers to remote server, for example org1 and orderer in 172.168.1.100 an org2 in 172.168.1.200. All the peers join the same channel and install same chaincode. But the invoke always fail if use `2-of` policy. In all the peers docker container log, it show ```2018-01-24 02:38:04.037 UTC [chaincode] Execute -> DEBU 7f4 Exit 2018-01-24 02:38:04.037 UTC [txvalidator] VSCCValidateTxForCC -> ERRO 7f5 VSCC check failed for transaction txid=b2c1392973456c9ff844cd5e54534beb3be913906aa750870b93d91231b0f725, error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-24 02:38:04.037 UTC [lockbasedtxmgr] Done -> DEBU 7f6 Done with transaction simulation / query execution [3c70d2fd-9d80-4479-a719-5a6878ca8fa7] 2018-01-24 02:38:04.037 UTC [txvalidator] Validate -> ERRO 7f7 VSCCValidateTx for transaction txId = b2c1392973456c9ff844cd5e54534beb3be913906aa750870b93d91231b0f725 returned error VSCC error: policy evaluation failed, err Failed to authenticate policy```. The code is same in local and remote. I guess is because the remote vscc is different with local, but how to fix the remote VSCC error? Thanks.

ArnabChatterjee (Wed, 24 Jan 2018 05:37:20 GMT):
@vikimeng - I don't think there is a problem with VSCC. It works for me. Just check you have endorsements from the other org. You can inspect the proposal responses using some debugging tool and check the following: number of responses and whom (which MSP) you are getting it from. You can use the following line to inspect the proposal response MSP ID. `var _identityProto = grpc.load(path.join(__dirname, '../node_modules/fabric-client/lib/protos/msp/identities.proto')).msp;` ```var getMspid = function (proposalResponse) { let sid = _identityProto.SerializedIdentity.decode(proposalResponse.endorsement.endorser); let mspid = sid.getMspid(); return mspid; };```

ArnabChatterjee (Wed, 24 Jan 2018 05:37:20 GMT):
@vikimeng - I don't think there is a problem with VSCC. It works for me. Just check you have endorsements from the other org. You can inspect the proposal responses using some debugging tool and check the following: number of responses and whom (which MSP) you are getting it from. You can use the following code to inspect the proposal response MSP ID. `var _identityProto = grpc.load(path.join(__dirname, '../node_modules/fabric-client/lib/protos/msp/identities.proto')).msp;` ```var getMspid = function (proposalResponse) { let sid = _identityProto.SerializedIdentity.decode(proposalResponse.endorsement.endorser); let mspid = sid.getMspid(); return mspid; };```

username343 (Wed, 24 Jan 2018 05:51:46 GMT):
How do i specify the version of the chaincode to send the request to, using the nodejs sdk?

juni (Wed, 24 Jan 2018 09:30:40 GMT):
@Amjadnz thanks man (y)

paul.sitoh (Wed, 24 Jan 2018 11:42:00 GMT):
Folks, I notice that the SDK, you can add more than one `peer` handle, the `channel` handle -- i.e. client side channel --

paul.sitoh (Wed, 24 Jan 2018 11:42:00 GMT):
Folks, I notice that the SDK, you can add more than one `peer` handle, the `channel` handle -- i.e. client side channel --

paul.sitoh (Wed, 24 Jan 2018 11:42:00 GMT):
Folks, I notice that the SDK, you can add more than one `peer` handles to the `channel` handle. If so when you send a transaction how will it know which orderer to reference?

naveen_saravanan (Wed, 24 Jan 2018 12:08:38 GMT):
Has joined the channel.

javrevasandeep (Wed, 24 Jan 2018 14:48:09 GMT):
However i want to have control based access like org1 can access orderer0 and org2 can access orderer1. Is this possible?

javrevasandeep (Wed, 24 Jan 2018 14:50:04 GMT):
hi guys. I am using kafka based ordering service with 2 orderers, 2 orgs with 2 peers and 1 ca each. I want to have access based use in case of multiple orderers like org1 can access orderer0 and org2 can access orderer1. Is this possible?

wordforthis (Wed, 24 Jan 2018 17:13:20 GMT):
Has joined the channel.

bretharrison (Wed, 24 Jan 2018 17:15:42 GMT):
@username343 You can not specify version, just name(ID), the version is specified at instantiate / upgrade time, so there is only one version running at a time

pkarolis (Wed, 24 Jan 2018 17:35:56 GMT):
Hi Guys. I see that GetQueryResult is not implemented (https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/mockstub.go#L227) Does anybody how i can implement this in my unit tests for testing scenarios? I use getQueryResults a lot in my chaincode)

wordforthis (Wed, 24 Jan 2018 17:40:34 GMT):
I'm trying to write a node.js program to update a channel, using the Node SDK and the configtxlator (but not the CLI). So I'm trying to "convert" all of the CLI steps in hyperledger-fabric.readthedocs.io/en/master/channel_update.html to Node SDK calls. For the most part I've been successful, but I'm having trouble with one step: peer channel fetch config config_block.pb -o orderer.example.com:7050 -c $CHANNEL_NAME --tls --cafile $ORDERER_CA I can't figure out how to get the config block protobuf from the Node SDK (instead of the CLI as above). Channel::getChannelConfig seems to get the config block I'm looking for, but it returns a (promise for a) ConfigEnvelope object, not a protobuf. Is there some way to convert it to a protobuf (or a JSON, since the next step in the channel update is to convert the protobuf to JSON using the configxlator)? BlockDecoder::decodeBlock converts from object to protobuf, but I don't see anything that does the opposite conversion. I tried just using stringify on the ConfigEnvelope object to convert it directly to JSON, but got an error about a circular structure. In hyperledger-fabric.readthedocs.io/en/master/configtxlator.html it says that the first steps of the expected standard usage for channel updates is "1. SDK retrieves latest config; 2. configtxlator produces human readable version of config." Presumably step 2 is converting a protobuf to JSON, which means that in step 1 the SDK should be producing a protobuf. That gives me some confidence that my overall approach is correct, but obviously doesn't help in explaining exactly how the SDK should get the protobuf of the latest config. I also asked this question on #fabric-questions, and @Vadim pointed me to the Channel::getChannelConfig code. I'm still looking at it, but it seems that that function first gets the protobuf and then decodes it and returns the decoded object. So one solution might be to write a duplicate function that just skips the decoding part. If that really is the only solution, would it be appropriate to add a new Channel::getChannelConfigProto function to the SDK that returns the protobuf, and then modify the existing Channel::getChannelConfig function to simply call getChannelConfigProto and then decode the returned protobuf? Or am I thinking about this all wrong?

bretharrison (Wed, 24 Jan 2018 18:33:04 GMT):
@wordforthis at this time we really need to use a combination of NodeSDK and Configtxlator, see the test case https://github.com/hyperledger/fabric-sdk-node/blob/release/test/integration/configtxlator.js

wordforthis (Wed, 24 Jan 2018 20:44:26 GMT):
@bretharrison Thank you for that link! It looks like if config_envelope is the object returned by getChannelConfig, then config_envelope.config.toBuffer() is corresponding protobuf. Unfortunately I'm learning Javascript at the same time as Hyperledger, or that would have probably been obvious... :)

bretharrison (Wed, 24 Jan 2018 20:46:13 GMT):
@wordforthis well seems that the getChannelConfig should really return the config not the config_envelope

naveen_saravanan (Thu, 25 Jan 2018 07:40:28 GMT):
Hi, I am trying to enroll admin for the fabric-starter (which has multiple orgs with separate docker containers for each orgs like ca.org1.example.com instead of ca.example.com ) using the erollAdmin.js file from the Fabcar through the Node.js application ( by calling 'node enroll admin'). Could anyone explain the elements used for fabric-ca-client given below? fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite); And also about the this function and the arguments :- 'http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite ?

naveen_saravanan (Thu, 25 Jan 2018 07:40:28 GMT):
Hi, I am trying to enroll admin for the fabric-starter (which has multiple orgs with separate docker containers for each orgs like ca.org1.example.com instead of ca.example.com ) using the erollAdmin.js file from the Fabcar through the Node.js application ( by calling 'node enroll admin'). Could anyone explain the elements used for fabric-ca-client given below? fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite); And also about the this function and the arguments :- 'http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite represents.

dperritano (Thu, 25 Jan 2018 19:03:47 GMT):
Has joined the channel.

george.skrbic (Thu, 25 Jan 2018 20:38:47 GMT):
Has joined the channel.

rameshthoomu (Fri, 26 Jan 2018 03:10:55 GMT):
Hi @dave.enyeart @bretharrison

rameshthoomu (Fri, 26 Jan 2018 03:11:44 GMT):
Regarding this job failure https://jenkins.hyperledger.org/job/fabric-sdk-node8-verify-x86_64/305/console..

dave.enyeart (Fri, 26 Jan 2018 03:12:25 GMT):
from https://gerrit.hyperledger.org/r/#/c/17197/

dave.enyeart (Fri, 26 Jan 2018 03:12:25 GMT):
from https://gerrit.hyperledger.org/r/#/c/17197/ prepare fabric-sdk-node for 1.1.0-alpha

rameshthoomu (Fri, 26 Jan 2018 03:12:40 GMT):
I see the docker_image_tag is looking for the version specified here https://github.com/hyperledger/fabric-sdk-node/blob/6f7310ccda8648473d0f794e28c5b390ac030480/build/tasks/test.js#L30

rameshthoomu (Fri, 26 Jan 2018 03:13:15 GMT):
as we don't have 1.1.0-alpha images for thirdparty images (couchdb,.. ) build is failing

rameshthoomu (Fri, 26 Jan 2018 03:13:52 GMT):
@bretharrison, can we add one more variable in package.json like `thirdparty-tag = 0.4.5`

rameshthoomu (Fri, 26 Jan 2018 05:25:34 GMT):
@bretharrison patch has been submitted here https://gerrit.hyperledger.org/r/#/c/17239/

dave.enyeart (Fri, 26 Jan 2018 15:10:34 GMT):
merged

huy.tranibm (Fri, 26 Jan 2018 20:04:49 GMT):
Hello guys, I am trying to have a newly created registered and enroll user send transactions to the channel. When I call channel.initialize() i get this error ```Error: Failed to locate an MSP instance matching the endorser identity's orgainization MyOrgMSP``` I have tried to setup a MSPManager but the channel.setMSPManager(msp_manager) states that ```his utility method will not normally be use as the initialize() method will read this channel's current configuration and reset MSPManager with the MSP's found in the channel configuration. ```. Is there another way of setting up the MSPManager without having to deal with retrieving the config_envelope? Thank you

Amjadnz (Sat, 27 Jan 2018 07:20:53 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?

kamisdy (Mon, 29 Jan 2018 04:01:30 GMT):
Hello, I found upgrade chaincode by NODE SDK with endorsement policy, the new policy is not work

naveen_saravanan (Mon, 29 Jan 2018 04:18:50 GMT):
Can anyone explain the function of "reenroll" in the fabric-ca-client commands? And does reenroll-command can be used to change the revoked status in the certificates of the identity (e.g. user1) that was revoked using the revoke-command?

naveen_saravanan (Mon, 29 Jan 2018 04:18:50 GMT):
Can anyone explain the function of "reenroll" in the fabric-ca-client commands? And does reenroll-command can be used to change the revoked status in the certificates of an identity (e.g. user1) that was revoked using the revoke-command?

kamisdy (Mon, 29 Jan 2018 04:38:10 GMT):
Hello, I found upgrade chaincode by NODE SDK with endorsement policy, the new policy is not work. Does anyone know that?

naveen_saravanan (Mon, 29 Jan 2018 05:07:30 GMT):
Also is there any way to get serial and aki keys of the certificate of a registered user via sdk?

naveen_saravanan (Mon, 29 Jan 2018 05:07:30 GMT):
Also is there any way to get serial and aki keys of the certificate of a registered user via node-js sdk?

mna2016 (Mon, 29 Jan 2018 06:14:42 GMT):
Hi All, i have followed all the steps shown on "http://hyperledger-fabric.readthedocs.io/en/release/write_first_app.html" and now getting and error while trying to register "admin"

mna2016 (Mon, 29 Jan 2018 06:15:43 GMT):

Clipboard - January 29, 2018 11:45 AM

mna2016 (Mon, 29 Jan 2018 06:16:10 GMT):
I guess the error is because the CA is probably not getting touched(endpoint not reached) because of wrong IP/host.

mna2016 (Mon, 29 Jan 2018 06:16:21 GMT):
How do I fix this?

mna2016 (Mon, 29 Jan 2018 06:51:15 GMT):
$ node enrollAdmin.js Store path:C:\Users\IBM_ADMIN\fabric-samples\fabcar\hfc-key-store Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSE D 127.0.0.1:7054] at ClientRequest. (C:\Users\IBM_ADMIN\fabric-samples\fabcar\node_ modules\fabric-ca-client\lib\FabricCAClientImpl.js:711:12) at emitOne (events.js:115:13) at ClientRequest.emit (events.js:210:7) at Socket.socketErrorListener (_http_client.js:401:9) at emitOne (events.js:115:13) at Socket.emit (events.js:210:7) at emitErrorNT (internal/streams/destroy.js:64:8) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) Failed to enroll admin: Error: Failed to enroll admin

gdinhof (Mon, 29 Jan 2018 09:10:30 GMT):
Has left the channel.

javrevasandeep (Mon, 29 Jan 2018 10:20:18 GMT):
I am using fabric-samples/fabric-ca to generate certificates for peers and orderers. Now I want to use fabric-node-sdk to invoke and query the network. But as per fabric-samples/balance-transfer example, msp and tls path need to be given in network-config file. so how do i provide these paths for the peers and orderers certificates which are generated by fabric-ca, in network-config file

RobertDiebels (Mon, 29 Jan 2018 10:59:40 GMT):
Has joined the channel.

RobertDiebels (Mon, 29 Jan 2018 11:02:05 GMT):
Hey guys, I'm trying to configure `fabric-client` to output `logger.debug` calls using `setConfigSetting('hfc-logging', { 'error': 'console', 'debug': 'console', 'info': 'console' })` But I'm not getting any debug logging in the console. Any idea what I might be doing wrong?

RobertDiebels (Mon, 29 Jan 2018 11:02:05 GMT):
Hey guys, I'm trying to configure `fabric-client` to output `logger.debug` calls using ```setConfigSetting('hfc-logging', { 'error': 'console', 'debug': 'console', 'info': 'console' })``` But I'm not getting any debug logging in the console. Any idea what I might be doing wrong?

kapilAtrey (Mon, 29 Jan 2018 11:27:09 GMT):
Hi all, i was trying to add a new organisation using "client.updateChannel()" and was successful in adding the organisation but the problem is I only need signature of the admin of only 1 organisation so i wanted to know how to modify the channel update policy ... thanks

RobertDiebels (Mon, 29 Jan 2018 12:03:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2z3zfKnRuSbJoQcHY) I figured it out. `getLogger` in will always look for `global.hfc.config.logger` **first**. If it can find it it will use that logger and the settings it has. Just so happens that if you import `fabric-client` with `require('fabric-client')` it will ** always** create a `new Config()` and set it to `global.hfc.config` to a default if it cannot find any config. Same goes for the logger but it sets a default logger to `global.hfc.config.logger`. What this comes down to is that the order in which you `require('fabric-client')` has impact on whether `Client.setConfigSetting('hfc-logging')` does anything. To solve this issue: import the FabricUtils using 'require('fabric-client/lib/utils')' and call `FabricUtils.setConfigSetting('hfc-logging', {debug:'console'})` **before** you `FabricClient = require('fabric-client')`. Otherwise that import will set the default logger and overrule any new settings via `FabricClient.setConfigSetting('hfc-logging', {settings..})`. This is weird behaviour afaic and I'm filing a bug in the SDK to solve this either via clear documentation or implementation.

RobertDiebels (Mon, 29 Jan 2018 12:03:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2z3zfKnRuSbJoQcHY) I figured it out. `getLogger` will always look for `global.hfc.config.logger` **first**. If it can find `global.hfc.config.logger` it will use that logger and the settings it has. Just so happens that if you import `fabric-client` with `require('fabric-client')` it will ** always** create a `new Config()` and set it to `global.hfc.config` unless it has been set **before** the `require('fabric-client')` call. Same goes for the logger but it sets a default logger to `global.hfc.config.logger`. What this comes down to is that the order in which you set the configuration for the client and importing `FabricClient = require('fabric-client')` has impact on whether `FabricClient.setConfigSetting('hfc-logging')` does anything. To solve this issue: import the FabricUtils using 'FabricUtils = require('fabric-client/lib/utils')' and call `FabricUtils.setConfigSetting('hfc-logging', {debug:'console'})` **before** you import `FabricClient = require('fabric-client')`. Otherwise that import will set the default logger and overrule any new settings add through `FabricClient.setConfigSetting('hfc-logging', {settings..})`. This is weird behaviour afaic and I'm filing a bug in the SDK to solve this either via clear documentation or implementation.

RobertDiebels (Mon, 29 Jan 2018 12:03:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2z3zfKnRuSbJoQcHY) I figured it out. `getLogger` will always look for `global.hfc.config.logger` **first**. If it can find `global.hfc.config.logger` it will use that logger and the settings it has. Just so happens that if you import `fabric-client` with `require('fabric-client')` it will ** always** create a `new Config()` and set it to `global.hfc.config` unless it has been set **before** the `require('fabric-client')` call. Same goes for the logger but it sets a default logger to `global.hfc.config.logger`. What this comes down to is that the order in which you set the configuration for the client and importing `FabricClient = require('fabric-client')` has impact on whether `FabricClient.setConfigSetting('hfc-logging')` does anything. To solve this issue: import the FabricUtils using 'FabricUtils = require('fabric-client/lib/utils')' and call `FabricUtils.setConfigSetting('hfc-logging', {debug:'console'})` **before** you import `FabricClient = require('fabric-client')`. Otherwise that import will set the default logger and overrule any new settings add through `FabricClient.setConfigSetting('hfc-logging', {settings..})`. This is weird behaviour afaic and I'm filing a bug in the SDK to solve this either via clear documentation or implementation. EDIT: Issue filed https://jira.hyperledger.org/browse/FAB-7944

MarcoReitano (Mon, 29 Jan 2018 12:36:59 GMT):
maybe this is a dumb question: Does fabric + fabric-sdk currently support AND(org1.member, org2.member) policies? online searching this gets pretty confusing results

MarcoReitano (Mon, 29 Jan 2018 12:37:13 GMT):
fabric-sdk-node i mean

kapilAtrey (Mon, 29 Jan 2018 12:41:14 GMT):
@MarcoReitano watch this https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/e2e/e2eUtils.js#L445

MarcoReitano (Mon, 29 Jan 2018 12:43:42 GMT):
@kapilAtrey this is for chaincode proposals, correct? im interested in endorsment policies for transactions, which is different from that, is this correct?

kapilAtrey (Mon, 29 Jan 2018 12:51:26 GMT):
@MarcoReitano look the endorsement policy i am providing during chaincode instantiation is not for instantiation they are for invoke , any invoke from now after the chaincode instantiation will follow this endorsement policy for invoke

robinrob (Mon, 29 Jan 2018 14:44:39 GMT):
Has joined the channel.

javrevasandeep (Mon, 29 Jan 2018 16:31:41 GMT):
can anyone pls help me with fabric-samples/fabric-ca example. II run this example as stated by running start.sh script. Now further I want to run invoke and query using fabric-node-sdk for the same network. what changes i need to make in node-sdk network-config.yaml file

andela-aonifade (Mon, 29 Jan 2018 17:33:10 GMT):
Has joined the channel.

Brucepark (Tue, 30 Jan 2018 07:03:47 GMT):
When I try to enroll admin to `https://msp1ca.xxx.com:9054`, I get error below. ``` Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140735991780160:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2520: 140735991780160:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3550: ] … Failed to enroll admin: Error: Failed to enroll admin ``` My node source code is below. ``` var certPath = 'cacert.pem'; var certContents = fs.readFileSync(certPath, 'utf8'); var tlsOptions = { trustedRoots: [certContents], verify: true }; fabric_ca_client = new Fabric_CA_Client('https://msp1ca.xxx.com:9054', tlsOptions , 'msp1ca.xxx.com', crypto_suite); ``` I don’t know what is the problem. When I use fabric-ca-client instead of node-sdk, it works well. (at least it passes tls handshaking) When I change fabric-ca-server to http mode and try to connect http, it works well also.

Brucepark (Tue, 30 Jan 2018 07:03:47 GMT):
When I try to enroll admin to `https://msp1ca.xxx.com:9054`, I get error below. ``` Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140735991780160:error:1411713E:SSL routines:ssl_check_srvr_ecc_cert_and_alg:ecc cert not for signing:../deps/openssl/openssl/ssl/ssl_lib.c:2520: 140735991780160:error:14082130:SSL routines:ssl3_check_cert_and_algorithm:bad ecc cert:../deps/openssl/openssl/ssl/s3_clnt.c:3550: ] … Failed to enroll admin: Error: Failed to enroll admin ``` My node source code is below. ``` var certPath = 'cacert.pem'; var certContents = fs.readFileSync(certPath, 'utf8'); var tlsOptions = { trustedRoots: [certContents], verify: true }; fabric_ca_client = new Fabric_CA_Client('https://msp1ca.xxx.com:9054', tlsOptions , 'msp1ca.xxx.com', crypto_suite); ``` I don’t know what is the problem. When I use *fabric-ca-client* instead of *node-sdk*, it works well. (at least it passes tls handshaking) When I change *fabric-ca-server* to *http mode* and try to connect http, it works well also.

MadhavaReddy (Tue, 30 Jan 2018 08:02:03 GMT):
Hi All, am trying to run balance transfer example and using node sdk, when i try to enroll user its failing with below error, can you please help to fix the issues {"success":false,"message":"failed Error: fabric-ca request register failed with errors [[{\"code\":0,\"message\":\"No identity type provided. Please provide identity type\"}]]"}

javrevasandeep (Tue, 30 Jan 2018 10:03:41 GMT):
Hi guys

javrevasandeep (Tue, 30 Jan 2018 10:04:03 GMT):
anyone has implemented code for registerChaincodeEvent(ccid, eventname, onEvent, onError)

Lavanya5896 (Tue, 30 Jan 2018 12:16:49 GMT):

Screenshot from 2018-01-30 17-39-24.png

Vadim (Tue, 30 Jan 2018 12:19:29 GMT):
yes

MadhavaReddy (Tue, 30 Jan 2018 13:32:36 GMT):
Hi All, am trying to run balance transfer example and using node sdk, when i try to enroll user its failing with below error, can you please help to fix the issues {"success":false,"message":"failed Error: fabric-ca request register failed with errors [[{\"code\":0,\"message\":\"No identity type provided. Please provide identity type\"}]]"}

sashico (Tue, 30 Jan 2018 14:34:02 GMT):
Has joined the channel.

javrevasandeep (Tue, 30 Jan 2018 16:21:30 GMT):
@Vadim could you please share code for registerChaincodeEvent(ccid, eventname, onEvent, onError) if you have. I have a chaincode which have events on every invoke.

MadhavaReddy (Tue, 30 Jan 2018 19:15:31 GMT):
hello All, when i try to join peer to channel am getting below error ( using node sdk ) can u please help me to fix the issue [2018-01-30 19:12:05.394] [ERROR] Join-Channel - Problem setting up the event hub :Error: event message validation failed: [event timestamp out of acceptable range. must be within 0s above/below peer time] [2018-01-30 19:12:05.400] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2018-01-30 19:12:05.401] [ERROR] Join-Channel - Error: Problem setting up the event hub :Error: event message validation failed: [event timestamp out of acceptable range. must be within 0s above/below peer time] at eh.registerBlockEvent (/home/ubuntu/work/src/github.com/hyperledger/fabric-samples/balance-transfer/app/join-channel.js:85:13) at closer (/home/ubuntu/work/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/EventHub.js:435:5) at EventHub._closeAllCallbacks (/home/ubuntu/work/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/EventHub.js:440:3) at EventHub._disconnect (/home/ubuntu/work/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/EventHub.js:385:8) at ClientDuplexStream. (/home/ubuntu/work/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/fabric-client/lib/EventHub.js:356:10) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/work/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:258:12) at ClientDuplexStream._receiveStatus (/home/ubuntu/work/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:233:8) at /home/ubuntu/work/src/github.com/hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:757:12

dockeryounger (Wed, 31 Jan 2018 01:34:01 GMT):
Has joined the channel.

labcoinpoc (Wed, 31 Jan 2018 02:32:28 GMT):
Hi All, please let me know how to add TLS support to https://github.com/hyperledger/fabric-samples/blob/release/fabcar/enrollAdmin.js

labcoinpoc (Wed, 31 Jan 2018 02:32:28 GMT):
Hi All, please let me know how to add TLS support to https://github.com/hyperledger/fabric-samples/blob/release/fabcar/enrollAdmin.js . I change http to https ,but where should I pass the cert and whitch cert should I use? thanks.

Taffies (Wed, 31 Jan 2018 03:07:08 GMT):
Has joined the channel.

Taffies (Wed, 31 Jan 2018 03:38:31 GMT):
Hi! I just got started figuring out the fabric sdk for node but I noticed there's npm install hfc and npm install fabric-client? What's the difference between both of them - are they the equivalent of each other or do I need both?

javrevasandeep (Wed, 31 Jan 2018 07:47:53 GMT):
hi guys i am getting the error error: [Peer.js]: sendProposal - timed out after:45000

javrevasandeep (Wed, 31 Jan 2018 07:48:11 GMT):
while doing invokation after instantiation

javrevasandeep (Wed, 31 Jan 2018 07:48:59 GMT):
i have observed that this error is always going away if i try to invoke second time

javrevasandeep (Wed, 31 Jan 2018 07:49:21 GMT):
but first time invokation just after instantiation gives this error

jrosmith (Wed, 31 Jan 2018 14:13:47 GMT):
@Taffies hfc refers to the node sdk for v0.6.5, fabric-client refers to 1.X releases

MadhavaReddy (Wed, 31 Jan 2018 17:54:56 GMT):
Hi All, is there any node sdk method available to get the latest block number for a given channel

tanmoy (Wed, 31 Jan 2018 18:45:32 GMT):
Has joined the channel.

huy.tranibm (Wed, 31 Jan 2018 20:37:08 GMT):
@MadhavaReddy when you do channel.initialize(), it takes the latest block, you should be able to breakdown the channel from there

RocMax (Wed, 31 Jan 2018 23:48:55 GMT):
Has joined the channel.

frankz (Thu, 01 Feb 2018 03:12:13 GMT):
Has joined the channel.

MadhavaReddy (Thu, 01 Feb 2018 06:59:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FmwkzYRxZ7Ev9ShRP) @huy.tranibm Thank you will try

siddesh_sangodkar (Thu, 01 Feb 2018 07:01:37 GMT):
Has joined the channel.

siddesh_sangodkar (Thu, 01 Feb 2018 07:05:42 GMT):
Is it possible to directly Browserify the Node SDK so that transactions can be sent by the clients from browser or a Hybrid android app??

siddesh_sangodkar (Thu, 01 Feb 2018 07:06:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=doKp9jC7qosiia4gW) If No. Is there a proposal for the same?

RezwanKabir (Thu, 01 Feb 2018 07:22:13 GMT):
I want to write blockchain data using kubernetes. Data writing part may be delay. Is there anyway to confirm that data has been written in blockchain? Is there any event handler that callback after the block has been written .

javrevasandeep (Thu, 01 Feb 2018 07:24:48 GMT):
has anyone tried using chaincode events through node-sdk

javrevasandeep (Thu, 01 Feb 2018 07:25:29 GMT):
I am getting error invoke-chaincode - Timeout - Failed to receive the chaincode event while trying to subscribr for chaincode events through node-sdk API registerChaincodeEvent

javrevasandeep (Thu, 01 Feb 2018 08:39:45 GMT):
I am trying to use custom chaincode events in hyperledger fabric through nodesdk API registerChaincodeEvent(ccid, eventname, onEvent, onError). I am getting the error Timeout-Failed to receive the chaincode event. However registerTxEvent(txid, onEvent, onError) is working fine but i need to listen to some custom chaincode events. I am attaching chaincode function which emit events and invokechaincode.js, logs and network-config.yaml file. invokechaincode.js - https://hastebin.com/izozunocir.js chaincode function - https://hastebin.com/ajerilutoh.go logs - https://hastebin.com/dufaqaleni.vbs network-config.yaml - https://hastebin.com/tagotubuho.php

MasthanbeeShaik (Thu, 01 Feb 2018 19:00:26 GMT):
Has joined the channel.

MasthanbeeShaik (Thu, 01 Feb 2018 19:00:46 GMT):
Hello Everyone, trying to create a hyperledger blockchain network. When running the command "npm run create-channel" to create a channel getting the following issue. Please help me out on this. root@miracle:~/hyperledger-fabric-example# npm run create-channel > hyperledger-fabric-example@0.1.0 create-channel /root/hyperledger-fabric-example > ts-node src/create-channel.ts Setting up the cryptoSuite .. Setting up the keyvalue store .. Creating the admin user context .. Reading the envelope from manually created channel transaction .. Extracting the channel configuration .. Signing the extracted channel configuration .. Sending the request to create the channel .. error: [Orderer.js]: sendBroadcast - reject with BAD_REQUEST (node:13366) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: BAD_REQUEST root@miracle:~/hyperledger-fabric-example#

MasthanbeeShaik (Thu, 01 Feb 2018 19:01:28 GMT):

error.png

bm (Fri, 02 Feb 2018 05:20:50 GMT):
Has joined the channel.

bm (Fri, 02 Feb 2018 09:04:20 GMT):
Hi, I'm not sure if this would be the right place for this query but would appreciate any pointers. i am running a test application built around tuna catches where I can see using the node js queryByChaincode a particular transaction details are being retrieved. https://github.com/hyperledger/education/blob/6b432830486c31f992267799248fa5210a37b1a8/LFS171x/fabric-material/tuna-app/src/queryTuna.js I am trying to figure out how can one retrieve all the historical changes (support changes of owner of tuna for a particular catch)

Vadim (Fri, 02 Feb 2018 09:05:16 GMT):
@bm stub.GetHistoryForKey()

Vadim (Fri, 02 Feb 2018 09:05:36 GMT):
it needs to be done in chaincode first

bm (Fri, 02 Feb 2018 09:06:13 GMT):
Thank you @Vadim

bm (Fri, 02 Feb 2018 09:06:47 GMT):
Let me check. Any chance you have link to any sample app /test app code?

Vadim (Fri, 02 Feb 2018 09:08:20 GMT):
no link, but it's really just stub.GetHistoryForKey('key name') and you will get an iterator over the history. You can then copy it to some array, marshal it to json and send it to your app

Vadim (Fri, 02 Feb 2018 09:08:43 GMT):
same as for ranged queries

bm (Fri, 02 Feb 2018 09:12:33 GMT):
ok. Thanks a lot :-)

varun-raj (Fri, 02 Feb 2018 13:39:37 GMT):
Has joined the channel.

varun-raj (Fri, 02 Feb 2018 13:40:49 GMT):
Hi can someone tell me which function to use to authenticate a user with certificate and private key?

kai.nacke (Fri, 02 Feb 2018 13:44:21 GMT):
Has joined the channel.

kai.nacke (Fri, 02 Feb 2018 13:47:35 GMT):
Hi! I am trying to update a demo application from 1.0 to 1.10-alpha. On the client side I get the error ``` error TS2339: Property 'loadUserFromStateStore' does not exist on type 'Client'.

kai.nacke (Fri, 02 Feb 2018 13:47:35 GMT):
Hi! I am trying to update a demo application from 1.0 to 1.1.0-alpha. On the client side I get the error ``` error TS2339: Property 'loadUserFromStateStore' does not exist on type 'Client'.

kai.nacke (Fri, 02 Feb 2018 13:49:32 GMT):
The method is in `lib/Client.js` but not in `index.d.ts` in the fabric client. Is this a bug with the typings?

Amjadnz (Sun, 04 Feb 2018 07:40:52 GMT):
Can someone help here? ```info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.dfm.ubn.ae","grpc.default_authority":"peer0.dfm.ubn.ae"} error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err MSP DfmMSP is unknown at new createStatusError (/tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:65:15) at /tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:568:15 ```

Amjadnz (Sun, 04 Feb 2018 07:41:03 GMT):
This is when I'm calling instantiate-chaincode.js

Amjadnz (Sun, 04 Feb 2018 07:41:32 GMT):
The IDENTITY of MSP is all set in config.json, docker.yaml, configtx.yaml

Amjadnz (Sun, 04 Feb 2018 07:46:10 GMT):
and I could see the coming in the logs of orderer and peer0.dfm.ubn.ae

Amjadnz (Sun, 04 Feb 2018 07:46:10 GMT):
and I could see that showing in the logs of orderer and peer0.dfm.ubn.ae

wangdong (Sun, 04 Feb 2018 11:38:12 GMT):
emm, this info is not enough. code or more logs?@Amjadnz

Amjadnz (Sun, 04 Feb 2018 14:17:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xXzDibPgNE6K7BuDS) @wangdong - what I figured out is the nodesdk uses the core.yaml, orderer.yaml and configtx.yaml at the root to start the network - is this understanding correct? Based on that - I checked and found - I had a different MSP as my peer MSP on NodeSDK core.yaml file that what I have for utils.js (in core.yaml file it is AdxMSP and in utils.js this was marked as DfmMSP). Which I corrected. running another round of tests now.

Amjadnz (Sun, 04 Feb 2018 14:17:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xXzDibPgNE6K7BuDS) @wangdong - thanks I would provide them now - what I figured out is the nodesdk uses the core.yaml, orderer.yaml and configtx.yaml at the root to start the network - is this understanding correct? Based on that - I checked and found - I had a different MSP as my peer MSP on NodeSDK core.yaml file that what I have for utils.js (in core.yaml file it is AdxMSP and in utils.js this was marked as DfmMSP). Which I corrected. running another round of tests now.

Amjadnz (Sun, 04 Feb 2018 14:26:04 GMT):
`node ./test/integration/e2e/create-channel.js` All Success. `node ./test/integration/e2e/join-channel.js` All Success. `node ./test/integration/e2e/install-chaincode.js`

Amjadnz (Sun, 04 Feb 2018 14:26:04 GMT):
`node ./test/integration/e2e/create-channel.js` All Success. `node ./test/integration/e2e/join-channel.js` All Success. `node ./test/integration/e2e/install-chaincode.js` All Success `./test/integration/e2e/instantiate-chaincode.js`

Amjadnz (Sun, 04 Feb 2018 14:26:04 GMT):
`node ./test/integration/e2e/create-channel.js` All Success. `node ./test/integration/e2e/join-channel.js` All Success. `node ./test/integration/e2e/install-chaincode.js` All Success `./test/integration/e2e/instantiate-chaincode.js` Have the following issue first ```info: [EventHub.js]: _connect - options {"grpc.ssl_target_name_override":"peer0.sca.ubn.ae","grpc.default_authority":"peer0.sca.ubn.ae"} info: [ubn-network]: orglist:: id=ScaMSP, id=OnlineMSP, id=GovtMSP, id=DfmMSP, id=AdxMSP error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err MSP ScaMSP is unknown at new createStatusError (/tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:65:15) at /tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:568:15```

Amjadnz (Sun, 04 Feb 2018 14:27:29 GMT):
In the peer log (common log for docker.yaml file). ```peer0.dfm.ubn.ae | 2018-02-04 14:24:07.116 UTC [chaincode-platform] generateDockerfile -> DEBU 3e3 peer0.dfm.ubn.ae | FROM hyperledger/fabric-baseos:x86_64-0.3.2 peer0.dfm.ubn.ae | ADD binpackage.tar /usr/local/bin peer0.dfm.ubn.ae | LABEL org.hyperledger.fabric.chaincode.id.name="agm-eg-cc2" \ peer0.dfm.ubn.ae | org.hyperledger.fabric.chaincode.id.version="v0" \ peer0.dfm.ubn.ae | org.hyperledger.fabric.chaincode.type="GOLANG" \ peer0.dfm.ubn.ae | org.hyperledger.fabric.version="1.0.3" \ peer0.dfm.ubn.ae | org.hyperledger.fabric.base.version="0.3.2" peer0.dfm.ubn.ae | ENV CORE_CHAINCODE_BUILDLEVEL=1.0.3 peer0.dfm.ubn.ae | ENV CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt peer0.dfm.ubn.ae | COPY peer.crt /etc/hyperledger/fabric/peer.crt peer0.dfm.ubn.ae | 2018-02-04 14:24:07.119 UTC [util] DockerBuild -> DEBU 3e4 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.3```

Amjadnz (Sun, 04 Feb 2018 14:28:45 GMT):
the wait continues till 7 minutes (I increased the timeout to 60 mins) - but still after 7 mins the following logs appears.

Amjadnz (Sun, 04 Feb 2018 14:28:45 GMT):
the wait continues till 7 minutes (I increased the timeout to 60 mins) - but still after 7 mins the following logs appears. ```couchdb_6926 | [os_mon] memory supervisor port (memsup): Erlang has closed peer0.adx.ubn.ae | 2018-02-04 14:29:29.216 UTC [deliveryClient] Disconnect -> DEBU 3f1 Entering peer1.adx.ubn.ae | 2018-02-04 14:29:29.484 UTC [deliveryClient] Disconnect -> DEBU 388 Entering peer0.online.ubn.ae | 2018-02-04 14:30:18.757 UTC [deliveryClient] Disconnect -> DEBU 3e5 Entering peer0.online.ubn.ae | 2018-02-04 14:30:18.760 UTC [deliveryClient] Disconnect -> DEBU 3e6 Exiting peer0.online.ubn.ae | 2018-02-04 14:30:18.760 UTC [deliveryClient] try -> WARN 3e7 Got error: rpc error: code = Internal desc = transport is closing at 1 attempt. Ceasing to retry peer0.online.ubn.ae | 2018-02-04 14:30:18.769 UTC [blocksProvider] DeliverBlocks -> WARN 3e8 [agm-channel] Receive error: Attempts (1) or elapsed time (8m6.089179324s) exhausted```

Amjadnz (Sun, 04 Feb 2018 14:29:54 GMT):
Meanwhile in the orderer I have the following logs (confirming that orderer is not the part of this issue) ```2018-02-04 14:24:06.870 UTC [msp] SatisfiesPrincipal -> DEBU 1171 Checking if identity satisfies MEMBER role for ScaMSP 2018-02-04 14:24:06.870 UTC [msp] Validate -> DEBU 1172 MSP ScaMSP validating identity 2018-02-04 14:24:06.871 UTC [cauthdsl] func2 -> DEBU 1173 0xc42015a2a8 principal matched by identity 0 2018-02-04 14:24:06.871 UTC [msp/identity] Verify -> DEBU 1174 Verify: digest = 00000000 36 30 1d 7d 92 b0 f9 46 13 70 2c 07 51 b0 2c c8 |60.}...F.p,.Q.,.| 00000010 39 b3 89 02 ca 3b c7 21 1a ca 4d 93 d2 20 b9 5c |9....;.!..M.. .\| 2018-02-04 14:24:06.871 UTC [msp/identity] Verify -> DEBU 1175 Verify: sig = 00000000 30 44 02 20 53 2b b2 fc 86 22 06 c5 54 97 0e e9 |0D. S+..."..T...| 00000010 8f a9 68 d0 8d 2d 63 f9 15 e0 76 7b f4 6e 3f d7 |..h..-c...v{.n?.| 00000020 41 29 28 f8 02 20 2e 97 0b 6c c9 07 ef 03 ae 26 |A)(.. ...l.....&| 00000030 b4 92 cd 63 d6 92 0a 2b 08 18 5d 75 d2 5f 60 c9 |...c...+..]u._`.| 00000040 a1 8b 88 0f d2 55 |.....U| 2018-02-04 14:24:06.871 UTC [cauthdsl] func2 -> DEBU 1176 0xc42015a2a8 principal evaluation succeeds for identity 0 2018-02-04 14:24:06.871 UTC [cauthdsl] func1 -> DEBU 1177 0xc42015a2a8 gate 1517754246869706256 evaluation succeeds 2018-02-04 14:24:06.872 UTC [orderer/common/sigfilter] Apply -> DEBU 1178 Forwarding validly signed message for policy &{%!s(*common.ImplicitMetaPolicy=&{Readers 0}) %!s(int=1) [%!s(*policies.implicitMetaPolicy=&{0xc420bea3c0 1 [0xc42016b300 0xc42016b3c0 0xc42016b408 0xc42016b4f0 0xc42016b588]}) %!s(*policies.implicitMetaPolicy=&{0xc420bebdc0 1 [0xc42016b628]})]} 2018-02-04 14:24:06.872 UTC [orderer/common/deliver] Handle -> DEBU 1179 [channel: agm-channel] Received seekInfo (0xc420b267e0) start: > stop: > 2018-02-04 14:24:06.872 UTC [fsblkstorage] retrieveBlockByNumber -> DEBU 117a retrieveBlockByNumber() - blockNum = [0] 2018-02-04 14:24:06.872 UTC [fsblkstorage] newBlockfileStream -> DEBU 117b newBlockfileStream(): filePath=[/var/hyperledger/production/orderer/chains/agm-channel/blockfile_000000], startOffset=[0] 2018-02-04 14:24:06.873 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 117c Remaining bytes=[63082], Going to peek [8] bytes 2018-02-04 14:24:06.873 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 117d Returning blockbytes - length=[63079], placementInfo={fileNum=[0], startOffset=[0], bytesOffset=[3]} 2018-02-04 14:24:06.874 UTC [orderer/common/deliver] Handle -> DEBU 117e [channel: agm-channel] Delivering block for (0xc420b267e0) 2018-02-04 14:24:06.875 UTC [orderer/common/deliver] Handle -> DEBU 117f [channel: agm-channel] Done delivering for (0xc420b267e0), waiting for new SeekInfo 2018-02-04 14:24:06.875 UTC [orderer/common/deliver] Handle -> DEBU 1180 Attempting to read seek info message 2018-02-04 14:24:06.877 UTC [orderer/common/deliver] Handle -> DEBU 1181 Received EOF, hangup 2018-02-04 14:24:06.878 UTC [orderer/main] func1 -> DEBU 1182 Closing Deliver stream ```

Amjadnz (Sun, 04 Feb 2018 14:34:02 GMT):
And finally after 8 minutes I get this in the command sheel where I invoke the node command. ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "go build github.com/example_cc: /opt/go/pkg/tool/linux_amd64/link: signal: killed " at new createStatusError (/tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:65:15) at /tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:568:15```

Amjadnz (Sun, 04 Feb 2018 14:34:02 GMT):
And finally after 8 minutes I get this in the command shell where I invoke the node command. ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "go build github.com/example_cc: /opt/go/pkg/tool/linux_amd64/link: signal: killed " at new createStatusError (/tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:65:15) at /tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:568:15```

Amjadnz (Sun, 04 Feb 2018 15:33:10 GMT):
The issue is now resolved. The key was to change the core.yaml to point to the right MSPID and correct crypto materials. This FILE apparently is the identity file for the NODE SDK client (to identify which peer is running). Also I had to reduce the number of ORGS/NODES/CA/COUCHDB instances to make it work.

Amjadnz (Sun, 04 Feb 2018 17:41:04 GMT):
anyone has come accross this while initializing the chaincode? `2018-02-04 17:40:01.769 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to read file content : open : no such file or directory`

ajithjosek (Sun, 04 Feb 2018 20:26:46 GMT):
Has joined the channel.

JayJong (Mon, 05 Feb 2018 04:48:00 GMT):
Hi, I got this error when i invoke using the invoke.js file in fabcar. Failed to invoke successfully :: Error: There was a problem with the eventhub ::Error: 14 UNAVAILABLE: Connect Failed The default port for the event hub in the fabcar example is 7053. I am currently deploying my fabric on kubernetes. My peer0org1 maps 7051:30001 and 7052:30002. I tried setting to either of these ports but it still didnt work. What should i set my port to?

JayJong (Mon, 05 Feb 2018 04:48:00 GMT):
Hi, I got this error when i invoke using the invoke.js file in fabcar. '''Failed to invoke successfully :: Error: There was a problem with the eventhub ::Error: 14 UNAVAILABLE: Connect Failed''' The default port for the event hub in the fabcar example is 7053. I am currently deploying my fabric on kubernetes. My peer0org1 maps 7051:30001 and 7052:30002. I tried setting to either of these ports but it still didnt work. What should i set my port to?

JayJong (Mon, 05 Feb 2018 04:48:00 GMT):
Hi, I got this error when i invoke using the invoke.js file in fabcar. ```Failed to invoke successfully :: Error: There was a problem with the eventhub ::Error: 14 UNAVAILABLE: Connect Failed``` The default port for the event hub in the fabcar example is 7053. I am currently deploying my fabric on kubernetes. My peer0org1 maps 7051:30001 and 7052:30002. I tried setting to either of these ports but it still didnt work. What should i set my port to?

damodaranp (Mon, 05 Feb 2018 10:09:17 GMT):
Has joined the channel.

erzeghi (Mon, 05 Feb 2018 13:49:13 GMT):
Has joined the channel.

naveen_saravanan (Tue, 06 Feb 2018 04:15:56 GMT):
I tried to run the fabcar's query.js on similar fabric-samples (liker fabric-starter). I successfully ran enrollAdmin.js and registerUser.js on it. But while I run the query.js I get the below log: Store path:/home/hd/fabric-starter-patient/hfc-key-store Successfully loaded user1 from persistence error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Stream removed at /home/hd/fabric-starter-patient/node_modules/grpc/src/client.js:554:15 Query has completed, checking results Response is Error: Stream removed error from query = { Error: Stream removed at /home/hd/fabric-starter-patient/node_modules/grpc/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } } Can anyone please point out the problem here?

shailaja.mahara (Tue, 06 Feb 2018 08:11:56 GMT):
Has joined the channel.

shailaja.mahara (Tue, 06 Feb 2018 08:13:08 GMT):
hi everyone I'm trying to run your first network by following the hyperledger fabric docs while i run the query fabric_client.getUserContext('user1', true); it throws the following error -bash: syntax error near unexpected token `'user1',' I'd be grateful if anyone could help me out thanks in advance

laszlom (Tue, 06 Feb 2018 10:19:47 GMT):
Has joined the channel.

akshay.lawange (Tue, 06 Feb 2018 12:32:19 GMT):
```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err MSP Org1MSP is unknown at new createStatusError (/home/firstnetwork/node_modules/fabric-client/node_modules/grpc/src/client.js:65:15) at /home/firstnetwork/node_modules/fabric-client/node_modules/grpc/src/client.js:568:15 [2018-02-06 07:37:31.016] [ERROR] invoke-chaincode - transaction proposal was bad [2018-02-06 07:37:31.016] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2018-02-06 07:37:31.017] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined```

akshay.lawange (Tue, 06 Feb 2018 12:32:37 GMT):
Hi,

akshay.lawange (Tue, 06 Feb 2018 12:38:01 GMT):
We are facing the error of unknown MSP while invoking a function. We have checked everything including crypto-config path, key-value store clearance and secret key updation in network-config.json. And we are using fabric-sdk version 1.1.0-preview. Can anyone help?

akshay.lawange (Tue, 06 Feb 2018 12:38:38 GMT):
```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err MSP Org1MSP is unknown at new createStatusError (/home/user1/firstnetwork/node_modules/fabric-client/node_modules/grpc/src/client.js:65:15) at /home/user1/firstnetwork/node_modules/fabric-client/node_modules/grpc/src/client.js:568:15 [2018-02-06 07:37:31.016] [ERROR] invoke-chaincode - transaction proposal was bad [2018-02-06 07:37:31.016] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... [2018-02-06 07:37:31.017] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined```

wangdong (Tue, 06 Feb 2018 15:21:34 GMT):
@akshay.lawange what action you doing? Join channel? or install chaincode or something else?

akshay.lawange (Tue, 06 Feb 2018 15:26:59 GMT):
@wangdong got solved..i forgot to install the peer on chaincode..so got this error. Thanks.

wangdong (Tue, 06 Feb 2018 15:27:56 GMT):
@akshay.lawange welcome. I got this error before. So I may have some to help.

wangdong (Tue, 06 Feb 2018 15:28:46 GMT):
sometimes it is tricky.

akshay.lawange (Tue, 06 Feb 2018 15:29:07 GMT):
yeah..it got almost solved..i just restarted the network.it will work now i hope.

akshay.lawange (Tue, 06 Feb 2018 15:29:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=g9CDqFG4BXAR4gJrZ) @wangdong

akshay.lawange (Tue, 06 Feb 2018 15:30:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=g9CDqFG4BXAR4gJrZ) @wangdong yeah..it got almost solved..i just restarted the network.it should work now i hope.

rjones (Tue, 06 Feb 2018 19:03:26 GMT):
@jyellick : ```not ok 777 Failed. Error: CKR_SIGNATURE_LEN_RANGE:193 at Error (native) C_Verify:832 --- operator: fail at: process._tickDomainCallback (internal/process/next_tick.js:228:7) stack: |- Error: Failed. Error: CKR_SIGNATURE_LEN_RANGE:193 at Error (native) C_Verify:832 at Test.assert [as _assert] (/w/workspace/fabric-sdk-node8-verify-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:212:54) at Test.bound [as _assert] (/w/workspace/fabric-sdk-node8-verify-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:64:32) at Test.fail (/w/workspace/fabric-sdk-node8-verify-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:277:10) at Test.bound [as fail] (/w/workspace/fabric-sdk-node8-verify-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/tape/lib/test.js:64:32) at /w/workspace/fabric-sdk-node8-verify-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/test/unit/pkcs11.js:271:5 at at process._tickDomainCallback (internal/process/next_tick.js:228:7) ... # ```

rjones (Tue, 06 Feb 2018 19:04:32 GMT):
```> pkcs11js@1.0.13 install /w/workspace/fabric-sdk-node8-verify-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/pkcs11js > node-gyp rebuild make: Entering directory '/w/workspace/fabric-sdk-node8-verify-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/pkcs11js/build' CXX(target) Release/obj.target/pkcs11/src/main.o CXX(target) Release/obj.target/pkcs11/src/dl.o CXX(target) Release/obj.target/pkcs11/src/const.o CXX(target) Release/obj.target/pkcs11/src/pkcs11/error.o CXX(target) Release/obj.target/pkcs11/src/pkcs11/v8_convert.o CXX(target) Release/obj.target/pkcs11/src/pkcs11/template.o CXX(target) Release/obj.target/pkcs11/src/pkcs11/mech.o ../src/pkcs11/mech.cpp: In member function ‘void Mechanism::Free()’: ../src/pkcs11/mech.cpp:121:15: warning: deleting ‘void*’ is undefined [-Wdelete-incomplete] delete(param); ^ CXX(target) Release/obj.target/pkcs11/src/pkcs11/param.o CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_aes.o CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_rsa.o CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_ecdh.o CXX(target) Release/obj.target/pkcs11/src/pkcs11/pkcs11.o CXX(target) Release/obj.target/pkcs11/src/async.o CXX(target) Release/obj.target/pkcs11/src/node.o SOLINK_MODULE(target) Release/obj.target/pkcs11.node COPY Release/pkcs11.node make: Leaving directory '/w/workspace/fabric-sdk-node8-verify-x86_64/gopath/src/github.com/hyperledger/fabric-sdk-node/node_modules/pkcs11js/build' ```

rjones (Tue, 06 Feb 2018 19:06:05 GMT):
WRT: https://gerrit.hyperledger.org/r/#/c/17591/

cca88 (Tue, 06 Feb 2018 20:01:47 GMT):
Has joined the channel.

keyur (Wed, 07 Feb 2018 05:40:21 GMT):
Has joined the channel.

purandam (Wed, 07 Feb 2018 10:47:02 GMT):
Has joined the channel.

purandam (Wed, 07 Feb 2018 10:51:27 GMT):
In hyperledger website I have not seen any document for chain code of Node development. Is there any good tutorial for Node- chain code?

mastersingh24 (Wed, 07 Feb 2018 12:00:17 GMT):
@purandam - it's pretty straightforward - did you take a look at https://fabric-shim.github.io/ ?

purandam (Wed, 07 Feb 2018 12:06:39 GMT):
I have seen this but how to deploy & test the chain code

mastersingh24 (Wed, 07 Feb 2018 12:27:23 GMT):
https://github.com/hyperledger/fabric-chaincode-node

mastersingh24 (Wed, 07 Feb 2018 12:27:54 GMT):
The README walks through the process of testing in dev mode as well as deploying to a running network

purandam (Wed, 07 Feb 2018 12:30:28 GMT):
Thanks...

kenmazsyma (Wed, 07 Feb 2018 15:09:59 GMT):
Hi all, Is there any way to get list of peers joined to channel using node-sdk ?

wangdong (Wed, 07 Feb 2018 15:11:27 GMT):
There is no one function to that. But command line can do that @kenmazsyma

kenmazsyma (Wed, 07 Feb 2018 15:15:55 GMT):
@wangdong Do you mean “peer channel” command ?

wangdong (Wed, 07 Feb 2018 15:16:14 GMT):
yes

wangdong (Wed, 07 Feb 2018 15:17:29 GMT):
Ah, I forgot it. It can get the channels a peer joined.

kenmazsyma (Wed, 07 Feb 2018 15:26:25 GMT):
@wangdong Yes...It seems to not exist. Thank you for your advice.

wangdong (Wed, 07 Feb 2018 15:30:22 GMT):
@kenmazsyma what is the use case

kenmazsyma (Wed, 07 Feb 2018 15:41:55 GMT):
@wangdong ah.. I just want to know. It might be unnecessary...

rameshthoomu (Wed, 07 Feb 2018 18:28:22 GMT):
have added new comments to trigger specific builds from fabric-sdk-node reverify-node8x reverify-node8z

rameshthoomu (Wed, 07 Feb 2018 18:31:42 GMT):
added below new labels to trigger specific failed builds in fabric-sdk-node (Triggers node8 jobs on x and z platforms) `reverify-node8x` `reverify-node8z` (Triggers node6 jobs on x and z platforms) `reverify-node6x` `reverify-node6z` Use `reverify` to trigger all the failed jobs

rameshthoomu (Wed, 07 Feb 2018 18:31:42 GMT):
added below new *comment phrases* to trigger specific failed builds from fabric-sdk-node gerrit patchsets. (Triggers node8 jobs on x and z platforms) `reverify-node8x` `reverify-node8z` (Triggers node6 jobs on x and z platforms) `reverify-node6x` `reverify-node6z` Use `reverify` to trigger all the failed jobs

rameshthoomu (Wed, 07 Feb 2018 18:31:42 GMT):
updated existing *comment phrases* to trigger specific failed CI builds from fabric-sdk-node gerrit patchsets. (Triggers node8 jobs on x and z platforms) `reverify-node8x` `reverify-node8z` (Triggers node6 jobs on x and z platforms) `reverify-node6x` `reverify-node6z` Use `reverify` to trigger all the failed jobs

rameshthoomu (Wed, 07 Feb 2018 18:31:42 GMT):
updated the existing *comment phrases* to trigger specific failed CI builds from fabric-sdk-node gerrit patchsets. (Triggers node8 jobs on x and z platforms) `reverify-node8x` `reverify-node8z` (Triggers node6 jobs on x and z platforms) `reverify-node6x` `reverify-node6z` Use `reverify` to trigger all the failed jobs

mastersingh24 (Wed, 07 Feb 2018 18:50:10 GMT):
@rameshthoomu - are these the "new" "old" triggers which we had before?

rameshthoomu (Wed, 07 Feb 2018 18:50:54 GMT):
I have updated the existing phrases.

rameshthoomu (Wed, 07 Feb 2018 18:51:05 GMT):
will edit my comment.

ArnabChatterjee (Thu, 08 Feb 2018 02:23:20 GMT):
Hello, Fabric Experts. If we want to establish TLS over a peer from a different org, then we need to ask for only the tls cert of the particular peer, right? Is it okay for orgs to give away certificates to other orgs?

davidkhala (Thu, 08 Feb 2018 03:10:30 GMT):
Has joined the channel.

davidkhala (Thu, 08 Feb 2018 03:13:24 GMT):
@rameshthoomu happen to know this enhancement! Has it already been launched to current system? And will there be document update about that?

rameshthoomu (Thu, 08 Feb 2018 03:14:11 GMT):
Yes.. it's already implemented in CI jobs..

rameshthoomu (Thu, 08 Feb 2018 03:14:30 GMT):
will update the same in our ci documentation..

davidkhala (Thu, 08 Feb 2018 03:21:38 GMT):
Btw, @rameshthoomu I would like to know these days, who will be active to merge node-sdk patch ? Still JimTheMatrix or Zhao Chaoyi?

rameshthoomu (Thu, 08 Feb 2018 03:27:36 GMT):
add all the maintainers listed here https://github.com/hyperledger/fabric-sdk-node/blob/master/MAINTAINERS.md and post your patch in #fabric-pr-review channel

davidkhala (Thu, 08 Feb 2018 03:41:39 GMT):
@rameshthoomu Thanks so much

NiketYende (Thu, 08 Feb 2018 05:08:52 GMT):
Hello, i am trying to setup marbles example with the new fabric v1.1.0-alpha branch. I am facing some issue when i run "instantiate-chaincode.js".

NiketYende (Thu, 08 Feb 2018 05:09:37 GMT):

instantiate-issue.jpg

NiketYende (Thu, 08 Feb 2018 05:10:27 GMT):
My request object from buildChaincodeProposal method.

NiketYende (Thu, 08 Feb 2018 05:10:29 GMT):
var request = { chaincodePath: chaincode_path, chaincodeId: e2e.chaincodeId, chaincodeVersion: version, fcn: 'init', args: [], txId: tx_id, // use this to demonstrate the following policy: // 'if signed by org1 admin, then that's the only signature required, // but if that signature is missing, then the policy can also be fulfilled // when members (non-admin) from both orgs signed' 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: ORGS['org1'].mspid }}, { role: { name: 'member', mspId: ORGS['org2'].mspid }}, { role: { name: 'admin', mspId: ORGS['org1'].mspid }} ], policy: { '1-of': [ { 'signed-by': 2}, { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1 }]} ] } } };

NiketYende (Thu, 08 Feb 2018 05:11:28 GMT):
Am i initializing it in a wrong way? I am able to setup the default example easily.

wtrmogi (Thu, 08 Feb 2018 06:14:39 GMT):
Has joined the channel.

davidkhala (Thu, 08 Feb 2018 07:05:24 GMT):
have you modified chaincode content?

davidkhala (Thu, 08 Feb 2018 07:06:02 GMT):
@NiketYende have you change chaincode marbles02 content?

davidkhala (Thu, 08 Feb 2018 07:45:31 GMT):
I have a question that does ES2015 syntax 'string template literals' are supported in node-sdk?

NiketYende (Thu, 08 Feb 2018 08:07:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tFaNj97WXjipQn2qx) @davidkhala Yes, changed to the latest marbles02 code present under fabric/examples. Also i have setup this marbles example with prev version v1.0.2. I am looking to upgrade it to v1.1.0-alpha.

naveen_saravanan (Thu, 08 Feb 2018 10:52:15 GMT):
Is there exist a way (using fabric-ca commands) to authenticate a user credentials (user name and password) after registering the user in to the fabric-ca-server? If anyone knew about this please help me and thanks in advance.

akshay.lawange (Thu, 08 Feb 2018 12:42:04 GMT):
HI

akshay.lawange (Thu, 08 Feb 2018 12:42:08 GMT):
Does any one have idea about this error? I have got this error while querying to a peer. ```[2018-02-08 12:39:15.511] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 9f8f42232cd7f7d2ca77619ea81e438419438d17b9f398b710292482591715ff [2018-02-08 12:39:15.511] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 938c921d526c692d38505c9954ab81f7210d5c396d230431a400b32524d414ba [2018-02-08 12:39:15.512] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 9f8f42232cd7f7d2ca77619ea81e438419438d17b9f398b710292482591715ff [2018-02-08 12:39:15.512] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 938c921d526c692d38505c9954ab81f7210d5c396d230431a400b32524d414ba [2018-02-08 12:39:15.513] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: 9f8f42232cd7f7d2ca77619ea81e438419438d17b9f398b710292482591715ff [2018-02-08 12:39:15.513] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: 938c921d526c692d38505c9954ab81f7210d5c396d230431a400b32524d414ba [2018-02-08 12:39:15.513] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue [2018-02-08 12:39:15.523] [ERROR] Query - TypeError: Converting circular structure to JSON at Object.stringify (native) at Function.sendTransactionProposal (/home/user1/firstnetwork/node_modules/fabric-client/lib/Channel.js:1272:53) at Channel.sendTransactionProposal (/home/user1/firstnetwork/node_modules/fabric-client/lib/Channel.js:1262:32) at Channel.queryByChaincode (/home/user1/firstnetwork/node_modules/fabric-client/lib/Channel.js:1542:15) at helper.getRegisteredUsers.then (/home/user1/firstnetwork/app/query_new.js:41:24) at process._tickCallback (internal/process/next_tick.js:109:7) Queried Successfully: TypeError: Converting circular structure to JSON at Object.stringify (native) at Function.sendTransactionProposal (/home/user1/firstnetwork/node_modules/fabric-client/lib/Channel.js:1272:53) at Channel.sendTransactionProposal (/home/user1/firstnetwork/node_modules/fabric-client/lib/Channel.js:1262:32) at Channel.queryByChaincode (/home/user1/firstnetwork/node_modules/fabric-client/lib/Channel.js:1542:15) at helper.getRegisteredUsers.then (/home/user1/firstnetwork/app/query_new.js:41:24) at process._tickCallback (internal/process/next_tick.js:109:7) (node:54387) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token T in JSON at position 0```

DongSuIBM (Thu, 08 Feb 2018 14:51:27 GMT):
Has joined the channel.

DongSuIBM (Thu, 08 Feb 2018 14:53:50 GMT):
Hello, I guess this is the right place to post my question on the connection profile feature. Does anyone know where I can find the official document for the NodeJS Connection Profile feature in Hyperledger Fabric v1.1? The discussion on designing this feature is here: https://jira.hyperledger.org/browse/FAB-5363 But I think there should be a formal document to fully describe this feature and how to use it in either http://hyperledger-fabric.readthedocs.io or https://fabric-sdk-node.github.io. But I did not find it in these places. Thanks!

Vadim (Thu, 08 Feb 2018 14:55:13 GMT):
@DongSuIBM https://fabric-sdk-node.github.io/tutorial-network-config.html that?

DongSuIBM (Thu, 08 Feb 2018 15:11:53 GMT):
@Vadim Yes. This is what I need. Thank you :-)

vitorqshr (Thu, 08 Feb 2018 16:57:35 GMT):
Has joined the channel.

davidkhala (Fri, 09 Feb 2018 01:45:45 GMT):
I have a question that does ES2015 syntax 'string template literals' are supported in node-sdk?

davidkhala (Fri, 09 Feb 2018 01:46:33 GMT):
I have a question that is ES2015 syntax 'string template literals' supported in node-sdk?

wangdong (Fri, 09 Feb 2018 02:41:48 GMT):
I think an example will be better.

wangdong (Fri, 09 Feb 2018 02:41:52 GMT):
@davidkhala

davidkhala (Fri, 09 Feb 2018 04:25:01 GMT):
@wangdong the syntax will be like const a = 'fine'; console.log(`${a} is fine`);

davidkhala (Fri, 09 Feb 2018 04:25:57 GMT):
currently in node-sdk source code, each time it implement similar function, it use util.format()

wangdong (Fri, 09 Feb 2018 04:32:40 GMT):
i don't think i have saw this syntax.

davidkhala (Fri, 09 Feb 2018 05:53:17 GMT):
@wangdong yes I could not see also. What I mean is if we contribute code including these syntax could job builder let it passed.

CodeReaper (Fri, 09 Feb 2018 05:57:44 GMT):
Hi, I tried to query a block from node SDK. That particular block had a very bulky transaction in it, so I can't seem to query the block. It shows-

CodeReaper (Fri, 09 Feb 2018 05:58:00 GMT):

Clipboard - February 9, 2018 11:27 AM

CodeReaper (Fri, 09 Feb 2018 05:58:06 GMT):
It seems to because of limit of message size in GRPC connection. Any config variable that can help me scale up the limit??

naveen_saravanan (Fri, 09 Feb 2018 06:13:45 GMT):
Hi, I tried to run the query.js of fabcar and got the below given error: root@hibiz-Aspire-E5-575:/home/hibiz/fabric-starter-patient# node query.js Store path:/home/hibiz/fabric-starter-patient/hfc-key-store Successfully loaded user1 from persistence:{"name":"user1","mspid":"consumerMSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"1f1b3ae14d1e7b183212d4e29336db2ddddaddedcf0a48b5a77f7febb0c104de","identity":{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB+TCCAZ+gAwIBAgIUfVf3CN6CiiqAI+Jxfx1b1dLciUowCgYIKoZIzj0EAwIw\nezELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh\nbiBGcmFuY2lzY28xHTAbBgNVBAoTFGNvbnN1bWVyLmV4YW1wbGUuY29tMSAwHgYD\nVQQDExdjYS5jb25zdW1lci5leGFtcGxlLmNvbTAeFw0xODAyMDkwNjA1MDBaFw0x\nOTAyMDkwNjA1MDBaMBAxDjAMBgNVBAMTBXVzZXIxMFkwEwYHKoZIzj0CAQYIKoZI\nzj0DAQcDQgAETc7bGGzH3xtrtRB6RVaV7cQpkQ6FzUf2IkM2umwHt+rq2zUYV0yd\noxUNsv5M0ggNykzypeS+T9Pg+ToBhYpmqqNsMGowDgYDVR0PAQH/BAQDAgeAMAwG\nA1UdEwEB/wQCMAAwHQYDVR0OBBYEFHM4S8+rpGwwXAwkAO2Z/bda3wNzMCsGA1Ud\nIwQkMCKAIKYb92hOBoHf145D0gHToqtUfq1ba6Mz/BU+1Xnf6sXgMAoGCCqGSM49\nBAMCA0gAMEUCIQClb2n0WiQDeJygenXh3CRFjgTO6cZRKinLj8SzIw+0iQIgdakc\nj83SHTxiQWgqf8zlZzrGJwmRSB89i1jn5I9Fdo4=\n-----END CERTIFICATE-----\n"}}} error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Stream removed at /home/hibiz/fabric-starter-patient/node_modules/grpc/src/client.js:554:15 Query has completed, checking results Response is Error: Stream removed error from query = { Error: Stream removed at /home/hibiz/fabric-starter-patient/node_modules/grpc/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } } root@hibiz-Aspire-E5-575:/home/hibiz/fabric-starter-patient# does anyone know what is the problem here?

naveen_saravanan (Fri, 09 Feb 2018 06:13:45 GMT):
Hi, I tried to run the query.js of fabcar and got the below given error: root@hibiz-Aspire-E5-575:/home/hibiz/fabric-starter-patient# node query.js Store path:/home/hibiz/fabric-starter-patient/hfc-key-store Successfully loaded user1 from persistence error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Stream removed at /home/hibiz/fabric-starter-patient/node_modules/grpc/src/client.js:554:15 Query has completed, checking results Response is Error: Stream removed error from query = { Error: Stream removed at /home/hibiz/fabric-starter-patient/node_modules/grpc/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } } root@hibiz-Aspire-E5-575:/home/hibiz/fabric-starter-patient# does anyone know what is the problem here?

sachikoy (Sat, 10 Feb 2018 01:38:41 GMT):
Hi, I tried balance-transfer sample with v1.1.0-alpha, and got an error at `async` as follows. I am using node v6.12.3 and installed `async` module with `npm install async` but still get the same error. Should I use node v7.x? ```github.com/hyperledger.latest/fabric-samples/balance-transfer/app.js:109 app.post('/users', async function(req, res) { ^^^^^ SyntaxError: missing ) after argument list at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:383:7) at startup (bootstrap_node.js:149:9) ```

sachikoy (Sat, 10 Feb 2018 01:38:41 GMT):
Hi, I tried balance-transfer sample with v1.1.0-alpha, and got an error at `async` as follows. I am using node v6.12.3 and installed `async` module with `npm install async` but still get the same error. Should I use node v7.x? ```github.com/hyperledger/fabric-samples/balance-transfer/app.js:109 app.post('/users', async function(req, res) { ^^^^^ SyntaxError: missing ) after argument list at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:383:7) at startup (bootstrap_node.js:149:9) ```

sachikoy (Sat, 10 Feb 2018 03:24:24 GMT):
ok, the balance-transfer sample worked with node v7.x. I guess the prerequisites documentation has to be corrected to refer to v7.x? http://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#node-js-runtime-and-npm

wangdong (Sat, 10 Feb 2018 03:37:33 GMT):
you can just update it.

sachikoy (Sun, 11 Feb 2018 01:48:59 GMT):
my point is that the documentation is misleading.

mastersingh24 (Sun, 11 Feb 2018 11:14:04 GMT):
@sachikoy - actually for v1.1 (latest / master) we only support Node 8.9 (latest LTS version) - https://gerrit.hyperledger.org/r/17769 updates the docs

davidkhala (Mon, 12 Feb 2018 01:26:02 GMT):
@sachikoy It work on just 1 sample does not mean it work for every case. Especially Hyperledger JobBuilder CL has not yet set environment for node 7 to test.

sachikoy (Mon, 12 Feb 2018 03:05:11 GMT):
@mastersingh24 @davidkhala ah, ok. thanks.

sachikoy (Mon, 12 Feb 2018 05:21:18 GMT):
@davidkhala basically I was complaining that the Prerequisite wrongly states that node v6.x is required.

pb (Mon, 12 Feb 2018 07:08:21 GMT):
@here Hi How to specify the number of transactions that must be included in each block?

pb (Mon, 12 Feb 2018 07:08:21 GMT):
Hi How to specify the number of transactions that must be included in each block?

davidkhala (Mon, 12 Feb 2018 07:24:08 GMT):
@sachikoy actually just about month ago, contributor like me should make my patch codes pass platform test of node 6, so some syntax in node 7 like async/await is not allowed. But for you side I believe that using sdk with higher version is usually OK as long as nodejs guarantee compatibility to old nodejs 6 version.

davidkhala (Mon, 12 Feb 2018 07:25:37 GMT):
But this kind of promise is not provided by fabric. So I guess they use a conservative strategy..

davidkhala (Mon, 12 Feb 2018 07:26:28 GMT):
@pb I think this question is more for #fabric

erzeghi (Mon, 12 Feb 2018 07:46:06 GMT):
Has left the channel.

siddesh_sangodkar (Mon, 12 Feb 2018 10:25:48 GMT):
@mastersingh24 can u please help me with this: https://jira.hyperledger.org/browse/FAB-8129

sudheesh001 (Mon, 12 Feb 2018 12:58:20 GMT):
Can someone help me with pushing a patch for review for the node-sdk. Whenever I do `git review` I get the following message ``` The branch 'master' does not exist on the given remote 'gerrit'. If these changes are intended to start a new branch, re-run with the '-R' option enabled. ``` Also, there is no `.gitreview` file in the repository, are the patches expected to be sent as pull requests on github?

sudheesh001 (Mon, 12 Feb 2018 12:59:02 GMT):
I have the following as my `.gitreview` file that I added to the `node-sdk` repository ``` [gerrit] host=gerrit.hyperledger.org port=29418 project=fabric-sdk-node ```

rjones (Mon, 12 Feb 2018 14:53:24 GMT):
@sudheesh001 reviews should end up in gerrit, not github. I don't use git review, I do something like `git push origin HEAD:refs/for/master` directly

C.Jason.Phelps (Mon, 12 Feb 2018 15:30:31 GMT):
I have added indexes to couchdb and am able to submit a search through couchdb using sort, however when trying to submit through fabric request getting `Error: http: read on closed response body` my request using this as query string ```{ selector:{docType:"provider", index:{$lt:1000}}, sort:[{"index":"asc" }] }``` Dont know if there is something I am missing due to the index needing to be on field data.index but have tried both, data.index and index, on fabric request couchdb index ```{ "index": { "fields": [ "data.docType", "data.index" ] }, "type": "json" }``` if I remove the sort from request it works but need sorted information any help would be appreciated

sudheesh001 (Mon, 12 Feb 2018 16:09:52 GMT):
@rjones Thanks :-) I managed to push a patch for review however the build seems to have failed. Could you help me identify why this is happening? https://jenkins.hyperledger.org/job/fabric-sdk-node8-verify-x86_64/356/

sudheesh001 (Mon, 12 Feb 2018 16:10:08 GMT):
commit change review: https://gerrit.hyperledger.org/r/#/c/17799/

rjones (Mon, 12 Feb 2018 20:06:34 GMT):
Has left the channel.

davidkhala (Tue, 13 Feb 2018 09:14:51 GMT):
@zhaochy as in https://gerrit.hyperledger.org/r/c/17831, could we use eslint in root or in fabric-client, fabric-ca-client separate?

zhaochy (Tue, 13 Feb 2018 09:16:02 GMT):
@davidkhala hello, I can't open your gerrit link

davidkhala (Tue, 13 Feb 2018 09:16:43 GMT):
@zhaochy Sorry, it is https://gerrit.hyperledger.org/r/#/c/17831/

zhaochy (Tue, 13 Feb 2018 09:19:25 GMT):
we already have eslint rules at build/task/eslint.js, so I recommend to update these rules for FAB-5492

zhaochy (Tue, 13 Feb 2018 09:20:03 GMT):
you may run `gulp lint` after `npm install`

zhaochy (Tue, 13 Feb 2018 09:21:30 GMT):
and why you want to use different eslint rules for fabric-client and fabric-ca-client?

davidkhala (Tue, 13 Feb 2018 09:24:30 GMT):
Actually I just saw them have separated package.json and wondering if they would apply different rules. But since you tell me the eslint related task has already been added to gulp, it eliminate my quesion.

zhaochy (Tue, 13 Feb 2018 09:27:32 GMT):
:sunglasses:

davidkhala (Tue, 13 Feb 2018 09:28:33 GMT):
I just missed the gulpjs before

davidkhala (Tue, 13 Feb 2018 09:39:03 GMT):
@zhaochy and why there is no explicit ESLint config file like .eslintrc.js in source code?

anku94 (Tue, 13 Feb 2018 09:40:11 GMT):
Has joined the channel.

CodeReaper (Tue, 13 Feb 2018 10:53:08 GMT):
Hi, I'm using balance transfer nodejs code with my chaincode to invoke a list of transactions in a sequence, not parallel. And I'm getting this error-

CodeReaper (Tue, 13 Feb 2018 10:53:14 GMT):

Clipboard - February 13, 2018 4:23 PM

CodeReaper (Tue, 13 Feb 2018 10:53:21 GMT):
What is happening

javrevasandeep (Tue, 13 Feb 2018 14:46:09 GMT):
I need some help regarding HSM I found that there is an open issue with HSM implementation. FabricFAB-7654 Fabric SDK Node unit tests configured with HSM are failing on master branch Is there any patch which solves this and not yet merged

davidkel (Tue, 13 Feb 2018 15:05:52 GMT):
The issue with HSM is likely to be around problems with the unit tests or using the wrong version of softhsm. The current code in node-sdk works with HSMs

Amjadnz (Tue, 13 Feb 2018 19:08:45 GMT):
@here - can somebody test with NodeSDK chaincode instantiation of VENDORED go packages (vendor folder in the go folders) ? Normally all non-vendored go packages are getting installed and instantiated without any issues through NodeSDK. But vendored go packages do not instantiated. Error comes like below `2018-02-04 17:40:01.769 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to read file content : open : no such file or directory`

Amjadnz (Tue, 13 Feb 2018 19:08:45 GMT):
Ok guys - my bad.

jarias (Tue, 13 Feb 2018 19:09:01 GMT):
do not use @[here]

jrosmith (Tue, 13 Feb 2018 19:09:22 GMT):
@Amjadnz do not use @ (here)

yacovm (Tue, 13 Feb 2018 19:10:01 GMT):
don't use here here, and also your error was probably that the certificate path wasn't configured, it appeared empty.

Amjadnz (Tue, 13 Feb 2018 19:12:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vJWrwAk2iSswueKfH) @yacovm - I did the entire set of tests. Without vendored go packages - all are fine. With vendored go packages particularly Have this issue

Amjadnz (Tue, 13 Feb 2018 19:12:36 GMT):
Regarding @ (here) - I've removed it from my keyboard.

yacovm (Tue, 13 Feb 2018 19:12:41 GMT):
did you vendor the old shim by chance?

yacovm (Tue, 13 Feb 2018 19:12:45 GMT):
a v1.0 shim

yacovm (Tue, 13 Feb 2018 19:12:49 GMT):
and you may be running a v1.1 peer?

Amjadnz (Tue, 13 Feb 2018 19:14:08 GMT):
alright - that I would check again. Nice catch. Because I did vendoring before V1.1 upgrade and been copying that folder only.

Amjadnz (Tue, 13 Feb 2018 19:15:18 GMT):
You also confirmed that you have been using the NodeSDK instantiation with vendored go packages - so that should be possible.

yacovm (Tue, 13 Feb 2018 19:15:32 GMT):
me?

Amjadnz (Tue, 13 Feb 2018 19:17:50 GMT):
Oops - not you it was @Vadim

Amjadnz (Tue, 13 Feb 2018 19:33:28 GMT):
Regarding the CERTIFICATES - I have already raised a JIRA item https://jira.hyperledger.org/browse/FAB-8202

Amjadnz (Tue, 13 Feb 2018 19:33:28 GMT):
Regarding the Missing CERTIFICATES - I have already raised a JIRA item https://jira.hyperledger.org/browse/FAB-8202

Amjadnz (Tue, 13 Feb 2018 19:33:28 GMT):
Regarding the Missing certificates - I have already raised a JIRA item https://jira.hyperledger.org/browse/FAB-8202

bretharrison (Tue, 13 Feb 2018 21:11:30 GMT):
@CodeReaper When using an EventHub be sure the Client object used to create the EventHub or used on the constructor has an user context assigned (client.setUserContext()) at all times. Seems as if the Client context assigned to the EventHub has lost the user context when your transaction callback tries to have the EventHub disconnect.

bretharrison (Tue, 13 Feb 2018 21:39:51 GMT):
@CodeReaper For the error where you have received a message bigger than the max please check how you are setting these in the default.json or other config file or setting, the following sets to unlimited ``` "grpc.max_receive_message_length": -1, "grpc.max_send_message_length": -1, ```

JayJong (Wed, 14 Feb 2018 03:59:25 GMT):
Hi guys, I have set up fabric using kubernetes and the fabric SDK for node.js to talk to the blockchain. I am testing the performance of fabric by timing the start of invoking a single transaction on node A to the end of quering the same transaction on node B. I wrote a shell script to run the invoke.js and query.js in the fabcar sample. The result was 3.9 seconds for the writing and reading to complete. I have 2 questions: 1. Am i testing it correctly? Is that the right way to calculate tx per second? Fabric is said to be able to do 3500 tx per second and ethereum is able to do 15 tx per second. Should I be pushing 10,000 or more transactions to the blockchain and see how long it takes and divide 10,000 by time taken? 2. Why does it take 3.9 seconds to invoke and query using the node.js sdk? Is it because of the javascript code or the authentication takes sometime?

MoulaliMvg (Wed, 14 Feb 2018 04:18:36 GMT):
can we send file in hyperledger fabric

shalinigpt (Wed, 14 Feb 2018 09:08:50 GMT):
Has joined the channel.

CodeReaper (Wed, 14 Feb 2018 12:51:15 GMT):
@bretharrison I'm using two users simutaneously for transactions and using basic balance transfer code. If the eventhub was created by some user's context, it should be used the same when disconnecting. The code doesnt seem to change context in between in invoke.js . Are you saying that it is not safe to invoke with multiple users at once??

Amjadnz (Wed, 14 Feb 2018 16:49:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yykAotyPERhqcYgDT) @yacovm - Thanks for the suggestion - this seems to have worked. I downloaded the fabric 1.0.5 and did the govendoring cleanly. Instantiating now and it got required results. Special thanks to @yacovm and @Vadim. Would update the JIRA Item also.

Amjadnz (Wed, 14 Feb 2018 16:49:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yykAotyPERhqcYgDT) @yacovm - Thanks for the suggestion - this seems to have worked. I downloaded the fabric 1.0.5 and did the govendoring cleanly. Instantiating now and it got required results. Special thanks to @yacovm and @Vadim . Would update the JIRA Item also.

yacovm (Wed, 14 Feb 2018 16:59:04 GMT):
@Amjadnz do you mean FAB-8202 ?

Amjadnz (Wed, 14 Feb 2018 19:09:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Q6yDQnt23vb4279u3) @yacovm Yes

Amjadnz (Wed, 14 Feb 2018 19:10:43 GMT):
I would do one more round of tests now - and once confirmed would resolve it with my comments.

bretharrison (Wed, 14 Feb 2018 22:54:23 GMT):
@CodeReaper It is safe to use multiple users at once. Somehow the client context assigned to the eventhub is loosing it's user context. Which version are you working with, you may wish to use the new Channel Event service which does not send a unregister when it disconnects. It just shuts down the connection. Are you sharing the same eventhub for each of the transactions ?

bretharrison (Wed, 14 Feb 2018 22:54:23 GMT):
@CodeReaper It is safe to use multiple users at once. Somehow the client context assigned to the eventhub is loosing it's user context. Which version are you working with, you may wish to use the new Channel Event service which does not send an unregister when it disconnects. It just shuts down the connection. Are you sharing the same eventhub for each of the transactions ?

sakoula (Thu, 15 Feb 2018 07:15:57 GMT):
Has joined the channel.

sakoula (Thu, 15 Feb 2018 07:17:38 GMT):
Hi has anyone used the node sdk on a react-native app (or a similar 'hybrid' framework) in order to get access from a mobile device to the channel? If not, is there another alternative for a mobile device to integrate to the channel (other than going though the SDK via a REST or similar API)?

CodeReaper (Thu, 15 Feb 2018 07:47:34 GMT):
@bretharrison I'm using 1.0.2, both fabric-ca-client and faabric-client. And I'm using one eventhub instance for every transaction, as provided in balance-transfer. What do you mean by new Channel Event service??

yacovm (Thu, 15 Feb 2018 09:59:10 GMT):
He means the new peer API the peer has in v1.1

SimonOberzan (Thu, 15 Feb 2018 11:20:20 GMT):
Hi. I am trying to join my org1 peers(peer1.org1, peer2.org1, peer3.org1) to the channel, similarely as in the balance-transfer example. I have created my channel using admin-org1(http://prntscr.com/if1sxi), but when I try to join the peers to the channel with that admin, my first peer (peer1.org1) joins successfully, while other peers recieve `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: "JoinChain" request failed authorization check for channel [businesschannel]: [Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]]) at new createStatusError (/app/node_modules/grpc/src/client.js:64:15) at /app/node_modules/grpc/src/client.js:573:15` response. Does that make sense to anyone? Logs on peer2.org1: http://prntscr.com/if1s9l

SimonOberzan (Thu, 15 Feb 2018 11:20:20 GMT):
Hi. I am trying to join my org1 peers(peer1.org1, peer2.org1, peer3.org1) to the channel, similarely as in the balance-transfer example. I have created my channel using admin-org1(http://prntscr.com/if1sxi), but when I try to join the peers to the channel with that admin, my first peer (peer1.org1) joins successfully, while other peers recieve ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: "JoinChain" request failed authorization check for channel [businesschannel]: [Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]]) at new createStatusError (/app/node_modules/grpc/src/client.js:64:15) at /app/node_modules/grpc/src/client.js:573:15``` response. Does that make sense to anyone? Logs on peer2.org1: http://prntscr.com/if1s9l

SimonOberzan (Thu, 15 Feb 2018 11:20:20 GMT):
Hi. I am trying to join my org1 peers(peer1.org1, peer2.org1, peer3.org1) to the channel, similarely as in the balance-transfer example. I have created my channel using admin-org1(http://prntscr.com/if1sxi), but when I try to join the peers to the channel with that admin, my first peer (peer1.org1) joins successfully, while other peers' response is ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: "JoinChain" request failed authorization check for channel [businesschannel]: [Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]]) at new createStatusError (/app/node_modules/grpc/src/client.js:64:15) at /app/node_modules/grpc/src/client.js:573:15``` response. Does that make sense to anyone? Logs on peer2.org1: http://prntscr.com/if1s9l

SimonOberzan (Thu, 15 Feb 2018 11:20:20 GMT):
Hi. I am trying to join my org1 peers(peer1.org1, peer2.org1, peer3.org1) to the channel, similarely as in the balance-transfer example. I have created my channel using admin-org1(http://prntscr.com/if1sxi), but when I try to join the peers to the channel with that admin, my first peer (peer1.org1) joins successfully, while other peers' response is: ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: "JoinChain" request failed authorization check for channel [businesschannel]: [Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]]) at new createStatusError (/app/node_modules/grpc/src/client.js:64:15) at /app/node_modules/grpc/src/client.js:573:15``` Does that make sense to anyone? Logs on peer2.org1: http://prntscr.com/if1s9l

SimonOberzan (Thu, 15 Feb 2018 11:20:20 GMT):
Hi. I am trying to join my org1 peers(peer1.org1, peer2.org1, peer3.org1) to the channel, similarely as in the balance-transfer example. I have created my channel using admin-org1(http://prntscr.com/if1sxi), but when I try to join the peers to the channel with that admin, my first peer (peer1.org1) joins successfully, while other peers' response is: ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: "JoinChain" request failed authorization check for channel [businesschannel]: [Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]]) at new createStatusError (/app/node_modules/grpc/src/client.js:64:15) at /app/node_modules/grpc/src/client.js:573:15``` Does that make sense to anyone? I would expect that to work, but even if it doesn't, why would 1 peer work while other 2 don't Logs on peer2.org1: http://prntscr.com/if1s9l

CodeReaper (Thu, 15 Feb 2018 15:02:00 GMT):
Hi, I'm doing a transaction which is having a much greater response data, and it is giving me error. It seems to be because of the limit put by grpc. How can I fix it.

CodeReaper (Thu, 15 Feb 2018 15:02:00 GMT):
@bretharrison Hi, I'm doing a transaction which is having a much greater response data, and it is giving me error. It seems to be because of the limit put by grpc. How can I fix it.

CodeReaper (Thu, 15 Feb 2018 15:02:09 GMT):

Clipboard - February 15, 2018 8:32 PM

bretharrison (Thu, 15 Feb 2018 19:41:22 GMT):
@CodeReaper put the following as additional options when creating your peers ``` "grpc.max_receive_message_length": -1, "grpc.max_send_message_length": -1, ```

CodeReaper (Thu, 15 Feb 2018 19:42:55 GMT):
@bretharrison Where should I put it?

CodeReaper (Thu, 15 Feb 2018 19:43:09 GMT):
in environment variables

CodeReaper (Thu, 15 Feb 2018 19:43:11 GMT):
?

bretharrison (Thu, 15 Feb 2018 19:48:27 GMT):
@CodeReaper How are you creating `Peer`

bretharrison (Thu, 15 Feb 2018 19:48:27 GMT):
@CodeReaper How are you creating `Peer` instances

CodeReaper (Thu, 15 Feb 2018 19:48:41 GMT):
Standard balance transfer code

bretharrison (Thu, 15 Feb 2018 19:49:50 GMT):
This is older balance transfer, not the new balance transfer based on Connection Profiles ?

CodeReaper (Thu, 15 Feb 2018 19:51:01 GMT):
No, 1.0 one

CodeReaper (Thu, 15 Feb 2018 19:51:13 GMT):
I mean yes, its older one

CodeReaper (Thu, 15 Feb 2018 19:52:54 GMT):

Clipboard - February 16, 2018 1:22 AM

CodeReaper (Thu, 15 Feb 2018 19:52:56 GMT):
This the correct procedure to implement it???

bretharrison (Thu, 15 Feb 2018 19:54:11 GMT):
yes for the eventhub, will also have to add to the peer, see helper.js, line 65, add those two lines there also

CodeReaper (Thu, 15 Feb 2018 19:55:43 GMT):
in old code or the newer one?

CodeReaper (Thu, 15 Feb 2018 19:56:39 GMT):
You mean in channel.addOrderer and channel.addPeer also right ?

bretharrison (Thu, 15 Feb 2018 20:06:47 GMT):
https://github.com/hyperledger/fabric-samples/blob/f9794a7044c549d78d410f352583593b919882a6/balance-transfer/app/helper.js#L65

MoulaliMvg (Fri, 16 Feb 2018 03:47:16 GMT):
while invoking I'm getting this following error ```[2018-02-16 09:07:56.610] [ERROR] invoke-chaincode - Failed to send transaction and get notifications within the timeout period. [2018-02-16 09:07:56.610] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined```

MoulaliMvg (Fri, 16 Feb 2018 03:47:29 GMT):
but I'm getting status as 200

MoulaliMvg (Fri, 16 Feb 2018 03:49:24 GMT):

Clipboard - February 16, 2018 9:18 AM

cotofei (Fri, 16 Feb 2018 05:34:21 GMT):
Has left the channel.

Shivshankar (Fri, 16 Feb 2018 05:36:05 GMT):
Has joined the channel.

Shivshankar (Fri, 16 Feb 2018 05:36:11 GMT):
Hi. I have few rows saved in ledger with a particular docType. Now I want to query them all using docType parameter. I am using couchdb and my chaincode is written in node.js. Can someone please assist.

javrevasandeep (Fri, 16 Feb 2018 12:40:09 GMT):
Hi Guys

javrevasandeep (Fri, 16 Feb 2018 12:41:11 GMT):
I found this under fabric-node-sdk documentation. fabric-ca-client - client for the optional component in Hyperledger Fabric, fabric-ca. *The fabric-ca component allows applications to enroll Peers* and application users to establish trusted identities on the blockchain network. It also provides support for pseudonymous transaction submissions with Transaction Certificates. If the target blockchain network is configured with standard Certificate Authorities for trust anchors, the application does not need to use this package.

javrevasandeep (Fri, 16 Feb 2018 12:41:55 GMT):
but couldn't find any working code in unit tests which test the peer enrollment

javrevasandeep (Fri, 16 Feb 2018 12:43:11 GMT):
is there any working example on this?

bretharrison (Fri, 16 Feb 2018 13:36:50 GMT):
@javrevasandeep The questions seems better posted to the `fabric-ca` channel

bretharrison (Fri, 16 Feb 2018 13:37:56 GMT):
@MoulaliMvg You may wish to turn on debug logging and run it again `export HFC_LOGGING='{"debug":"console"}'`

bretharrison (Fri, 16 Feb 2018 13:37:56 GMT):
@MoulaliMvg You may wish to turn on debug logging and run it again `export HFC_LOGGING='{"debug":"console"}'`

javrevasandeep (Fri, 16 Feb 2018 13:39:47 GMT):
sorry if i am wrong but this is related to fabric-ca-client node module which should have some attribute like type: 'peer' while enrolling peers instead of users. right now what i can see is that register/enroll APIs doesn't support peer or orderers register/enrollment

javrevasandeep (Fri, 16 Feb 2018 13:40:57 GMT):
can i point me to any API where we can give peer instead of user in request parameters while sending register/enrollment request

bretharrison (Fri, 16 Feb 2018 13:41:43 GMT):
are you working with 1.1

javrevasandeep (Fri, 16 Feb 2018 13:41:46 GMT):
yes

javrevasandeep (Fri, 16 Feb 2018 14:07:01 GMT):
@bretharrison did you find any lead on peer enrollment via fabric-node-sdk?

bretharrison (Fri, 16 Feb 2018 15:24:26 GMT):
I will have to get back to you... other fires right now

Amjadnz (Sat, 17 Feb 2018 06:49:26 GMT):
A question - if someone can answer From where does the `cryptogen` uses the CSR to generate the crypto material. My question is raising from the fact that all the e2e `generateArtifacts` are generating CERTS with Country as `US` and State as `North Carolina`. I would like to change that - how is that possible. I should be using some sort of base CSR (Certificate Service Request) or a config to pick these attributes.

Amjadnz (Sat, 17 Feb 2018 06:49:26 GMT):
A question - if someone can answer From where does the `cryptogen` uses the CSR to generate the crypto material. My question is raising from the fact that all the e2e `generateArtifacts` are generating CERTS with Country as `US` and State as `North Carolina`. I would like to change that - how is that possible. It should be using some sort of base CSR (Certificate Service Request) or a config to pick these attributes.

Amjadnz (Sat, 17 Feb 2018 06:49:26 GMT):
A question - if someone can answer From where does the `cryptogen` uses the CSR to generate the crypto material. My question is raising from the fact that all the e2e `generateArtifacts` are generating CERTS with Country as `US` and State as `North Carolina`. I would like to change that - how can I do that change? It should be using some sort of base CSR (Certificate Service Request) or a config to pick these attributes.

Amjadnz (Sat, 17 Feb 2018 06:49:26 GMT):
A question - if someone can answer From where does the `cryptogen` uses the CSR to generate the crypto material. My question is raising from the fact that all the e2e `generateArtifacts` are generating CERTS with Country as `US` and State as `North Carolina`. I would like to change that - how can I do that change? It should be using some sort of base CSR (Certificate Signing Request) or a config to pick these attributes.

Amjadnz (Sat, 17 Feb 2018 06:53:59 GMT):
Ok nevermind - got it from the crypto-config.yaml itself.

CodeReaper (Sat, 17 Feb 2018 08:07:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aQeXinaQtEFbbCjR8) @bretharrison Thanks very much, that worked for me

punit 4 (Sun, 18 Feb 2018 11:25:50 GMT):
Has joined the channel.

vu3mmg (Sun, 18 Feb 2018 13:47:06 GMT):
I would like to set the orderer Admin as a fabric client user ,

vu3mmg (Sun, 18 Feb 2018 13:47:14 GMT):
could you please let me know how to do that

donbr (Sun, 18 Feb 2018 18:57:06 GMT):
Has joined the channel.

javrevasandeep (Mon, 19 Feb 2018 05:23:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pNLTWwPHjETXizK3J) @bretharrison Any update on this one.

DmitryNovenkykh (Mon, 19 Feb 2018 07:33:23 GMT):
Has joined the channel.

gospodin.bodurov (Mon, 19 Feb 2018 08:11:29 GMT):
Has joined the channel.

gospodin.bodurov (Mon, 19 Feb 2018 08:18:19 GMT):
Hello, I would like to create new channel on the fly via node sdk. I tried to modify balance-transfer to make newChannel via lazy initialization and to reuse mychannel.tx with different channel name like "mynewchannel", but unfortunately received bad request error. In short channel creation works with 'mychannel', but if I provide 'mynewchannel' as channel name it receives error. I suspected I have to create new tx file for every channel and tried this way, by creating new tx file and trying to use it, but again without success. Could someone give me a detailed tutorial or source code how to do this operation?

davidkel (Mon, 19 Feb 2018 08:27:01 GMT):
@javrevasandeep I may wrong but does the IdentityService and the associated IdentityRequest be what you are looking for https://fabric-sdk-node.github.io/IdentityService.html

AlejandroNino (Mon, 19 Feb 2018 15:00:05 GMT):
Has joined the channel.

AlejandroNino (Mon, 19 Feb 2018 15:09:59 GMT):
Hello every one, I'm trying to adapt fabcar node-client in order to invoke a chaincode that I'm coding in chaincode-docker-devmode. Devmode doesn't have CA so I guess I could omit enrollAdmin step, but I still thinking about, is that posible? I mean doing this

RobertDiebels (Mon, 19 Feb 2018 17:26:48 GMT):
Has left the channel.

agaragiola (Mon, 19 Feb 2018 19:35:26 GMT):
Has joined the channel.

rameshthoomu (Wed, 21 Feb 2018 06:25:41 GMT):
@bretharrison https://jira.hyperledger.org/browse/FAB-8425 - sdk-node e2e tests are failing.

rameshthoomu (Wed, 21 Feb 2018 06:27:24 GMT):
observed `order container` is exiting.. ``` orderer.example.com | panic: Error creating channelconfig bundle: initializing channelconfig failed: could not create channel Orderer sub-group config: setting up the MSP manager failed: CA Certificate is not valid, (SN: 1000): could not obtain certification chain: the supplied identity is not valid: x509: certificate has expired or is not yet valid ```

rameshthoomu (Wed, 21 Feb 2018 06:27:24 GMT):
observed `order container` is exiting.. ``` orderer.example.com | panic: Error creating channelconfig bundle: initializing channelconfig failed: could not create channel Orderer sub-group config: setting up the MSP manager failed: CA Certificate is not valid, (SN: 1000): could not obtain certification chain: the supplied identity is not valid: x509: certificate has expired or is not yet valid ```

KangkanBora (Wed, 21 Feb 2018 10:16:47 GMT):
@here Hi all, greetings of the day, I want to see the current block hash , I am getting *previous block hash* and *data hash* and *block number* using node sdk, is there any method in node sdk as like java sdk to get the *current block hash

Exci (Wed, 21 Feb 2018 10:34:26 GMT):
Has joined the channel.

bretharrison (Wed, 21 Feb 2018 12:05:45 GMT):
@KangkanBora use `Channel.getInfo()` which returns the following ``` // Contains information about the blockchain ledger such as height, current // block hash, and previous block hash. message BlockchainInfo { uint64 height = 1; bytes currentBlockHash = 2; bytes previousBlockHash = 3; } ```

bretharrison (Wed, 21 Feb 2018 12:05:45 GMT):
@KangkanBora use `Channel.queryInfo()` which returns the following ``` // Contains information about the blockchain ledger such as height, current // block hash, and previous block hash. message BlockchainInfo { uint64 height = 1; bytes currentBlockHash = 2; bytes previousBlockHash = 3; } ```

KangkanBora (Wed, 21 Feb 2018 12:06:53 GMT):
@bretharrison Thanks , will give it a shot . :)

bretharrison (Wed, 21 Feb 2018 12:07:02 GMT):
@javrevasandeep Sorry,I hope to get to it today

bretharrison (Wed, 21 Feb 2018 12:13:56 GMT):
@AlejandroNino All users assigned to the `Client` must have an appropriate certificate and corresponding private key, which could be generated by the `cryptogen` fabric utility or from a CA. Using a CA on the NodeSDK side should not affect the Chaincode dev mode.

bretharrison (Wed, 21 Feb 2018 12:19:54 GMT):
@gospodin.bodurov see https://fabric-sdk-node.github.io/tutorial-channel-create.html

KathyXu (Wed, 21 Feb 2018 14:31:11 GMT):
Has joined the channel.

yetanotheruser23 (Thu, 22 Feb 2018 00:15:24 GMT):
Has joined the channel.

chaitanya (Thu, 22 Feb 2018 05:55:09 GMT):
Has left the channel.

Wangrj (Thu, 22 Feb 2018 06:24:57 GMT):
Has joined the channel.

Wangrj (Thu, 22 Feb 2018 06:36:14 GMT):
Hi, I checked the Fabric-FAQ.html of the document. Regarding Security & Access Control, it wrote that 'If you do not want the data to go through the orderers at all, and you are only concerned about the input data, then you can use visibility settings. The visibility setting will determine whether input and output chaincode data is included in the submitted transaction, versus just output data. ' Could anyone tell me where I can find the visibility settings?

berserkr (Thu, 22 Feb 2018 07:55:11 GMT):
Hi, what format should the currentblockhash be represented as?

berserkr (Thu, 22 Feb 2018 07:55:20 GMT):
I have been trying hex, base64, and utf8 no avail

berserkr (Thu, 22 Feb 2018 07:55:41 GMT):
I need to get the currentblockhash, then use it to fetch it by hash

berserkr (Thu, 22 Feb 2018 07:56:56 GMT):
for instance, I am trying `response_payload.currentBlockHash.toString('hex')`, which gives me a nicely formatted hash... then when I try to use it, it fails miserably :)

Wangrj (Thu, 22 Feb 2018 08:16:22 GMT):
@berserkr You can user this: Buffer.from(...).toString()

berserkr (Thu, 22 Feb 2018 08:17:05 GMT):
right, but how to I get the raw contents from the ByteBuffer structure?

berserkr (Thu, 22 Feb 2018 08:17:33 GMT):
from the sample app.js/query.js files, I see: `response_payload.currentBlockHash`

berserkr (Thu, 22 Feb 2018 08:17:43 GMT):
I get there, then from there is the ByteBuffer structure

berserkr (Thu, 22 Feb 2018 08:18:18 GMT):
```[2018-02-22 00:11:00.459] [DEBUG] Query - { height: Long { low: 3, high: 0, unsigned: true }, currentBlockHash: ByteBuffer { buffer: , offset: 4, markedOffset: -1, limit: 36, littleEndian: true, noAssert: false }, previousBlockHash: ByteBuffer { buffer: , offset: 38, markedOffset: -1, limit: 70, littleEndian: true, noAssert: false } }```

berserkr (Thu, 22 Feb 2018 08:18:37 GMT):
For instance, my assumption is that I need to convert the `buffer` data

berserkr (Thu, 22 Feb 2018 08:19:35 GMT):
I have a python restful service (legacy code) trying to talk to a node restful service, from the node end, I can do whatever I want, but python end, I am limited

berserkr (Thu, 22 Feb 2018 08:19:46 GMT):
@Wangrj ^ :)

berserkr (Thu, 22 Feb 2018 08:26:14 GMT):
even if I do: `Buffer.from(response_payload.currentBlockHash.toArrayBuffer()).toString('hex')` I get a hash value, that when loaded by the api via `Buffer.from(hash)` it fails to find the block by hash

berserkr (Thu, 22 Feb 2018 08:28:05 GMT):
damn... worked, but had to change the encoding on both ends...

berserkr (Thu, 22 Feb 2018 08:29:25 GMT):
why is node returning byte data??? use base64 encoding! :)

jrosmith (Thu, 22 Feb 2018 21:14:49 GMT):
hey all, given a network using a kafka ordering service with multiple ordering service nodes, a client should be able to send a properly endorsed transaction to any OSN, right? im confused because looking at the SDK code, its hardcoded to send to 0th orderer available on the channel: https://github.com/hyperledger/fabric-sdk-node/blob/release/fabric-client/lib/Channel.js#L1514 if that orderer goes down, how is the application supposed to send transactions to other OSNs?

yetanotheruser23 (Thu, 22 Feb 2018 22:17:41 GMT):
Hi all, Can someone point me to documentation about how to initialize the Fabric-CA client in the node SDK? Fabric-ca-client is generating certs with fabric-ca-server as the issuer and I'd like to change that.

yetanotheruser23 (Thu, 22 Feb 2018 23:09:02 GMT):
I tried adding the command fabric-ca-server start -c -b admin:adminpw to the docker-compose.yaml. But it doesn't look like it's using the CSR section of that file to create the client certificates.

yetanotheruser23 (Fri, 23 Feb 2018 00:49:58 GMT):
I'm getting the following error when I try to register a new user. Failed to register Error: fabric-ca request register failed with errors [[{"code":0,"message":"Failed getting affiliation 'app': sql: no rows in result set"}]] I'm using the Fabric-Node-SDK. This is my function call. fabric_ca_client.register({enrollmentID: 'user', affiliation: 'app', role: 'user', enrollmentSecret: 'ManagerUser'}, admin_user); does anyone know why?

Wangrj (Fri, 23 Feb 2018 02:51:01 GMT):
@yetanotheruser23 You may modify the crypto-config.yaml file and use cryptogen tool to generate certs. For example, in the crypto-config.yaml you may write like this - Name: Orderer Domain: test CA: Country: XX Province: XXXX Locality: XXXX

sudheesh001 (Fri, 23 Feb 2018 06:48:27 GMT):
Hey, I've been trying to implement the `BlockDecoder` functionality of `nodeSDK` in #fabric-sdk-py However, I've been facing an issue reading the genesis block data as a Buffer object. I've put up a question here. Would be really happy if someone could help with this https://stackoverflow.com/questions/48942570/difference-in-result-while-reading-same-file-with-node-and-python

sudheesh001 (Fri, 23 Feb 2018 07:17:49 GMT):
Can someone explain what the `.decode()` method in this line `var proto_block = _commonProto.Block.decode(block_bytes);` does? How does it deserialize the Buffer contents into a Block instance?

jrosmith (Fri, 23 Feb 2018 18:26:53 GMT):
just wanted to follow up on this, any ideas? [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7AZYoFfKWSXLLJbkc)

mastersingh24 (Sat, 24 Feb 2018 15:49:42 GMT):
@jrosmith - yeah ... we need to improve that ..... but it's possible to maintain the list of OSNs in your app and if you get a failure you can reorder the list and pass it back into the client

mastersingh24 (Sat, 24 Feb 2018 15:51:55 GMT):
for example, you can use https://fabric-sdk-node.github.io/Channel.html#removeOrderer__anchor to remove an orderer from the list if it fails (and then add it to the end of the list using https://fabric-sdk-node.github.io/Channel.html#addOrderer__anchor)

mastersingh24 (Sat, 24 Feb 2018 15:52:11 GMT):
of course we'll make this better in the future, but it's doable now

yoko (Sun, 25 Feb 2018 02:46:46 GMT):
Has joined the channel.

davidkhala (Sun, 25 Feb 2018 08:47:49 GMT):
@mastersingh24 @jrosmith I suggest to enhance that with an optional property named 'orderer' within the request. Is it OK? If yes I am happy to create a patch for that.

davidkhala (Sun, 25 Feb 2018 09:58:11 GMT):
@jrosmith @mastersingh24 Dear friends, I found that an enhancement has been made in master branch, please see in https://github.com/hyperledger/fabric-sdk-node/blob/49b3ff1d389a698a61c6ccd692b19af77ab5872c/fabric-client/lib/Channel.js#L1504

davidkhala (Sun, 25 Feb 2018 10:43:13 GMT):
@bretharrison @mastersingh24 Dear maintainers: I found a bug

davidkhala (Sun, 25 Feb 2018 10:43:13 GMT):
@bretharrison @mastersingh24 Dear maintainers: I found a bug https://jira.hyperledger.org/browse/FAB-8515

davidkhala (Sun, 25 Feb 2018 10:44:15 GMT):
I don't know how to fix or which 'sig' variable we should keep?

zajan.ksk (Mon, 26 Feb 2018 04:34:57 GMT):
Has joined the channel.

mano-ranjith (Mon, 26 Feb 2018 09:52:22 GMT):
Has joined the channel.

purandam (Mon, 26 Feb 2018 11:15:02 GMT):
I have configured SoftHsm in my project (node sdk [alpha]) as it is given below. bccsp: default: PKCS11 PKCS11: Library: /usr/local/Cellar/softhsm/2.1.0/lib/softhsm/libsofthsm2.so Pin: 98765432 Label: ForFabric hash: SHA2 security: 256 filekeystore: # The directory used for the software file-based keystore keystore: msp/keystore But I got error PKCS11 is not initilazied . If anybody has an idea plz share. Note: I have installed softhsm, openssl etc.

jrosmith (Mon, 26 Feb 2018 15:04:01 GMT):
@mastersingh24 thank you!

jrosmith (Mon, 26 Feb 2018 15:04:16 GMT):
@davidkhala which version of the sdk is this for? 1.1?

mastersingh24 (Mon, 26 Feb 2018 15:39:20 GMT):
@purandam `softhsm2-util --init-token --slot 0 --label "My token 1"`

mastersingh24 (Mon, 26 Feb 2018 15:39:20 GMT):
@purandam `softhsm2-util --init-token --slot 0 --label "My token 1"` enter whatever you want for the SO pin and then for the User pin enter 98765432

jrosmith (Mon, 26 Feb 2018 16:36:58 GMT):
is there a health check function in the node_sdk to get the status of the peer?

davidkhala (Tue, 27 Feb 2018 02:41:46 GMT):
@jrosmith The link I attached before comes from master branch, which is newer than 1.1 tag

davidkhala (Tue, 27 Feb 2018 02:42:53 GMT):
But I am not sure the earliest version that including this line of code.

jamryl (Tue, 27 Feb 2018 02:52:02 GMT):
Has joined the channel.

yoko (Tue, 27 Feb 2018 03:31:00 GMT):
``` client.createUser( {username: caImport.orgs[userOrg].username, mspid: caImport.orgs[userOrg].mspid, cryptoContent: { privateKey: prvKey, signedCert: sgnCert } }); ``` what exactly are the private key and signed cert? is it the key.pem and cert.pem from my fabric orderer running on kube?

yoko (Tue, 27 Feb 2018 03:31:00 GMT):
``` client.createUser( {username: caImport.orgs[userOrg].username, mspid: caImport.orgs[userOrg].mspid, cryptoContent: { privateKey: prvKey, signedCert: sgnCert } }); ``` what exactly are the private key and signed cert? is it the key.pem and cert.pem from my fabric orderer running on kube? i get this error when i try: ``` 2018-02-26T20:37:18.26-0500 [APP/PROC/WEB/0] ERR error: [crypto_ecdsa_aes]: importKey - {} 2018-02-26T20:37:18.26-0500 [APP/PROC/WEB/0] ERR error: [Client.js]: Error: Does not understand PEM contents other than ECDSA private keys and certificates 2018-02-26T20:37:18.26-0500 [APP/PROC/WEB/0] ERR at CryptoSuite_ECDSA_AES.importKey (/home/vcap/app/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:196:12) 2018-02-26T20:37:18.26-0500 [APP/PROC/WEB/0] ERR at promise.then (/home/vcap/app/node_modules/fabric-client/lib/Client.js:1091:35) 2018-02-26T20:37:18.26-0500 [APP/PROC/WEB/0] ERR error: [fcw] Failed to get enrollment marbles-Docker Compose Network-composerchannel-peer0.org1.example.com Error: Does not understand PEM contents other than ECDSA private keys and certificates ```

apurvmehra (Tue, 27 Feb 2018 08:01:00 GMT):
Has joined the channel.

TobiasN (Tue, 27 Feb 2018 08:44:12 GMT):
Has joined the channel.

sudheesh001 (Tue, 27 Feb 2018 08:56:37 GMT):
Are there any test cases for the `decodeBlockMetadata()`? The genesis block being used for the test cases do not have any metadata fields i.e. are empty strings. Does anyone have a sample of a block that contains metadata information?

purandam (Tue, 27 Feb 2018 11:54:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HbWJTH2yWe9eKCGzu) @mastersingh24 Thanks for the solution.

jrosmith (Tue, 27 Feb 2018 16:28:39 GMT):
hey all, i don't suppose theres a good way of health checking the orderer via the sdk?

yetanotheruser23 (Tue, 27 Feb 2018 21:22:52 GMT):
Hey all, I'm using the fabric-client sdk to create a user and run invoke a transaction. I'm using the invoke.js from the fabcar sample. I'm getting this error when I try to invoke. ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 12 UNIMPLEMENTED: unknown service protos.Endorser```

yetanotheruser23 (Tue, 27 Feb 2018 21:23:11 GMT):
Does anyone know why I might be getting this error?

TobiasN (Wed, 28 Feb 2018 00:54:22 GMT):
@jrosmith I don't know if that is supposed to be *the* way, but I see that composer chaincode implements a function like *pong* that you can ping to. so you can ping the peer and see if it can execute chaincode. Then you could probably try to order that _useless_ transaction and verify ordering. Anyway, if you have many transactions per minute, you just need to analyse the log. I think this tasks are actually considered to be handled by the server administrators. and don't really need to be build in to hyperledger.

TobiasN (Wed, 28 Feb 2018 01:32:19 GMT):
hi, when query blocks using *channel.queryBlock* is it possible to determine if the containing transactions are valid? in the documentation it is described, that _Transactions in the block are tagged as being valid or invalid._ https://hyperledger-fabric.readthedocs.io/en/release/txflow.html

seth (Wed, 28 Feb 2018 03:26:13 GMT):
Has joined the channel.

chandrakanthm (Wed, 28 Feb 2018 09:50:02 GMT):
Has joined the channel.

jrosmith (Wed, 28 Feb 2018 14:31:34 GMT):
@TobiasN thank you for the suggestion! ended up going with using `sendDeliver` to send a blank envelope and check whether or not I received SERVICE_UNAVAILABLE or BAD_REQUEST.

yetanotheruser23 (Wed, 28 Feb 2018 18:26:37 GMT):
Hi, I was running query.js on the fabcar fabric-sample and I get the following error ```Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err MSP Org1MSP is unknown``` Does anyone know why I might be getting it?

bretharrison (Wed, 28 Feb 2018 19:01:45 GMT):
@javrevasandeep When registering a peer, build the request to include the `{role: 'peer'}` on the `fabric-ca.register(request, registrar);` call.

bretharrison (Wed, 28 Feb 2018 19:16:52 GMT):
@TobiasN Transaction statuses are contained in BlockMetadata. ``` block :

bretharrison (Wed, 28 Feb 2018 19:16:52 GMT):
@TobiasN Transaction statuses are contained in BlockMetadata. ``` block : { header : {}, data : {}, metadata : [ signatures : {}, lastConfigBlock : n, transaction_statuses : [bytes] ]

bretharrison (Wed, 28 Feb 2018 19:16:52 GMT):
@TobiasN Transaction statuses are contained in BlockMetadata. ``` block : { header : {}, data : {}, metadata : [ signatures : {}, lastConfigBlock : n, transaction_statuses : [bytes] ] } ``` Each byte in the array is the status for transaction in the same order in the block data. Convert the byte value to an int and a transaction status is: ``` enum TxValidationCode { VALID = 0; NIL_ENVELOPE = 1; BAD_PAYLOAD = 2; BAD_COMMON_HEADER = 3; BAD_CREATOR_SIGNATURE = 4; INVALID_ENDORSER_TRANSACTION = 5; INVALID_CONFIG_TRANSACTION = 6; UNSUPPORTED_TX_PAYLOAD = 7; BAD_PROPOSAL_TXID = 8; DUPLICATE_TXID = 9; ENDORSEMENT_POLICY_FAILURE = 10; MVCC_READ_CONFLICT = 11; PHANTOM_READ_CONFLICT = 12; UNKNOWN_TX_TYPE = 13; TARGET_CHAIN_NOT_FOUND = 14; MARSHAL_TX_ERROR = 15; NIL_TXACTION = 16; EXPIRED_CHAINCODE = 17; CHAINCODE_VERSION_CONFLICT = 18; BAD_HEADER_EXTENSION = 19; BAD_CHANNEL_HEADER = 20; BAD_RESPONSE_PAYLOAD = 21; BAD_RWSET = 22; ILLEGAL_WRITESET = 23; INVALID_OTHER_REASON = 255; } ```

TobiasN (Thu, 01 Mar 2018 01:06:40 GMT):
@bretharrison Thank you, that is awesome, Yesterday in the evening I also found that. I found that, when looking at the eventhub, I saw when listening for a transaction the eventhub provide the * TxValidationCode* as second argument. so I followed back that definition. Now I wrote a map function that is making translating the blocks and transactions into more reasonable and less deep objects, but probably not 100% accurate. Thanks a lot, I should directly have said when I found it.

TobiasN (Thu, 01 Mar 2018 01:06:40 GMT):
@bretharrison Thank you, that is awesome, Yesterday in the evening I also found that. I found that, when looking at the eventhub, I saw when listening for a transaction the *eventhub.registerTxEvent* provide the * TxValidationCode* as second argument. so I followed back that definition. Now I wrote a map function that is making translating the blocks and transactions into more reasonable and less deep objects, but probably not 100% accurate. Thanks a lot, I should directly have said when I found it.

kamisdy (Thu, 01 Mar 2018 02:33:23 GMT):
Hello, does we have a version map for fabric-sdk-node to farbic? I want to use the fabric 1.0.5. and I want to know which the node sdk version adopt for it?

TobiasN (Thu, 01 Mar 2018 03:34:02 GMT):
@kamisdy just use the latest node-sdk it will be fine

TobiasN (Thu, 01 Mar 2018 03:34:51 GMT):
my packageJSON has ```

TobiasN (Thu, 01 Mar 2018 03:34:51 GMT):
my packageJSON has ``` "fabric-ca-client": "^1.0.0", "fabric-client": "^1.0.0",```

kamisdy (Thu, 01 Mar 2018 04:15:33 GMT):
But I found there are some func removed in the latest version, does the community make some notes for the changes (detail)?

davidkhala (Thu, 01 Mar 2018 07:20:40 GMT):
I am trying to build and test node-sdk source code on my machine

davidkhala (Thu, 01 Mar 2018 07:20:46 GMT):
Saw this:

davidkhala (Thu, 01 Mar 2018 07:20:47 GMT):
2018-03-01 07:08:21.485 UTC [orderer/multichain] newLedgerResources -> CRIT 068 Error creating configtx manager and handlers: Error deserializing key Capabilities for group /Channel: Unexpected key Capabilities panic: Error creating configtx manager and handlers: Error deserializing key Capabilities for group /Channel: Unexpected key Capabilities goroutine 1 [running]: panic(0xb44a80, 0xc4202dce50) /opt/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panicf(0xc420238db0, 0xc860ec, 0x30, 0xc4202dcd90, 0x1, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:194 +0x127 github.com/hyperledger/fabric/orderer/multichain.(*multiLedger).newLedgerResources(0xc4202c46e0, 0xc4203ab2f0, 0xc4203ab2f0) /opt/gopath/src/github.com/hyperledger/fabric/orderer/multichain/manager.go:153 +0x393 github.com/hyperledger/fabric/orderer/multichain.NewManagerImpl(0x1246880, 0xc4203e00e0, 0xc4203aadb0, 0x1243480, 0x128b4a8, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/orderer/multichain/manager.go:103 +0x23b main.initializeMultiChainManager(0xc42029a000, 0x1243480, 0x128b4a8, 0xc420244a10, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/orderer/main.go:220 +0x27a main.main()

davidkhala (Thu, 01 Mar 2018 07:21:06 GMT):
in container orderer.example.com

razik29 (Thu, 01 Mar 2018 14:30:22 GMT):
Has joined the channel.

razik29 (Thu, 01 Mar 2018 14:39:19 GMT):
Hi all, I am using the stub.getQueryResult(queryString), and my queryString includes selector and fields (trying to filter out only the required fields). But filtering fields does not seem to work. My fields in the ledger are, fullName, location, age. My query string looks like this, `{"selector":{"location" : "London"},"fields":["_id", "fullName"]}` *note:* selector works. It retrieves all the records with location "London" but each record having ALL fields. Have checked the couch db docs, doesn't seem to have a problem with the query string. Anyone faced this or any idea?

bretharrison (Thu, 01 Mar 2018 18:39:37 GMT):
@kamisdy Would you be able to indicate the functions that have been removed ?

bretharrison (Thu, 01 Mar 2018 18:41:19 GMT):
@davidkhala Looks like 1.0. images running against 1.1 generated configuration

SethiSaab (Thu, 01 Mar 2018 19:16:34 GMT):
Has joined the channel.

SethiSaab (Thu, 01 Mar 2018 19:17:00 GMT):
hi team i am getting error while enrolling admin user ... .when i run this command node enrollAdmin.js i get the following error Error: connect ECONNREFUSED 127.0.0.1:7054] at ClientRequest. (/home/rio/Public/IBM HyperLedger Playground/HyperLedger Fbric Sample Apps/fabric-samples/fabcar/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:883:12) at ClientRequest.emit (events.js:127:13) at Socket.socketErrorListener (_http_client.js:394:9) at Socket.emit (events.js:127:13) at emitErrorNT (internal/streams/destroy.js:64:8) at process._tickCallback (internal/process/next_tick.js:152:19) Failed to enroll admin: Error: Failed to enroll admin

bretharrison (Thu, 01 Mar 2018 20:13:45 GMT):
@SethiSaab most likely your fabric-ca is not running

davidkhala (Fri, 02 Mar 2018 04:11:49 GMT):
in package.json "version": "1.1.0-snapshot", but it doesn't exist in docker hub, is it specially for internal test use?

davidkhala (Fri, 02 Mar 2018 04:28:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tQnun8CmPRn7eHicj) @bretharrison I know the reason, since in Chris change the version in package.json to be 1.1.0-snapshot in master, making node-sdk test plan behave unpredictable since 1.1.0-snapshot not exist on docker hub.

davidkhala (Fri, 02 Mar 2018 04:28:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tQnun8CmPRn7eHicj) @bretharrison I guess I got the reason. Since Chris changed the version in package.json to be 1.1.0-snapshot(not exist in master branch) in master branch, making node-sdk test plan behave unpredictable, depending on local 'latest' docker images.

davidkhala (Fri, 02 Mar 2018 04:28:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tQnun8CmPRn7eHicj) @bretharrison I guess I got the reason. Since Chris changed the version in package.json to be 1.1.0-snapshot(not exist on docker hub) in master branch, making node-sdk test plan behave unpredictable, depending on local 'latest' docker images.

Arne_K (Fri, 02 Mar 2018 08:40:20 GMT):
Has joined the channel.

igetgames (Fri, 02 Mar 2018 17:46:32 GMT):
Has joined the channel.

mastersingh24 (Fri, 02 Mar 2018 22:43:39 GMT):
@SethiSaab - are you running on Windows 7 with Docker Toolbox?

balakrishna.devasani (Sat, 03 Mar 2018 07:28:15 GMT):
Hi Team, I am facing this error when query transaction is triggered (Query will return around 15mb of data). chaincode error logs: GetAssetLatestEvents(): GetList operation failed. Error : [6c910f34]No ledger context for GetStateByRange. Sending ERROR 2018-03-02 18:32:55.807 UTC [shim] handleQueryStateClose -> ERRO 167cc [6c910f34]Received ERROR 2018-03-02 18:32:55.809 UTC [shim] handleQueryStateClose -> ERRO 167cd [6c910f34]Received ERROR 2018-03-02 18:32:55.809 UTC [shim] handleQueryStateClose -> ERRO 167ce [6c910f34]Received ERROR Peer error log: TRUNCATED>>17c35 [[6c910f34 ERROR]]Failed to get transaction context. Sending %!s(MISSING) 2018-03-02 18:32:58.241 UTC [chaincode] 2 -> ERRO 17c36 [[6c910f34 ERROR]]Failed to get transaction context. Sending %!s(MISSING) 2018-03-02 18:32:58.241 UTC [chaincode] 2 -> ERRO 17c37 [[6c910f34 ERROR]]Failed to get transaction context. Sending %!s(MISSING) 2018-03-02 18:32:58.241 UTC [chaincode] 2 -> ERRO 17c38 [[6c910f34 ERROR]]Failed to get transaction context. Sending %!s(MISSING) NodeJs logs: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) at new createStatusError (BEAM/node_modules/grpc/src/client.js:64:15) at /BEAM/node_modules/grpc/src/client.js:583:15 can anyone help, how to solve this issue?

qizhang (Sun, 04 Mar 2018 03:33:21 GMT):
I got the following error when `npm install` under `fabric-sdk-node`, any suggestion about how to solve it? Thanks!

qizhang (Sun, 04 Mar 2018 03:33:41 GMT):
``` npm ERR! code 128 npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursive npm ERR! fatal: 'submodule' appears to be a git command, but we were not npm ERR! able to execute it. Maybe git-submodule is broken? npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-03-04T03_27_37_204Z-debug.log ```

balakrishna.devasani (Sun, 04 Mar 2018 11:05:22 GMT):
Hi Team, I am facing error when a query transaction is triggered (Query will return around 15mb of data) exactly after "*30*" secs of the query request initiated. Can anyone help me how to increase query request timeout limit in the node-SDK application? Any help will be much appreciated. Node SDK logs: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: *Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction)* at new createStatusError (BEAM/node_modules/grpc/src/client.js:64:15) at /BEAM/node_modules/grpc/src/client.js:583:15 chaincode error logs: GetList operation failed. Error : *[6c910f34]No ledger context for GetStateByRange*. Sending ERROR 2018-03-02 18:32:55.807 UTC [shim] handleQueryStateClose -> ERRO 167cc [6c910f34]Received ERROR 2018-03-02 18:32:55.809 UTC [shim] handleQueryStateClose -> ERRO 167cd [6c910f34]Received ERROR 2018-03-02 18:32:55.809 UTC [shim] handleQueryStateClose -> ERRO 167ce [6c910f34]Received ERROR Peer error log: TRUNCATED>>17c35 [[6c910f34 ERROR]]Failed to get transaction context. Sending %!s(MISSING) 2018-03-02 18:32:58.241 UTC [chaincode] 2 -> ERRO 17c36 [[6c910f34 ERROR]]Failed to get transaction context. Sending %!s(MISSING) 2018-03-02 18:32:58.241 UTC [chaincode] 2 -> ERRO 17c37 [[6c910f34 ERROR]]Failed to get transaction context. Sending %!s(MISSING) 2018-03-02 18:32:58.241 UTC [chaincode] 2 -> ERRO 17c38 [[6c910f34 ERROR]]Failed to get transaction context. Sending %!s(MISSING)

kostas (Sun, 04 Mar 2018 18:48:09 GMT):
Has joined the channel.

kostas (Sun, 04 Mar 2018 18:51:20 GMT):
Based on the documentation that is posted out there, how can I figure out the exact path (i.e. directory structure and contents) I should pass to the `newDefaultKeyValueStore` method? https://fabric-sdk-node.github.io/BaseClient.html#.newDefaultKeyValueStore__anchor

kostas (Sun, 04 Mar 2018 18:51:20 GMT):
Based on the documentation that is posted out there, how can I figure out the exact path (i.e. directory structure and contents) I should pass to the `newDefaultKeyValueStore` [method](https://fabric-sdk-node.github.io/BaseClient.html#.newDefaultKeyValueStore__anchor)?

kostas (Sun, 04 Mar 2018 18:51:20 GMT):
Based on the documentation that is posted out there, how does one figure out the exact path (i.e. directory structure and contents) that they should pass to the `newDefaultKeyValueStore` [method](https://fabric-sdk-node.github.io/BaseClient.html#.newDefaultKeyValueStore__anchor)?

davidkhala (Mon, 05 Mar 2018 00:14:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rFJ3YJTb7YuzScT35) @kostas the path

davidkhala (Mon, 05 Mar 2018 00:14:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rFJ3YJTb7YuzScT35) @kostas The path can be arbitrary as you want, since it is root path

sudheesh001 (Mon, 05 Mar 2018 08:53:00 GMT):
Requesting review on JIRA-8651 , Patch for review at https://gerrit.hyperledger.org/r/#/c/18721/

davidkhala (Mon, 05 Mar 2018 08:56:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=h7MNyPp3nYSHhzi8L) @sudheesh001 you could use #fabric-pr-review channel for CR notification

sudheesh001 (Mon, 05 Mar 2018 08:56:23 GMT):
Thanks @davidkhala Joining the channel

kostas (Mon, 05 Mar 2018 15:44:27 GMT):
@davidkhala: Thanks. This is not what I'm asking however. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rFJ3YJTb7YuzScT35) @kostas The path can be arbitrary as you want, since it is root path

kostas (Mon, 05 Mar 2018 15:44:27 GMT):
@davidkhala: Thanks. This is not what I'm asking however.

kostas (Mon, 05 Mar 2018 15:44:58 GMT):
@bretharrison: Any pointers for the above?

bretharrison (Mon, 05 Mar 2018 15:59:15 GMT):
the shipped default is a file based store, it requires the {path: }, the path is up to the user https://fabric-sdk-node.github.io/BaseClient.html ``` newDefaultKeyValueStore(options) Obtains an instance of the KeyValueStore class. By default it returns the built-in implementation, which is based on files (FileKeyValueStore). This can be overriden with a configuration setting key-value-store, the value of which is the full path of a CommonJS module for the alternative implementation. Parameters: Name Type Description options Object Specific to the implementation, for initializing the instance. For the built-in file-based implementation, this requires a single property path to the top-level folder for the store ```

kostas (Mon, 05 Mar 2018 16:04:34 GMT):
@bretharrison: Right, but what is that directory's structure? What should its contents be?

kostas (Mon, 05 Mar 2018 16:05:44 GMT):
This is what I'm trying to find in the SDK documentation, without luck so far.

bretharrison (Mon, 05 Mar 2018 16:28:57 GMT):
The file based key value store will work with any directory structure and it will maintain the contents within that directory

bretharrison (Mon, 05 Mar 2018 16:28:57 GMT):
The file based key value store will work with any directory structure and it will maintain the contents within that directory, it would be better on the initial usage of a directory that it be empty to avoid any collision of file names.

kostas (Mon, 05 Mar 2018 20:40:24 GMT):
Assume I have keys and certificates, courtesy of cryptogen.

kostas (Mon, 05 Mar 2018 20:41:09 GMT):
Which keys and certificates do I need to transfer to the directory I will point the `newDefaultKeyValueStore` constructor to?

kostas (Mon, 05 Mar 2018 20:41:23 GMT):
And is there an internal directory structure that I need to maintain?

kostas (Mon, 05 Mar 2018 20:41:40 GMT):
These are the questions that are on my mind. /cc @bretharrison

massiveashok2014 (Mon, 05 Mar 2018 20:55:16 GMT):
Has joined the channel.

massiveashok2014 (Mon, 05 Mar 2018 21:03:34 GMT):
Hi, Can anyone help to understand and enroll cert for my application to post transaction into fabric

massiveashok2014 (Mon, 05 Mar 2018 21:03:51 GMT):
i have installed fabric-ca-server and client

massiveashok2014 (Mon, 05 Mar 2018 21:04:57 GMT):
about to add 5 peers , but doubt on do i need to get ecert before add a peer into fabric network?

bretharrison (Mon, 05 Mar 2018 21:26:25 GMT):
The idea is that NodeSDK does not know where the crypto material comes from and the user will give it to the NodeSDK and it will store it into the state store and crypto store. The user is not expected to know anything about the store other than where it is, like the directory when file based, like the db name when db based, like the hardware port number when HSM based. The user will have to know the API's to give the material to the NodeSDK.

bretharrison (Mon, 05 Mar 2018 21:26:25 GMT):
@kostas The idea is that NodeSDK does not know where the crypto material comes from and the user will give it to the NodeSDK and it will store it into the state store and crypto store. The user is not expected to know anything about the store other than where it is, like the directory when file based, like the db name when db based, like the hardware port number when HSM based. The user will have to know the API's to give the material to the NodeSDK.

davidkhala (Tue, 06 Mar 2018 02:43:50 GMT):
It just like nodesdk cache cypro material and state store in provided( by sdk user or default) directory, after sdk user had told sdk where to find the original crypto material before( at the first time)

davidkhala (Tue, 06 Mar 2018 02:43:50 GMT):
It just like nodesdk cache cypro material and state store in provided( by sdk user or default) directory, after sdk user had told sdk where to find the original crypto material at the first time

oplmzaq2 (Tue, 06 Mar 2018 06:50:09 GMT):
Has joined the channel.

harshal.gandhe (Tue, 06 Mar 2018 07:50:30 GMT):
Has joined the channel.

harshal.gandhe (Tue, 06 Mar 2018 08:01:46 GMT):
Hello, I have deployed my Hyperledger Network with two organization. After that i have developed application which can interact with my HF Network with Node SDK to do following operations. 1. Enroll User 2. Deploy Chaincode I am able to enroll user and deploy chaincode on my first Organization which is Cam1. But when i try to Enroll user on my second Organization which is Cam2 i get following Error message: `Error: Calling enrollment endpoint failed with error [Error: socket hang up] at ClientRequest. (/home/hgan/middleware/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:711:12) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:309:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at emitErrorNT (net.js:1277:8) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) `

lukaszhalicki (Tue, 06 Mar 2018 08:06:01 GMT):
Has joined the channel.

dsanchezseco (Tue, 06 Mar 2018 10:35:37 GMT):
Has joined the channel.

dsanchezseco (Tue, 06 Mar 2018 12:05:16 GMT):
is there any way to specify the CA to which check the certs? I have a root and a intermediate CA, this last one is the one that issued the cert with which i'm generating the proposal but it's being heck against the root instead ```details: 'Failed to deserialize creator identity, err 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 "rca-org2-admin")' ```

dsanchezseco (Tue, 06 Mar 2018 12:05:47 GMT):
the CA to check the cert should be ica-org2-admin

dsanchezseco (Tue, 06 Mar 2018 12:05:47 GMT):
the CA to check the cert should be `ica-org2-admin`

g.vamsi (Tue, 06 Mar 2018 16:59:09 GMT):
Has joined the channel.

rjones (Tue, 06 Mar 2018 18:07:37 GMT):
dave.enyeart

dave.enyeart (Tue, 06 Mar 2018 20:15:32 GMT):
bretharrison

grice_32 (Tue, 06 Mar 2018 22:32:13 GMT):
Has joined the channel.

dave.enyeart (Wed, 07 Mar 2018 01:22:10 GMT):
@zhaochy https://gerrit.hyperledger.org/r/#/c/18755/ is ready for final review and merge

username343 (Wed, 07 Mar 2018 12:26:51 GMT):
can anyone please tell me how do i deal with the grpc max message size limit of 4mb?

rickr (Wed, 07 Mar 2018 12:39:29 GMT):
Try searching ? https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GKbZ99i8zjwNq5xYx

davidkhala (Wed, 07 Mar 2018 15:12:37 GMT):
I suggest to lower case the channelname in creating channel object since uppercase char in channel name is not supported in block file https://jira.hyperledger.org/browse/FAB-8687

huy.tranibm (Wed, 07 Mar 2018 18:33:50 GMT):

Clipboard - March 7, 2018 12:33 PM

huy.tranibm (Wed, 07 Mar 2018 18:34:04 GMT):

Clipboard - March 7, 2018 12:34 PM

huy.tranibm (Wed, 07 Mar 2018 18:34:50 GMT):

Clipboard - March 7, 2018 12:34 PM

huy.tranibm (Wed, 07 Mar 2018 18:34:58 GMT):

Clipboard - March 7, 2018 12:34 PM

huy.tranibm (Wed, 07 Mar 2018 18:35:25 GMT):
I think this was left uncommented out in the alpha code by mistake for testing purposes

huy.tranibm (Wed, 07 Mar 2018 18:53:43 GMT):
Oh sorry channel this is node

zonked 1 (Wed, 07 Mar 2018 21:22:15 GMT):
Hi all, currently on 1.1preview registerChaincodeEvent behaves in an unconventional way. When setting more than one event in a block the event that was set first is replicated instead of emitting each event individually. Can I please get some clarity on whether there is an existing problem with either SetEvent or registerChaincodeEvent?

harshal.gandhe (Thu, 08 Mar 2018 05:00:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Asuy77H7dK39YxHTx) Hello, Can anyone help me with this ?

SuvitPatil (Thu, 08 Mar 2018 05:26:38 GMT):
Has joined the channel.

SuvitPatil (Thu, 08 Mar 2018 05:49:58 GMT):
Hello Team, I am using Fabcar project from fabric-samples. I used PKCS11 environment variables before running enrollment.js : export CRYPTO_PKCS11_LIB=/usr/local/lib/softhsm/libsofthsm2.so export CRYPTO_PKCS11_SLOT="1" export CRYPTO_PKCS11_PIN=98765432 but gives following error : Store path:/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/fabcar/hfc-key-store in if Successfully enrolled admin user "admin" Error: toBytes: not allowed for private key at PKCS11_ECDSA_KEY.toBytes (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/ecdsa/pkcs11_key.js:165:10) at fabric_ca_client.enroll.then (/home/suvit/GoWork/fabric_V1/fabricNode/fabric-samples/fabcar/enrollAdmin.js:61:66) at at process._tickCallback (internal/process/next_tick.js:188:7) Failed to enroll admin: Error: Failed to enroll admin

sudheesh001 (Thu, 08 Mar 2018 06:50:18 GMT):
The node SDK makes a request for decoding the orderer configuration protos by doing `_ordererConfigurationProto.CreationPolicy` However, the orderer's configuration proto doesn't have any structure/object called `CreationPolicy()`. Can someone point me to where this is?

AndrewRy 1 (Thu, 08 Mar 2018 08:21:03 GMT):
Has joined the channel.

DarshanBc (Thu, 08 Mar 2018 08:57:45 GMT):
I am trying to run balance transfer example wit different channel name while instantiating I am getting this error ```channel.getChannelEventHubsForOrg is not a function UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to instantiate. cause:TypeError: channel.getChannelEventHubsForOrg is not a function ```

DarshanBc (Thu, 08 Mar 2018 09:30:28 GMT):
I found the reason for this the function doesn't exist in node_modules directory and its old not compatible with v1.1

DarshanBc (Thu, 08 Mar 2018 09:31:24 GMT):
Is there any way I can update or download new sdk which comes with functions of v1.1 inside node_modules

TobiasN (Thu, 08 Mar 2018 09:33:46 GMT):
@DarshanBc here you can find a list of versions you can choose from https://unpkg.com/fabric-client@1.0.4/ just use # npm install --save fabric-client@1.1.0-alpha

DarshanBc (Thu, 08 Mar 2018 09:35:31 GMT):
@TobiasN Thank you

DarshanBc (Thu, 08 Mar 2018 09:35:36 GMT):
I am trying

DarshanBc (Thu, 08 Mar 2018 09:38:05 GMT):
It worked thank you

DarshanBc (Thu, 08 Mar 2018 10:05:18 GMT):
I am trying to create 2 channels in v1.1 where both the channels have one orgs in them hence this is my network-config.yaml file is this ```channels: # name of the channel channel1: # 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" 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 peer1.org1.example.com: endorsingPeer: false chaincodeQuery: true ledgerQuery: true eventSource: false channel2: # 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" orderers: - orderer.example.com # Required. list of peers from participating orgs peers: peer0.org2.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer1.org2.example.com: endorsingPeer: false chaincodeQuery: true ledgerQuery: true eventSource: false # [Optional]. what chaincodes are expected to exist on this channel? The application can use # this information to validate that the target peers are in the expected state by comparing # this list with the query results of getInstalledChaincodes() and getInstantiatedChaincodes() chaincodes: # the format follows the "cannonical name" of chaincodes by fabric code - mycc:v0 ```

DarshanBc (Thu, 08 Mar 2018 10:05:48 GMT):
I am getting an error inside orderer saying ```[channel: channel2] Rejecting broadcast of config message from 172.18.0.1:59932 because of error: Attempted to include a member which is not in the consortium 2018-03-08 10:01:01.658 UTC [orderer/common/server] func1 -> DEBU 3fe Closing Broadcast stream ```

mastersingh24 (Thu, 08 Mar 2018 10:47:49 GMT):
@DarshanBc - How are you creating the channel?

DarshanBc (Thu, 08 Mar 2018 10:50:46 GMT):
executed these commands `configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel2.tx -channelID chanel2`

DarshanBc (Thu, 08 Mar 2018 10:50:59 GMT):
`configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./genesis.block`

DarshanBc (Thu, 08 Mar 2018 10:51:13 GMT):
this is my configtx.yaml file

DarshanBc (Thu, 08 Mar 2018 10:51:22 GMT):

configtx.yaml.txt

DarshanBc (Thu, 08 Mar 2018 10:52:22 GMT):

network-config.yaml.txt

DarshanBc (Thu, 08 Mar 2018 10:52:54 GMT):
and then I am running this ```curl -s -X POST \ http://localhost:4000/channels \ -H "authorization: Bearer $ORG2_TOKEN" \ -H "content-type: application/json" \ -d '{ "channelName":"channel2", "channelConfigPath":"../artifacts/channel/channel2.tx" }'```

dokany (Thu, 08 Mar 2018 12:30:51 GMT):
Has joined the channel.

ShereenSallam (Thu, 08 Mar 2018 12:31:43 GMT):
Has joined the channel.

pd93 (Thu, 08 Mar 2018 21:32:35 GMT):
Hey, will there be an `1.1.0-rc1` release on npm? or is it just snapshots now?

pd93 (Thu, 08 Mar 2018 21:32:35 GMT):
Hey, will there be an `1.1.0-rc1` release on npm? or is it just snapshots now?

zhangguiping (Fri, 09 Mar 2018 01:47:39 GMT):
Has joined the channel.

VigneshkumarChinnachamy (Fri, 09 Mar 2018 05:40:34 GMT):
Has joined the channel.

kai_den (Fri, 09 Mar 2018 09:02:05 GMT):
Has joined the channel.

kai_den (Fri, 09 Mar 2018 09:15:09 GMT):
Nice to meet you. I started Hyperledger tutorial yesterday. I would like to know how to deploy chain code using fabric-sdk-node. Please help me and please forgive my poor English...

TobiasN (Fri, 09 Mar 2018 09:26:55 GMT):
@kai_den the fabric-samples balance-transfer is showing how to do it: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/install-chaincode.js

kai_den (Fri, 09 Mar 2018 10:00:32 GMT):
@TobiasN Thank you very much!! I try deploy chaincode.

AnthonyRoux (Fri, 09 Mar 2018 15:04:41 GMT):
Has joined the channel.

ShereenSallam (Sat, 10 Mar 2018 12:19:21 GMT):
User User_1 added by ShereenSallam.

SethiSaab (Sat, 10 Mar 2018 19:46:21 GMT):
hi team i am getting error while doing channel configuration config update generation failure: could not parse application to application group: setting up the MSP manager failed: 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")

grapebaba (Mon, 12 Mar 2018 02:10:57 GMT):
hi, guys

grapebaba (Mon, 12 Mar 2018 02:11:43 GMT):
is there an example in fabric-node-sdk when peer enabled client SSL auth?

zhaochy (Mon, 12 Mar 2018 03:54:18 GMT):
@grapebaba https://fabric-sdk-node.github.io/tutorial-mutual-tls.html may help you

kiattchaip (Mon, 12 Mar 2018 06:48:45 GMT):
Has joined the channel.

kai_den (Mon, 12 Mar 2018 11:05:28 GMT):
@TobiasN Hi , I'm trying deploy chain code using fabric-sample. Before chain code deploying , I Build first network but It does not work well with errors. ./byfn.sh: line 268: /home/ubuntu/test/fabric-samples/first-network/../bin/configtxgen: Permission denied I executed the following command to resolve the error. There is the same error after that. chmod -R 777 fabric-sample It is a reference site. http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#why-couchdb Someone please help me...

kai_den (Mon, 12 Mar 2018 11:05:28 GMT):
@TobiasN Hi , I'm trying deploy chain code using fabric-sample. Before chain code deploying , I Build first network but It does not work well with errors. ./byfn.sh: line 268: /home/ubuntu/test/fabric-samples/first-network/../bin/configtxgen: Permission denied I executed the following command to resolve the error. There is the same error after that. chmod -R 777 fabric-sample It is a reference site. http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#why-couchdb Someone please help me...

kai_den (Mon, 12 Mar 2018 11:09:43 GMT):

error.png

grapebaba (Mon, 12 Mar 2018 11:55:01 GMT):
I found when start client tls auth, SSL connection is very unstable, sometimes error sometimes works fine

sayan.hlf (Mon, 12 Mar 2018 14:08:15 GMT):
Has joined the channel.

sayan.hlf (Mon, 12 Mar 2018 14:12:04 GMT):
Hi, I am using Node SDK to perform a transaction in Hyperledger. Once the transaction is performed I am using the txn_id to fetch the transaction details using Node SDK (you can find API to get transaction details in balance-transfer application). From transaction details, I am getting a block_num low but when I guery it using the Node API to get block details, the block detail contains information of a different transaction. How can I get block number from transaction details?

joaquimpedrooliveira (Mon, 12 Mar 2018 17:54:31 GMT):
Has joined the channel.

TobiasN (Tue, 13 Mar 2018 00:37:30 GMT):
@kai_den sorry I don't know what that is, seems something with your filesystem, not directly related to hyperledger.

davidkhala (Tue, 13 Mar 2018 01:36:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EqFfA6AysetfShKQ8) @sayan.hlf would 'queryBlockByTxID' function help you?

sayan.hlf (Tue, 13 Mar 2018 05:28:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pT3pxKoDycXgfbLkf) @davidkhala Could not find 'queryBlockByTxID' method anywhere in the 'balance-transfer' app. Also searched for the method in Channel.js within node_modules/fabric-client/lib but couldn't find anything. Any help will be appreciated.

kai_den (Tue, 13 Mar 2018 06:06:15 GMT):
@TobiasN Thanks! I uncovered the current problems and solutions.

mne (Tue, 13 Mar 2018 10:00:05 GMT):
Has left the channel.

pd93 (Tue, 13 Mar 2018 10:23:09 GMT):
Hey, will there be a `1.1.0-rc1` release on npm? or is it just snapshots now?

bretharrison (Tue, 13 Mar 2018 12:37:16 GMT):
https://fabric-sdk-node.github.io/Channel.html#queryBlockByTxID

bretharrison (Tue, 13 Mar 2018 12:37:16 GMT):
https://fabric-sdk-node.github.io/Channel.html#queryBlockByTxID @sayan.hlf

bretharrison (Tue, 13 Mar 2018 12:40:01 GMT):
There is not plan for 1.1.0-rc1 as there are snapshots available (which are really a continuous flow of release candidates) @pd93

pd93 (Tue, 13 Mar 2018 12:45:41 GMT):
@bretharrison Okay thanks :) The only reason I mentioned is because I have an automated workflow that I can parse a fabric version number and it will bring up a network/api on that version. This obviously breaks when there is no tag for the specified version. Even if the tag is there purely for convenience's sake, it'd be appreciated. Otherwise, I have to patch my build scripts each time I change version. I feel like this level of consistency across the fabric projects should be expected - even if it's just a random snapshot from around the time `rc1` was released that gets tagged.

bretharrison (Tue, 13 Mar 2018 12:48:59 GMT):
The NodeSDK versions do not track one to one with the fabric, for example fabric 1.0.5 was out a month before NodeSDK had a reason to publish a new version

davidkhala (Tue, 13 Mar 2018 13:09:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qGTJZqthLgm7z9ARj) @pd93 See same issue when testing on my local machine, I skip it by change to to be 'rc1' locally.

pd93 (Tue, 13 Mar 2018 13:15:17 GMT):
@bretharrison I understand that logically, they might not map onto one another, but it'd still be nice to release a compatible snapshot under the `rc1` tag to allow consistency across build scripts. Even if that means double tagging a snapshot as a `snapshot` and an `rc`. Just a thought.

pd93 (Tue, 13 Mar 2018 13:16:34 GMT):
@davidkhala I'm not sure what you mean? I'm talking about the version of the SDK I install from npm. Changing it locally after the download still wouldn't help me grab the correct version from npm

davidkhala (Tue, 13 Mar 2018 13:19:50 GMT):
@pd93 Now I see, I think in choosing which version to use, use a tag appears in sdk is OK since we can always find same tag on fabric core.

davidkhala (Tue, 13 Mar 2018 13:20:13 GMT):
like using 1.1.0-alpha

pd93 (Tue, 13 Mar 2018 13:21:38 GMT):
@davidkhala I could just use `1.1.0-alpha` and it works because there is a `1.1.0-alpha` tag on npm, but its a little frustrating that a build script works with some versions of fabric and not others. Especially when the cause of this is a lack of consistency in fabric

davidkhala (Tue, 13 Mar 2018 13:23:03 GMT):
Yes, I have got used to that. LOL, especially for other sdk like java-sdk, more tags are lost there.

antitoine (Tue, 13 Mar 2018 13:23:49 GMT):
Has left the channel.

pd93 (Tue, 13 Mar 2018 14:26:02 GMT):
@bretharrison Failing the above suggestion, is it possible to grab the latest snapshot for a specific minor version.. eg... my build script specifies `1.1.0-rc1`, could the SDK take the `1.1.0` from that and then just take the latest snapshot of that version? This would be my next best solution - although even this puts me on a much faster release cycle than I'd like

bretharrison (Tue, 13 Mar 2018 15:15:56 GMT):
@pd93 where are you pulling NodeSDK

pd93 (Tue, 13 Mar 2018 15:17:01 GMT):
Currently I'm manually running `npm i fabric-client@` in a Dockerfile when building my API

pd93 (Tue, 13 Mar 2018 15:17:01 GMT):
@bretharrison Currently I'm manually running `npm i fabric-client@` in a Dockerfile when building my API

knagware9 (Tue, 13 Mar 2018 17:08:41 GMT):
how to define endorsment policy in node sdk ? I defined in node sdk as below var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, "endorsement-policy": { identities: [ { role: { name: "member", mspId: "Org1MSP" }}, { role: { name: "member", mspId: "Org2MSP" }}, { role: { name: "member", mspId: "Org3MSP" }} ], policy: { "3-of": [{ "signed-by": 0 },{ "signed-by": 1 },{ "signed-by": 2 }] } } };

knagware9 (Tue, 13 Mar 2018 17:09:49 GMT):
but its not working for three orgs,,,help to solve this ,,when I give 1-of ,its work fine but when give 3-of ,,its failing

TobiasN (Wed, 14 Mar 2018 00:45:39 GMT):
@knagware9 the policy looks good, do you have a problem with the instantiation or invoke?

TobiasN (Wed, 14 Mar 2018 00:46:31 GMT):
@knagware9 of course, the used consortium also need to have all the organization in them.

bretharrison (Wed, 14 Mar 2018 00:48:01 GMT):
@pd93 You could use `@unstable` to get the latest pre release of fabric-client to work with the pre releases of fabric. If you want a specific pre release of fabric-client you could use `@1.1.0-snapshot.99`. When working with a release of fabric, you could use `@1.1.*` so that you get the latest released fabric-client for fabric 1.1.

knagware9 (Wed, 14 Mar 2018 03:55:41 GMT):
@TobiasN --Its having problem during invoke call

knagware9 (Wed, 14 Mar 2018 03:55:45 GMT):
in the consortium having all orgs ,,but have doubt how to pass all peers in invoke request ,,is tagets have capability resolve all peers from orgs when we just pass the peer name

TobiasN (Wed, 14 Mar 2018 04:02:17 GMT):
please check what peers are used. In the fabric-sample/balance-transfer, only one orgs peer is used: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app/invoke-transaction.js#L31

knagware9 (Wed, 14 Mar 2018 04:03:29 GMT):
http://localhost:4000/channels/mychannel/chaincodes/mycc', type: 'POST', dataType: 'json', traditional: true, data: { "peers": ["peer0.org1.example.com","peer0.org2.example.com","peer0.org3.example.com"], "fcn":"addProduct", //"args":["2","GreenFarms","12","10","11","12","13","14","15"] "args":[idVal,farmVal,qtyVal,fatVal,proteinVal,juicyVal,leadVal,ownerVal,amountVal] },

knagware9 (Wed, 14 Mar 2018 04:03:47 GMT):
I am passing peers as like above

TobiasN (Wed, 14 Mar 2018 04:04:19 GMT):
@knagware9 so the code as it is can not invoke "AND" endorsement policy, please check your invoke code. the thing is, that the client need collect positive endorsement, from peers of all the organizations. the chaincode need to be installed on at least one peer from each org.

knagware9 (Wed, 14 Mar 2018 04:04:43 GMT):
its instlled on all peer

knagware9 (Wed, 14 Mar 2018 04:05:07 GMT):
in my setup ,,3 orgs one peer each and chaincode instlled on all three peer

TobiasN (Wed, 14 Mar 2018 04:05:08 GMT):
@knagware9 I don't know if the commandline tool is able to invoke chaincode with "AND" endorsement policy

knagware9 (Wed, 14 Mar 2018 04:06:08 GMT):
just one question ,,can we pass different orgs peer in invoke request or we cant

TobiasN (Wed, 14 Mar 2018 04:06:15 GMT):
then please check your invoke source-code. if you used balance transfer, you need to change the code in the invoke method.

TobiasN (Wed, 14 Mar 2018 04:07:07 GMT):
@knagware9 just make a loop over the like I have send to you.

knagware9 (Wed, 14 Mar 2018 04:09:53 GMT):
@TobiasN Ok Thanks,,do you mean ,directly passing all orgs peer name wont work ,,we need to resolve the peer using newPeer method

TobiasN (Wed, 14 Mar 2018 04:15:39 GMT):
I think there are a log of things that can be done. just request endorsement from all known peers, pass in objects of {peername, orgMSPname}, the method could even query first the channel configuration, analyse the policy from there and select automatic required peers by some *smart* strategy,

TobiasN (Wed, 14 Mar 2018 04:18:35 GMT):
the smart selection could probably be a part of the SDK itself, but it is also reasonable to keep that outside the SDK as in different project the peers are probably managed differently. in balance-transfer the dode is quite simple, but the code can almost grow infinit in complexity. @knagware9 it is up to every developer/ project manager to decide on a strategy.

knagware9 (Wed, 14 Mar 2018 04:19:26 GMT):
@TobiasN Got it Thanks

AnthonyRoux (Wed, 14 Mar 2018 10:14:20 GMT):
Hello to all ! I'm trying to make a small app with the node SDK, but I encountered an issue I have no idea to fix (I spend many hours on Google and Jira with no success). My setup is based on Fabcar from Fabric-samples. the startfabric script executes without error and everything seems fine.When I launch my server.js I got this error `error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN error: [Channel.js]: getChannelConfig - Failed Proposal. Error: Error: Invalid results returned ::FORBIDDEN`. I dug into the SDK and Fabric to find that it came from some certificates. the logs from the orderer can be seen here (https://hastebin.com/kimowijili.hs).

AnthonyRoux (Wed, 14 Mar 2018 10:14:20 GMT):
Hello to all ! I'm trying to make a small app with the node SDK, but I encountered an issue I have no idea to fix (I spend many hours on Google and Jira with no success). My setup is based on Fabcar from Fabric-samples. the startfabric script executes without error and everything seems fine.``` ``` When I launch my server.js I got this error `error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN error: [Channel.js]: getChannelConfig - Failed Proposal. Error: Error: Invalid results returned ::FORBIDDEN`. I dug into the SDK and Fabric to find that it came from some certificates. the logs from the orderer can be seen here (https://hastebin.com/kimowijili.hs).

AnthonyRoux (Wed, 14 Mar 2018 10:14:20 GMT):
Hello to all ! I'm trying to make a small app with the node SDK, but I encountered an issue I have no idea to fix (I spend many hours on Google and Jira with no success). My setup is based on Fabcar from Fabric-samples. the startfabric script executes without error and everything seems fine. When I launch my server.js I got this error ```error: [Orderer.js]: sendDeliver - rejecting - status:FORBIDDEN error: [Channel.js]: getChannelConfig - Failed Proposal. Error: Error: Invalid results returned ::FORBIDDEN```. I dug into the SDK and Fabric to find that it came from some certificates. the logs from the orderer can be seen here (https://hastebin.com/kimowijili.hs).

varun-raj (Wed, 14 Mar 2018 11:06:39 GMT):
I'm building an NodeJS Client and Using common connection profile concept accoriding to this example. https://fabric-sdk-node.github.io/tutorial-network-config.html

varun-raj (Wed, 14 Mar 2018 11:07:10 GMT):
Here should I have all the peers information or just one organization's peers which we're using for the current client?

caseybecking (Thu, 15 Mar 2018 02:34:14 GMT):
Has joined the channel.

caseybecking (Thu, 15 Mar 2018 02:38:37 GMT):
This may be a silly question since im still learning how all the pieces play together but if im looking at the query.js file in the fabcar sample code is that still considered part of fabric?

skim (Thu, 15 Mar 2018 03:56:03 GMT):
Has joined the channel.

pb (Thu, 15 Mar 2018 04:02:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mhycNxBAJSdHxSznu) @caseybecking query.js is just for querying cars by using queryBychaincode fabric api for node sdk

rajasekharpippalla (Thu, 15 Mar 2018 05:50:13 GMT):

Screenshot from 2018-03-15 11:14:53.png

NeerajKumar (Thu, 15 Mar 2018 11:00:05 GMT):
Has joined the channel.

NeerajKumar (Thu, 15 Mar 2018 11:00:22 GMT):
Hi Experts, I have a question, that i am dealing with right now, lets say you registered a user on behalf of a organisation in the fabric and now you want to invoke a transaction on behalf of that user, why fabric signs this transaction with the private key of the user, actually i am removing all private keys of the user just after registering and storing them in aes 256 encrypted format in the db, but as soon as i am about to invoke the transaction i need to acquire the regtsered users context who is invoking this transaction but as i have already deleted that private key an issue is thrown which says : "Private key missing from key store. Can not establish the signing identity for user". why it requires to sign on behalf

varun-raj (Thu, 15 Mar 2018 11:20:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Md9eEp3YxDWBcyyy5) @NeerajKumar So if you want to set the context of the user in the client you need the private key as well as the certificate to verify his/her identity. Thus if you delete the private key it won't be able to find who it is.

LuckyMart (Thu, 15 Mar 2018 15:38:14 GMT):
Has joined the channel.

bretharrison (Thu, 15 Mar 2018 15:51:30 GMT):
@NeerajKumar All requests to fabric get signed, signing requires the private key. If the private keys are being stored somewhere else, a custom key value store for that storage type will be required. fabric-client includes key value stores for file sytem and CouchDB. Use the implementation class when building the crypto store and the crypto suite.

bretharrison (Thu, 15 Mar 2018 15:51:30 GMT):
@NeerajKumar All requests to fabric get signed, signing requires the private key. If the private keys are being stored somewhere else, a custom key value store for that storage type will be required. fabric-client includes key value stores for file sytem and CouchDB. Use the implementation class when building the crypto store and the crypto suite. see https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/cloudant-fabricca-tests.js Setting the `crypto-value-store` configuration setting to the class of the new implementation will have it used by the CryptoKeyStore only.

jrosmith (Thu, 15 Mar 2018 16:43:17 GMT):
@RahulSonanis moving the conversation here as this question is best for this channel. [ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DFXSLQJFxF8FJe5aR) if both of the endorsements are successful from those two peer you should be okay when you use `sendTransaction` to the orderer, unless the request you pass does not include both endorsements. can you post the construction of the request being sent for ordering?

jrosmith (Thu, 15 Mar 2018 16:43:17 GMT):
@RahulSonanis moving the conversation here as this question is best for this channel. if both of the endorsements are successful from those two peer you should be okay when you use `sendTransaction` to the orderer, unless the request you pass does not include both endorsements. can you post the construction of the request being sent for ordering? [ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DFXSLQJFxF8FJe5aR)

RahulSonanis (Thu, 15 Mar 2018 16:43:17 GMT):
Has joined the channel.

bretharrison (Thu, 15 Mar 2018 16:54:08 GMT):
@varun-raj Define all the peers that you will have to send request to at a minimum and point to those peers from the channels that will be worked.

bretharrison (Thu, 15 Mar 2018 16:54:08 GMT):
@varun-raj Define all the peers that you will have to send requests to at a minimum and point to those peers from the channels that will be worked.

yopep (Fri, 16 Mar 2018 04:02:38 GMT):
Has joined the channel.

RahulSonanis (Fri, 16 Mar 2018 04:51:11 GMT):

invokeTransaction.txt

RahulSonanis (Fri, 16 Mar 2018 04:51:11 GMT):

invokeTransaction.txt

caseybecking (Fri, 16 Mar 2018 14:37:15 GMT):
I'm getting an error - not sure if this is the right channel or not While working through this - https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer#sample-rest-apis-requests ``` curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' Error

TypeError: Cannot read property 'name' of undefined
   at getOrgName (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/app/helper.js:96:19)
   at Object.getRegisteredUsers (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/app/helper.js:206:27)
   at /Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/app.js:128:9
   at Layer.handle [as handle_request] (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/layer.js:95:5)
   at next (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/route.js:137:13)
   at Route.dispatch (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/route.js:112:3)
   at Layer.handle [as handle_request] (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/layer.js:95:5)
   at /Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:281:22
   at Function.process_params (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:335:12)
   at next (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:275:10)
```

caseybecking (Fri, 16 Mar 2018 14:37:15 GMT):
I'm getting an error While working through this - https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer#sample-rest-apis-requests ``` curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' Error

TypeError: Cannot read property 'name' of undefined
   at getOrgName (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/app/helper.js:96:19)
   at Object.getRegisteredUsers (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/app/helper.js:206:27)
   at /Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/app.js:128:9
   at Layer.handle [as handle_request] (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/layer.js:95:5)
   at next (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/route.js:137:13)
   at Route.dispatch (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/route.js:112:3)
   at Layer.handle [as handle_request] (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/layer.js:95:5)
   at /Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:281:22
   at Function.process_params (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:335:12)
   at next (/Users/caseybecking/Sites/MYSITES/fabric-samples/balance-transfer/node_modules/express/lib/router/index.js:275:10)
```

caseybecking (Fri, 16 Mar 2018 14:45:51 GMT):
ignore me - I had an older version of the code running with a newer version of the docker pieces

patelan (Fri, 16 Mar 2018 16:17:11 GMT):
Has joined the channel.

patelan (Fri, 16 Mar 2018 16:17:30 GMT):
Hi All, I am part of one finance company and we are using hyperledger 1.0.3. We deployed all services in Docker UCP (Enterprise Edition). After 15 mins call is timing out from fabric SDK(node) to Peers. 0|ProxyAPI | error: [Peer.js]: sendProposal - timed out after:45000 0|ProxyAPI | error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT 0|ProxyAPI | at Timeout._onTimeout (/src/node_modules/fabric-client/lib/Peer.js:107:19) 0|ProxyAPI | at ontimeout (timers.js:386:11) 0|ProxyAPI | at tryOnTimeout (timers.js:250:5) 0|ProxyAPI | at Timer.listOnTimeout (timers.js:214:5) Your assistance in this matter is greatly appreciated.

jyg (Fri, 16 Mar 2018 20:51:02 GMT):
Hello all, using IdentityService I encountered some issue using getOne() and getAll() where fabric-ca-client identity was working fine. It seems that the ca name are not specified and therefore it fails in multi ca setup. I modified IdentityService.js to manually add the canme: return this.client.get('identities?ca=CA1', signingIdentity);

jyg (Fri, 16 Mar 2018 20:51:35 GMT):
it works fine this way. maybe something to fix

jrosmith (Fri, 16 Mar 2018 20:52:44 GMT):
@patelan check your peer logs

jyg (Fri, 16 Mar 2018 21:13:21 GMT):
For those who may need - IdentifyService.js

jyg (Fri, 16 Mar 2018 21:13:25 GMT):
getAll(registrar) { checkRegistrar(registrar); let signingIdentity = registrar.getSigningIdentity(); if (!signingIdentity) { throw new Error('Can not get signingIdentity from registrar'); } return this.client.get('identities?ca='+this.client._caName, signingIdentity); }

jyg (Fri, 16 Mar 2018 21:13:34 GMT):
getOne(enrollmentID, registrar) { if (!enrollmentID || typeof enrollmentID !== 'string') { throw new Error('Missing required argument "enrollmentID", or argument "enrollmentID" is not a valid string'); } checkRegistrar(registrar); let signingIdentity = registrar.getSigningIdentity(); if (!signingIdentity) { throw new Error('Can not get signingIdentity from registrar'); } const url = 'identities/' + enrollmentID+'?ca='+this.client._caName; return this.client.get(url, signingIdentity); }

Exci (Mon, 19 Mar 2018 09:11:34 GMT):
I'm getting an "access denied" error when using the nodesdk 1.1.0.: ``` [2018-03-19T10:06:40.057] [DEBUG] create-Channel - ====== Creating Channel ====== [2018-03-19T10:06:40.059] [DEBUG] create-Channel - { channelName: 'mychannel', channelConfigFile: '/home/exciPlain/3dtrust-fabric/deployment/config/configtx/delphi.tx', orgNames: [ 'org1', 'org2' ] } [2018-03-19T10:06:40.064] [DEBUG] create-Channel - { channelConfig: } [2018-03-19T10:06:40.077] [DEBUG] multi-signature - signature identity adminName@org1.example.com [2018-03-19T10:06:40.094] [DEBUG] multi-signature - signature identity adminName@org2.example.com [2018-03-19T10:06:40.110] [DEBUG] create-Channel - signatures 2 [2018-03-19T10:06:40.165] [DEBUG] create-Channel - channel created { status: 'SUCCESS', info: '' } [2018-03-19T10:06:40.165] [DEBUG] create-Channel - loopGetChannel try... error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/3dtrust-fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/3dtrust-fabric/deployment/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: getChannelConfig - Failed getting channel config. Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/3dtrust-fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/3dtrust-fabric/deployment/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/3dtrust-fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/3dtrust-fabric/deployment/node_modules/grpc/src/client.js:583:15 [2018-03-19T10:06:40.191] [ERROR] testChannel - joinChannel Error Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at /home/exciPlain/3dtrust-fabric/deployment/node_modules/fabric-client/lib/Channel.js:159:28 (node:6175) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] ```

Exci (Mon, 19 Mar 2018 09:11:34 GMT):
I'm getting an "access denied" error when using the nodesdk 1.1.0.: ``` [2018-03-19T10:06:40.057] [DEBUG] create-Channel - ====== Creating Channel ====== [2018-03-19T10:06:40.059] [DEBUG] create-Channel - { channelName: 'mychannel', channelConfigFile: '/home/exciPlain/fabric/deployment/config/configtx/delphi.tx', orgNames: [ 'org1', 'org2' ] } [2018-03-19T10:06:40.064] [DEBUG] create-Channel - { channelConfig: } [2018-03-19T10:06:40.077] [DEBUG] multi-signature - signature identity adminName@org1.example.com [2018-03-19T10:06:40.094] [DEBUG] multi-signature - signature identity adminName@org2.example.com [2018-03-19T10:06:40.110] [DEBUG] create-Channel - signatures 2 [2018-03-19T10:06:40.165] [DEBUG] create-Channel - channel created { status: 'SUCCESS', info: '' } [2018-03-19T10:06:40.165] [DEBUG] create-Channel - loopGetChannel try... error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: getChannelConfig - Failed getting channel config. Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 [2018-03-19T10:06:40.191] [ERROR] testChannel - joinChannel Error Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at /home/exciPlain/fabric/deployment/node_modules/fabric-client/lib/Channel.js:159:28 (node:6175) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] ```

Exci (Mon, 19 Mar 2018 09:11:34 GMT):
I'm getting an "access denied" error when using the nodesdk 1.1.0 (with the 1.1.0 images): ``` [2018-03-19T10:06:40.057] [DEBUG] create-Channel - ====== Creating Channel ====== [2018-03-19T10:06:40.059] [DEBUG] create-Channel - { channelName: 'mychannel', channelConfigFile: '/home/exciPlain/fabric/deployment/config/configtx/delphi.tx', orgNames: [ 'org1', 'org2' ] } [2018-03-19T10:06:40.064] [DEBUG] create-Channel - { channelConfig: } [2018-03-19T10:06:40.077] [DEBUG] multi-signature - signature identity adminName@org1.example.com [2018-03-19T10:06:40.094] [DEBUG] multi-signature - signature identity adminName@org2.example.com [2018-03-19T10:06:40.110] [DEBUG] create-Channel - signatures 2 [2018-03-19T10:06:40.165] [DEBUG] create-Channel - channel created { status: 'SUCCESS', info: '' } [2018-03-19T10:06:40.165] [DEBUG] create-Channel - loopGetChannel try... error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: getChannelConfig - Failed getting channel config. Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 [2018-03-19T10:06:40.191] [ERROR] testChannel - joinChannel Error Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at /home/exciPlain/fabric/deployment/node_modules/fabric-client/lib/Channel.js:159:28 (node:6175) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] ```

Exci (Mon, 19 Mar 2018 09:11:34 GMT):
I'm getting an "access denied" error when using the nodesdk 1.1.0 (with the 1.1.0 images) and attempting to create a channel: ``` [2018-03-19T10:06:40.057] [DEBUG] create-Channel - ====== Creating Channel ====== [2018-03-19T10:06:40.059] [DEBUG] create-Channel - { channelName: 'mychannel', channelConfigFile: '/home/exciPlain/fabric/deployment/config/configtx/delphi.tx', orgNames: [ 'org1', 'org2' ] } [2018-03-19T10:06:40.064] [DEBUG] create-Channel - { channelConfig: } [2018-03-19T10:06:40.077] [DEBUG] multi-signature - signature identity adminName@org1.example.com [2018-03-19T10:06:40.094] [DEBUG] multi-signature - signature identity adminName@org2.example.com [2018-03-19T10:06:40.110] [DEBUG] create-Channel - signatures 2 [2018-03-19T10:06:40.165] [DEBUG] create-Channel - channel created { status: 'SUCCESS', info: '' } [2018-03-19T10:06:40.165] [DEBUG] create-Channel - loopGetChannel try... error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: getChannelConfig - Failed getting channel config. Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at new createStatusError (/home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:64:15) at /home/exciPlain/fabric/deployment/node_modules/grpc/src/client.js:583:15 [2018-03-19T10:06:40.191] [ERROR] testChannel - joinChannel Error Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at /home/exciPlain/fabric/deployment/node_modules/fabric-client/lib/Channel.js:159:28 (node:6175) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] ```

Exci (Mon, 19 Mar 2018 09:12:55 GMT):
On the peer I'm getting `2018-03-19 09:11:01.544 UTC [protoutils] ValidateProposalMessage -> WARN 1c2 channel [mychannel]: MSP error: channel doesn't exist` Everything works fine if I use the 1.1.0 images with 1.1.0-alpha client. I'm not sure if FAB-8633 is related. Any thoughts?

patelan (Mon, 19 Mar 2018 13:18:19 GMT):
@jrosmith Actually we are not seeing any logs in peer. Thing is after deployment first time query works fine. If we keep environment idle for 15 mins. Query is always timing out from Node SDK to peer call.

patelan (Mon, 19 Mar 2018 13:43:50 GMT):
@jrosmith Not sure if we need to set any timeout, KeepAlive

razik29 (Mon, 19 Mar 2018 13:47:47 GMT):
Hi All, Good morning. I have been doing a Performance Test on the hyperledger-fabric network with Node SDK. When I invoke an API to do a payment from Org1 to Org2 for about 6 min. using Jmeter tool, I get the following error. `{ "error": "Failed to invoke chaincode. cause:Error: Problem setting up the event hub :Error: EventHub has been shutdown" }` When I investigated, I found out the 'chaincode container' crashing once it reaches 2GB limit and re-starting by itself. During this time, if there is any request made, I am getting the above said errors. And googling it out, I found there could be a 'memory leak' issue within the 'chaincode container' https://github.com/hyperledger/composer/issues/2801. I am using fabric version 1.1.0-alpha. I would like to know, _i. if this issue is resolved or not? ii. Is there a workaround?_ Please let me know if you need more information.

g.vamsi (Mon, 19 Mar 2018 15:47:19 GMT):
is there any concept of editing a channel configuration using the SDK ?

g.vamsi (Mon, 19 Mar 2018 15:47:33 GMT):
or do we create a new channel ?

C0rWin (Mon, 19 Mar 2018 22:29:24 GMT):
Has left the channel.

jastisriradheshyam (Tue, 20 Mar 2018 08:03:11 GMT):
Has joined the channel.

NeerajKumar (Tue, 20 Mar 2018 09:03:35 GMT):
Hi Experts , i am getting this error: "*no identity has been assigned to this client*" when i am trying to do a client.newTransactionID(), however i have checked it multiple times that i am having the user context at this point by checking through client.getUserContext(uuid, true).then() but this client.newTransactionID() throeing this issue, why?

CodeReaper (Tue, 20 Mar 2018 09:44:17 GMT):
Hello, I'm using AES keys for my chaincode which uses encryption and I was wondering if I can store the AES key by node SDK itself?

CodeReaper (Tue, 20 Mar 2018 09:44:17 GMT):
Hello, I'm using AES keys for my chaincode which uses encryption and I was wondering if I can store the AES key by node SDK itself, so to use it every time when using that user's context?

phal0r (Tue, 20 Mar 2018 10:41:44 GMT):
Has joined the channel.

paul.sitoh (Tue, 20 Mar 2018 13:35:16 GMT):
Is there any documentation on support for Fabric 1.1 using node SDK?

paul.sitoh (Tue, 20 Mar 2018 14:03:36 GMT):
Or sample code?

paul.sitoh (Tue, 20 Mar 2018 14:15:18 GMT):
Disregard my last messages now. It looks like the doc has been updated now to cover 1.1. https://fabric-sdk-node.github.io/tutorial-network-config.html

patelan (Tue, 20 Mar 2018 17:19:31 GMT):
Hi All, If we keep fabric layer idle for 15 mins. Then query any smart contract, first call is giving below error and second call is working fine

patelan (Tue, 20 Mar 2018 17:19:44 GMT):

Clipboard - March 20, 2018 1:19 PM

ShikarSharma (Tue, 20 Mar 2018 22:46:07 GMT):
Has joined the channel.

jastisriradheshyam (Wed, 21 Mar 2018 04:46:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=28zN3bCjDMurZcGqS) @paul.sitoh I didn't found any Node SDK documentation specific to Fabric v1.1. Here's the Node SDK documentation for Fabric v1.0 - https://fabric-sdk-node.github.io/ and this link will be updated with reference to Fabric v1.1 in future.

jastisriradheshyam (Wed, 21 Mar 2018 06:57:57 GMT):
Hi, I read the Node SDK tutorial ( https://fabric-sdk-node.github.io/tutorial-app-dev-env-setup.html ) and their were these lines: "user identities provisioned this way are only of the MEMBER role, which means it won't be able to perform certain operations reserved for the ADMIN role: create/update channel install/instantiate chaincode query installed/instantiated chaincodes For these privileged operations, the client must use an ADMIN user to submit the request." And I have a question that why only ADMIN have the permission to query the chaincode? Calling a ADMIN peer only for query will cause the extra latency in the network / Response instead of other member peers ( reducing the load on one peer that is ADMIN peer ) in a given channel, If there is any security implications for the above statement that I referenced then what are they.

davidkhala (Wed, 21 Mar 2018 08:41:51 GMT):
how to know whether channel has been created in fabric 1.1? I found that UNKNOWN: access denied: will appears when call channel.initiate() right after creation. I think it is new since I would not see this in 1.1.0-alpha

davidkhala (Wed, 21 Mar 2018 08:47:43 GMT):
Solved, I see channel.initiate() can be called only after at leave one peer from the org-- which the signing user belongs to-- joined the channel

VigneshkumarChinnachamy (Wed, 21 Mar 2018 09:22:07 GMT):
Hi, I'm using fabric node sdk 1.1 with fabric 1.1-alpha. I Installed and instantiated (say version v0) a chaincode from fabricSamples/balanceTransfer. It's working fine. I upgraded the chaincode to the next version (say v1) from the sdk. When I try to query, It's still executing the queries in the older chaincode's container. I confirmed it by running docker logs -f. Any Idea why this would happen? Shouldn't the v0 containers be stopped once the upgrade is complete?

jonathan-blood (Wed, 21 Mar 2018 09:57:14 GMT):
Hi. Can anyone here provide any insight in to this bug: https://jira.hyperledger.org/browse/FAB-8942. I have somehow started seeing it in 1.0.2 in a project that has worked fine up until yesterday...struggling to understand why it suddenly stopped working.

jonathan-blood (Wed, 21 Mar 2018 10:00:05 GMT):
@zhaochy are you by any chance the person who has been working on the above? Apologies if not

zhaochy (Wed, 21 Mar 2018 10:45:33 GMT):
@jonathan-blood solved

zhaochy (Wed, 21 Mar 2018 10:46:18 GMT):
https://gerrit.hyperledger.org/r/#/c/19377/

uxelduxel (Wed, 21 Mar 2018 10:57:11 GMT):
Has joined the channel.

Mihai.A (Wed, 21 Mar 2018 10:57:36 GMT):
Has joined the channel.

jonathan-blood (Wed, 21 Mar 2018 11:20:24 GMT):
@zhaochy that will be in 1.2 though right? Any idea why my 1.0.2 is suddenly not working if it was an issue with 1.1?

uxelduxel (Wed, 21 Mar 2018 11:20:34 GMT):
Hi. Im having issues instantiating chaincode via node. Most of my stuff is from the balance transfer network (from fabric-samples). I have changed that network to be only one peer and one organisation as i am trying to get a understanding how it even works. Instead of using the rest endpoints provided by the balance-transfer (app.js) i am invoking a function with the following code from bash: await getRegisteredUser("UXELDUXEL","Org1",true) await createChannel("mychannel","../channel/config/channel.tx","Org1") await joinChannel("mychannel",["peer0.org1.example.com"],"UXELDUXEL","Org1") await installChaincode(["peer0.org1.example.com"],"mycc","./chaincode/","v0","node","UXELDUXEL","Org1") await instantiateChaincode(undefined, "mychannel", "mycc", "v0", "node", undefined, ["a","100","b","200"], "UXELDUXEL", "Org1") I am aware that these functions normally reside in seperate files inside the app subfolder. I have copied them to my file. So getRegisteredUser would be equal to helper.getRegisteredUser and so on. With this i can get the user create the channel join the channel and install the chaincode however the last bit of instantiateChaincode is not working error: [Peer.js]: sendProposal - timed out after:60000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT this is the error that i am getting. Has anybody any clues what i am doing wrong, as i am starting to run out of ideas. furthermore i have tested a bit around and only ran the last function call again after recieving this error. [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: premature execution - chaincode (mycc:v0) launched and waiting for registration was the error i recieved the second time around. I have then checked if the container that is created on the fly is running. docker -ps reports that dev-peer0.... is running logs of that container indicate no errors the logs of both the peer and orderer are not usefull.

zhaochy (Wed, 21 Mar 2018 11:22:50 GMT):
@jonathan-blood FAB-8942 is a bug with the v1.1 release, it has no affect on the v1.0.2 release, can you describe your error?

zhaochy (Wed, 21 Mar 2018 11:24:15 GMT):
@uxelduxel are you using node chaincode?

uxelduxel (Wed, 21 Mar 2018 11:24:30 GMT):
yes i copied the node chaincode from the balance transfer example

uxelduxel (Wed, 21 Mar 2018 11:24:51 GMT):
i checked with bash inside the container that is created on the fly and it all seems to be there as expected

zhaochy (Wed, 21 Mar 2018 11:25:53 GMT):
during node chaincode instantiate, the command 'npm install' may cost a lot of time, depends on your network.

jonathan-blood (Wed, 21 Mar 2018 11:25:57 GMT):
@zhaochy it is the exact error described in FAB-8942

zhaochy (Wed, 21 Mar 2018 11:26:21 GMT):
your error seems timeout during your chaincode instantiate

uxelduxel (Wed, 21 Mar 2018 11:27:12 GMT):
@zhaochy that is true. However this does not explain why the same chaincode works if i just use the testApis.sh script from balance transfer as the balance transfer network should be more complex as it has more than 1 peer

uxelduxel (Wed, 21 Mar 2018 11:27:25 GMT):
do they perhaps increase the timout somewhere?

zhaochy (Wed, 21 Mar 2018 11:27:26 GMT):
@jonathan-blood please make sure you are using sdk v1.0.2 ?

jonathan-blood (Wed, 21 Mar 2018 11:28:17 GMT):
@zhaochy `"version": "1.0.2"` in the `package.json` for both fabric-client and fabric-ca-client in my node_modules

zhaochy (Wed, 21 Mar 2018 11:30:41 GMT):
@uxelduxel this depends on your network , you may increase the timeout to a bigger one and try again

uxelduxel (Wed, 21 Mar 2018 11:31:03 GMT):
@zhaochy how would i do that?

zhaochy (Wed, 21 Mar 2018 11:32:17 GMT):
@jonathan-blood can you paste the tsc compile error message?

jonathan-blood (Wed, 21 Mar 2018 11:32:51 GMT):
> tsc 2018-03-21T11:25:04.105210536Z node_modules/fabric-ca-client/index.d.ts(17,10): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'BaseClient'. node_modules/fabric-ca-client/index.d.ts(17,22): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'ICryptoSuite'. node_modules/fabric-ca-client/index.d.ts(17,36): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'User'. node_modules/fabric-ca-client/index.d.ts(17,48): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct. node_modules/fabric-ca-client/index.d.ts(153,5): error TS2666: Exports and export assignments are not permitted in module augmentations. node_modules/fabric-client/index.d.ts(17,10): error TS2305: Module '"/app/node_modules/fabric-ca-client/index"' has no exported member 'FabricCAServices'. node_modules/fabric-client/index.d.ts(17,34): error TS2497: Module '"/app/node_modules/fabric-ca-client/index"' resolves to a non-module entity and cannot be imported using this construct. node_modules/fabric-client/index.d.ts(208,11): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(209,12): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(210,14): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(214,19): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(215,21): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(461,3): error TS2666: Exports and export assignments are not permitted in module augmentations. src/blockchain/Blockchain.ts(3,25): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct. src/blockchain/Blockchain.ts(5,27): error TS2497: Module '"/app/node_modules/fabric-ca-client/index"' resolves to a non-module entity and cannot be imported using this construct. src/blockchain/Blockchain.ts(65,25): error TS2554: Expected 0-1 arguments, but got 2. src/blockchain/Blockchain.ts(79,17): error TS2339: Property 'setCryptoKeyStore' does not exist on type 'ICryptoSuite'. src/blockchain/Blockchain.ts(90,65): error TS2345: Argument of type 'HttpOptions' is not assignable to parameter of type 'TLSOptions | undefined'. Type 'HttpOptions' is not assignable to type 'TLSOptions'. Types of property 'trustedRoots' are incompatible. Type 'string[]' is not assignable to type 'Buffer'. Property 'write' is missing in type 'string[]'. src/blockchain/Blockchain.ts(110,55): error TS2345: Argument of type '{ enrollmentID: string; enrollmentSecret: string | undefined; }' is not assignable to parameter of type 'IEnrollmentRequest'. Types of property 'enrollmentSecret' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. src/blockchain/Blockchain.ts(118,45): error TS2345: Argument of type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }' is not assignable to parameter of type 'UserOptions'. Property 'skipPersistence' is missing in type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }'. src/blockchain/Blockchain.ts(176,57): error TS2345: Argument of type '{ enrollmentID: string; role: string | undefined; affiliation: string | undefined; maxEnrollments...' is not assignable to parameter of type 'IRegisterRequest'. Types of property 'affiliation' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. src/blockchain/Blockchain.ts(184,51): error TS2345: Argument of type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }' is not assignable to parameter of type 'UserOptions'. Property 'skipPersistence' is missing in type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }'. src/blockchain/Channel.ts(3,25): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct.

jonathan-blood (Wed, 21 Mar 2018 11:32:51 GMT):
tsc 2018-03-21T11:25:04.105210536Z node_modules/fabric-ca-client/index.d.ts(17,10): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'BaseClient'. node_modules/fabric-ca-client/index.d.ts(17,22): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'ICryptoSuite'. node_modules/fabric-ca-client/index.d.ts(17,36): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'User'. node_modules/fabric-ca-client/index.d.ts(17,48): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct. node_modules/fabric-ca-client/index.d.ts(153,5): error TS2666: Exports and export assignments are not permitted in module augmentations. node_modules/fabric-client/index.d.ts(17,10): error TS2305: Module '"/app/node_modules/fabric-ca-client/index"' has no exported member 'FabricCAServices'. node_modules/fabric-client/index.d.ts(17,34): error TS2497: Module '"/app/node_modules/fabric-ca-client/index"' resolves to a non-module entity and cannot be imported using this construct. node_modules/fabric-client/index.d.ts(208,11): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(209,12): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(210,14): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(214,19): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(215,21): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(461,3): error TS2666: Exports and export assignments are not permitted in module augmentations. src/blockchain/Blockchain.ts(3,25): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct. src/blockchain/Blockchain.ts(5,27): error TS2497: Module '"/app/node_modules/fabric-ca-client/index"' resolves to a non-module entity and cannot be imported using this construct. src/blockchain/Blockchain.ts(65,25): error TS2554: Expected 0-1 arguments, but got 2. src/blockchain/Blockchain.ts(79,17): error TS2339: Property 'setCryptoKeyStore' does not exist on type 'ICryptoSuite'. src/blockchain/Blockchain.ts(90,65): error TS2345: Argument of type 'HttpOptions' is not assignable to parameter of type 'TLSOptions | undefined'. Type 'HttpOptions' is not assignable to type 'TLSOptions'. Types of property 'trustedRoots' are incompatible. Type 'string[]' is not assignable to type 'Buffer'. Property 'write' is missing in type 'string[]'. src/blockchain/Blockchain.ts(110,55): error TS2345: Argument of type '{ enrollmentID: string; enrollmentSecret: string | undefined; }' is not assignable to parameter of type 'IEnrollmentRequest'. Types of property 'enrollmentSecret' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. src/blockchain/Blockchain.ts(118,45): error TS2345: Argument of type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }' is not assignable to parameter of type 'UserOptions'. Property 'skipPersistence' is missing in type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }'. src/blockchain/Blockchain.ts(176,57): error TS2345: Argument of type '{ enrollmentID: string; role: string | undefined; affiliation: string | undefined; maxEnrollments...' is not assignable to parameter of type 'IRegisterRequest'. Types of property 'affiliation' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. src/blockchain/Blockchain.ts(184,51): error TS2345: Argument of type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }' is not assignable to parameter of type 'UserOptions'. Property 'skipPersistence' is missing in type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }'. src/blockchain/Channel.ts(3,25): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct.

jonathan-blood (Wed, 21 Mar 2018 11:32:51 GMT):
@zhaochy tsc 2018-03-21T11:25:04.105210536Z node_modules/fabric-ca-client/index.d.ts(17,10): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'BaseClient'. node_modules/fabric-ca-client/index.d.ts(17,22): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'ICryptoSuite'. node_modules/fabric-ca-client/index.d.ts(17,36): error TS2305: Module '"/app/node_modules/fabric-client/index"' has no exported member 'User'. node_modules/fabric-ca-client/index.d.ts(17,48): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct. node_modules/fabric-ca-client/index.d.ts(153,5): error TS2666: Exports and export assignments are not permitted in module augmentations. node_modules/fabric-client/index.d.ts(17,10): error TS2305: Module '"/app/node_modules/fabric-ca-client/index"' has no exported member 'FabricCAServices'. node_modules/fabric-client/index.d.ts(17,34): error TS2497: Module '"/app/node_modules/fabric-ca-client/index"' resolves to a non-module entity and cannot be imported using this construct. node_modules/fabric-client/index.d.ts(208,11): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(209,12): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(210,14): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(214,19): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(215,21): error TS2304: Cannot find name 'ByteBuffer'. node_modules/fabric-client/index.d.ts(461,3): error TS2666: Exports and export assignments are not permitted in module augmentations. src/blockchain/Blockchain.ts(3,25): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct. src/blockchain/Blockchain.ts(5,27): error TS2497: Module '"/app/node_modules/fabric-ca-client/index"' resolves to a non-module entity and cannot be imported using this construct. src/blockchain/Blockchain.ts(65,25): error TS2554: Expected 0-1 arguments, but got 2. src/blockchain/Blockchain.ts(79,17): error TS2339: Property 'setCryptoKeyStore' does not exist on type 'ICryptoSuite'. src/blockchain/Blockchain.ts(90,65): error TS2345: Argument of type 'HttpOptions' is not assignable to parameter of type 'TLSOptions | undefined'. Type 'HttpOptions' is not assignable to type 'TLSOptions'. Types of property 'trustedRoots' are incompatible. Type 'string[]' is not assignable to type 'Buffer'. Property 'write' is missing in type 'string[]'. src/blockchain/Blockchain.ts(110,55): error TS2345: Argument of type '{ enrollmentID: string; enrollmentSecret: string | undefined; }' is not assignable to parameter of type 'IEnrollmentRequest'. Types of property 'enrollmentSecret' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. src/blockchain/Blockchain.ts(118,45): error TS2345: Argument of type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }' is not assignable to parameter of type 'UserOptions'. Property 'skipPersistence' is missing in type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }'. src/blockchain/Blockchain.ts(176,57): error TS2345: Argument of type '{ enrollmentID: string; role: string | undefined; affiliation: string | undefined; maxEnrollments...' is not assignable to parameter of type 'IRegisterRequest'. Types of property 'affiliation' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. src/blockchain/Blockchain.ts(184,51): error TS2345: Argument of type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }' is not assignable to parameter of type 'UserOptions'. Property 'skipPersistence' is missing in type '{ username: string; mspid: string; cryptoContent: { privateKeyPEM: any; signedCertPEM: any; }; }'. src/blockchain/Channel.ts(3,25): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct.

zhaochy (Wed, 21 Mar 2018 11:34:36 GMT):
@uxelduxel channel.sendInstantiateProposal(request, 120000);

uxelduxel (Wed, 21 Mar 2018 11:35:23 GMT):
@zhaochy thank you sir for your help

zhaochy (Wed, 21 Mar 2018 11:37:17 GMT):
@jonathan-blood I'm sure the sdk your are using is v1.1, this bug is fix yesterday. can your remove your node_modules and try `npm install` and `tsc` again?

jonathan-blood (Wed, 21 Mar 2018 11:38:01 GMT):
@zhaochy this was my thinking too so I have already tried uninstalling and reinstalling fabric-client and fabric-ca client. Let me try blowing away all of my node_modules

jonathan-blood (Wed, 21 Mar 2018 11:44:24 GMT):
@zhaochy I'm still seeing the same error, I have checked the version listed in the `package.json` for fabric-client and fabric-ca-client in my node_modules and it's definitely 1.0.2

zhaochy (Wed, 21 Mar 2018 11:45:54 GMT):
:sweat:

zhaochy (Wed, 21 Mar 2018 11:46:22 GMT):
can you change your versions to `1.2.0-snapshot.6` and try again

jonathan-blood (Wed, 21 Mar 2018 11:53:05 GMT):
@zhaochy the error changed slightly, the first bunch of lines disappeared but I still have from "node_modules/fabric-client/index.d.ts(208,11): error TS2304: Cannot find name 'ByteBuffer'." onwards

zhaochy (Wed, 21 Mar 2018 11:54:21 GMT):
can your `npm install @types/bytebuffer` and try again

jonathan-blood (Wed, 21 Mar 2018 12:10:10 GMT):
Now the bytebuffer errors have gone and I'm left with "src/blockchain/Blockchain.ts(3,25): error TS2497: Module '"/app/node_modules/fabric-client/index"' resolves to a non-module entity and cannot be imported using this construct." onwards

jonathan-blood (Wed, 21 Mar 2018 12:10:10 GMT):
Now the bytebuffer errors have gone and I'm left with "src/blockchain/Blockchain.ts(65,25): error TS2554: Expected 0-1 arguments, but got 2.'" resolves to a non-module entity and cannot be imported using this construct." onwards

jonathan-blood (Wed, 21 Mar 2018 12:13:24 GMT):
That one seems to be some function changed in fabric-client maybe 1.2.0 ?

AnthonyRoux (Wed, 21 Mar 2018 13:08:20 GMT):
Hi to all ! I moved to the v1.1 of the sdk few days ago. Everything went fine (Channel creation, peer join, installation and instantiation of a chaincode are executed by a script). However, after getting the user context I'm not able to invoke my chaincode and I face this error : `[client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]`. I saw on Jira that there is an issue leading to the same error but It is linked to channel instantiation. Any how to solve this ? I can provide more logs or code snippet if needed.

AnthonyRoux (Wed, 21 Mar 2018 13:08:20 GMT):
Hi to all ! I moved to the v1.1 of the sdk few days ago. Everything went fine (Channel creation, peer join, installation and instantiation of a chaincode are executed by a script). However, after getting the user context I'm not able to invoke my chaincode and I face this error : `[client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]`. I saw on Jira that there is an issue leading to the same error but It is linked to channel instantiation. Any idea how to solve this ? I can provide more logs or code snippet if needed.

jonathan-blood (Wed, 21 Mar 2018 13:37:38 GMT):
@zhaochy ok I'm up and running...I changed my project's `package.json` to be `1.0.2` instead of `^1.0.2` - now I know the ^ means it will get the latest which isn't a major version change, which suggests it will get 1.1.0 automatically, but what's odd is when I manually checked fabric-client's `package.json` in my node_modules it was saying 1.0.2...all I can think is there is some strange behaviour happening where it had actually got 1.1.0 but the `package.json` was lying? I'm not sure. Thank you for your responses though, they certainly set me on the right tracks!

kevinsyx (Wed, 21 Mar 2018 15:34:13 GMT):
Has joined the channel.

davidkhala (Wed, 21 Mar 2018 15:44:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mnm6s37nouSp2zNCJ) @jonathan-blood it might , perhaps, node modules has not downgraded to 1.0.2, or your fabric-peer image tagged latest is not of the version you want

davidkhala (Wed, 21 Mar 2018 15:47:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a3Mnh6xow6pj8gT2z) @AnthonyRoux yes I saw same error when trying channel.instantiate()

davidkhala (Wed, 21 Mar 2018 15:49:30 GMT):
Now we have to tamper user context more carefully. When getting channel config from orderer

davidkhala (Wed, 21 Mar 2018 15:49:30 GMT):
Now we have to manipulate user context more carefully. When getting channel config from orderer

AnthonyRoux (Wed, 21 Mar 2018 15:58:10 GMT):
As I use connection profile, I'm pretty sure, that everything is ok but I could be wrong. I get the channel config like this `let channel = client.getChannel("mychannel")`. When I log this variable everything seems fine

bretharrison (Wed, 21 Mar 2018 19:05:05 GMT):
`Channel.initialize()` with 1.1 now gets the configuration from a peer when it uses internally the 'channel.getChannelConfig()`. The `getChannelConfig()` now uses a peer rather than an orderer to avoid security issues. `initialize` will be run by non-admin users which may not have access to read blocks from the orderer in a fully secured network. There is an a new API `getChannelConfigFromOrderer()` of which the userContext will have to be an admin of the Orderer.

CodeReaper (Thu, 22 Mar 2018 07:25:06 GMT):
Hi, can we access roles and affiliations of users inside chaincode in 1.1?

javrevasandeep (Thu, 22 Mar 2018 12:55:15 GMT):
client side validation

javrevasandeep (Thu, 22 Mar 2018 13:01:44 GMT):
I am getting the below error while doing invokation. Can anyone please help on this error

javrevasandeep (Thu, 22 Mar 2018 13:01:45 GMT):
E0322 05:40:39.499744200 21999 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

scmchan (Thu, 22 Mar 2018 14:48:46 GMT):
Is it possible to forcefully reinstantiate a chaincode container? Whenever I call channel.sendInstantiateProposal(request, instantiateTimeout), the promise gets rejected stating that the chaincode already exists. I know it doesn't (since I shut down the cc-env container that was spun up)

patelan (Thu, 22 Mar 2018 18:01:56 GMT):
Hi All, if keep fabric environment idle for 15 mins. if we add any smart contract then install chaincode is working fine. But instantiating chaincode is going into hung state and no error. Can anybody please help on this issue.

patelan (Thu, 22 Mar 2018 18:02:10 GMT):
Not sure if anybody face similar issue

bretharrison (Thu, 22 Mar 2018 20:53:18 GMT):
@g.vamsi Yes the SDK can help with the a channel update , the following link is for a create, but the concept is the same for an update https://fabric-sdk-node.github.io/tutorial-channel-create.html

bretharrison (Thu, 22 Mar 2018 20:53:18 GMT):
@g.vamsi Yes the SDK can help with a channel update , the following link is for a create, but the concept is the same for an update https://fabric-sdk-node.github.io/tutorial-channel-create.html

bretharrison (Thu, 22 Mar 2018 21:00:38 GMT):
@CodeReaper You may wish to post to #fabric-chaincode-dev

paul.sitoh (Fri, 23 Mar 2018 11:40:59 GMT):
Folks, I noticed something weird about the Fabric Client. Somethings when I try to load connection profile using this API: client.loadFromConfig() it tries to read to cert content from specified file path (e.g. `signedCert: path: test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem` ). Sometimes it does not?

paul.sitoh (Fri, 23 Mar 2018 11:40:59 GMT):
Folks, I noticed something weird about the Fabric Client. Somethings when I try to load connection profile using this API: client.loadFromConfig() it tries to read to cert content from specified file path (e.g. ```signedCert: path: test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem``` ). Sometimes it does not?

paul.sitoh (Fri, 23 Mar 2018 11:40:59 GMT):
Folks, I noticed something weird about the Fabric Client. Somethings when I try to load connection profile using this API: client.loadFromConfig() it tries to read the content of the cert specified the signedCert property (e.g. ```signedCert: path: test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem``` ). Sometimes it does not?

paul.sitoh (Fri, 23 Mar 2018 11:41:43 GMT):
Is the API supposed to read the content of the file or just record the path to the file?

paul.sitoh (Fri, 23 Mar 2018 11:47:58 GMT):
If he client only record the path, does it only read the content of the signed cert when you send transactions?

paul.sitoh (Fri, 23 Mar 2018 11:47:58 GMT):
If the client only record the path, does it only read the content of the signed cert when you send transactions?

paul.sitoh (Fri, 23 Mar 2018 16:03:04 GMT):
Folks, further elaboration to my earlier posting. Basically, this is what happens. When I instantiate a fabric client from a network profile this way ```const client = Client.loadFromConfig( client.loadFromConfig()```. The client instance tries to extract certificate content -- i.e. PEM file.

paul.sitoh (Fri, 23 Mar 2018 16:03:04 GMT):
Folks, further elaboration to my earlier posting. Basically, this is what happens. When I instantiate a fabric client from a network profile this way. ```const client = Client.loadFromConfig( client.loadFromConfig()``` The client instance tries to extract certificate content -- i.e. PEM file.

paul.sitoh (Fri, 23 Mar 2018 16:04:05 GMT):
Is this the correct behaviour?

bretharrison (Fri, 23 Mar 2018 16:07:22 GMT):
The `loadFromConfig()` checks to see if there is client section of the connection profile being loaded. Then there is check to see if there is `signedCert` and `adminPrivateKey` under the organization that is called out in the client section. The key and cert are optional

bretharrison (Fri, 23 Mar 2018 16:07:22 GMT):
The `loadFromConfig()` checks to see if there is client section of the connection profile being loaded. Then there is check to see if there is `signedCert` and `adminPrivateKey` under the organization that is called out in the client section. The key and cert are optional and could be define with a `path:` where the PEM would have to be read from a file or could be the actual PEM if it is defined with a `pem:` attribute.

bretharrison (Fri, 23 Mar 2018 16:07:22 GMT):
The `loadFromConfig()` checks to see if there is client section of the connection profile being loaded. Then there is check to see if there is `signedCert` and `adminPrivateKey` under the organization that is called out in the client section. The key and cert are optional and could be define with a `path:` where the PEM would have to be read from a file or could be the actual PEM if it is defined with a `pem:` attribute. The key and cert are then set onto the client instance using`setAdminSigningIdentity()` to be available as the admin identity for signing requests when the API call indicates that the admin identity should be used.

bretharrison (Fri, 23 Mar 2018 16:07:22 GMT):
The `loadFromConfig()` checks to see if there is client section of the connection profile being loaded. Then there is check to see if there is `signedCert` and `adminPrivateKey` under the organization that is called out in the client section. The key and cert are optional and could be define with a `path:` where the PEM would have to be read from a file or could be the actual PEM if it is defined with a `pem:` attribute. The key and cert are then set onto the client instance using`setAdminSigningIdentity()` to be available as the admin identity for signing requests when the API call indicates that the admin identity should be used. This is a convenience and not required.

paul.sitoh (Fri, 23 Mar 2018 16:54:07 GMT):
@bretharrison so you can replace `path:` with `pem:`? If yes, it might be good to update the documentation.

paul.sitoh (Fri, 23 Mar 2018 16:56:15 GMT):
Also it might be useful to publish a full list of the properties. It will be useful for people developing to `12-factor app` methodology to know how to transmit such properties.

paul.sitoh (Fri, 23 Mar 2018 16:56:15 GMT):
Also it might be useful to publish a full list of the properties. It will be useful for people developing to `12-factor app` methodology to know how to transmit such properties that can be injected as environmental variables for consumption by fabric client.

bretharrison (Fri, 23 Mar 2018 17:46:07 GMT):
@paul.sitoh which doc are you looking ?

g.vamsi (Fri, 23 Mar 2018 19:26:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WRwJ9iwpPrXE3ToA6) @bretharrison thanks a lot

patelan (Fri, 23 Mar 2018 19:33:34 GMT):
Hi All, QQ. Do we have any keepalive setting between peer and orderer ? We are using fabric 1.0.3 0|app | error: [Channel.js]: getChannelConfig - Failed Proposal. Error: Error: REQUEST_TIMEOUT 0|app | at Timeout._onTimeout (/src/node_modules/fabric-client/lib/Orderer.js:186:20) 0|app | at ontimeout (timers.js:386:11) 0|app | at tryOnTimeout (timers.js:250:5) 0|app | at Timer.listOnTimeout (timers.js:214:5) 0|app | error: [Channel.js]: Error: REQUEST_TIMEOUT 0|app | at Timeout._onTimeout (/src/node_modules/fabric-client/lib/Orderer.js:186:20) 0|app | at ontimeout (timers.js:386:11) 0|app | at tryOnTimeout (timers.js:250:5) 0|app | at Timer.listOnTimeout (timers.js:214:5) because we are seeing this error from node js SDK (1.0.0) while instantiating chain code.

patelan (Fri, 23 Mar 2018 19:34:31 GMT):
First time it is working fine. if we keep everything idle for 15 mins and then try to add new smart contract we are seeing this error.

paul.sitoh (Fri, 23 Mar 2018 19:40:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Hr6ammPn2CQPogz5J) @bretharrison This one https://fabric-sdk-node.github.io/tutorial-network-config.html

paul.sitoh (Fri, 23 Mar 2018 19:43:19 GMT):
Are all properties by default optional?

patelan (Fri, 23 Mar 2018 20:12:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XL2zmeRqGnsYNardC) Please ignore this

patelan (Fri, 23 Mar 2018 20:13:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XL2zmeRqGnsYNardC) Please ignore this

patelan (Fri, 23 Mar 2018 20:15:23 GMT):
Hi All, Actually fabric-SDK (node 1.0.0) is timing out while connecting to Orderer. First time it is working fine, if we keep everything idle for 15 mins we are seeing below timeout error.

patelan (Fri, 23 Mar 2018 20:15:25 GMT):
0|app | error: [Channel.js]: getChannelConfig - Failed Proposal. Error: Error: REQUEST_TIMEOUT 0|app | at Timeout._onTimeout (/src/node_modules/fabric-client/lib/Orderer.js:186:20) 0|app | at ontimeout (timers.js:386:11) 0|app | at tryOnTimeout (timers.js:250:5) 0|app | at Timer.listOnTimeout (timers.js:214:5) 0|app | error: [Channel.js]: Error: REQUEST_TIMEOUT 0|app | at Timeout._onTimeout (/src/node_modules/fabric-client/lib/Orderer.js:186:20) 0|app | at ontimeout (timers.js:386:11) 0|app | at tryOnTimeout (timers.js:250:5) 0|app | at Timer.listOnTimeout (timers.js:214:5)

patelan (Fri, 23 Mar 2018 20:16:05 GMT):
we are using fabric # 1.0.3 , fabric node sdk 1.0.0

bretharrison (Fri, 23 Mar 2018 21:28:32 GMT):
@patelan Would you be able to update your NodeSDK to 1.0.5 ... this will bring in the latest level of the grpc package (1.10.0) which owns those connections. NodeSDK 1.0.0 was on grpc of something less than 1.3.0.

patelan (Fri, 23 Mar 2018 21:32:19 GMT):
@bretharrison Is nodeSDK 1.0.5 will work with fabric images 1.0.3 (peer,orderer) ?

bretharrison (Fri, 23 Mar 2018 21:32:34 GMT):
yes

patelan (Fri, 23 Mar 2018 21:35:42 GMT):
@bretharrison Thanks for help. Do I need to change anything after changing sdk to 1.0.5 ? Is there any work around for SDK 1.0.3 because we have plan to upgrade 1.1.0 after 3-4 months ?

bretharrison (Fri, 23 Mar 2018 21:39:12 GMT):
@paul.sitoh yes optional, however an incomplete network or client sections will cause issues when trying to run.

bretharrison (Fri, 23 Mar 2018 21:43:09 GMT):
I do not know what you mean by work around for 1.0.3. You should just be able to install 1.0.5, no other changes.

bretharrison (Fri, 23 Mar 2018 21:43:09 GMT):
@patelan I do not know what you mean by work around for 1.0.3. You should just be able to install 1.0.5, no other changes.

patelan (Fri, 23 Mar 2018 21:44:46 GMT):
@bretharrison okey let me try with 1.0.5 Do I need to change fabric-ca-client also to 1.0.5 ?

bretharrison (Fri, 23 Mar 2018 21:47:26 GMT):
yes

davidkhala (Sat, 24 Mar 2018 04:14:03 GMT):
@bretharrison I found in channel.getChannelConfigFromOrderer(), orderer.sendDeliver is called twice. Could you help to explain the reason behind?

paul.sitoh (Sat, 24 Mar 2018 07:23:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tvoM5K9JTm5JhByEg) @bretharrison Is there any documentation explaining any of the "optional" properties are actually not so optional?

paul.sitoh (Sat, 24 Mar 2018 07:25:17 GMT):
Just wondering if there are any doc that might have these noted before I start the process of smoking them out.

paul.sitoh (Sat, 24 Mar 2018 07:25:17 GMT):
Just wondering if there are any doc that might have these noted before I start the process of smoking them out myself.

paul.sitoh (Sat, 24 Mar 2018 07:25:17 GMT):
Just wondering if there are any doc that might have these noted before I start the process of smoking them out myself. I am happy to share any information I found.

paul.sitoh (Sat, 24 Mar 2018 07:25:17 GMT):
Just wondering if there are any doc that might have these noted before I start the process of smoking them out myself. I am happy to share any information I found but only if there is not already information existing.

bretharrison (Sat, 24 Mar 2018 14:32:47 GMT):
@davidkhala the `channel.getChannelConfigFromOrderer()` uses the `deliver` service on the orderer to request blocks. The first call to the service is to get the latest block, every block points to the config block used, so since it was the latest block it will have the latest config block. The second call is to get the latest config block.

bretharrison (Sat, 24 Mar 2018 14:38:27 GMT):
@paul.sitoh The only doc is within the yaml files used by the test cases https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/network.yaml There is also a JIRA https://jira.hyperledger.org/browse/FAB-5363

bretharrison (Sat, 24 Mar 2018 14:38:27 GMT):
@paul.sitoh The only doc for connection profile is within the yaml files used by the test cases https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/network.yaml There is also a JIRA https://jira.hyperledger.org/browse/FAB-5363 And there is the how to use tutorial https://fabric-sdk-node.github.io/tutorial-network-config.html

bretharrison (Sat, 24 Mar 2018 14:38:27 GMT):
@paul.sitoh The only doc for connection profile settings within the yaml files used by the test cases https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/network.yaml There is also a JIRA https://jira.hyperledger.org/browse/FAB-5363 And there is the how to use tutorial https://fabric-sdk-node.github.io/tutorial-network-config.html

paul.sitoh (Sat, 24 Mar 2018 15:44:59 GMT):
Ok. Suggestion might be a good idea to put a linked in the documentation (readthedoc) to the github repo.

paul.sitoh (Sat, 24 Mar 2018 15:44:59 GMT):
Ok thanks. Suggestion might be a good idea to put a linked in the documentation (readthedoc) to the github repo.

paul.sitoh (Sat, 24 Mar 2018 15:44:59 GMT):
Ok thanks. Suggestion: might be a good idea to put a linked in the documentation (readthedoc) to the github repo.

paul.sitoh (Sat, 24 Mar 2018 16:14:25 GMT):
@bretharrison out of curosity. I notice that the spec on the Unit Test version seemed out of synch with JIRA's comments. Does the unit test in the SDK git repo not get updated?

paul.sitoh (Sat, 24 Mar 2018 16:14:25 GMT):
@bretharrison out of curosity. I notice that the spec on the Unit Test version seemed out of synch with JIRA's comments. Does the unit test in the SDK git repo not get updated according to JIRA?

paul.sitoh (Sat, 24 Mar 2018 16:14:25 GMT):
@bretharrison out of curosity. I notice that the spec on the Unit Test version seemed out of synch with JIRA's comments. Does the unit test in the SDK git repo not get updated according to JIRA? The JIRA says latest design has it been implemented?

paul.sitoh (Sat, 24 Mar 2018 16:14:25 GMT):
@bretharrison out of curosity. I notice that the spec on the Unit Test version seemed out of synch with JIRA's comments. Does the unit test in the SDK git repo not get updated according to JIRA? The JIRA says latest design has it been implemented or is it still under consideration?

davidkhala (Sun, 25 Mar 2018 10:37:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dqDwkqMudCrqWqH9S) @bretharrison Thanks so much! Now I understand it clearly.

kriss1897 (Sun, 25 Mar 2018 10:44:39 GMT):
Has joined the channel.

dave.enyeart (Sun, 25 Mar 2018 13:04:23 GMT):
@rjones @rameshthoomu for npm, it looks like `hyperledger-lf` can add npm admins and `hyplerledger-ci` can add project maintainers (fabric-client, fabric-ca-client, fabric-shim). Could you add bret as both npm admin and maintainer for these three projects? @bretharrison what is your npm id?

rjones (Sun, 25 Mar 2018 13:04:24 GMT):
Has joined the channel.

dave.enyeart (Sun, 25 Mar 2018 13:04:59 GMT):
(I got this info from Jim Zhang today)

kriss1897 (Sun, 25 Mar 2018 14:10:34 GMT):
How can we get all the blocks on the chain from node SDK??

rjones (Sun, 25 Mar 2018 14:20:20 GMT):
@dave.enyeart please send the request to helpdesk@hyperledger.org thank you

paul.sitoh (Sun, 25 Mar 2018 19:23:22 GMT):
Assuming that we are transmitting the network connection profile as part of a cloud manifest and we are using mutual TLS. Will we be able to sent the keyfile and certfile in the form of a URL? At the moment according to JIRA we can only specify this as part of volume specification -- i.e. path. See reference example ```certificateAuthorities: ca-org1: url: https://localhost:7054 httpOptions: verify: true tlsCACerts: # Comma-Separated list of paths path: peerOrganizations/org1.example.com/ca/org1.example.com-cert.pem # Client key and cert for TLS mutual auth with Fabric CA. If the target Fabric CA server # does not have TLS mutual auth turned on, then this section is not needed client: keyfile: path/to/tls/fabricca/certs/client/client_fabric_client-key.pem certfile: path/to/tls/fabricca/certs/client/client_fabric_client.pem```

paul.sitoh (Sun, 25 Mar 2018 19:25:22 GMT):
In other words can we specific the client key in terms of keyfile-URL and certfile-URL to support such as EC3 way of managing assets?

zhaochy (Mon, 26 Mar 2018 01:58:20 GMT):
@paul.sitoh currently sdk does not support send keyfile from URL

siddesh_sangodkar (Mon, 26 Mar 2018 06:52:37 GMT):
Why does fabric-node-sdk use secp256r1 instead of secp256k1? . Both seems to have similar security. https://crypto.stackexchange.com/questions/18965/is-secp256r1-more-secure-than-secp256k1 Problem Im facing is.. there are less implementations for encryption/decryption using secp256r1 keypair.

siddesh_sangodkar (Mon, 26 Mar 2018 06:52:37 GMT):
Why does fabric-node-sdk use secp256r1 instead of secp256k1 for generating Key pair ? . Both seems to have similar security. https://crypto.stackexchange.com/questions/18965/is-secp256r1-more-secure-than-secp256k1 Problem Im facing is.. there are less implementations for encryption/decryption using secp256r1 keypair.

siddesh_sangodkar (Mon, 26 Mar 2018 06:52:37 GMT):
Why does fabric-node-sdk use secp256r1 instead of secp256k1 for generating Key pair ? . Both seems to have similar security. https://crypto.stackexchange.com/questions/18965/is-secp256r1-more-secure-than-secp256k1 Problem Im facing is.. there are less implementations in javascript for encryption/decryption using secp256r1 keypair. Any other alternatives??

siddesh_sangodkar (Mon, 26 Mar 2018 08:56:12 GMT):
@mastersingh24

varun-raj (Mon, 26 Mar 2018 11:46:36 GMT):
Here is my next article on how to write RESTful API for Fabric with NodeSDK. Also Spoke about how to use `ConnectionProfile.yml` https://www.skcript.com/svr/setting-up-restful-api-server-for-hyperledger-fabric-with-nodejs-sdk/

anzalbeg (Mon, 26 Mar 2018 11:49:16 GMT):
Has joined the channel.

mastersingh24 (Mon, 26 Mar 2018 16:08:57 GMT):
@siddesh_sangodkar - Fabric actually uses the standard NIST Elliptic Curves so that's what the SDKs support as well

mastersingh24 (Mon, 26 Mar 2018 16:09:13 GMT):
There are multiple Javascript libraries out there ....

anzalbeg (Mon, 26 Mar 2018 16:24:37 GMT):
Hi Guys. Have anyone tried running fabric-ca example under fabric-samples with fabric-node-sdk. I tried and getting TLS issues while trying to run through fabric node sdk. However its working fine when i run the same through peer cli commands. Actually I have root CA and intermediate CA per org in this network. I think the issue is with tlsCACerts section in fabric-node-sdk connection profile. How to provide tls certs for root and intermediate CAs in tlsCACerts section of connection profile

anzalbeg (Mon, 26 Mar 2018 16:27:08 GMT):
I tried many combinations but got no success. how to give root and intermediate tls ca certs both in connection profile of fabric-node-sdk. I tried to give comma seperated paths of certs but it throws the error in reading certificates

anzalbeg (Mon, 26 Mar 2018 16:27:39 GMT):
tls

anzalbeg (Mon, 26 Mar 2018 16:28:09 GMT):

error.txt

javrevasandeep (Mon, 26 Mar 2018 19:16:55 GMT):
Hi Anzal. Did you find any solution to your issue. I am also facing same issue. I think fabric node sdk doesn't support multiple tlsCACerts for peers or orderers

JayPandya (Mon, 26 Mar 2018 21:49:28 GMT):
Has joined the channel.

ArnabChatterjee (Tue, 27 Mar 2018 02:20:29 GMT):
Hello Fabric Experts. Thank you for your support. Can share the Dockerfile we can use to deploy a NodeJS based docker container running Fabric NodeJS client with node version 8? Actually I had tried to build one from Node base image but I am not able to make grpc calls. When doing npm install, Grpc build doesn't seem to be building inside the container.

ArnabChatterjee (Tue, 27 Mar 2018 02:20:29 GMT):
Hello Fabric Experts. Thank you for your support. Can anyone share the Dockerfile we can use to deploy a NodeJS based docker container running Fabric NodeJS fabric sdk with node version 8? Actually I had tried to build one from Node base image but I am not able to make grpc calls. When doing npm install, Grpc build doesn't seem to be building inside the container.

rjones (Tue, 27 Mar 2018 02:33:51 GMT):
Has left the channel.

yinzhiwu (Tue, 27 Mar 2018 02:50:55 GMT):
Has joined the channel.

varun-raj (Tue, 27 Mar 2018 04:53:45 GMT):
Hi, is anyone tried to setup multiple orderers and defines them in the connection profile? I would like to know how we can setup an multi orderer network and connect the nodejs Client with it

BilalAhmad (Tue, 27 Mar 2018 06:20:58 GMT):
Has joined the channel.

anzalbeg (Tue, 27 Mar 2018 06:53:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fG4cXM2TLXoFu4EPz) any updates on this issue, i am stuck at this error from past two days

Gerard9494 (Tue, 27 Mar 2018 09:43:25 GMT):
I am trying to define my network endorsement-policy, but I do not understand what I am specificating at this document: { "identities": [ { "role": { "name": "member", "mspId": "Org1MSP" } }, { "role": { "name": "member", "mspId": "Org2MSP" } } ], "policy": { "2-of": [ { "signed-by": 0 }, { "signed-by": 1 } ] } } Somebody know where I can find the information about this document, please? So I can understand it and add a new identity Thanks! 🙂

uxelduxel (Tue, 27 Mar 2018 10:38:33 GMT):
Hello, does someone know where to obtain the typescript types for fabric-shim? I want to if possible write my chaincode in typescript

nhrishi (Tue, 27 Mar 2018 11:10:33 GMT):
private

hamza113 (Tue, 27 Mar 2018 11:25:56 GMT):
Has joined the channel.

nhrishi (Tue, 27 Mar 2018 11:42:17 GMT):
Hi Do we also have an experimental Fabric Node SDK (v1.1.0) compatible for SideDB features.

jastisriradheshyam (Tue, 27 Mar 2018 11:43:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=t65RfMX679Apf5Ge3) @Gerard9494 *identities* : here we define the identities that are endorsing peers *_role_* means role of the endorser in this example both will are member of two different organizations MSP. *policy* : here we define endorsement policy *_2-of_* contains *_"signed-by" : 0_* and *_"signed-by" : 1_*, here 0 and 1 are index of identities object above defined. 2-of means both the identities have to endorse the proposal. n-of (2-of, 3-of, ..., n-of) means n identities that are defined in the array contained in 'n-of' object should endorse. For reference: https://stackoverflow.com/questions/44807102/hyperledger-fabric-endorsement-policy-checker-failure

jastisriradheshyam (Tue, 27 Mar 2018 11:43:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=t65RfMX679Apf5Ge3) @Gerard9494 *identities* : here we define the identities that are endorsing peers *_role_* means role of the endorser in this example both will are member of two different organizations MSP. *policy* : here we define endorsement policy *_2-of_* contains *_"signed-by" : 0_* and *_"signed-by" : 1_*, here 0 and 1 are index of identities object above defined. 2-of means both the identities (any one member of org1 and any one member of org2) have to endorse the proposal. n-of (2-of, 3-of, ..., n-of) means n identities that are defined in the array contained in 'n-of' object should endorse. *For reference: * [1]https://stackoverflow.com/questions/44807102/hyperledger-fabric-endorsement-policy-checker-failure [2]https://stackoverflow.com/questions/49292170/endorsement-policy-doesnt-work

javrevasandeep (Tue, 27 Mar 2018 12:17:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JENJgMv6QR4j64FjL) @anzalbeg I am also facing the same issues. this is happening when i create my certificates through Fabric-CA instead of cryptogen. Also in present form, fabric-node-sdk doesn't seem to support providing multiple tlsCACerts in connection profile which is required incase of 2 level of CA architecture i.e. rootCA and intermediateCA. Can anyone on this channel please help on this issue

bretharrison (Tue, 27 Mar 2018 14:32:17 GMT):
@varun-raj The application is able to manage the multiple orderers as the orderer based API's will take the `orderer:` within the request object.

bretharrison (Tue, 27 Mar 2018 14:34:48 GMT):
@uxelduxel Typescript for fabric-shim is being worked on https://gerrit.hyperledger.org/r/#/c/18725/ Feel free to help out.

uxelduxel (Tue, 27 Mar 2018 14:36:26 GMT):
@bretharrison Thanks i already found something else tho which seems to work just fine https://github.com/wearetheledger/fabric-shim-types

anzalbeg (Tue, 27 Mar 2018 15:41:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zG9Dxdk3LkTvheKHa) @javrevasandeep any update on this issue? and how do we handle client side authorization from fabric-node-sdk or connection profile?

thoduerr (Tue, 27 Mar 2018 21:53:59 GMT):
Has joined the channel.

varun-raj (Wed, 28 Mar 2018 04:52:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6GAmTA7Hubs66Fvhi) @bretharrison I'm using the connection profile and say I'm configuring the endpoints of multiple orderers under `orderers:` section, will the SDK be able to handle the automatic failovers when the first hit orderer is down?

andreamagagna (Wed, 28 Mar 2018 08:55:23 GMT):
Has joined the channel.

andreamagagna (Wed, 28 Mar 2018 13:14:21 GMT):
Hi everybody I'm new at using this sdk... I cannot find an answer to my question... Can the sdk query blocks from an existing fabric network created with the composer?

patelan (Wed, 28 Mar 2018 13:36:44 GMT):
@bretharrison I have upgraded node SDK to 1.0.5 (grpc 1.10.0). First time it is working fine able to create new smart contracts, if we keep everything idle for 15 mins and then seeing below timeout error while creating new smart contracts

patelan (Wed, 28 Mar 2018 13:37:21 GMT):

Clipboard - March 28, 2018 9:37 AM

patelan (Wed, 28 Mar 2018 15:06:56 GMT):
Hi All, if anybody seen similar error from node sdk

patelan (Wed, 28 Mar 2018 15:07:03 GMT):

Clipboard - March 28, 2018 11:07 AM

JonathanJones (Wed, 28 Mar 2018 16:08:42 GMT):
Has joined the channel.

obernin (Wed, 28 Mar 2018 23:14:36 GMT):
Hi, I am trying to update my chaincode using the SDK, but I receive an error message that the chaincode already exists

obernin (Wed, 28 Mar 2018 23:14:38 GMT):
2018-03-28T22:43:43.663Z - info: Attempting to instantiate chaincode blockbiacc 0.1.15 on channel mychannel on peers grpc://169.46.223.67:30050,grpc://169.46.223.67:30051,grpc://169.46.223.67:31051 2018-03-28T22:43:44.171Z - info: Sending instantiation proposal to endorsers error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: chaincode exists blockbiacc) at /Users/obernin/Work/BlockBia/workspace/src/github.ibm.com/BlockBia/app/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: chaincode exists blockbiacc) at /Users/obernin/Work/BlockBia/workspace/src/github.ibm.com/BlockBia/app/node_modules/grpc/src/node/src/client.js:434:17

obernin (Wed, 28 Mar 2018 23:15:16 GMT):
Here is the code I use to do this

obernin (Wed, 28 Mar 2018 23:15:49 GMT):
logger.info('Sending instantiation proposal to endorsers'); tx_id = client.newTransactionID(); var request = { chaincodeId: chaincodeName, chaincodeVersion: chaincodeVersion, fcn: functionName, args: [], txId: tx_id }; return channel.sendInstantiateProposal(request).then((results) => {

obernin (Wed, 28 Mar 2018 23:16:24 GMT):
I have made sureI chnaged the chaincodeVersion (from 0.1.0 to 0.1.15)

obernin (Wed, 28 Mar 2018 23:16:29 GMT):
am I doing something wrong ?

zhaochy (Thu, 29 Mar 2018 01:25:22 GMT):
@obernin you need to use `sendUpgradeProposal` instead of `sendInstantiateProposal`

zhaochy (Thu, 29 Mar 2018 01:26:52 GMT):
here is the doc https://fabric-sdk-node.github.io/Channel.html#sendUpgradeProposal__anchor

obernin (Thu, 29 Mar 2018 07:27:48 GMT):
thanks !!

sklymenko (Thu, 29 Mar 2018 16:03:27 GMT):
Has joined the channel.

indira.kalagara (Thu, 29 Mar 2018 18:01:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a3Mnh6xow6pj8gT2z) @AnthonyRoux Hi, I am facing the same issue. Just trying the marbles application on local network of Fabric V1.1. As you mentioned through CLI cmds everything works fine, however from Node-sdk client , I see the same error. What is the solution for this ?

tinywell (Fri, 30 Mar 2018 00:54:13 GMT):
Has left the channel.

robin666 (Fri, 30 Mar 2018 09:00:20 GMT):
Has joined the channel.

zhaochy (Mon, 02 Apr 2018 02:15:03 GMT):
@indira.kalagara can you provides more logs? you can set `export HFC_LOGGING='{"debug":"debug.log"}'` before you running your application

varun-raj (Mon, 02 Apr 2018 08:24:40 GMT):
Hi even after revoking the enrollmentid I'm still able to perform operations

varun-raj (Mon, 02 Apr 2018 08:25:05 GMT):
How can I completely revoke an enrolment?

souvik (Mon, 02 Apr 2018 10:25:34 GMT):
Has joined the channel.

souvik (Mon, 02 Apr 2018 10:26:14 GMT):
Hi,

souvik (Mon, 02 Apr 2018 10:26:34 GMT):
I am getting error:Failed to send transaction and get notifications within the timeout period. for transaction: 524b2cf42d1bff90b4248a45bf570d8373134f7329cd878ba3023828441283bc

souvik (Mon, 02 Apr 2018 10:27:26 GMT):
and getting response.status:undefined

varun-raj (Mon, 02 Apr 2018 11:19:51 GMT):
Does anyone knows how to use `generateCRL`?

patelan (Mon, 02 Apr 2018 14:01:06 GMT):
Hi All, With Fabric-client and fabric-ca-client 1.0.5. If we keep environment idle for 30 mins and then seeing this error while instantiating the contract. 0|app | error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: TCP Read failed\n at createStatusError (/src/node_modules/grpc/src/client.js:64:15)\n at ClientDuplexStream._emitStatusIfDone (/src/node_modules/grpc/src/client.js:270:19)\n at ClientDuplexStream._receiveStatus (/src/node_modules/grpc/src/client.js:248:8)\n at /src/node_modules/grpc/src/client.js:804:12" 0|app | [2018-03-28 00:01:26.314] [ERROR] instantiate-chaincode - Failed to send instantiate transaction and get notifications within the timeout period. Error: SERVICE_UNAVAILABLE 0|app | [2018-03-28 00:01:26.314] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined 0|app | inside addEventDocumentToRetry - peMeetingID: 331193

patelan (Mon, 02 Apr 2018 20:49:19 GMT):
Hi All, Can you please help if I can configure grpc.keepalive_time_ms for fabric-node sdk 1.0.5. ?

crj (Tue, 03 Apr 2018 03:55:04 GMT):
[ERROR] instantiate-chaincode - Error: 12 UNIMPLEMENTED: unknown service protos.Deliver How can I sovle this?

sonnykui (Tue, 03 Apr 2018 04:09:50 GMT):
Has joined the channel.

DarshanBc (Tue, 03 Apr 2018 05:45:05 GMT):
how the communication between api server and docker established is it through gossip protocol?

neharprodduturi (Tue, 03 Apr 2018 07:17:57 GMT):
I am trying to configure fabric-sdk-node on windows machine. I get the following error: npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! fabric-sdk-node@0.0.2 postinstall npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the fabric-sdk-node@0.0.2 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. Can anybody tell me how I can fix this problem?

wangdong (Tue, 03 Apr 2018 07:22:37 GMT):
I am not sure. Never try it on windows.

wangdong (Tue, 03 Apr 2018 07:23:43 GMT):
@DarshanBc gossip is used for peers' communication in the fabric network.

wangdong (Tue, 03 Apr 2018 07:25:23 GMT):
I am not sure what you mean by api server

wangdong (Tue, 03 Apr 2018 07:26:06 GMT):
The communication between network and client is with grpc

neharprodduturi (Tue, 03 Apr 2018 07:26:30 GMT):
@wangdong Thank you for your reply. You think there is no support for it on windows?

wangdong (Tue, 03 Apr 2018 07:27:09 GMT):
I can not say that. Because I have never try that.

wangdong (Tue, 03 Apr 2018 07:27:29 GMT):
The linux OS is recommended.

wangdong (Tue, 03 Apr 2018 07:29:40 GMT):
There are so many experience for Linux OS.

wangdong (Tue, 03 Apr 2018 07:29:40 GMT):
Or you can try to look for the document if there any segment for windows.

neharprodduturi (Tue, 03 Apr 2018 07:32:48 GMT):
okay. Sure. I've tried all the solutions I found online and nothing seems to fix the problem. I'll try to configure on a Linux manchine now.

AlekArmbruster (Tue, 03 Apr 2018 09:22:43 GMT):
Has joined the channel.

davidkhala (Tue, 03 Apr 2018 10:06:44 GMT):
I think one bad experience on windows is the lack of docker support.

davidkhala (Tue, 03 Apr 2018 10:07:11 GMT):
docker cannot be installed on some windows 10 non-enterprise version..

DarshanBc (Tue, 03 Apr 2018 10:08:15 GMT):
@wangdong I am working on balance transfer example where I run node.js apllication which exposes few apis to work with. so when I call for example chaincode codes inside those node.js files are invoked my questiion is how the communication established between node.js code and dockers

DarshanBc (Tue, 03 Apr 2018 10:08:15 GMT):
@wangdong I am working on balance transfer example where I run node.js apllication which exposes few apis to work with. so when I call for example chaincode codes first invoke_chaincode.js file is invoked my questiion is how the communication established between node.js code and dockers

wangdong (Tue, 03 Apr 2018 10:50:32 GMT):
OK, here the relationship is between client and network.

wangdong (Tue, 03 Apr 2018 10:50:45 GMT):
They are communicated with grpc.

wangdong (Tue, 03 Apr 2018 10:50:48 GMT):
@DarshanBc

DarshanBc (Tue, 03 Apr 2018 10:51:13 GMT):
ok thank you @wangdong

Legiit (Tue, 03 Apr 2018 11:55:13 GMT):
Has joined the channel.

Legiit (Tue, 03 Apr 2018 11:55:27 GMT):
Hey guys I am trying to create a register/login system, how would one do this? Currently during my registration I do ``` secret = await fabricCaClient.register({ enrollmentID: user.username, affiliation: user.affiliation }, adminUser) ``` and enroll the user ``` const enrollment = await fabricCaClient.enroll({ enrollmentID: user.username, enrollmentSecret: user.password }) ``` I then keep the secret and enrollment with the corresponding user in my database. But how do I now create a login so a json token can be associated with the logged in user?

Rumeel_Hussain (Tue, 03 Apr 2018 15:06:19 GMT):
Has joined the channel.

xiven (Tue, 03 Apr 2018 16:05:13 GMT):
are there any system requirements to run the balance-transfer example for v1.1 such as memory?

bretharrison (Tue, 03 Apr 2018 17:02:26 GMT):
@patelan you may add any settings to the `opt` object when building peer, orderer, channel event hub, or event hub. Specifically the keep alive setting for `EventHub` and 'ChannelEventHub` may also be added to the NodeSDK's config service. When an event service connection is established with the fabric network the `'grpc.keepalive_time_ms` setting value is determined by first looking at the create options, then looking in the configuration, then using the default of 360000 (6 minutes) for v1.1 and default of 300000 (5 minutes) for 1.0.

bretharrison (Tue, 03 Apr 2018 17:03:23 GMT):
@crl Would you have a debug log when you get this error ?

bretharrison (Tue, 03 Apr 2018 17:03:23 GMT):
@crj Would you have a debug log when you get this error ?

douglasthiel (Tue, 03 Apr 2018 18:13:58 GMT):
Has joined the channel.

patelan (Tue, 03 Apr 2018 20:34:59 GMT):
@bretharrison Thanks a lot.

Yakechi (Wed, 04 Apr 2018 14:02:24 GMT):
Has joined the channel.

MiguelPires (Wed, 04 Apr 2018 15:36:48 GMT):
Has joined the channel.

MiguelPires (Wed, 04 Apr 2018 15:39:00 GMT):
Hi. When I try to install the dependencies by running "npm install", I get the following error: npm ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q https://github.com/jimthematrix/mock-couch.git /home/mute/.npm/_cacache/tmp/git-clone-2edf1c5a npm ERR! /home/mute/.npm/_cacache/tmp/git-clone-2edf1c5a/.git: Permission denied npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /home/mute/.npm/_logs/2018-04-04T15_36_32_135Z-debug.log

MiguelPires (Wed, 04 Apr 2018 15:40:01 GMT):
I can clone the mock-couch repo manually without a problem but "npm install" always fails. Does anyone know what the problem could be? Thank you very much.

patelan (Wed, 04 Apr 2018 15:40:50 GMT):
@bretharrison Not sure how to verify grpc keepalive is working from node-sdk to orderer ? Not seeing any keep alive log in orderer. Is there any specific thing I can check and confirm ?

patelan (Wed, 04 Apr 2018 16:25:07 GMT):
@bretharrison Is there any option to keep grpc connection indefinite time or stop from closing the grpc connection ?

jorgedr (Wed, 04 Apr 2018 21:16:07 GMT):
Has joined the channel.

jorgedr (Wed, 04 Apr 2018 21:19:41 GMT):
Hey guys quick question, to establish a connection with the Peer's event hub, does the client EventHub class somehow uses an enrollment certificate to establish the connection and listen to events (basically listening on behalf of a registered user) or does it only uses the TLS certificate to create a secure connection and start listening to events?

sthavisomboon (Wed, 04 Apr 2018 22:58:42 GMT):
Has joined the channel.

mastersingh24 (Thu, 05 Apr 2018 11:37:19 GMT):
@jorgedr - it uses the enrollment certificate because the request must be signed

kai_den (Thu, 05 Apr 2018 11:42:18 GMT):
Hi everyone! Please tell me how to deploy locally developed chaincode in the docker container. Version is v1.0

Kimmelim (Thu, 05 Apr 2018 14:35:46 GMT):
Has joined the channel.

uxelduxel (Thu, 05 Apr 2018 15:00:27 GMT):
Hi, is there anywhere a good documentation for fabric-shim (The one used when making javascript chaincode). What i want is basically what return values i can expect from certain calls. For example stub.getState(KEY), what does this return when there is no such key in the blockchain? I have many questions like this and i dont want to solve all of them by trial and error if possible

uxelduxel (Thu, 05 Apr 2018 15:01:06 GMT):
@kai_den take a look at the balance-transfer example inside the fabric examples it contains deployment of nodejs and golang chaincode

uxelduxel (Thu, 05 Apr 2018 15:19:08 GMT):
also another thing that is not clear. I need to change core.ledger.history.enableHistoryDatabase to true to be able to call stub.getHistoryForKey(KEY) in which file would i need to change this, according to any information avaialble it has to be a core.yaml. I do not have such a file in the configuration i am using. I have docker-compose files, crypto-config and channel-config yaml files and the network config files from the nodesdk. I do not think this setting looks like it belongs into any of those. So where do i have to configure this

pankajcheema (Thu, 05 Apr 2018 17:26:32 GMT):
Has joined the channel.

pankajcheema (Thu, 05 Apr 2018 17:26:50 GMT):
Hi All........ Anyone knows where does the enrollmentID and enrollmentSecret stores when we create our own network and use the sdk to specify both variables ``` return fabric_ca_client.enroll({ enrollmentID: 'admin', enrollmentSecret: 'adminpw' }) ``` If I use wrong `enrollmentID` and `enrollmentSecret` then ca rejects the request for enrollment logs of CA ``` ca.example.com | 2018/04/05 16:25:04 [DEBUG] Received request for /api/v1/enroll ca.example.com | 2018/04/05 16:25:04 [DEBUG] ca.Config: &{Version:1.1.0 Cfg:{Identities:{AllowRemove:false} Affiliations:{AllowRemove:false}} CA:{Name:ca.example.com Keyfile:/etc/hyperledger/fabric-ca-server-config/2e2223dd901510904ca79e2b436ed98841644be19af8023caade89cb6447c6a0_sk Certfile:/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem Chainfile:/etc/hyperledger/fabric-ca-server/ca-chain.pem} Signing:0xc4202ebc90 CSR:{CN:ca.org1.example.com Names:[{C:US ST:North Carolina L: O:Hyperledger OU:Fabric SerialNumber:}] Hosts:[e44204a437c3 localhost] KeyRequest: CA:0xc4202b6620 SerialNumber:} Registry:{MaxEnrollments:-1 Identities:[{ Name:**** Pass:**** Type:client Affiliation: MaxEnrollments:0 Attrs:map[hf.Revoker:1 hf.IntermediateCA:1 hf.GenCRL:1 hf.Registrar.Attributes:* hf.AffiliationMgr:1 hf.Registrar.Roles:peer,orderer,client,user hf.Registrar.DelegateRoles:peer,orderer,client,user] }]} Affiliations:map[org2:[department1] org1:[department1 department2]] LDAP:{ Enabled:false URL:ldap://****:****@:/ UserFilter:(uid=%s) GroupFilter:(memberUid=%s) Attribute:{[uid member] [{ }] map[groups:[{ }]]} TLS:{false [] { }} } DB:{ Type:sqlite3 Datasource:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db TLS:{false [] { }} } CSP:0xc4202cb140 Client: Intermediate:{ParentServer:{ URL: CAName: } TLS:{Enabled:false CertFiles:[] Client:{KeyFile: CertFile:}} Enrollment:{ Name: Secret:**** Profile: Label: CSR: CAName: AttrReqs:[] }} CRL:{Expiry:24h0m0s}} ca.example.com | 2018/04/05 16:25:04 [DEBUG] DB: Getting identity admin1 ca.example.com | 2018/04/05 16:25:04 [INFO] 172.18.0.1:48966 POST /api/v1/enroll 401 23 "Failed to get user: : scode: 404, code: 63, msg: Failed to get User: sql: no rows in result set"

pankajcheema (Thu, 05 Apr 2018 17:56:19 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"

scmchan (Thu, 05 Apr 2018 20:46:48 GMT):
I recently upgraded my HL Fabric application to 1.1.0 and ran into some issues deploying my chaincode containers through the fabric-nodesdk. I used chaintool v1.1.0 to package my chaincode into a CAR file and attempted to install it on the peer. However, when I do so, I immediately get this error: `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: gzip: invalid header)` I did some poking around and I found this: https://jira.hyperledger.org/browse/FAB-9059. Could this be the cause of my issue? If so, I noticed it's marked to be fixed in 1.2. Are there any temporary workarounds I can make at this time or am I limited to using other install types for now?

scmchan (Thu, 05 Apr 2018 20:46:48 GMT):
I recently upgraded my HL Fabric application to 1.1.0 and ran into some issues deploying my chaincode containers through the fabric-nodesdk. I used chaintool v1.1.0 to package my chaincode into a CAR file and attempted to install it on the peer. However, when I do so, I immediately get this error: `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: gzip: invalid header)` I did some poking around and I found this: https://jira.hyperledger.org/browse/FAB-9059. Could this be the cause of my issue? If so, I noticed it's marked to be fixed in 1.2. Are there any temporary workarounds I can make at this time or am I limited to using other install types for now?

Bchainer (Fri, 06 Apr 2018 01:26:00 GMT):
Has joined the channel.

zonkedhazmat (Fri, 06 Apr 2018 05:41:56 GMT):
Has joined the channel.

agiledeveloper (Fri, 06 Apr 2018 18:08:06 GMT):
hi experts; I am getting error `sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err MSP EGArtMSP is unknown` when invoking the chain code from the client app, any suggestions where to look ?

kkado (Sat, 07 Apr 2018 04:17:24 GMT):
Has joined the channel.

pankajcheema (Sat, 07 Apr 2018 11:04:34 GMT):
Hi Team i am getting error ```[client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF at new createStatusError (/home/pankaj/fabric-node-integration/node_modules/grpc/src/client.js:64:15)```

pankajcheema (Sat, 07 Apr 2018 12:20:11 GMT):
I think this issue is related p TLS

pankajcheema (Sat, 07 Apr 2018 12:20:11 GMT):
I think this issue is related TLS

pankajcheema (Sat, 07 Apr 2018 12:20:37 GMT):
Till now whatever I investigate

davidkhala (Sun, 08 Apr 2018 01:01:42 GMT):
@bretharrison I am thinking of why we make api.js duplicated in both fabric-client and fabric-ca-client, is it necessary? That will be better for prototype chaining if we have only one api.js

vu3mmg (Sun, 08 Apr 2018 11:31:14 GMT):
How do we extract the error code from a chaincode proposal rejection . for example from Error: chaincode error (status: 500, message: "{"msg":"This Transaction already

vu3mmg (Sun, 08 Apr 2018 11:31:32 GMT):
i think this is a kind of stack trace object

vu3mmg (Sun, 08 Apr 2018 11:31:44 GMT):
is this a bug or intended way of error handling

uxelduxel (Mon, 09 Apr 2018 10:40:08 GMT):
hello how does one parse the result of stub.getHistoryForKey(key); the return type seems to be rather undocumented. From Simple reverse engineering i can make out that it primarily contains a "ByteBuffer" (no clue what that is), which internally contains a buffer. If it print out that internal Buffer to a string i get random characters and right in the middle of it i get the data that i want as well as the transaction ids. However i have still no clue how to reliably parse this data structure. To my current knowlege this ByteBuffer seems to be something akin to java's DataInputStream/DataOutputStream which reads/writes binary data. So all i would need to know to be able to parse this structure is what binary data is written to it in what order. ` � � @d201e418506f7a175547ac0c2a20811bb936cd2c0e27972c62d306ce77710789;{"name":"superSoft9000","version":1,"hash":"0x0bad123hash"} ������ж � � @4340a206784af9bb51c2808cdce8e8746e4e4b6a273c9238f3a9eb68ed0b47cb<{"name":"superSoft9000","version":2,"hash":"0x0bad123hash2"} `

uxelduxel (Mon, 09 Apr 2018 10:40:08 GMT):
hello how does one parse the result of stub.getHistoryForKey(key); the return type seems to be rather undocumented. From Simple reverse engineering i can make out that it primarily contains a "ByteBuffer" (no clue what that is), which internally contains a buffer. If it print out that internal Buffer to a string i get random characters and right in the middle of it i get the data that i want as well as the transaction ids. However i have still no clue how to reliably parse this data structure. To my current knowlege this ByteBuffer seems to be something akin to java's DataInputStream/DataOutputStream which reads/writes binary data. So all i would need to know to be able to parse this structure is what binary data is written to it in what order. To give an example of how the printed out binary data looks like � � @d201e418506f7a175547ac0c2a20811bb936cd2c0e27972c62d306ce77710789;{"name":"superSoft9000","version":1,"hash":"0x0bad123hash"} ������ж � � @4340a206784af9bb51c2808cdce8e8746e4e4b6a273c9238f3a9eb68ed0b47cb<{"name":"superSoft9000","version":2,"hash":"0x0bad123hash2"}

uxelduxel (Mon, 09 Apr 2018 10:40:08 GMT):
hello how does one parse the result of stub.getHistoryForKey(key); the return type seems to be rather undocumented. From Simple reverse engineering i can make out that it primarily contains a "ByteBuffer" (no clue what that is), which internally contains a buffer. If it print out that internal Buffer to a string i get random characters and right in the middle of it i get the data that i want as well as the transaction ids. However i have still no clue how to reliably parse this data structure. To my current knowlege this ByteBuffer seems to be something akin to java's DataInputStream/DataOutputStream which reads/writes binary data. So all i would need to know to be able to parse this structure is what binary data is written to it in what order. To give an example of how the printed out binary data looks like � � @d201e418506f7a175547ac0c2a20811bb936cd2c0e27972c62d306ce77710789;{"name":"superSoft9000","version":1,"hash":"0x0bad123hash"} ������ж � � @4340a206784af9bb51c2808cdce8e8746e4e4b6a273c9238f3a9eb68ed0b47cb<{"name":"superSoft9000","version":2,"hash":"0x0bad123hash2"} what i am after are the JSON objects included inside

nhrishi (Mon, 09 Apr 2018 11:48:22 GMT):
Hello, As part of SideDB feature (v1.1-experimental), how can we tag selected participants in the private transactions. Does it work based on the endorsement policy defined at the chaincode level or can we explicitly mention participants in the transaction proposal (at SDK level) ? Can anyone pls confirm this. Thanks.

uxelduxel (Mon, 09 Apr 2018 12:16:13 GMT):
for those struggling with the same issue as mentioned by me above, i have figured it out... : var iter : shim.Iterators.HistoryQueryIterator = await stub.getHistoryForKey(name); var current : { value : {value : { buffer : Buffer offset : number limit : number } } }; current = await iter.next(); console.log(current.value.value.buffer.slice(current.value.value.offset,current.value.value.limit).toString()) this will print out exactly the JSON string i want from the buffer.

varun-raj (Mon, 09 Apr 2018 13:45:25 GMT):
If I have AND endorsement policy, should I have the private keys of all the endorsers in my client application to sign the transactions? or will be handled even If i have one organization's keys?

paul.sitoh (Mon, 09 Apr 2018 15:35:45 GMT):
Is the "standardised" connection profile confirmed now https://jira.hyperledger.org/browse/FAB-5363? This JIRA issue appears to be closed now.

bretharrison (Mon, 09 Apr 2018 17:18:51 GMT):
@nhrishi You may wish to post your questions to https://jira.hyperledger.org/browse/FAB-8718

Taffies (Tue, 10 Apr 2018 02:10:21 GMT):
geteventhubsfororg

nhrishi (Tue, 10 Apr 2018 03:43:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KgLxuoZrkqRGozSRo) @bretharrison Sure. Thanks.

yasu (Tue, 10 Apr 2018 04:13:49 GMT):
Has joined the channel.

varun-raj (Tue, 10 Apr 2018 05:17:22 GMT):
Can someone share Connection Profile for AND endorsment policy?

varun-raj (Tue, 10 Apr 2018 10:36:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SnTocrar6RsWK8XKo) Anyone?

BertCatsburg (Tue, 10 Apr 2018 16:58:01 GMT):
Has joined the channel.

dsl (Wed, 11 Apr 2018 04:58:58 GMT):
Has joined the channel.

zhuxubin01 (Thu, 12 Apr 2018 08:12:10 GMT):
I am trying to define my network endorsement-policy, but I do not understand what I am specificating at this document: { "identities": [ { "role": { "name": "member", "mspId": "Org1MSP" } }, { "role": { "name": "member", "mspId": "Org2MSP" } } ], "policy": { "1-of": [ { "signed-by": 0 }, { "signed-by": 1 } ] } } and when I send proposal to org1's peers ,that is no problem ,but when I send my proposal to the org2's peers,in the tx commit phase it returns ENDORSEMENT_POLICY_FAILURE,someboy know what's the problem

ersudiplama (Thu, 12 Apr 2018 14:39:14 GMT):

Screen Shot 2018-04-12 at 10.08.22 AM.png

ersudiplama (Thu, 12 Apr 2018 14:39:42 GMT):
Hi

ersudiplama (Thu, 12 Apr 2018 14:40:43 GMT):
I was testing my node app for packages vulnerabilities using nsp [Node Security Platform] and I found above vulnerabilities.

ersudiplama (Thu, 12 Apr 2018 14:40:43 GMT):
I was testing my node app for packages vulnerabilities using nsp [Node Security Platform] and I found above vulnerabilities in fabric-client@1.1.0

ersudiplama (Thu, 12 Apr 2018 14:41:09 GMT):
Please let me know how to address this problem?

ersudiplama (Thu, 12 Apr 2018 14:41:09 GMT):
Please let me know if it is a bug or its fine ?

ersudiplama (Thu, 12 Apr 2018 14:41:17 GMT):
Thank you in advance.

ersudiplama (Thu, 12 Apr 2018 19:59:10 GMT):
@bretharrison

mozkarakoc (Fri, 13 Apr 2018 12:22:41 GMT):
Has joined the channel.

mozkarakoc (Fri, 13 Apr 2018 12:29:48 GMT):
hi all, I'm using ordering services with kafka cluster. In node sdk, getTargetOrderer function returns if request has orderer element. if not exists request_orderer it returns network_config first orderer element. I confused about healtcheck of ordering services. how can I check if osn is working?

mozkarakoc (Fri, 13 Apr 2018 12:29:48 GMT):
hi all, I'm using ordering services with kafka cluster. In node sdk, getTargetOrderer function returns if request has orderer element. if request_orderer not exists it returns network_config first orderer element. I confused about healtcheck of ordering services. how can I check if osn is working?

mozkarakoc (Fri, 13 Apr 2018 12:29:48 GMT):
hi all, I'm using ordering services with kafka cluster. In node sdk, `getTargetOrderer` function returns if request has orderer element. if request_orderer not exists it returns network_config first orderer element. I confused about healtcheck of ordering services. how can I check if osn is working?

fTrestour (Fri, 13 Apr 2018 13:04:51 GMT):
Has joined the channel.

nebularnoise (Fri, 13 Apr 2018 13:04:53 GMT):
Has joined the channel.

nebularnoise (Fri, 13 Apr 2018 13:06:52 GMT):
Afternoon y'all ! [question from #fabric-questions ] I'm trying to connect to a fabric channel created by Composer, with the fabric-client Node.js SDK. I get the following error from all my peers when I try to channel.joinChannel ``` Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: Cannot create ledger from genesis block, due to LedgerID already exists) ``` Tutorials I could find are only about *creating* channels, not joining existing ones. Anyone has experience with conencting to existing fabric networks on existing channels ?

nebularnoise (Fri, 13 Apr 2018 13:06:52 GMT):
Afternoon y'all ! [question from #fabric-questions ] I'm trying to connect to a fabric channel created by Composer, with the fabric-client Node.js SDK. I get the following error from all my peers when I try to channel.joinChannel ``` Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: Cannot create ledger from genesis block, due to LedgerID already exists) ``` Tutorials I could find are only about *creating* channels, not joining existing ones. Anyone has experience with connecting to existing fabric networks on existing channels ?

bretharrison (Fri, 13 Apr 2018 15:49:23 GMT):
@ersudiplama Some of the dependent packages are pulling in other packages that pull in other packages that have been noted by the tool to have vulnerabilities. Not a bug for fabric-client.

bh4rtp (Sat, 14 Apr 2018 10:34:13 GMT):
create channel failed using the latest fabric and node sdk. ```[2018-04-14 18:30:15.860] [ERROR] Create-Channel - Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2216 vs. 15)```

mozkarakoc (Sat, 14 Apr 2018 11:02:13 GMT):
@bh4rtp I came across same error on yesterday, I solved override "grpc-max-send-message-length: 15" value in connection profile, network-config.yaml

mozkarakoc (Sat, 14 Apr 2018 11:04:22 GMT):
@bretharrison could you help pls? https://chat.hyperledger.org/channel/fabric-sdk-node?msg=46T9bsqDPJucrpT8W

mauriziocarioli (Sat, 14 Apr 2018 14:48:52 GMT):
Has joined the channel.

zonkedhazmat (Sun, 15 Apr 2018 23:38:02 GMT):
https://jira.hyperledger.org/browse/FAB-9528

zonkedhazmat (Sun, 15 Apr 2018 23:38:17 GMT):
can someone look at this and let me know if it needs clarification or additional details

KevinBai (Mon, 16 Apr 2018 02:29:12 GMT):
Hi, can I extend the CryptoSuite and override the method sign?

mavericklam (Mon, 16 Apr 2018 03:40:21 GMT):
hello! Did anyone do performance test on the node SDK? What is the maximum TPS we can get for invoking trans? Thank you

zonkedhazmat (Mon, 16 Apr 2018 03:45:37 GMT):
it depends on how your blockchain network is set up

mavericklam (Mon, 16 Apr 2018 03:47:59 GMT):
@zonkedhazmat Thx! if I use the "Build Your First Network as Example"

zonkedhazmat (Mon, 16 Apr 2018 03:52:20 GMT):
ah so like I just check against my my network which is using my laptops i7 processor and I got 127 transactions per second. Although my batchtimeout is 0.5sec so its different from that network

zonkedhazmat (Mon, 16 Apr 2018 03:54:38 GMT):
but still I was probably filling each block a lot quicker than the batchtimeout so that shouldnt be too different than your network

mavericklam (Mon, 16 Apr 2018 04:01:15 GMT):
@zonkedhazmat thx. Do you think a larger batchtimeout will increase the tps?

FengChen_1982 (Mon, 16 Apr 2018 06:39:43 GMT):
Does anybody know any example of invoking chaincode on multiple peers in case of multi node endorsement?

rodders1991 (Mon, 16 Apr 2018 12:57:17 GMT):
Has joined the channel.

huy.tranibm (Mon, 16 Apr 2018 16:00:17 GMT):
@FengChen_1982 you add the peers to an array of peers to the channel its shown in the example

mat0pad (Mon, 16 Apr 2018 18:16:33 GMT):
Has joined the channel.

mat0pad (Mon, 16 Apr 2018 19:07:33 GMT):
I'm trying to register additional users with the CA. Currently I can only use the admin identity and everytime I try register/enroll a new user I recieve the following error: ``` Failed to register user. Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]] ``` I'm using Fabric v1.1.0 & tls. Any help/ideas would be highly appreciated *Debug* from CA (using sqlite3): ``` 2018/04/16 18:56:16 [DEBUG] Checking for revocation/expiration of certificate owned by 'Admin@some.org' 2018/04/16 18:56:16 [DEBUG] DB: Get certificate by serial (b8d3b49d0ad9a57bfc3ef17892ede002) and aki (7c5c38172c7f56f77d2156a7349d3ead8e3c09ff3016abed2030b5f65bec1dd2) 2018/04/16 18:56:16 [DEBUG] Received registration request from : { Name:user1 Type:client Secret:**** MaxEnrollments:1 Affiliation:some.org Attributes:[{code DK true}] CAName: } 2018/04/16 18:56:16 [INFO] 192.168.48.1:55368 POST /api/v1/register 401 30 "Certificate not found with AKI '7c5c38172c7f56f77d2156a7349d3ead8e3c09ff3016abed2030b5f65bec1dd2' and serial 'b8d3b49d0ad9a57bfc3ef17892ede002'" ``` I have the following registry setup in *fabric-ca-server-config.yaml*: ``` registry: maxenrollments: -1 identities: - name: admin pass: adminpw type: client affiliation: "*" maxenrollments: -1 attrs: hf.Registrar.Roles: "client,user,peer,validator,auditor" hf.Registrar.DelegateRoles: "client,user,validator,auditor" hf.Revoker: true hf.IntermediateCA: true ```

mat0pad (Mon, 16 Apr 2018 19:07:33 GMT):
I'm trying to register additional users with the CA. Currently I can only use the admin identity and everytime I try register/enroll a new user I recieve the following error: ``` Failed to register user. Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]] ``` I'm using Fabric v1.1.0 & tls. Any help/ideas would be highly appreciated *Debug* from CA (using sqlite3): ``` 2018/04/16 18:56:16 [DEBUG] Checking for revocation/expiration of certificate owned by 'Admin@some.org' 2018/04/16 18:56:16 [DEBUG] DB: Get certificate by serial (b8d3b49d0ad9a57bfc3ef17892ede002) and aki (7c5c38172c7f56f77d2156a7349d3ead8e3c09ff3016abed2030b5f65bec1dd2) 2018/04/16 18:56:16 [DEBUG] Received registration request from : { Name:user1 Type:client Secret:**** MaxEnrollments:1 Affiliation:some.org Attributes:[{code DK true}] CAName: } 2018/04/16 18:56:16 [INFO] 192.168.48.1:55368 POST /api/v1/register 401 30 "Certificate not found with AKI '7c5c38172c7f56f77d2156a7349d3ead8e3c09ff3016abed2030b5f65bec1dd2' and serial 'b8d3b49d0ad9a57bfc3ef17892ede002'" ``` What does "Certificate not found with AKI and serial" exactly mean? I have the following registry setup in *fabric-ca-server-config.yaml*: ``` registry: maxenrollments: -1 identities: - name: admin pass: adminpw type: client affiliation: "*" maxenrollments: -1 attrs: hf.Registrar.Roles: "client,user,peer,validator,auditor" hf.Registrar.DelegateRoles: "client,user,validator,auditor" hf.Revoker: true hf.IntermediateCA: true ```

mat0pad (Mon, 16 Apr 2018 19:07:33 GMT):
I'm trying to register additional users with the CA through the node SDK. Currently I can only use the admin identity and everytime I try register/enroll a new user I recieve the following error: ``` Failed to register user. Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]] ``` I'm using Fabric v1.1.0 & tls. Any help/ideas would be highly appreciated *Debug* from CA (using sqlite3): ``` 2018/04/16 18:56:16 [DEBUG] Checking for revocation/expiration of certificate owned by 'Admin@some.org' 2018/04/16 18:56:16 [DEBUG] DB: Get certificate by serial (b8d3b49d0ad9a57bfc3ef17892ede002) and aki (7c5c38172c7f56f77d2156a7349d3ead8e3c09ff3016abed2030b5f65bec1dd2) 2018/04/16 18:56:16 [DEBUG] Received registration request from : { Name:user1 Type:client Secret:**** MaxEnrollments:1 Affiliation:some.org Attributes:[{code DK true}] CAName: } 2018/04/16 18:56:16 [INFO] 192.168.48.1:55368 POST /api/v1/register 401 30 "Certificate not found with AKI '7c5c38172c7f56f77d2156a7349d3ead8e3c09ff3016abed2030b5f65bec1dd2' and serial 'b8d3b49d0ad9a57bfc3ef17892ede002'" ``` What does "Certificate not found with AKI and serial" exactly mean? I have the following registry setup in *fabric-ca-server-config.yaml*: ``` registry: maxenrollments: -1 identities: - name: admin pass: adminpw type: client affiliation: "*" maxenrollments: -1 attrs: hf.Registrar.Roles: "client,user,peer,validator,auditor" hf.Registrar.DelegateRoles: "client,user,validator,auditor" hf.Revoker: true hf.IntermediateCA: true ```

Ryan2 (Tue, 17 Apr 2018 00:31:44 GMT):
Has joined the channel.

VigneshkumarChinnachamy (Tue, 17 Apr 2018 07:02:33 GMT):
I'm trying to package couchDB indexes while installing the chaincode. I'm following this tutorial: https://fabric-sdk-node.github.io/tutorial-metadata-chaincode.html The chaincode gets installed and instantiated successfully. But when I check the index for that chaincode specific db, localhost:5984//_index, it's not showing the index that I added. When I try to debug, the package that gets created during the chaincode install has these files: tar tvzf test.tar.gz -rw-r--r-- 0/0 26628 1970-01-01 00:00 src/github.com/marbles/marbles.go -rw-r--r-- 0/0 142 1970-01-01 00:00 META-INF\\statedb\\couchdb\\indexes\\indexOwner.json Any idea why it's not working? Thanks in advance.

mat0pad (Tue, 17 Apr 2018 07:48:52 GMT):
@VigneshkumarChinnachamy Have you specified the metadataPath to the index files correctly? How does your dir structure look? The metadatapath should point to statedb -> couchdb -> indexes -> *.json

mat0pad (Tue, 17 Apr 2018 07:48:52 GMT):
@VigneshkumarChinnachamy Have you specified the metadataPath to the index files correctly? How does your dir structure look? The metadatapath should point to a dir with statedb -> couchdb -> indexes -> *.json

VigneshkumarChinnachamy (Tue, 17 Apr 2018 08:58:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=i9P7hJAPfn44w8xRc) @mat0pad Hi, Yes I've given the directory with the specified structure in metadataPath. And it's able to read it and package. I wrote the package data to a file (test.tar.gz) and the archive structure looks like the one I mentioned

mat0pad (Tue, 17 Apr 2018 09:13:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ApsFwJHkoDm5wjNpS) @VigneshkumarChinnachamy Just to clearify are you including the 'META-INF' in your local directory structure that gets packaged during the install or not?

VigneshkumarChinnachamy (Tue, 17 Apr 2018 09:21:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=avHH7jWzi3Ah5L64u) @mat0pad No. I'm not including Meta-inf. It's automatically including in the package.

Legiit (Tue, 17 Apr 2018 12:59:35 GMT):
which config file/what config file format does `faClient.addConfigFile(...):`?

dampuero (Tue, 17 Apr 2018 14:17:53 GMT):
Has joined the channel.

ersudiplama (Tue, 17 Apr 2018 14:23:10 GMT):
@bretharrison thanks

ersudiplama (Tue, 17 Apr 2018 14:23:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AtikMXLKKe6vReGf3) @bretharrison thanks

jrosmith (Tue, 17 Apr 2018 17:44:55 GMT):
does the node-sdk support attribute based access controls? i'm registering a user with the following request object: ```{ enrollmentID: 'test', role: 'client', affiliation: 'org1.department1' attrs: [ { name:'role1', value:'value1' }, ] } ``` but when I retrieve the user later for use in a transaction the `User` object appears as the following: ```{ _affiliation: "", _cryptoSuite: { crypto_stuff }, _enrollmentSecret: "serverGeneratedSecret", _identity: { identity_stuff }, _mspId: "Org1MSP", _name: "test", _roles: null, _signing_identiy: { signing_identity } } ```

jrosmith (Tue, 17 Apr 2018 17:46:52 GMT):
the role/affiliations aren't being set...and i don't see any reference to the attrs. this is using fabric-client 1.1.0

jrosmith (Tue, 17 Apr 2018 17:46:52 GMT):
the role/affiliations aren't being set...and i don't see any reference to the attrs. this is using fabric-client and fabric-ca-clien versions 1.1.0

jrosmith (Tue, 17 Apr 2018 17:46:52 GMT):
the role/affiliations aren't being set...and i don't see any reference to the attrs. this is using fabric-client and fabric-ca-client versions 1.1.0

SethiSaab (Tue, 17 Apr 2018 20:35:12 GMT):
Hi Team can you please provide me any link where i can see step by step of a sample app creation from scratch

nirmal1988 (Wed, 18 Apr 2018 06:08:50 GMT):
Has joined the channel.

nirmal1988 (Wed, 18 Apr 2018 06:17:14 GMT):
Anyone has implemented *ABAC* using fabric nodejs SDK??? i am trying to query/invoke following sample using fabric-node-SDK, but i am getting "endpoing not found" error. https://github.com/hyperledger/fabric-samples/tree/release-1.1/fabric-ca Please let me know if any one has any idea to query/invoke on this specific sample(fabric-ca).

nirmal1988 (Wed, 18 Apr 2018 06:17:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=f84Aao4iTPBSsnc5c) @SethiSaab https://github.com/hyperledger/fabric-samples

andreamagagna (Wed, 18 Apr 2018 07:16:59 GMT):
Has left the channel.

Kamal_Kishor_Mehra (Wed, 18 Apr 2018 07:46:35 GMT):
Has joined the channel.

Legiit (Wed, 18 Apr 2018 08:11:32 GMT):
Which config file/what config file format is used for `loadFromConfig`?

Kamal_Kishor_Mehra (Wed, 18 Apr 2018 08:17:23 GMT):
Hi everyone!! I am facing some issue with grpc when i am trying to setup network. I occur randomly at any point and some time it work fine. can you tell what is happening and how can I resolve it ? `grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.org1.example.com on 127.0.0.11:53: no such host"; Reconnecting to {peer0.org1.example.com:7051 }`

souvik (Wed, 18 Apr 2018 08:45:58 GMT):
To incorporate new feature "FAB-6911 - Event service for blocks" of Hyperledger, we have to change anything in nodejs?

mozkarakoc (Wed, 18 Apr 2018 12:39:05 GMT):
@Legiit https://fabric-sdk-node.github.io/tutorial-network-config.html

CodeReaper (Wed, 18 Apr 2018 12:40:43 GMT):
Hi, I tried to do a chaincode query, the query's code is taking it in an infinite loop. Meanwhile I tried doing an invoke(invoke was valid function). What I found was that even the invoke didn't work. It gave the following error-

CodeReaper (Wed, 18 Apr 2018 12:40:48 GMT):

Clipboard - April 18, 2018 6:10 PM

CodeReaper (Wed, 18 Apr 2018 12:41:21 GMT):
Did query close down the eventhub of the invoke??

CodeReaper (Wed, 18 Apr 2018 12:44:14 GMT):
If so, will loads of invoke a thing to worry about then, one closing the eventhub of another?

CodeReaper (Wed, 18 Apr 2018 12:45:34 GMT):
Point to note is that 15 second is timeout for any request, invoke timeout much faster than the query itself. Query timed out after 15 seconds only

vloup (Wed, 18 Apr 2018 13:31:25 GMT):
Has joined the channel.

paul.sitoh (Wed, 18 Apr 2018 14:38:29 GMT):
what value should I pass for Fabric CA client register affiliation?

paul.sitoh (Wed, 18 Apr 2018 14:39:14 GMT):
i.e. ca.register({enrollmentID: , affiliation: )

paul.sitoh (Wed, 18 Apr 2018 14:39:14 GMT):
i.e. ca.register({enrollmentID: , affiliation: ) for 1.1

huy.tranibm (Wed, 18 Apr 2018 17:35:43 GMT):
@paul.sitoh org1.department1 for org1, this can be modified in the fabric-ca-config.yaml if you prefer something different. But, look at the start of your fabric-ca logs, you should see the affiliation you should be using

huy.tranibm (Wed, 18 Apr 2018 17:37:17 GMT):
@paul.sitoh

huy.tranibm (Wed, 18 Apr 2018 17:37:18 GMT):

Clipboard - April 18, 2018 12:37 PM

huy.tranibm (Wed, 18 Apr 2018 17:37:45 GMT):

Clipboard - April 18, 2018 12:37 PM

TimJohnson (Thu, 19 Apr 2018 17:58:14 GMT):
Has joined the channel.

luomin (Fri, 20 Apr 2018 02:00:05 GMT):
Hi, is there a planning to multi-threading the REST-API connection?

SuperSeiyan (Fri, 20 Apr 2018 05:28:07 GMT):
eventhub hold connection

alanblyth (Fri, 20 Apr 2018 07:20:15 GMT):
Has joined the channel.

liurf (Sat, 21 Apr 2018 11:46:32 GMT):
Has joined the channel.

liurf (Sat, 21 Apr 2018 11:51:49 GMT):
hi all,anyone can help me, fabric sdk error:No identity has been assigned to this client

liurf (Sat, 21 Apr 2018 11:52:30 GMT):

Clipboard - 2018年4月21日晚上7点52分

asaningmaxchain123 (Sun, 22 Apr 2018 02:08:05 GMT):
Has joined the channel.

NeerajKumar (Sun, 22 Apr 2018 10:54:36 GMT):
Hi Experts, I have a question please help me out wit this, Lets say in a channel namely 'mychannel' which is established between two MSP organisations, org1 and org2 and there are 3 endorsing peers in each organisation. Then if i require to send endorsement proposal to the endorsing peers, will it be good that i send the endorsement proposal only to one endorsing peers and not to all 6 and wait for the endorsing proposal to get accepted by the peer and simulate the transaction which will further accepted by the the orderer and will be sent back to the committing peer to be committed on the ledger? If Your ans is 'Yes' That Means having more than two endorsing peers can balance the load when an endorsing peers is already handling too many request, am i righ in this conclusion? and tell me if i am wrong , i am currently facing load issue on my endorsing peers.

NeerajKumar (Sun, 22 Apr 2018 10:54:36 GMT):
Hi Experts, I have a question please help me out with this, Let's say in a channel namely 'mychannel' which is established between two MSP organizations, org1 and org2 and there are 3 endorsing peers in each organization. Then if I require to send endorsement proposal to the endorsing peers, will it be good that I send the endorsement proposal only to one endorsing peers and not to all 6 and wait for the endorsing proposal to get accepted by the peer and simulate the transaction which will further be accepted by the orderer and will be sent back to the committing peer to be committed on the ledger? If Your answer is 'Yes' That Means having more than two endorsing peers can balance the load when one endorsing peers is already handling too many requests, am I right in this conclusion? and tell me if I am wrong, I am currently facing load issues on my endorsing peers.

asaningmaxchain123 (Sun, 22 Apr 2018 13:12:05 GMT):
@mastersingh24 i see the fabric node sdk `https://fabric-sdk-node.github.io/EventHub.html#registerTxEvent__anchor` it tells me the fabric can producer the tx event,but i see the fabric source code,it just producer event in the `joinChain` and `committer` ,so can you tell me more detail about how to listen tx event

liurf (Mon, 23 Apr 2018 01:58:28 GMT):
who can help me?

username343 (Mon, 23 Apr 2018 05:39:17 GMT):
@NeerajKumar it depends on your endorsement policy. If say you require endorsement from one peer of each organization then you can send your transaction proposal to anyone of peers from each organization and it will be accepted otherwise if the endorsement policy is not satisfied your transaction proposal will be rejected. However, say you have two organizations A and B and each organization has 3 peers A1,A2,A3 and B1,B2,B3. Suppose your endorsement policy requires that you get signatures from one peer of each organization and suppose you have two transaction T1 and T2 which act on value say X and Y. Assume that txn T1 reads and writes the values of X and Y and txn T2 reads and writes the values of T2 and you send the txn T1 to peers A1 and B1 and txn T2 to A2 and B2 which will be simulated by each endorsing peer to which the txn is sent. Now even though we have the endorsement policy fulfilled by getting the signatures from at least one peer of each organization, one of these transactions will reach orderer before the other. Lets say the txn T1 reaches the orderer before T2, orderer will check the endorsement policy and seeing that its satisfied it will include the transactions in the block in the same order. Now when validating and committing peers check for MVCC the txn T2 is operating on variables X and Y with previous versions of which the versions have been changed by the txn T1 which came to the orderer before T1 and thus got committed before the txn T2, hence the txn T2 will fail. (But i think it will be included as a failed transaction, i'm not sure about this part)

username343 (Mon, 23 Apr 2018 05:39:17 GMT):
@NeerajKumar it depends on your endorsement policy. If say you require endorsement from one peer of each organization then you can send your transaction proposal to anyone of peers from each organization and it will be accepted otherwise if the endorsement policy is not satisfied your transaction proposal will be rejected. However, say you have two organizations A and B and each organization has 3 peers A1,A2,A3 and B1,B2,B3. Suppose your endorsement policy requires that you get signatures from one peer of each organization and suppose you have two transaction T1 and T2 which act on value say X and Y. Assume that txn T1 reads and writes the values of X and Y and txn T2 reads and writes the values of X and Y and you send the txn T1 to peers A1 and B1 and txn T2 to A2 and B2 which will be simulated by each endorsing peer to which the txn is sent. Now even though we have the endorsement policy fulfilled by getting the signatures from at least one peer of each organization, one of these transactions will reach orderer before the other. Lets say the txn T1 reaches the orderer before T2, orderer will check the endorsement policy and seeing that its satisfied it will include the transactions in the block in the same order. Now when validating and committing peers check for MVCC the txn T2 is operating on variables X and Y with previous versions of which the versions have been changed by the txn T1 which came to the orderer before T1 and thus got committed before the txn T2, hence the txn T2 will fail. (But i think it will be included as a failed transaction, i'm not sure about this part)

tiennv (Mon, 23 Apr 2018 05:52:32 GMT):
Hi guys,

tiennv (Mon, 23 Apr 2018 05:52:52 GMT):
I get this problem. Could you help me?

tiennv (Mon, 23 Apr 2018 05:53:30 GMT):
When I install chaincode, I get this messages "[packager/Golang.js]: packaging GOLANG from /abc.com/go".

tiennv (Mon, 23 Apr 2018 05:53:37 GMT):
I think it is ok.

tiennv (Mon, 23 Apr 2018 05:54:43 GMT):
But when I instantiate it, I got the error:

tiennv (Mon, 23 Apr 2018 05:54:44 GMT):
Promise is rejected: Error: 2 UNKNOWN: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package /ekyc.com/go: import "/ekyc.com/go": cannot import absolute path

tiennv (Mon, 23 Apr 2018 05:54:44 GMT):
Promise is rejected: Error: 2 UNKNOWN: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package /abc.com/go: import "/abc.com/go": cannot import absolute path

tiennv (Mon, 23 Apr 2018 05:55:12 GMT):
Could you help me investigate the problem?

liurf (Mon, 23 Apr 2018 06:41:01 GMT):
chaincode path is wrong

kai_den (Mon, 23 Apr 2018 06:45:07 GMT):
Hi, ALL!! I would like to obtain the processing result of the chaincode using the node's SDK. However, node - sdk returns only the transaction ID. shim.Success returns bytecode. Is there a way to get this bytecode? 【My Development environment】 hyperledger v1.0 node-sdk  https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer Sorry for bad english....

tiennv (Mon, 23 Apr 2018 14:45:04 GMT):
Hi gúy,

tiennv (Mon, 23 Apr 2018 14:45:04 GMT):
Hi guys,

tiennv (Mon, 23 Apr 2018 14:46:12 GMT):
When I install chaincode, I get this message from couchdb docker: "nonode@nohost <0.1764.0> 6b43437ff6 couchdb2:5984 172.22.0.12 undefined GET /ekyc-channel_lscc 404 ok 1"

tiennv (Mon, 23 Apr 2018 15:17:46 GMT):
Hi guys,

tiennv (Mon, 23 Apr 2018 15:18:59 GMT):
When I install chaincode, I get this message from couchdb containers "nonode@nohost <0.1269.0> a9fc28785b couchdb2:5984 172.22.0.13 undefined PUT /ekyc-channel_lscc 201 ok 158".

tiennv (Mon, 23 Apr 2018 15:18:59 GMT):
When I install chaincode, I get this message from couchdb containers "nonode@nohost <0.1269.0> a9fc28785b couchdb2:5984 172.22.0.13 undefined PUT /abc-channel_lscc 201 ok 158".

tiennv (Mon, 23 Apr 2018 15:19:34 GMT):
Anh on peer containers, I get the message "Couch DB Error:not_found, Status Code:404, Reason:missing".

tiennv (Mon, 23 Apr 2018 15:20:03 GMT):
Could you help me please?

tiennv (Mon, 23 Apr 2018 15:20:03 GMT):
Could you help, me please?

tom.appleyard (Mon, 23 Apr 2018 16:20:37 GMT):
Anyone encountered this error: `Error: Calling enrollment endpoint failed with error [Error: self signed certificate in certificate chain]` getting it from this: ``` const ca = this.connectionProfile.certificateAuthorities[caId]; const caClient = new FabricCAClient(ca.url, ca.tlsCACerts, ca.caName); const member = new User(this.enrollmentProfile.id); try { const enrollment = await caClient.enroll({ enrollmentID: this.enrollmentProfile.id, enrollmentSecret: this.enrollmentProfile.secret }); // Once enrolled, set the user as the current context await member.setEnrollment(enrollment.key, enrollment.certificate.pem, enrollment.mspId); await this.client.setUserContext(member); winston.info('Successfully enroll user from CA and persisted'); return member; } catch (err) { winston.error('Failed to enroll user from CA and persist: ' + err.stack ? err.stack : err); break; } ```

tom.appleyard (Mon, 23 Apr 2018 16:20:37 GMT):
Anyone encountered this error: `Error: Calling enrollment endpoint failed with error [Error: self signed certificate in certificate chain]` getting it from this: ``` const ca = this.connectionProfile.certificateAuthorities[caId]; const caClient = new FabricCAClient(ca.url, ca.tlsCACerts, ca.caName); const member = new User(this.enrollmentProfile.id); try { const enrollment = await caClient.enroll({ enrollmentID: this.enrollmentProfile.id, enrollmentSecret: this.enrollmentProfile.secret }); // Once enrolled, set the user as the current context await member.setEnrollment(enrollment.key, enrollment.certificate.pem, enrollment.mspId); await this.client.setUserContext(member); winston.info('Successfully enroll user from CA and persisted'); return member; } catch (err) { winston.error('Failed to enroll user from CA and persist: ' + err.stack ? err.stack : err); break; } ``` Thanks!

NeerajKumar (Mon, 23 Apr 2018 18:06:30 GMT):
thanks @username343 it helped me to clear a bit of confusion...

siddesh_sangodkar (Tue, 24 Apr 2018 05:13:09 GMT):
android

dave.enyeart (Tue, 24 Apr 2018 13:14:13 GMT):
@bretharrison For the (relatively small) SDK task for side db support, I've created Jira FAB-9679

khalifa (Tue, 24 Apr 2018 13:40:03 GMT):
Has joined the channel.

bretharrison (Tue, 24 Apr 2018 15:18:43 GMT):
@Legiit see https://fabric-sdk-node.github.io/tutorial-network-config.html

bretharrison (Tue, 24 Apr 2018 15:30:13 GMT):
@liurf Interactions with the Fabric network must be signed, this requires the client instance to be assigned a user (`identity`). Use the `client.setUserContext()` to make this assignment. A user context includes important identity, private key (for signing) and the user's certificate (to send as verification of the user)

bretharrison (Tue, 24 Apr 2018 16:05:17 GMT):
@CodeReaper You may wish to discuss the fabric peer issue on the #fabric-peer-endorser-committer channel

bretharrison (Tue, 24 Apr 2018 16:20:15 GMT):
@jrosmith The attributes are contained within the user's certificate. Attributes that are added to a user's registration may be requested to be added to the user's enrollment certificate. ``` caService.enroll({enrollmentID: 'test', enrollmentSecret: secret, attr_reqs :[{name:'role1'}]}); ```

jrosmith (Tue, 24 Apr 2018 16:21:52 GMT):
@bretharrison do they explicitly have to be added to the enrollment request? or will they automatically be appended when i go to enroll a user who was registered with a set of attributes?

bretharrison (Tue, 24 Apr 2018 17:37:51 GMT):
@jrosmith see http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#attribute-based-access-control

anillewis (Tue, 24 Apr 2018 18:25:18 GMT):
Has joined the channel.

Taffies (Wed, 25 Apr 2018 03:15:05 GMT):
hi! my eventhub worked perfectly fine at the beginning and i can successfully invoke my transaction, but after some time it always seems to disconnect whenever i want to invoke a transaction. (Error: EventHub has been shutdown) any ideas why this might happen?

NeerajKumar (Wed, 25 Apr 2018 10:44:47 GMT):
can someone please provide me a sample endorsement policy to be used with NODE SDK app

NeerajKumar (Wed, 25 Apr 2018 11:20:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zEKitYm6kW3SCRBCY) FOund It

kapilAtrey (Wed, 25 Apr 2018 12:11:02 GMT):
Hi all I was going through balance transfer application and in join-channel.js file when we are waiting for the registerBlockEvent's response then what makes it so sure that the block committed is the block with that transaction in it ( one with join channel transaction ) this block may be because of other activities ( if that peer is going to be join in already running ledger )

Kamal_Kishor_Mehra (Wed, 25 Apr 2018 13:20:19 GMT):
Can any one help me on getting start with hyperledger fabric using Fabric-Sdk-Node from scratch ?

mrkiouak (Wed, 25 Apr 2018 13:30:16 GMT):
Has left the channel.

coffeeplease (Wed, 25 Apr 2018 14:53:42 GMT):
Has joined the channel.

coffeeplease (Wed, 25 Apr 2018 14:56:05 GMT):
Does anyone have a sample of a network config yaml file which uses the built in fabric CA (and not http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html)

coffeeplease (Wed, 25 Apr 2018 14:56:53 GMT):
I always receive errors when removing `organizations.Org1.certificateAuthorities` and `certificateAuthorities`

bretharrison (Wed, 25 Apr 2018 15:57:18 GMT):
@kapilAtrey Notice that in the application's callback that gets notified when a block is added to a ledger, there is a check for the channel name. Since this peer is just now joining this channel, it means that peer has created the ledger and added the first block (which is how a peer will join). https://github.com/hyperledger/fabric-samples/blob/f05a132586ae9ca7ce86b9e56ae4bd3b084bc959/balance-transfer/app/join-channel.js#L71

bretharrison (Wed, 25 Apr 2018 15:59:33 GMT):
@Kamal_Kishor_Mehra see http://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html

bretharrison (Wed, 25 Apr 2018 16:02:00 GMT):
@coffeeplease When using any CA, it will need to be defined in the yaml or you will have to manually build the NodeSDK objects yourself.

mozkarakoc (Wed, 25 Apr 2018 16:51:34 GMT):
hi @bretharrison @dave.enyeart I handle ordering services failover manually. Any suggestion? https://chat.hyperledger.org/channel/fabric-sdk-node?msg=46T9bsqDPJucrpT8W

bretharrison (Wed, 25 Apr 2018 17:03:14 GMT):
@mozkarakoc `getTargetOrderer` is just a utility method used to get an orderer NodeSDK object instance to be used for requests and does not do any checking on the actual orderer. You may wish to use a transaction event listener to see if your transaction has been committed. You can also query the channel to check on block height.

JayJong (Thu, 26 Apr 2018 05:02:22 GMT):
In the tutorial https://fabric-sdk-node.github.io/tutorial-channel-events.html , under the transaction listener, there are these 2 lines: let start_block = getBlockFromSomewhere(); Anyone knows if getBlockFromSomewhere() is a method or i have to type some code to get the block?

JayJong (Thu, 26 Apr 2018 05:02:22 GMT):
In the tutorial https://fabric-sdk-node.github.io/tutorial-channel-events.html , under the transaction listener, there are these 2 lines: let start_block = getBlockFromSomewhere(); storeBlockNumForLater(block_num); Anyone knows if these are methods? or do i have to do something to get the block and store block num? Thanks!

Taffies (Thu, 26 Apr 2018 07:11:24 GMT):
hello. anyone tested the eventhub for v1.1.0? (channel-based) :)

Kamal_Kishor_Mehra (Thu, 26 Apr 2018 07:16:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZFxMtxbxNMwHS2R4P) @bretharrison Thanks for reply, but i have trouble with query chaincode using query.js file. Can yo please help me out from this error: `error: [client-utils.js]: sendPeersProposal - *Promise is rejected: Error: 14 UNAVAILABLE: EOF* at new createStatusError (/home/neospykar/hyperledger/sampleApp/FabricNetworkSetup/node_modules/grpc/src/client.js:64:15) at /home/neospykar/hyperledger/sampleApp/FabricNetworkSetup/node_modules/grpc/src/client.js:583:15 Query has completed, checking results No payloads were returned from query `

petroccoC (Thu, 26 Apr 2018 09:23:15 GMT):
Has joined the channel.

MohammadObaid (Thu, 26 Apr 2018 09:38:41 GMT):
Hey @mastersingh24 when I invoke query command I am getting following error . I am using fabric-sample branch `release-1.1` . Any suggested fix ?

MohammadObaid (Thu, 26 Apr 2018 09:39:46 GMT):

errorinhyperledgerfabric.png

MohammadObaid (Thu, 26 Apr 2018 09:45:49 GMT):
My node version is 8.9.4

mastersingh24 (Thu, 26 Apr 2018 10:51:17 GMT):
Looks like you are using Fabric v1.0.2 ... so you want fabric-samples release-1.0 branch or you need to download Fabric v1.1.0

MohammadObaid (Thu, 26 Apr 2018 11:14:31 GMT):
So for past months I use fabric-samples branch `v1.1.0-preview` with fabric v1.0.2 images and it works fine for me . But now when I do the same I am getting error `[ERROR] invoke-chaincode - Error: Sent message larger than max (3789 vs. 15)` So then I try to go with release branch .

MohammadObaid (Thu, 26 Apr 2018 11:14:31 GMT):
@mastersingh24 So for past months I use fabric-samples branch `v1.1.0-preview` with fabric v1.0.2 images and it works fine for me . But now when I do the same I am getting error `[ERROR] invoke-chaincode - Error: Sent message larger than max (3789 vs. 15)` So then I try to go with release branch .

MohammadObaid (Thu, 26 Apr 2018 11:15:32 GMT):

sendmessage1.png

MohammadObaid (Thu, 26 Apr 2018 11:17:32 GMT):
if this error resolve with branch `v1.1.0-preview` then I am okay with that branch . I am not sure what causing me this error because I havent change anything neither in chaincode or anything . Is there any issue with grpc ?

mastersingh24 (Thu, 26 Apr 2018 11:47:41 GMT):
In v1.1 there is a new event service which the SDKs use ... this gRPC API is not available in Fabric v1.0

mastersingh24 (Thu, 26 Apr 2018 11:48:10 GMT):
So you either need to use Fabric v1.0 with the v1.0 samples or Fabric v1.1 with the v1.1 samples

mastersingh24 (Thu, 26 Apr 2018 11:48:15 GMT):
can't mix and match

MohammadObaid (Thu, 26 Apr 2018 11:49:40 GMT):
so you mean to say if I want to use fabric v1.1 then I need to use fabric 1.1 images right ?

mastersingh24 (Thu, 26 Apr 2018 11:53:25 GMT):
Yes .... during the preview we did not have the new event service

MohammadObaid (Thu, 26 Apr 2018 11:53:55 GMT):
Alright . Thanks :) I will try

jeevas (Thu, 26 Apr 2018 13:18:19 GMT):
registerBlockEvent

jeevas (Thu, 26 Apr 2018 13:22:21 GMT):
while integrating ChannelEventHub Block Listener. i am getting error " Failed to receive the block event ::Error: 12 UNIMPLEMENTED: unknown service protos.Deliver " Please guide me

bretharrison (Thu, 26 Apr 2018 14:02:42 GMT):
@JayJong Those methods are something that the application might consider doing. One use for storing the block number of the last notification it received would be to be able to restart receiving notifications at that point if the application went down.

bretharrison (Thu, 26 Apr 2018 14:04:32 GMT):
@jeevas Check your versions of NodeSDK and the Fabric network.

shiyj (Thu, 26 Apr 2018 16:32:38 GMT):
Has joined the channel.

ondar07 (Fri, 27 Apr 2018 12:29:38 GMT):
Has joined the channel.

jeevas (Fri, 27 Apr 2018 17:14:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9EPJ5obZ9fA8FDFhb) @bretharrison Thank you.It is working now :)

marcosmacedo (Fri, 27 Apr 2018 18:19:05 GMT):
Has joined the channel.

marcosmacedo (Fri, 27 Apr 2018 18:19:12 GMT):
Hello

marcosmacedo (Fri, 27 Apr 2018 18:21:27 GMT):
May somebody please help me? I am trying to send a transaction in a Node SDK app. It is sent correctly and i get a "SUCESS" response. Regardless of this when I take a look at my peer logs it says "ENDORSEMENT_POLICY_FAILURE". Should the certificate of the client be registered in the MSP specified for that peer? How can I do that? Thank you

bretharrison (Fri, 27 Apr 2018 19:09:41 GMT):
@marcosmacedo Check that you have collected the required signed endorsements from the peers that you have sent or should send the transaction proposal.

scottz (Fri, 27 Apr 2018 21:22:47 GMT):
@bretharrison When the design/APIs are finished for node sdk service discovery feature https://jira.hyperledger.org/browse/FAB-8830, please let me and @dongming know, so we can get going on our system test PTE tool and test designs. Or if you would like us to discuss or review design proposals from user perspective, we could help you out that way.

kostas (Fri, 27 Apr 2018 21:58:02 GMT):
Has left the channel.

NeerajKumar (Sat, 28 Apr 2018 09:47:16 GMT):
hey someone please tell me hot to set a client certificate for providing communication access to only authorised clients for communicating with fabric blockchain??

NeerajKumar (Sat, 28 Apr 2018 09:47:16 GMT):
hey someone please tell me how to set a client certificate for providing communication access to only authorised clients for communicating with fabric blockchain??

DarshanBc (Sat, 28 Apr 2018 12:00:31 GMT):
hi I have added org3 to balance transfer example and I am getting this error while I am registering new user

DarshanBc (Sat, 28 Apr 2018 12:00:34 GMT):
```[2018-04-28 11:56:16.232] [ERROR] Helper - Failed to get registered user: Alice with error: Error: Invalid network configuration due to missing configuration data [2018-04-28 11:56:16.233] [DEBUG] SampleWebApp - -- returned from registering the username Alice for organization org3 [2018-04-28 11:56:16.233] [DEBUG] SampleWebApp - Failed to register the username Alice for organization org3 with::failed Error: Invalid network configuration due to missing configuration data ```

DarshanBc (Sat, 28 Apr 2018 12:02:38 GMT):
I have added org3's details in config,js , network-config.yaml created a new file with org3.yamlm as well

DarshanBc (Sat, 28 Apr 2018 12:02:38 GMT):
I have added org3's details in config,js , network-config.yaml created a new file with org3.yaml as well

marcosmacedo (Sat, 28 Apr 2018 14:31:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RLZcLSzrbN3TvPpBQ) @bretharrison Thank you for your response. I have sent the transaction proposal to one peer to endose it (my endorsement policy says one member from one organization) and after I get the simulation result back in form of a Proposal Response I send it to the orderer. Am I doing that correctly? Thank you very much

marcosmacedo (Sat, 28 Apr 2018 14:34:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=K2Fy4KikwodrExQ5v) @NeerajKumar I am having the same question as you, although I did set a certificate for the client by enrolling an identity using the SDK, saving it into a crypto-store and setting the Client.setUserContext() to that Identity, I do not know If that enables me to interact with the network correctly (I can send transactions but they get rejected by peers)

marcosmacedo (Sat, 28 Apr 2018 14:35:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qNG2bKS8B5pqxnLmP) I suggest you the following link as a reference https://fabric-sdk-node.github.io/tutorial-network-config.html

marcosmacedo (Sat, 28 Apr 2018 14:36:33 GMT):

error.PNG

NeerajKumar (Sat, 28 Apr 2018 14:37:41 GMT):
@marcosmacedo show me the 'policies' or 'vscc' debug log of this peer

NeerajKumar (Sat, 28 Apr 2018 14:38:19 GMT):
it is because of the reason the reason that now your peer needs the proper endorsement policy follow up

NeerajKumar (Sat, 28 Apr 2018 14:38:19 GMT):
it is because of the reason that now your peer needs the proper endorsement policy follow up

NeerajKumar (Sat, 28 Apr 2018 14:39:22 GMT):
what was the role in your client certificate, and wht role you have set in the endorsement policy for that particular chaincode

NeerajKumar (Sat, 28 Apr 2018 14:39:23 GMT):
???

NeerajKumar (Sat, 28 Apr 2018 14:43:34 GMT):
no, i don't understand one point. even if you set the user context on the client , how does msp identifies this client is authorised as if right now this client is communicating on behalf of that user only, here in this scenario how we are authorizing the client certificate

marcosmacedo (Sat, 28 Apr 2018 18:39:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=S2WwvQxseTt4AvDyH) @NeerajKumar This is the log of a transaction on the peer: https://justpaste.it/3lrb9 and this is on the orderer side: https://justpaste.it/72tvf

NeerajKumar (Sat, 28 Apr 2018 18:41:03 GMT):
at the peer

NeerajKumar (Sat, 28 Apr 2018 18:41:09 GMT):
this is the issue info

NeerajKumar (Sat, 28 Apr 2018 18:41:10 GMT):
2018-04-27 18:01:12.597 UTC [vscc] Invoke -> DEBU cd9 VSCC invoked 2018-04-27 18:01:12.598 UTC [vscc] deduplicateIdentity -> DEBU cda Signature set is of size 1 out of 1 endorsement(s) 2018-04-27 18:01:12.598 UTC [vscc] Invoke -> WARN cdb Endorsement policy failure for transaction

NeerajKumar (Sat, 28 Apr 2018 18:41:39 GMT):
its because may be your role doesnt match the role in default endorsement policy

marcosmacedo (Sat, 28 Apr 2018 18:42:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JGCYHAE44oz5Jpv4h) @NeerajKumar I haven't set any role on my client certificate, only a username and password. This is how I enroll a client: https://justpaste.it/2j4kb

marcosmacedo (Sat, 28 Apr 2018 18:43:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=E5BYZtQXbkFSLQGDm) @NeerajKumar That is also my question, how does the msp identify the client I have just made as aauthorized? The certificates are issued both by the same CA that is the only thing in common

marcosmacedo (Sat, 28 Apr 2018 18:44:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xuWJresJKd6WKX7iS) @NeerajKumar I will try it, should the certificates that I issue for the MSP in the peer have the role: member?

NeerajKumar (Sat, 28 Apr 2018 18:45:19 GMT):
peer should have role peer and client should have role client

NeerajKumar (Sat, 28 Apr 2018 18:45:29 GMT):
set a simple endorsement policy

NeerajKumar (Sat, 28 Apr 2018 18:45:40 GMT):
with a role

NeerajKumar (Sat, 28 Apr 2018 18:45:51 GMT):
then it will succeed

NeerajKumar (Sat, 28 Apr 2018 18:47:30 GMT):
client certificate is a thing which i am still not able to find how and where to set this certificate?

marcosmacedo (Sat, 28 Apr 2018 19:08:59 GMT):

Clipboard - April 28, 2018 4:08 PM

marcosmacedo (Sat, 28 Apr 2018 19:09:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dijm9kcLbp4HjFkHJ) @NeerajKumar Is it okay if I register it in this way? Should I export the attribuite to the eCert?

marcosmacedo (Sat, 28 Apr 2018 19:09:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WvyPXbthGnjsRXqvu) @NeerajKumar My current policy is any organization.member

NeerajKumar (Sat, 28 Apr 2018 19:11:06 GMT):
i am not sre about what ever you are doing is right or wrong, that is why i have also queried the same here. but endorsement policies are failing in your transaction proposal due to roles may be...

NeerajKumar (Sat, 28 Apr 2018 19:11:06 GMT):
i am not sure about what ever you are doing is right or wrong, that is why i have also queried the same here. but endorsement policies are failing in your transaction proposal due to roles may be...

marcosmacedo (Sat, 28 Apr 2018 19:14:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7GbhnNitPnPw7ZnRW) @NeerajKumar Okay, I will try what you said. Thank you very much. On the other hand to use the certificate after enrolling it with the SDK you need to use the following code snippet. It may be useful to you

marcosmacedo (Sat, 28 Apr 2018 19:14:33 GMT):
let kvs = client.getStateStore(); kvs.getValue(enrollID).then((retrievedUser) => { if (retrievedUser == null) { console.log("User not found previously. Please enroll"); return; }

marcosmacedo (Sat, 28 Apr 2018 19:14:52 GMT):
where client is a Client object

marcosmacedo (Sat, 28 Apr 2018 19:15:18 GMT):
then you can use the client object and set the security context with it

marcosmacedo (Sat, 28 Apr 2018 19:24:47 GMT):
This may also be of your interest: https://stackoverflow.com/questions/47225304/how-to-verify-of-the-origin-of-transactions-on-endorsing-peer-locally

karthikeyans90 (Sat, 28 Apr 2018 19:30:41 GMT):
Has joined the channel.

JayJong (Mon, 30 Apr 2018 11:32:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NJQhfkaQt7v9h5xEm) Thanks for the reply, so getBlockFromSomewhere and storeBlockNumForLater are not actual methods in fabric node sdk but stuff i can do by using other api methods like channel.queryInfo() to get the last block, am i right?

bretharrison (Mon, 30 Apr 2018 13:32:22 GMT):
@JayJong The block number is included in the callback parameters of both transaction events and chaincode events, and block number is in the block of block events. So as an application event listener, store the last block received to know where to start next time.

jeevas (Mon, 30 Apr 2018 14:22:21 GMT):
Hi, I have used ChannelEventHub in registereBlockEvent method , It is returning block object as a (channel_id,number and filtered_tx) but in readme document returning block object value is different. is it updated document ?

bretharrison (Mon, 30 Apr 2018 15:02:44 GMT):
ChannelEventHub has two modes, full blocks and filtered blocks, a client application user identity may not have access to the full block information that may have sensitive information. The `connect()` method on the ChannelEventHub takes a boolean as a parameter to request the Fabric network Peer Channel Event Service service to send full blocks where the default is to send filtered blocks. see https://fabric-sdk-node.github.io/tutorial-channel-events.html to see the full block structure https://github.com/hyperledger/fabric-sdk-node/blob/bf2dfb5ffcff714c9accfcc275c2d9d66ec7521d/fabric-client/lib/protos/common/common.proto#L150 to see the filtered block structure https://github.com/hyperledger/fabric-sdk-node/blob/bf2dfb5ffcff714c9accfcc275c2d9d66ec7521d/fabric-client/lib/protos/peer/events.proto#L80 @jeevas It looks like you connected to receive filtered blocks

Dpkkmr (Tue, 01 May 2018 04:33:57 GMT):
Hi, In fabric 1.1 balance-transfer application, I am trying to add another new channel called mychannel1 along with mychannel, is it sufficient to new channel details in network-config.yaml file? (I have generated required artifacts using crypto tools) What is the use of ' "channelName":"mychannel",' parameter in package.json? Thanks in advance.

wenjian (Tue, 01 May 2018 14:22:48 GMT):
Has joined the channel.

davidkhala (Wed, 02 May 2018 02:19:31 GMT):
@bretharrison I found `gulp test-headless` failure on latest master commit,

davidkhala (Wed, 02 May 2018 02:19:31 GMT):
@bretharrison I found `gulp test-headless` failure on latest master commit, `not ok 599 Check for The event hub has not been connected to the event source - tx test 1 --- operator: throws expected: |- null actual: |- [TypeError: Cannot read property 'getConnectivityState' of undefined] at: crypto_suite.generateKey.then.then (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:495:5) stack: |- TypeError: Cannot read property 'getConnectivityState' of undefined at EventHub._checkConnection (/home/david/Documents/fabric-sdk-node/fabric-client/lib/EventHub.js:9:19670) at EventHub.registerTxEvent (/home/david/Documents/fabric-sdk-node/fabric-client/lib/EventHub.js:9:28019) at t.doesNotThrow (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:497:15) at Test.doesNotThrow (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:522:9) at Test.bound [as doesNotThrow] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at crypto_suite.generateKey.then.then (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:495:5) at `, which means in `EventHub.js` line 480, `this._stream.call.channel_` is not defined. I have printed out the object of `this._stream.call` : ` call: InterceptingCall { next_call: InterceptingCall { next_call: null, requester: [Object] }, requester: undefined }, `

davidkhala (Wed, 02 May 2018 02:19:31 GMT):
@bretharrison I found `gulp test-headless` failure on latest master commit, `not ok 599 Check for The event hub has not been connected to the event source - tx test 1 --- operator: throws expected: |- null actual: |- [TypeError: Cannot read property 'getConnectivityState' of undefined] at: crypto_suite.generateKey.then.then (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:495:5) stack: |- TypeError: Cannot read property 'getConnectivityState' of undefined at EventHub._checkConnection (/home/david/Documents/fabric-sdk-node/fabric-client/lib/EventHub.js:9:19670) at EventHub.registerTxEvent (/home/david/Documents/fabric-sdk-node/fabric-client/lib/EventHub.js:9:28019) at t.doesNotThrow (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:497:15) at Test.doesNotThrow (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:522:9) at Test.bound [as doesNotThrow] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at crypto_suite.generateKey.then.then (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:495:5) at `, which means in `EventHub.js` line 480, `this._stream.call.channel_` is not defined. I have printed out the object of `this._stream.call` : ` call: InterceptingCall { next_call: InterceptingCall { next_call: null, requester: [Object] }, requester: undefined }, `

davidkhala (Wed, 02 May 2018 02:19:31 GMT):
@bretharrison I found `gulp test-headless` failure on latest master commit, ``` not ok 599 Check for The event hub has not been connected to the event source - tx test 1 --- operator: throws expected: |- null actual: |- [TypeError: Cannot read property 'getConnectivityState' of undefined] at: crypto_suite.generateKey.then.then (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:495:5) stack: |- TypeError: Cannot read property 'getConnectivityState' of undefined at EventHub._checkConnection (/home/david/Documents/fabric-sdk-node/fabric-client/lib/EventHub.js:9:19670) at EventHub.registerTxEvent (/home/david/Documents/fabric-sdk-node/fabric-client/lib/EventHub.js:9:28019) at t.doesNotThrow (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:497:15) at Test.doesNotThrow (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:522:9) at Test.bound [as doesNotThrow] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at crypto_suite.generateKey.then.then (/home/david/Documents/fabric-sdk-node/test/unit/event-hub.js:495:5) at ```, which means in `EventHub.js` line 480, `this._stream.call.channel_` is not defined. I have printed out the object of `this._stream.call` : ``` call: InterceptingCall { next_call: InterceptingCall { next_call: null, requester: [Object] }, requester: undefined }, ```

chandrakanthm (Wed, 02 May 2018 06:47:20 GMT):
i am getting this error while running ./testApi.sh under balance transfer app POST request Enroll on Org1 ... {"success":false,"message":"failed Error: fabric-ca request register failed with errors [[{\"code\":0,\"message\":\"No identity type provided. Please provide identity type\"}]]"}

davidkel (Wed, 02 May 2018 07:28:40 GMT):
@davidkhala @bretharrison this has been broken by the latest release of grpc to 1.11.0, see https://jira.hyperledger.org/browse/FAB-9819 which shows a different symptom experienced by hyperledger composer.

davidkhala (Wed, 02 May 2018 08:10:26 GMT):
@davidkel Oops, then this is duplicated : https://jira.hyperledger.org/browse/FAB-9828

Kamal_Kishor_Mehra (Wed, 02 May 2018 09:40:49 GMT):
I am getting error while creating channel using NodeSDK. `*2018-05-02 09:29:46.784 UTC [cauthdsl] deduplicate -> ERRO 180 Principal deserialization failure (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.neo.com"))*`

bretharrison (Wed, 02 May 2018 14:13:26 GMT):
@Dpkkmr All peers that an NodeSDK application is working with must be told to join an existing channel. All Channels must be created on an orderer before a peer can join. Indicating that a channel exist in the `network.yaml` that has been loaded by an application(NodeSDK) does not join or create the channel, it helps the application(NodeSDK) to build up the necessary objects on the client side to work with that channel.

andrew-coleman (Wed, 02 May 2018 14:38:22 GMT):
Has joined the channel.

carlcraig (Wed, 02 May 2018 20:56:38 GMT):
Has joined the channel.

amolpednekar (Thu, 03 May 2018 03:46:43 GMT):
Hi guys. Are there any methods in the Node SDK to modify (change password, add attributes, etc) an identity? ( like in http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#modifying-an-identity ) Couldnt see any such thing in the API reference

davidkhala (Thu, 03 May 2018 03:58:46 GMT):
@amolpednekar Yes, see this: https://fabric-sdk-node.github.io/IdentityService.html

ChanderGovindarajan (Thu, 03 May 2018 04:49:39 GMT):
Has joined the channel.

hungpq14 (Thu, 03 May 2018 04:53:27 GMT):
Has joined the channel.

anjalinaik (Thu, 03 May 2018 05:24:07 GMT):
Has joined the channel.

anjalinaik (Thu, 03 May 2018 05:24:53 GMT):
Hi..Any help on below error?

anjalinaik (Thu, 03 May 2018 05:24:58 GMT):
Failed to invoke successfully :: TypeError: Cannot read property 'getConnectivityState' of undefined /opt/share/hyperledger/node_modules/fabric-client/lib/EventHub.js:355 if(self._stream) state = self.stream.call.channel.getConnectivityState(); ^ TypeError: Cannot read property 'getConnectivityState' of undefined at ClientDuplexStream. (/opt/share/hyperledger/node_modules/fabric-client/lib/EventHub.js:355:56) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/opt/share/hyperledger/node_modules/grpc/src/client.js:236:12) at ClientDuplexStream._readsDone (/opt/share/hyperledger/node_modules/grpc/src/client.js:201:8) at /opt/share/hyperledger/node_modules/grpc/src/client_interceptors.js:705:15

indira.kalagara (Thu, 03 May 2018 05:45:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AnZhbsyo8Fzb5Pwdy) @anjalinaik Seems to be issue with grpc version as mentioned in the above chats. I too got the same and fixed by updating the grpc version in package.json of fabric-client to 1.10.1 or as mentioned here https://gerrit.hyperledger.org/r/#/c/21281/1/fabric-client/package.json

anjalinaik (Thu, 03 May 2018 05:57:27 GMT):
hi @indira.kalagara : i am getting below error when i changed the version as mentioned by you.No matching version found for fabric-client@~1.10.1

anjalinaik (Thu, 03 May 2018 05:57:27 GMT):
hi @indira.kalagara : i am getting below error when i changed the version as mentioned by you.No matching version found for fabric-client@~1.10.1

indira.kalagara (Thu, 03 May 2018 05:59:21 GMT):
not for fabric-client ....it is grpc module version , "grpc" : "1.10.1"

anjalinaik (Thu, 03 May 2018 06:14:39 GMT):
i am receiving the below error on changing grpc version: Failed to invoke successfully :: Error: There was a problem with the eventhub ::Error: 14 UNAVAILABLE: Connect Failed

anjalinaik (Thu, 03 May 2018 06:14:56 GMT):
@indira.kalagara Thankyou for your prompt reply.

Henni (Thu, 03 May 2018 08:13:32 GMT):
Has joined the channel.

renetolu (Thu, 03 May 2018 08:22:50 GMT):
Has joined the channel.

renetolu (Thu, 03 May 2018 08:24:51 GMT):
Hi, I am trying to run PTE with Fabric Node SDK but I cannot make it work at all. Has anyone successfully implemented PTE and ran tests? Thank you!

naveen_saravanan (Thu, 03 May 2018 10:49:45 GMT):
Does node-rest-client support https requests?

naveen_saravanan (Thu, 03 May 2018 10:49:45 GMT):
Does node-rest-client supports https requests?

binhn (Thu, 03 May 2018 13:12:53 GMT):
Has left the channel.

wenjian (Thu, 03 May 2018 13:30:58 GMT):
I got the same error as posted by @anjalinaik

wenjian (Thu, 03 May 2018 13:31:00 GMT):
Failed to invoke successfully :: TypeError: Cannot read property 'getConnectivityState' of undefined /home/wenjian3/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/EventHub.js:308 if(self._stream) state = self._stream.call.channel_.getConnectivityState(); ^ TypeError: Cannot read property 'getConnectivityState' of undefined at ClientDuplexStream. (/home/wenjian3/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/EventHub.js:308:56) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at ClientDuplexStream.Readable.push (_stream_readable.js:208:10) at Object.onReceiveMessage (/home/wenjian3/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/client_interceptors.js:1302:19) at InterceptingListener.recvMessageWithContext (/home/wenjian3/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/client_interceptors.js:629:19) at /home/wenjian3/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/client_interceptors.js:728:14

wenjian (Thu, 03 May 2018 13:32:53 GMT):
Failed to invoke successfully :: TypeError: Cannot read property 'getConnectivityState' of undefined /home/wenjian3/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/EventHub.js:308 if(self._stream) state = self._stream.call.channel_.getConnectivityState(); ^ TypeError: Cannot read property 'getConnectivityState' of undefined at ClientDuplexStream. (/home/wenjian3/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/EventHub.js:308:56) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at ClientDuplexStream.Readable.push (_stream_readable.js:208:10) at Object.onReceiveMessage (/home/wenjian3/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/client_interceptors.js:1302:19)

wenjian (Thu, 03 May 2018 13:33:46 GMT):
I updated to "grpc": "^1.10.1", but still got the same error

wenjian (Thu, 03 May 2018 13:33:46 GMT):
^^ Update: after I changed to "grpc": "1.9.1", the problem was resolved.

downTheFallLine (Thu, 03 May 2018 18:48:34 GMT):
Has joined the channel.

downTheFallLine (Thu, 03 May 2018 18:49:09 GMT):
i've an application that's attempting to write a few dozen CONCURRENT transactions into fabric, and getting MVCC_READ_CONFLICT back. Anyone have any thoughts on this?

davidkhala (Fri, 04 May 2018 03:27:26 GMT):
@bretharrison Dear Bret, I found a problem in your latest commit to master # Error: 2 UNKNOWN: chaincode error (status: 500, message: Error installing chaincode code install:v1525404310310(chaincode /var/hyperledger/production/chaincodes/install.v1525404310310 exists)) not ok 1507 TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) --- operator: fail at: installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) stack: |- Error: TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) at Test.assert [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:225:54) at Test.bound [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at Test.fail (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:318:10) at Test.bound [as fail] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) at at process._tickDomainCallback (internal/process/next_tick.js:228:7)

davidkhala (Fri, 04 May 2018 03:27:26 GMT):
@bretharrison Dear Bret, I found a problem in your latest commit to master when doing ``gulp test`` section ``** Test chaincode install using chaincodePath to create chaincodePackage ** `` for test that attempt to install existing chaincode with same version ``` # Error: 2 UNKNOWN: chaincode error (status: 500, message: Error installing chaincode code install:v1525404310310(chaincode /var/hyperledger/production/chaincodes/install.v1525404310310 exists)) not ok 1507 TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) --- operator: fail at: installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) stack: |- Error: TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) at Test.assert [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:225:54) at Test.bound [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at Test.fail (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:318:10) at Test.bound [as fail] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) ``` I saw you change the error message checking from ``info.toString()`` to be ``info.response.message``. Would you mind explain the reason?

davidkhala (Fri, 04 May 2018 03:27:26 GMT):
@bretharrison Dear Bret, I found a problem in your latest commit to master when doing `gulp test` section `** Test chaincode install using chaincodePath to create chaincodePackage ** ` for test that attempt to install existing chaincode with same version ``` # Error: 2 UNKNOWN: chaincode error (status: 500, message: Error installing chaincode code install:v1525404310310(chaincode /var/hyperledger/production/chaincodes/install.v1525404310310 exists)) not ok 1507 TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) --- operator: fail at: installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) stack: |- Error: TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) at Test.assert [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:225:54) at Test.bound [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at Test.fail (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:318:10) at Test.bound [as fail] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) ``` I saw you change the error message checking from ``info.toString()`` to be ``info.response.message``. Would you mind explain the reason?

davidkhala (Fri, 04 May 2018 03:27:26 GMT):
@bretharrison Dear Bret, I found a problem in your latest commit to master when doing `gulp test` section `** Test chaincode install using chaincodePath to create chaincodePackage **` for test that attempt to install existing chaincode with same version ``` # Error: 2 UNKNOWN: chaincode error (status: 500, message: Error installing chaincode code install:v1525404310310(chaincode /var/hyperledger/production/chaincodes/install.v1525404310310 exists)) not ok 1507 TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) --- operator: fail at: installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) stack: |- Error: TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) at Test.assert [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:225:54) at Test.bound [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at Test.fail (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:318:10) at Test.bound [as fail] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) ``` I saw you change the error message checking from ``info.toString()`` to be ``info.response.message``. Would you mind explain the reason?

davidkhala (Fri, 04 May 2018 03:27:26 GMT):
@bretharrison Dear Bret, I found a problem in your latest commit to master when doing `gulp test` section `** Test chaincode install using chaincodePath to create chaincodePackage **` for test that attempt to install existing chaincode with same version ``` # Error: 2 UNKNOWN: chaincode error (status: 500, message: Error installing chaincode code install:v1525404310310(chaincode /var/hyperledger/production/chaincodes/install.v1525404310310 exists)) not ok 1507 TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) --- operator: fail at: installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) stack: |- Error: TypeError: Cannot read property 'message' of undefined at installChaincode.then (/home/david/Documents/fabric-sdk-node/test/integration/install.js:81:32) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) at Test.assert [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:225:54) at Test.bound [as _assert] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at Test.fail (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:318:10) at Test.bound [as fail] (/home/david/Documents/fabric-sdk-node/node_modules/tape/lib/test.js:77:32) at installChaincode.then.catch (/home/david/Documents/fabric-sdk-node/test/integration/install.js:93:8) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) ``` I saw you change the error message checking from `info.toString()` to be `info.response.message`. Would you mind explain the reason?

bretharrison (Fri, 04 May 2018 11:59:23 GMT):
@davidkhala Do you have latest fabric ?

asadhayat (Fri, 04 May 2018 13:55:54 GMT):
When we enroll a user with CA, a secret/password is returned. How can we use this secret and username to authenticate a user in node SDK.

MohitYadav2317 (Fri, 04 May 2018 19:44:22 GMT):
Has joined the channel.

rickr (Sat, 05 May 2018 16:09:51 GMT):
For the crypto material in `test/fixtures/channel/crypto-config/` How was it generated ? `cryptogen` ? If so, where is the crypto-config.yaml ? Thx!

davidkhala (Sun, 06 May 2018 01:09:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jmkEqa98yespPmxk7) @bretharrison I am using fabric 1.1.0, not the master-snapshot, does it matter?

Luxii (Mon, 07 May 2018 14:40:11 GMT):
Hey Ive been trying to listen for custom chaincode events. But somehow client app fails to listen for those events. Code is here --

Luxii (Mon, 07 May 2018 14:43:22 GMT):

Clipboard - May 7, 2018 8:13 PM

Luxii (Mon, 07 May 2018 14:43:49 GMT):
Inside chaincode

Luxii (Mon, 07 May 2018 14:43:53 GMT):
```customEvent := "{\"Name\":\"" + A + "\",\"Amount\":\"" + string(Avalbytes) + "\",\"Message\":\"Hello from the other side \" }" err = stub.SetEvent("testevent",[]byte(customEvent));```

Luxii (Mon, 07 May 2018 14:45:18 GMT):
client app function executes only at the start of function but is'nt able to pick up any events , previous ones or new ones

Luxii (Mon, 07 May 2018 14:45:18 GMT):
client app function executes only at the start of function but is'nt able to pick up any events

bretharrison (Mon, 07 May 2018 14:59:15 GMT):
@Luxii The chaincode will execute as the transaction proposal is being endorsed by the peer. The setEvent of the chaincode will place that data into the endorsement. The NodeSDK must then submit the endorsed transaction to the orderer to be committed to the ledger by the peers. Once the peer commits the new block to the ledger, it will send the block to all connected clients (your NodeSDK application). When the NodeSDK gets the new block it will check to see if there are any registered block, transaction, or chaincode listeners (the callback you registered with the chaincode name). Block listeners will get the new block. The block will be checked for registered transaction IDs and if found they will be returned with status to the listeners. The block will be checked for matching registered chaincode names and returned to the listeners.

bretharrison (Mon, 07 May 2018 14:59:15 GMT):
@Luxii The chaincode will execute as the transaction proposal is being endorsed by the peer. The setEvent of the chaincode will place that data into the endorsement. The NodeSDK must then submit the endorsed transaction to the orderer to be committed to the ledger by the peers. Once the peer commits the new block to the ledger, it will send the block to all connected clients (your NodeSDK application). When the NodeSDK gets the new block it will check to see if there are any registered block, transaction, or chaincode listeners. Block listeners will get the new block. The block will be checked for registered transaction IDs and if found they will be returned with status to the listeners. The block will be checked for matching registered chaincode names and returned to the listeners.

bretharrison (Mon, 07 May 2018 16:40:18 GMT):
@davidkhala I am running with the latest fabric and the latest NodeSDK

bretharrison (Mon, 07 May 2018 16:40:18 GMT):
@davidkhala I am running with the latest fabric(I build it ) and the latest NodeSDK

CodeReaper (Mon, 07 May 2018 16:46:03 GMT):
That is what @Luxii is doing @bretharrison . he's committing transactions separately by sending to orderer without any problem. But the code couldn't pick up any events set up by chaincode, was the eventhub getting closed?

bretharrison (Mon, 07 May 2018 16:54:10 GMT):
@CodeReaper @Luxii Maybe a debug log would help see when the commit went out, when the eventhub was notified, when the eventhub was closed, when the evenhub timeout

htyagi90 (Mon, 07 May 2018 17:24:04 GMT):
Can anyone point to some resources for unit testing in node-sdk ?

davidkhala (Tue, 08 May 2018 05:49:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2EjRD5kLWyBcX9999) @bretharrison Thanks, I guess that is the reason.

davidkhala (Tue, 08 May 2018 07:00:58 GMT):
Can we write nodejs code with node-sdk to act like configtxgen?

Luxii (Tue, 08 May 2018 07:36:42 GMT):
Hey ! Is it possible for one channel event hub object to listen for both chaincode events and Tx events ? I've tried the same but I got the following error -

Luxii (Tue, 08 May 2018 07:36:47 GMT):

Clipboard - May 8, 2018 1:06 PM

Luxii (Tue, 08 May 2018 07:38:06 GMT):
I got this error when channel event hub object was registered to listen for chiancode events and when I tried the same object to listen for tx events (registerTxevents) I got the above error

davidkhala (Tue, 08 May 2018 08:18:42 GMT):
@Luxii this is for channelEventHub only or happens also in EventHub?

DmytroSukhiy (Tue, 08 May 2018 09:26:17 GMT):
Has joined the channel.

Luxii (Tue, 08 May 2018 09:49:57 GMT):
@davidkhala for channelEventHub

Luxii (Tue, 08 May 2018 09:49:57 GMT):
@davidkhala for hannelEventHub

ajkh88 (Tue, 08 May 2018 10:12:08 GMT):
Has joined the channel.

Starseven (Tue, 08 May 2018 11:52:35 GMT):
Has joined the channel.

Amjadnz (Tue, 08 May 2018 12:23:53 GMT):
Hi! Question on the sendProposal for NODE-SDK (still on Fabric 1.0.5) My users are doing the following transactions fairly quickly Transaction 1 - Do an entry in the LEDGER (uisng the chaincodeInvoke at node_js) Transaction 2 - Do another entry in the LEDGER (using the same chaincodeInvoke at node_js) The transaction 2 - gets a timeout (of 120 Secs - that is what I set) - then retries again to move forward and succeeds. the end user have to wait for 2 to 3 minutes to get a successful transactions. My network is TLS Enabled and has 4 Orgs with 2 peers each. ```error: [E2E testing]: transaction proposal was bad error: [E2E testing]: transaction proposal was bad error: [E2E testing]: transaction proposal was bad error: [E2E testing]: transaction proposal was bad error: [E2E testing]: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... error: [E2E testing]: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... at promise.then.then.then.then.then (/tts/blockchain/fabric-sdk-node/test/integration/e2e/e2eUtils.js:1212:19) at ```

Amjadnz (Tue, 08 May 2018 12:24:40 GMT):
can anyone help?

Amjadnz (Tue, 08 May 2018 12:26:35 GMT):
My thinking process points out to the CONCENSUS mechanism to wait till all the endorsers on 4 ORGS have done the work and provide me a transaction confirmation before moving on any new transaction - Is this understanding correct? And if so how can we ensure that we have a fire and forget - and in the the node-js listeners - I would do the reversal part if something indeed fails.

pd93 (Tue, 08 May 2018 14:47:15 GMT):
Hey, on v1.1, I don't seem to be able to get a `ProposalResponse` object back from the Node SDK anymore? I can call `channel.sendTransactionProposal(req)` and print out a single response just fine: ```{ Error: 2 UNKNOWN: chaincode error (status: 500, message: Test chaincode error) at new createStatusError (/eqdlt/eq-trader/node_modules/grpc/src/client.js:64:15) at /eqdlt/eq-trader/node_modules/grpc/src/client.js:583:15 code: 2, metadata: Metadata { _internal_repr: {} }, details: 'chaincode error (status: 500, message: Test chaincode error' } ``` but when I send this response to the `channel.verifyProposalResponse(response)` function, I get an error: ``` Error: Parameter must be a ProposalResponse Object at Channel.verifyProposalResponse (/eqdlt/eq-trader/node_modules/fabric-client/lib/Channel.js:1795:10) ``` I also don't seem to be able to access the object fields as I usually would (eg. `response.status` or `response.message` Any help would be appreciated

pd93 (Tue, 08 May 2018 14:47:15 GMT):
Hey, on v1.1, I don't seem to be able to get a `ProposalResponse` object back from the Node SDK anymore? I can call `channel.sendTransactionProposal(req)` and print out a single response just fine: ```{ Error: 2 UNKNOWN: chaincode error (status: 500, message: Test chaincode error) at new createStatusError (…../node_modules/grpc/src/client.js:64:15) at …../node_modules/grpc/src/client.js:583:15 code: 2, metadata: Metadata { _internal_repr: {} }, details: 'chaincode error (status: 500, message: Test chaincode error' } ``` but when I send this response to the `channel.verifyProposalResponse(response)` function, I get an error: ``` Error: Parameter must be a ProposalResponse Object at Channel.verifyProposalResponse (/eqdlt/eq-trader/node_modules/fabric-client/lib/Channel.js:1795:10) ``` I also don't seem to be able to access the object fields as I usually would (eg. `response.status` or `response.message` Any help would be appreciated

pd93 (Tue, 08 May 2018 14:47:15 GMT):
Hey, on v1.1, I don't seem to be able to get a `ProposalResponse` object back from the Node SDK anymore? I can call `channel.sendTransactionProposal(req)` and print out a single response just fine: ```{ Error: 2 UNKNOWN: chaincode error (status: 500, message: Test chaincode error) at new createStatusError (…../node_modules/grpc/src/client.js:64:15) at …../node_modules/grpc/src/client.js:583:15 code: 2, metadata: Metadata { _internal_repr: {} }, details: 'chaincode error (status: 500, message: Test chaincode error' } ``` but when I send this response to the `channel.verifyProposalResponse(response)` function, I get an error: ``` Error: Parameter must be a ProposalResponse Object at Channel.verifyProposalResponse (…../node_modules/fabric-client/lib/Channel.js:1795:10) ``` I also don't seem to be able to access the object fields as I usually would (eg. `response.status` or `response.message` Any help would be appreciated

pd93 (Tue, 08 May 2018 14:47:15 GMT):
Hey, on v1.1, I don't seem to be able to get a `ProposalResponse` object back from the Node SDK anymore? I can call `channel.sendTransactionProposal(req)` and print out a single response just fine: ```{ Error: 2 UNKNOWN: chaincode error (status: 500, message: Test chaincode error) at new createStatusError (...../node_modules/grpc/src/client.js:64:15) at ...../node_modules/grpc/src/client.js:583:15 code: 2, metadata: Metadata { _internal_repr: {} }, details: 'chaincode error (status: 500, message: Test chaincode error' } ``` but when I send this response to the `channel.verifyProposalResponse(response)` function, I get an error: ``` Error: Parameter must be a ProposalResponse Object at Channel.verifyProposalResponse (...../node_modules/fabric-client/lib/Channel.js:1795:10) ``` I also don't seem to be able to access the object fields as I usually would (eg. `response.status` or `response.message` Any help would be appreciated

pd93 (Tue, 08 May 2018 14:47:15 GMT):
Hey, on v1.1, I don't seem to be able to get a `ProposalResponse` object back from the Node SDK anymore? I can call `channel.sendTransactionProposal(req)` and print out a single response just fine: ```{ Error: 2 UNKNOWN: chaincode error (status: 500, message: Test chaincode error) at new createStatusError (...../node_modules/grpc/src/client.js:64:15) at ...../node_modules/grpc/src/client.js:583:15 code: 2, metadata: Metadata { _internal_repr: {} }, details: 'chaincode error (status: 500, message: Test chaincode error' } ``` but when I send this response to the `channel.verifyProposalResponse(response)` function, I get an error: ```Error: Parameter must be a ProposalResponse Object at Channel.verifyProposalResponse (...../node_modules/fabric-client/lib/Channel.js:1795:10) ``` I also don't seem to be able to access the object fields as I usually would (eg. `response.status` or `response.message` Any help would be appreciated

bretharrison (Tue, 08 May 2018 15:06:18 GMT):
@Amjadnz You may wish to post this type of question to the #fabric-peer-endorser-committer

Amjadnz (Tue, 08 May 2018 15:11:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fcemTyZsAhHzic27H) @bretharrison - Thanks I did it now. But I think node-sdk might be able to help with setting up the listener part properly, hence this question here.

bretharrison (Tue, 08 May 2018 15:12:58 GMT):
@Luxii Check how you have registered your first event listener to the ChannelEventHub. Are you registering with a `startBlock` or `endBlock`, as this may confuse other listeners, only one listener is allowed when using this function. https://fabric-sdk-node.github.io/tutorial-channel-events.html see the discussion on startBlock and endBlock

bretharrison (Tue, 08 May 2018 15:12:58 GMT):
@Luxii Check how you have registered your first event listener to the ChannelEventHub. If you must be registering with a `startBlock` or `endBlock`, as this may confuse other listeners, only one listener is allowed when using this function. https://fabric-sdk-node.github.io/tutorial-channel-events.html see the discussion on startBlock and endBlock

bretharrison (Tue, 08 May 2018 15:16:52 GMT):
@Amjadnz You may wish to use a transaction event listener https://fabric-sdk-node.github.io/tutorial-channel-events.html see the discussion on `Transaction listener`

Amjadnz (Tue, 08 May 2018 16:36:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d9y9692JbcPXHmAPb) @bretharrison -

Amjadnz (Tue, 08 May 2018 16:36:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d9y9692JbcPXHmAPb) @bretharrison - Thanks - very good read

bretharrison (Tue, 08 May 2018 17:09:02 GMT):
@davidkhala I would be possible to write nodejs code to build config blocks and config updates. It is would be the opposite of the BlockDecoder, however to make it usable would take a bit of coding.

Amjadnz (Tue, 08 May 2018 22:41:11 GMT):
Another question can someone help here? I'm trying to instantiate a chaincode and get the following "KILLED" message. ```info: [TestUtil]: looking at file ::/tts/blockchain/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/sca.local.ubn.ae/users/Admin@sca.local.ubn.ae/msp/keystore/ea7cf69a199cce6b56340d5226e049a10289f51ae1c6da3394063cc419722ccb_sk info: [TestUtil]: looking at file ::/tts/blockchain/fabric-sdk-node/test/fixtures/channel/crypto-config/peerOrganizations/sca.local.ubn.ae/users/Admin@sca.local.ubn.ae/msp/signcerts/Admin@sca.local.ubn.ae-cert.pem ok 4 Successfully enrolled user 'admin' info: [packager/Golang.js]: packaging GOLANG from tts/accounts *Killed*```

Amjadnz (Tue, 08 May 2018 22:42:10 GMT):
the script I'm using is the instantiate-chaincode.js

Amjadnz (Tue, 08 May 2018 22:42:44 GMT):
Also this is RHEL 7.3 environment Fabric 1.0.5

Amjadnz (Tue, 08 May 2018 22:42:44 GMT):
Also this is RHEL 7.3 environment Fabric 1.0.5 Docker 1.18 GO 1.10

Amjadnz (Tue, 08 May 2018 22:43:58 GMT):
As per security policy of the organisation - we have selected a C2S Security Policy while installing RHEL. Is this having a BEARING on the node processes getting killed?

davidkhala (Wed, 09 May 2018 02:44:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EDSxow26MGXM939dK) @bretharrison Great to hear its possibility. That certainly will take a lot effort to implement it.

davidkhala (Wed, 09 May 2018 02:45:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=enTvkAzE8sQ22SERE) @Luxii would you mind creating an issue to tracking this?

davidkhala (Wed, 09 May 2018 04:26:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kXGBHjDcLe92AHqr4) @Amjadnz what is the instantiate-chaincode.js you are using?

Luxii (Wed, 09 May 2018 05:04:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RxMTMfXuaL5wEdEaz) @bretharrison I was using startblock option but now I have started the whole network again and have two users enrolled and both channelHubEvent and EventHub listeners are working fine.

Luxii (Wed, 09 May 2018 05:05:26 GMT):
Idk what was wrong with the previous approach

kapilAtrey (Wed, 09 May 2018 06:59:49 GMT):
Hi, i cloned a fresh fabric samples and after running npm in balance-transfer install it gives this error i tried on different machine and i tried in previously cloned samples they also started to behave the same after running npm install and they were working fine before that

kapilAtrey (Wed, 09 May 2018 06:59:54 GMT):

Clipboard - May 9, 2018 12:29 PM

kapilAtrey (Wed, 09 May 2018 06:59:59 GMT):

Clipboard - May 9, 2018 12:29 PM

kapilAtrey (Wed, 09 May 2018 07:02:16 GMT):

Clipboard - May 9, 2018 12:31 PM

davidkel (Wed, 09 May 2018 07:13:44 GMT):
@kapilAtrey The latest fabric-ca-client npm module (v1.1.1) is broken, suggest you fix your dependency to v1.1.0 for now

grapebaba (Wed, 09 May 2018 07:46:59 GMT):
hi,guys, anyone came across duplicate enroll ca user issue under heavy load testing?

grapebaba (Wed, 09 May 2018 07:48:18 GMT):
we use balance-transfer example, found ca users will increase continually which i think it should be only one per an org

Amjadnz (Wed, 09 May 2018 08:03:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=e32WXRuFJznSifHGF) @davidkhala - this issue seems to be resolved once cleared all the sources and rebuild again from scratch. Thanks.

Amjadnz (Wed, 09 May 2018 08:06:43 GMT):
I have a peculiar issue with sendTransactionProposals I did three transaction calls on the same chaincode (And same method). Call 1: Sending proposal time is taking as almost 500 milli seconds (ACCPETABLE) info: [11:46:00.230 - E2E testing]: ****** AT CHAIN CODE : Sending Transaction Proposal info: [11:46:00.781 - E2E testing]: ***** AT CHain code: Recieving results

Amjadnz (Wed, 09 May 2018 08:06:43 GMT):
I have a peculiar issue with sendTransactionProposals I did three transaction calls on the same chaincode (And same method). `Call 1: Sending proposal time is taking as almost 500 milli seconds (ACCPETABLE)` ```info: [11:46:00.230 - E2E testing]: ****** AT CHAIN CODE : Sending Transaction Proposal info: [11:46:00.781 - E2E testing]: ***** AT CHain code: Recieving results```

Amjadnz (Wed, 09 May 2018 08:06:43 GMT):
I have a peculiar issue with sendTransactionProposals I did three transaction calls on the same chaincode (And same method). `Call 1: Sending proposal time is taking as almost 500 milli seconds (ACCPETABLE)` ```info: [11:46:00.230 - E2E testing]: ****** AT CHAIN CODE : Sending Transaction Proposal info: [11:46:00.781 - E2E testing]: ***** AT CHain code: Recieving results```

Amjadnz (Wed, 09 May 2018 08:08:18 GMT):
`Call 2: Sending proposal time is taking as almost 450 milli seconds (ACCPETABLE)` ``` info: [11:45:56.359 - E2E testing]: ****** AT CHAIN CODE : Sending Transaction Proposal info: [11:45:56.803 - E2E testing]: ***** AT CHain code: Recieving results ```

Amjadnz (Wed, 09 May 2018 08:08:18 GMT):
`Call 2: Sending proposal time is taking as almost 450 milli seconds (ACCPETABLE)` ``` info: [11:45:56.359 - E2E testing]: ****** AT CHAIN CODE : Sending Transaction Proposal info: [11:45:56.803 - E2E testing]: ***** AT CHain code: Recieving results ```

Amjadnz (Wed, 09 May 2018 08:09:37 GMT):
`Call 3: Sending proposal time is taking as almost 40 seconds (This is taking way too long)` ```info: [11:46:04.214 - E2E testing]: ****** AT CHAIN CODE : Sending Transaction Proposal info: [11:46:43.037 - E2E testing]: ***** AT CHain code: Recieving results ```

Amjadnz (Wed, 09 May 2018 08:10:30 GMT):
I've put logs with timing to find out the bottleneck with my performance issues - and noticed that sending the proposals to the PEERs and getting a response from them is taking most of the time.

Amjadnz (Wed, 09 May 2018 08:22:39 GMT):
Any background or clarification - can help me solve this performance item.

Legiit (Wed, 09 May 2018 08:30:26 GMT):
How does one send booleans/integers to chaincode through params? I get the message that only array of string-like parameters are allowed. I am a little confused as how to utilize other types and create complex models Another "problem" - how could we do a queryAllX when we use a UUID as index? It's hard to write/manage an index based off the blockchain

Amjadnz (Wed, 09 May 2018 08:39:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7nDwoQZZ8fasfH2oJ) - on further digging in I found the following logs in the COUCHDB is not finding the data in the Db till the after 40 seconds.

Amjadnz (Wed, 09 May 2018 08:39:49 GMT):
```{"log":"\u001b[36m2018-05-09 07:46:22.214 UTC [couchdb] handleRequest -\u003e DEBU 100ae\u001b[0m Couch DB Error:not_found, Status Code:404, Reason:missing\n" ,"stream":"stderr","time":"2018-05-09T07:46:22.215110533Z"} {"log":"\u001b[36m2018-05-09 07:46:22.214 UTC [couchdb] ReadDoc -\u003e DEBU 100af\u001b[0m Document not found (404), returning nil value instead of 404 error\n ","stream":"stderr","time":"2018-05-09T07:46:22.215143395Z"}```

Amjadnz (Wed, 09 May 2018 08:41:33 GMT):
Once the DATA is inserted i the COUCHDB (which is my state DB) - then it is confirming the proposals. Does anyone has any idea of troubleshooting or maybe in another forum can help?

Amjadnz (Wed, 09 May 2018 08:41:33 GMT):
Once the DATA is inserted in the COUCHDB (which is my state DB) - then it is confirming the proposals. Does anyone has any idea of troubleshooting or maybe in another forum can help?

pd93 (Wed, 09 May 2018 08:44:03 GMT):
@Amjadnz You could try opening Fauxton (the web interface for CouchDB). This will allow you to inspect the documents and run test queries. Looks like the document you're trying to fetch, does not exist @Legiit not sure that it's possible. You have to encode your variables as strings... Just like you would when entering args into a CLI... and then process/parse them in your chaincode

Amjadnz (Wed, 09 May 2018 08:45:25 GMT):
40 Seconds for a normal transaction is a major concern. The first 2 transactions are getting returned faster (in average of 300 milli)

pd93 (Wed, 09 May 2018 08:45:55 GMT):
It's taking 40 seconds because of the errors

Amjadnz (Wed, 09 May 2018 08:46:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=r4xDhawRx4wj8NqGg) @pd93 Thanks would check that

pd93 (Wed, 09 May 2018 08:47:13 GMT):
Also, sometimes if your CouchDB queries are slow.. it can be because you do not have any indexes in your database. Adding indexes can speed up queries that would usually have to search through many documents

Amjadnz (Wed, 09 May 2018 08:50:04 GMT):
Ok - fauxton has all the documents now so that is saved but after 40 secs. My doubt is going to the endorsing side of the proposals where the peers are taking time to endorse.

Amjadnz (Wed, 09 May 2018 08:50:04 GMT):
Ok - fauxton shows all the documents now so that is saved but after 40 secs. My doubt is going to the endorsing side of the proposals where the peers are taking time to endorse.

Legiit (Wed, 09 May 2018 08:50:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=r4xDhawRx4wj8NqGg) Thanks, I thought so :) How would you tackle the indexing issue? I'd like to use UUID's and avoid the struggle of managing indexes

Legiit (Wed, 09 May 2018 08:50:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=r4xDhawRx4wj8NqGg) Thanks, I thought so :) I look forward to parsing dates (If that's even possilbe) :joy: & How would you tackle the indexing issue? I'd like to use UUID's and avoid the struggle of managing indexes

Amjadnz (Wed, 09 May 2018 08:52:35 GMT):
And also my app side - is making 3 seperate calls - I guess if they can be put together in one call it might improve the overall performance (like getting the submitter details, certificate loading etc).

pd93 (Wed, 09 May 2018 09:09:43 GMT):
@Legiit I think it's worth spending the time to understand indexes. CouchDB is designed to use them and if you have large datasets (especially ones that need sorting), you're going to need indexes. Since v1.1, they're much easier to manage as Fabric will create them for you (from your `META-INF` folder) when installing your chaincode to a peer

pd93 (Wed, 09 May 2018 09:11:30 GMT):
Also, w.r.t parsing dates. If you're using Golang chaincode, you can use `time.Parse()` to get a date object from a string

bretharrison (Wed, 09 May 2018 11:16:55 GMT):
@davidkel Thanks, build team is working on the process and there should be fabric-client and fabric-ca-client v1.1.2 packages published hopefully today

victer (Wed, 09 May 2018 11:31:08 GMT):
Has joined the channel.

bh4rtp (Wed, 09 May 2018 11:39:28 GMT):
hi, when instantiating chaincode, i face this error: ```error: [Peer.js]: sendProposal - timed out after:200000 error: [Peer.js]: sendProposal - timed out after:200000 error: [Peer.js]: sendProposal - timed out after:200000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/home/allen/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-client/lib/Peer.js:90:20) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5) at Timer.listOnTimeout (timers.js:277:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT``` where is `200000` timeout set? i have set `fabric-sdk-node/fabric-client/config/default.json` request-timeout = 45000, why doesn't this value take effect?

Amjadnz (Wed, 09 May 2018 19:42:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aFNvMYo37DkYEmtQN) @bh4rtp - if you look at the e2e Samples - this time out is in the e2eUtils.js script file - while we are invoking requests.

Amjadnz (Wed, 09 May 2018 19:42:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aFNvMYo37DkYEmtQN) @bh4rtp - if you look at the e2e Samples - this time out is in the e2eUtils.js script file - while we are invoking requests. Atleast that is what I use to configure timeouts. If your issue is the exception it may not just be timeouts - may be something to do with TLS/CERTS/hostname issues as well.

bh4rtp (Thu, 10 May 2018 00:31:12 GMT):
@Amjadnz yes, i found it in `instantiate_chaincode.js` from `balance_transfer` example.

DarshanBc (Thu, 10 May 2018 04:05:50 GMT):
Hi In balance transfer example I can either generate the secret or set the secret i.e, password while enrolling after that I haven't used this secret in any operation. All the operations in balance transfer is carried out through jwt token generated by enrolling how can a login operation be performed can you explain

Amjadnz (Thu, 10 May 2018 05:14:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JWLgxX46A6mSRxtRY) @DarshanBc - how I've used the blockchain network is it has to be part of back-end computation and logs - we can see it as a typical replicated DB (with its own set of rules/chaincodes/concensus/endorsements). The user login/token mechanism are to be like MACHINE to MACHINE communications and is not analogous to HUMAN to MACHINE communication where a login is required time and again. So you manage the USER LOGIN on a seperate app with its own DB like (MongoDB) - authenticate it and then do the transactions with blockchain on the credentials obtained when enrolling (this enrolling is a one time stuff by the way). This is my thinking though.

DarshanBc (Thu, 10 May 2018 11:59:58 GMT):
@Amjadnz Yes I agree with you but I am just trying to figure out whats the purpose of having secret?and jwt token is obtained only if admin cert is accessible what incase its not accessible in that case what can be done

pd93 (Thu, 10 May 2018 12:07:35 GMT):
Anyone know why I might be getting this when calling `verifyProposalResponse()`? `Error: Parameter must be a ProposalResponse Object [2018-05-10 13:05:28] at Channel.verifyProposalResponse (/eqdlt/eq-trader/node_modules/fabric-client/lib/Channel.js:1795:10)`

pd93 (Thu, 10 May 2018 12:07:35 GMT):
Anyone know why I might be getting this when calling `verifyProposalResponse()`? ```Error: Parameter must be a ProposalResponse Object [2018-05-10 13:05:28] at Channel.verifyProposalResponse (/eqdlt/eq-trader/node_modules/fabric-client/lib/Channel.js:1795:10)```

pd93 (Thu, 10 May 2018 12:07:35 GMT):
Anyone know why I might be getting this when calling `verifyProposalResponse()`? ```Error: Parameter must be a ProposalResponse Object [2018-05-10 13:05:28] at Channel.verifyProposalResponse (...../node_modules/fabric-client/lib/Channel.js:1795:10)```

pd93 (Thu, 10 May 2018 12:07:35 GMT):
Anyone know why I might be getting this when calling `verifyProposalResponse()`? ```Error: Parameter must be a ProposalResponse Object [2018-05-10 13:05:28] at Channel.verifyProposalResponse (...../node_modules/fabric-client/lib/Channel.js:1795:10)``` My proposal response looks like this: ```{ Error: 2 UNKNOWN: chaincode error (status: 500, message: Test chaincode error) at new createStatusError (...../node_modules/grpc/src/client.js:64:15) at ...../node_modules/grpc/src/client.js:583:15 code: 2, metadata: [Object], details: 'chaincode error (status: 500, message: Test chaincode error' }``` Never seen the createStatusError before?

alvinzach (Thu, 10 May 2018 12:50:23 GMT):
Has joined the channel.

bretharrison (Thu, 10 May 2018 14:06:13 GMT):
@bh4rtp Check your send call, calls that make requests to the fabric network are allowed to pass a timeout.

bretharrison (Thu, 10 May 2018 14:09:19 GMT):
@pd93 what version of NodeSDK and fabric are you using ?

pd93 (Thu, 10 May 2018 14:09:46 GMT):
Fabric 1.1 Node SDK 1.1.2

pd93 (Thu, 10 May 2018 14:09:46 GMT):
@bretharrison Fabric 1.1 Node SDK 1.1.2

pd93 (Thu, 10 May 2018 14:12:24 GMT):
I discovered this error in my peer logs: `[endorser] ProcessProposal -> ERRO 4bbd [mych][ad57023c] simulateProposal() resulted in chaincode name:"mycc" response status 500 for txid: ad57023cea8b965af67884fdf692a4653de57c112e42b7729426b4fd51602b5a` and found a related JIRA: https://jira.hyperledger.org/browse/FAB-7018 Having spoken to @yacovm, It's been suggested that I try to build from master as it includes this change: https://gerrit.hyperledger.org/r/#/c/15737/ But any further input from you would be welcome

balakrishna.devasani (Thu, 10 May 2018 17:47:29 GMT):

Clipboard - May 10, 2018 11:17 PM

balakrishna.devasani (Thu, 10 May 2018 17:47:29 GMT):

Clipboard - May 10, 2018 11:17 PM

balakrishna.devasani (Thu, 10 May 2018 17:47:33 GMT):
Hi Team, I using fabric-node-sdk version 1.1.0 against the chaincode version 1.0.0. Facing error while listening for chaincode events.

prmdmshra (Fri, 11 May 2018 10:10:31 GMT):
Could you please help me proceed with the Node SDK of JS I have run the the test in https://github.com/hyperledger/fabric-sdk-node I want to use the query methods to query for the BlockNumber, Hash, Etc on the deployed network

kennethcarpenterdltlabs (Fri, 11 May 2018 15:51:21 GMT):
Has joined the channel.

kennethcarpenterdltlabs (Fri, 11 May 2018 15:53:32 GMT):
Hi #fabric-sdk-node. I have a question about the license status of a fabric-ca-client dependency, SJCL. It doesn't seem to be Apache-2.0 and its license says "We suggest that you consult legal counsel before using SJCL in a commercial project." Is anyone expressing/looking into concerns about this or similar license situations?

bretharrison (Fri, 11 May 2018 20:16:13 GMT):
@prmdmshra see https://github.com/hyperledger/fabric-sdk-node/blob/8ae4d5b2f97e75e6dd28041dee002523e4c5ee06/test/integration/query.js#L299

bretharrison (Fri, 11 May 2018 20:17:25 GMT):
@balakrishna.devasani Check the version you are running on the fabric peer, looks like you have 1.1 on the NodeSDK and 1.0 on the peer

tallharish (Fri, 11 May 2018 22:03:46 GMT):
In order to speedup the client performance for endorsement policies like `OR(Org1, Org2, ...)`, I was wondering if the Client could sendTransaction after receiving the first proposal response? In code for `client-utils.js/`, function: `module.exports.sendPeersProposal` I see that client is waiting for response from all peers (or till timeout) before returning back. Based on the current Fabric design, would this approach make sense?

tallharish (Fri, 11 May 2018 22:03:46 GMT):
In order to speedup the client performance for endorsement policies like `OR(Org1, Org2, ...)`, I was wondering if the Client could sendTransaction after receiving the first proposal response? In code for `client-utils.js/`, function: `module.exports.sendPeersProposal` I see that client is waiting for response (or reject) from all peers (using settle) before returning back. Based on the current Fabric design, would this approach make sense?

tallharish (Fri, 11 May 2018 22:03:46 GMT):
In order to speedup the client performance for endorsement policies like `OR(Org1, Org2, ...)`, I was wondering if the Client could sendTransaction after receiving the first proposal response? In code for `client-utils.js/`, function: `module.exports.sendPeersProposal` I see that client is waiting for response (or reject) from all peers (using `settle`) before returning back. Based on the current Fabric design, would this approach make sense?

balakrishna.devasani (Sat, 12 May 2018 08:26:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jFAPtCqiwxR4hHETX) @bretharrison Yes, my node app is running on fabric-v1.1 and my blockhain/chaincode network is running on fabric-v1.0

balakrishna.devasani (Sat, 12 May 2018 08:26:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jFAPtCqiwxR4hHETX) @bretharrison Yes, my node app is running on fabric-v1.1 and my blockhain/chaincode network is running on fabric-v1.0. Can we listen for chaincode events from node app using the above mentioned configuration ?

caveman7 (Sat, 12 May 2018 09:59:41 GMT):
Has joined the channel.

caveman7 (Sat, 12 May 2018 10:01:15 GMT):
hi guys, how can I decode ProposalResponseObject? i posted in https://stackoverflow.com/questions/50302835/how-to-decode-proposalresponsepayload-in-fabric-sdk-node

bretharrison (Sat, 12 May 2018 10:45:51 GMT):
@balakrishna.devasani Yes , but you must use the `EventHub` not the `ChannelEventHub`, be sure to use methods like 'client.newEventHub()' or `client.getEventHub()` when using a connection profile.

bretharrison (Sat, 12 May 2018 10:45:51 GMT):
@balakrishna.devasani Yes , but you must use the `EventHub` not the `ChannelEventHub`, be sure to use methods like `client.newEventHub()` or `client.getEventHub()` when using a connection profile.

bretharrison (Sat, 12 May 2018 10:45:51 GMT):
@balakrishna.devasani Yes , but you must use the `EventHub` not the `ChannelEventHub` for V1.0, be sure to use methods like `client.newEventHub()` or `client.getEventHub()` when using a connection profile. --- I would recommend using ChannelEventHub with 1.1 and beyond as it offers more features, like replay (able to start listening from a specific block)

kai_den (Mon, 14 May 2018 09:01:41 GMT):
Hi all, I have one question about registerBlockEvent() . I execute registerBlockEvent function in node-sdk's invoke-transaction.js file. I was expecting to get one block data. However, two pieces of data were output in the log. Is there anyone who understands this reason?

kai_den (Mon, 14 May 2018 09:11:27 GMT):

invoke-transaction.js_1.png

kai_den (Mon, 14 May 2018 09:11:45 GMT):

invoke-transaction.js_2.png

kai_den (Mon, 14 May 2018 09:13:06 GMT):

sdkLog.png

jrosmith (Mon, 14 May 2018 17:41:06 GMT):
@kai_den your code is calling `getChannelEventHubsForOrg` and then registering a block event handler for each. each peer has its own eventhub and each eventhub is listening for the block event

jrosmith (Mon, 14 May 2018 17:41:31 GMT):
when each it peer gets the block event it send out the event to each of its listeners. im assuming you have two peers, hence two logs.

kennethcarpenterdltlabs (Mon, 14 May 2018 19:05:36 GMT):
Does anyone know a Hyperledger contact for open-source license related questions? I'm trying to find out the thinking around including module SJCL.

jrosmith (Mon, 14 May 2018 19:11:50 GMT):
@kennethcarpenterdltlabs theres a blurb on the wiki about licensing: https://wiki.hyperledger.org/community/copyright-and-license-policy beyond that maybe try asking in #fabric-documentation ?

dannongruver (Tue, 15 May 2018 00:10:57 GMT):
Has joined the channel.

dannongruver (Tue, 15 May 2018 00:11:05 GMT):
Hi All,

dannongruver (Tue, 15 May 2018 00:12:40 GMT):
Has anyone successfully upgraded a node chaincode? When running the peer chaincode upgrade the command hangs for over 10 mins the gives a timeout error. When running again it returns an error stating that the chaincode is waiting “registration”.

Katiyman (Tue, 15 May 2018 06:04:05 GMT):
Has joined the channel.

Katiyman (Tue, 15 May 2018 06:04:14 GMT):
Hello All I am getting below error in my node js code from nodesdk like sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Failed to execute transaction (Error sending TRANSACTION: txid:bab3109e61820a8dcc260d08b3b416b9a3e1f7680aa718e05040a1c21c92cbae exists) I see similar issue at: https://jira.hyperledger.org/browse/FAB-1486 Any pointers for this will be very helpful. TIA

Luxii (Tue, 15 May 2018 06:44:17 GMT):
Hey , Is it possible for one invoke transaction to emit multiple chaincode events ? I have 4 different events in my invoke method but at the event listener in SDK I get only last event emitted.

caveman7 (Tue, 15 May 2018 11:38:11 GMT):
hi guys, how do i use fabric-sdk-node to enroll a user with privilege to install and instantiate chaincode? refer to the question here: https://stackoverflow.com/questions/50349239/fabric-sdk-node-enroll-organization-admin

bretharrison (Tue, 15 May 2018 15:26:08 GMT):
@Luxii currently only one chaincode event is allowed ... the last one you set

bretharrison (Tue, 15 May 2018 15:30:17 GMT):
@Katiyman be sure to get a new transaction object for each endorsement proposal (see https://fabric-sdk-node.github.io/Client.html#newTransactionID__anchor), which will have both a new transaction ID (which is based off the user identity) and a new nonce value.

bretharrison (Tue, 15 May 2018 15:41:02 GMT):
@caveman7 see http://hyperledger-fabric.readthedocs.io/en/release-1.1/membership/membership.html to get an understanding of the MSP, also relates to the policies http://hyperledger-fabric.readthedocs.io/en/release-1.1/policies.html?highlight=policies and then using the enroll https://fabric-sdk-node.github.io/FabricCAClient.html#enroll__anchor. Using `cryptogen` http://hyperledger-fabric.readthedocs.io/en/release-1.1/commands/cryptogen-commands.html will create the key and cert needed that may be assigned to the `Client` https://fabric-sdk-node.github.io/Client.html#setAdminSigningIdentity__anchor or as an usercontext https://fabric-sdk-node.github.io/Client.html#setUserContext__anchor

bretharrison (Tue, 15 May 2018 15:42:27 GMT):
@dannongruver You may wish to post your question to the #fabric-peer-endorser-committer channel

bretharrison (Tue, 15 May 2018 15:46:26 GMT):
@kennethcarpenterdltlabs You may wish to discuss with `cbf` Chris Ferris

dannongruver (Tue, 15 May 2018 15:49:00 GMT):
@bretharrison The network is able to commit transactions to ledger. Are updating chaincode from one version to another and this “registration” error considered a commiter issue?

dannongruver (Tue, 15 May 2018 15:49:29 GMT):
@bretharrison (and thank you for your help)

bretharrison (Tue, 15 May 2018 16:02:48 GMT):
@caveman7 The `ProposalResponseObject` is just an array with the two items, first item an array of all the responses from the endorsing peers, and the second item is the original proposal needed when sending the transaction to the orderer to be committed. It is a bit of code to fully decode each of these objects. See the `BlockDecoder` for how we decode a block to see how you would attack decoding these two types of grpc objects. Decoding involves looking at the protobuf files in `lib/protos`. If may wish to open a JIRA to have the SDK provide a utility to help with this.

bretharrison (Tue, 15 May 2018 16:23:26 GMT):
@dannongruver I do not know that the error means, seems like an issue not with the SDK, but on the peer side.

bretharrison (Tue, 15 May 2018 16:23:26 GMT):
@dannongruver I do not know what that the error means, seems like an issue not with the SDK, but on the peer side.

bretharrison (Tue, 15 May 2018 16:23:26 GMT):
@dannongruver I do not know what that error means, seems like an issue not with the SDK, but on the peer side.

ChrisFowers (Tue, 15 May 2018 19:30:00 GMT):
Has joined the channel.

ChrisFowers (Tue, 15 May 2018 19:30:25 GMT):
Hello channel. I'm having an issue with the connecting to the fabric network using the SDK on a distributed network we have. I was going to ask this on #fabric-sdk but that channel appears to be dead and everyone there is left unanswered. So perhaps someone can point me in the right direction. When attempting to connect to the network using the SDK I get the following: ``` E0515 18:01:40.250557319 1 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. Failed to receive the block event ::Error: 14 UNAVAILABLE: Connect Failed { Error: 14 UNAVAILABLE: Connect Failed at createStatusError (/usr/src/app/node_modules/grpc/src/client.js:64:15) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/client.js:270:19) at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/client.js:236:8) at readCallback (/usr/src/app/node_modules/grpc/src/client.js:296:12) code: 14, metadata: Metadata { _internal_repr: {} }, details: 'Connect Failed' } Failed to receive the chaincode event ::Error: 14 UNAVAILABLE: Connect Failed { Error: 14 UNAVAILABLE: Connect Failed at createStatusError (/usr/src/app/node_modules/grpc/src/client.js:64:15) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/client.js:270:19) at ClientDuplexStream._readsDone (/usr/src/app/node_modules/grpc/src/client.js:236:8) at readCallback (/usr/src/app/node_modules/grpc/src/client.js:296:12) code: 14, metadata: Metadata { _internal_repr: {} }, details: 'Connect Failed' } ``` We have TLS enabled on both CA's We have disabled verification as well

ChrisFowers (Tue, 15 May 2018 19:30:51 GMT):
I'm new to a lot of this. I've been making progress at learning here. But it's safe to assume that the obvious is my issue

jrosmith (Tue, 15 May 2018 19:32:49 GMT):
@ChrisFowers the `14 UNAVAILABLE` is actually a grpc error code that is being returned to your client. i would double check and make sure you are using the proper cert for the peer ip you are pointed to, as ssl seems to be

jrosmith (Tue, 15 May 2018 19:32:49 GMT):
@ChrisFowers the `14 UNAVAILABLE` is actually a grpc error code that is being returned to your client. i would double check and make sure you are using the proper cert for the peer ip you are pointed to, as ssl seems to be upset with your connection attemps

jrosmith (Tue, 15 May 2018 19:33:21 GMT):
if you disable tls and still get these errors, you are most likely not pointing to the right peer ip

ChrisFowers (Tue, 15 May 2018 19:33:24 GMT):
Thank you. That makes a lot of sense. Gives me a point to jump from. Will let you know how it goes.

jrosmith (Tue, 15 May 2018 19:34:41 GMT):
also, to my knowledge #fabric-sdk is a dead channel and all fabric sdk's have their own respective channel. @rjones would know best

rjones (Tue, 15 May 2018 19:34:41 GMT):
Has joined the channel.

ChrisFowers (Tue, 15 May 2018 19:37:18 GMT):
Right on

rjones (Tue, 15 May 2018 19:37:22 GMT):
@jrosmith that is correct. The former fabric-sdk project is dead, as well, existing only in archived state

ChrisFowers (Tue, 15 May 2018 19:38:22 GMT):
So my real confusion is if TLS verification is disabled. And we've been able to use these certs elsewhere just fine (on all the respective peers for chaincode deployment and other interactions) why are we seeing a TLS verification error?

ChrisFowers (Tue, 15 May 2018 19:38:55 GMT):
Is this something I've configured wrong on the SDK config?

jrosmith (Tue, 15 May 2018 19:45:54 GMT):
@ChrisFowers have you disabled tls and still trying to connect using the certs? if the grpc server (peer) is expecting insecure connections and the grpc client (sdk) tries to connect with a secure connection it will throw a tls error. though based on the specific ssl error it looks like tls is enabled. have you checked the peer logs?

ChrisFowers (Tue, 15 May 2018 19:47:30 GMT):
Will do. Thank you

ChrisFowers (Tue, 15 May 2018 20:03:54 GMT):
Don't laugh... lol but this one really got me.

ChrisFowers (Tue, 15 May 2018 20:04:02 GMT):
I checked the logs for the peer in question

ChrisFowers (Tue, 15 May 2018 20:04:06 GMT):
```error: transaction returned with failure: Error: The current identity, with the name 'admin' and the identifier 'aa216b3767bf4e9a1e2e29ee43fe36a7fe188c0182ae501ddc8976a06c7765e1', must be activated (ACTIVATION_REQUIRED)```

ChrisFowers (Tue, 15 May 2018 20:04:13 GMT):
came across that gem.

ChrisFowers (Tue, 15 May 2018 20:04:30 GMT):
Funny thing is. In building our network annnnnnd deploying our chaincode.

ChrisFowers (Tue, 15 May 2018 20:04:30 GMT):
Funny thing is. In building our network annnnnnd deploying our chaincode, that is the identity we've been using

ChrisFowers (Tue, 15 May 2018 20:05:03 GMT):
And given the time stamps this looks to be at the heart of my problems

ChrisFowers (Tue, 15 May 2018 20:05:26 GMT):
So the plot seems to be thickening

jrosmith (Tue, 15 May 2018 20:06:25 GMT):
indeed it does, and i actually have not seen that error before so i don't know how much help i will be in debugging. but if theres an issue with identities on the peers #fabric-peer-endorser-committer will be a good source of information

vsadriano (Tue, 15 May 2018 20:17:46 GMT):
Has joined the channel.

davidkel (Tue, 15 May 2018 20:22:09 GMT):
@ChrisFowers That message comes from the Hyperledger Composer runtime when an identity is registered to the composer runtime and it needs to be activated. Composer activates this identity in the runtime automatically when required.

caveman7 (Tue, 15 May 2018 23:54:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4jGHpRJDde2W3Q97o) @bretharrison it seems to me that the privileged user needs to be "baked in" into the configuration itself and cannot be registered from sdk. is this correct?

caveman7 (Tue, 15 May 2018 23:54:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4jGHpRJDde2W3Q97o) @bretharrison 1) it seems to me that the privileged user needs to be "baked in" into the configuration itself and cannot be registered from sdk. is this correct? 2) in which file the policy is defined? referring to fabric-samples, do i need to put the policy in configtx.yaml? if yes, in which section? the documentation explains policy but it does not show an example.

Ryan2 (Wed, 16 May 2018 02:23:56 GMT):
I have nodejs http api connected to blockchain network, when load testing on API, nodejs down with the error *node_modules/fabric-client/lib/EventHub.js:411 event.setCreator(user.getIdentity().serialize()); TypeError: Cannot read property 'getIdentity' of null* can I ask is this error caused by fabric-client sdk? Or how to overcome this? Thanks

Ryan2 (Wed, 16 May 2018 02:23:56 GMT):
I have nodejs http api connected to blockchain network, when load testing on API, nodejs down with the error `node_modules/fabric-client/lib/EventHub.js:411 event.setCreator(user.getIdentity().serialize()); TypeError: Cannot read property 'getIdentity' of null ` can I ask is this error caused by fabric-client sdk? Or how to overcome this? Thanks

Ryan2 (Wed, 16 May 2018 02:23:56 GMT):
I have nodejs http api connected to blockchain network, when load testing on API, nodejs down with the error `node_modules/fabric-client/lib/EventHub.js:411` ` event.setCreator(user.getIdentity().serialize());` `TypeError: Cannot read property 'getIdentity' of null ` can I ask is this error caused by fabric-client sdk? Or how to overcome this? Thanks

Ryan2 (Wed, 16 May 2018 02:23:56 GMT):
I have nodejs http api connected to blockchain network, when load testing on API, nodejs down with the error `node_modules/fabric-client/lib/EventHub.js:411` ` event.setCreator(user.getIdentity().serialize());` `TypeError: Cannot read property 'getIdentity' of null ` can I ask is this error caused by fabric-client sdk? Or how to overcome this? Thanks full log here : https://hastebin.com/dakomaxube.rb

Ryan2 (Wed, 16 May 2018 02:31:02 GMT):
I have nodejs http api connected to blockchain network, when load testing on API, nodejs down with the error `node_modules/fabric-client/lib/EventHub.js:411` ` event.setCreator(user.getIdentity().serialize());` `TypeError: Cannot read property 'getIdentity' of null ` can I ask is this error caused by fabric-client sdk? Or how to overcome this? Thanks full log here: https://hastebin.com/cukoyobebu.rb

Katiyman (Wed, 16 May 2018 06:17:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fBtB9BJfaboKemjMv) @bretharrison Thank you i am using the api like below var transaction_id = client.newTransactionID(); console.log("Assigning transaction_id: ", transaction_id._transaction_id); Is this wrong kindly comment .. TIA

vsadriano (Wed, 16 May 2018 10:26:33 GMT):
Hi! I'm trying to integrate the REST API with my fabric network following the [balance transfer example](https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer/) and I'm getting the error bellow: ```shell [2018-05-15 15:36:26.436] [ERROR] Helper - Failed to get registered user: Teste with error: Error: Enrollment failed with errors [[{"code":19,"message":"CA 'my-ca' does not exist"}]] ``` My `network-config.yaml`: ```yaml ... organizations: Org1: mspid: org1MSP peers: - peer0 certificateAuthorities: - my-ca adminPrivateKey: path: $PATH_TO_KEYSTORE signedCert: path: $PATH_TO_SIGNED_CERTS ... certificateAuthorities: my-ca: httpOptions: verify: false tlsCACerts: path: $PATH_TO_CA_CERT ... ```

ChrisFowers (Wed, 16 May 2018 12:56:36 GMT):
Hmmm. Seems like we aren't getting this error when attempting to use the same credentials on our local environments though. Following a similar process on our remote and distributed network is the only time we are seeing this. Do you know what might cause this difference between the two environments @davidkel?

ChrisFowers (Wed, 16 May 2018 12:56:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NkB6NL59CxfnXpW2A) ^

ChrisFowers (Wed, 16 May 2018 12:56:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NkB6NL59CxfnXpW2A) ^

ChrisFowers (Wed, 16 May 2018 12:56:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NkB6NL59CxfnXpW2A) ^

ChrisFowers (Wed, 16 May 2018 12:56:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NkB6NL59CxfnXpW2A)

ChrisFowers (Wed, 16 May 2018 12:56:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NkB6NL59CxfnXpW2A) We don't see these errors on our local environments containers. We are only seeing it on our remote and distributed environment. Do you know of common reasons why we might see the differences like this between the two environments @davidkel? Seems to me they are matching in almost every other way other than one is all running on docker containers local to my machine and the other network is distributed on a docker swarm.

SebastianMartinez (Wed, 16 May 2018 15:46:15 GMT):
Has joined the channel.

ChrisFowers (Wed, 16 May 2018 19:56:34 GMT):
So her's what I've found. When I run the project from a cloned directory on the server, and map to the certs, we run fine. Everything works.

ChrisFowers (Wed, 16 May 2018 19:57:19 GMT):
When I run the exact same build in a docker container, thats when we get the tsl verification errors. I've triple checked certs to ensure we are using the correct ones

ChrisFowers (Wed, 16 May 2018 19:57:41 GMT):
I don't understand what might be different between the two environments.

ChrisFowers (Wed, 16 May 2018 19:58:11 GMT):
Since I'm just mounting the same cert directory and using the same config (just changing part of the path to ensure I'm loading the config files properly

kai_den (Thu, 17 May 2018 01:36:16 GMT):
@jrosmith thank you for repay! As you said, I have two peer nodes in my channel ! I have not understood yet. I think that one block of data will be acquired, but two pieces of data are output in the log. The small number block data is created at the time of the previous execution. Why block data created before is output. The block registration event has already acquired. I use invocation with curl command only once... Sorry to bother you again.

KevinBai (Thu, 17 May 2018 09:25:14 GMT):
why receive error: TCP Read failed when call sendTransactionProposal after not send for long time

pankajcheema (Thu, 17 May 2018 09:50:07 GMT):
Hi experts, I found an issue with node.js sdk. Please look into that https://stackoverflow.com/questions/50388373/hyperledger-fabric-2-peers-of-same-organisation-causing-issue-with-chaincode-and

bretharrison (Thu, 17 May 2018 11:18:25 GMT):
@pankajcheema All endorsements must be the same to be committed.

bretharrison (Thu, 17 May 2018 11:21:35 GMT):
@kai_den All block event listeners will get the new block, each will be notified when a new block has been added to the ledger.

bretharrison (Thu, 17 May 2018 11:24:34 GMT):
@ChrisFowers Maybe the `ssl-target-name-override` setting ?

bretharrison (Thu, 17 May 2018 11:33:45 GMT):
@Katiyman The code snippet looks correct. What version of code are you using. [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fBtB9BJfaboKemjMv) @bretharrison Thank you i am using the api like below var transaction_id = client.newTransactionID(); console.log("Assigning transaction_id: ", transaction_id._transaction_id); Is this wrong kindly comment .. TIA

ChrisFowers (Thu, 17 May 2018 16:54:12 GMT):
So what do you suggest for the `ssl-target-name-override`? Here is what I'm working with: ``` peer0.arrayofblocks.blockarray.cloud: url: grpcs://oceantest001.blockarray.cloud:7051 eventUrl: grpcs://oceantest001.blockarray.cloud:7053 grpcOptions: ssl-target-name-override: peer0.arrayofblocks.blockarray.cloud grpc.keepalive_time_ms: 600000 tlsCACerts: path: ../fabric-samples/first-network/crypto-config/peerOrganizations/arrayofblocks.blockarray.cloud/peers/peer0.arrayofblocks.blockarray.cloud/tls/ca.crt ```

ChrisFowers (Thu, 17 May 2018 16:54:12 GMT):
So what do you suggest for the `ssl-target-name-override`? Here is what I'm working with: ``` peer0.org1.domain.cloud: url: grpcs://host001.domain.cloud:7051 eventUrl: grpcs://host001.domain.cloud:7053 grpcOptions: ssl-target-name-override: peer0.org1.domain.cloud grpc.keepalive_time_ms: 600000 tlsCACerts: path: ../fabric-samples/first-network/crypto-config/peerOrganizations/org1.domain.cloud/peers/peer0.org1.domain.cloud/tls/ca.crt ```

ChrisFowers (Thu, 17 May 2018 16:57:02 GMT):
The confusion is the lack of TLS verification failure when running on an ubuntu host. When running from a docker container with the same config and certs (using a mounted volume and adjust path in the config), we get that TLS verify failed error

ChrisFowers (Thu, 17 May 2018 16:57:27 GMT):
We've maintained the cert directory structure and simply just updated the root portion of the path

ChrisFowers (Thu, 17 May 2018 16:57:39 GMT):
And certs are found by the SDK so that is not my concern

ChrisFowers (Thu, 17 May 2018 16:58:26 GMT):
I know certs are working outside of the container. I'm just trying to understand why if nothing else appears different why we have the difference. I've also tried on other machines that are not part of our swarm just to rule that out.

ChrisFowers (Thu, 17 May 2018 19:35:35 GMT):
Found the issue

ChrisFowers (Thu, 17 May 2018 19:35:47 GMT):
Latest node was the problem Rolling back to Node 8 seems to work

chandrakanthm (Fri, 18 May 2018 01:51:12 GMT):
When we enroll a user with CA, a secret/password is returned. How can we use this secret and username to authenticate a user in node SDK

chandrakanthm (Fri, 18 May 2018 01:51:12 GMT):
When we enroll a user with CA, a token is returned. but how can we use a passphrase and username to authenticate a user in node SDK

tronglx (Fri, 18 May 2018 01:55:15 GMT):
Has joined the channel.

lucienlu (Fri, 18 May 2018 02:32:04 GMT):
Has joined the channel.

chenshiok (Fri, 18 May 2018 03:08:22 GMT):
Has joined the channel.

wangdong (Fri, 18 May 2018 09:35:31 GMT):
I got a question, what is the relationship between the sdk version and the fabric?

wangdong (Fri, 18 May 2018 09:36:05 GMT):
If I use fabric 1.0.5 for the network but node-sdk 1.1.0 it is OK?

wangdong (Fri, 18 May 2018 09:36:53 GMT):
Why I ask this is I got a problem regarding the eventhub. Just make sure of this.

vsadriano (Fri, 18 May 2018 13:14:33 GMT):
Hi! When I send a single request for register/enroll an user for one the organizations I can see the same request going to both CA in the logs. ```shell # Request curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' ``` ```shell # Org1 # CAName:my-ca1 # CA1 logs 2018/05/18 12:32:54 [DEBUG] DB: Login user admin with max enrollments of -1 and state of 0 2018/05/18 12:32:54 [DEBUG] DB: identity admin successfully logged in 2018/05/18 12:32:54 [DEBUG] Processing sign request: id=admin, CommonName=admin, Subject= 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] Checking CSR fields to make sure that they do not exceed maximum character limits 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] DB: Insert Certificate 2018/05/18 12:32:54 [DEBUG] Saved serial number as hex 18741e09ce941915d071d1f3ce9bce80d469d52b 2018/05/18 12:32:54 [DEBUG] Successfully incremented state for identity admin to 1 2018/05/18 12:32:54 [INFO] 10.79.79.0:48312 POST /api/v1/enroll 201 0 "OK" ``` ```shell # Org2 # CAName:my-ca2 # CA2 logs 2018/05/18 12:32:54 [DEBUG] Received request for /api/v1/register 2018/05/18 12:32:54 [DEBUG] Received registration request from : { Name:Jim Type: Secret:**** MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:my-ca1 } 2018/05/18 12:32:54 [INFO] 10.79.79.0:53696 POST /api/v1/register 404 19 "CA 'ca.tesouro.serpro' does not exist" ``` Can anybody help me? Because I don't understand the why of this behavior.

vsadriano (Fri, 18 May 2018 13:14:33 GMT):
Hi! When I send a single request for register/enroll an user for one the organizations I can see the same request going to both CA in the logs. ```shell # Request curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' ``` ```shell # Org1 # CAName:my-ca1 # CA1 logs 2018/05/18 12:32:54 [DEBUG] DB: Login user admin with max enrollments of -1 and state of 0 2018/05/18 12:32:54 [DEBUG] DB: identity admin successfully logged in 2018/05/18 12:32:54 [DEBUG] Processing sign request: id=admin, CommonName=admin, Subject= 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] Checking CSR fields to make sure that they do not exceed maximum character limits 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] DB: Insert Certificate 2018/05/18 12:32:54 [DEBUG] Saved serial number as hex 18741e09ce941915d071d1f3ce9bce80d469d52b 2018/05/18 12:32:54 [DEBUG] Successfully incremented state for identity admin to 1 2018/05/18 12:32:54 [INFO] 10.79.79.0:48312 POST /api/v1/enroll 201 0 "OK" ``` ```shell # Org2 # CAName:my-ca2 # CA2 logs 2018/05/18 12:32:54 [DEBUG] Received request for /api/v1/register 2018/05/18 12:32:54 [DEBUG] Received registration request from : { Name:Jim Type: Secret:**** MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:my-ca1 } 2018/05/18 12:32:54 [INFO] 10.79.79.0:53696 POST /api/v1/register 404 19 "CA 'my-ca1' does not exist" ``` Can anybody help me? Because I don't understand the why of this behavior.

vsadriano (Fri, 18 May 2018 13:14:33 GMT):
Hi! When I send a single request for register/enroll an user for one the organizations I can see the same request going to both CA in the logs. ```shell # Request curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' ``` ```shell # Org1 # CAName:my-ca1 # CA1 logs 2018/05/18 12:32:54 [DEBUG] DB: Login user admin with max enrollments of -1 and state of 0 2018/05/18 12:32:54 [DEBUG] DB: identity admin successfully logged in 2018/05/18 12:32:54 [DEBUG] Processing sign request: id=admin, CommonName=admin, Subject= 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] Checking CSR fields to make sure that they do not exceed maximum character limits 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] DB: Insert Certificate 2018/05/18 12:32:54 [DEBUG] Saved serial number as hex 18741e09ce941915d071d1f3ce9bce80d469d52b 2018/05/18 12:32:54 [DEBUG] Successfully incremented state for identity admin to 1 2018/05/18 12:32:54 [INFO] 10.79.79.0:48312 POST /api/v1/enroll 201 0 "OK" ``` ```shell # Org2 # CAName:my-ca2 # CA2 logs 2018/05/18 12:32:54 [DEBUG] Received request for /api/v1/register 2018/05/18 12:32:54 [DEBUG] Received registration request from : { Name:Jim Type: Secret:**** MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:my-ca1 } 2018/05/18 12:32:54 [INFO] 10.79.79.0:53696 POST /api/v1/register 404 19 "CA 'my-ca1' does not exist" ``` Can anybody help me? Because I don't understand the why of this behavior.

vsadriano (Fri, 18 May 2018 13:14:33 GMT):
Hi! When I send a single request for register/enroll an user for one the organizations I can see the same request going to both CA in the logs. ```shell # Request curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' ``` ```shell # App logs [2018-05-18 09:32:54.878] [ERROR] Helper - Failed to get registered user: Jim with error: Error: fabric-ca request register failed with errors [[{"code":19,"message":"CA 'my-ca1' does not exist"}]] ``` ```shell # Org1 # CAName:my-ca1 # CA1 logs 2018/05/18 12:32:54 [DEBUG] DB: Login user admin with max enrollments of -1 and state of 0 2018/05/18 12:32:54 [DEBUG] DB: identity admin successfully logged in 2018/05/18 12:32:54 [DEBUG] Processing sign request: id=admin, CommonName=admin, Subject= 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] Checking CSR fields to make sure that they do not exceed maximum character limits 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] DB: Insert Certificate 2018/05/18 12:32:54 [DEBUG] Saved serial number as hex 18741e09ce941915d071d1f3ce9bce80d469d52b 2018/05/18 12:32:54 [DEBUG] Successfully incremented state for identity admin to 1 2018/05/18 12:32:54 [INFO] 10.79.79.0:48312 POST /api/v1/enroll 201 0 "OK" ``` ```shell # Org2 # CAName:my-ca2 # CA2 logs 2018/05/18 12:32:54 [DEBUG] Received request for /api/v1/register 2018/05/18 12:32:54 [DEBUG] Received registration request from : { Name:Jim Type: Secret:**** MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:my-ca1 } 2018/05/18 12:32:54 [INFO] 10.79.79.0:53696 POST /api/v1/register 404 19 "CA 'my-ca1' does not exist" ``` Can anybody help me? Because I don't understand the why of this behavior.

vsadriano (Fri, 18 May 2018 13:14:33 GMT):
Hi! When I send a single request for register/enroll an user for one of the organizations I can see the same request going to both CA in the logs. ```shell # Request curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' ``` ```shell # App logs [2018-05-18 09:32:54.878] [ERROR] Helper - Failed to get registered user: Jim with error: Error: fabric-ca request register failed with errors [[{"code":19,"message":"CA 'my-ca1' does not exist"}]] ``` ```shell # Org1 # CAName:my-ca1 # CA1 logs 2018/05/18 12:32:54 [DEBUG] DB: Login user admin with max enrollments of -1 and state of 0 2018/05/18 12:32:54 [DEBUG] DB: identity admin successfully logged in 2018/05/18 12:32:54 [DEBUG] Processing sign request: id=admin, CommonName=admin, Subject= 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] Checking CSR fields to make sure that they do not exceed maximum character limits 2018/05/18 12:32:54 [DEBUG] DB: Getting identity admin 2018/05/18 12:32:54 [DEBUG] DB: Insert Certificate 2018/05/18 12:32:54 [DEBUG] Saved serial number as hex 18741e09ce941915d071d1f3ce9bce80d469d52b 2018/05/18 12:32:54 [DEBUG] Successfully incremented state for identity admin to 1 2018/05/18 12:32:54 [INFO] 10.79.79.0:48312 POST /api/v1/enroll 201 0 "OK" ``` ```shell # Org2 # CAName:my-ca2 # CA2 logs 2018/05/18 12:32:54 [DEBUG] Received request for /api/v1/register 2018/05/18 12:32:54 [DEBUG] Received registration request from : { Name:Jim Type: Secret:**** MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:my-ca1 } 2018/05/18 12:32:54 [INFO] 10.79.79.0:53696 POST /api/v1/register 404 19 "CA 'my-ca1' does not exist" ``` Can anybody help me? Because I don't understand the why of this behavior.

bretharrison (Fri, 18 May 2018 14:06:35 GMT):
@wangdong Best to keep the first two digits the same, this will line up the functionality ... NodeSDK 1.1.x with Fabric 1.1.x

bretharrison (Fri, 18 May 2018 14:13:27 GMT):
@chandrakanthm There is no 'authenticate' in the NodeSDK, however the application that is written with the NodeSDK most likely will have an authenticate process. The Fabric network does require that all requests be signed which requires the NodeSDK to have credentials available. The application most likely will authenticate the user and then make calls to the NodeSDK to make the credentials of that user available to the NodeSDK for the signing.

wangdong (Fri, 18 May 2018 14:14:24 GMT):
yes, after I review the Error. The event hub always disconnects, without obvious cause. I guess it may be the version compatibility issue.

bretharrison (Fri, 18 May 2018 14:15:14 GMT):
NodeSDK development and test is working with Node 8.9.4

bretharrison (Fri, 18 May 2018 14:16:52 GMT):
NodeSDK 1.1 has ChannelEventHubs, Fabric 1.0 does not

bretharrison (Fri, 18 May 2018 14:16:52 GMT):
NodeSDK 1.1 has ChannelEventHubs and EventHubs Fabric 1.0 only has EventHubs

bretharrison (Fri, 18 May 2018 14:16:52 GMT):
NodeSDK 1.1 has ChannelEventHubs and EventHubs, Fabric 1.0 only has EventHubs

DongSuIBM (Sat, 19 May 2018 03:29:30 GMT):
Hello channel, can someone tell me how to get the transaction ID of the latest transaction in the ledger by using the Fabric NodeJS SDK? Thanks

mastersingh24 (Sat, 19 May 2018 14:00:57 GMT):
@DongSuIBM https://fabric-sdk-node.github.io/Channel.html#queryInfo__anchor to get the block height https://fabric-sdk-node.github.io/Channel.html#queryBlock__anchor to get the latest block (pass in block height - 1) https://fabric-sdk-node.github.io/global.html#Block - parse the last data element to get the last transaction id

DongSuIBM (Sat, 19 May 2018 14:03:01 GMT):
@mastersingh24 Got it! Thanks a lot :grinning:

chandrakanthm (Sun, 20 May 2018 18:57:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dL67hpFGLs5CS2eML) @bretharrison are there any sample implementations ,would be a great help ,Thank you

alvinzach (Mon, 21 May 2018 06:26:54 GMT):
need some help with nodejs sdk . Im getting the following error when i do `channel.sendTransactionProposal(request)`

alvinzach (Mon, 21 May 2018 06:27:16 GMT):
`node: symbol lookup error: /media/alvin/Data/workspace/loan/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node: undefined symbol: SSL_library_init`

mastersingh24 (Mon, 21 May 2018 08:57:14 GMT):
@alvinzach - which OS and which version of Node.js are you using?

alvinzach (Mon, 21 May 2018 08:58:32 GMT):
node v8.10 on ubuntu 18.04

grapebaba (Mon, 21 May 2018 09:01:18 GMT):
hi guys, i submit a patch but failed CI https://gerrit.hyperledger.org/r/#/c/22037/

grapebaba (Mon, 21 May 2018 09:02:15 GMT):
but when i run gulp test in my laptop, some test failed on master branch

alvinzach (Mon, 21 May 2018 09:06:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4W8iTfCC2TmHg3o6A) This was working fine before i enabled tls on peers . please find the detailed question here https://stackoverflow.com/questions/50445298/hyperledger-fabric-nodesdk-error-while-calling-channel-sendtransactionproposal

grapebaba (Mon, 21 May 2018 09:12:03 GMT):
@bretharrison

grapebaba (Mon, 21 May 2018 09:12:08 GMT):
@zhaochy

grapebaba (Mon, 21 May 2018 09:12:17 GMT):
can you guys help

zhaochy (Mon, 21 May 2018 09:23:02 GMT):
@grapebaba I'm looking for the issue, seems all tests with fabric-ca are failed

grapebaba (Mon, 21 May 2018 09:23:38 GMT):
ok

davidkel (Mon, 21 May 2018 09:31:18 GMT):
@alvinzach I assume you don't get the same problem on ubuntu 16.04 ?

zhaochy (Mon, 21 May 2018 09:37:38 GMT):
@grapebaba fabric-ca changed its auth token format at FAB-9938 8days ago, so at our sdk side, we need to update the token as well

grapebaba (Mon, 21 May 2018 09:38:34 GMT):
ok

grapebaba (Mon, 21 May 2018 09:39:02 GMT):
i will rebase after you guys fixed it.

mastersingh24 (Mon, 21 May 2018 09:49:23 GMT):
@alvinzach - can you try running `npm rebuild grpc` ?

zhaochy (Mon, 21 May 2018 10:18:40 GMT):
@grapebaba I fixed this at https://gerrit.hyperledger.org/r/#/c/22053/

SanketPanchamia (Mon, 21 May 2018 10:32:41 GMT):

Clipboard - May 21, 2018 4:02 PM

SanketPanchamia (Mon, 21 May 2018 10:32:48 GMT):
Hi I am using the latest 1.1 version of fabric and running the balance transfer app. Everything works fine. After that i changed some of the org names and channel names to suit my application and i am getting this error while instantiating the chaincode. Any help will be appreciated

alvinzach (Mon, 21 May 2018 11:17:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5huLXG7jDJPqBYk5P) @mastersingh24 Ive already tried that

mastersingh24 (Mon, 21 May 2018 12:42:30 GMT):
@alvinzach `npm rebuild --build-from-source` ?

alvinzach (Mon, 21 May 2018 12:42:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WFD33cu2nJyiCnsSw) @mastersingh24 yep tried that too

mastersingh24 (Mon, 21 May 2018 12:44:43 GMT):
well that's about all I've got ... I assume you saw https://github.com/grpc/grpc-node/issues/341 ?

mastersingh24 (Mon, 21 May 2018 12:45:21 GMT):
You could try Node 10.x although we've never tested with it

KGiou (Mon, 21 May 2018 14:49:41 GMT):
Has joined the channel.

KGiou (Mon, 21 May 2018 15:15:34 GMT):
Hi all. I am following this tutorial (https://fabric-sdk-node.github.io/tutorial-network-config.html) and I am stuck at the point where I should load the config of org1.yaml using this cmd `client.loadFromConfig('test/fixtures/org1.yaml');`. The error that I get for this line of code is this: `Error: PEM encoded certificate is required.`. First of all what should be the `path` in `org1.yaml` for `credentialstore` and `cryptoStore`? Does this path has something to do with the error that I am getting? My `index.js` file is the following ```const express = require('express') const app = express() const hfc = require('fabric-client') let client = hfc.loadFromConfig('../network.yaml') console.log(client) client.loadFromConfig('../org1.yaml') client.loadFromConfig('../org2.yaml') app.get('/', (req, res) => res.send('Hello World!')) // client.initCredentialStores().then((nothing) => { // console.log(nothing) // }) app.listen(1337, () => console.log('Example app listening on port 1337!'))``` and the error is thrown for the line 9 where I load the config of org1

ChrisFowers (Mon, 21 May 2018 16:08:34 GMT):
Can you post your network.yaml?

ChrisFowers (Mon, 21 May 2018 16:09:10 GMT):
Sounds like you might not be providing a certificate file there or possibly even that the filepath specified there isn't accurate.

ChrisFowers (Mon, 21 May 2018 16:10:01 GMT):
You'll need the certs for the peers you are using to interface with the network

ChrisFowers (Mon, 21 May 2018 16:11:52 GMT):
If you're following the tutorials those certs are located in the `crypto-config` directory for the network you set up locally

ChrisFowers (Mon, 21 May 2018 16:11:52 GMT):
If you're following the tutorials those certs are located in the `crypto-config` directory for the network you set up locally and are generated by the crypto-gen

ChrisFowers (Mon, 21 May 2018 16:11:52 GMT):
If you're following the tutorials those certs are located in the `crypto-config` directory for the network you set up locally and are generated by the crypto-gen tool

KGiou (Mon, 21 May 2018 16:53:36 GMT):
```name: "Network" version: "1.0" # # The client section will be added on a per org basis see org1.yaml and org2.yaml # #client: # # [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: orderers: - orderer.example.com peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer0.org2.example.com: endorsingPeer: true chaincodeQuery: false ledgerQuery: true eventSource: false organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com certificateAuthorities: - ca-org1 adminPrivateKey: path: crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/f723b57dd71031d446902b656e676484cb470c1ae2b1a5d918b7306dd4ec0403_sk signedCert: path: crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem Org2: mspid: Org2MSP peers: - peer0.org2.example.com certificateAuthorities: - ca-org2 adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/keystore/7e006a05dc2b65acc751501fbb7779f56b65b9c211885ca95bffa945655554b1_sk signedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem orderers: orderer.example.com: url: grpcs://localhost:7050 grpcOptions: ssl-target-name-override: orderer.example.com grpc-max-send-message-length: 15 tlscacerts: path: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tlsca/tlsca.example.com-cert.pem peers: peer0.org1.example.com: url: grpcs://localhost:7051 eventUrl: grpcs://localhost:7053 grpcOptions: ssl-target-name-override: peer0.org1.example.com grpc.keepalive_time_ms: 600000 tlscacerts: path: crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tlsca/tlsca.org1.example.com-cert.pem peer0.org2.example.com: url: grpcs://localhost:8051 eventUrl: grpcs://localhost:8053 grpcOptions: ssl-target-name-override: peer0.org2.example.com tlscacerts: path: crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tlsca/tlsca.org2.example.com-cert.pem certificateAuthorities: ca-org1: url: https://localhost:7054 httpOptions: verify: false tlsCACerts: path: crypto-config/peerOrganizations/org1.example.com/ca/a.org1.example.com-cert.pem registrar: - enrollId: admin enrollSecret: adminpw caName: caorg1 ca-org2: url: https://localhost:8054 httpOptions: verify: false tlsCACerts: path: crypto-config/peerOrganizations/org2.example.com/ca/a.org2.example.com-cert.pem registrar: - enrollId: admin enrollSecret: adminpw caName: caorg2 ``` I have tried the paths from `organizations.Org1.adminPirvateKey.path` for `cryptoStore.path` and `organizations.Org1.signcert.path`for `credentialStore.path`and from `peers.peer0.org1.example.com.tlscacerts.path` for `creadentialStore.path` and I commented out cryptostore for this try...

KGiou (Mon, 21 May 2018 16:53:36 GMT):
@ChrisFowers ```name: "Network" version: "1.0" # # The client section will be added on a per org basis see org1.yaml and org2.yaml # #client: # # [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: orderers: - orderer.example.com peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer0.org2.example.com: endorsingPeer: true chaincodeQuery: false ledgerQuery: true eventSource: false organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com certificateAuthorities: - ca-org1 adminPrivateKey: path: crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/f723b57dd71031d446902b656e676484cb470c1ae2b1a5d918b7306dd4ec0403_sk signedCert: path: crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem Org2: mspid: Org2MSP peers: - peer0.org2.example.com certificateAuthorities: - ca-org2 adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/keystore/7e006a05dc2b65acc751501fbb7779f56b65b9c211885ca95bffa945655554b1_sk signedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem orderers: orderer.example.com: url: grpcs://localhost:7050 grpcOptions: ssl-target-name-override: orderer.example.com grpc-max-send-message-length: 15 tlscacerts: path: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tlsca/tlsca.example.com-cert.pem peers: peer0.org1.example.com: url: grpcs://localhost:7051 eventUrl: grpcs://localhost:7053 grpcOptions: ssl-target-name-override: peer0.org1.example.com grpc.keepalive_time_ms: 600000 tlscacerts: path: crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tlsca/tlsca.org1.example.com-cert.pem peer0.org2.example.com: url: grpcs://localhost:8051 eventUrl: grpcs://localhost:8053 grpcOptions: ssl-target-name-override: peer0.org2.example.com tlscacerts: path: crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tlsca/tlsca.org2.example.com-cert.pem certificateAuthorities: ca-org1: url: https://localhost:7054 httpOptions: verify: false tlsCACerts: path: crypto-config/peerOrganizations/org1.example.com/ca/a.org1.example.com-cert.pem registrar: - enrollId: admin enrollSecret: adminpw caName: caorg1 ca-org2: url: https://localhost:8054 httpOptions: verify: false tlsCACerts: path: crypto-config/peerOrganizations/org2.example.com/ca/a.org2.example.com-cert.pem registrar: - enrollId: admin enrollSecret: adminpw caName: caorg2 ``` I have tried the paths from `organizations.Org1.adminPirvateKey.path` for `cryptoStore.path` and `organizations.Org1.signcert.path`for `credentialStore.path`and from `peers.peer0.org1.example.com.tlscacerts.path` for `creadentialStore.path` and I commented out cryptostore for this try...

ChrisFowers (Mon, 21 May 2018 16:56:35 GMT):
I would verify the paths being relative to where you are starting the node sdk from

KGiou (Mon, 21 May 2018 17:00:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kyfWeTNeNHDqCfvG6) @ChrisFowers all are in the same dir.

ChrisFowers (Mon, 21 May 2018 17:14:51 GMT):
I guess what I mean is did you copy crypto-config to your project directory? For example your node service I assume is in a project directory with the file name of index.js

ChrisFowers (Mon, 21 May 2018 17:15:12 GMT):
so when you run it you are using node index.js or npm start which points to that file right?

ChrisFowers (Mon, 21 May 2018 17:15:49 GMT):
If so, is the crypto-config directory also located in the same directory as your node service js file.

ChrisFowers (Mon, 21 May 2018 17:15:49 GMT):
If so, is the crypto-config directory also located in the same directory as your node service js file.?

ChrisFowers (Mon, 21 May 2018 17:15:49 GMT):
If so, is the crypto-config directory also located in the same directory as your node service js file?

ChrisFowers (Mon, 21 May 2018 17:17:05 GMT):
Not trying to undermine you. I just want to understand your environment better to help

ChrisFowers (Mon, 21 May 2018 17:18:02 GMT):
One thing you might try is providing an absolute path to all the certs in your crypto-config (relative should work) but just to be sure its working appropriately.

ChrisFowers (Mon, 21 May 2018 17:18:24 GMT):
On thing I found when working with my environment, a symbolic linked directory didn't work for me with relative paths :(

ChrisFowers (Mon, 21 May 2018 17:18:33 GMT):
Not that it's your problem. Just a point to be made

KGiou (Mon, 21 May 2018 17:29:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=G6h6z7ZmRScvwNfs4) @ChrisFowers Yes, I run m app with `node index.js` and my `crypto-config` file is in the same dir with index.js. Do you believe that I should use absolute paths? If i understand correctly for `credentialStore` I should give the appropiate `...Admin@org1.../signcert/....pem` path and for `cryptostore` the `...keystore/*_sk`path?

KGiou (Tue, 22 May 2018 14:47:27 GMT):
@bretharrison can you enlighten me pls?

bretharrison (Tue, 22 May 2018 16:04:08 GMT):
@chandrakanthm https://github.com/hyperledger/fabric-samples/tree/release-1.1/balance-transfer

bretharrison (Tue, 22 May 2018 16:23:00 GMT):
@KGiou The idea of `loadFromConfig` method is to replace sections of the connection profile. For example if you wish to have the `client` object represent a different organization, then load a connection profile that only has the `client` section. This is how the sample code was intended, the network.yaml only has peers, channel, orderers, CAs, but no client section, the org1.yaml and org2.yaml only have a client section.

bretharrison (Tue, 22 May 2018 16:24:13 GMT):
@kGiou I do not have an opinion on relative vs absolute paths, whatever works for your environment.

KGiou (Tue, 22 May 2018 16:27:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MRvGGmis3Hd9fE3bd) @bretharrison Ok that's clear. But what should be the paths of client's `credentialStore` and `cryptoStore`? Should be the pem cert of the Admin of each org for `credentialStore` and the `*_sk` file of the Admin for `cryptostore`?

KGiou (Tue, 22 May 2018 16:27:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MRvGGmis3Hd9fE3bd) @bretharrison Ok that's clear. But what should be the paths of client's `credentialStore` and `cryptoStore`? Should be the pem cert of the Admin of each org for `credentialStore` and the `*_sk` file of the Admin for `cryptostore`? The error that I get is this: `Error: PEM encoded certificate is required.`, but I give the path for the pem file of the Admin...

alvinzach (Tue, 22 May 2018 17:33:45 GMT):
I was trying to follow the same tutorial here : https://fabric-sdk-node.github.io/tutorial-network-config.html but i got stuck at this point

alvinzach (Tue, 22 May 2018 17:35:23 GMT):
In the tutorial here :- https://fabric-sdk-node.github.io/tutorial-network-config.html . I got stuck at this point `ca.fabric_ca_client({enrollmentID: 'user1', affiliation: 'org1'}, admin) .then((secret) => { return client.setUserContext({username:'user1', password:secret}); }).then((user)=> {`

alvinzach (Tue, 22 May 2018 17:35:30 GMT):
what is ca here ?

alvinzach (Tue, 22 May 2018 17:35:45 GMT):
couldnt find in the tutorial

bretharrison (Tue, 22 May 2018 17:47:37 GMT):
@KGiou There are two different ideas going on here. First the idea of a `stores`, the credentialStore, which will store the certificates of the user contexts that have been assigned to the `client` instance. This store may use a file system (the default, so the `path` attribute of the connection profile `credentialStore` should point to a directory) or a DB (so there will not be a `path` attribute, but the required DB attributes) The cryptoStore will be determined by the crypto_suite being used (the `key-value-store` config setting indicates the class to instantiate ), may even be for an HSM (which would not have a cryptoStore as the hardware is doing that part). The second idea is one of having an admin identity assigned to the client instance, the admin identity is an addition to the user context assigned and will be used when requested be the user, typically for admin type operations like 'join-channel'. The admin identity is totally optional and most likely only useful in a development environment where one would not mind having the private key viewable on a file system. The admin identity may be assigned manually to the client instance or automatically by placing it in a connection profile file and then using the `loadFromConfig` to load the connection profile, including the admin identity setting. The cert and key must be in PEM format, as all the certs used. If the `path` attribute is used, it may be relative to where the application is running or absolute, it `pem` is used, then the just embed the pem string directly into the connection profile file.

bretharrison (Tue, 22 May 2018 17:47:37 GMT):
@KGiou There are two different ideas going on here. First the idea of a `stores`, the credentialStore, which will store the certificates of the user contexts that have been assigned to the `client` instance. This store may use a file system (the default, so the `path` attribute of the connection profile `credentialStore` should point to a directory) or a DB (so there will not be a `path` attribute, but the required DB attributes) The cryptoStore will be determined by the crypto_suite being used (the `key-value-store` config setting indicates the class to instantiate ), may even be for an HSM (which would not have a cryptoStore as the hardware is doing that part). The second idea is one of having an admin identity assigned to the client instance, the admin identity is an addition to the user context assigned and will be used when requested be the user, typically for admin type operations like 'join-channel'. The admin identity is totally optional and most likely only useful in a development environment where one would not mind having the private key viewable on a file system. The admin identity may be assigned manually to the client instance or automatically by placing it in a connection profile file and then using the `loadFromConfig` to load the connection profile, including the admin identity setting. The cert and key must be in PEM format, as all the certs used. If the `path` attribute is used, it may be relative to where the application is running or absolute, if `pem` is used, then the just embed the pem string directly into the connection profile file.

bretharrison (Tue, 22 May 2018 17:54:32 GMT):
There is a typo in the tutorial ``` ca.fabric_ca_client({enrollmentID: 'user1', affiliation: 'org1'}, admin) .then((secret) => { return client.setUserContext({username:'user1', password:secret}); }).then((user)=> { ``` should be ``` ```

bretharrison (Tue, 22 May 2018 17:54:32 GMT):
There is a typo in the tutorial ``` ca.fabric_ca_client({enrollmentID: 'user1', affiliation: 'org1'}, admin) .then((secret) => { return client.setUserContext({username:'user1', password:secret}); }).then((user)=> { ``` should be ``` fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1'}, admin) .then((secret) => { return client.setUserContext({username:'user1', password:secret}); }).then((user)=> { ```

bretharrison (Tue, 22 May 2018 17:54:32 GMT):
There is a typo in the tutorial https://fabric-sdk-node.github.io/tutorial-network-config.html ``` ca.fabric_ca_client({enrollmentID: 'user1', affiliation: 'org1'}, admin) .then((secret) => { return client.setUserContext({username:'user1', password:secret}); }).then((user)=> { ``` should be ``` fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1'}, admin) .then((secret) => { return client.setUserContext({username:'user1', password:secret}); }).then((user)=> { ```

elicrisko (Tue, 22 May 2018 18:32:11 GMT):
Has joined the channel.

alvinzach (Tue, 22 May 2018 18:32:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xECfpNFuhXWJ3bb6X) @bretharrison Thank you

dhrubesh (Tue, 22 May 2018 19:30:37 GMT):
Has joined the channel.

dhrubesh (Tue, 22 May 2018 19:30:42 GMT):
Hey everyone. I'm a Front end developer from India. I have been reading a lot about hyperledger recently. In terms of development I couldn't find any good tutorials. Can anyone redirect me to some learning resources for beginners? I wish to explore Hyperledger Fabric.

mastersingh24 (Tue, 22 May 2018 19:39:03 GMT):
@dhrubesh - have you gone through https://www.edx.org/course/blockchain-business-introduction-linuxfoundationx-lfs171x ? It includes Fabric and Sawtooth, but you could skip Sawtooth if you only want to do Fabric

DongSuIBM (Tue, 22 May 2018 19:45:48 GMT):
Hello, could someone tell me how to get the transaction by tx_id? I am using the `queryTransaction(tx_id, target, useAdmin)` API defined in https://fabric-sdk-node.github.io/Channel.html. I got the enclosed errors in the end of this message. The tx_id argument is got from the `header` structure of the block structure https://fabric-sdk-node.github.io/global.html#Header. And I got the block by using the `queryBlock(blockNumber, target, useAdmin)` API. I suspect that the tx_id I got is not the one for indexing transactions. Any hint or suggestion will be greatly appreciated. `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: Failed to get transaction with id "8901d01027259dc3ca229291968a43eb676fac2dba92cd6da68bc640b9ccc7e9", error Entry not found in index) at new createStatusError (/Users/dongsu/work/src/repro/mpo-iot-sdlm/node_modules/grpc/src/client.js:64:15) at /Users/dongsu/work/src/repro/mpo-iot-sdlm/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: Failed Transaction Query. Error: Error: 2 UNKNOWN: chaincode error (status: 500, message: Failed to get transaction with id "8901d01027259dc3ca229291968a43eb676fac2dba92cd6da68bc640b9ccc7e9", error Entry not found in index) at new createStatusError (/Users/dongsu/work/src/repro/mpo-iot-sdlm/node_modules/grpc/src/client.js:64:15) at /Users/dongsu/work/src/repro/mpo-iot-sdlm/node_modules/grpc/src/client.js:583:15 [2018-05-22 15:30:57.989] [ERROR] Query - Error: 2 UNKNOWN: chaincode error (status: 500, message: Failed to get transaction with id "8901d01027259dc3ca229291968a43eb676fac2dba92cd6da68bc640b9ccc7e9", error Entry not found in index) at new createStatusError (/Users/dongsu/work/src/repro/mpo-iot-sdlm/node_modules/grpc/src/client.js:64:15) at /Users/dongsu/work/src/repro/mpo-iot-sdlm/node_modules/grpc/src/client.js:583:15 target_block = Error: 2 UNKNOWN: chaincode error (status: 500, message: Failed to get transaction with id "8901d01027259dc3ca229291968a43eb676fac2dba92cd6da68bc640b9ccc7e9", error Entry not found in index) `

dhrubesh (Wed, 23 May 2018 03:49:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jfBh3Wdbor6r5J7r8) @mastersingh24 Hey Thanks. I'll go through it.

anjalinaik (Wed, 23 May 2018 07:33:38 GMT):
Can somebody please help me understand what the below error is about? Error from query = error executing chaincode: error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/hyperledger/fabric/chaincode/fabcar /opt/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-187586318/000000.o: In function `pluginOpen': /tmp/workdir/go/src/plugin/plugin_dlopen.go:19: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /tmp/go-link-187586318/000001.o: In function `_cgo_b0c710f30cfd_C2func_getaddrinfo': /tmp/go-build/net/_obj/cgo-gcc-prolog:46: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: final link failed: No space left on device collect2: error: ld returned 1 exit status "

mastersingh24 (Wed, 23 May 2018 15:53:11 GMT):
@anjalinaik - I think at the end of the day you ran out of disk space. Are you running Docker for Mac or Docker for Windows?

rjones (Wed, 23 May 2018 22:27:07 GMT):
Has left the channel.

anjalinaik (Thu, 24 May 2018 04:11:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Pm38T6ms3FtjPHKtz) @mastersingh24 Hi! Thankyo for your reply.I am running Docker for ubuntu and my disk space looked fine.However when i reinstalled go lang the error was resolved.Not sure if it was the right thing to do.

anjalinaik (Thu, 24 May 2018 04:11:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Pm38T6ms3FtjPHKtz) @mastersingh24 Hi! Thankyou for your reply.I am running Docker for ubuntu and my disk space looked fine.However when i reinstalled go lang the error was resolved.Not sure if it was the right thing to do.

AnkitSingh5 (Thu, 24 May 2018 06:24:30 GMT):
Has joined the channel.

AnkitSingh5 (Thu, 24 May 2018 06:24:37 GMT):
Hi, I have installed the chaincode and it got successful but facing this error when trying to instantiate the chaincode - `ERRO 692 [[e9585782 PUT_STATE ERROR]]No ledger context for %!!(MISSING)s(MISSING). Sending %!!(MISSING)s(MISSING) ERRO 6a2 [bloqchannel][e9585782] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction` I am using Hyperledger Fabric v1.1.0 preview I have 2 orgs and 3 peers per org.

AnkitSingh5 (Thu, 24 May 2018 06:24:37 GMT):
Hi, I have installed the chaincode and it got successful but facing this error when trying to instantiate the chaincode - `ERRO 692 [[e9585782 PUT_STATE ERROR]]No ledger context for %!!(MISSING)s(MISSING). Sending %!!(MISSING)s(MISSING)` `ERRO 6a2 [bloqchannel][e9585782] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction` I am using Hyperledger Fabric v1.1.0 preview I have 2 orgs and 3 peers per org.

kapilAtrey (Thu, 24 May 2018 10:07:13 GMT):

Clipboard - May 24, 2018 3:37 PM

kapilAtrey (Thu, 24 May 2018 10:07:14 GMT):
Hi i was requesting the channel-config using *getChannelConfig(target)* and it is giving me an error _ access denied: channel [mychannel] creator org [Org1MSP] _ what part i am missing

kapilAtrey (Thu, 24 May 2018 10:07:14 GMT):
Hi i was requesting the channel-config using *getChannelConfig(target)* and it is giving me an error _ access denied: channel [mychannel] creator org [Org1MSP] _ what part i am missing

kapilAtrey (Thu, 24 May 2018 10:07:14 GMT):
Hi i was requesting the channel-config using *getChannelConfig(target)* and it is giving me an error _ access denied: channel [mychannel] creator org [Org1MSP] _ ...... what part i am missing ?

ShikiTakahashi (Fri, 25 May 2018 07:32:07 GMT):
Has joined the channel.

jeevas (Fri, 25 May 2018 09:49:58 GMT):
Hi @bretharrison the 'getPeersForOrgOnChannel() and getOrganizations()' method doesn't query the network. I am trying to get peers and organizations informations by querying the network based on the channel or client object. could you help me how to get these information by querying the network

migrenaa (Fri, 25 May 2018 11:47:27 GMT):
Has joined the channel.

bretharrison (Fri, 25 May 2018 14:02:51 GMT):
@jeevas Look for improvement in those commands when Service Discovery comes in, then the NodeSDK will be able to understand the network having actually talked to the network (via Discover Service) rather than the information from the connection profile.

kapilAtrey (Sun, 27 May 2018 06:53:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AbxZEbNAu9EXv4k34) @bretharrison can you please help me in this

bretharrison (Sun, 27 May 2018 13:07:39 GMT):
@kapilAtrey Check that the channel exist on the fabric network. Might be that the peer (target) has not joined the channel.

kelvinzhong (Mon, 28 May 2018 02:23:59 GMT):
Has joined the channel.

kelvinzhong (Mon, 28 May 2018 02:24:12 GMT):
@bretharrison 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?

anjalinaik (Mon, 28 May 2018 05:50:53 GMT):
Hi I keep getting this error on invoke/query : Error from query = access denied: channel [mychan] creator org [ess] I haven't manually revoked any user certificates. May i please know what maybe going wrong?

ShikiTakahashi (Mon, 28 May 2018 07:14:03 GMT):
Hi I am trying first-network / balance-transfer now. I added the following code to helper.js in order to delete the registered user. ```helper.js var revokeUser = async function(username, userOrg, isJson) { try { var client = await getClientForOrg(userOrg); logger.debug('Successfully initialized the credential stores'); // client can now act as an agent for organization Org1 // first check to see if the user is already enrolled var user = await client.getUserContext(username, true); if (user && user.isEnrolled()) { logger.info('Successfully loaded member from persistence'); var admins = hfc.getConfigSetting('admins'); let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret}); let caClient = client.getCertificateAuthority(); let secret = await caClient.revoke({ enrollmentID: username }, adminUserObj); user = await client.setUserContext({username:username, password:secret}); logger.debug('Successfully revoke the secret for user %s',username); return secret; } else { // user was not enrolled, so we will need an admin user object to register logger.info('User %s was not enrolled, so we will need an admin user object to register',username); } } catch(error) { logger.error('Failed to get registered user: %s with error: %s', username, error.toString()); return 'failed '+error.toString(); } }; ``` As a result of doing this, the log of the network indicated success. ``` ca_peerOrg1 | 2018/05/28 06:55:42 [DEBUG] Revoke was successful: {RevocationRequest:{Name:Jim Serial: AKI: Reason: CAName:ca-org1 GenCRL:false}} ca_peerOrg1 | 2018/05/28 06:55:42 [INFO] 172.22.0.1:33698 POST /api/v1/revoke 200 0 "OK" ``` However, it is still possible to execute the chain code afterwards. What's wrong?

ShikiTakahashi (Mon, 28 May 2018 07:14:03 GMT):
Hi I am trying fabric-samples / balance-transfer now. I added the following code to helper.js in order to delete the registered user. ```helper.js var revokeUser = async function(username, userOrg, isJson) { try { var client = await getClientForOrg(userOrg); logger.debug('Successfully initialized the credential stores'); // client can now act as an agent for organization Org1 // first check to see if the user is already enrolled var user = await client.getUserContext(username, true); if (user && user.isEnrolled()) { logger.info('Successfully loaded member from persistence'); var admins = hfc.getConfigSetting('admins'); let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret}); let caClient = client.getCertificateAuthority(); let secret = await caClient.revoke({ enrollmentID: username }, adminUserObj); user = await client.setUserContext({username:username, password:secret}); logger.debug('Successfully revoke the secret for user %s',username); return secret; } else { // user was not enrolled, so we will need an admin user object to register logger.info('User %s was not enrolled, so we will need an admin user object to register',username); } } catch(error) { logger.error('Failed to get registered user: %s with error: %s', username, error.toString()); return 'failed '+error.toString(); } }; ``` As a result of doing this, the log of the network indicated success. ``` ca_peerOrg1 | 2018/05/28 06:55:42 [DEBUG] Revoke was successful: {RevocationRequest:{Name:Jim Serial: AKI: Reason: CAName:ca-org1 GenCRL:false}} ca_peerOrg1 | 2018/05/28 06:55:42 [INFO] 172.22.0.1:33698 POST /api/v1/revoke 200 0 "OK" ``` However, it is still possible to execute the chain code afterwards. What's wrong?

gravity (Mon, 28 May 2018 09:13:54 GMT):
Has joined the channel.

gravity (Mon, 28 May 2018 09:14:57 GMT):
Hi all ``` Also related to identities, you should make a decision on whether Fabric-CA should be part of your solution. This is a server with REST APIs that supports dynamic identity management with registration, enrollment (getting certificates), revocation and re-enrollment. So it is very useful in providing user identities on the fly. Note that user identities provisioned this way are only of the MEMBER role, which means it won't be able to perform certain operations reserved for the ADMIN role ``` according to this, we cannot create an `ADMIN` via `fabric-ca`. how we can create `ADMIN` user? thanks in advance

pankajcheema (Mon, 28 May 2018 12:29:15 GMT):
Hi guys. I am facing a performance issue in nodejs sdk

pankajcheema (Mon, 28 May 2018 12:29:17 GMT):
https://stackoverflow.com/questions/50565287/hyperledger-fabric-nodejs-sdk-taking-time-for-getting-proposal-result-5-seconds

pankajcheema (Mon, 28 May 2018 12:29:30 GMT):
title: Hyperledger Fabric Nodejs SDK taking time for getting proposal result (5 seconds approx) Ask Question

pankajcheema (Mon, 28 May 2018 12:29:45 GMT):
Any help/answer/comment would be appreciated

VigneshkumarChinnachamy (Mon, 28 May 2018 12:33:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YsK2K9nApNj6r6Sjz) Hi, I have exactly the same doubt. Can anyone help me out on this?

jeevas (Mon, 28 May 2018 12:52:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Drtpoj7doAMmThdtK) @bretharrison Service Discovery functionality available in fabric( https://jira.hyperledger.org/browse/FAB-5451 ) not in fabric-sdk. when it will update in Fabric-sdk?

LAlejandroNG (Mon, 28 May 2018 16:04:08 GMT):
Has joined the channel.

LAlejandroNG (Mon, 28 May 2018 16:27:57 GMT):
Hello every one, I'm deploying a sample network using LDAP-CA for registering users and I'm using balance-transfer API in order to enroll users. I just realized client class does not allow me to add attr_reqs when context is setting to user. I saw that enroll function just receives two parameters. fabric-client/lib/Client.js, function _setUserFromConfig, line 1315. Is it going to change in next version? Am I using SDK in a wrong way? Thanks in advance.

pankajcheema (Mon, 28 May 2018 17:29:39 GMT):
Hi Experts Can you please look into the issue I have found? Hyperledger fabric nodejs sdk returns success message even if orderers are down https://stackoverflow.com/questions/50571107/hyperledger-fabric-nodejs-sdk-returns-success-message-even-if-orderers-are-down Thanks

jrosmith (Tue, 29 May 2018 10:05:25 GMT):
@pankajcheema success with a payload from the peer for endorsement? or are you saying that there was as successful commitment to the ledger? those are two separate things and impossible to discern which you mean from the stackoverflow post, nor are there directions to reproduce the error.

jrosmith (Tue, 29 May 2018 10:05:52 GMT):
endorsement doesn't require ordering, but endorsement and commitment are two separate ideas

Taffies (Wed, 30 May 2018 07:57:08 GMT):
enrollAdmin

alejandrolr (Wed, 30 May 2018 11:02:46 GMT):
Has joined the channel.

AlexanderZhovnuvaty (Wed, 30 May 2018 11:38:47 GMT):
Has joined the channel.

tom.appleyard (Wed, 30 May 2018 17:09:32 GMT):
Are there typescript definitions for the SDK anywhere?

jeevas (Wed, 30 May 2018 17:55:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PbDytYh8ZdEQwQBBM) Hi, Please let me know when it will update in fabric-sdk

tom.appleyard (Wed, 30 May 2018 19:15:41 GMT):
Does anyone know what 'affiliation', 'role' and 'attrs' are in this: ``` /** * Register the member and return an enrollment secret. * @param {Object} req Registration request with the following fields: *
- enrollmentID {string}. ID which will be used for enrollment *
- enrollmentSecret {string}. Optional enrollment secret to set for the registered user. * If not provided, the server will generate one. *
- role {string}. An arbitrary string representing a role value for the user *
- affiliation {string}. Affiliation with which this user will be associated, like a company or an organization *
- maxEnrollments {number}. The maximum number of times this user will be permitted to enroll *
- attrs {{@link KeyValueAttribute}[]}. Array of key/value attributes to assign to the user. * @param registrar {User}. The identity of the registrar (i.e. who is performing the registration) * @returns {Promise} The enrollment secret to use when this user enrolls */ register(req, registrar) { ... } ```

Amjadnz (Thu, 31 May 2018 05:32:29 GMT):
Question: Am using NODE SDK and my chaincode gets intantiated (on ORG1/NODE01) with a specific endorsement policy. Now a new ORG (org2) has joined and I have to instantiate the chaincode there too. As per the docs I can modify the channel config by adding a new org2. Now If I specify a "rougue" endorsement policy on the org2 (comprising my own controlled endorsers), the instantiation still would continue right? Is there a way where I can enforce that all instantiation should have the same endorsement policy and reject instantiation if the policy is not consistent? Or only admin nodes (nodes with ADMIN crypto) can instantiate the chaincodes on other nodes?

crj (Thu, 31 May 2018 09:08:33 GMT):
Can someone tell me how to get the latest 10 transaction records?

crj (Thu, 31 May 2018 09:10:20 GMT):
Can someone tell me how to get the latest 10 transaction records by using "GetHistoryForKey"?

crj (Thu, 31 May 2018 09:12:36 GMT):
Any opinion will be appreciated

jrosmith (Thu, 31 May 2018 09:31:25 GMT):
@crj `GetHistoryForKey` retrieves the historical record of a single key in the ledger. are you saying you want to get the last 10 edits to a particular key? or are you looking for a way to get the last 10 transactions in the system?

crj (Thu, 31 May 2018 10:04:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RJSH7xfCKckHSXGFM) @jrosmith I want to get the last 10 tx_ID for a particular key

jrosmith (Thu, 31 May 2018 10:07:52 GMT):
@crj at the chaincode level** `GetHistoryForKey` returns all historical transactions for a particular key, if you wanted to limit the number of historical items you would have to implement that functionality yourself. assuming your chaincode is in go, see the [chaincode docs](https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go#L151) and [this example](https://github.com/hyperledger/fabric-samples/blob/release/chaincode/marbles02/marbles_chaincode.go#L564)

crj (Thu, 31 May 2018 10:09:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2TBx3mHXuHLbQPT8i) @jrosmith Thanks

alejandrolr (Thu, 31 May 2018 12:45:08 GMT):
Hi all!! I'm working in developing a simple Fabric application using the Node SDK on Kubernetes. Firstly, I've deployed a custom kubernetes cluster in Google Kubernetes Engine and created a simple network using this repo from steps 4 and 5 (https://github.com/IBM/blockchain-network-on-kubernetes). Note: I skip the IBM Cloud Steps because I'm using my own cluster. After the deployment, I'm able to perform invokes/queries inside one peer (using the command line interface) without problem. However, if I use the Node SDK (https://github.com/hyperledger/fabric-samples/tree/release-1.1/fabcar) I'm only able to perform enroll/register and queries. The invoke requests fail. Do you have any idea? ``` root@kubernetes-api-85df84499d-g8tgd:/api-v1.0# node enrollAdmin.js Store path:/api-v1.0/hfc-key-store Successfully enrolled admin user "admin" Assigned the admin user to the fabric client ::{"name":"admin","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"89258074fc553d792ea5d4685097c28352191e9b8587cbe80b649bd59ea6c877","identity":{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB8DCCAZegAwIBAgIUNhnBDWYMEFpx0BAKwZmj7Xl6GkgwCgYIKoZIzj0EAwIw\nczELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh\nbiBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMT\nE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwNTI5MTkxMDAwWhcNMTkwNDI4MDMx\nMDAwWjAQMQ4wDAYDVQQDEwVhZG1pbjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBAnEGtTNf/ScMtwPF7ANl/kisWEpx0/6UgPvi41i7a6Oc1SCFCpXE0huz94xy9Y5\nhIZecX/WqBPezcOTzcCBm/WjbDBqMA4GA1UdDwEB/wQEAwICBDAMBgNVHRMBAf8E\nAjAAMB0GA1UdDgQWBBR43OWbfNXwL/1/EQz5+me+IYTr8zArBgNVHSMEJDAigCD/\nik1WxH34lDg4L9LpQ80ga5BBtglshohRRmQbAlsdUDAKBggqhkjOPQQDAgNHADBE\nAiAfV6y4giHpPsauLH2JDqDFDVrYbX2fP7dCDhG8tNPujQIgY1hMgYMp+Qzzvvc5\nY8sEenHVszjtbWbGvAwily0Nrh4=\n-----END CERTIFICATE-----\n"}}} root@kubernetes-api-85df84499d-g8tgd:/api-v1.0# node registerUser.js Store path:/api-v1.0/hfc-key-store Successfully loaded admin from persistence Successfully registered user1 - secret:pXTXFqjvnzri Successfully enrolled member user "user1" User1 was successfully registered and enrolled and is ready to intreact with the fabric network root@kubernetes-api-85df84499d-g8tgd:/api-v1.0# node query.js Store path:/api-v1.0/hfc-key-store Successfully loaded user1 from persistence Query has completed, checking results Response is 60 root@kubernetes-api-85df84499d-g8tgd:/api-v1.0# node invoke.js Store path:/api-v1.0/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: 1b05a3be4f4752b7005d95ac6bceed22d827cea9ae7833c374a66866ead8916f error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/api-v1.0/node_modules/fabric-client/lib/Peer.js:117:19) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) Transaction proposal was bad Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... Failed to invoke successfully :: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...```

anjalinaik (Fri, 01 Jun 2018 06:17:58 GMT):
Hi All, on performing channel update i am getting below error.Can anybody please tell me what is wrong . Error: Invalid channel create transaction : mismatched channel ID ${2} != mychannel

wangdong (Fri, 01 Jun 2018 06:44:01 GMT):
when to create the channel? or invoke the chain code?

titoe218 (Sat, 02 Jun 2018 03:22:15 GMT):
Has joined the channel.

titoe218 (Sat, 02 Jun 2018 03:24:34 GMT):
Hi all, I use Hyperledger Explore to query block and transaction in my network but sometime it got this error `[ERROR] blockscanner - TypeError: Cannot read property 'data' of undefined` Does anyone knows how to fix this?

gauthampamu (Sat, 02 Jun 2018 20:13:37 GMT):
What is the max amount of data we can return in the query and what optimum amount of data we can send in the response without degrading the performance. I was looking at the data size limit for grpc, it says it is 4MB. https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1991

gauthampamu (Sat, 02 Jun 2018 20:13:37 GMT):
What is the max amount of data we can return in the query and what optimum amount of data we can send in the response without degrading the performance. I was looking at the data size limit for grpc, it says it is 4MB. https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1991 Understand that you could change the limit via config but I would like to know if anyone increased the limit and how it impacted the performance of the call.

krabradosty (Sun, 03 Jun 2018 17:56:42 GMT):
Hi folks! Is it possible to split the process of sending transaction proposal into the two: 1. signing the request with user's private key 2. sending the proposal ?

wangdong (Mon, 04 Jun 2018 00:03:10 GMT):
I think it is.

kshitiz_leo (Mon, 04 Jun 2018 03:58:29 GMT):
Has joined the channel.

aakanshaparmar (Mon, 04 Jun 2018 06:58:40 GMT):
Hi, I am using hyperledger 1.1. I am able to successfully send a proposal and receive a response, however when I try to send the transaction to the orderer it is successfully added to the ledger but I receive an undefined error. Any idea why that might be happening?

krabradosty (Mon, 04 Jun 2018 14:19:33 GMT):
@wangdong Could you help to find necessary methods? I don't see them in the documentation.

javrevasandeep (Mon, 04 Jun 2018 16:07:09 GMT):
@bretharrison - Could you please let us know how to use CouchDB based key value store while storing user credentials. I see some tags like credentialStore in connection profile section but didn't get any documentation on how to configure connection profile to use CouchDBKeyValueStore instead of default FileKeyValueStore and also what and where do we need to make changes to implement CouchDB based key value store to store credentials

javrevasandeep (Mon, 04 Jun 2018 16:07:09 GMT):
@bretharrison @wangdong - Could you please let us know how to use CouchDB based key value store while storing user credentials. I see some tags like credentialStore in connection profile section but didn't get any documentation on how to configure connection profile to use CouchDBKeyValueStore instead of default FileKeyValueStore and also what and where do we need to make changes to implement CouchDB based key value store to store credentials

shibu (Mon, 04 Jun 2018 16:25:31 GMT):
Has joined the channel.

haggs (Mon, 04 Jun 2018 20:31:42 GMT):
Has joined the channel.

wangdong (Tue, 05 Jun 2018 02:07:25 GMT):
@javrevasandeep the config couchdb is very similar to the keyvalue file. You can have an eye on the fabric-client/lib/impl/CouchDBKeyValueStore.js. And you have start a couchdb container. The only option is the url of couchdb.

majety.1 (Tue, 05 Jun 2018 05:01:48 GMT):
Has joined the channel.

kshitiz_leo (Tue, 05 Jun 2018 06:54:10 GMT):
hi, i'm trying to send an request to fabric network via an html page. i'm using the example given in Edex course. when i'm trying to interact with fabric network, i'm getting this error , please help me out. thanks in advance

kshitiz_leo (Tue, 05 Jun 2018 06:54:29 GMT):

Screen Shot 2018-06-05 at 12.16.12 PM.png

kshitiz_leo (Tue, 05 Jun 2018 06:54:29 GMT):

Screen Shot 2018-06-05 at 12.16.12 PM.png

javrevasandeep (Tue, 05 Jun 2018 06:58:54 GMT):
@wangdong Below given in org1.yaml configuration and error that i am getting while trying to enroll any user I am getting the error [2018-06-04 23:16:03.142] [DEBUG] Helper - [FileKeyValueStore.js]: constructor { options: { url: 'http://:@localhost:5984', wallet: 'wallet-name', cryptoStore: { path: '/tmp/fabric-client-kv-org1' } } } [2018-06-04 23:16:03.144] [ERROR] Helper - Failed to get registered user: feng with error: Error: Must provide the path to the directory to hold files for the store.

javrevasandeep (Tue, 05 Jun 2018 06:58:54 GMT):
@wangdong Below given in org1.yaml configuration and error that i am getting while trying to enroll any user client: organization: org1 credentialStore: url: "http://mushu:blockchain@localhost:5984" cryptoStore: path: "/tmp/fabric-client-kv-org1" wallet: wallet-name Error that we are getting is I am getting [2018-06-04 23:16:03.142] [DEBUG] Helper - [FileKeyValueStore.js]: constructor { options: { url: 'http://:@localhost:5984', wallet: 'wallet-name', cryptoStore: { path: '/tmp/fabric-client-kv-org1' } } } [2018-06-04 23:16:03.144] [ERROR] Helper - Failed to get registered user: feng with error: Error: Must provide the path to the directory to hold files for the store.

anjalinaik (Tue, 05 Jun 2018 11:44:49 GMT):
Hi All .Can somebody please explain what below error is about.*Error from query = access denied: channel [mychannel] creator org [org1]*. I have a vague idea that it is caused due to revoking of certificates, But Along the process of setting up the network i haven't manually revoked any certificates. May i please know why this error is occurring? and also the error is not consistent.

rajasekharpippalla (Tue, 05 Jun 2018 14:06:16 GMT):

Screenshot from 2018-06-05 19:32:57.png

fbenhamo (Tue, 05 Jun 2018 14:27:05 GMT):
Hi all, I have two questions related to connection profiles (https://fabric-sdk-node.github.io/tutorial-network-config.html): 1. I understand that if `organizations.Org1. adminPrivateKey` and `organizations.Org1.signedCert` are provided, `setAdminIdentity` is automatically called. This allows me to easily install a chaincode and also call `sendInstantiateProposal`. But then, the subsequent `sendTransaction` fails with the following error: ``` (node:37590) UnhandledPromiseRejectionWarning: Error: The clientContext has not been properly initialized, missing userContext at EventHub.connect (.../node_modules/fabric-client/lib/EventHub.js:248:10) at Object.commitProposal (.../lib/Helper.js:149:6) at instantiate (.../deploy.js:79:30) at ``` The only solution I have found is to use an equivalent of `getOrgAdmin` (like the one here: https://github.com/hyperledger/fabric-samples/blob/release-1.1/balance-transfer/typescript/lib/helper.ts) 2. The connection profile can specify `registrar.enrollId/enrollSecret`, but I did not find how to use them.

JigneshVasoya (Tue, 05 Jun 2018 14:36:11 GMT):
Has joined the channel.

JigneshVasoya (Tue, 05 Jun 2018 14:36:17 GMT):
hi

JigneshVasoya (Tue, 05 Jun 2018 14:36:38 GMT):
Error: BAD_REQUEST\n at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:116:21)\n at emitOne (events.js:96:13)\n at ClientDuplexStream.emit (events.js:188:7)\n at readableAddChunk (_stream_readable.js:176:18)\n at ClientDuplexStream.Readable.push (_stream_readable.js:134:10)\n at readCallback (/usr/src/app/node_modules/grpc/src/client.js:312:14) i'm getting this error while creating a channel can someone help?

JigneshVasoya (Tue, 05 Jun 2018 14:36:38 GMT):
Error: BAD_REQUEST\n at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:116:21)\n at emitOne (events.js:96:13)\n at ClientDuplexStream.emit (events.js:188:7)\n at `readableAddChunk (_stream_readable.js:176:18)\n at ClientDuplexStream.Readable.push (_stream_readable.js:134:10)\n at readCallback (/usr/src/app/node_modules/grpc/src/client.js:312:14) ` i'm getting this error while creating a channel can someone help?

fbenhamo (Tue, 05 Jun 2018 14:41:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KpwBqsH89wLvr7zue) 3. What `httpOptions.verify: false` is used for (in CA)?

bretharrison (Tue, 05 Jun 2018 15:08:09 GMT):
@fbenhamo see https://github.com/hyperledger/fabric-sdk-node/blob/release-1.1/test/integration/only-admin.js for how to only use an admin identity

bretharrison (Tue, 05 Jun 2018 15:09:05 GMT):
@JigneshVasoya usually this means the channel already exist

bretharrison (Tue, 05 Jun 2018 15:19:54 GMT):
@fbenhamo `httpOptions.verify: false` means that NodeSDK Fabric-ca code will accept the TLS connection certificate from the CA without checking it against anything

fbenhamo (Tue, 05 Jun 2018 15:22:43 GMT):
@bretharrison regarding `httpOptions.verify: false`, is there a way to disable this by specifying the expected TLS certificate of the CA

fbenhamo (Tue, 05 Jun 2018 15:22:48 GMT):
@bretharrison thanks

fbenhamo (Tue, 05 Jun 2018 15:23:24 GMT):
@bretharrison regarding https://github.com/hyperledger/fabric-sdk-node/blob/release-1.1/test/integration/only-admin.js, the issue is that they don't use eventhub, and the problem is for eventhub. How can I use the admin identity in eventhub?

bretharrison (Tue, 05 Jun 2018 15:30:52 GMT):
@fbenhamo see https://github.com/hyperledger/fabric-sdk-node/blob/94bce8a3b601b1377648ce1b6c9f8d187f3cdf09/test/integration/only-admin.js#L351

bretharrison (Tue, 05 Jun 2018 15:31:24 GMT):
events are being used with only admin idenitity

bretharrison (Tue, 05 Jun 2018 15:37:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=juqNjh4PkjjEodw3E) @fbenhamo Yes, when building the options https://github.com/hyperledger/fabric-sdk-node/blob/94bce8a3b601b1377648ce1b6c9f8d187f3cdf09/test/integration/fabric-ca-services-tests.js#L58 use the pem encoded certificate in the `trustedRoots`. see https://fabric-sdk-node.github.io/FabricCAServices.html , and the TLSOptions link https://fabric-sdk-node.github.io/global.html#TLSOptions

bretharrison (Tue, 05 Jun 2018 15:37:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=juqNjh4PkjjEodw3E) @fbenhamo Yes, when building the options https://github.com/hyperledger/fabric-sdk-node/blob/94bce8a3b601b1377648ce1b6c9f8d187f3cdf09/test/integration/fabric-ca-services-tests.js#L58 (sorry I could not find an actual example) use the pem encoded certificate in the `trustedRoots`. see https://fabric-sdk-node.github.io/FabricCAServices.html , and the TLSOptions link https://fabric-sdk-node.github.io/global.html#TLSOptions

javrevasandeep (Tue, 05 Jun 2018 15:54:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pChchpsGtyfaMLBKL) @bretharrison @wangdong Any update on the below issue

bretharrison (Tue, 05 Jun 2018 16:13:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=akjNFvekXi9xF4fPH) @javrevasandeep see https://fabric-sdk-node.github.io/tutorial-network-config.html `client.initCredentialStores()`. Since each application and each SDK type must build its own stores, the store class implementation is not in the connection profile, just the parameters to pass to starting the implementation. - Be sure the `'key-value-store` config setting in the `default.json` or set your own file or setting 'setConfigSetting()` has the NodeSDK's CouchDB store implementation or points to your own implementation. for example `"key-value-store" : "fabric-client/lib/impl/CouchDBKeyValueStore.js"`. - The connection profile client section will need the location of the store, since it is not a file store the 'path' attribute is not needed, but the `url` is needed for the database connection. ``` credentialStore: url: "http://localhost:5984" cryptoStore: url: "http://localhost:5984" ```

JigneshVasoya (Tue, 05 Jun 2018 18:31:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4nAQKNyHkaFXEC68W) @bretharrison Thanks

JigneshVasoya (Tue, 05 Jun 2018 18:32:09 GMT):
How can I update shim package? I'm getting 'interface not available' error while invoking one of chaincode It seems that shim doesn't have that interface in whatever version it has

bretharrison (Tue, 05 Jun 2018 18:51:42 GMT):
@JigneshVasoya in your chaincodes `package.json` , check the `"fabric-shim": "1.1.2"` This is the latest.

bretharrison (Tue, 05 Jun 2018 18:51:42 GMT):
@JigneshVasoya in your chaincode's `package.json` , check the `"fabric-shim": "1.1.2"` This is the latest.

fbenhamo (Tue, 05 Jun 2018 18:59:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hkAhrQwoFbLqKWyN9) @bretharrison thanks! It worked. If somebody needs it, one important point to take care of is to generate `txId` as `admin` (`client.newTransactionID(true)`) and to include `txId` inside the request used as input to `channel.sendTransaction`.

bretharrison (Tue, 05 Jun 2018 20:16:17 GMT):
@fbenhamo Thanks for the update

bh4rtp (Wed, 06 Jun 2018 01:00:49 GMT):
@bretharrison hi, i found invoke chaincode will fail in case of invoking another chaincode using node sdk like `balance-transfer` example. but there are no error log messages from peer, orderer and chaincode containers.

bh4rtp (Wed, 06 Jun 2018 01:01:48 GMT):
invocation of chaincode without `InvokeChaincode` is normal.

bh4rtp (Wed, 06 Jun 2018 01:01:48 GMT):
invocation of chaincode without `InvokeChaincode` is normal. i don't know whether this issue is caused by fabric or node sdk.

wangdong (Wed, 06 Jun 2018 01:11:53 GMT):
@javrevasandeep sorry I missed it. I think Bret got the answer for you already.

wangdong (Wed, 06 Jun 2018 01:14:59 GMT):
@bh4rtp Hi, what do you mean by "another". Do you mean to use another chain code in balance-transfer?

bh4rtp (Wed, 06 Jun 2018 01:16:01 GMT):
@wangdong cross chaincode invocation.

wangdong (Wed, 06 Jun 2018 01:20:44 GMT):
OK.

zhaochy (Wed, 06 Jun 2018 01:36:26 GMT):
@bh4rtp can you check the log for the target chaincode to make sure the target chaincode received the invoke

bh4rtp (Wed, 06 Jun 2018 01:37:17 GMT):
@zhaochy everything is ok except sdk client prints error.

zhaochy (Wed, 06 Jun 2018 01:37:41 GMT):
can you show me the error?

bh4rtp (Wed, 06 Jun 2018 01:38:21 GMT):
just a few minutes. i am compiling the latest fabric.

bh4rtp (Wed, 06 Jun 2018 02:02:45 GMT):
```[2018-06-06 10:01:20.472] [INFO] invoke-chaincode - invoke chaincode proposal was good [2018-06-06 10:01:20.473] [ERROR] invoke-chaincode - invoke chaincode proposal was bad [2018-06-06 10:01:20.473] [DEBUG] invoke-chaincode - Failed to send Proposal and receive all good ProposalResponse [2018-06-06 10:01:20.473] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause : Failed to send Proposal and receive all good ProposalResponse (node:6278) UnhandledPromiseRejectionWarning: Error: Failed to invoke chaincode. cause : Failed to send Proposal and receive all good ProposalResponse at Object.invokeChaincode (/home/allen/gopath/src/github.com/hyperledger/fabric-samples/energytrade-solo/app/invoke-transaction.js:174:9) at (node:6278) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:6278) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```

bh4rtp (Wed, 06 Jun 2018 02:22:34 GMT):
`[NetworkConfig101.js]: getPeer - name peer0.org1.example.com, channel_org: undefined`. does `channel_org: undefined` matter?

zhaochy (Wed, 06 Jun 2018 02:32:10 GMT):
in your project `energytrade-solo/app/invoke-transaction.js` line 174, can you catch the exception and show me the error message?

bh4rtp (Wed, 06 Jun 2018 02:34:04 GMT):
just the same as `balance-transfer/app/invoke-transaction.js`. https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/app/invoke-transaction.js#L174

zhaochy (Wed, 06 Jun 2018 02:36:49 GMT):
``` [2018-06-06 10:01:20.473] [ERROR] invoke-chaincode - invoke chaincode proposal was bad ``` can you log the bad proposal response?

bh4rtp (Wed, 06 Jun 2018 02:59:19 GMT):
how to get the response?

zhaochy (Wed, 06 Jun 2018 03:02:12 GMT):
can you show me the result from your `channel.sendTransactionProposal()`

bh4rtp (Wed, 06 Jun 2018 03:03:18 GMT):
ok. if possible.

wangdong (Wed, 06 Jun 2018 03:04:48 GMT):
this sendTransationProposal failed

wangdong (Wed, 06 Jun 2018 03:05:58 GMT):
you can check the log or peer to see what happened.

bh4rtp (Wed, 06 Jun 2018 03:12:45 GMT):
i cannot see any error message from peer log

bh4rtp (Wed, 06 Jun 2018 03:14:56 GMT):
```[INFO] invoke-chaincode - Received ProposalResponse: Status - 200, message - "", metadata - "f273749994107404636c4501ed9a84e372ae7066b3cc422138dd3fc0a74d6703", endorsement signature: 0D ���uA���Ǎ�4*�+�kPW>�`j�׉�^=�T��}�U^U!Bl��O�2�[F���```

JigneshVasoya (Wed, 06 Jun 2018 03:22:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=usugX2gs4RfgMy6c4) @bretharrison I'm not using any 'fabric-shim' package in package.json. I install the chaincode by using fabric-client (1.1.2) I think I need to update shim package on peer where I instantiate the chaincode, but I don't know how

bh4rtp (Wed, 06 Jun 2018 03:35:17 GMT):
@wangdong i only found error message about couchdb. is this matter? ```[couchdb] handleRequest -> DEBU aaf HTTP Request: GET /eprich1_lscc/trade?attachments=true HTTP/1.1 | Host: couchdb2:5984 | User-Agent: Go-http-client/1.1 | Accept: multipart/related | Accept-Encoding: gzip | | [couchdb] handleRequest -> DEBU ab0 Couch DB Error:not_found, Status Code:404, Reason:missing [couchdb] ReadDoc -> DEBU ab1 Document not found (404), returning nil value instead of 404 error```

bh4rtp (Wed, 06 Jun 2018 03:35:17 GMT):
@wangdong i only found error message about couchdb. does this matter? ```[couchdb] handleRequest -> DEBU aaf HTTP Request: GET /eprich1_lscc/trade?attachments=true HTTP/1.1 | Host: couchdb2:5984 | User-Agent: Go-http-client/1.1 | Accept: multipart/related | Accept-Encoding: gzip | | [couchdb] handleRequest -> DEBU ab0 Couch DB Error:not_found, Status Code:404, Reason:missing [couchdb] ReadDoc -> DEBU ab1 Document not found (404), returning nil value instead of 404 error```

wangdong (Wed, 06 Jun 2018 03:54:24 GMT):
The log from your js code seems right, but from the log before, that there is at least one endorsement not good. That means the endorser fails.

wangdong (Wed, 06 Jun 2018 03:55:47 GMT):
The couch db log, I prefer more with context. The error not_found, I am not sure what is missing here.

wangdong (Wed, 06 Jun 2018 04:08:38 GMT):
@JigneshVasoya The shim in peer? I think you mean fabric peer binary which is related to fabric version. I think what @bretharrison means you should install fabric-shim 1.1.2 from the node sdk side. I think the fabric -shim should be consistent with sdk version if your chain code is nodejs.

JigneshVasoya (Wed, 06 Jun 2018 05:17:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cc3wH9oEjhk3qrsHw) @wangdong Yes, I'm talking about the shim in fabric peer binary, I think that has issue because I don't use any fabric-shim at nodejs end

wangdong (Wed, 06 Jun 2018 05:34:06 GMT):
when you use nodejs chaincode, you have to install fabric-shim

wangdong (Wed, 06 Jun 2018 05:34:11 GMT):
@JigneshVasoya

JigneshVasoya (Wed, 06 Jun 2018 05:34:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3n2Ysy6BzNFQCFGQh) @wangdong It's a go chaincode, not nodejs

JigneshVasoya (Wed, 06 Jun 2018 05:34:51 GMT):
go chaincode using node sdk

wangdong (Wed, 06 Jun 2018 05:35:47 GMT):
ok

wangdong (Wed, 06 Jun 2018 05:36:14 GMT):
what is the version of the fabric

JigneshVasoya (Wed, 06 Jun 2018 05:37:46 GMT):
x86_64-1.0.0-rc1

JigneshVasoya (Wed, 06 Jun 2018 05:37:51 GMT):
of orderer and peer

wangdong (Wed, 06 Jun 2018 05:50:03 GMT):
yes, I think you'd better use Fabric 1.1.0

wangdong (Wed, 06 Jun 2018 05:50:06 GMT):
@JigneshVasoya

wangdong (Wed, 06 Jun 2018 05:50:42 GMT):
let the main version of fabric and sdk consistant.

wangdong (Wed, 06 Jun 2018 05:50:42 GMT):
let the main version of fabric and sdk consistent.

wangdong (Wed, 06 Jun 2018 05:52:05 GMT):
Please try this

JigneshVasoya (Wed, 06 Jun 2018 05:53:17 GMT):
Yes sure I will try that thanks @wangdong @bretharrison

wangdong (Wed, 06 Jun 2018 05:53:41 GMT):
@JigneshVasoya you are welcome

bh4rtp (Wed, 06 Jun 2018 06:20:54 GMT):
@wangdong the full message is as follows: ```[2018-06-06 14:19:00.679] [INFO] invoke-chaincode - { version: 0, timestamp: null, response: { status: 500, message: 'failed to execute transaction 079ddfb8cfa29f4c1f411a8020aaa1c3e599f025355c71b342a8695a50c04a17: error sending: timeout expired while executing transaction', payload: }, payload: , endorsement: null }```

bh4rtp (Wed, 06 Jun 2018 06:24:11 GMT):
how can i increase the timeout for executing transaction?

wangdong (Wed, 06 Jun 2018 06:46:10 GMT):
I don't think it is matter of timeout. This is the content of one bad endorsement, right? The peer fails to execute the transaction. So the best way to find the exact cause is to check the peer log. Why you just could not get the peer log?

wangdong (Wed, 06 Jun 2018 06:46:13 GMT):
@bh4rtp

bh4rtp (Wed, 06 Jun 2018 06:49:50 GMT):
@wangdong i found the reason `InvokeChaincde` is not commited to `dev-peer0.org2.example.com-bidcheck-v2`.

bh4rtp (Wed, 06 Jun 2018 06:50:01 GMT):
but i don't know why.

anjalinaik (Wed, 06 Jun 2018 07:14:43 GMT):
Hi All.. can anybody please help me understand what the below error is about. I am trying to create a channel.Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining

bh4rtp (Wed, 06 Jun 2018 07:31:10 GMT):
i think the issue is caused by fabric.

wangdong (Wed, 06 Jun 2018 09:10:17 GMT):
@anjalinaik Only the admin can create channel. Please make sure the member role.

anjalinaik (Wed, 06 Jun 2018 09:11:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bvHL5EXnW6ijCutYS) @wangdong Okay.I will check.Thankyou for your inputs.

anjalinaik (Wed, 06 Jun 2018 09:49:52 GMT):
Hi All. Can Somebody please help me with below error? `Error: got unexpected status: BAD_REQUEST -- Attempted to include a member which is not in the consortium`

tom.appleyard (Wed, 06 Jun 2018 10:37:26 GMT):
Does anyone know if there are typescript definitions for the incoming files?

tom.appleyard (Wed, 06 Jun 2018 10:37:26 GMT):
Does anyone know if there are typescript definitions for fabric-shim?

JigneshVasoya (Wed, 06 Jun 2018 13:28:57 GMT):
It times out when I try to connect to a peer using EventHub Nodejs SDK Is there any common thing I'm missing here?

JigneshVasoya (Wed, 06 Jun 2018 13:30:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dD2s6B4YvHigiMfFp) @anjalinaik there's something wrong with channel.tx (artifacts). Make sure you're using correct artifacts to create a channel

jadhavajay (Wed, 06 Jun 2018 14:15:59 GMT):
Hi Team, I am getting an error when I am trying to instantiate the chain-code. The error is: `[Peer.js]: sendProposal - timed out after:45000` Is there a way to increase this timeout from 45 secs to something else? anyone knows where to make this change?

vish146 (Wed, 06 Jun 2018 18:15:09 GMT):
Has joined the channel.

bh4rtp (Thu, 07 Jun 2018 02:38:14 GMT):
hi, using node sdk, how to set endorsement policy?

wangdong (Thu, 07 Jun 2018 02:44:16 GMT):
The policy should be specified when to instantiate the chain code

wangdong (Thu, 07 Jun 2018 02:44:19 GMT):
@bh4rtp

wangdong (Thu, 07 Jun 2018 02:46:16 GMT):
@jadhavajay there are so many cause for this error. This should not be the problem of time out. For the precise reason, have an eye on the log of endorser peer. You can get the exact reason I think

bh4rtp (Thu, 07 Jun 2018 02:48:07 GMT):
@wangdong is there an example? in `fabric-samples/balance-transfer`, no endorsement policy is specified.

wangdong (Thu, 07 Jun 2018 02:49:02 GMT):
the example is in e2eUtils.js in node-sdk. test/integration/e2e/e2eUtils.js

wangdong (Thu, 07 Jun 2018 02:49:10 GMT):
instantiate function

wangdong (Thu, 07 Jun 2018 02:50:52 GMT):
Also you can refer to this http://hyperledger-fabric.readthedocs.io/en/release-1.1/endorsement-policies.html

bh4rtp (Thu, 07 Jun 2018 02:53:02 GMT):
yes. i know how to specify the endorsement policy in CLI. as for balance-transfer example, is it specified in the `network-config.yaml` file?

bh4rtp (Thu, 07 Jun 2018 02:55:09 GMT):
only the endorsement peers will be instantiate chaincode. am i right?

wangdong (Thu, 07 Jun 2018 03:31:59 GMT):
For the first question, no. the policy should be specified in code when to instantiate. #2 not exactly. endorser peers just endorse the transaction. The chain code will be instantiated from the peer where it is installed.

kshitiz_leo (Thu, 07 Jun 2018 05:39:29 GMT):

Screen Shot 2018-06-05 at 12.16.12 PM.png

kshitiz_leo (Thu, 07 Jun 2018 05:40:44 GMT):
why am i getting this error while trying to use invoke.js

kshitiz_leo (Thu, 07 Jun 2018 05:41:22 GMT):
which was made using fabcar invoke.js

wangdong (Thu, 07 Jun 2018 05:55:27 GMT):
@bh4rtp about the patch you mentioned, I don't think it is merged. The code review is not passed. So if you are trying to deploy the code in production. Take care of the code.

bh4rtp (Thu, 07 Jun 2018 05:58:34 GMT):
@wangdong thanks. the issue is solved by reconfiguration of the endorsement policy.

wangdong (Thu, 07 Jun 2018 05:59:02 GMT):
sure

jadhavajay (Thu, 07 Jun 2018 06:29:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=geBEpAGoWtdv5mZ3N) @wangdong Thanks ... I will check the logs as well...

ascatox (Thu, 07 Jun 2018 07:27:26 GMT):
Has someone experience in EventHub and receiving events with sdk

ascatox (Thu, 07 Jun 2018 07:27:26 GMT):
Has someone experience in EventHub and receiving events with sdk?

ascatox (Thu, 07 Jun 2018 07:44:53 GMT):
I'm always encountering this error `Error: 2 UNKNOWN: Failed to create subchannel`

wangdong (Thu, 07 Jun 2018 07:51:14 GMT):
This error is from grpc I think

wangdong (Thu, 07 Jun 2018 07:52:24 GMT):
The connection is not ok. check the parameters especially when to use https.

ascatox (Thu, 07 Jun 2018 07:53:53 GMT):
I'm not using https but standard http

ascatox (Thu, 07 Jun 2018 07:54:29 GMT):
setPeerAddr('grpc://167.99.89.178:7053')

header340 (Thu, 07 Jun 2018 16:41:53 GMT):
Has joined the channel.

zhaochy (Fri, 08 Jun 2018 01:53:16 GMT):
@tom.appleyard currently fabric-shim does not have type definitions

abraham (Fri, 08 Jun 2018 05:31:21 GMT):
Has joined the channel.

wangrangli (Fri, 08 Jun 2018 05:33:17 GMT):
Has joined the channel.

majety.1 (Fri, 08 Jun 2018 06:30:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qfKajqSq7dRMLJBxu) anyone have solution.for this.. ? Even I'm facing the same issue

aKesav (Fri, 08 Jun 2018 07:48:15 GMT):
Has joined the channel.

majety.1 (Fri, 08 Jun 2018 08:48:15 GMT):
can anyone direct me to an node sdk tutorial so that i can connect to an front end html page

majety.1 (Fri, 08 Jun 2018 08:48:15 GMT):
can anyone direct me to an node sdk tutorial so that i can connect to an front end html page using Node SDK

suvpatil (Fri, 08 Jun 2018 08:50:20 GMT):
Hi team, can we use multiple orderer in node-sdk? If yes do we have any document for that?

purandam (Fri, 08 Jun 2018 12:18:08 GMT):
Using "Caliper " I have started the performance analysis for hyperledger fabric . As Caliper provided the sample of Fabric1.0 with the GO lang. Can anybody suggest is it working for fabric 1.1 node sdk?

migrenaa (Fri, 08 Jun 2018 14:14:12 GMT):
Hi. According to my understanding when a user is invoking a chaincode, the user has to sign the transaction with his certificates to authenticate himself. I was looking at sample code in fabcar tutorial in the hyperledger documentation, but I don't understand how exactly the request is signed. In the fabcar example the user is taken from the store but after that the user is never used. Can you please explain me how does it work?

goranovic (Sat, 09 Jun 2018 11:09:17 GMT):
Has joined the channel.

jeno.g (Sat, 09 Jun 2018 11:28:57 GMT):
Has joined the channel.

ascatox (Mon, 11 Jun 2018 10:28:30 GMT):
Hi All!Someone has experiences developing with the SDK behind a corporate proxy?

ascatox (Mon, 11 Jun 2018 10:29:08 GMT):
I always receive the error *Unavailable*

ascatox (Mon, 11 Jun 2018 10:29:08 GMT):
I always receive the error *Unavailable CONNECT FAILED*

ascatox (Mon, 11 Jun 2018 10:29:37 GMT):
It seems the problem is in grpc protocol

ascatox (Mon, 11 Jun 2018 10:29:37 GMT):
It seems the problem is in grpc protocol.

ascatox (Mon, 11 Jun 2018 10:30:00 GMT):
Has someone solutions to this problem, Thanks!!!

Luke_Chen (Mon, 11 Jun 2018 11:47:12 GMT):
Has joined the channel.

Luke_Chen (Mon, 11 Jun 2018 11:48:42 GMT):
HI, can I set HTTP headers for this url ?

Luke_Chen (Mon, 11 Jun 2018 11:48:42 GMT):
HI, can I set HTTP headers for this url ? ```// fabric_ca_client = new Fabric_CA_Client(address, tlsOptions , 'ca', crypto_suite); fabric_ca_client = new Fabric_CA_Client(url, tlsOptions , 'ca', crypto_suite);```

Luke_Chen (Mon, 11 Jun 2018 11:48:42 GMT):
HI, can I set HTTP headers for this url ? var Fabric_CA_Client = require('fabric-ca-client');fabric_ca_client = new Fabric_CA_Client(url, tlsOptions , 'ca', crypto_suite);```

Luke_Chen (Mon, 11 Jun 2018 11:48:42 GMT):
HI, can I set HTTP headers for this url ? ```var Fabric_CA_Client = require('fabric-ca-client'); fabric_ca_client = new Fabric_CA_Client(url, tlsOptions , 'ca', crypto_suite);```

Luke_Chen (Mon, 11 Jun 2018 11:48:42 GMT):
HI, can I set HTTP headers for the url ? ```var Fabric_CA_Client = require('fabric-ca-client'); fabric_ca_client = new Fabric_CA_Client(url, tlsOptions , 'ca', crypto_suite);```

ArigelaSatyanarayana (Mon, 11 Jun 2018 12:34:13 GMT):
Hi Team, We are looking for any GRPC service to get the list of orderers for the specified channel.

migrenaa (Mon, 11 Jun 2018 12:38:37 GMT):
Hi. When you are invoking chaincode using node SDK how do you specify the user that is invoking the chaincode? I was thinking that the user should create a signature with his certificate and sign the transaction, but now I am reading the documentation and I cannot find something anything like this.

sampath06 (Mon, 11 Jun 2018 14:39:03 GMT):
How do I turn on different logs in the node sdk. for example the logs in orderer.js etc?

DanielMcSheehy (Mon, 11 Jun 2018 18:48:37 GMT):
Has joined the channel.

DanielMcSheehy (Mon, 11 Jun 2018 18:51:10 GMT):
Is fabric-client supported for chrome extensions? Having errors using that npm module with webpack.

bretharrison (Mon, 11 Jun 2018 20:55:10 GMT):
@sampath06 All NodeSDK objects use the same logging. I assume you wish to turn on debug logging for the orderer, so you will just `export HFC_LOGGING='{"debug":"console"}' before starting your application

bretharrison (Mon, 11 Jun 2018 20:56:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oNyuJjHBxNC5uFikY) @ArigelaSatyanarayana There is not a call for to find the orderers yet, stay tuned for Service Discovery.

yacovm (Mon, 11 Jun 2018 20:57:06 GMT):
@ArigelaSatyanarayana there is a service in v1.2 that allows you to do that

sampath06 (Tue, 12 Jun 2018 01:58:46 GMT):
@bretharrison Thanks. How do I set this up in the config files?

wangdong (Tue, 12 Jun 2018 06:20:00 GMT):
@sampath06 I think this can also be done with "hfc-logging" in your config file.

wangdong (Tue, 12 Jun 2018 06:25:29 GMT):

Screen Shot 2018-06-12 at 2.24.53 PM.png

wangdong (Tue, 12 Jun 2018 06:25:37 GMT):
as this format.

kelvinzhong (Tue, 12 Jun 2018 06:50:00 GMT):
@bretharrison hi, I have deploy a distributed network in docker swarm, and started the application, but seems the eventhub would lost the connection if there have no transaction for a while, how can I debug this? BTW, I have already set the keep alive param for the eventhub when I construct it.

MarcelvandeKerkhof (Tue, 12 Jun 2018 10:17:05 GMT):
Has joined the channel.

bretharrison (Tue, 12 Jun 2018 11:10:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jfev6tNx99gr4BBhw) @migrenaa The `Client` instance must have a user assigned to it. This actually means that it has a user identity. An identity is made up of a private key and a certificate. The `getUserContext()` method of the `Client` will both retrieve the user's identity from the stores and assign it to the client instance. The Client object uses the key to sign all outbound requests and includes the certificate for verification by the fabric network peer or orderer.

purandam (Tue, 12 Jun 2018 11:14:26 GMT):
I am using fabric node sdk for my application . I want to invoke http request from my chain code. Http invoking section is worked perfectly. But it is not returning to my middle layer. But I able to all console that I have received from the http request.

purandam (Tue, 12 Jun 2018 11:14:26 GMT):
I am using fabric node sdk for my application . I want to invoke http request from my chain code. Http invoking section is worked perfectly. But it is not returning to my middle layer. But I able to all console that I have received from the http request. http.get('http://nodejs.org/dist/index.json', (res) => { const { statusCode } = res; const contentType = res.headers['content-type']; let error; if (statusCode !== 200) { error = new Error('Request Failed.\n' + `Status Code: ${statusCode}`); } else if (!/^application\/json/.test(contentType)) { error = new Error('Invalid content-type.\n' + `Expected application/json but received ${contentType}`); } if (error) { console.error(error.message); // consume response data to free up memory res.resume(); return; } res.setEncoding('utf8'); let rawData = ''; res.on('data', (chunk) => { rawData += chunk; }); res.on('end', () => { try { const parsedData = JSON.parse(rawData); console.log(parsedData); return parsedData; } catch (e) { console.error(e.message); } }); }).on('error', (e) => { console.error(`Got error: ${e.message}`); });

purandam (Tue, 12 Jun 2018 11:14:26 GMT):
I am using fabric node sdk for my application . I want to invoke http request from my chain code. Http invoking section is worked perfectly. But it is not returning to my middle layer. But I able to all console that I have received from the http request. http.get('http://nodejs.org/dist/index.json', (res) => { const { statusCode } = res; const contentType = res.headers['content-type']; let error; if (statusCode !== 200) { error = new Error('Request Failed.\n' + `Status Code: ${statusCode}`); } else if (!/^application\/json/.test(contentType)) { error = new Error('Invalid content-type.\n' + `Expected application/json but received ${contentType}`); } if (error) { console.error(error.message); // consume response data to free up memory res.resume(); return; } res.setEncoding('utf8'); let rawData = ''; res.on('data', (chunk) => { rawData += chunk; }); res.on('end', () => { try { const parsedData = JSON.parse(rawData); console.log(parsedData); return parsedData; } catch (e) { console.error(e.message); } }); }).on('error', (e) => { console.error(`Got error: ${e.message}`); });

purandam (Tue, 12 Jun 2018 11:14:26 GMT):
I am using fabric node sdk for my application . I want to invoke http request from my chain code. Http invoking section is worked perfectly. But it is not returning to my middle layer. But I able to all console that I have received from the http response. but middle it is returning NULL value. How to solve this issue? Is there any timeout problem ? http.get('http://nodejs.org/dist/index.json', (res) => { const { statusCode } = res; const contentType = res.headers['content-type']; let error; if (statusCode !== 200) { error = new Error('Request Failed.\n' + `Status Code: ${statusCode}`); } else if (!/^application\/json/.test(contentType)) { error = new Error('Invalid content-type.\n' + `Expected application/json but received ${contentType}`); } if (error) { console.error(error.message); // consume response data to free up memory res.resume(); return; } res.setEncoding('utf8'); let rawData = ''; res.on('data', (chunk) => { rawData += chunk; }); res.on('end', () => { try { const parsedData = JSON.parse(rawData); console.log(parsedData); return parsedData; } catch (e) { console.error(e.message); } }); }).on('error', (e) => { console.error(`Got error: ${e.message}`); });

purandam (Tue, 12 Jun 2018 11:14:26 GMT):
I am using fabric node sdk for my application . I want to invoke http url from my chain code. Http invoking section is worked perfectly. But it is not returning any value to my middle layer. But I able to see all response for the http call. But in middle layer it is returning NULL value. How to solve this issue? http.get('http://nodejs.org/dist/index.json', (res) => { const { statusCode } = res; const contentType = res.headers['content-type']; let error; if (statusCode !== 200) { error = new Error('Request Failed.\n' + `Status Code: ${statusCode}`); } else if (!/^application\/json/.test(contentType)) { error = new Error('Invalid content-type.\n' + `Expected application/json but received ${contentType}`); } if (error) { console.error(error.message); // consume response data to free up memory res.resume(); return; } res.setEncoding('utf8'); let rawData = ''; res.on('data', (chunk) => { rawData += chunk; }); res.on('end', () => { try { const parsedData = JSON.parse(rawData); console.log(parsedData); return parsedData; } catch (e) { console.error(e.message); } }); }).on('error', (e) => { console.error(`Got error: ${e.message}`); });

bretharrison (Tue, 12 Jun 2018 11:18:35 GMT):
@sampath06 You can put the `hfc-logging` settings in the `fabric-client/config/default.json` confiig file. Since the logging is setup when the fabric-client is loaded, the logging settings will have to be in `default.json` file or it will not be read by the logging initialization code. You may be using another config file or you could be set the config setting programmatically, however these would be applied after the logging has initialized and would not seen.

bretharrison (Tue, 12 Jun 2018 11:26:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZLZteEEDgkMQbj8tu) @suvpatil The application may wish to have a list of orderers and pass one of them on the call ``` const orderers = [];

bretharrison (Tue, 12 Jun 2018 11:26:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZLZteEEDgkMQbj8tu) @suvpatil The application may wish to have a list of orderers and pass one of them on the call ``` const orderers = []; // build an orderer const orderer1 = client.newOrderer(......); orderers.push(orderer1); ... ... // first try channel.sendTransaction( { orderer : orderer[0] ... ```

suvpatil (Tue, 12 Jun 2018 12:23:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8SpGxanugL6cnzCgA) @bretharrison Yes, but can we dynamically shift the orderer e.g. if one orderer gets down then all transactions will automatically moved to other available orderer.

bretharrison (Tue, 12 Jun 2018 12:42:26 GMT):
@suvpatil The application is responsible for determining what is a failure and to retry with the same orderer or a different orderer

kshitiz_leo (Tue, 12 Jun 2018 13:47:33 GMT):

Screen Shot 2018-06-05 at 12.16.12 PM.png

kshitiz_leo (Tue, 12 Jun 2018 13:47:49 GMT):
anyone can tell me why am i getting this error

kshitiz_leo (Tue, 12 Jun 2018 13:47:50 GMT):
??

bretharrison (Tue, 12 Jun 2018 17:06:52 GMT):
@kshitiz_leo UNAVAILABLE usually means the peer endpoint is not there, have you started the Peer?

DannyWong (Wed, 13 Jun 2018 03:09:28 GMT):
Community, i saw the Identity Mixer now only available in Go SDK, isn't it?

DannyWong (Wed, 13 Jun 2018 03:15:54 GMT):
OMG, 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`

DannyWong (Wed, 13 Jun 2018 03:15:56 GMT):
haha....

DannyWong (Wed, 13 Jun 2018 03:22:26 GMT):
my question is... Not in Node SDK now, right?

suvpatil (Wed, 13 Jun 2018 06:00:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=D97h3Z9Gp5XYtT4i2) @bretharrison I have tried it with application, if first orderer is down in the orderer list then it will fails the transactions instead of moving to other orderer. Please suggest me the correct way.

wangdong (Wed, 13 Jun 2018 08:30:34 GMT):
@DannyWong it is in progress.

DannyWong (Wed, 13 Jun 2018 08:30:46 GMT):
ic got it!

bh4rtp (Wed, 13 Jun 2018 09:00:00 GMT):
hi, does node sdk support private data feature in the master branch now?

bretharrison (Wed, 13 Jun 2018 14:24:27 GMT):
@suvpatil For NodeSDK 1.1 and earlier the application will retry using a different orderer.

bretharrison (Wed, 13 Jun 2018 14:25:39 GMT):
@DannyWong idemix is not in NodeSDK.

sampath06 (Wed, 13 Jun 2018 16:50:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=B4WGWQ5freqXaDRzw) @bretharrison If I understand correctly, fabric-client would be under node_modules and could get overwritten when doing a npm install. Is there anyway to persist these settings in my app?

bretharrison (Wed, 13 Jun 2018 17:25:30 GMT):
@sampath06 It is possible to set an additional config file, however since the log settings are read when the fabric-client is loaded, the new config file must be added before the loading the fabric-client. ``` const sdk_utils = require('fabric-client/lib/utils.js'); // the json file contains the following line // "hfc-logging": "{ \"debug\": \"console\"}", sdk_utils.addConfigFile('test/fixtures/local.json'); // could just hard code the setting //sdk_utils.setConfigSetting('hfc-logging', '{"debug": "console"}'); const Client = require('fabric-client'); ```

bretharrison (Wed, 13 Jun 2018 17:25:30 GMT):
@sampath06 It is possible to set an additional config file, however since the log settings are read when the fabric-client is loaded, the new config file must be added before loading the fabric-client. ``` const sdk_utils = require('fabric-client/lib/utils.js'); // the json file contains the following line // "hfc-logging": "{ \"debug\": \"console\"}", sdk_utils.addConfigFile('test/fixtures/local.json'); // could just hard code the setting //sdk_utils.setConfigSetting('hfc-logging', '{"debug": "console"}'); const Client = require('fabric-client'); ```

sampath06 (Wed, 13 Jun 2018 17:26:16 GMT):
Got it now. Thanks. Will try it out

DannyWong (Thu, 14 Jun 2018 07:25:16 GMT):
Community, I would like to discuss the private key storage security.... We can set the CryptoKeyStore serves as indexing mechanism around a KeyValueStore (either file based / CouchDB-based) for key put/get operations. However, the private keys store in CouchDB is still not very secure... I understand there is HSM (experimental) integration in NodeJS SDK... However, when I look into the code, it seems like it replaces the software-based `CryptoSuite_ECDSA_AES`... Any suggestion?

purandam (Thu, 14 Jun 2018 09:47:10 GMT):
Getting below error when I try to invoke the "node js" chain code. [[843804c0 PUT_STATE ERROR]]No ledger context for %!s(MISSING). Sending %!s(MISSING). If anyone have idea how it will be solved.

purandam (Thu, 14 Jun 2018 09:47:10 GMT):
Getting below error when I try to invoke the "node js" chain code. [[843804c0 PUT_STATE ERROR]]No ledger context for %!s(MISSING). Sending %!s(MISSING). How to resolve the issue?

purandam (Thu, 14 Jun 2018 09:47:10 GMT):
Getting below error when I try to invoke the "node js" chain code. [[843804c0 PUT_STATE ERROR]]No ledger context for %!s(MISSING). Sending %!s(MISSING). How to resolve the issue?

bretharrison (Thu, 14 Jun 2018 15:19:43 GMT):
@DannyWong for HSM crypto suite see `lib/bccsp_pkcs11.js`

bretharrison (Thu, 14 Jun 2018 15:19:43 GMT):
@DannyWong for HSM crypto suite see `lib/impl/bccsp_pkcs11.js` --- https://github.com/hyperledger/fabric-sdk-node/blob/release-1.1/fabric-client/lib/impl/bccsp_pkcs11.js

bretharrison (Thu, 14 Jun 2018 15:23:59 GMT):
@purandam you wish to post to #fabric-chaincode-dev

chriszhenghf (Thu, 14 Jun 2018 15:46:23 GMT):
Has joined the channel.

DannyWong (Fri, 15 Jun 2018 01:49:42 GMT):
@bretharrison Sorry I didn't state my question clearly... I looked into bccsp_pkcs11.js as well. but I am wondering after switching to this (with the config / env variable enabling it). Does that mean the private key will not be stored to CryptoKeyStore (file based /CouchDB based)

bretharrison (Fri, 15 Jun 2018 03:32:39 GMT):
Right, there is not a crypto store when using a HSM, the HSM holds the key

bretharrison (Fri, 15 Jun 2018 03:34:31 GMT):
The crypto suite decides if it needs a separate store or not.

BhaskarRaju (Fri, 15 Jun 2018 05:19:07 GMT):
Has joined the channel.

DannyWong (Fri, 15 Jun 2018 05:35:30 GMT):
great..

DannyWong (Fri, 15 Jun 2018 05:40:27 GMT):
in fact, the flow to me is still a fuzz. Say, let's try to walkthrough the tx signing flow. Assume we have 3 users (with 3 eCertA, eCertB, eCertC)

DannyWong (Fri, 15 Jun 2018 05:40:38 GMT):
with the eCert previously stored in HSM

DannyWong (Fri, 15 Jun 2018 05:41:20 GMT):
I know we need a app PIN (not SO PIN) to access to the HSM...

DannyWong (Fri, 15 Jun 2018 05:42:43 GMT):
so assuming I have a correct app PIN set to the middleware, when I try to sign a tx... Does the SDK actually retrieve the private key (by SKI, still dunno how to map the user to SKI) from HSM then sign the TX?

DannyWong (Fri, 15 Jun 2018 05:43:14 GMT):
or normally, private key should never leave HSM... so we send the tx to HSM and it will sign it and respond the signature to us?

DannyWong (Fri, 15 Jun 2018 05:43:44 GMT):
Anyone from community has experience on this?... I cant really google it lol...

AnkitSingh5 (Fri, 15 Jun 2018 07:00:59 GMT):
I am getting this error while trying to instantiate chaincode on peer1 of org1. NodeJS console error : `Failed to send Proposal and receive all good ProposalResponse Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:25005) UnhandledPromiseRejectionWarning: Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse` Blockchain console error : `ERRO 692 [[e9585782 PUT_STATE ERROR]]No ledger context for %!!(MISSING)s(MISSING). Sending %!!(MISSING)s(MISSING) ERRO 6a2 [bloqchannel][e9585782] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction` I am using Hyperledger Fabric 1.1 and Hyperledger fabric node SDK. The nodeJS version is 8.11.2. The chaincode is in golang. Any help is appreciated.

crj (Fri, 15 Jun 2018 12:42:07 GMT):
s anyone tried to use node-sdk to deploy multiple nodes for balance-transfer ? If you have some guidance on how to do it, Please do not hesitate to teach,thank you very much

crj (Fri, 15 Jun 2018 12:43:02 GMT):
has anyone tried to use node-sdk to deploy multiple nodes for balance-transfer ? If you have some guidance on how to do it, Please do not hesitate to teach,thank you very much

bh4rtp (Sat, 16 Jun 2018 02:45:50 GMT):
hi, is there a documentation about how to implement private data using node sdk? and how to use the `marbles02_private` example?

bh4rtp (Sat, 16 Jun 2018 04:20:01 GMT):
when instantiate chaincode, marbles02_private prints an error: ```Error: Invalid policy, missing the "identities" property```

bh4rtp (Sat, 16 Jun 2018 04:20:01 GMT):
when instantiate chaincode, my revised `marbles02_private` prints an error: ```Error: Invalid policy, missing the "identities" property``` the instantiate proposal is coded: ``` const collectionsConfigPath = path.resolve(__dirname, '../artifacts/src/github.com/marbles02_private/collections_config.json'); // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'admin', mspId: 'Org1MSP' }} ], policy: { '1-of': [ { 'signed-by': 2 }, { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1 }]} ] } }, 'collections-config': collectionsConfigPath, }; ```

bh4rtp (Sat, 16 Jun 2018 04:20:01 GMT):
when instantiate chaincode, my revised `marbles02_private` prints an error: `Error: Invalid policy, missing the "identities" property` the instantiate proposal is coded: ``` const collectionsConfigPath = path.resolve(__dirname, '../artifacts/src/github.com/marbles02_private/collections_config.json'); // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'admin', mspId: 'Org1MSP' }} ], policy: { '1-of': [ { 'signed-by': 2 }, { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1 }]} ] } }, 'collections-config': collectionsConfigPath, }; ```

bh4rtp (Sat, 16 Jun 2018 04:20:01 GMT):
when instantiate chaincode, my revised `marbles02_private` prints an error: `Error: Invalid policy, missing the "identities" property` the instantiate proposal is coded: ``` const collectionsConfigPath = path.resolve(__dirname, '../artifacts/src/github.com/marbles02_private/collections_config.json'); // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'admin', mspId: 'Org1MSP' }} ], policy: { '1-of': [ { 'signed-by': 2 }, { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1 }]} ] } }, 'collections-config': collectionsConfigPath, }; ```

bh4rtp (Sat, 16 Jun 2018 04:20:01 GMT):
when instantiate chaincode, my revised `marbles02_private` example prints an error: `Error: Invalid policy, missing the "identities" property` the instantiate proposal is coded: ``` const collectionsConfigPath = path.resolve(__dirname, '../artifacts/src/github.com/marbles02_private/collections_config.json'); // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'admin', mspId: 'Org1MSP' }} ], policy: { '1-of': [ { 'signed-by': 2 }, { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1 }]} ] } }, 'collections-config': collectionsConfigPath, }; ```

bh4rtp (Sat, 16 Jun 2018 04:27:42 GMT):
the endorsement policy has been given in `endoresement-policy`, why still report the error `Invalid policy, missing the "identities" property"`.

bh4rtp (Sat, 16 Jun 2018 04:27:42 GMT):
the endorsement policy has been given in `endoresement-policy`, why still report the error `Invalid policy, missing the "identities" property"`?

szytko (Sat, 16 Jun 2018 12:10:42 GMT):
Has joined the channel.

RobertDiebels (Sat, 16 Jun 2018 15:40:59 GMT):
Has joined the channel.

RobertDiebels (Sat, 16 Jun 2018 16:04:35 GMT):
Hey everyone, can someone tell me which certificates I need to have for a peer to join a channel?

DuncanMuhoro (Sun, 17 Jun 2018 11:02:36 GMT):
Has joined the channel.

kshitiz_leo (Mon, 18 Jun 2018 06:04:54 GMT):
hi, i have the same error which was present at this link and I tried the solution suggested by the comments, then i'm getting the error given in the image below. Link of the question :https://lists.hyperledger.org/g/fabric/topic/22077874?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,22077874

kshitiz_leo (Mon, 18 Jun 2018 06:05:10 GMT):

Screen Shot 2018-06-18 at 11.31.33 AM.png

RobertDiebels (Mon, 18 Jun 2018 09:19:19 GMT):
Has left the channel.

purandam (Tue, 19 Jun 2018 05:55:27 GMT):
Using node API how to check network is up or down ?

lkchao78 (Tue, 19 Jun 2018 08:28:51 GMT):
Has joined the channel.

lkchao78 (Tue, 19 Jun 2018 08:30:12 GMT):
Hello everyone, I have an error when I'm trying to create a channel with the command client.createChannel(channelRequest) : E0619 10:22:26.362727986 21121 ssl_transport_security.cc:599] Could not load any root certificate. E0619 10:22:26.362747227 21121 ssl_transport_security.cc:1400] Cannot load server root certificates. E0619 10:22:26.362768154 21121 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0619 10:22:26.362773575 21121 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7050' E0619 10:22:26.362778108 21121 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation. I'm thinking this is probably about the pem file I gave to create an instance of my orderer. Is that path the correct one to put in parameters of the newOrderer method? `pem: 'fabric/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem'` Best regards, Kevin

lkchao78 (Tue, 19 Jun 2018 08:30:12 GMT):
Hello everyone, I have an error when I'm trying to create a channel with the command client.createChannel(channelRequest) : E0619 10:22:26.362727986 21121 ssl_transport_security.cc:599] Could not load any root certificate. E0619 10:22:26.362747227 21121 ssl_transport_security.cc:1400] Cannot load server root certificates. E0619 10:22:26.362768154 21121 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0619 10:22:26.362773575 21121 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7050' E0619 10:22:26.362778108 21121 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation. I'm thinking this is probably about the pem file I gave to create an instance of my orderer. Is that path the correct one to put in parameters of the newOrderer method? `pem: 'fabric/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem'` I also tried with that file but no success: pem: 'fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem' Best regards, Kevin

lkchao78 (Tue, 19 Jun 2018 08:30:12 GMT):
Hello everyone, I have an error when I'm trying to create a channel with the command client.createChannel(channelRequest) : E0619 10:22:26.362727986 21121 ssl_transport_security.cc:599] Could not load any root certificate. E0619 10:22:26.362747227 21121 ssl_transport_security.cc:1400] Cannot load server root certificates. E0619 10:22:26.362768154 21121 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0619 10:22:26.362773575 21121 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7050' E0619 10:22:26.362778108 21121 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation. I'm thinking this is probably about the pem file I gave to create an instance of my orderer. Is that path the correct one to put in parameters of the newOrderer method? `pem: 'fabric/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem'` I also tried with that file but no success: `pem: 'fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem'` Best regards, Kevin

wangdong (Tue, 19 Jun 2018 08:40:24 GMT):
@RobertDiebels the joinChannel is done by admin of organization. So you will have to enroll the admin of user org first to get the Ecert and key to communicate with orderer to fetch the genesis block and the peer to be joined.

RobertDiebels (Tue, 19 Jun 2018 08:40:25 GMT):
Has joined the channel.

wangdong (Tue, 19 Jun 2018 08:41:29 GMT):
@kshitiz_leo I think it is format of the cert matters. Please check it.

RobertDiebels (Tue, 19 Jun 2018 08:42:21 GMT):
@wangdong Thank you for answereing. Turned out the error was caused by the code I was using. Certificates were fine.

RobertDiebels (Tue, 19 Jun 2018 08:42:21 GMT):
@wangdong Thank you for answreing. Turned out the error was caused by the code I was using. Certificates were fine.

RobertDiebels (Tue, 19 Jun 2018 08:42:21 GMT):
@wangdong Thank you for answering. Turned out the error was caused by the code I was using. Certificates were fine.

RobertDiebels (Tue, 19 Jun 2018 08:44:38 GMT):
It had something to do with the feature request I just filed: https://jira.hyperledger.org/browse/FAB-10707 apparently the code was using the key's in the organizations Map to do some funky things which I didn't know about.

RobertDiebels (Tue, 19 Jun 2018 08:44:38 GMT):
It had something to do with the feature request I just filed: https://jira.hyperledger.org/browse/FAB-10707 apparently the code was using the keys in the organizations Map to do some funky things which I didn't know about.

wangdong (Tue, 19 Jun 2018 08:44:44 GMT):
@lkchao78 that's is not right. Please check it and refer to the example in node sdk test/integration/e2e/createChannel.js and also config.json.

lkchao78 (Tue, 19 Jun 2018 08:48:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=C52auH4rusFscnD8a) @wangdong Ok thanks I didn't know there was some example except from the fabric samples. I'm gonna to check now then

lkchao78 (Tue, 19 Jun 2018 08:48:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=C52auH4rusFscnD8a) @wangdong Ok thanks I didn't know there was some examples except from the fabric samples. I'm gonna to check it now.

wangdong (Tue, 19 Jun 2018 08:53:02 GMT):
@RobertDiebels emm, the code stats no different on the effect. I don't think it is the cause of the code.

wangdong (Tue, 19 Jun 2018 08:54:03 GMT):
@bh4rtp did you use the default policy? if not try to debug with default one first

RobertDiebels (Tue, 19 Jun 2018 08:55:51 GMT):
@wangdong I was using Caliper. And I can confirm that I used a wrong key which was taken as a name/identifier for an organization in some bit of the code. Causing a problem later on.

RobertDiebels (Tue, 19 Jun 2018 08:56:46 GMT):
I thought the problem was my certificates but it later turned out it wasn't.

RobertDiebels (Tue, 19 Jun 2018 08:58:17 GMT):
Either way the way the connection profile is structured right now can cause problems and decreases code quality.

bh4rtp (Tue, 19 Jun 2018 08:59:32 GMT):
@wangdong policy was set in network-config.yaml file. now collections-config.json has policy too. do these two configuration affect each other?

bh4rtp (Tue, 19 Jun 2018 08:59:32 GMT):
@wangdong policy was set in `network-config.yaml` file. now `collections-config.json` has policy for private data. do these two configurations affect each other?

bh4rtp (Tue, 19 Jun 2018 08:59:32 GMT):
@wangdong endorsement policy was set in `network-config.yaml` file. now `collections-config.json` has endorsement policy for private data. do these two configurations affect each other?

wangdong (Tue, 19 Jun 2018 09:04:42 GMT):
maybe, try with only one applied.

bh4rtp (Tue, 19 Jun 2018 09:32:49 GMT):
is that an answer? :wink:

wangdong (Tue, 19 Jun 2018 10:34:54 GMT):
The policy is chaincode related, They should not have conflicts with each other. But I have not deploy the private data. From the error, it is like the conflict between policy. Just try it.

bh4rtp (Tue, 19 Jun 2018 13:10:30 GMT):
the private data solution is a good choice. but from respect of sdk, there are many conflicts. how about the invocation with private data, authorized private data and public access or both or all of them, need client know the implementation of the chaincode?

timw255 (Tue, 19 Jun 2018 18:01:00 GMT):
Has joined the channel.

Legiit (Wed, 20 Jun 2018 08:50:36 GMT):
Heya! Quick question - writing chaincode in Javascript, are there any restrictions (not implemented methods or such) compared to Go?

pankajcheema (Wed, 20 Jun 2018 09:59:42 GMT):
A very silly question. instead of passing `Array of string` as `argument array` to `chaincode` can we pass object to chaincode directly?

l1nux (Wed, 20 Jun 2018 17:02:49 GMT):
Hi I am using fabric-sdk verion 1.1.0... was getting this the following error, any idea: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 1 CANCELLED: Received http2 header with status: 503

l1nux (Wed, 20 Jun 2018 17:02:49 GMT):
Hi I am using fabric-sdk verion 1.1.0... was getting this the following error, any idea: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 1 CANCELLED: Received http2 header with status: 503

l1nux (Wed, 20 Jun 2018 17:02:49 GMT):
Hi I am using fabric-sdk verion 1.1.0... was getting this the following error, any idea: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 1 CANCELLED: Received http2 header with status: 503 I am using https and grpcs protocol

Villarreal (Thu, 21 Jun 2018 01:53:55 GMT):
Has joined the channel.

vladyslavmunin (Thu, 21 Jun 2018 15:16:27 GMT):
Hi all, got error 'Invalid request body: json: cannot unmarshal object into Go struct field caNameReqBody.caname ' during enrollment ` let enrollment = await this.caClient.enroll({ enrollmentID: username, enrollmentSecret: password });` on ca , in logs I have only this error message. can smb help me?

suvpatil (Fri, 22 Jun 2018 06:00:15 GMT):
Hi Team, I am trying to code endorsement policies in the node sdk. But getting below error "access denied: channel [mychannel] creator org [Org3MSP]". There is no issue of JWT token. But after digging got to know its due to channel.initialize(). Initialize function worked well with org1 but gives error with org2 and org3. Not understood this behaviour. Please let me know what operation need to perform to add endorsement policy in fabric 1.1 My endorsement policy is: var twoMemberPolicy1 = { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }}, { role: { name: 'admin', mspId: 'Org1MSP' }} ], policy: { '1-of': [ { 'signed-by': 2}, { '2-of': [{ 'signed-by': 0}, { 'signed-by': 1 }]} ] } };

zhaochy (Fri, 22 Jun 2018 07:55:18 GMT):
@suvpatil it seems your channel "mychannel" does not contain the org with MSPId "Org3MSP", please check your genesis block config.

bh4rtp (Fri, 22 Jun 2018 08:55:50 GMT):
hi, i found the instantiate chaincode in node sdk cannot specify `endorsement-policy` and `collections-config` simultaneously, while fabric cli can.

paul.sitoh (Fri, 22 Jun 2018 11:01:26 GMT):
Folks, I am getting this error from the SDK `Error: No identity has been assigned to this client`. How do I assign an identity to the SDK?

nvxtien (Fri, 22 Jun 2018 11:27:47 GMT):
Has joined the channel.

mmick (Fri, 22 Jun 2018 12:09:39 GMT):
Can i use sdk node to maintain channel, add or remove msps or peers from an organization?

wangdong (Fri, 22 Jun 2018 14:03:12 GMT):
@bh4rtp what is the error?

wangdong (Fri, 22 Jun 2018 14:03:44 GMT):
@paul.sitoh did you enroll the user. enroll it the get the user context

wangdong (Fri, 22 Jun 2018 14:07:33 GMT):
@mmick I don't think node sdk supports to remove peers now. Maybe this can be done by revoking its identity.

paul.sitoh (Fri, 22 Jun 2018 14:08:35 GMT):
Found the problem now. It is this, if we are using `admin` as enrolled user. In other words, you will have to do this client.newTransactionID(true);

paul.sitoh (Fri, 22 Jun 2018 14:08:35 GMT):
Found the problem now. It is this, if we are using `admin` as enrolled user. In other words, you will have to do this `client.newTransactionID(true)`;

paul.sitoh (Fri, 22 Jun 2018 14:47:02 GMT):
I have just hit another error ```E0622 15:46:07.884881000 140735831692160 ssl_transport_security.cc:599] Could not load any root certificate. E0622 15:46:07.884930000 140735831692160 ssl_transport_security.cc:1400] Cannot load server root certificates. E0622 15:46:07.884969000 140735831692160 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0622 15:46:07.884980000 140735831692160 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7051' E0622 15:46:07.884988000 140735831692160 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation. E0622 15:46:07.885168000 140735831692160 ssl_transport_security.cc:599] Could not load any root certificate. E0622 15:46:07.885182000 140735831692160 ssl_transport_security.cc:1400] Cannot load server root certificates. E0622 15:46:07.885197000 140735831692160 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0622 15:46:07.885206000 140735831692160 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7051' E0622 15:46:07.885214000 140735831692160 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation.```

paul.sitoh (Fri, 22 Jun 2018 14:47:02 GMT):
I have just hit another error when I initiate channel.sendTransactionProposal ```E0622 15:46:07.884881000 140735831692160 ssl_transport_security.cc:599] Could not load any root certificate. E0622 15:46:07.884930000 140735831692160 ssl_transport_security.cc:1400] Cannot load server root certificates. E0622 15:46:07.884969000 140735831692160 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0622 15:46:07.884980000 140735831692160 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7051' E0622 15:46:07.884988000 140735831692160 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation. E0622 15:46:07.885168000 140735831692160 ssl_transport_security.cc:599] Could not load any root certificate. E0622 15:46:07.885182000 140735831692160 ssl_transport_security.cc:1400] Cannot load server root certificates. E0622 15:46:07.885197000 140735831692160 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0622 15:46:07.885206000 140735831692160 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7051' E0622 15:46:07.885214000 140735831692160 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation.```

paul.sitoh (Fri, 22 Jun 2018 14:47:02 GMT):
I have just hit another error when I initiate channel.sendTransactionProposal ```E0622 15:46:07.884881000 140735831692160 ssl_transport_security.cc:599] Could not load any root certificate. E0622 15:46:07.884930000 140735831692160 ssl_transport_security.cc:1400] Cannot load server root certificates. E0622 15:46:07.884969000 140735831692160 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0622 15:46:07.884980000 140735831692160 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7051' E0622 15:46:07.884988000 140735831692160 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation. E0622 15:46:07.885168000 140735831692160 ssl_transport_security.cc:599] Could not load any root certificate. E0622 15:46:07.885182000 140735831692160 ssl_transport_security.cc:1400] Cannot load server root certificates. E0622 15:46:07.885197000 140735831692160 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0622 15:46:07.885206000 140735831692160 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7051' E0622 15:46:07.885214000 140735831692160 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation.```. I used cyrptoconfig to generate certs and keys. I have mounted the certs and keys via the connection profile.

paul.sitoh (Fri, 22 Jun 2018 14:47:02 GMT):
I have just hit another error when I initiate channel.sendTransactionProposal ```E0622 15:46:07.884881000 140735831692160 ssl_transport_security.cc:599] Could not load any root certificate. E0622 15:46:07.884930000 140735831692160 ssl_transport_security.cc:1400] Cannot load server root certificates. E0622 15:46:07.884969000 140735831692160 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0622 15:46:07.884980000 140735831692160 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7051' E0622 15:46:07.884988000 140735831692160 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation. E0622 15:46:07.885168000 140735831692160 ssl_transport_security.cc:599] Could not load any root certificate. E0622 15:46:07.885182000 140735831692160 ssl_transport_security.cc:1400] Cannot load server root certificates. E0622 15:46:07.885197000 140735831692160 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0622 15:46:07.885206000 140735831692160 secure_channel_create.cc:111] Failed to create secure subchannel for secure name 'localhost:7051' E0622 15:46:07.885214000 140735831692160 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation.```. I used cyrptogen to generate certs and keys. I have mounted the certs and keys via the connection profile.

paul.sitoh (Fri, 22 Jun 2018 14:52:46 GMT):
```Org1: mspid: Org1MSP peers: - peer0.org1.example.com # [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: - ca-aladdin # [Optional]. If the application is going to make requests that are reserved to organization # administrators, including creating/updating channels, installing/instantiating chaincodes, it # must have access to the admin identity represented by the private key and signing certificate. # Both properties can be the PEM string or local path to the PEM file. Note that this is mainly for # convenience in development mode, production systems should not expose sensitive information # this way. The SDK should allow applications to set the org admin identity via APIs, and only use # this route as an alternative when it exists. adminPrivateKey: pem: "-----BEGIN PRIVATE KEY----- -----" signedCert: pem: "-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----"``` ```

paul.sitoh (Fri, 22 Jun 2018 14:52:46 GMT):
```Org1: mspid: Org1MSP peers: - peer0.org1.example.com # [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: - ca-org1 # [Optional]. If the application is going to make requests that are reserved to organization # administrators, including creating/updating channels, installing/instantiating chaincodes, it # must have access to the admin identity represented by the private key and signing certificate. # Both properties can be the PEM string or local path to the PEM file. Note that this is mainly for # convenience in development mode, production systems should not expose sensitive information # this way. The SDK should allow applications to set the org admin identity via APIs, and only use # this route as an alternative when it exists. adminPrivateKey: pem: "-----BEGIN PRIVATE KEY----- -----" signedCert: pem: "-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----"``` ```

paul.sitoh (Fri, 22 Jun 2018 14:52:46 GMT):
```Org1: mspid: Org1MSP peers: - peer0.org1.example.com # [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: - ca-org1 # [Optional]. If the application is going to make requests that are reserved to organization # administrators, including creating/updating channels, installing/instantiating chaincodes, it # must have access to the admin identity represented by the private key and signing certificate. # Both properties can be the PEM string or local path to the PEM file. Note that this is mainly for # convenience in development mode, production systems should not expose sensitive information # this way. The SDK should allow applications to set the org admin identity via APIs, and only use # this route as an alternative when it exists. adminPrivateKey: pem: "-----BEGIN PRIVATE KEY----- -----" signedCert: pem: "-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----"```

RobertDiebels (Fri, 22 Jun 2018 15:43:12 GMT):
Could someone take a look at this: https://stackoverflow.com/questions/50963477/hyperledger-fabric-cant-find-go-files-when-building-chaincode ?

paul.sitoh (Sat, 23 Jun 2018 12:18:58 GMT):
It appears the SDK is having problem with TLS.

paul.sitoh (Sat, 23 Jun 2018 12:19:40 GMT):
Has anyone encountered similar problem?

paul.sitoh (Sat, 23 Jun 2018 12:21:21 GMT):
Also how do you turn off TLS for SDK via the connection profile?

sureshtedla (Sat, 23 Jun 2018 23:31:12 GMT):
Has joined the channel.

bh4rtp (Sun, 24 Jun 2018 09:16:15 GMT):
the node sdk 1.2.0-rc1 still has bug with private data. for marbles02_private example, initMarble failed with errors: ```[2018-06-24 17:13:14.481] [ERROR] invoke-chaincode - invoke chaincode proposal was bad {"version":0,"timestamp":null,"response":{"status":500,"message":"Failed to get marble: GET_STATE failed: transaction ID: 17c7c487a6c0ade9bf2339da6ec1df54929717ec4e20146219a3c61c35f5875f: collection config not define for namespace [marblesp]","payload":{"type":"Buffer","data":[]}},"payload":{"type":"Buffer","data":[10,32,154,144,91,96,254,178,133,132,158,95,1,5,99,63,243,115,72,151,183,155,106,22,131,178,9,115,211,193,244,74,147,213,18,247,1,10,49,18,47,10,4,108,115,99,99,18,39,10,14,10,8,109,97,114,98,108,101,115,112,18,2,8,1,10,21,10,19,109,97,114,98,108,101,115,112,126,99,111,108,108,101,99,116,105,111,110,26,181,1,8,244,3,18,175,1,70,97,105,108,101,100,32,116,111,32,103,101,116,32,109,97,114,98,108,101,58,32,71,69,84,95,83,84,65,84,69,32,102,97,105,108,101,100,58,32,116,114,97,110,115,97,99,116,105,111,110,32,73,68,58,32,49,55,99,55,99,52,56,55,97,54,99,48,97,100,101,57,98,102,50,51,51,57,100,97,54,101,99,49,100,102,53,52,57,50,57,55,49,55,101,99,52,101,50,48,49,52,54,50,49,57,97,51,99,54,49,99,51,53,102,53,56,55,53,102,58,32,99,111,108,108,101,99,116,105,111,110,32,99,111,110,102,105,103,32,110,111,116,32,100,101,102,105,110,101,32,102,111,114,32,110,97,109,101,115,112,97,99,101,32,91,109,97,114,98,108,101,115,112,93,34,10,18,8,109,97,114,98,108,101,115,112]},"endorsement":null}```

bh4rtp (Sun, 24 Jun 2018 09:27:54 GMT):
sorry, i got the wrong branch.

bh4rtp (Sun, 24 Jun 2018 09:27:54 GMT):
sorry, i cloned from the wrong branch.

mmick (Sun, 24 Jun 2018 11:48:28 GMT):
Is fabric Node SDK different from native nodejs chaincode? Would you please link me to nodejs chaincode documentation?

bh4rtp (Mon, 25 Jun 2018 01:47:33 GMT):
create channel failed using node sdk 1.2.0 rc1, while previous version was ok. the following line is error message. ```[2018-06-25 09:42:02.145] [ERROR] Create-Channel - Error: A user context has not been assigned to this client```

bh4rtp (Mon, 25 Jun 2018 01:47:33 GMT):
create channel failed using node sdk latest master branch, while previous version was ok. the following line is error message. ```[2018-06-25 09:42:02.145] [ERROR] Create-Channel - Error: A user context has not been assigned to this client```

Legiit (Mon, 25 Jun 2018 08:59:37 GMT):
Did you find a solution? @Pail

Legiit (Mon, 25 Jun 2018 08:59:37 GMT):
Did you find a solution? @paul.sitoh

RobertDiebels (Mon, 25 Jun 2018 13:51:38 GMT):
@jimthematrix Jim, I realize you're probably super busy, but could you please look at this? https://stackoverflow.com/questions/50963477/hyperledger-fabric-cant-find-go-files-when-building-chaincode I've looked at this problem for 4 days now and I can't find any solution what so ever. Nor any documentation on how to properly install and instantiate chaincode via the Node SDK.

RobertDiebels (Mon, 25 Jun 2018 13:51:38 GMT):
@jimthematrix Jim, I realize you're probably super busy, but could you please look at this? https://stackoverflow.com/questions/50963477/hyperledger-fabric-cant-find-go-files-when-building-chaincode I've looked at this problem for 4 days now and I can't find any solution. Nor any documentation on how to properly install and instantiate chaincode via the Node SDK.

bh4rtp (Mon, 25 Jun 2018 16:08:23 GMT):
i wasted a whole day to solve above error user context issue, but failed. notice that node sdk 1.2 haven't not been released. and the master branch does surely have bugs.

qingsongGuo (Tue, 26 Jun 2018 02:18:07 GMT):
Has joined the channel.

wangdong (Tue, 26 Jun 2018 07:22:13 GMT):
if you are sure of this, you can open an PR in jira

wangdong (Tue, 26 Jun 2018 07:22:17 GMT):
@bh4rtp

anjalinaik (Tue, 26 Jun 2018 07:53:34 GMT):
hi All..can anyboy please help me understand below error? `Error: got unexpected status: SERVICE_UNAVAILABLE -- will not enqueue, consenter for this channel hasn't started yet`

wangdong (Tue, 26 Jun 2018 08:27:31 GMT):
how did you start the network

wangdong (Tue, 26 Jun 2018 08:27:31 GMT):
how did you start the network?

Saachi (Tue, 26 Jun 2018 11:02:47 GMT):
Has joined the channel.

Saachi (Tue, 26 Jun 2018 11:04:36 GMT):
Hi , I am using hyperledger fabric samples - fabcar. How can I view the user's certificate (in hfc-key-store)

pwx603 (Tue, 26 Jun 2018 13:18:05 GMT):
Has joined the channel.

bh4rtp (Tue, 26 Jun 2018 14:25:32 GMT):
@wangdong the issue is fixed. in `create_channel.js` of `balance-transfer`, username is missed from `client.getClientForOrg`.

lkchao78 (Tue, 26 Jun 2018 15:53:26 GMT):
Hello, I would like to know if it's possible to enroll a peer and an orderer with the node SDK. Because right now I'm using cryptogen to generate my crypto material but I always faield to connect to my nodes with the SDK.

lkchao78 (Tue, 26 Jun 2018 15:53:26 GMT):
Hello, I would like to know if it's possible to enroll a peer and an orderer with the node SDK. Because right now I'm using cryptogen to generate my crypto material but I always failed to connect to my nodes with the SDK.

dselman (Tue, 26 Jun 2018 17:42:04 GMT):
I've created a HLF v1.1 Node sample that shows how to embed the Accord Project Cicero Smart Legal Contract runtime. I plan to show this at the Hyperledger Hackfest in Amsterdam on Thursday. I'd welcome any feedback, PRs/issues. Thanks! https://github.com/accordproject/fabric-samples/tree/release-1.1/cicero

lkchao78 (Wed, 27 Jun 2018 07:45:02 GMT):
Hello, in the User class page there is a sentence that confuses me : "Sometimes User identities are confused with Peer identities." From what I understand of it, doing an enrollment is generating an user identity. Then how can I generate a peer identity with the SDK? To be more specific, what I would like to know is how I am supposed to create for a node (orderer/peer) its msp directory with the crypto-material with fabric-ca (with node sdk if possible). Thanks

lkchao78 (Wed, 27 Jun 2018 07:45:02 GMT):
Hello, in the User class page there is a sentence that confuses me : "Sometimes User identities are confused with Peer identities." From what I understand of it, doing an enrollment is generating an user identity. Then how can I generate a peer identity with the SDK? To be more specific, what I would like to know is how I am supposed to create for a node (orderer/peer) its msp directory with the crypto-material with fabric-ca (with node sdk if possible). Thanks

paul.sitoh (Wed, 27 Jun 2018 07:50:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hGAErTPujDj7kuZ4r) @Legiit Yes I did. Use node v8.9.4

paul.sitoh (Wed, 27 Jun 2018 07:50:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hGAErTPujDj7kuZ4r) @Legiit Yes I did. Use node v8.9.4. And the PEM attribute in the "connection-profile" didn't work. Had to change to path attribute.

paul.sitoh (Wed, 27 Jun 2018 07:50:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hGAErTPujDj7kuZ4r) @Legiit Yes I did. Use node v8.9.4. And the PEM attribute in the "connection-profile" didn't work. Had to change to path attribute.

RobertDiebels (Wed, 27 Jun 2018 08:15:35 GMT):
Has left the channel.

jeevas (Wed, 27 Jun 2018 09:24:27 GMT):
Hi, while calling queryTransaction method its returning ProcessedTransaction(https://fabric-sdk-node.github.io/global.html#ProcessedTransaction) object in that i need to take defined validation codes(https://github.com/hyperledger/fabric/blob/v1.0.0/protos/peer/transaction.proto#L125). how can i call from explorer and take enum value?

lkchao78 (Wed, 27 Jun 2018 13:58:34 GMT):
Hello, I'm trying to use the crypto material I generated for my org1 with the tool *cryptogen*. But I can't find the UserContext when I want to connect to it. So my guess is that I didn't give the right path for the store functions (newCryptoKeyStore, newDefaultKeyValueStore) Here is the code : `let client = new Client(); let public_certificate = 'fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts'; let stateStore = await Client.newDefaultKeyValueStore( {path: public_certificate} ); client.setStateStore(stateStore); let public_private_key = 'fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore'; let cryptoStore = Client.newCryptoKeyStore({path: public_private_key}); let cryptoSuite = Client.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(cryptoStore); client.getUserContext('Admin@org1.example.com', true); //result is null` Thanks

lkchao78 (Wed, 27 Jun 2018 13:58:34 GMT):
Hello, I'm trying to use the crypto material I generated for my org1 with the tool *cryptogen*. But I can't find the UserContext when I want to connect to it. So my guess is that I didn't give the right path for the store functions (newCryptoKeyStore, newDefaultKeyValueStore). But I don't know which files is supposed to be taken then. So if someone could help me it would be nice. Thanks Here is the code : `let client = new Client(); let public_certificate = 'fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts'; let stateStore = await Client.newDefaultKeyValueStore( {path: public_certificate} ); client.setStateStore(stateStore); let public_private_key = 'fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore'; let cryptoStore = Client.newCryptoKeyStore({path: public_private_key}); let cryptoSuite = Client.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(cryptoStore); client.getUserContext('Admin@org1.example.com', true); //result is null`

lkchao78 (Wed, 27 Jun 2018 13:58:34 GMT):
Hello, I'm trying to use the crypto material I generated for my org1 with the tool *cryptogen*. But I can't find the UserContext when I want to connect to it. So my guess is that I didn't give the right path for the store functions (newCryptoKeyStore, newDefaultKeyValueStore). But I don't know which files is supposed to be taken then. So if someone could help me it would be nice. Thanks Here is the code : let client = new Client(); let public_certificate = 'fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts'; let stateStore = await Client.newDefaultKeyValueStore( {path: public_certificate} ); client.setStateStore(stateStore); let public_private_key = 'fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore'; let cryptoStore = Client.newCryptoKeyStore({path: public_private_key}); let cryptoSuite = Client.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(cryptoStore); client.getUserContext('Admin@org1.example.com', true); //result is null

lkchao78 (Wed, 27 Jun 2018 13:58:34 GMT):
Hello, I'm trying to use the crypto material I generated for my *org1* with the tool *cryptogen*. But I can't find the UserContext when I want to connect to it. So my guess is that I didn't give the right path for the store functions (newCryptoKeyStore, newDefaultKeyValueStore). But I don't know which files is supposed to be taken then. So if someone could help me it would be nice. Thanks Here is the code : let client = new Client(); let public_certificate = '*fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts*'; let stateStore = await Client.newDefaultKeyValueStore( {path: public_certificate} ); client.setStateStore(stateStore); let public_private_key = '*fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore*'; let cryptoStore = Client.newCryptoKeyStore({path: public_private_key}); let cryptoSuite = Client.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(cryptoStore); client.getUserContext('Admin@org1.example.com', true); //result is null

lkchao78 (Wed, 27 Jun 2018 13:58:34 GMT):
Hello, I'm trying to use the crypto material I generated for my *org1* with the tool *cryptogen*. But I can't find the UserContext when I want to connect to it. So my guess is that I didn't give the right path for the store functions (newCryptoKeyStore, newDefaultKeyValueStore). But I don't know which files is supposed to be taken then. So if someone could help me it would be nice. Thanks Here is the code : let client = new Client(); let public_certificate = 'fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts'; let stateStore = await Client.newDefaultKeyValueStore( {path: public_certificate} ); client.setStateStore(stateStore); let public_private_key = 'fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore'; let cryptoStore = Client.newCryptoKeyStore({path: public_private_key}); let cryptoSuite = Client.newCryptoSuite(); cryptoSuite.setCryptoKeyStore(cryptoStore); client.getUserContext('Admin@org1.example.com', true); //result is null

vladyslavmunin (Wed, 27 Jun 2018 15:43:10 GMT):
Hi , are there any implementation of browser version of fabric sdk ? Found only this ticket https://jira.hyperledger.org/browse/FAB-8129 because it's not possible to use fabric node sdk on client side in web app

anjalinaik (Thu, 28 Jun 2018 06:02:03 GMT):
Hi Can anyone please help me with this error : ` Unexpected topic-level metadata error: kafka server: Replication-factor is invalid. `

anjalinaik (Thu, 28 Jun 2018 06:02:03 GMT):
Hi Can anyone please help me with this error : ` Unexpected topic-level metadata error: kafka server: Replication-factor is invalid.`

lkchao78 (Thu, 28 Jun 2018 10:41:47 GMT):
Hello, when I'm trying to use the joinChannel method I have this error. Does someone know what could be the issue? Thanks TypeError: request.block.toBuffer is not a function

lkchao78 (Thu, 28 Jun 2018 10:41:47 GMT):
Hello, when I'm trying to use the joinChannel method I have this error. Does someone know what could be the issue? Thanks `TypeError: request.block.toBuffer is not a function`

mondraymond (Thu, 28 Jun 2018 16:38:58 GMT):
Has joined the channel.

scottz (Thu, 28 Jun 2018 19:25:11 GMT):
KAFKA_DEFAULT_REPLICATION_FACTOR in the number of kafkabrokers you need to have available when creating a channel. It is <= the number of kafkabrokers you have in your ordering service.

Taffies (Fri, 29 Jun 2018 03:05:22 GMT):
Hello! I have a question which is more about javascript promises, found in the invoke files (using the fabcar for example). Sometimes when i get an error, the promise doesn't return a rejected promise even though it goes into the `catch` method. From my understanding, the `catch` method itself returns a promise returns a promise which may not be rejected, and I would have to return an error within the `catch` method itself. But examples online don't need require the return statement in order for the promise to be rejected. My questions would then be: 1) How do I know whether to return a rejected statement?

Taffies (Fri, 29 Jun 2018 03:05:22 GMT):
Hello! I have a question which is more about javascript promises, found in the invoke files (using the fabcar for example). Sometimes when i get an error, the promise doesn't return a rejected promise even though it goes into the `catch` method. From my understanding, the `catch` method itself returns a promise returns a promise which may not be rejected, and I would have to return an error within the `catch` method itself. But examples online don't need require the return statement in order for the promise to be rejected. My questions would then be: 1) How do I know whether the return statement is needed? 2) What would I need to do in order to ensure that all errors return a rejected Promise in the end?

Taffies (Fri, 29 Jun 2018 03:06:44 GMT):
P/S: I'm not very proficient in js, so do pardon me if there's any logic gap or lack of understanding in what I'm saying!

Legiit (Fri, 29 Jun 2018 06:45:25 GMT):
Hey guys - when you call a `getState` in my chaincode - is this logged anywhere and how can I retrieve it? In composer you have the Transactions overview and when you execute a getter, it's also logged there :)

lkchao78 (Fri, 29 Jun 2018 07:30:37 GMT):
Hello, I've met an issue when I'm trying to install a chaincode with the installchaincode method. `TypeError: Path must be a string. Received undefined` Have someone met the issue before? Any help would be appreciated, thanks :) Here is my ChaincodeInstallRequest: let chaincodeRequest = { targets: [peer], chaincodePath: 'github.com/chaincode/chaincode_example02/go/', chaincodeId: 'mycc', chaincodeVersion: 'v1',}

jrosmith (Fri, 29 Jun 2018 12:58:41 GMT):
@lkchao78 can you post a [hastebin](hastebin.com) link with the whole `installChaincode` function? although the path is defined in your request its clearly undefined when it gets to the internals of the fabric sdk, the context must be getting lost somewhere.

jrosmith (Fri, 29 Jun 2018 12:58:41 GMT):
@lkchao78 can you post a hastebin.com link with the whole `installChaincode` function? although the path is defined in your request its clearly undefined when it gets to the internals of the fabric sdk, the context must be getting lost somewhere.

lkchao78 (Fri, 29 Jun 2018 13:07:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XGo4D6NHBp28GWoHi) @jrosmith Sure here it is: https://hastebin.com/dideditavo.js``` But I didn't write anything special, I'm just using the method from the client class.

lkchao78 (Fri, 29 Jun 2018 13:07:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XGo4D6NHBp28GWoHi) @jrosmith Sure here it is: https://hastebin.com/dideditavo.js But I didn't write anything special, I'm just using the method from the client class.

lkchao78 (Fri, 29 Jun 2018 13:07:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XGo4D6NHBp28GWoHi) @jrosmith Sure here it is: https://hastebin.com/dideditavo.js But I didn't write anything special, I'm just using the method from the client class. And when I'm installing the chaincode with the same gopath directly from the cli, it works.

mmomeu (Sat, 30 Jun 2018 15:10:42 GMT):
Has joined the channel.

CsterKuroi (Mon, 02 Jul 2018 01:47:27 GMT):
Has joined the channel.

Legiit (Mon, 02 Jul 2018 07:13:49 GMT):
Is there a possibility to track which data is queried in Fabric? (Log when `getState` is being called)

pankajcheema (Mon, 02 Jul 2018 09:33:38 GMT):
is there a way to set multiple peer addresses where our eventhub listens in node sdk?, currently there is only ```setPeerAddr()``` eventhub method, where we can specify only one peer.

pankajcheema (Mon, 02 Jul 2018 09:33:38 GMT):
is there a way to set multiple peer addresses where our eventhub connects in node sdk?, currently there is only ```setPeerAddr()``` eventhub method, where we can specify only one peer.

AnithaReddy (Mon, 02 Jul 2018 12:27:39 GMT):
Has joined the channel.

AnithaReddy (Mon, 02 Jul 2018 12:28:58 GMT):
hi can I install node js chaincode on to all peers of oraganisation of hyperleder FAbric 1.1 network without using HYPERLEDGER COMPOSER

wangdong (Mon, 02 Jul 2018 14:43:37 GMT):
@AnithaReddy you can use sdk, node sdk or just cmd. But the sdk will be recommended.

wangdong (Mon, 02 Jul 2018 15:10:52 GMT):
@pankajcheema you can use this function multi times to set up multi peers

danny_lee (Mon, 02 Jul 2018 23:09:21 GMT):
Has joined the channel.

SanketPanchamia (Tue, 03 Jul 2018 03:41:09 GMT):
Has anyone tried using the node-sdk for adding custom attributes to the user's enrollment? If so, can you please share

SanketPanchamia (Tue, 03 Jul 2018 06:44:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NWoEhnBvPj5HEPBGF) Never mind. I got it to work with the node sdk. If anyone else wants to know how, please DM me

FiratSertgoz (Tue, 03 Jul 2018 11:16:41 GMT):
Has joined the channel.

sureshtedla (Tue, 03 Jul 2018 14:13:33 GMT):
can we generate REST by using Node js if yes how to do it?

sureshtedla (Tue, 03 Jul 2018 14:13:49 GMT):
can any one guide me

sudhir.kumawat (Tue, 03 Jul 2018 15:39:25 GMT):
Has joined the channel.

sudhir.kumawat (Tue, 03 Jul 2018 16:01:40 GMT):
how to install chaincode built in NODE on hyperledger network

yulong12 (Wed, 04 Jul 2018 01:37:26 GMT):
Has joined the channel.

dv29 (Wed, 04 Jul 2018 14:25:13 GMT):
Hello everyone, I am a full stack Javascript developer and I would like to contribute to the hyperledger project. I am thinking of starting with fabric-sdk-node but not sure where to begin and what to begin with

dv29 (Wed, 04 Jul 2018 14:25:29 GMT):
Could someone help me by giving some pointers?

dv29 (Wed, 04 Jul 2018 14:25:29 GMT):
Could someone help me by giving some pointers please?

yacovm (Wed, 04 Jul 2018 14:28:53 GMT):
@bretharrison ^

zainmustafa (Wed, 04 Jul 2018 14:43:07 GMT):
Has joined the channel.

BabuPallam (Wed, 04 Jul 2018 22:21:52 GMT):
Has joined the channel.

kmohanar1 (Thu, 05 Jul 2018 06:03:39 GMT):
Has joined the channel.

kmohanar1 (Thu, 05 Jul 2018 06:14:36 GMT):
Hi All, i am trying to

kmohanar1 (Thu, 05 Jul 2018 06:18:30 GMT):
Hi All, I am trying to run the balance balance transfers application's node sdk applicaation to test it from the postman or restclient. while truing to login https://github.com/hyperledger/fabric-samples/tree/release-1.1/balance-transfer#login-request i am getiing the below mentioned error, {"success":false,"message":"failed Error: fabric-ca request register failed with errors [[{\"code\":400,\"message\":\"Authorization failure\"}]]"} Can anyone please help on this Thanks

kmohanar1 (Thu, 05 Jul 2018 06:18:30 GMT):
Hi All, I am trying to run the balance balance transfers application's node sdk applicaation to test it from the postman or restclient. while trying to login https://github.com/hyperledger/fabric-samples/tree/release-1.1/balance-transfer#login-request i am getting the below mentioned error, {"success":false,"message":"failed Error: fabric-ca request register failed with errors [[{\"code\":400,\"message\":\"Authorization failure\"}]]"} Can anyone please help on this Thanks

yupikaiei (Thu, 05 Jul 2018 12:06:32 GMT):
Has joined the channel.

kmohanar1 (Thu, 05 Jul 2018 14:48:56 GMT):
Hi All, I have query related to node sdk, I am trying to invoke my chaincode funtion from the restclitn/postman, i am getting the below error in the node server log [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: No Such FunctionInvoke) Can you please help on this to rectify this error.

SanketPanchamia (Thu, 05 Jul 2018 17:10:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cZc8oS3YFihH8BFeT) @kmohanar1 When you invoke the chaincode, it expects a fcn parameter which in the new 1.1 version is "move".

nico.ventrella (Thu, 05 Jul 2018 17:14:42 GMT):
Has joined the channel.

dv29 (Thu, 05 Jul 2018 17:45:59 GMT):
Hello everyone, I am a full stack Javascript developer and I would like to contribute to the hyperledger project. I am thinking of starting with fabric-sdk-node but not sure where to begin and what to begin with Could someone help me by giving some pointers please?

javrevasandeep (Thu, 05 Jul 2018 17:50:11 GMT):
is there any endorsement policy set in fabric-samples -> balance -transfer example?

bmjain (Thu, 05 Jul 2018 23:28:08 GMT):
Has joined the channel.

bmjain (Thu, 05 Jul 2018 23:29:25 GMT):
Has anyone used fabric-shim package in nodeJS for instantiating chaincode. If yeas, can you share a sample project?

IronStrong (Fri, 06 Jul 2018 06:31:13 GMT):
Has joined the channel.

innoan.yang (Fri, 06 Jul 2018 07:06:58 GMT):
Has joined the channel.

QQ-ing (Fri, 06 Jul 2018 08:01:49 GMT):
Has joined the channel.

JamesSC 3 (Fri, 06 Jul 2018 08:32:58 GMT):
Has joined the channel.

ApurvTandon (Fri, 06 Jul 2018 08:40:23 GMT):
Has joined the channel.

RobertDiebels (Fri, 06 Jul 2018 09:12:42 GMT):
Has joined the channel.

RobertDiebels (Fri, 06 Jul 2018 09:14:16 GMT):
Does anyone know if I can retrieve chaincode function arguments from either a Block or a Transaction through the NodeSDK?

RobertDiebels (Fri, 06 Jul 2018 09:14:16 GMT):
Does anyone know if I can retrieve chaincode function arguments from either a Block or a Transaction through the NodeSDK?

RobertDiebels (Fri, 06 Jul 2018 09:15:28 GMT):
I've looked at the JSON from blocks that I catch using the `EventHub.registerBlockEvent((block)=>{})`. but I can't find the arguments.

RobertDiebels (Fri, 06 Jul 2018 09:16:07 GMT):
I also tried to decode the ChaincodeInvocationSpec myself but that's not working for some reason.

RobertDiebels (Fri, 06 Jul 2018 09:16:24 GMT):
Any tips, pointers, help would be very much appreciated.

harpcio (Fri, 06 Jul 2018 09:47:17 GMT):
Has joined the channel.

harpcio (Fri, 06 Jul 2018 09:48:02 GMT):
Hi, do you know maybe why during the initialize blockchain by sdk-node doesn't install indexes on couchdb?

JamesSC 3 (Fri, 06 Jul 2018 10:15:02 GMT):
``` ```

JamesSC 3 (Fri, 06 Jul 2018 10:15:02 GMT):
``` let express = require('express'); let mongoose = require('mongoose'); let gravatar = require('gravatar'); let underscore = require('underscore'); let path = require('path'); let favicon = require('serve-favicon'); let compression = require('compression') let logger = require('morgan'); ```

JamesSC 3 (Fri, 06 Jul 2018 10:15:02 GMT):
``` let express = require('express'); let mongoose = require('mongoose'); let gravatar = require('gravatar'); let underscore = require('underscore'); let path = require('path'); let favicon = require('serve-favicon'); let compression = require('compression') let logger = require('morgan'); ```

JamesSC 3 (Fri, 06 Jul 2018 10:15:02 GMT):
``` let expresss = require('express'); let mongoose = require('mongoose'); let gravatar = require('gravatar'); let underscore = require('underscore'); let path = require('path'); let favicon = require('serve-favicon'); let compression = require('compression') let logger = require('morgan'); ```

JamesSC 3 (Fri, 06 Jul 2018 10:16:55 GMT):
``` ```

JamesSC 3 (Fri, 06 Jul 2018 10:16:55 GMT):
``` let express = require('express'); let mongoose = require('mongoose'); let gravatar = require('gravatar'); let underscore = require('underscore'); let path = require('path'); let favicon = require('serve-favicon'); let compression = require('compression') let logger = require('morgan'); ```

SanketPanchamia (Fri, 06 Jul 2018 10:18:28 GMT):

Clipboard - July 6, 2018 3:48 PM

SanketPanchamia (Fri, 06 Jul 2018 10:18:30 GMT):
Hi, I have been getting this error since a few hours now on my balance transfer app where it fails to create a channel

JamesSC 3 (Fri, 06 Jul 2018 10:18:40 GMT):
``` testtest tetest ````

kmohanar1 (Fri, 06 Jul 2018 10:26:05 GMT):
no type

knagware9 (Fri, 06 Jul 2018 11:05:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=e6sZmfZsMbq6kzTaD) @SanketPanchamia @SanketPanchamia I think channel already exist ,,could you please remove containers and start again

kmohanar1 (Fri, 06 Jul 2018 12:58:45 GMT):
Hi, I am running customized(not much changes similar to fabcar only, instead of default values i am just using runtime values) fabric samples/fabcar application. while trying to invoke my chaincode function using postman/restclient facing the below mentioned error, error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Trying to connect an http1.x server at new createStatusError (/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:64:15) at /node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:583:15 while debugging i can see, the error is the response of channel.sendTransactionProposal(request); in fabcar/invoke.js file. Can you please share is there any dependency with the grpc NPM package or is this related to GO. Can you please help on this Thanks in advance

Naseer03 (Fri, 06 Jul 2018 13:29:56 GMT):
Has joined the channel.

RobertDiebels (Fri, 06 Jul 2018 14:15:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BhEmHvY4k8gPGpd8e) Fixed it myself. Added some decoding to the BlockDecoder for ChaincodeInvocationSpecs.

RobertDiebels (Fri, 06 Jul 2018 14:15:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BhEmHvY4k8gPGpd8e) Fixed it myself. Added some decoding to the BlockDecoder for ChaincodeInvocationSpec. If there's any interest in this I'll hand you the code to do it.

RobertDiebels (Fri, 06 Jul 2018 14:15:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BhEmHvY4k8gPGpd8e) Fixed it myself. Added some decoding to the BlockDecoder for ChaincodeInvocationSpec. EDIT: I've created an improvement issue https://jira.hyperledger.org/browse/FAB-11079 it contains an attachment with the code should someone want to use it.

SanketPanchamia (Fri, 06 Jul 2018 15:57:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xwhuvoW2S2Mc6x5Cq) @knagware9 Have done everything. Deleted containers also. The balance transfer works out of the box so maybe my code has some issue, I will see and post if i cant figure out.

dairehoman (Sat, 07 Jul 2018 11:57:06 GMT):
Has joined the channel.

davidkhala (Sat, 07 Jul 2018 14:12:05 GMT):
Hi everyone ! THE NEWS is tag release-1.2 has been launched for fabric-sdk-node, looking for official announcement from dear maintainers @bretharrison @zhaochy

zhaochy (Sun, 08 Jul 2018 14:15:45 GMT):
@davidkhala we just released fabric-client and fabric-ca-client v1.2.0. it's available now

ChunTung (Mon, 09 Jul 2018 07:17:11 GMT):
Has joined the channel.

gravity (Mon, 09 Jul 2018 08:12:15 GMT):
Has left the channel.

davidkhala (Mon, 09 Jul 2018 08:16:19 GMT):
@zhaochy Tried but found my old 1.1 codes cannot get txEvent from eventHub any more

Khaled.MH (Mon, 09 Jul 2018 16:34:01 GMT):
Has joined the channel.

DanielMcSheehy (Mon, 09 Jul 2018 18:15:33 GMT):
So i'm attempting to use the service discovery with the node sdk. Using this code i'm getting the error `Error: 12 UNIMPLEMENTED: unknown service discovery.Discovery`: `let discovery_response = await channel.initialize({ discover: true, target: peer, asLocalhost: true });`

DanielMcSheehy (Mon, 09 Jul 2018 18:15:33 GMT):
So i'm attempting to use the service discovery with the node sdk. Using this code i'm getting the error `Error: 12 UNIMPLEMENTED: unknown service discovery.Discovery`: `let discovery_response = await channel.initialize({ discover: true, target: peer, asLocalhost: true });`

yacovm (Mon, 09 Jul 2018 18:24:14 GMT):
@DanielMcSheehy - the peer needs to be version v1.2

DanielMcSheehy (Mon, 09 Jul 2018 18:27:41 GMT):
Thanks @yacovm, do you happen to have any documentation about how to update fabric on peers?

yacovm (Mon, 09 Jul 2018 18:28:32 GMT):
upgrading_your_network_tutorial

yacovm (Mon, 09 Jul 2018 18:28:36 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/upgrading_your_network_tutorial.html

hnadim (Mon, 09 Jul 2018 22:02:10 GMT):
Has joined the channel.

yulong12 (Tue, 10 Jul 2018 02:54:16 GMT):
Hi everyone. I execute this command `npm install `in the root of fabric-sdk-node,but it stop in``` fetchMetadata: sill resolveWithNewModule string_decoder@0.10.31 checking installable ``` and it doesn't contine.so I want to know way?

yulong12 (Tue, 10 Jul 2018 02:54:39 GMT):
can someone help me ?

Sreesha (Tue, 10 Jul 2018 08:48:51 GMT):
Has joined the channel.

Sreesha (Tue, 10 Jul 2018 08:49:44 GMT):
Iam trying to use fabric-ca for certicate generation instead of cryptogen tool.

Sreesha (Tue, 10 Jul 2018 08:50:13 GMT):
So after generating the certs, i edit network config.yaml of balance transfer

Sreesha (Tue, 10 Jul 2018 08:50:52 GMT):
and now whrn iam running testAPIs.sh iam getting error on enrolling user

Sreesha (Tue, 10 Jul 2018 08:51:55 GMT):
error: [Client.js]: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] at IncomingMessage. (/home/1114473/Music/hyperledger1.1/fabric-samples/balance-transfer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:870:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) [2018-07-10 12:54:52.248] [ERROR] Helper - Failed to get registered user: Jim with error: Error: Enrollment failed with errors [[{"codeerror: [Client.js]: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] at IncomingMessage. (~/hyperledger1.1/fabric-samples/balance-transfer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:870:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) [2018-07-10 12:54:52.248] [ERROR] Helper - Failed to get registered user: Jim with error: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] ":20,"message":"Authorization failure"}]]

Sreesha (Tue, 10 Jul 2018 08:53:16 GMT):
error: [Client.js]: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] at IncomingMessage. (/home/1114473/Music/hyperledger1.1/fabric-samples/balance-transfer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:870:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) [2018-07-10 12:54:52.248] [ERROR] Helper - Failed to get registered user: Jim with error: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] error: [Client.js]: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] at IncomingMessage. (~/hyperledger1.1/fabric-samples/balance-transfer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:870:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) [2018-07-10 12:54:52.248] [ERROR] Helper - Failed to get registered user: Jim with error: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] error: [Client.js]: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] at IncomingMessage. (~/hyperledger1.1/fabric-samples/balance-transfer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:870:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) [2018-07-10 12:54:52.248] [ERROR] Helper - Failed to get registered user: Jim with error: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]]

Sreesha (Tue, 10 Jul 2018 08:53:27 GMT):
error: [Client.js]: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]] at IncomingMessage. (~/hyperledger1.1/fabric-samples/balance-transfer/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:870:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) [2018-07-10 12:54:52.248] [ERROR] Helper - Failed to get registered user: Jim with error: Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]]

Sreesha (Tue, 10 Jul 2018 08:53:57 GMT):
and in the ca server the following response is shown:

Sreesha (Tue, 10 Jul 2018 08:56:07 GMT):
2018/07/10 07:24:52 [DEBUG] DB: Getting identity admin 2018/07/10 07:24:52 [INFO] 172.23.0.1:49744 POST /api/v1/enroll 401 23 "Failed to get user: : scode: 404, code: 63, msg: Failed to get User: sql: no rows in result set"

firozmi (Tue, 10 Jul 2018 09:08:43 GMT):
Has joined the channel.

gouthamkrishna31 (Tue, 10 Jul 2018 09:45:53 GMT):
Has joined the channel.

DanielMcSheehy (Tue, 10 Jul 2018 23:01:14 GMT):
Does anyone know how to upgrade `basic-network` to v1.2? The only thing i've seen is upgrading `first-network`, and they're significantly different.

NoLimitHoldem (Wed, 11 Jul 2018 06:15:48 GMT):
Has joined the channel.

jayeshjawale95 (Wed, 11 Jul 2018 07:32:46 GMT):
Has joined the channel.

amolpednekar (Wed, 11 Jul 2018 07:38:04 GMT):
Is there an allowAllHostNames = true option available in the Node SDK v1.1? If yes, can someone point me to it? Thanks.

punleu (Wed, 11 Jul 2018 08:29:42 GMT):
Has joined the channel.

AMIL_SAJEEV (Wed, 11 Jul 2018 08:35:34 GMT):
Has joined the channel.

AMIL_SAJEEV (Wed, 11 Jul 2018 08:36:36 GMT):
HI all, When i tried to install chain code using NodeSdk getting an error : TypeError: Path must be a string. Received undefined I tried by running the file : https://jsfiddle.net/0dj3wcxt/ can any one help me to solve this.?? I really blocked at this step 😟 😟

Sreesha (Wed, 11 Jul 2018 11:46:59 GMT):
when iam trying to create channel, iam getting this error

Sreesha (Wed, 11 Jul 2018 11:48:22 GMT):
Create-Channel - Error: SERVICE_UNAVAILABLE Create-Channel - Error: SERVICE_UNAVAILABLE

Sreesha (Wed, 11 Jul 2018 11:48:44 GMT):
and at orderer container this error is thrown:

Sreesha (Wed, 11 Jul 2018 11:49:32 GMT):
-> DEBU 0d3 grpc: Server.Serve failed to complete security handshake from "172.23.0.1:35240": EOF

AnithaReddy (Wed, 11 Jul 2018 12:08:27 GMT):
https://github.com/hyperledger/fabric-sdk-node is this the link for node sdk???

KaranBlockchain (Wed, 11 Jul 2018 13:33:25 GMT):
Has joined the channel.

KaranBlockchain (Wed, 11 Jul 2018 13:34:32 GMT):
I am having some difficulties in deploying my chaincode on existing fabric instance. I have written a sample node.js program of Hello world but I am struggling to find any leads of how to deploy chain code on the network. I downloaded few sample networks and created an archive and deployed it on playground. I got complete folder structure in my VScode editor but I am confused for how to start with my own sample application which can have a moderator and 2 participants. I would appreciate if I get any leads for achieving my goals.

KaranBlockchain (Wed, 11 Jul 2018 13:34:32 GMT):
Hi All I am new to Fabric and chaincode development and I am having some difficulties in deploying my chaincode on existing fabric instance. I have written a sample node.js program of Hello world but I am struggling to find any leads of how to deploy chain code on the network. I downloaded few sample networks and created an archive and deployed it on playground. I got complete folder structure in my VScode editor but I am confused for how to start with my own sample application which can have a moderator and 2 participants. I would appreciate if I get any leads for achieving my goals.

rameshthoomu (Wed, 11 Jul 2018 19:33:35 GMT):
Yes.. that’s the link from readonly github.. if you want to contribute pls use the sdknode project from gerrit https://gerrit.hyperledger.org/r/#/admin/projects/ @AnithaReddy [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XrJ724wLe5zxGGBPg)

thakurnikk (Thu, 12 Jul 2018 05:13:12 GMT):
Has joined the channel.

WadeLu (Thu, 12 Jul 2018 07:34:46 GMT):
Has joined the channel.

sudhir.kumawat (Thu, 12 Jul 2018 08:12:43 GMT):
Hello everyone I am trying to install and start business network over hyperledger fabric running on kubernetes with composer and getting error Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/composer-runtime-hlfv1 failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 Can anyone help me to resolve this issue. I am using composer version 0.19.12 HF version 1.1.0 Node version 8.10.0

davidkel (Thu, 12 Jul 2018 08:24:28 GMT):
@sudhir.kumawat suggest you ask on the #composer channel

davidkel (Thu, 12 Jul 2018 08:25:06 GMT):
@sudhir.kumawat but you should find a reference to EAI_AGAIN here https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#installissues which provides info about this type of error

praveentalari (Thu, 12 Jul 2018 09:29:18 GMT):
Has joined the channel.

praveentalari (Thu, 12 Jul 2018 09:29:41 GMT):
Why does the official doc http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html given by https://www.hyperledger.org/projects/fabric is showing *"# we use the -l flag to specify the chaincode language # forgoing the -l flag will default to Golang ./byfn.sh up -l node"* when "-l" argument is not supported by ./byfn.sh script ?

AnithaReddy (Thu, 12 Jul 2018 10:06:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EHN3EEEeN0f7fIAEWH) @rameshthoomu thanks

kmohanar1 (Thu, 12 Jul 2018 10:31:56 GMT):
Hi All, I am trying to setup my the node sdk for my multi org and multi host fabric application. I can able to post and query the transaction from the environment using cli's and peer's container. while invoking or querying from the postman/restclient i am facing the below mentioned error, error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at new createStatusError (/scratch/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:64:15) at /scratch/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:583:15 Can you please help on this,

thakurnikk (Thu, 12 Jul 2018 10:37:23 GMT):
i am facing an error when i am trying to create a channel = ``` "error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining" ``` does anybody know what the problem is? i am using node-sdk

Sreesha (Thu, 12 Jul 2018 11:35:00 GMT):
grpc: Server.Serve failed to complete security handshake from "172.23.0.1:46498": tls: client didn't provide a certificate

Sreesha (Thu, 12 Jul 2018 11:35:21 GMT):
Iam getting this error when trying to create channel

Sreesha (Thu, 12 Jul 2018 11:35:38 GMT):
This is from the orderer logs

tian (Thu, 12 Jul 2018 14:26:34 GMT):
Has joined the channel.

bretharrison (Thu, 12 Jul 2018 14:46:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XrJ724wLe5zxGGBPg) @AnithaReddy if you are an node.js application developer, you would want to get the NodeSDK from `npm` https://www.npmjs.com/package/fabric-client

bretharrison (Thu, 12 Jul 2018 14:57:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=so8Qpvj9xAiWQB5Nn) @Sreesha Enrollment (which is where the CA signs the certificate) requires a known user by the CA, user must be registered first.

justin.zheng (Thu, 12 Jul 2018 15:46:24 GMT):
Has joined the channel.

justin.zheng (Fri, 13 Jul 2018 02:24:05 GMT):
I 阿曼

justin.zheng (Fri, 13 Jul 2018 02:28:58 GMT):
Hi everyone, excuse me for disturbing you. I have a question. I am using node-sdk. I enrolled with admin, called newChannel, newPeer, addPeer, newOrderer, addOrderer successfully. then I called channel.queryByChaincode to query, got a error:Error: Failed to connect before the deadline\n at checkState (.../node_modules/grpc/src/client.js:838:16. What does it mean?

justin.zheng (Fri, 13 Jul 2018 02:30:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WGJEjWLgCrPW6CRLP) and how can I solve it? thx.

ChanderGovindarajan (Fri, 13 Jul 2018 04:29:57 GMT):
Has left the channel.

justin.zheng (Fri, 13 Jul 2018 06:00:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WGJEjWLgCrPW6CRLP) and now the error became: "Error: 14 UNAVAILABLE: EOF at new createStatusError (/home/justin/develop/XMC/HLS/node_modules/grpc/src/client.js:64:15) at /home/justin/develop/XMC/HLS/node_modules/grpc/src/client.js:583:15"

kmohanar1 (Fri, 13 Jul 2018 06:08:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9uA3dSfxAkN98PNbH) @justin.zheng Hi @justin.zheng i faced similar kind of error https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JxdBk5S9mahsHGLbz , for me it worked after upgrading grpc npm package to 1.9.1 version

AnithaReddy (Fri, 13 Jul 2018 06:50:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JfRJbKPouhF7s7d6s) @bretharrison yeah done ! bt how to create data model that to be stored in ledger like we create assests and transactions in hyperledger composer

kmohanar1 (Fri, 13 Jul 2018 07:23:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d623P6hB9t4PPj8s2) Hi, Can anyone please help on this.., i struck in the middle

kmohanar1 (Fri, 13 Jul 2018 07:23:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d623P6hB9t4PPj8s2) Hi All, please help if anyone has answer for this question, i can see in google same question is available. but, i cant find the working answer. Thanks...,

justin.zheng (Fri, 13 Jul 2018 09:32:13 GMT):
My grpc is 1.13.0, :( And I run the example fabcar's query, I got error like you: Error: 14 UNAVAILABLE: EOF at new createStatusError (/home/justin/develop/XMC/HLS/node_modules/grpc/src/client.js:64:15) at /home/justin/develop/XMC/HLS/node_modules/grpc/src/client.js:583:15 @kmohanar1 [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rp2qzfGW8WYNRpj2o)

carlito (Fri, 13 Jul 2018 09:46:28 GMT):
Has joined the channel.

carlito (Fri, 13 Jul 2018 09:49:34 GMT):
Hi guys, is anyone can help me to solve a issue I have on setting up my sdk rest server ? I am trying to bind a network with the sdk rest api server and when I send a request from Loopback api explorer to get the list of channels which been created, I get this error on my server logs

carlito (Fri, 13 Jul 2018 09:49:59 GMT):

erreur_serveur_apirest.png

carlito (Fri, 13 Jul 2018 09:52:15 GMT):
(I started the network with the following command : ./byfn up -l node)

justin.zheng (Fri, 13 Jul 2018 10:10:46 GMT):
When should I call channel.initialize?

justin.zheng (Fri, 13 Jul 2018 10:15:38 GMT):
I have prepared client, user, channel, peer and orderer. Then when I call channel.initialize it return error: Error: 14 UNAVAILABLE: EOF fabric_initialize_channel.js:71 at getChannelConfig.then.catch (/home/justin/develop/XMC/HLS/node_modules/fabric-client/lib/Channel.js:356:27) at [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=0P9FEqClXJqBkC3QYW)

Sreesha (Fri, 13 Jul 2018 10:42:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RmxcvCR89SCx4LvXq) @bretharrison @bretharrison I have already registered two users in two organisations and trying to create a channel with their tokens.But still i'm facing issues.

justin.zheng (Fri, 13 Jul 2018 10:46:26 GMT):
I would like to add, channel.queryByChaincode calling is successful. But the response is an error: Error: 14 UNAVAILABLE: EOF\n at new createStatusError (/home/justin/develop/XMC/HLS/node_modules/grpc/src/client.js:64:15)\n at /home/justin/develop/XMC/HLS/node_modules/grpc/src/client.js:583:15\n code: 14,\n metadata: Metadata { _internal_repr: {} },\n details: 'EOF' [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9uA3dSfxAkN98PNbH)

sergefdrv (Fri, 13 Jul 2018 12:40:32 GMT):
Has left the channel.

AMIL_SAJEEV (Fri, 13 Jul 2018 13:11:48 GMT):
Hi all, when i tried to instantiate the chain code get an error : sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [carlanerootchannel] creator org [Org1MSP] how can i solve this??

krabradosty (Fri, 13 Jul 2018 15:27:39 GMT):
Hi! I want to set *one peer of organization* endorsement policy for chaincode. What is the correct json config: ``` { "identities": [ { "role": { "name": "peer", "mspId": "anyID" } } ], "policy": { "1-of": [ { "signed-by": 0 } ] } } ``` or ``` { "identities": [ { "role": { "name": "peer", "mspId": "anyID" } } ], "policy": { "signed-by": 0 } } ``` ?

DanielMcSheehy (Fri, 13 Jul 2018 21:20:10 GMT):
Getting an error ` TypeError: chaincodeProposal.getHeader is not a function` when submitting signed transaction proposal

DanielMcSheehy (Fri, 13 Jul 2018 21:20:10 GMT):
Getting an error ` TypeError: chaincodeProposal.getHeader is not a function` when submitting signed transaction proposal. Anyone know why?

DanielMcSheehy (Fri, 13 Jul 2018 21:20:10 GMT):
Getting an error ` TypeError: chaincodeProposal.getHeader is not a function` when submitting signed transaction proposal. Anyone have an idea what could be causing it?

Ferrymania (Sat, 14 Jul 2018 12:47:20 GMT):
Has joined the channel.

justin.zheng (Sun, 15 Jul 2018 02:56:36 GMT):
In the cli docker, call peer query is ok [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=l4mQjUJl51dPPBicpt)

risabhsharma (Sun, 15 Jul 2018 04:25:06 GMT):
Has joined the channel.

risabhsharma (Sun, 15 Jul 2018 04:26:43 GMT):
Can anyone help me how to enroll and register multiple users in the network..i tried to user enroll and register.js

khaledMD (Sun, 15 Jul 2018 22:44:32 GMT):
Has joined the channel.

Ferrymania (Mon, 16 Jul 2018 01:48:18 GMT):
Hi,guys. I don't understand what sdk is. Does it mean that sdk is used to develop applications? And if so,sdk-java is used to develop android app,and can the sdk-java be used in other applications?

wangdong (Mon, 16 Jul 2018 03:28:30 GMT):
@Ferrymania SDK is from client side. It is used to fire a transaction. yes it is used to develop applications.

Sreesha (Mon, 16 Jul 2018 04:59:17 GMT):
When iam trying to create a new channel iam getting the following error from orderer container

Sreesha (Mon, 16 Jul 2018 04:59:21 GMT):
grpc: Server.Serve failed to complete security handshake from "172.23.0.1:52210": EOF

Sreesha (Mon, 16 Jul 2018 04:59:32 GMT):
Can anyone help me?

Sreesha (Mon, 16 Jul 2018 05:49:41 GMT):
Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

Ferrymania (Mon, 16 Jul 2018 06:42:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eETtxBQdifz3XuJ7G) @wangdong Thanks a lot:grimacing:

wangdong (Mon, 16 Jul 2018 06:47:46 GMT):
@Sreesha This is from the cert error. Please check your cert

kmohanar1 (Mon, 16 Jul 2018 07:26:58 GMT):
Hi

kmohanar1 (Mon, 16 Jul 2018 07:32:22 GMT):
Hi all, i have one question, can i provide two node-sdk for my application like, one for peer1 of org 1 and nother one for peer1 of org 2. i facing problem while providing two node sdk for my application. when i am proviiding single node sdk for my application it works fine. can anyone please suggest on this..,

navaneethaa (Mon, 16 Jul 2018 10:55:02 GMT):
Has joined the channel.

bestbeforetoday (Mon, 16 Jul 2018 12:11:50 GMT):
Has joined the channel.

kmohanar1 (Tue, 17 Jul 2018 04:46:19 GMT):
Hi, Is there any responsible person for this particular NSDK forum from hyperledger team.

AMIL_SAJEEV (Tue, 17 Jul 2018 05:49:22 GMT):
Hi all, I am attempting to fix up a Hyper ledger fabric network, two organizations, holding two peers each and fabric ca for each org. We succeed in setting up the network, by creating a channel and joining the peers to the same channel, and was also able to install a chain code. But the real issue came when we attempted to instantiate the same chain code, its throwing access denied.Install & instantiation are try to done by NodeSdk. How can i solve this? connection profile file : https://jsfiddle.net/q7gsLkur/1/ instantiateChainCode.js : https://jsfiddle.net/z5a7fg8k/1/

AMIL_SAJEEV (Tue, 17 Jul 2018 05:49:43 GMT):

Clipboard - July 17, 2018 11:19 AM

louisliu2048 (Tue, 17 Jul 2018 06:47:56 GMT):
Has joined the channel.

AnithaReddy (Tue, 17 Jul 2018 07:45:53 GMT):
when trying to create a channel in balance-transfer app in fabric-samples

AnithaReddy (Tue, 17 Jul 2018 07:46:10 GMT):

Screen Shot 2018-07-17 at 1.14.24 pm.png

AnithaReddy (Tue, 17 Jul 2018 07:46:14 GMT):

Screen Shot 2018-07-17 at 1.13.45 pm.png

AnithaReddy (Tue, 17 Jul 2018 07:46:23 GMT):
any help ??

richy7734 (Tue, 17 Jul 2018 08:48:03 GMT):
Has joined the channel.

louisliu2048 (Tue, 17 Jul 2018 11:02:26 GMT):
fabric1.2 new feature: service discovery. ``` ```

louisliu2048 (Tue, 17 Jul 2018 11:08:57 GMT):
fabric1.2 new feature: service discovery. according to the 'How to use the service discovery' tutorial, I try to add the new feature to my node code. what I do is just change the channel.initialize (in the e2eUtils) from channel.initialize(); to channel.initialize({discover: true}); but I got an error: Channel:mychannel Discovery error:failed constructing descriptor for chaincodes: I do not know why. Any one has tips?

Sreesha (Tue, 17 Jul 2018 12:20:25 GMT):
While sending the request to create channel to the orderer,

Sreesha (Tue, 17 Jul 2018 12:20:38 GMT):
my request is sending error

Sreesha (Tue, 17 Jul 2018 12:21:12 GMT):
it is executing the following part of code:

Sreesha (Tue, 17 Jul 2018 12:21:14 GMT):
broadcast.on('error', function (err) { clearTimeout(broadcast_timeout); broadcast.end(); if(err && err.code) { if(err.code == 14) { logger.error('sendBroadcast - on error: %j',err.stack ? err.stack : err); return reject(new Error('SERVICE_UNAVAILABLE')); } } logger.debug('sendBroadcast - on error: %j',err.stack ? err.stack : err); if(err instanceof Error) { return reject(err); } else { return reject(new Error(err)); } });

Sreesha (Tue, 17 Jul 2018 12:21:36 GMT):
instead of :

Sreesha (Tue, 17 Jul 2018 12:21:38 GMT):
broadcast.on('data', function (response) { logger.debug('sendBroadcast - on data response: %j', response); console.log('sendBroadcast - on data response: %j', response); broadcast.end(); if(response && response.info) { logger.debug('sendBroadcast - response info :: %s', response.info); } if(response && response.status) { logger.debug('sendBroadcast - response status %s========================>broadcast',broadcast,'===============>', response.status); return resolve(response); } else { logger.error('sendBroadcast ERROR - reject with invalid response from the orderer'); return reject(new Error('SYSTEM_ERROR')); } });

Sreesha (Tue, 17 Jul 2018 12:22:01 GMT):
Does anyone know why?

Sreesha (Tue, 17 Jul 2018 12:22:51 GMT):
This code is from orderer.js

kmohanar1 (Tue, 17 Jul 2018 12:28:44 GMT):
@Sreesha : to create your channel you are doing it in coimmandline or through script

kmohanar1 (Tue, 17 Jul 2018 12:28:44 GMT):
@Sreesha : to create your channel you are doing it in commandline or through script

Sreesha (Tue, 17 Jul 2018 12:33:16 GMT):
by testAPIs.sh script

Sreesha (Tue, 17 Jul 2018 12:34:30 GMT):
@kmohanar1

AnithaReddy (Tue, 17 Jul 2018 13:41:21 GMT):

Screen Shot 2018-07-17 at 7.10.06 pm.png

AnithaReddy (Tue, 17 Jul 2018 13:41:34 GMT):
any help would be appreciated

aflorom (Wed, 18 Jul 2018 09:41:55 GMT):
Has joined the channel.

push1st1k (Wed, 18 Jul 2018 15:56:14 GMT):
Has joined the channel.

qubing (Wed, 18 Jul 2018 16:08:36 GMT):
Has joined the channel.

bretharrison (Wed, 18 Jul 2018 19:47:29 GMT):
@AnithaReddy I have seen this error when the channel is not created. `sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [adminconfig] creator org [Org1MSP]`

bretharrison (Wed, 18 Jul 2018 19:58:02 GMT):
@louisliu2048 I have seen this error when the chaincode is not running. `Discovery error:failed constructing descriptor for chaincodes:`

louisliu2048 (Thu, 19 Jul 2018 00:55:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tER32bQYAh7WigTHc) @bretharrison but, when I just use channel.initialize(); everything is ok.

Hz (Thu, 19 Jul 2018 03:12:28 GMT):
Has joined the channel.

kmohanar1 (Thu, 19 Jul 2018 05:15:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HZp85oc9DXzA8Ngss) @hyperledger-bot @hyperledger team: can anyone please help on this

kmohanar1 (Thu, 19 Jul 2018 05:15:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HZp85oc9DXzA8Ngss) @hyperledger team: can anyone please help on this

hyperledger-bot (Thu, 19 Jul 2018 05:16:00 GMT):
Has joined the channel.

AnithaReddy (Thu, 19 Jul 2018 05:49:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4aBsC6PRgEogmxkLH) @bretharrison soution ??

AnithaReddy (Thu, 19 Jul 2018 05:50:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tER32bQYAh7WigTHc) @bretharrison u found any solution??

bh4rtp (Thu, 19 Jul 2018 05:58:11 GMT):
is there any changes for join channel in node sdk? the balance_transfer cannot run now.

bh4rtp (Thu, 19 Jul 2018 05:58:11 GMT):
is there any change for joining channel in node sdk? the balance_transfer cannot run now.

rushiraj111 (Thu, 19 Jul 2018 07:12:53 GMT):
Has joined the channel.

RocMax (Thu, 19 Jul 2018 10:04:23 GMT):
Hi, anyone knows

RocMax (Thu, 19 Jul 2018 10:04:23 GMT):
Hi, anyone knows the structure of HistoryQueryIterator? And how could I get timestamp form it?

bretharrison (Thu, 19 Jul 2018 12:22:03 GMT):
@RocMax you may wish to post to #fabric-chaincode-dev

bretharrison (Thu, 19 Jul 2018 12:22:42 GMT):
@bh4rtp Do you have a log and an error message

bretharrison (Thu, 19 Jul 2018 12:25:29 GMT):
@AnithaReddy In your case, does the channel exist ?

AnithaReddy (Thu, 19 Jul 2018 12:38:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cauw8aQepLBFvabZA) @bretharrison actually i created the channel and add peers to it between how to check it ?

davidkhala (Thu, 19 Jul 2018 14:35:05 GMT):
Well I found in the latest master code, the traditional event-hub is totally removed !!

bretharrison (Thu, 19 Jul 2018 14:56:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WCRP5oFJ89gY88zCn) @davidkhala https://jira.hyperledger.org/browse/FAB-11124

bretharrison (Thu, 19 Jul 2018 14:57:46 GMT):
@AnithaReddy When you say created it , do you mean just the NodeSDK object or do you mean on the fabric network ?

vagnerasilva (Thu, 19 Jul 2018 15:02:26 GMT):
Has joined the channel.

DennisM330 (Thu, 19 Jul 2018 22:51:10 GMT):
I am running thru the Developing Fabric Application s tutorial which I have done many times before. In the sample Node.js code this is failing in the Invoke.js let event_hub = fabric_client.newEventHub(); What should this code now be?

DennisM330 (Thu, 19 Jul 2018 22:51:28 GMT):
.newEventHub method appears to be gone now

DennisM330 (Thu, 19 Jul 2018 22:54:51 GMT):
Or can someone replace the code in this tutorial

bh4rtp (Fri, 20 Jul 2018 00:36:29 GMT):
@bretharrison [2018-07-20 08:35:16.135] [ERROR] Join-Channel - TypeError: client.getEventHubsForOrg is not a function

DennisM330 (Fri, 20 Jul 2018 00:39:39 GMT):

Clipboard - July 19, 2018 8:39 PM

DennisM330 (Fri, 20 Jul 2018 00:39:47 GMT):
ok, i fixed this again by editing the package.json in the fabcar directory

username343 (Fri, 20 Jul 2018 05:25:33 GMT):
Hi guys

username343 (Fri, 20 Jul 2018 05:26:17 GMT):
It is possible to listen for all the transaction events from all the chaincodes in a particular channel without specifying the transaction id?

AnithaReddy (Fri, 20 Jul 2018 06:09:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=S7hygW5EXxqJBqdkQ) @bretharrison actually am working balance transfer app in fabric-samples

AbhiramHatolkar (Fri, 20 Jul 2018 07:44:59 GMT):
Has joined the channel.

AbhiramHatolkar (Fri, 20 Jul 2018 07:46:24 GMT):
Hi guys, is balance-transfer project from fabric-samples broken? I took a fresh clone and ran runApp.sh in one terminal and testApi.sh in other and it's failing while instantiating chaincode with error (Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:13278) UnhandledPromiseRejectionWarning: Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse at Object.instantiateChaincode). My npm version is 5.6, node version is 8.11, docker images for orderer, peer, fabric-ca are pointing to 1.2.0, go is 1.10.2, linux- ubuntu 16.04

aflorom (Fri, 20 Jul 2018 08:29:21 GMT):
Hi guys! I am trying create a channel with NodeJS's SDK from admin user but I get this error *Error: No credentialStore settings found*. Someone know any solution?

AbhiramHatolkar (Fri, 20 Jul 2018 10:04:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nSaHcSKNvNTji8Syy) The problem looks to be in package.json I resolved it by pointing fabric-ca to 1.2.0 and while keeping fabric-ca-client to unstable (keeping fabric-ca-client to 1.2.0 broke the script at the time of invoking the chaincode)

AbhiramHatolkar (Fri, 20 Jul 2018 10:05:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yJzTTPjqBAMYTbaYe) @AnithaReddy I am no expert here but I think you are facing the same issue I did. Try changing package.json (version of fabric-client to 1.2.0). It solved the problem for me. All the best!

AnithaReddy (Fri, 20 Jul 2018 10:14:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kQ7x3DMsEnGFjjQpi) @AbhiramHatolkar yea i vil try with that thanks !

davidkhala (Fri, 20 Jul 2018 10:54:43 GMT):
@bretharrison Dear Bret, During my cleaning test code, I find syntax like ``` t.doesNotThrow( () => { testClient.addTlsClientCertAndKey({}); }, /A crypto suite has not been assigned to this client/, 'Check that error is not thrown when crypto suite is not set' ); ```, is this regx really works?

davidkhala (Fri, 20 Jul 2018 10:56:12 GMT):
Mostly cases the 2nd params can be ignored or null for doesNotThow, then Is here a redundant?

bretharrison (Fri, 20 Jul 2018 12:10:04 GMT):
@davidkhala any improvements would be much appreciated

kmohanar1 (Fri, 20 Jul 2018 12:16:48 GMT):
anybody done with the multihost application. if possible please help on this

kmohanar1 (Fri, 20 Jul 2018 12:16:48 GMT):
anybody done with the multihost application with node SDK. if possible please help on this

bretharrison (Fri, 20 Jul 2018 12:59:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZqHLnzzma3xG5vCQZ) @username343 Yes, however it would require registering for block events, which will return all changes to the ledger, then dig into the block to check on the transactions status. I really like this idea of being able to register for all events ... You should open a JIRA to add this as a new feature.

bretharrison (Fri, 20 Jul 2018 12:59:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZqHLnzzma3xG5vCQZ) @username343 Yes, however it would require registering for block events, which will return all changes to the ledger, then dig into the block to check on the transactions status. I really like this idea of being able to register for all transaction events ... You should open a JIRA to add this as a new feature.

asaningmaxchain123 (Fri, 20 Jul 2018 15:39:49 GMT):
@mastersingh24 `setPeerAddr(url: string, opts: ConnectionOptions): void;` should set ` setPeerAddr(url: string, opts: ConnectionOptions?): void;`

asaningmaxchain123 (Fri, 20 Jul 2018 15:39:49 GMT):
@mastersingh24 `setPeerAddr(url: string, opts: ConnectionOptions): void;` should set ` setPeerAddr(url: string, opts?: ConnectionOptions): void;`

mastersingh24 (Sun, 22 Jul 2018 10:44:39 GMT):
@asaningmaxchain123 - are you suggesting we make ConnectionOptions optional?

sudomann (Mon, 23 Jul 2018 00:45:26 GMT):
Has joined the channel.

pankajcheema (Mon, 23 Jul 2018 11:40:12 GMT):
Hi Experts

pankajcheema (Mon, 23 Jul 2018 11:40:41 GMT):
Does Fabric node sdk works on node 9? I am thinking to use ES6 with fabric sdk

pankajcheema (Mon, 23 Jul 2018 11:40:44 GMT):
Is it possible?

bestbeforetoday (Mon, 23 Jul 2018 13:13:16 GMT):
Fabric Node SDK works with Node 8 (LTS). You can use ES6 and also many ES2017 features (like async/await) with Node 8 quite happily: https://node.green/

davidkhala (Mon, 23 Jul 2018 15:19:09 GMT):
@pankajcheema We are also helping to migrate code as much as possible to in ES6 style

latitiah (Mon, 23 Jul 2018 16:02:52 GMT):
@bretharrison: I noticed that fabric-client/lib/EventHub.js was recently removed. After doing some searching, I noted that when updating from 1.2 to 1.3(master) any reference to EventHub should be removed as this file no longer exists. This is the error that was seen when attempting to perform an invoke ```Cannot find module 'fabric-client/lib/EventHub.js'``` Posting this in case anyone else runs into this same issue. (We should also note this for the next release cycle as well.)

bretharrison (Tue, 24 Jul 2018 01:26:18 GMT):
@latitiah Thanks, your are right, we need to be sure to write a release note for this ... would you open a JIRA please

bh4rtp (Tue, 24 Jul 2018 06:15:10 GMT):
@latitiah fabric-samples/balance_transfer cannot not run for this reason.

arjanvaneersel (Tue, 24 Jul 2018 07:40:32 GMT):
Has joined the channel.

arjanvaneersel (Tue, 24 Jul 2018 07:43:17 GMT):
Hello. Could somebody show me an explanation/example of how I can add the peer of a new organization to a particular channel through the node sdk? The infrastructure is basically the first-network example, having Org1 and Org2. I'm trying to add a new Org3 to the network. However I can't find any instructions of example on how to do this.

arjanvaneersel (Tue, 24 Jul 2018 07:43:17 GMT):
Hello. Could somebody show me an explanation/example of how I can add the peer of a new organization to a particular channel through the node sdk? The infrastructure is basically the first-network example, having Org1 and Org2. I'm trying to add a new Org3 to the network. However I can't find any instructions or example on how to do this. I've found plenty of joining peers on the creation of a new channel, but in this case I want to join an existing channel.

bh4rtp (Tue, 24 Jul 2018 08:29:03 GMT):
@latitiah https://jira.hyperledger.org/browse/FAB-11220, it is on progress.

RobertDiebels (Tue, 24 Jul 2018 08:35:04 GMT):
@bretharrison I ran into the same issue yesterday when I was searching the docs. To the best of my knowledge the docs are currently not versioned so the EventHub documentation can only be check at the source level. Also, I don't know if the sdk is following SemVer but removing a class like that is a breaking change so the version should be upped to 2.x.

davidkel (Tue, 24 Jul 2018 08:37:31 GMT):
@RobertDiebels see https://jira.hyperledger.org/browse/FABN-829 for issues regarding the docs. To be honest, the old eventhub mechanism has so many issues with it I would not recommend using it. The ChannelEventHub implementation is more robust and addresses issues with the old fabric event hub mechanisn

RobertDiebels (Tue, 24 Jul 2018 08:39:10 GMT):
@davidkel I'd really like to use the ChannelEventHub. I'm using Hyperledger Caliper however. So my hands are kind of tied. Thanks for the tip. I'll check out the issue now :thumbsup: .

davidkel (Tue, 24 Jul 2018 08:40:01 GMT):
@RobertDiebels is Caliper tied to the old event hub mechanism ?

RobertDiebels (Tue, 24 Jul 2018 08:43:22 GMT):
@davidkel Caliper is still in incubation so I don't think it is. As a current user of Caliper I'm tied to it though.

RobertDiebels (Tue, 24 Jul 2018 08:45:39 GMT):
(upvoted the docs issue btw)

SubhodI (Tue, 24 Jul 2018 12:16:42 GMT):
Has joined the channel.

mauricio (Tue, 24 Jul 2018 15:46:26 GMT):
Has joined the channel.

mauricio (Tue, 24 Jul 2018 15:53:32 GMT):
Hello. I'm trying to manage all events (txEvents, blockEvents, chaincodeEvents) in my node-sdk but I'm confused, actually I'm calling blockEvents after I get a proposal, but I don't think that this is the right way. Can somebody help me? any idea or docs? I was following the Insurance app IBM example but it is pretty different to my current project structure. Thanks!

asaningmaxchain123 (Tue, 24 Jul 2018 17:54:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JidaowkPA4ojikhWH) @mastersingh24 yes

asaningmaxchain123 (Tue, 24 Jul 2018 18:05:58 GMT):
https://jira.hyperledger.org/browse/FAB-11282

asaningmaxchain123 (Tue, 24 Jul 2018 18:06:03 GMT):
@mastersingh24

fabiomolinar (Tue, 24 Jul 2018 18:14:05 GMT):
Has joined the channel.

anarodrigues (Tue, 24 Jul 2018 18:53:35 GMT):
Has joined the channel.

jfodale (Tue, 24 Jul 2018 19:45:22 GMT):
Has joined the channel.

jfodale (Tue, 24 Jul 2018 19:47:21 GMT):
client.sendTransaction results in Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (3938 vs. 15)

davidkhala (Wed, 25 Jul 2018 02:32:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GwqotgwNSGJ3wgmR7) @arjanvaneersel Yes, I have an example but hard to explain in several sentences. https://github.com/davidkhala/delphi-fabric/

davidkhala (Wed, 25 Jul 2018 02:40:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3R6SR2t4MGysk9CN7) @jfodale would you mind checking your channel/genesis batch size configuration?

davidkhala (Wed, 25 Jul 2018 02:40:29 GMT):
BatchSize: AbsoluteMaxBytes: 99 MB <-- this

davidkhala (Wed, 25 Jul 2018 02:43:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=x3rhCafCtK44bwcKA) @bh4rtp Is it? I just checkout the balance_transfer and found old eventHub is cleaned already in branch `release-1.2`

davidkhala (Wed, 25 Jul 2018 03:16:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qdF7FSZtZWTHPturQ) @RobertDiebels Yes, but even we keep the old EventHub, it does not work anymore from, since starting from core version 1.2, peer 7053 port is closed and no event could be caught.

kevinmcmahon (Wed, 25 Jul 2018 04:01:16 GMT):
Has joined the channel.

chuojiang (Wed, 25 Jul 2018 07:34:11 GMT):
Has joined the channel.

bh4rtp (Wed, 25 Jul 2018 08:23:33 GMT):
@davidkhala do you read this line https://github.com/hyperledger/fabric-samples/blob/release-1.2/balance-transfer/app/join-channel.js#L54? it still uses EventHub.

josiebhai (Wed, 25 Jul 2018 08:26:53 GMT):
Has joined the channel.

RobertDiebels (Wed, 25 Jul 2018 08:36:55 GMT):
@davidkhala Aaah ok. So you're aiming for backwards compatibility to each fabric version?

RobertDiebels (Wed, 25 Jul 2018 08:37:26 GMT):
That should mean the docs need an update and the EventHub page should be reinstated.

Legiit (Wed, 25 Jul 2018 08:43:38 GMT):
Hey guys I get the following error when registering users with this piece of code: ``` secret = await fabricCaClient .register( { role: user.role, enrollmentID: user.username, affiliation: user.affiliation, attrs: [ { name: "agentschap", value: user.agentschap, ecert: true } ] }, adminUser ) ``` It returns `Unhandled rejection Error: Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]].`

Legiit (Wed, 25 Jul 2018 08:43:38 GMT):
Hey guys I get the following error when registering users with this piece of code: ``` secret = await fabricCaClient .register( { role: user.role, enrollmentID: user.username, affiliation: user.affiliation, attrs: [ { name: "anAttribute", value: user.anAttribute, ecert: true } ] }, adminUser ) ``` It returns `Unhandled rejection Error: Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]].`

davidkhala (Wed, 25 Jul 2018 08:49:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ttT3XypmTCZzNmTox) @RobertDiebels quite sorry about that. For the eventHub staff, if I use node-sdk codes working in 1.1, to connect 1.2 fabric network, no event can be caught.

davidkhala (Wed, 25 Jul 2018 08:49:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ttT3XypmTCZzNmTox) @RobertDiebels quite sorry about that. And your question about document version is really a problem https://jira.hyperledger.org/browse/FABN-829

davidkhala (Wed, 25 Jul 2018 08:56:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eTBZY5QQyeWoK8WG9) @bh4rtp Oh thanks, that is a missing, I could help to update that.

bh4rtp (Wed, 25 Jul 2018 09:13:55 GMT):
@davidkhala https://gerrit.hyperledger.org/r/#/c/24583/. the patch does work.

davidkhala (Wed, 25 Jul 2018 09:15:07 GMT):
@bh4rtp so are these also in release-1.2 branch now?

davidkhala (Wed, 25 Jul 2018 09:15:07 GMT):
@bh4rtp tried to push to release-1.2 also https://gerrit.hyperledger.org/r/#/c/24739/

carlito (Wed, 25 Jul 2018 17:22:55 GMT):
Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]

carlito (Wed, 25 Jul 2018 17:23:13 GMT):
any idea ?

carlito (Wed, 25 Jul 2018 17:23:38 GMT):
Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]

huy.tranibm (Wed, 25 Jul 2018 20:38:09 GMT):
@carlito check ur peer logs

huy.tranibm (Wed, 25 Jul 2018 20:38:37 GMT):
or orderer

bourbonkidQ (Wed, 25 Jul 2018 21:41:22 GMT):
Has joined the channel.

bh4rtp (Thu, 26 Jul 2018 06:29:07 GMT):
hi, is there any document describes how to make `collections-config` and `endorsement-policy` work together when instantiating chaincode for private data?

bh4rtp (Thu, 26 Jul 2018 07:25:49 GMT):
i set collections-config and endorsement-policy like below, but invoke chaincode failed for `Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE`. ```// send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, fcn: functionName, args: args, txId: tx_id, 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of': [{ 'signed-by': 0 }, { 'signed-by': 1 }] } }, 'collections-config': collectionsConfigPath, }; ```

bh4rtp (Thu, 26 Jul 2018 07:31:26 GMT):
i think `endorsement-policy` is set for non-private data and `collections-config` is set for private data, am i right?

davidkhala (Thu, 26 Jul 2018 08:55:03 GMT):
Well I found a bug that chaincode event payload cannot be recognized in node sdk

davidkhala (Thu, 26 Jul 2018 08:55:17 GMT):
Have one tried it successfully ?

davidkhala (Thu, 26 Jul 2018 08:55:17 GMT):
has anyone tried it successfully?

davidkel (Thu, 26 Jul 2018 08:59:28 GMT):
@davidkhala we have run some tests and it appears to work for us. Did you connect the channel event hubs specifying full blocks rather than filtered ie eh.connect(true) ?

davidkhala (Thu, 26 Jul 2018 09:00:35 GMT):
Oop, is the payload part of filtered stuff? I will try it later

bh4rtp (Thu, 26 Jul 2018 09:00:38 GMT):
me too. it does work.

davidkhala (Thu, 26 Jul 2018 09:00:48 GMT):
I am using filtered one

davidkel (Thu, 26 Jul 2018 09:01:05 GMT):
filtered won't give you the chaincode event payload, you need to use full blocks

davidkhala (Thu, 26 Jul 2018 09:06:31 GMT):
Thanks for your clarify. Now it is fixed

davidkhala (Thu, 26 Jul 2018 09:08:17 GMT):
@davidkel during my trying to fix, I find payload checking is missing in sdk integration test. Is it real?

davidkel (Thu, 26 Jul 2018 09:09:29 GMT):
I've not looked at the integration tests, but at some point they need reviewing to see what capabilities they actually cover and what is missing

bh4rtp (Thu, 26 Jul 2018 11:57:23 GMT):
@davidkhala did you merge network-config.yaml file correctly? i see grpc event url for peer1.org1 does still exist.

alejandrolr (Thu, 26 Jul 2018 12:54:26 GMT):
I all!! I cannot find the node SDK fabric-ca-client documentation, has it disappeared?

davidkhala (Thu, 26 Jul 2018 14:21:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yAkcoyNkLBymKkPnW) @alejandrolr Is it what you want? https://fabric-sdk-node.github.io/

davidkhala (Thu, 26 Jul 2018 14:23:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6CnkZTexmPcRjPXKp) @bh4rtp Ehh. Actually I am not a fan of network config design, I design and use my own config file. so do you see the port 7053 stay still in network-config.yaml

davidkhala (Thu, 26 Jul 2018 14:40:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7ZpGfgC3Tyfr8Dxq7) Gocha, I can still see some 7053 unused port exposure. will continue clean up

jrosmith (Thu, 26 Jul 2018 15:10:31 GMT):
hey all, recently upgraded to v1.2 and some of my logic for starting an application is failing and its centered around joining channels. with 1.0 and 1.1 i had a pretty hacky implementation of checking if we are already a member by attempting to join a channel and ignoring the `LedgerID already exists` error, but thats no longer working. does 1.2 have a way of checking to see whether or not we are already a member of the channel?

davidkhala (Thu, 26 Jul 2018 15:28:51 GMT):
the timing is changed a little and more clear in newer version @jrosmith

davidkhala (Thu, 26 Jul 2018 15:29:27 GMT):
the `LedgerID already exists` pattern showing we can swallow that error still usable

davidkhala (Thu, 26 Jul 2018 15:30:42 GMT):
But right after your channel is created, Now there will be an time interval showing the newly created channel is still `Unavailable`

davidkhala (Thu, 26 Jul 2018 15:31:11 GMT):
I skipped it and retry join channel actions

davidkhala (Thu, 26 Jul 2018 15:33:24 GMT):
https://github.com/davidkhala/delphi-fabric/blob/master/app/testChannel.js this is my sample, hope it helps

jrosmith (Thu, 26 Jul 2018 15:35:10 GMT):
@davidkhala i'll take a look! thank you

davidkhala (Thu, 26 Jul 2018 15:36:28 GMT):
and now I found the eventHub of blockEvent is not required any more of monitoring whether join channel success.

davidkhala (Thu, 26 Jul 2018 15:36:28 GMT):
and now I found the eventHub of blockEvent is not required any more for purpose of monitoring whether join channel success.

davidkhala (Thu, 26 Jul 2018 15:37:52 GMT):
is it surely success if join channel response positive

davidkhala (Thu, 26 Jul 2018 15:39:37 GMT):
the core part of my join channel function: https://github.com/davidkhala/fabric-common/blob/55d82aceec864828b0eeb3bd792d760c792982f6/nodejs/channel.js#L80

davidkel (Thu, 26 Jul 2018 15:43:36 GMT):
@davidkhala Just out of interest are you working with master or 1.2 release ? There are some fixes coming in 1.2 (replicated in master) soon that restore the way errors were reported from peers, so behaviour will change between 1.2. and 1.2.1

davidkhala (Thu, 26 Jul 2018 15:45:35 GMT):
for master of my repos I refer to node-sdk 1.2 only. Have not noticed 1.2.1 tag.

davidkhala (Thu, 26 Jul 2018 15:45:59 GMT):
oop sorry

davidkel (Thu, 26 Jul 2018 15:46:07 GMT):
1.2.1 hopefully will be published next week. There are 1.3.0 snapshots that replicate the same behaviour for now

davidkhala (Thu, 26 Jul 2018 15:46:18 GMT):
@davidkel I mistake you as @jrosmith

davidkhala (Thu, 26 Jul 2018 15:47:53 GMT):
@davidkel do you mean by my contribution work? or my personal project?

davidkel (Thu, 26 Jul 2018 15:48:46 GMT):
@davidkhala as in the version of the node-sdk you might use as a developer developing client applications for fabric

davidkhala (Thu, 26 Jul 2018 15:51:16 GMT):
For my application project I use like fabric-client@1.2.0

davidkel (Thu, 26 Jul 2018 15:52:25 GMT):
@davidkhala ok, so 1.2 changed the way errors from peers were reported, 1.2.1 will change it back in case this is something you come across

davidkhala (Thu, 26 Jul 2018 15:52:41 GMT):
!!! ok...

davidkhala (Thu, 26 Jul 2018 15:54:02 GMT):
that is embarrassing some how. What I thought it is by designed as part of new feature ChannelEventHub

davidkhala (Thu, 26 Jul 2018 15:55:30 GMT):
Then which commit did that revert patch?

davidkel (Thu, 26 Jul 2018 15:59:25 GMT):
@davidkhala I believe it was something that changed server side rather than a change to the node-sdk itself, so node-sdk was changed to replicate how it used to behave in 1.1

davidkhala (Thu, 26 Jul 2018 15:59:37 GMT):
I guess 1.2.1 is a version not in node-sdk repos only in fabric core repos. Normally for consistent I align version between sdk and fabric image. So I would just wait until 1.3 official launched.

davidkhala (Thu, 26 Jul 2018 16:00:03 GMT):
Yes, as you said

davidkhala (Thu, 26 Jul 2018 16:00:51 GMT):
Thanks so much for you tips @davidkel

davidkel (Thu, 26 Jul 2018 16:00:55 GMT):
node-sdk doesn't have to align with fabric fix packs, so for example 1.2.1 doesn't require fabric 1.2.1, but node-sdk major and minor versions will align with fabric

davidkel (Thu, 26 Jul 2018 16:00:55 GMT):
node-sdk doesn't have to align with fabric fix packs, so for example 1.2.1 doesn't require fabric 1.2.1, but node-sdk major and minor versions will align with fabric, ie 1.2 1.3 etc

davidkhala (Thu, 26 Jul 2018 16:03:36 GMT):
Yes, it is just my persona lazy version strategy.LOL

a5chanda (Fri, 27 Jul 2018 13:56:47 GMT):
Has joined the channel.

mmick (Sun, 29 Jul 2018 10:23:32 GMT):
How to create a participant card using Node SDK? How to query the ledger from node SDK API?

SanketPanchamia (Mon, 30 Jul 2018 03:18:28 GMT):

Clipboard - July 30, 2018 8:48 AM

SanketPanchamia (Mon, 30 Jul 2018 03:18:38 GMT):
Hi. Has anyone tried to run the balance transfer app on RHEL7? I am trying to run and get this error while it tries to instantiate the chaincode. It basically doesnt allow creating the dev containers. Any help?

mavericklam (Mon, 30 Jul 2018 04:11:47 GMT):
hello, I encountered a problem when using sdk to parse the json string returned by chaincode(NodeJS).I see all the json symbol like "{}", ":" and "," are missing when I try to parse the response by response_payloads[i].toString('base64'). Is there any hint?

mavericklam (Mon, 30 Jul 2018 04:12:15 GMT):
also some of the json has "w==" suffix after parsing

SanketPanchamia (Mon, 30 Jul 2018 04:59:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uwmEmqYPeyJbpJprm) Hi I got past this error but now i keep getting a timeout error while instantiating

SanketPanchamia (Mon, 30 Jul 2018 04:59:20 GMT):

Clipboard - July 30, 2018 10:29 AM

davidkhala (Mon, 30 Jul 2018 05:32:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WEZsJCyQHyZhBSqcD) @mmick Participant card is unique concept from Hyperledger Composer #composer , not intrinsically implemented in fabric-node-sdk

SanketPanchamia (Mon, 30 Jul 2018 07:24:57 GMT):
centos

javrevasandeep (Mon, 30 Jul 2018 07:33:47 GMT):
adding an org

asadhayat (Mon, 30 Jul 2018 08:42:22 GMT):
How to get error string returned by chaincode in node SDK. Like in `return shim.Error("Error String")`

asadhayat (Mon, 30 Jul 2018 08:42:22 GMT):
How to get error string returned by chaincode in a query request, in node SDK. Like in `return shim.Error("Error String")`

SanketPanchamia (Mon, 30 Jul 2018 08:45:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hQXpKevcpmd4eTScf) @asadhayat This is the workaround that I have var buffer bytes.Buffer buffer.WriteString("Result - ") if a==10 { buffer.WriteString("Failure") } else { buffer.WriteString("Success") } return shim.Success(buffer.Bytes())

asadhayat (Mon, 30 Jul 2018 08:49:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qxck65A86PrDMHAYx) @SanketPanchamia Yes i thought of this techniques... But it returns a success state, and i want to catch failure state.

SanketPanchamia (Mon, 30 Jul 2018 09:05:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Pwq6xBQi8GSCs64iz) @asadhayat Thats why i said...workaround :)

davidkhala (Mon, 30 Jul 2018 09:40:41 GMT):
when `channel.sendTransaction`, who are the committing peers going to validate the transaction??

kjroger94 (Mon, 30 Jul 2018 10:21:59 GMT):
Has joined the channel.

kjroger94 (Mon, 30 Jul 2018 10:25:50 GMT):
is this the right place to ask questions about how to get started? I see there is a lot of documentation available but what to import or require for specific APIs or fucntions and how to use is still dependent upon the sample provided "balance transfer" is it?

d8bhatta (Mon, 30 Jul 2018 10:36:28 GMT):
Has joined the channel.

d8bhatta (Mon, 30 Jul 2018 10:36:48 GMT):
Hello All

d8bhatta (Mon, 30 Jul 2018 10:37:22 GMT):
I am following this link https://github.com/hyperledger/fabric-sdk-node and running this command :: node test/integration/e2e.js as per instruction

d8bhatta (Mon, 30 Jul 2018 10:38:15 GMT):
but I got this error:

d8bhatta (Mon, 30 Jul 2018 10:38:16 GMT):
var test = _test(tape); ^ TypeError: _test is not a function at Object. (/Users/deep/go/src/github.com/hyperledger/fabric-sdk-node/test/integration/e2e/create-channel.js:23:12)

d8bhatta (Mon, 30 Jul 2018 10:38:34 GMT):
can somebody suggest me what's wrong here

chapagain (Mon, 30 Jul 2018 10:47:14 GMT):
Has joined the channel.

mastersingh24 (Mon, 30 Jul 2018 10:48:29 GMT):
@d8bhatta - Did you run `npm install` ?

d8bhatta (Mon, 30 Jul 2018 10:51:58 GMT):
@mastersingh24 yes it ran successfully

jpayne23 (Mon, 30 Jul 2018 12:23:05 GMT):
Has joined the channel.

jfodale (Mon, 30 Jul 2018 16:40:10 GMT):
fodale

SanketPanchamia (Mon, 30 Jul 2018 16:52:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=B9jiEh6nqv5MGvfYo) Any help on this one? @mastersingh24 ?

jrosmith (Mon, 30 Jul 2018 18:37:43 GMT):
hey all, i'm trying to (package my indices)[https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html#using-couchdb-from-chaincode] with my chaincode using node-sdk 1.2 but i'm noticing the generated .tar file does not contain the `META-INF` directory. i looked at the [docs](https://fabric-sdk-node.github.io/BasePackager.html#package__anchor) and didn't see anything suggesting i need to do anything more than pass a Packager instance the base directory where my `chaincode.go` file and`META-INF` folder live. am i missing a step somewhere?

jrosmith (Mon, 30 Jul 2018 18:37:43 GMT):
hey all, i'm trying to [package my indices](https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html#using-couchdb-from-chaincode) with my chaincode using node-sdk 1.2 but i'm noticing the generated .tar file does not contain the `META-INF` directory. i looked at the [docs](https://fabric-sdk-node.github.io/BasePackager.html#package__anchor) and didn't see anything suggesting i need to do anything more than pass a Packager instance the base directory where my `chaincode.go` file and`META-INF` folder live. am i missing a step somewhere?

jrosmith (Mon, 30 Jul 2018 18:37:43 GMT):
hey all, i'm trying to [package my indices](https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html#using-couchdb-from-chaincode) with my chaincode using node-sdk 1.2 but i'm noticing the generated .tar file does not contain the `META-INF` directory. i looked at the [docs](https://fabric-sdk-node.github.io/BasePackager.html#package__anchor) and didn't see anything suggesting i need to do anything more than pass a Packager instance the base directory where my `chaincode.go` file, vendor folder, and `META-INF` folder live. am i missing a step somewhere?

jrosmith (Mon, 30 Jul 2018 19:43:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2dv3mrwbkgGxQemqa) following up to this, i was missing something. the top level path to `META-INF` must be passed to the packager instance as the `metadataPath`. once i passed this properly i was able to package my indices.

chapagain (Tue, 31 Jul 2018 05:27:42 GMT):
@SanketPanchamia You can try first cleaning out the docker containers and artifacts with the following commands: ``` docker rm -f $(docker ps -aq) docker rmi -f $(docker images | grep dev | awk '{print $3}') rm -rf fabric-client-kv-org[1-2] ```

chapagain (Tue, 31 Jul 2018 05:27:42 GMT):
@SanketPanchamia You can try cleaning out the docker containers and artifacts with the following commands: ``` docker rm -f $(docker ps -aq) docker rmi -f $(docker images | grep dev | awk '{print $3}') rm -rf fabric-client-kv-org[1-2] ```

chapagain (Tue, 31 Jul 2018 05:54:50 GMT):
On https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer At first I ran: ``` cd fabric-samples/balance-transfer ./runApp.sh ``` It ran successfully. Then, in another terminal window, I ran: ``` ./testAPIs.sh -l node ``` Here, I am getting this error: > a now has Error: make sure the chaincode mycc has been successfully instantiated and try again: getccdata mychannel/mycc responded with error: could not find chaincode with name 'mycc' after the move Any idea?

chapagain (Tue, 31 Jul 2018 05:54:50 GMT):
On https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer At first I ran: ``` cd fabric-samples/balance-transfer ./runApp.sh ``` It ran successfully. Then, in another terminal window, I ran: ``` ./testAPIs.sh -l node ``` Here, I am getting this error: > a now has Error: make sure the chaincode mycc has been successfully instantiated and try again: getccdata mychannel/mycc responded with error: could not find chaincode with name 'mycc' after the move Any idea?

chapagain (Tue, 31 Jul 2018 05:54:50 GMT):
On https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer At first I ran: ``` cd fabric-samples/balance-transfer ./runApp.sh ``` It ran successfully. Then, in another terminal window, I ran: ``` ./testAPIs.sh -l node ``` Here, I am getting this error: > a now has Error: make sure the chaincode mycc has been successfully instantiated and try again: getccdata mychannel/mycc responded with error: could not find chaincode with name 'mycc' after the move Any idea?

chapagain (Tue, 31 Jul 2018 05:54:50 GMT):
On https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer At first I ran: ``` cd fabric-samples/balance-transfer ./runApp.sh ``` It ran successfully. Then, in another terminal window, I ran: ``` ./testAPIs.sh -l node ``` Here, I am getting this error: > a now has Error: make sure the chaincode mycc has been successfully instantiated and try again: getccdata mychannel/mycc responded with error: could not find chaincode with name 'mycc' after the move > Any idea?

chapagain (Tue, 31 Jul 2018 05:54:50 GMT):
On https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer At first I ran: ``` cd fabric-samples/balance-transfer ./runApp.sh ``` It ran successfully. Then, in another terminal window, I ran: ``` ./testAPIs.sh -l node ``` Here, I am getting this error: > a now has Error: make sure the chaincode mycc has been successfully instantiated and try again: getccdata mychannel/mycc responded with error: could not find chaincode with name 'mycc' after the move > > Any idea?

davidkhala (Tue, 31 Jul 2018 08:26:46 GMT):
Starting from mochai/chai test framework was introduced into node-sdk, I saw this error occasionally ``` npm ERR! path /w/workspace/fabric-sdk-node8-verify-master-s390x/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-client/node_modules/nyc/node_modules/amdefine npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '/w/workspace/fabric-sdk-node8-verify-master-s390x/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-client/node_modules/nyc/node_modules/amdefine' -> '/w/workspace/fabric-sdk-node8-verify-master-s390x/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-client/node_modules/nyc/node_modules/.amdefine.DELETE' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent ``` And now it appears again in build job: https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-sdk-node8-verify-master-s390x/257/

davidkhala (Tue, 31 Jul 2018 08:26:46 GMT):
Starting from mocha/chai test framework was introduced into node-sdk, I saw this error occasionally ``` npm ERR! path /w/workspace/fabric-sdk-node8-verify-master-s390x/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-client/node_modules/nyc/node_modules/amdefine npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '/w/workspace/fabric-sdk-node8-verify-master-s390x/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-client/node_modules/nyc/node_modules/amdefine' -> '/w/workspace/fabric-sdk-node8-verify-master-s390x/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-client/node_modules/nyc/node_modules/.amdefine.DELETE' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent ``` And now it appears again in build job: https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-sdk-node8-verify-master-s390x/257/

akshay.lawange (Tue, 31 Jul 2018 09:14:50 GMT):
Hi, I have a quick question about network-config.yaml. Can we create one network-config.yaml for multiple channels?

akshay.lawange (Tue, 31 Jul 2018 09:15:10 GMT):
I tried creating one for two channels did not work out.

akshay.lawange (Tue, 31 Jul 2018 09:15:23 GMT):
Does anyone have idea?

Moulali (Tue, 31 Jul 2018 09:53:57 GMT):
Has joined the channel.

davidkhala (Tue, 31 Jul 2018 10:01:21 GMT):
Today I tried to add collectionConfigs in instantiate, but the endorsement reply me an error ``` { version: 0, timestamp: null, response: { status: 500, message: 'invalid number of arguments to lscc: 7', payload: }, endorsement: null } ```

davidkhala (Tue, 31 Jul 2018 10:05:25 GMT):
I guess it comes from if (!ac.Capabilities().PrivateChannelData() && len(args) > 6) ||

davidkhala (Tue, 31 Jul 2018 10:05:25 GMT):
I guess it comes from https://github.com/hyperledger/fabric/blob/77c3aa6ce5b0cfba93bfda009095886dbcadff91/core/scc/lscc/lscc.go#L776

akshay.lawange (Tue, 31 Jul 2018 14:24:10 GMT):
Hi, while enrolling new user to network it does not take other username than 'admin'. It gives me this error ``` [2018-07-31T19:47:57.794] [DEBUG] Helper - getClientForOrg - ****** START org1 undefined Login Successful [2018-07-31T19:47:57.818] [DEBUG] Helper - getClientForOrg - ****** END org1 undefined [2018-07-31T19:47:57.818] [DEBUG] Helper - Successfully initialized the credential stores [2018-07-31T19:47:57.818] [INFO] Helper - User akshay was not enrolled, so we will need an admin user object to register [2018-07-31T19:47:58.733] [ERROR] Helper - Failed to get registered user: akshay with error: Error: fabric-ca request register failed with errors [[{"code":63,"message":"Failed to get Affiliation: sql: no rows in result set"}]] Enrolled and Registered successfully:"failed Error: fabric-ca request register failed with errors [[{\"code\":63,\"message\":\"Failed to get Affiliation: sql: no rows in result set\"}]]" ```

akshay.lawange (Tue, 31 Jul 2018 14:24:51 GMT):
ignore "Login Successful" its just a log

akshay.lawange (Tue, 31 Jul 2018 14:25:42 GMT):
Can anyone help me with this?

bh4rtp (Wed, 01 Aug 2018 03:57:49 GMT):
hi, why does ORDERER_GENERAL_TLS_ROOTCAS include the ca.crt file of peer0.org1 and peer0.org2 as ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt, /etc/hyperledger/crypto/peerOrg1/tls/ca.crt, /etc/hyperledger/crypto/peerOrg2/tls/ca.crt] https://github.com/hyperledger/fabric-samples/blob/release-1.2/balance-transfer/artifacts/docker-compose.yaml#L57

bh4rtp (Wed, 01 Aug 2018 03:58:36 GMT):
what is use of [/etc/hyperledger/crypto/peerOrg1/tls/ca.crt, /etc/hyperledger/crypto/peerOrg2/tls/ca.crt]?

SanketPanchamia (Wed, 01 Aug 2018 04:02:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Yovife3krPAbLxLYe) @akshay.lawange Are you running your own CA? If so, you need to add affiliation to the ca-config file

davidkhala (Wed, 01 Aug 2018 04:20:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ftqw5LBwYcTJe5Xed) @bh4rtp I heard from my friend, they are legacy from 1.0.x. So far I have tested a lot to find removal of them is not harmful

bh4rtp (Wed, 01 Aug 2018 05:47:06 GMT):
@davidkhala thanks. i also found fabric/examples/e2e_cli has not.

abhishek.s (Wed, 01 Aug 2018 06:20:10 GMT):
Has joined the channel.

bh4rtp (Wed, 01 Aug 2018 08:59:09 GMT):
i got an error when enroll user: `[ERROR] Helper - Failed to get registered user: Allen with error: TypeError: Cannot read property 'curve' of undefined` any clue to probe this issue is appreciated.

username343 (Wed, 01 Aug 2018 09:57:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ozyj5rv6koeqfHK8n) @bretharrison thanks for help @bretharrison

username343 (Wed, 01 Aug 2018 10:37:26 GMT):
How do I get the the invoked function name and the argument from the transaction proposal data. I've tried using the data as a buffer in nodejs and then printing that buffer as a string but I'm not able to decode it in a perfect string. For example, consider the invocation : '{"Args":["init","A","100","B","200"]}', the string that I'm getting after trying what I've mentioned above is -> '\n{\b\u0001\u0012\u0006\u0012\u0004lscc\u001ao\n\u0006deploy\n\tmychannel\n*\n(\b\u0001\u0012\f\u0012\u0005mycc2\u001a\u00031.0\u001a\u0016\n\u0004init\n\u0001A\n\u0003100\n\u0001B\n\u0003200\n"\u0012\f\u0012\n\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u001a\b\u0012\u0006\n\u0004Org1\u001a\b\u0012\u0006\n\u0004Org2\n\u0004escc\n\u0004vscc'. Is there any way to get the above in the form of '{"Args":["init","A","100","B","200"]}'

fksaito (Wed, 01 Aug 2018 12:29:38 GMT):
Has joined the channel.

sandeeppatel1986 (Wed, 01 Aug 2018 12:51:42 GMT):
Has joined the channel.

akshay.lawange (Wed, 01 Aug 2018 14:36:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5kwkbATwA97byxCnd) @SanketPanchamia yes. I am running my own organisation. It worked. Thanks.

bretharrison (Wed, 01 Aug 2018 16:33:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=itcDSTuwngmiBbJkb) @mauricio @mauricio see https://fabric-sdk-node.github.io/tutorial-channel-events.html for events

bretharrison (Wed, 01 Aug 2018 16:35:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fbeRXrQZsbCDWGrtB) @davidkhala @davidkhala have figured out what is the issue ?

bretharrison (Wed, 01 Aug 2018 16:37:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=deBGD9CrMHbdMbsN3) @akshay.lawange @akshay.lawange Yes the connection profile (network-config) supports multiple channels. What is not working, do you have a log file ?

bretharrison (Wed, 01 Aug 2018 16:40:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HQXDobg89jcsiQ6e7) @username343 @username343 I assume you are decoding the block ? You may wish to post to the #fabric-ledger channel ?

bretharrison (Wed, 01 Aug 2018 16:47:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rLjhCJeFh6JcQRWti) @bh4rtp @bh4rtp maybe turn on logging before running your application `export HFC_LOGGING='{"debug":"console"}'`

bretharrison (Wed, 01 Aug 2018 16:53:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=b4xxep8kumi547o8m) @jrosmith @jrosmith use the `channel.queryInstantiatedChaincodes()` to check the peer for running chaincodes

davidkhala (Thu, 02 Aug 2018 01:40:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BCe8XenWjAWytk7av) @bretharrison Yes, dear bret, I have solved by adding `Capabilities` sections in `configtx.yaml` for genesis block and channel profiles. The error is prompted by fabric core, not our node sdk.

bh4rtp (Thu, 02 Aug 2018 02:23:57 GMT):
@bretharrison how to use HFC_LOGGING in my application? i add it in app.js like this but failed: `process.env.HFC_LOGGING = "{'debug': 'console'}";`

bh4rtp (Thu, 02 Aug 2018 03:15:09 GMT):
i use `hfc.setConfigSetting('hfc-logging', '{"debug":"console"}');` but has no effects.

wangdong (Thu, 02 Aug 2018 05:58:43 GMT):
the config might require a format

kjroger94 (Thu, 02 Aug 2018 06:36:06 GMT):
do we need to use some CA for the client application to interact with the blockchain network as well?

rajasekharpippalla (Thu, 02 Aug 2018 09:40:19 GMT):

issue.png

rajasekharpippalla (Thu, 02 Aug 2018 09:40:22 GMT):
hi I am facing issue while generating node_modules do u have any idea I am using fabric-samples example ... it will not support node -v 7+ right HL node sdk uses async functions that are only after v8.9 How I can resolve this issue?

akshay.lawange (Thu, 02 Aug 2018 09:42:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jwKwyuT5csTTr2oMb) @bretharrison Yeah it does support. It was space issues n network-config.yaml file. I just repaired it, it worked.

akshay.lawange (Thu, 02 Aug 2018 09:42:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rrocLgt2JMayJWQdJ) Thanks.

SunilHirole (Thu, 02 Aug 2018 10:02:43 GMT):
Has joined the channel.

SunilHirole (Thu, 02 Aug 2018 10:08:04 GMT):
Hello all, Is there any way we can modify channel.tx file using fabric-node-sdk(without using configtxlator and configtxgen tools ). So that i can create multiple channels using same channel.tx file

bretharrison (Thu, 02 Aug 2018 14:34:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WeXmQjy3LMu6c3EMN) @kjroger94 You do not need a CA if you have a certificate for the user that is interacting with the fabric network.

bretharrison (Thu, 02 Aug 2018 14:36:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=s6jgTSRYmS9QBTMyP) @bh4rtp set the environment setting before doing the `require('fabric-client')`

MaheshBalan_Pravici (Fri, 03 Aug 2018 00:17:34 GMT):
Has joined the channel.

itsnavpreet (Fri, 03 Aug 2018 04:55:57 GMT):
Has joined the channel.

StefanKosc (Fri, 03 Aug 2018 08:49:07 GMT):
Has joined the channel.

bh4rtp (Fri, 03 Aug 2018 09:15:31 GMT):
does sdk support multiple channels?

SunilHirole (Fri, 03 Aug 2018 09:41:17 GMT):
Hi all, I am not able to get channel after calling *client.getChannel(channel_name);* method from joinChannel method of balance-transfer example. I created channel by sending orderer in request object and removing channel configuration from network-config.yaml

Gaurav6794 (Fri, 03 Aug 2018 10:40:01 GMT):
Has joined the channel.

Gaurav6794 (Fri, 03 Aug 2018 10:40:14 GMT):
Hi all ,

Gaurav6794 (Fri, 03 Aug 2018 11:32:24 GMT):
Hi all During Invoke while processing a proposal with endorser client in proto peer in node sdk with custom first network with tls enabled i am having this error error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed at new createStatusError (/var/www/html/hyperledgerfabric_tsest_chaincode/first-network/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15). I have six peers, one orderer, solo, tls enabled network I followed https://fabric-sdk-node.github.io/tutorial-mutual-tls.html for node sdk

clydedacruz (Fri, 03 Aug 2018 11:56:31 GMT):
can the node sdk v1.2 be used with a fabric 1.1 network ? (i.e if im not using the new features added in the 1.2 network)?

clydedacruz (Fri, 03 Aug 2018 11:56:46 GMT):
asked a question about it on SO https://stackoverflow.com/questions/51672046/can-fabric-node-sdk-1-2-be-used-with-a-fabric-1-1-network

StefanKosc (Fri, 03 Aug 2018 12:24:04 GMT):
Hi, does anyone know why tests for `balance-transfer` example are failing with ssl error when channel is created?

vladyslavmunin (Fri, 03 Aug 2018 13:13:02 GMT):
Hi guys , I'm not sure that I should ask question in this channel , but I do. I tried to implement 'client signing ' proposal functionality , I generated key pair and certificates at browser side , successfully enrolled user directly via ca and build the proposal , then signed this proposal in browser and sent back to the server. Then I tried to send signed proposal via Node SDK to peer. but gor error '2Unknown access denied ;channel[mychannel] creator[org1]' Does anyone face with this error before? ( Early I faced by it wrong mspID , but now I'm sure that it's correct)

vladyslavmunin (Fri, 03 Aug 2018 13:13:02 GMT):
Hi guys , I'm not sure that I should ask question in this channel , but I do. I tried to implement 'client signing ' proposal functionality , I generated key pair and certificates at browser side , successfully enrolled user directly via ca and build the proposal , then signed this proposal in browser and sent back to the server. Then I tried to send signed proposal via Node SDK to peer. but gor error '2Unknown access denied ;channel[mychannel] creator[org1]' Does anyone face with this error before? ( Early I faced by it was wrong mspID , but now I'm sure that it's correct)

raspydev (Fri, 03 Aug 2018 13:43:58 GMT):
Has joined the channel.

raspydev (Fri, 03 Aug 2018 13:46:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2QZQhezJFk8LRr6de) @vladyslavmunin Check the error logs of the container. What does it say?

vladyslavmunin (Fri, 03 Aug 2018 14:01:17 GMT):
I tried to this. but I didn't manage to find what I need.Fast stream of logs. Grep doesn't help Am I right that I should look peer logs.

vladyslavmunin (Fri, 03 Aug 2018 14:01:17 GMT):
@raspydev I tried to this. but I didn't manage to find what I need.Fast stream of logs. Grep doesn't help Am I right that I should look peer logs.

vladyslavmunin (Fri, 03 Aug 2018 14:12:22 GMT):
@raspydev I found. "WARN 046 channel [mychannel]: creator's signature over the proposal is not valid: The signature is invalid"

vladyslavmunin (Fri, 03 Aug 2018 14:13:34 GMT):
how I can check that signature is valid before I send to peer.. Cause I sign in the same way as sdk..

raspydev (Fri, 03 Aug 2018 14:52:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AqgajkxigXRAJQg2S) @vladyslavmunin Not sure, may be use the Public key?

vladyslavmunin (Fri, 03 Aug 2018 15:34:12 GMT):
@raspydev cryptoSuite.verify() returns false ...but how?

vladyslavmunin (Fri, 03 Aug 2018 15:36:01 GMT):
`WHAT FABRIC SDK DOES 1) compute digest var digest = hashFunction(msg); return this._signer.sign(Buffer.from(digest, 'hex'), null); 2) sign(key, digest) { if (typeof key === 'undefined' || key === null) { throw new Error('A valid key is required to sign'); } if (typeof digest === 'undefined' || digest === null) { throw new Error('A valid message is required to sign'); } // Note that the statement below uses internal implementation specific to the // module './ecdsa/key.js' const signKey = this._ecdsa.keyFromPrivate(key._key.prvKeyHex, 'hex'); let sig = this._ecdsa.sign(digest, signKey); sig = _preventMalleability(sig, key._key.ecparams); logger.debug('ecdsa signature: ', sig); return sig.toDER(); } WHAT I DO 1) compute digest //create digest of proposal var md = new KJUR.crypto.MessageDigest({ alg: "sha256", prov: "cryptojs" }); var mdHex = md.digest(proposal) 2) Sign const signKey = this._ecdsa.keyFromPrivate(pair.prvKeyObj.prvKeyHex, 'hex'); //sign digest let sig = this._ecdsa.sign(Buffer.from(mdHex), signKey); //prevent Malleability sig = this.preventMalleability(sig, pair.prvKeyObj.ecparams); let signature = sig.toDER(); `

vladyslavmunin (Fri, 03 Aug 2018 15:37:01 GMT):

Clipboard - August 3, 2018 6:36 PM

vladyslavmunin (Fri, 03 Aug 2018 15:51:20 GMT):
@raspydev ` let pubK = this.xcryptoSuite.importKey(signedProposal.pubPem, { ephemeral: true }); let privK = this.xcryptoSuite.importKey(signedProposal.privPem, { ephemeral: true }); let signatureSDK = this.xcryptoSuite.sign(privK, signedProposal.digest); let isTrue = this.xcryptoSuite.verify(pubK, signatureSDK, signedProposal.digest);` even this return false

akshay.sood (Sat, 04 Aug 2018 06:49:07 GMT):
Has joined the channel.

as7 (Sat, 04 Aug 2018 10:02:36 GMT):
Has joined the channel.

as7 (Sat, 04 Aug 2018 10:02:49 GMT):
The full path from where the SDK will read the chaincode will be $GOPATH + src + specified path(e.g chaincode) ??

SunilHirole (Sat, 04 Aug 2018 14:03:44 GMT):
Is adding organization through node-sdk is possible?

Ferrymania (Mon, 06 Aug 2018 02:41:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EppsCS9gQJuMvBpT4) @as7 You can assign the chaincode directory as you like and ,the path would be mappiong on the peer docker path

Ferrymania (Mon, 06 Aug 2018 02:43:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5QoqCABgd8cs83x2p) @SunilHirole I found this,https://fabric-sdk-node.github.io/Organization.html,which may be helpful to you

Ammu (Mon, 06 Aug 2018 04:08:42 GMT):
Has joined the channel.

clydedacruz (Mon, 06 Aug 2018 04:53:58 GMT):
@mastersingh24 Could you throw some light upon this ? Thanks! https://stackoverflow.com/questions/51672046/can-fabric-node-sdk-1-2-be-used-with-a-fabric-1-1-network

SunilHirole (Mon, 06 Aug 2018 07:51:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WPT35gt2ySyE894ks) @clydedacruz @clydedacruz Please check the link https://stackoverflow.com/questions/51672046/can-fabric-node-sdk-1-2-be-used-with-a-fabric-1-1-network . I have answered there

clydedacruz (Mon, 06 Aug 2018 08:03:53 GMT):
Thanks @SunilHirole !

akshay.lawange (Mon, 06 Aug 2018 09:30:49 GMT):
Hi, got an error while invoking a function on chaincode. Has anyone faced this issue? ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [globalchannel] creator org [oMSP] at new createStatusError (C:\Users\user1\Desktop\1.2_UI\fabric_1.2_ui\node_modules\grpc\src\client.js:64:15) at C:\Users\user1\Desktop\1.2_UI\fabric_1.2_ui\node_modules\grpc\src\client.js:583:15 [2018-08-06T14:54:04.863] [ERROR] invoke-chaincode - invoke chaincode proposal was bad [2018-08-06T14:54:04.864] [DEBUG] invoke-chaincode - Failed to send Proposal and receive all good ProposalResponse [2018-08-06T14:54:04.864] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Failed to send Proposal and receive all good ProposalResponse (node:11068) UnhandledPromiseRejectionWarning: Error: Failed to invoke chaincode. cause:Failed to send Proposal and receive all good ProposalResponse ```

bh4rtp (Mon, 06 Aug 2018 09:34:31 GMT):
@akshay.lawange it seems the endorsement policies are violated. check your `network-config.yaml` and instantiate chaincode peers.

bh4rtp (Mon, 06 Aug 2018 09:34:31 GMT):
@akshay.lawange sorry. i mistake instantiate chaincode.

as7 (Mon, 06 Aug 2018 09:36:30 GMT):
Failed to send instantiate transaction and get notifications within the timeout period: undefined

as7 (Mon, 06 Aug 2018 09:36:50 GMT):
Got this Error while instantiating Chaincode Fabric 1.2

StefanKosc (Mon, 06 Aug 2018 10:39:48 GMT):
Hi, does anyone know how to solve ` TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined` `=!=E4eB9STzeKAJkjrDu=!= `

StefanKosc (Mon, 06 Aug 2018 10:40:41 GMT):
Hi, does anyone know how to solve the following error ` TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined`

StefanKosc (Mon, 06 Aug 2018 10:42:20 GMT):
Hi, does anyone know how to solve the following error ` TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined` I try to install chaincode on a peer. I copied chaincode to /data/fabcar/go. My request is ``` const request = { chaincodePath: "/data/fabcar/go", chaincodeId: "fabcar", chaincodeVersion: "v1", targets: [peer] }; ```

ayusht11 (Mon, 06 Aug 2018 10:44:24 GMT):
Has joined the channel.

StefanKosc (Mon, 06 Aug 2018 10:55:47 GMT):
I am wondering if a file with `.go` extension is ok or should I have a package?

StefanKosc (Mon, 06 Aug 2018 10:55:47 GMT):
I am wondering if a file with `.go` extension is ok or if I should have a package?

as7 (Mon, 06 Aug 2018 13:00:30 GMT):
Error verifying block with sequnce number 1, due to Failed to reach implicit threshold of 1 sub-policies, required 1 remaining

as7 (Mon, 06 Aug 2018 13:00:40 GMT):
Error while instantiating chaincode

Luxii (Mon, 06 Aug 2018 14:04:59 GMT):
Hi, how do I create a new Peer object ?

bretharrison (Mon, 06 Aug 2018 17:44:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=brYT4xDy8ha2FqgM5) @Luxii I would recommend not creating the peer at all, use a connection profile file that has the peer's settings and then if you really need to have the peer object, ask the client object for it after loading the client object with your connection profile. ``` const client = Client.loadFromConfig('/somedir/myprofile.yaml'); const peer = client.getPeer('mypeer.org1'); //get peer as defined in myprofile.yaml file ``` or ask the client for a new peer instance, but this requires reading in or getting the peers settings. ``` const peerUrl = 'grpcs://mypeer.com:7051'; const opts = { const peer = client.newPeer(peerUrl, opts); ```

bretharrison (Mon, 06 Aug 2018 17:44:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=brYT4xDy8ha2FqgM5) @Luxii I would recommend not creating the peer at all, use a connection profile file that has the peer's settings and then if you really need to have the peer object, ask the client object for it after loading the client object with your connection profile. ``` const client = Client.loadFromConfig('/somedir/myprofile.yaml'); const peer = client.getPeer('mypeer.org1'); //get peer as defined in myprofile.yaml file ``` or ask the client for a new peer instance, but this requires reading in or getting the peers settings. ``` const peerUrl = 'grpcs://localhost:7051'; const opts = { pem: , 'ssl-target-name-override': 'mypeer.com' } const peer = client.newPeer(peerUrl, opts); ```

bretharrison (Mon, 06 Aug 2018 17:44:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=brYT4xDy8ha2FqgM5) @Luxii I would recommend not creating the peer at all, use a connection profile file that has the peer's settings and then if you really need to have the peer object, ask the client object for it after loading the client object with your connection profile. ``` const client = Client.loadFromConfig('/somedir/myprofile.yaml'); const peer = client.getPeer('mypeer.org1'); //get peer as defined in myprofile.yaml file ``` or ask the client for a new peer instance, but this requires reading in or getting the peers settings. ``` const peerUrl = 'grpcs://localhost:7051'; const opts = { pem: , 'ssl-target-name-override': 'mypeer.com' } const peer = client.newPeer(peerUrl, opts); ``` actually the best way is to let `discovery` do the work, define one peer and on channel then call discovery on the peer, giving you all the peers on the channel. ``` const channel = client.newChanel('mychannel'); const peer = client.newPeer(peerUrl, opts); channel.initialize({discovery:true, target: peer}); const peers = channel.getPeers(); ```

bretharrison (Mon, 06 Aug 2018 17:44:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=brYT4xDy8ha2FqgM5) @Luxii I would recommend not creating the peer at all, use a connection profile file that has the peer's settings and then if you really need to have the peer object, ask the client object for it after loading the client object with your connection profile. ``` const client = Client.loadFromConfig('/somedir/myprofile.yaml'); const peer = client.getPeer('mypeer.org1'); //get peer as defined in myprofile.yaml file ``` or ask the client for a new peer instance, but this requires reading in or getting the peers settings. ``` const peerUrl = 'grpcs://localhost:7051'; const opts = { pem: , 'ssl-target-name-override': 'mypeer.com' } const peer = client.newPeer(peerUrl, opts); ``` actually the best way is to let `discovery` do the work, define one peer and on channel then call discovery on the peer, giving you all the peers on the channel. ``` const channel = client.newChanel('mychannel'); const peer = client.newPeer(peerUrl, opts); channel.initialize({discovery:true, target: peer}); const peers = channel.getPeers(); ``` NOTE: I skipped the step where the `client` gets loaded with the state store, crypto store, mutual tls certs, and a user

bretharrison (Mon, 06 Aug 2018 17:44:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=brYT4xDy8ha2FqgM5) @Luxii I would recommend not creating the peer at all, use a connection profile file that has the peer's settings and then if you really need to have the peer object, ask the client object for it after loading the client object with your connection profile. ``` const client = Client.loadFromConfig('/somedir/myprofile.yaml'); const peer = client.getPeer('mypeer.org1'); //get peer as defined in myprofile.yaml file ``` or ask the client for a new peer instance, but this requires reading in or getting the peers settings. ``` const peerUrl = 'grpcs://localhost:7051'; const opts = { pem: , 'ssl-target-name-override': 'mypeer.com' } const peer = client.newPeer(peerUrl, opts); ``` actually the best way is to let `discovery` do the work, define one peer and on channel then call discovery on the peer, giving you all the peers on the channel. ``` const channel = client.newChanel('mychannel'); const peer = client.newPeer(peerUrl, opts); channel.initialize({discovery:true, target: peer}); const peers = channel.getPeers(); ``` NOTE: I skipped the steps where the `client` gets loaded with the state store, crypto store, mutual tls certs, and a user

bretharrison (Mon, 06 Aug 2018 17:44:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=brYT4xDy8ha2FqgM5) @Luxii I would recommend not creating the peer at all, use a connection profile file that has the peer's settings and then if you really need to have the peer object, ask the client object for it after loading the client object with your connection profile. ``` const client = Client.loadFromConfig('/somedir/myprofile.yaml'); const peer = client.getPeer('mypeer.org1'); //get peer as defined in myprofile.yaml file ``` or ask the client for a new peer instance, but this requires reading in or getting the peers settings. ``` const peerUrl = 'grpcs://localhost:7051'; const opts = { pem: , 'ssl-target-name-override': 'mypeer.com' } const peer = client.newPeer(peerUrl, opts); ``` actually the best way is to let `discovery` do the work, define one peer and a channel then call discovery on the channel, giving you all the peers on the channel. ``` const channel = client.newChanel('mychannel'); const peer = client.newPeer(peerUrl, opts); channel.initialize({discovery:true, target: peer}); const peers = channel.getPeers(); ``` NOTE: I skipped the steps where the `client` gets loaded with the state store, crypto store, mutual tls certs, and a usera

bretharrison (Mon, 06 Aug 2018 18:01:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CkpgaoFxQHDQATstF) @StefanKosc Is your `GOPATH` set ?

bretharrison (Mon, 06 Aug 2018 18:01:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CkpgaoFxQHDQATstF) @StefanKosc Is your environment `GOPATH` set ?

bretharrison (Mon, 06 Aug 2018 18:13:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5QoqCABgd8cs83x2p) @SunilHirole Yes, however it is not trivial. https://fabric-sdk-node.github.io/tutorial-channel-create.html will show all the tools necessary. The flow would be something like: - get the current config - decode config into JSON - get or generate the crypto material for new org - update the JSON config with new organization including the new crypto material - encode the JSON config - calculate the config update - have all organizations sign config update and collect - submit all signatures and config update

bretharrison (Mon, 06 Aug 2018 18:28:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=p4qexJaKximN7B6CF) @SunilHirole The `client.getChannel()` will return a channel instance object if there is a channel with that name defined in the connection profile (network-config.yaml) OR `client.newChannel()` was called previously. Keep in mind that doing a client.newChannel or client.getChannel does not actually create a channel out on the fabric network, it just creates a programming instance object that may then be used by your application code. The usual case is for an application as it starts up to create the channel object and then do invokes and queries on it. The unusual case is for an admin to create the the channel object and having a peer join the channel after having gone though the process of creating the channel.

bretharrison (Mon, 06 Aug 2018 18:29:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DpNpWLu5MQbvn3uGB) @bh4rtp yes

StefanKosc (Mon, 06 Aug 2018 19:39:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4sJddLrMERympGW9X) @bretharrison many thanks for response, my `GOPATH` was not set so it solved a problem but the new one arised :) `access denied for [install]: Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]`

bretharrison (Mon, 06 Aug 2018 21:30:04 GMT):
@StefanKosc Yes the identity used to install chaincode must be defined as an admin on the peer

rajasekharpippalla (Tue, 07 Aug 2018 03:35:40 GMT):

issuewithhelperjs.png

rajasekharpippalla (Tue, 07 Aug 2018 03:38:16 GMT):
I am working on balance-transfer example in fabric-samples .. with same nodeSDK I am unable to store data in block chain .. facing this issue some times only.. the highlighted content is showing the error what I am getting here. Can any one help me to resolve this issue

Ferrymania (Tue, 07 Aug 2018 09:01:17 GMT):
Hi guys,when I try the example `balance-transfer` and enroll a new user ,why could the new user create channel and install chaincode ,are these opreations not for the admin to use ?

migrenaa (Tue, 07 Aug 2018 12:31:29 GMT):
Hello, where are stored the certificates generated by FabricCA? Using the NodeJS SDK, I was specifying KeyValueStore a path in the file system and when a user is registered the certificates were stored there. But we need some centralized store because we will be using more than one application. How do you configure for example mysql to be the certificates store of the system?

Tony (Tue, 07 Aug 2018 13:13:55 GMT):
Has joined the channel.

Tony (Tue, 07 Aug 2018 13:14:19 GMT):
Hi all I am using 1.2 private db

Tony (Tue, 07 Aug 2018 13:14:22 GMT):
More Description:-2018-08-07 11:12:49.403 UTC [shim] handleGetState -> ERRO 003 [372a8d55] GetState received error ERROR Owner: Admin@org4.example.comtimeUnix 2018 ENTERED PAN: BGCPM0352CQUERIED HASH: ENTERED HASH: 6909c02c5069f7006aa510f02825b721191e9c032fd43d6efabe14d4b627b30d595eeb4f94ef3481069fd433ad59101cf2acfb20ab2b0de79ea22f022c4c5312 Successfully stored hash 2018-08-07 11:12:49.405 UTC [shim] handlePutState -> ERRO 004 [372a8d55] Received ERROR. Payload: PUT_STATE failed: transaction ID: 372a8d55cb1616e28c7ca359b346c273d5fef073c9ebd9734c0ff248b4521190: collection config not define for namespace [o279] 2018-08-07 11:12:49.406 UTC [shim] handlePutState -> ERRO 005 [372a8d55] Received ERROR. Payload: PUT_STATE failed: transaction ID: 372a8d55cb1616e28c7ca359b346c273d5fef073c9ebd9734c0ff248b4521190: collection config not define for namespace [o279] 2018-08-07 11:12:52.385 UTC [example_cc0] Info -> INFO 006 ########### example_cc0 Invoke ########### 2018-08-07 11:12:52.388 UTC [shim] handleGetState -> ERRO 007 [ba8e08e5] GetState received error ERROR 2018-08-07 11:12:52.390 UTC [shim] handlePutState -> ERRO 008 [ba8e08e5] Received ERROR. Payload: PUT_STATE failed: transaction ID: ba8e08e53b5f80e6a4c5ec88a4e2822f6b97f3c4968759b668097b31ee074c69: collection config not define for namespace [o279] 2018-08-07 11:12:52.391 UTC [shim] handlePutState -> ERRO 009 [ba8e08e5] Received ERROR. Payload: PUT_STATE failed: transaction ID: ba8e08e53b5f80e6a4c5ec88a4e2822f6b97f3c4968759b668097b31ee074c69: collection config not define for namespace [o279]

Tony (Tue, 07 Aug 2018 13:14:22 GMT):
More Description:-2018-08-07 11:12:49.403 UTC [shim] handleGetState -> ERRO 003 [372a8d55] GetState received error ERROR Owner: Admin@org4.example.comtimeUnix 2018 ENTERED PAN: BGCPM0352CQUERIED HASH: ENTERED HASH: 6909c02c5069f7006aa510f02825b721191e9c032fd43d6efabe14d4b627b30d595eeb4f94ef3481069fd433ad59101cf2acfb20ab2b0de79ea22f022c4c5312 Successfully stored hash 2018-08-07 11:12:49.405 UTC [shim] handlePutState -> ERRO 004 [372a8d55] Received ERROR. Payload: PUT_STATE failed: transaction ID: 372a8d55cb1616e28c7ca359b346c273d5fef073c9ebd9734c0ff248b4521190: collection config not define for namespace [o279] 2018-08-07 11:12:49.406 UTC [shim] handlePutState -> ERRO 005 [372a8d55] Received ERROR. Payload: PUT_STATE failed: transaction ID: 372a8d55cb1616e28c7ca359b346c273d5fef073c9ebd9734c0ff248b4521190: collection config not define for namespace [o279] 2018-08-07 11:12:52.385 UTC [example_cc0] Info -> INFO 006 ########### example_cc0 Invoke ########### 2018-08-07 11:12:52.388 UTC [shim] handleGetState -> ERRO 007 [ba8e08e5] GetState received error ERROR 2018-08-07 11:12:52.390 UTC [shim] handlePutState -> ERRO 008 [ba8e08e5] Received ERROR. Payload: PUT_STATE failed: transaction ID: ba8e08e53b5f80e6a4c5ec88a4e2822f6b97f3c4968759b668097b31ee074c69: collection config not define for namespace [o279] 2018-08-07 11:12:52.391 UTC [shim] handlePutState -> ERRO 009 [ba8e08e5] Received ERROR. Payload: PUT_STATE failed: transaction ID: ba8e08e53b5f80e6a4c5ec88a4e2822f6b97f3c4968759b668097b31ee074c69: collection config not define for namespace [o279] Hi all iam getting an error while using GetPrivateData 2018-08-06 12:04:02.804 UTC [shim] handleGetState -> ERRO 007 [d2376a0a] GetState received error ERROR This is the error:-2018-08-06 12:04:02.804 UTC [shim] handleGetState -> ERRO 007 [d2376a0a] GetState received error ERROR

Tony (Tue, 07 Aug 2018 13:14:22 GMT):
Hi all iam getting an error while using GetPrivateData 2018-08-06 12:04:02.804 UTC [shim] handleGetState -> ERRO 007 [d2376a0a] GetState received error ERROR This is the error:-2018-08-06 12:04:02.804 UTC [shim] handleGetState -> ERRO 007 [d2376a0a] GetState received error ERROR . More Description:-2018-08-07 11:12:49.403 UTC [shim] handleGetState -> ERRO 003 [372a8d55] GetState received error ERROR Owner: Admin@org4.example.comtimeUnix 2018 ENTERED PAN: BGCPM0352CQUERIED HASH: ENTERED HASH: 6909c02c5069f7006aa510f02825b721191e9c032fd43d6efabe14d4b627b30d595eeb4f94ef3481069fd433ad59101cf2acfb20ab2b0de79ea22f022c4c5312 Successfully stored hash 2018-08-07 11:12:49.405 UTC [shim] handlePutState -> ERRO 004 [372a8d55] Received ERROR. Payload: PUT_STATE failed: transaction ID: 372a8d55cb1616e28c7ca359b346c273d5fef073c9ebd9734c0ff248b4521190: collection config not define for namespace [o279] 2018-08-07 11:12:49.406 UTC [shim] handlePutState -> ERRO 005 [372a8d55] Received ERROR. Payload: PUT_STATE failed: transaction ID: 372a8d55cb1616e28c7ca359b346c273d5fef073c9ebd9734c0ff248b4521190: collection config not define for namespace [o279] 2018-08-07 11:12:52.385 UTC [example_cc0] Info -> INFO 006 ########### example_cc0 Invoke ########### 2018-08-07 11:12:52.388 UTC [shim] handleGetState -> ERRO 007 [ba8e08e5] GetState received error ERROR 2018-08-07 11:12:52.390 UTC [shim] handlePutState -> ERRO 008 [ba8e08e5] Received ERROR. Payload: PUT_STATE failed: transaction ID: ba8e08e53b5f80e6a4c5ec88a4e2822f6b97f3c4968759b668097b31ee074c69: collection config not define for namespace [o279] 2018-08-07 11:12:52.391 UTC [shim] handlePutState -> ERRO 009 [ba8e08e5] Received ERROR. Payload: PUT_STATE failed: transaction ID: ba8e08e53b5f80e6a4c5ec88a4e2822f6b97f3c4968759b668097b31ee074c69: collection config not define for namespace [o279]

Tony (Tue, 07 Aug 2018 13:14:22 GMT):
Hi all iam getting an error while using GetPrivateData 2018-08-06 12:04:02.804 UTC [shim] handleGetState -> ERRO 007 [d2376a0a] GetState received error ERROR This is the error:-2018-08-06 12:04:02.804 UTC [shim] handleGetState -> ERRO 007 [d2376a0a] GetState received error ERROR . More Description:-2018-08-07 11:12:49.403 UTC [shim] handleGetState -> ERRO 003 [372a8d55] GetState received error ERROR Owner: Admin@org4.example.comtimeUnix 2018 ENTERED PAN: BGCPM0352CQUERIED HASH: ENTERED HASH: 6909c02c5069f7006aa510f02825b721191e9c032fd43d6efabe14d4b627b30d595eeb4f94ef3481069fd433ad59101cf2acfb20ab2b0de79ea22f022c4c5312 Successfully stored hash 2018-08-07 11:12:49.405 UTC [shim] handlePutState -> ERRO 004 [372a8d55] Received ERROR. Payload: PUT_STATE failed: transaction ID: 372a8d55cb1616e28c7ca359b346c273d5fef073c9ebd9734c0ff248b4521190: collection config not define for namespace [o279] 2018-08-07 11:12:49.406 UTC [shim] handlePutState -> ERRO 005 [372a8d55] Received ERROR. Payload: PUT_STATE failed: transaction ID: 372a8d55cb1616e28c7ca359b346c273d5fef073c9ebd9734c0ff248b4521190: collection config not define for namespace [o279] 2018-08-07 11:12:52.385 UTC [example_cc0] Info -> INFO 006 ########### example_cc0 Invoke ########### 2018-08-07 11:12:52.388 UTC [shim] handleGetState -> ERRO 007 [ba8e08e5] GetState received error ERROR 2018-08-07 11:12:52.390 UTC [shim] handlePutState -> ERRO 008 [ba8e08e5] Received ERROR. Payload: PUT_STATE failed: transaction ID: ba8e08e53b5f80e6a4c5ec88a4e2822f6b97f3c4968759b668097b31ee074c69: collection config not define for namespace [o279] 2018-08-07 11:12:52.391 UTC [shim] handlePutState -> ERRO 009 [ba8e08e5] Received ERROR. Payload: PUT_STATE failed: transaction ID: ba8e08e53b5f80e6a4c5ec88a4e2822f6b97f3c4968759b668097b31ee074c69: collection config not define for namespace [o279]

Tony (Tue, 07 Aug 2018 13:15:06 GMT):
this is my buildchainodeproposal func => var request = { chaincodePath: chaincode_path, chaincodeId: chaincodeID, chaincodeVersion: version, fcn: '', args: [], txId: tx_id, // use this to demonstrate the following policy: // 'if signed by org1 admin, then that's the only signature required, // but if that signature is missing, then the policy can also be fulfilled // when members (non-admin) from both orgs signed' 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: first_mspid } }, { role: { name: 'member', mspId: second_mspid } }, { role: { name: 'admin', mspId: first_mspid } }, { role: { name: 'admin', mspId: second_mspid } } ], policy: { '1-of': [ // { 'signed-by': 2 }, { '2-of': [{ 'signed-by': 0 }, { 'signed-by': 1 }] }, { '2-of': [{ 'signed-by': 2 }, { 'signed-by': 3 }] } ] } }, 'collections-config': collectionsConfigPath197 }; return request;

Tony (Tue, 07 Aug 2018 13:15:26 GMT):
install request=>var request = { targets: targets, chaincodePath: chaincodepath, chaincodeId: chaincodeid, chaincodeVersion: chaincodeversion, 'collections-config': collectionsConfigPath197 };

Tony (Tue, 07 Aug 2018 13:55:27 GMT):
collection config not define for namespace

Luxii (Tue, 07 Aug 2018 13:59:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ETDNFQakMoijgnQj9) @bretharrison Thanks, for your response. I was trying to add new peer in org.

migrenaa (Tue, 07 Aug 2018 14:56:41 GMT):
Hey guys :) . Do you have any idea if I can use AWS Key Management Service for certificates storage (keyValueStore) ?

migrenaa (Tue, 07 Aug 2018 15:00:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uiiN5aoPsHZWqHvFa) If not I guess we can use some cloud file storage. Otherwise, how do you handle having more than one NodeJS application communicating with a single network?

ashutosh_kumar (Tue, 07 Aug 2018 15:09:03 GMT):
Has joined the channel.

akshay.lawange (Tue, 07 Aug 2018 16:04:34 GMT):
Hi, Can anyone help with the following error? I got it while querying to Private data chaincodes. ``` error: [Remote.js]: Error: Failed to connect before the deadline error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to connect before the deadline at checkState (C:\Users\user1\Desktop\1.2_UI\UI\node_modules\grpc\src\client.js:838:16) ```

akshay.lawange (Tue, 07 Aug 2018 16:05:13 GMT):
All the peer names and urls and port numbers I checked everything is fine.

ceebo (Tue, 07 Aug 2018 17:40:17 GMT):
Has joined the channel.

ceebo (Tue, 07 Aug 2018 17:51:48 GMT):
Hi, i'm wondering if it is possible to obtain the organization admin certificate to create channels via sdk? I am running fabric-ca example.

lovelyidiot (Wed, 08 Aug 2018 04:33:53 GMT):
Has joined the channel.

lovelyidiot (Wed, 08 Aug 2018 04:34:21 GMT):
who can fix https://jira.hyperledger.org/browse/FABN-838?

knagware9 (Wed, 08 Aug 2018 05:41:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=h4ysxsz9jnzmECdD4) @rajasekharpippalla its happening due to fabric-client npm module ,which version fabric you using ? there is might be issue with grpc module ,use grpc module 1.9 and fabric-client 1.1.0

shahrukh1426 (Wed, 08 Aug 2018 08:29:48 GMT):
Has joined the channel.

zhaochy (Wed, 08 Aug 2018 08:30:23 GMT):
@akshay.lawange seems a network error, grpc failed to connect to target peer

davidkhala (Wed, 08 Aug 2018 08:55:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TvHEFaYaTjmynidJ7) @rajasekharpippalla It is recommended to upgrade your node version if possible, since even the sdk itself is using new ES6 syntax

davidkhala (Wed, 08 Aug 2018 09:00:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eQSJH65sD3nWYvke7) @SunilHirole @bretharrison LOL, here we see another feedback same as I mentioned before: nodejs version of configtxgen and configtxlator, which is a block encoder. And for @SunilHirole , welcome to keep track this issue https://jira.hyperledger.org/browse/FABN-14

davidkhala (Wed, 08 Aug 2018 09:11:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=b7BPomEPZsxkGeye5) @clydedacruz replied, welcome discussion.

davidkhala (Wed, 08 Aug 2018 09:15:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EppsCS9gQJuMvBpT4) @as7 yes, check this, https://github.com/hyperledger/fabric-sdk-node/blob/8e9c3d816452c362064240fcb0144245008935e0/fabric-client/lib/packager/Golang.js#L34

davidkhala (Wed, 08 Aug 2018 09:20:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2tisgfEtsHX6wrNjR) @migrenaa So far there are only two implements for keyValueStore API, one is file based, another is couchdb based. If you want to use mysql as storage, I guess you should implement KeyValueStore class by yourself as an alternative plugin.

davidkhala (Wed, 08 Aug 2018 09:32:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=njiDDzGnSdFHj8Z8r) @lovelyidiot I see chaoyi is working on that in https://gerrit.hyperledger.org/r/#/c/25255/ @zhaochy

shken (Thu, 09 Aug 2018 02:15:38 GMT):
@Tony What is the chain code language?

xxz 2 (Thu, 09 Aug 2018 02:42:19 GMT):
Has joined the channel.

xxz 2 (Thu, 09 Aug 2018 02:43:34 GMT):
Is

Tony (Thu, 09 Aug 2018 05:58:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6LWpDm7PCt2qh6YX9) @shken go

HellBoy_23 (Thu, 09 Aug 2018 12:34:17 GMT):
Has joined the channel.

Luke_Chen (Thu, 09 Aug 2018 14:10:08 GMT):
Hey guys, If I use SDK to send an invoke transaction to specified peer, the SDK will gather proposal from Endorser and send them to Orderer, and then Orderer will return a ticket immediately, but how could I know whether the invoke transaction is executed correctly?

Luke_Chen (Thu, 09 Aug 2018 14:12:39 GMT):
Meanwhile I notice some testcase use `eventhub`, what is this `eventhub` used for? Is this used to listen process happen in peer?

Luke_Chen (Thu, 09 Aug 2018 14:12:41 GMT):
please help

akshay.lawange (Thu, 09 Aug 2018 15:38:19 GMT):
Hi, what can be the reason for getting below error while invoking chaincode - ``` MVCC Read conflict ```

jrosmith (Thu, 09 Aug 2018 17:02:23 GMT):
@Luke_Chen you can use the event hub to subscribe to different types of events in the ledger. event hubs will be deprecated in favor of channel event hubs in the future. the [blurb](https://fabric-sdk-node.github.io/ChannelEventHub.html) in the docs has a good overview of purpose and usage

jrosmith (Thu, 09 Aug 2018 17:06:07 GMT):
@akshay.lawange MVCC stands for multi-version concurrency control and ensures that two separate transactions are not attempting to update the same record in the ledger at the same time. If concurrent updates to the same record are detected, only the first transaction will be accepted and subsequent transactions within that block will be rejected. reading up on [read/write set semantics](https://hyperledger-fabric.readthedocs.io/en/release-1.2/readwrite.html) will help you understand

RezwanKabir (Thu, 09 Aug 2018 17:48:32 GMT):
I am executing `var user = await client.getUserContext(username, true);` But I need to verify usersecret for this user that has been generated during register. Is it possible ? Otherwise anyone who knows the username can enroll for that org.

javaprincess0211 (Fri, 10 Aug 2018 00:53:52 GMT):
Has joined the channel.

davidkhala (Fri, 10 Aug 2018 03:51:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dL3jPSLncWqakzuib) @akshay.lawange It appears in proposalReponse, revealing an action with double-spent pattern is found. If you invoke modify same key-value more than once before new block come, you can see that

bretharrison (Fri, 10 Aug 2018 12:28:06 GMT):
@Luke_Chen https://hyperledger-fabric.readthedocs.io/en/release-1.2/peer_event_services.html?highlight=event https://fabric-sdk-node.github.io/tutorial-channel-events.html

bretharrison (Fri, 10 Aug 2018 12:29:54 GMT):
In `v1.3` only `ChannelEventHub` will be available

bretharrison (Fri, 10 Aug 2018 12:29:54 GMT):
In `v1.3` the `EventHub` will be removed and only `ChannelEventHub` will be available, ChannelEventHub has been available since 1.1

akshay.lawange (Fri, 10 Aug 2018 15:38:50 GMT):
HI, Getting an Channel Shut Down error while invoking chaincode,

akshay.lawange (Fri, 10 Aug 2018 15:38:55 GMT):
``` peer0.natixisbank.example.com ```

akshay.lawange (Fri, 10 Aug 2018 15:39:09 GMT):
``` [2018-08-10T21:03:42.329] [ERROR] invoke-chaincode - REQUEST_TIMEOUT:10.23.6.168:7051 [2018-08-10T21:03:42.330] [ERROR] invoke-chaincode - Error: ChannelEventHub has been shutdown at ChannelEventHub.disconnect (C:\Users\user1\Desktop\1.2_UI\UI\node_modules\fabric-client\lib\ChannelEventHub.js:444:21) at Timeout.setTimeout (C:\Users\user1\Desktop\1.2_UI\UI\app\invoke-transaction.js:92:10) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5) at Timer.listOnTimeout (timers.js:277:5) [2018-08-10T21:03:42.331] [ERROR] invoke-chaincode - Error: ChannelEventHub has been shutdown at ChannelEventHub.disconnect (C:\Users\user1\Desktop\1.2_UI\UI\node_modules\fabric-client\lib\ChannelEventHub.js:444:21) at Timeout.setTimeout (C:\Users\user1\Desktop\1.2_UI\UI\app\invoke-transaction.js:92:10) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5) at Timer.listOnTimeout (timers.js:277:5) [2018-08-10T21:03:42.331] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: ChannelEventHub has been shutdown Error: Failed to invoke chaincode. cause:Error: ChannelEventHub has been shutdown at Object.invokeChaincode (C:\Users\user1\Desktop\1.2_UI\UI\app\invoke-transaction.js:175:9) at at process._tickCallback (internal/process/next_tick.js:188:7) error: [ChannelEventHub.js]: _connect - timed out after:45000 error: [Remote.js]: Error: Failed to connect before the deadline error: [Orderer.js]: Orderer grpcs://10.23.6.168:8050 has an error Error: Failed to connect before the deadline [2018-08-10T21:03:42.341] [DEBUG] Helper - [BasicCommitHandler]: _commit - Caught: Error: Failed to connect before the deadline [2018-08-10T21:03:42.341] [DEBUG] Helper - [BasicCommitHandler]: _commit - finished orderer orderer0.example.com [2018-08-10T21:03:42.342] [DEBUG] Helper - [BasicCommitHandler]: _commit - return error Error: Failed to connect before the deadline ```

akshay.lawange (Fri, 10 Aug 2018 15:40:01 GMT):
``` [2018-08-10T21:03:42.329] [ERROR] invoke-chaincode - REQUEST_TIMEOUT:localhost:7051 [2018-08-10T21:03:42.330] [ERROR] invoke-chaincode - Error: ChannelEventHub has been shutdown at ChannelEventHub.disconnect (C:\Users\user1\Desktop\1.2_UI\UI\node_modules\fabric-client\lib\ChannelEventHub.js:444:21) at Timeout.setTimeout (C:\Users\user1\Desktop\1.2_UI\UI\app\invoke-transaction.js:92:10) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5) at Timer.listOnTimeout (timers.js:277:5) [2018-08-10T21:03:42.331] [ERROR] invoke-chaincode - Error: ChannelEventHub has been shutdown at ChannelEventHub.disconnect (C:\Users\user1\Desktop\1.2_UI\UI\node_modules\fabric-client\lib\ChannelEventHub.js:444:21) at Timeout.setTimeout (C:\Users\user1\Desktop\1.2_UI\UI\app\invoke-transaction.js:92:10) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5) at Timer.listOnTimeout (timers.js:277:5) [2018-08-10T21:03:42.331] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: ChannelEventHub has been shutdown Error: Failed to invoke chaincode. cause:Error: ChannelEventHub has been shutdown at Object.invokeChaincode (C:\Users\user1\Desktop\1.2_UI\UI\app\invoke-transaction.js:175:9) at at process._tickCallback (internal/process/next_tick.js:188:7) error: [ChannelEventHub.js]: _connect - timed out after:45000 error: [Remote.js]: Error: Failed to connect before the deadline error: [Orderer.js]: Orderer grpcs://localhost:8050 has an error Error: Failed to connect before the deadline [2018-08-10T21:03:42.341] [DEBUG] Helper - [BasicCommitHandler]: _commit - Caught: Error: Failed to connect before the deadline [2018-08-10T21:03:42.341] [DEBUG] Helper - [BasicCommitHandler]: _commit - finished orderer orderer0.example.com [2018-08-10T21:03:42.342] [DEBUG] Helper - [BasicCommitHandler]: _commit - return error Error: Failed to connect before the deadline ```

nhrishi (Fri, 10 Aug 2018 16:35:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yBCPPscYmvh2Hm6z2) @akshay.lawange Hi Can someone please help us on this. We're getting Eventhub shutdown error. We're running app server and fabric 1.2 network on 2 different RHEL servers.

plato (Fri, 10 Aug 2018 18:11:45 GMT):
Has joined the channel.

davidkhala (Sat, 11 Aug 2018 13:54:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ArrE8Qq3kPkjC8uDx) @nhrishi breaking change happened in 1.2, old event hub is totally removed and replaced by channel event hub

davidkhala (Sat, 11 Aug 2018 13:55:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yBCPPscYmvh2Hm6z2) @akshay.lawange It looks like timeout error

akshay.lawange (Sat, 11 Aug 2018 14:09:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=36be7ea2-77d2-497f-9992-340ce0f317c8) @davidkhala ohh..thanks for the update. so is it stable? do we have to do any changes according to that?

vagnerasilva (Sat, 11 Aug 2018 15:16:28 GMT):
Hey guys, I know how to get block info using cli example: peer channel fetch newest mychannel.block -c mychannel --orderer orderer.example.com:7050 How do I do this using node-sdk? Any suggestions?

nhrishi (Sat, 11 Aug 2018 17:29:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=36be7ea2-77d2-497f-9992-340ce0f317c8) @davidkhala Hi @davidkhala - I also saw @bretharrison mentioning - ChannelEventHub would be available only in fabric v1.3? Does this mean we can use chaincode event functionality.

nhrishi (Sat, 11 Aug 2018 17:29:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=36be7ea2-77d2-497f-9992-340ce0f317c8) @davidkhala Hi @davidkhala - I also saw @bretharrison mentioning - ChannelEventHub would be available only in fabric v1.3? Does this mean we can not use chaincode event functionality.

nhrishi (Sat, 11 Aug 2018 17:29:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=36be7ea2-77d2-497f-9992-340ce0f317c8) @davidkhala Hi @davidkhala - I also saw @bretharrison mentioning - ChannelEventHub would be available only in fabric v1.3? Does this mean we can not use chaincode event functionality at the moment.

nhrishi (Sat, 11 Aug 2018 17:29:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=36be7ea2-77d2-497f-9992-340ce0f317c8) @davidkhala Hi @davidkhala - I also saw @bretharrison mentioned on the earlier post - ChannelEventHub would be available only in fabric v1.3? Does this mean we can not use chaincode event functionality at the moment

bretharrison (Sat, 11 Aug 2018 23:03:46 GMT):
The ChannelEventHub (which uses the same port as the other peer services) is available in 1.2 and 1.1, the old EventHub (which used a different port) will not be available when 1.3 comes out. Both classes are available in 1.2 and 1.1. I would recommend not using the EventHub, and convert to the ChannelEventHub. The API's are the same between the two classes so the conversion is simple, the only change is how the instance is created. The best way to create a ChannelEventHub is to ask the channel to create one for you, use the `channel.newChannelEventHub()` passing in a object of where the peer event service is running. The ChannelEventHub will use all the connection information from the peer, address and TLS included.

nhrishi (Sun, 12 Aug 2018 04:34:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SQxXAHHP9gqp6gAb2) @bretharrison Thanks @bretharrison @davidkhala . Sorry for typo i mixed up EventHub and ChannelEventHub. We're infact using the latest ChannelEventHub and still getting this Shutdown error. We're using balance-transfer/app/invoke_transaction.js (from fabric-samples) to invoking the transaction with fabric-client 1.2 module. Any idea what could be the issue.

davidkhala (Sun, 12 Aug 2018 14:17:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=j42RFJEYu6Nof4CXb) @akshay.lawange Not too much, channelEventHub reuse peer port 7051, instead of 7053, so in sdk level only channel and peer object is required to get channelEventHub

davidkhala (Sun, 12 Aug 2018 14:17:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=j42RFJEYu6Nof4CXb) @akshay.lawange Not too much, channelEventHub reuse peer port 7051, instead of 7053, so in sdk level only channel and peer object is required to get channelEventHub. And all event register/ un-register functions in old eventHub are migrated to channelEventHub

davidkhala (Sun, 12 Aug 2018 14:28:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rLokGHszJjvjwh8ue) @nhrishi quite sorry for my mislead, as clarified by bret, the class of old eventHub stay still in 1.2 node-sdk. But for my personal experience, some modification is required to reuse 1.1 node-sdk codes to connect to 1.2 fabric-peer

davidkhala (Sun, 12 Aug 2018 14:28:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rLokGHszJjvjwh8ue) @nhrishi quite sorry for my mislead, as clarified by bret, the class of old eventHub stay still in 1.2 node-sdk. But for my personal experience, some modification is required to reuse 1.1 nodejs code(more than just update fabric-client npm module) to connect to 1.2 fabric-peer

nhrishi (Mon, 13 Aug 2018 02:53:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=33jMydTz697KF7RPq) @davidkhala Thanks David, we used the latest ChannelEventHub APIs and fabric-client v1.2 , I tried both newChannelEventHub and getChannelEventHubsForOrg APIs to connect and registerChaincodeEvent. one issue is - we're getting "ChannelEventHub has been shutdown" Error and second is- for registerChaincodeEvent, we only received chaincode_id, tx_id and event_name as part of ChaincodeEvent object and didnt receive actual payload from chaincode. ```helper.getRegisteredUser(username, org, true).then((results) => { console.log("peersUrls::"+peersUrls, org, username); helper.getClientForOrg(org, username).then((client)=> { var channel = client.getChannel(channelName); let event_hubs = channel.getChannelEventHubsForOrg(); let chaincodeEventPromise = new Promise((resolve, reject) => { console.log('chaincodeEventPromise - setting up event'); event_hubs.forEach((eh) => { eh.registerChaincodeEvent(multiChaincodeID, "InitiateOpenDealSettlement", (payload) => { console.log("OpenDealSettlement: " + payload.payload); resolve(payload); }, (err) => { console.log("InitiateOpenDealSettlement ERROR : " + err); }); eh.connect(Boolean(false)); }); }); ```

chapagain (Mon, 13 Aug 2018 04:31:17 GMT):
- I tried to copy the `fabcar` fabric-sample code and rename it to my app name, let's say "`myapp`". (path of myapp is `fabric-samples/myapp`) - Then, I renamed the nodejs chaincode of myapp from `fabcar.js` to `myapp.js`. (path of the chaincode file is `fabric-samples/chaincode/myapp/node/myapp.js`) - I have also updated `package.json` file (changing fabcar text to myapp) inside the chaincode folder. (path of the file is `fabric-samples/chaincode/node/package.json`) - Now, when I go to myapp folder and run the command `./startFabric.sh node`, I get the following error: ``` Error: error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode myapp:1.0(networkid:dev,peerid:peer0.org1.example.com,tx:eb1ef3ab2c0e88f9ecf9eed4b437cb27551df203289d644faf7328c484cf855b) ``` Here's my `startFabric.sh` code: ``` #!/bin/bash # # Copyright IBM Corp All Rights Reserved # # SPDX-License-Identifier: Apache-2.0 # # Exit on first error set -e # don't rewrite paths for Windows Git Bash users export MSYS_NO_PATHCONV=1 starttime=$(date +%s) LANGUAGE=${1:-"golang"} CC_SRC_PATH=github.com/myapp/go if [ "$LANGUAGE" = "node" -o "$LANGUAGE" = "NODE" ]; then CC_SRC_PATH=/opt/gopath/src/github.com/myapp/node fi # clean the keystore rm -rf ./hfc-key-store # launch network; create channel and join peer to channel cd ../basic-network ./start.sh # Now launch the CLI container in order to install, instantiate chaincode # and prime the ledger with our 10 cars docker-compose -f ./docker-compose.yml up -d cli docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode install -n myapp -v 1.0 -p "$CC_SRC_PATH" -l "$LANGUAGE" docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n myapp -l "$LANGUAGE" -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')" sleep 10 docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n myapp -c '{"function":"initLedger","Args":[""]}' printf "\nTotal setup execution time : $(($(date +%s) - starttime)) secs ...\n\n\n" printf "Start by installing required packages run 'npm install'\n" printf "Then run 'node enrollAdmin.js', then 'node registerUser'\n\n" printf "The 'node invoke.js' will fail until it has been updated with valid arguments\n" printf "The 'node query.js' may be run at anytime once the user has been registered\n\n" ```

chapagain (Mon, 13 Aug 2018 04:31:17 GMT):
- I tried to copy the `fabcar` fabric-sample code and rename it to my app name, let's say `myapp`. (path of myapp is `fabric-samples/myapp`) - Then, I renamed the nodejs chaincode of myapp from `fabcar.js` to `myapp.js`. (path of the chaincode file is `fabric-samples/chaincode/myapp/node/myapp.js`) - I have also updated `package.json` file (changing fabcar text to myapp) inside the chaincode folder. (path of the file is `fabric-samples/chaincode/node/package.json`) - Now, when I go to myapp folder and run the command `./startFabric.sh node`, I get the following error: ``` Error: error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode myapp:1.0(networkid:dev,peerid:peer0.org1.example.com,tx:eb1ef3ab2c0e88f9ecf9eed4b437cb27551df203289d644faf7328c484cf855b) ``` Here's my `startFabric.sh` code: ``` #!/bin/bash # # Copyright IBM Corp All Rights Reserved # # SPDX-License-Identifier: Apache-2.0 # # Exit on first error set -e # don't rewrite paths for Windows Git Bash users export MSYS_NO_PATHCONV=1 starttime=$(date +%s) LANGUAGE=${1:-"golang"} CC_SRC_PATH=github.com/myapp/go if [ "$LANGUAGE" = "node" -o "$LANGUAGE" = "NODE" ]; then CC_SRC_PATH=/opt/gopath/src/github.com/myapp/node fi # clean the keystore rm -rf ./hfc-key-store # launch network; create channel and join peer to channel cd ../basic-network ./start.sh # Now launch the CLI container in order to install, instantiate chaincode # and prime the ledger with our 10 cars docker-compose -f ./docker-compose.yml up -d cli docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode install -n myapp -v 1.0 -p "$CC_SRC_PATH" -l "$LANGUAGE" docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n myapp -l "$LANGUAGE" -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')" sleep 10 docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n myapp -c '{"function":"initLedger","Args":[""]}' printf "\nTotal setup execution time : $(($(date +%s) - starttime)) secs ...\n\n\n" printf "Start by installing required packages run 'npm install'\n" printf "Then run 'node enrollAdmin.js', then 'node registerUser'\n\n" printf "The 'node invoke.js' will fail until it has been updated with valid arguments\n" printf "The 'node query.js' may be run at anytime once the user has been registered\n\n" ```

chapagain (Mon, 13 Aug 2018 04:31:17 GMT):
- I tried to copy the `fabcar` fabric-sample code and rename it to my app name, let's say `myapp`. (path of myapp is `fabric-samples/myapp`) - Then, I renamed the nodejs chaincode of myapp from `fabcar.js` to `myapp.js`. (path of the chaincode file is `fabric-samples/chaincode/myapp/node/myapp.js`) - I have also updated `package.json` file (changing fabcar text to myapp) inside the chaincode folder. (path of the file is `fabric-samples/chaincode/node/package.json`) - Now, when I go to myapp folder and run the command `./startFabric.sh node`, I get the following error: ``` Error: error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode myapp:1.0(networkid:dev,peerid:peer0.org1.example.com,tx:eb1ef3ab2c0e88f9ecf9eed4b437cb27551df203289d644faf7328c484cf855b) ``` Here's my `startFabric.sh` code: ``` #!/bin/bash # # Copyright IBM Corp All Rights Reserved # # SPDX-License-Identifier: Apache-2.0 # # Exit on first error set -e # don't rewrite paths for Windows Git Bash users export MSYS_NO_PATHCONV=1 starttime=$(date +%s) LANGUAGE=${1:-"golang"} CC_SRC_PATH=github.com/myapp/go if [ "$LANGUAGE" = "node" -o "$LANGUAGE" = "NODE" ]; then CC_SRC_PATH=/opt/gopath/src/github.com/myapp/node fi # clean the keystore rm -rf ./hfc-key-store # launch network; create channel and join peer to channel cd ../basic-network ./start.sh # Now launch the CLI container in order to install, instantiate chaincode # and prime the ledger with our 10 cars docker-compose -f ./docker-compose.yml up -d cli docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode install -n myapp -v 1.0 -p "$CC_SRC_PATH" -l "$LANGUAGE" docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n myapp -l "$LANGUAGE" -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')" sleep 10 docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n myapp -c '{"function":"initLedger","Args":[""]}' printf "\nTotal setup execution time : $(($(date +%s) - starttime)) secs ...\n\n\n" printf "Start by installing required packages run 'npm install'\n" printf "Then run 'node enrollAdmin.js', then 'node registerUser'\n\n" printf "The 'node invoke.js' will fail until it has been updated with valid arguments\n" printf "The 'node query.js' may be run at anytime once the user has been registered\n\n" ```

chapagain (Mon, 13 Aug 2018 04:31:17 GMT):
- I tried to copy the `fabcar` fabric-sample code and rename it to my app name, let's say `myapp`. (path of myapp is `fabric-samples/myapp`) - Then, I renamed the nodejs chaincode of myapp from `fabcar.js` to `myapp.js`. (path of the chaincode file is `fabric-samples/chaincode/myapp/node/myapp.js`) - I have also updated `package.json` file (changing fabcar text to myapp) inside the chaincode folder. (path of the file is `fabric-samples/chaincode/node/package.json`) - Now, when I go to myapp folder and run the command `./startFabric.sh node`, I get the following error: ``` Error: error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode myapp:1.0(networkid:dev,peerid:peer0.org1.example.com,tx:eb1ef3ab2c0e88f9ecf9eed4b437cb27551df203289d644faf7328c484cf855b) ``` Here's my `startFabric.sh` code: ``` #!/bin/bash # # Copyright IBM Corp All Rights Reserved # # SPDX-License-Identifier: Apache-2.0 # # Exit on first error set -e # don't rewrite paths for Windows Git Bash users export MSYS_NO_PATHCONV=1 starttime=$(date +%s) LANGUAGE=${1:-"golang"} CC_SRC_PATH=github.com/myapp/go if [ "$LANGUAGE" = "node" -o "$LANGUAGE" = "NODE" ]; then CC_SRC_PATH=/opt/gopath/src/github.com/myapp/node fi # clean the keystore rm -rf ./hfc-key-store # launch network; create channel and join peer to channel cd ../basic-network ./start.sh # Now launch the CLI container in order to install, instantiate chaincode # and prime the ledger with our 10 cars docker-compose -f ./docker-compose.yml up -d cli docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode install -n myapp -v 1.0 -p "$CC_SRC_PATH" -l "$LANGUAGE" docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n myapp -l "$LANGUAGE" -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')" sleep 10 docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n myapp -c '{"function":"initLedger","Args":[""]}' printf "\nTotal setup execution time : $(($(date +%s) - starttime)) secs ...\n\n\n" printf "Start by installing required packages run 'npm install'\n" printf "Then run 'node enrollAdmin.js', then 'node registerUser'\n\n" printf "The 'node invoke.js' will fail until it has been updated with valid arguments\n" printf "The 'node query.js' may be run at anytime once the user has been registered\n\n" ```

davidkhala (Mon, 13 Aug 2018 05:04:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3Q5rnXcGiLM3TEthG) @nhrishi Have you call `connect` method of channelEventHub before registration? for the second problem, set `full_block` to be true as `connect` param

NiketYende (Mon, 13 Aug 2018 05:28:51 GMT):
Hi, I wish to setup marbles private data example using fabric-sdk-node for v1.2. What are the changes required in the existing node client code? I am using the below link as a reference, but it does not talk about the exact changes that should be incorporated into the existing node code. `https://fabric-sdk-node.github.io/tutorial-private-data.html` Any references would be appreciated. @bretharrison

NiketYende (Mon, 13 Aug 2018 05:28:51 GMT):
Hi, I wish to setup marbles private data example using fabric-sdk-node for v1.2. What are the changes required in the existing node client code? I am using the below link as a reference, but it does not talk about the exact changes that should be incorporated into the existing node code. `https://fabric-sdk-node.github.io/tutorial-private-data.html` Any references would be appreciated. @bretharrison @zhaochy

NiketYende (Mon, 13 Aug 2018 05:28:51 GMT):
Hi, I wish to setup marbles private data example using fabric-sdk-node for v1.2. What are the changes required in the existing node client code? I am using the below link as a reference, but it does not talk about the exact changes that should be incorporated into the existing node code. `https://fabric-sdk-node.github.io/tutorial-private-data.html` Any references would be appreciated. @bretharrison @zhaochy

chapagain (Mon, 13 Aug 2018 06:39:22 GMT):
- I tried to copy the `fabcar` fabric-sample code and rename it to my app name, let's say `myapp`. (path of myapp is `fabric-samples/myapp`) - Then, I renamed the nodejs chaincode of myapp from `fabcar.js` to `myapp.js`. (path of the chaincode file is `fabric-samples/chaincode/myapp/node/myapp.js`) - I have also updated `package.json` file (changing fabcar text to myapp) inside the chaincode folder. (path of the file is `fabric-samples/chaincode/node/package.json`) - Now, when I go to myapp folder and run the command `./startFabric.sh node`, I get the following error: ``` Error: error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode myapp:1.0(networkid:dev,peerid:peer0.org1.example.com,tx:eb1ef3ab2c0e88f9ecf9eed4b437cb27551df203289d644faf7328c484cf855b) ``` Here's my `startFabric.sh` code: ``` #!/bin/bash # # Copyright IBM Corp All Rights Reserved # # SPDX-License-Identifier: Apache-2.0 # # Exit on first error set -e # don't rewrite paths for Windows Git Bash users export MSYS_NO_PATHCONV=1 starttime=$(date +%s) LANGUAGE=${1:-"golang"} CC_SRC_PATH=github.com/myapp/go if [ "$LANGUAGE" = "node" -o "$LANGUAGE" = "NODE" ]; then CC_SRC_PATH=/opt/gopath/src/github.com/myapp/node fi # clean the keystore rm -rf ./hfc-key-store # launch network; create channel and join peer to channel cd ../basic-network ./start.sh # Now launch the CLI container in order to install, instantiate chaincode # and prime the ledger with our 10 cars docker-compose -f ./docker-compose.yml up -d cli docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode install -n myapp -v 1.0 -p "$CC_SRC_PATH" -l "$LANGUAGE" docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n myapp -l "$LANGUAGE" -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')" sleep 10 docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n myapp -c '{"function":"initLedger","Args":[""]}' printf "\nTotal setup execution time : $(($(date +%s) - starttime)) secs ...\n\n\n" printf "Start by installing required packages run 'npm install'\n" printf "Then run 'node enrollAdmin.js', then 'node registerUser'\n\n" printf "The 'node invoke.js' will fail until it has been updated with valid arguments\n" printf "The 'node query.js' may be run at anytime once the user has been registered\n\n" ```

nhrishi (Mon, 13 Aug 2018 09:58:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=i5QgcGeQdX3jpyFy7) @davidkhala Thanks, we'll try with full_block. No Will give it a shot with connect method before chaincode registration but i doubt it'll matter.

bretharrison (Mon, 13 Aug 2018 12:44:09 GMT):
@nhrishi Would you be able to turn on debug logging , this may help to see what is going on. Do a `export HFC_LOGGING='{"debug":"console"}'` before starting your application.

htyagi90 (Mon, 13 Aug 2018 13:47:30 GMT):
Me and my team are facing an issue, where if we simultaneously query on the ledger, we get a timeout error with following message ``` "Error: 2 UNKNOWN: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction)" ``` Is there a bottleneck on parallel query on the ledger.

pankaj9310 (Mon, 13 Aug 2018 14:48:29 GMT):
Has joined the channel.

coderintherye (Mon, 13 Aug 2018 18:46:16 GMT):
Has joined the channel.

VipinB (Mon, 13 Aug 2018 21:19:54 GMT):
Has joined the channel.

Sreesha (Tue, 14 Aug 2018 04:41:50 GMT):
Iam trying to invoke chaincode through two different peers simultaneously

Sreesha (Tue, 14 Aug 2018 04:42:14 GMT):
And only one peer is able to output the result

Sreesha (Tue, 14 Aug 2018 04:42:33 GMT):
for the other one iam getting MVCC read conflict

Sreesha (Tue, 14 Aug 2018 04:42:54 GMT):
So does that mean simultaneous attempts are prohibited ?

mavericklam (Tue, 14 Aug 2018 04:45:04 GMT):
hi all, I have encountered problem when I try to upgrade my chaincode via node sdk, the upgrade proposal is failed and when I check the log of the peer found an error with "timeout expired while starting chaincode "abcv:9" for transaction ed41526cc3ce3210a625f1273e6095f7c85d64a6abbac454b1a2723935ad11c7". The chaincode is in NodeJS, and I just add one more line of console.log("abc") comparing with the old version. Everything keeps same. Is there anyone can help me on this? Many thanks!

parsiya (Tue, 14 Aug 2018 05:25:56 GMT):
Has joined the channel.

parsiya (Tue, 14 Aug 2018 05:31:30 GMT):
Wanted to share the offensive security tool we open sourced a few days ago as part of our DEFCON 26 talk. It's based on the Node SDK and can interface with Fabric deployments. https://github.com/tineola/tineola

parsiya (Tue, 14 Aug 2018 05:34:56 GMT):
Happy to answer questions here or on Github. Please let us know if you have any feedback/suggestions/bug reports.

FabricLearner (Tue, 14 Aug 2018 06:20:59 GMT):
Has joined the channel.

FabricLearner (Tue, 14 Aug 2018 06:27:36 GMT):
Hi All, i am trying to invoke chaincode to add private data using nodesdk. but i got to below error, does any body has the same issue ? Failed to get marble: GET_STATE failed: transaction ID: 68191c406ca2c500f040d70c7821e4b6e0c6b0240b5cba0f5bc45751480cfe27: collection config not define for namespace [marble1]

davidkhala (Tue, 14 Aug 2018 07:55:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Xzhio5QwJmy56ZNEA) @mavericklam Can you print the docker logs of your chaincode container?

davidkhala (Tue, 14 Aug 2018 07:58:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8PBJhoAm73itrxHEm) @FabricLearner Have you set collection configs during instantiate chaincode?

pankajcheema (Tue, 14 Aug 2018 07:59:19 GMT):
Hi all

pankajcheema (Tue, 14 Aug 2018 07:59:29 GMT):
Why eventhub is removed from node sdk?

davidkhala (Tue, 14 Aug 2018 08:00:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6iMjjBGGj8pNmWGmW) @pankajcheema too much technical debt and problems could not be resolved.

pankajcheema (Tue, 14 Aug 2018 08:01:42 GMT):
@davidkhala ???

davidkhala (Tue, 14 Aug 2018 08:04:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QcQtYL287meQRPrA8) @pankajcheema Actually not only sdk, old eventHub is also removed from fabric-peer

davidkhala (Tue, 14 Aug 2018 08:04:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QcQtYL287meQRPrA8) @pankajcheema Actually not only sdk, old eventHub is also removed from fabric-peer. Please track https://jira.hyperledger.org/browse/FAB-11122

FabricLearner (Tue, 14 Aug 2018 08:15:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3ztq9u9LKHu7sY7QN) @davidkhala yes now i given the same path for install and instantiate the chaincode. but for installation no errors. for instantiation - it is giving error like can\'t load package: package ./github.com/marbles02_private/go: cannot find package "./github.com/marbles02_private/go" in:\n\t/github.com/marbles02_private/go\n"

davidkhala (Tue, 14 Aug 2018 08:21:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7xsyxhyXxnw9Zei5y) @FabricLearner It looks gopath and go package management problem

davidkhala (Tue, 14 Aug 2018 08:23:20 GMT):
relative path would not be suitable for chaincode since even it work well in your development environment, it can not be recognized inside chaincode container

FabricLearner (Tue, 14 Aug 2018 08:24:38 GMT):
thanks @davidkhala , i will try with absolute path.

FabricLearner (Tue, 14 Aug 2018 08:36:59 GMT):
@davidkhala - now i have tried with absolute path. i am able to install and instantiate correctly. but while trying to invoke , i am getting the below error Failed to handle GET_STATE. error: collection config not define for namespace [marble16] marble 16 - is my chaincode name

FabricLearner (Tue, 14 Aug 2018 08:37:34 GMT):
not sure , where i went wrong

kjroger94 (Tue, 14 Aug 2018 09:38:41 GMT):
i have already created all the crypto material etc

kjroger94 (Tue, 14 Aug 2018 09:39:04 GMT):
how do i load this to the client instance using nodesdk? which api to use

davidkhala (Tue, 14 Aug 2018 13:06:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jxb6okXAvcTZ8oT5H) @kjroger94 you can use `user.setEnrollment` to load the key-pair

davidkhala (Tue, 14 Aug 2018 13:08:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bgi76GtSsPXoqTHwx) my sample is ``` exports.build = async (username, {key, certificate}, MSPID, cryptoSuite = clientUtil.newCryptoSuite()) => { const user = new User(username); let privateKey; if (key instanceof ECDSA_KEY) { privateKey = key; } else { //FIXME: importKey.then is not function in some case; privateKey = await cryptoSuite.importKey(key, {ephemeral: true}); } user.setCryptoSuite(cryptoSuite); await user.setEnrollment(privateKey, certificate, MSPID); return user; }; ```

FabricLearner (Tue, 14 Aug 2018 13:16:16 GMT):
Hi All. i am using collections-config option while instantiating the chaincode. but i just came to know that , in the fabric-client nodemodules ChaincodeInstantiateUpgradeRequest function don't have collections-config option. can some one help how to update this fabric client

FabricLearner (Tue, 14 Aug 2018 13:16:21 GMT):
i am using node sdk

kjroger94 (Tue, 14 Aug 2018 13:48:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bgi76GtSsPXoqTHwx) @davidkhala thanks!

plato (Tue, 14 Aug 2018 23:43:41 GMT):
hi Guys, I have disable TLS from orderer and Peers but once I have ran the invoke from node js code I got this error in the peer0.org1 docker `2018-08-14 23:41:12.234 UTC [protoutils] ValidateProposalMessage -> WARN 043 channel [mychannel]: MSP error: the supplied identity is not valid: x509: certificate signed by unknown authority`

plato (Tue, 14 Aug 2018 23:43:41 GMT):
hi Guys, I have disable TLS from orderer and Peers but once I have ran the invoke from node js code I got this error in the peer0.org1 docker `2018-08-14 23:41:12.234 UTC [protoutils] ValidateProposalMessage -> WARN 043 channel [mychannel]: MSP error: the supplied identity is not valid: x509: certificate signed by unknown authority` ANY thought ?

plato (Tue, 14 Aug 2018 23:45:43 GMT):

Clipboard - August 14, 2018 4:45 PM

aguel (Wed, 15 Aug 2018 11:01:13 GMT):
Has joined the channel.

alainN (Wed, 15 Aug 2018 17:10:22 GMT):
Has joined the channel.

alainN (Wed, 15 Aug 2018 17:12:20 GMT):
Hi, I am experiencing an issue that have been reported in FAB-8875. However, looking @ FAB 8875, I cannot find out what is the core of the problem and how to resolve it. Like Xihua, I am trying to install some node chaincode on the sample network and I am getting the same issue e.g.: 2018-08-15 00:28:21.692 UTC [node-platform] GetDeploymentPayload -> ERRO 005 Error writing folder to tar package Error writing file to package: Error copy (path: /opt/gopath/src/github.com/src/chaincodes/kuma-token/common, oldname:common/,newname:src/common,sz:0) : read /opt/gopath/src/github.com/src/chaincodes/kuma-token/common: is a directory any idea as to what I might be doing wrong?

alainN (Wed, 15 Aug 2018 17:12:20 GMT):
Hi, I am experiencing an issue that have been reported in FAB-8875. However, looking @ FAB 8875, I cannot find out what is the core of the problem and how to resolve it. Like Xihua, I am trying to install some node chaincode on the sample network and I am getting the same issue e.g.: 2018-08-15 00:28:21.692 UTC [node-platform] GetDeploymentPayload -> ERRO 005 Error writing folder to tar package Error writing file to package: Error copy (path: /opt/gopath/src/github.com/src/chaincodes/kuma-token/common, oldname:common/,newname:src/common,sz:0) : read /opt/gopath/src/github.com/src/chaincodes/kuma-token/common: is a directory any idea as to what I might be doing wrong?

alainN (Wed, 15 Aug 2018 17:12:20 GMT):
Hi, I am experiencing an issue that have been reported in FAB-8875. However, looking @ FAB 8875, I cannot find out what is the core of the problem and how to resolve it. Like Xihua, I am trying to install some node chaincode on the sample network and I am getting the same issue e.g.: 2018-08-15 00:28:21.692 UTC [node-platform] GetDeploymentPayload -> ERRO 005 Error writing folder to tar package Error writing file to package: Error copy (path: /opt/gopath/src/github.com/src/chaincodes/kuma-token/common, oldname:common/,newname:src/common,sz:0) : read /opt/gopath/src/github.com/src/chaincodes/kuma-token/common: is a directory any idea as to what I might be doing wrong? I am using the Fabric 1.2 docker images

vishwak (Wed, 15 Aug 2018 17:53:16 GMT):
Has joined the channel.

wangdong (Thu, 16 Aug 2018 01:59:34 GMT):
@alainN Is your chaincode included into on dir?

kjroger94 (Thu, 16 Aug 2018 03:45:15 GMT):
which is the correct method and class to import/load a private key to be used?

FabricLearner (Thu, 16 Aug 2018 05:31:03 GMT):
Hi All, i am trying to create a channel with three organizations. but i got this error {"status":"FORBIDDEN","info":"Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied"

pankajcheema (Thu, 16 Aug 2018 05:51:32 GMT):
Hi Experts

pankajcheema (Thu, 16 Aug 2018 05:52:05 GMT):
Have anyone faced this error ```{ Error: ENAMETOOLONG: name too long, open '/Users/akshaysood/Blockchain/fabricSDK/name: "network"```

pankajcheema (Thu, 16 Aug 2018 05:52:24 GMT):
I am trying to use ```var client = new FBClient(); client.loadFromConfig(config);```

pankajcheema (Thu, 16 Aug 2018 05:52:55 GMT):
The `yaml` configuration is available at ```https://hastebin.com/umahinowuq.http```

pankajcheema (Thu, 16 Aug 2018 05:52:55 GMT):
The `yaml` configuration is available at https://hastebin.com/umahinowuq.http

pankajcheema (Thu, 16 Aug 2018 05:55:06 GMT):
I am getting this error ``` at Object.fs.openSync (fs.js:663:18) at Object.fs.readFileSync (fs.js:568:33) at _getNetworkConfig (/Users/akshaysood/Blockchain/fabricSDK/node_modules/fabric-client/lib/Client.js:1889:24) at FBClient.loadFromConfig (/Users/akshaysood/Blockchain/fabricSDK/node_modules/fabric-client/lib/Client.js:130:37) at file:///Users/akshaysood/Blockchain/fabricSDK/application/Transaction.mjs:158:8 at ModuleJob.run (internal/loader/ModuleJob.js:94:14) at errno: -63, code: 'ENAMETOOLONG', syscall: 'open',```

pankajcheema (Thu, 16 Aug 2018 05:55:57 GMT):
As shown in this error ```at file:///Users/akshaysood/Blockchain/fabricSDK/application/Transaction.mjs:158:8``` Line 158 of Transaction.mjs is ```client.loadFromConfig(config);```

pankajcheema (Thu, 16 Aug 2018 05:56:15 GMT):
@davidkhala

davidkhala (Thu, 16 Aug 2018 05:57:11 GMT):
if it is an name too long.. Are you using Windows?

pankajcheema (Thu, 16 Aug 2018 05:57:23 GMT):
I am using mac

pankajcheema (Thu, 16 Aug 2018 05:57:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TeZWkXhcrpzmwbtr9) which name?

pankajcheema (Thu, 16 Aug 2018 05:59:45 GMT):
@davidkhala there?

FabricLearner (Thu, 16 Aug 2018 06:47:52 GMT):
Hi Guys, i am trying read/write data to private collections. install and instantiate was fine. while invoking it is saying that proposal also good . but the payload receiving was so i am getting getting error like [2018-08-16 12:10:55.892] [ERROR] invoke-chaincode - SyntaxError: Unexpected end of JSON input

HellBoy_23 (Thu, 16 Aug 2018 07:49:51 GMT):
Hi all, I am getting this error : Promise is rejected: Error: GET_STATE_BY_RANGE failed: transaction ID: ee097a157bb5db4b8551aaa071477c11053c5eb7c1b8631a07358f4ccb0cc0d2: Tx [ee097a157bb5db4b8551aaa071477c11053c5eb7c1b8631a07358f4ccb0cc0d2]: Queries on pvt data is supported only in a read-only transaction

FabricLearner (Thu, 16 Aug 2018 08:35:59 GMT):
Hi Guys, while i am trying to invoke chaincode to add private data to collection i am getting below error. [2018-08-16 14:00:39.878] [ERROR] invoke-chaincode - REQUEST_TIMEOUT:localhost:7051 [2018-08-16 14:00:39.878] [ERROR] invoke-chaincode - Error: ChannelEventHub has been shutdown

kjroger94 (Thu, 16 Aug 2018 09:02:30 GMT):
`error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [org1MSP] ` why this error?

kjroger94 (Thu, 16 Aug 2018 09:02:52 GMT):
`error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [liqvisMSP]` why is this error coming?

FabricLearner (Thu, 16 Aug 2018 10:41:37 GMT):
Hi Guys, i am trying to read/write private data to collections. but that data is writing only to Org1 peers . even normal data also not displaying to Org2 peers.

FabricLearner (Thu, 16 Aug 2018 10:42:00 GMT):
i am checking the above by looking into couchdb. can some one guide me on that please

kelvinzhong (Thu, 16 Aug 2018 10:56:15 GMT):
@bretharrison hi, is there any example on update the anchor peer config through fabrc-sdk-node?

pankajcheema (Thu, 16 Aug 2018 11:03:50 GMT):
Hi Experts

pankajcheema (Thu, 16 Aug 2018 11:03:55 GMT):
I am getting this error

pankajcheema (Thu, 16 Aug 2018 11:03:56 GMT):
Error: cannot retrieve package for chaincode mycc/1.1, error open /var/hyperledger/production/chaincodes/mycc.1.1: no such file or directory ``` But `mycc.1.1` exist in peer 😕 ```

pankajcheema (Thu, 16 Aug 2018 11:03:56 GMT):
```Error: cannot retrieve package for chaincode mycc/1.1, error open /var/hyperledger/production/chaincodes/mycc.1.1: no such file or directory ``` But `mycc.1.1` exist in peer 😕

pankajcheema (Thu, 16 Aug 2018 11:04:20 GMT):
```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: cannot retrieve package for chaincode mycc/1.1, error open /var/hyperledger/production/chaincodes/mycc.1.1: no such file or directory at /Users/akshaysood/Blockchain/fabricSDK/node_modules/fabric-client/lib/Peer.js:114:16 at /Users/akshaysood/Blockchain/fabricSDK/node_modules/fabric-client/node_modules/grpc/src/client.js:586:7```

pankajcheema (Thu, 16 Aug 2018 11:04:26 GMT):
Anyone have any idea about this?

bretharrison (Thu, 16 Aug 2018 11:45:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=L4qDadHABDhpRZB2j) @HellBoy_23 You may wish to post to the #fabric-peer-endorser-committer

alainN (Thu, 16 Aug 2018 14:29:50 GMT):
@wangdong, yes, common contains code for a package which is used by chaincode up the dir tree.

pankajcheema (Thu, 16 Aug 2018 15:27:18 GMT):
Hi All

pankajcheema (Thu, 16 Aug 2018 15:27:27 GMT):
https://stackoverflow.com/questions/51880460/nodejs-ecmascript-module-debugger-not-working

pankajcheema (Thu, 16 Aug 2018 15:27:49 GMT):
Trying to debug sdk implemented with EcmaScript Module

pankajcheema (Thu, 16 Aug 2018 15:27:53 GMT):
but debugger not working

pankajcheema (Thu, 16 Aug 2018 15:27:58 GMT):
please check here https://stackoverflow.com/questions/51880460/nodejs-ecmascript-module-debugger-not-working

jrosmith (Thu, 16 Aug 2018 15:34:26 GMT):
@pankajcheema there is not enough information here or on stack overflow to help you. what version of the sdk are you using? on stack overflow you say that the application works fine without using the debugger...which makes it seems like a debugger issue and not an sdk issue.

pankajcheema (Thu, 16 Aug 2018 15:35:53 GMT):
1.2

jrosmith (Thu, 16 Aug 2018 15:35:55 GMT):
it also looks like youre using an experimental feature? and the error explicitly references the warning about experimental modules. maybe try not using that first. if thats an option you'll have to reach out to the node communtiy.

jrosmith (Thu, 16 Aug 2018 15:35:55 GMT):
it also looks like youre using an experimental feature? and the error explicitly references the warning about experimental modules. maybe try not using that first. if thats an option you'll have to reach out to the node community.

pankajcheema (Thu, 16 Aug 2018 15:36:17 GMT):
ok

pankajcheema (Thu, 16 Aug 2018 15:37:00 GMT):
@jrosmith do you know how to use ES6 without EcmaScript Modules

pankajcheema (Thu, 16 Aug 2018 15:37:01 GMT):
?

pankajcheema (Thu, 16 Aug 2018 15:37:06 GMT):
and without babel?

jrosmith (Thu, 16 Aug 2018 15:39:50 GMT):
i do not use babel for any of my work with the sdk and have not run into any issues. also, according to the [documentation](https://fabric-sdk-node.github.io/tutorial-app-dev-env-setup.html) Node v9.0+ is *not* supported.

FabricLearner (Thu, 16 Aug 2018 18:38:25 GMT):
Hi Guys, some times i am getting below error while invoking the chaincode [2018-08-17 00:01:33.858] [ERROR] invoke-chaincode - REQUEST_TIMEOUT:localhost:7051 [2018-08-17 00:01:33.859] [ERROR] invoke-chaincode - Error: ChannelEventHub has been shutdown i am using latest fabric and node sdk

FabricLearner (Thu, 16 Aug 2018 18:38:43 GMT):
does any body got into same

toddinpal (Thu, 16 Aug 2018 18:45:32 GMT):
Has joined the channel.

toddinpal (Thu, 16 Aug 2018 18:46:17 GMT):
Is there any reference documentation for connection profiles? All I can find are examples, but nothing that describes all that can be in a connection profile

GuillaumeTong (Fri, 17 Aug 2018 01:37:07 GMT):
Has joined the channel.

pankajcheema (Fri, 17 Aug 2018 04:35:07 GMT):
Hi All

pankajcheema (Fri, 17 Aug 2018 04:35:24 GMT):
I am trying to run discovery service in Nodejs SDK

pankajcheema (Fri, 17 Aug 2018 04:35:47 GMT):
does discovery identifies which peer should get query/invoke request?

pankajcheema (Fri, 17 Aug 2018 04:36:23 GMT):
Suppose there are 2 peers in`ORG1` i.e `peer0` and `peer1`

pankajcheema (Fri, 17 Aug 2018 04:36:23 GMT):
Suppose there are 2 peers in `ORG1` i.e `peer0` and `peer1`

pankajcheema (Fri, 17 Aug 2018 04:36:39 GMT):
now `peer0` is offline

pankajcheema (Fri, 17 Aug 2018 04:36:53 GMT):
the query request should go to `peer1` now

pankajcheema (Fri, 17 Aug 2018 04:37:04 GMT):
Is it possible with service discovery?

pankajcheema (Fri, 17 Aug 2018 04:38:00 GMT):
@jrosmith

pankajcheema (Fri, 17 Aug 2018 04:38:06 GMT):
@davidkhala

pankajcheema (Fri, 17 Aug 2018 05:30:57 GMT):
Anyone knows how to set peer `connection timeout` in `common connection profile`

FabricLearner (Fri, 17 Aug 2018 05:37:57 GMT):
Hi Guys, i am trying to add data to private collection . i am able to instantiate and invoke chaincode correctly but from the couch db i can see data displaying only on Org1 but not on Org2,Org3. i have used marbles pvt chaincode example.

kjroger94 (Fri, 17 Aug 2018 05:42:56 GMT):
any idea why i would get this error? `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]

kjroger94 (Fri, 17 Aug 2018 05:43:15 GMT):
any idea why i would get this error? `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]`

amolpednekar (Fri, 17 Aug 2018 06:58:17 GMT):
@kjroger94 The peers of Org1 have not joined mychannel/ mychannel doesnt exist

kjroger94 (Fri, 17 Aug 2018 07:13:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Hr2gqBA2667GYXr5v) @amolpednekar But i am able to do all operations through cli commands

kjroger94 (Fri, 17 Aug 2018 07:14:03 GMT):
what is the name to be given here? `ssl-target-name-override: 'common name used in pem certificate'` what does the common name used in the pem certificate mean?

amolpednekar (Fri, 17 Aug 2018 07:26:59 GMT):
That is a combination of hostname + domain name specified in crpyto-config.yaml file For peers in orgs, it is peer + 'n' + hostname + domainname (eg. peer0.org1.example1.com, peer1.org1.example1.com ) It is used for the tls handshake when the SAN/CN of the cert doesnt match the ip of the server where its running, so definitely set this according to your network defn

d8bhatta (Fri, 17 Aug 2018 07:49:11 GMT):
Hello, We are exploring nodejs sdk, its found that user1 is enrolled and all of the transactions are done on behalf of the user. I am slighlty confused about the user we use in blockchain. lets say an organiazation have following department: 1. Finance 1.1. Joe, John, Erik (users) 2. IT 2.1 Dave, Patrik 3. Sales 3.1 Michael, Brook so on Now i have following questions, 1. Can we create a node for each department like Finance, IT..? 2. How many peers can be created in each node and on what basis? 3. Can we create Dave,patrik, Michael...as a blockchain user who have to enroll and register like user1 in nodejs sdk?

kjroger94 (Fri, 17 Aug 2018 09:56:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=n5e6fAjtg4caF7xLF) @amolpednekar I have not used the cryptogen, using fabric-ca instead. But yes I get the idea

kjroger94 (Fri, 17 Aug 2018 10:08:13 GMT):
when it says "certificate" is it the signcerts or cacerts. keystore is straightforward- its the private key. cacert is the rootca cert and singing cert is like the public key but in API `setAdminSigningIdentity(private_key, certificate, mspid)` what is the "certificate" here?

rishabh1102 (Fri, 17 Aug 2018 10:32:48 GMT):
Hey all, once I have created a channel and I want to use the node sdk to install and instantiate the chaincode, will each admin peer have to call the install function separately or can this be accomplished from a single execution of a program?

NiketYende (Fri, 17 Aug 2018 10:43:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=n5e6fAjtg4caF7xLF) @amolpednekar Are you setting up a distributed peer setup? I am able to easily setup for cli & sdk using the standard examples provided with fabric v1.2.

NiketYende (Fri, 17 Aug 2018 10:43:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=n5e6fAjtg4caF7xLF) @amolpednekar Are you trying a distributed peer setup? I am able to easily setup for cli & sdk using the standard examples provided with fabric v1.2.

amolpednekar (Fri, 17 Aug 2018 10:49:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bDTeZxPwNjYiCsRKQ) @NiketYende Didnt get you. Are you asking if I have tried the Node SDK with peers on separate hosts?

amolpednekar (Fri, 17 Aug 2018 10:49:40 GMT):
@NiketYende Didnt get you. Are you asking if I have tried the Node SDK with peers on separate hosts?

amolpednekar (Fri, 17 Aug 2018 10:49:40 GMT):
@NiketYende Didnt get you. Are you asking if I have tried the Node SDK with peers on separate hosts?

amolpednekar (Fri, 17 Aug 2018 10:51:06 GMT):
@rishabh1102 Yes, each org's admin has to do install separately on his org's peer(s) Instantiate has to be done only once

pankajcheema (Fri, 17 Aug 2018 10:51:57 GMT):
anyone know about this ?

pankajcheema (Fri, 17 Aug 2018 10:51:59 GMT):
```8 RESOURCE_EXHAUSTED: Sent message larger than max (4210 vs. 15)```

NiketYende (Fri, 17 Aug 2018 10:53:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aW6qtNmXoka4vYWoQ) @amolpednekar How did you run up with the issue? Are you using the default crypto provided by fabric-sdk-node?

amolpednekar (Fri, 17 Aug 2018 10:54:19 GMT):
@NiketYende I didnt have any issues, I was answering kjroger94 :)

clydedacruz (Fri, 17 Aug 2018 10:54:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WQ94qdXDuQQY4wSap) @pankajcheema @pankajcheema This is probably the issue you are describing https://stackoverflow.com/questions/51672046/can-fabric-node-sdk-1-2-be-used-with-a-fabric-1-1-network

clydedacruz (Fri, 17 Aug 2018 10:54:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WQ94qdXDuQQY4wSap) @pankajcheema This is probably the issue you are describing https://stackoverflow.com/questions/51672046/can-fabric-node-sdk-1-2-be-used-with-a-fabric-1-1-network

kjroger94 (Fri, 17 Aug 2018 10:58:06 GMT):
`Event added to event processor queue` i invoked and got this as a final log on the peer side, what does this mean?

Ferrymania (Fri, 17 Aug 2018 12:51:47 GMT):
Hi,guys when use the method *setUserContext* to create a user ,It would create some file in local directory too.And what filed is for public key and private key ?and how could I get public key from the user using sdk

kjroger94 (Fri, 17 Aug 2018 13:26:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LHZhmK5mpXaTtaeSh) @Ferrymania setUserContext is to be called when you have the user already set up with it's crypto material and necessary config info, have you already done that?

prashantsingh (Fri, 17 Aug 2018 13:26:29 GMT):
Has joined the channel.

Ferrymania (Fri, 17 Aug 2018 13:38:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=izragNtDCDsbApthE) @kjroger94 like the balance-transefer example ,I put username and orgname in the request and the sdk would use network-config.yaml to register the user,But I have question that after the user is register and enroll ,which filedf is seem like the public key `{"name":"Jim","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"oHoqPkNwHAkJ","enrollment":{"signingIdentity":"77b1ec5ac23d40c2224f1d9577b632b3be4cb474e5d8dffb9374a24ef28d503e","identity":{"certificate":"-----BEGIN CERTIFICATE-----\nMIICijCCAjGgAwIBAgIUHY3SPfGeLvTmdj0v8nyG2sTOjDowCgYIKoZIzj0EAwIw\nczELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh\nbiBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMT\nE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODE2MTEwMjAwWhcNMTkwODE2MTEw\nNzAwWjBAMTAwDQYDVQQLEwZjbGllbnQwCwYDVQQLEwRvcmcxMBIGA1UECxMLZGVw\nYXJ0bWVudDExDDAKBgNVBAMTA0ppbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBFKL/rFPLrYeEhO5bCVKD3vfyY2Oeqf2o1KW9uM+OYH6xSedK+oLQt0R8uqZ9QZz\nbweaFvRplZJS839WS9iFZXKjgdUwgdIwDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB\n/wQCMAAwHQYDVR0OBBYEFLWIBiq+C8Lpt3RBJlooUmMMJtDHMCsGA1UdIwQkMCKA\nIA5ykiTos/MXhMipPFuO9vTByR2ebld8RcMxY2Cf5AARMGYGCCoDBAUGBwgBBFp7\nImF0dHJzIjp7ImhmLkFmZmlsaWF0aW9uIjoib3JnMS5kZXBhcnRtZW50MSIsImhm\nLkVucm9sbG1lbnRJRCI6IkppbSIsImhmLlR5cGUiOiJjbGllbnQifX0wCgYIKoZI\nzj0EAwIDRwAwRAIgXpN0j5Fyld9RB2bnrbvTXM7lPC9awrEFdepQSPwUDZMCIAm/\nPuJO64DnznKCVIQ+BWcBOotZfL42EH5K1fVVL+ZN\n-----END CERTIFICATE-----\n"}}}`

kjroger94 (Fri, 17 Aug 2018 14:00:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oJKdQ2NSduNpbuBbm) @Ferrymania the public key is the `certificate` you see. It will be loaded in the signing identity of the user. And the SDK uses the CA defined in network-config.

Ferrymania (Fri, 17 Aug 2018 14:12:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yjyL2ZQLcccirxPPf) @kjroger94 Thanks a :grimacing:lot

mariogemoll (Fri, 17 Aug 2018 14:34:19 GMT):
Hello, I know node 9.0+ is not supported. Just to double-check... also node 10 is still not supported?

kjroger94 (Fri, 17 Aug 2018 15:32:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eTtb4fw9ebeekcQx3) @mariogemoll anything above 8.9.0 should be fine

Ferrymania (Sat, 18 Aug 2018 12:32:35 GMT):
Hi,guys! When I use query method and the chaincode return a *json array* object like `*[{"Txid":"xxxx","value":{"":""}}]*`,How can I turn this object to an ture json object like {"payload":[{"Txid":"xxxx","value":{"":""}}]} by node.js ,thanks a lot for your help

mariogemoll (Sat, 18 Aug 2018 15:40:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gBaArviSXC5mhvzjE) @kjroger94 thanks! confusing documentation then... https://github.com/hyperledger/fabric-sdk-node

kjroger94 (Sun, 19 Aug 2018 06:38:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QbHMN9jDoga5KCyxS) @mariogemoll the documentation says so but i use it on 9.6 and it works fine. if you have problems you can always use nvm and use 8.9.0

toddinpal (Sun, 19 Aug 2018 14:11:00 GMT):
I'm guessing the answer to my question of "Is there any reference documentation for connection profiles? All I can find are examples, but nothing that describes all that can be in a connection profile" is no based upon the lack of responses.

rajanashutosh (Mon, 20 Aug 2018 05:10:07 GMT):
Has joined the channel.

amolpednekar (Mon, 20 Aug 2018 05:41:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xhWD4DmTmy7qKfhv7) @toddinpal https://jira.hyperledger.org/browse/FABN-808

dsanchezseco (Mon, 20 Aug 2018 12:54:16 GMT):
Hi! quick question, to install a chaincode from the SDK has the chaincode to be already stored on the peer? because rigth now i'm storing the chaincode temporaly on the sdk server and performing the tx, but when doing the instantiate i'm getting ``` failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "cp: cannot stat '/chaincode/input/src/.': No such file or directory ``` If i do the install step using the cli and then instantiate with the SDK everything is fine, so it must be a mistake on the install:thinking:

Ferrymania (Mon, 20 Aug 2018 13:45:51 GMT):
Hi,guys.Is there an getpublicKey method to get user's public key in node sdk?

bretharrison (Mon, 20 Aug 2018 15:49:58 GMT):
@dsanchezseco to install chaincode use the `client.installChaincode()` and to start the chaincode use the 'channel.sendInstantiateProposal()` and `channel.sendTransaction()`

kjroger94 (Mon, 20 Aug 2018 16:39:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Lfvxsh2dQ4cTZWFXW) @Ferrymania have you registered and enrolled the user?

bretharrison (Mon, 20 Aug 2018 17:15:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Lfvxsh2dQ4cTZWFXW) @Ferrymania No, you should open a JIRA to get one added, there is a workaround ``` const user = await client.getUserContext('admin', true); const identity = user.getIdentity(); const publicKey = identity._publicKey.toBytes(); ```

bretharrison (Mon, 20 Aug 2018 17:15:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Lfvxsh2dQ4cTZWFXW) @Ferrymania No, you should open a JIRA to get one added, there is a workaround ``` const user = await client.getUserContext('admin', true); const identity = user.getIdentity(); const publicKey = identity._publicKey.toBytes(); //get PEM formatted ```

bretharrison (Mon, 20 Aug 2018 17:35:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xhWD4DmTmy7qKfhv7) @toddinpal https://fabric-sdk-node.github.io/tutorial-network-config.html

bretharrison (Mon, 20 Aug 2018 18:04:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CbGhSRvffHhaGrScM) @rishabh1102 yes, a user that is an admin peer will have to install the chaincode to the each peer the chaincode will be invoked. The user may be an admin on multiple peers.

bretharrison (Mon, 20 Aug 2018 18:07:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xgNmCGxnwLFSjaFb5) @kjroger94 The certificate is the user's certificate one returned from the CA from an enrollment which was sent a CSR (certificate signing request), the public key is in both.

bretharrison (Mon, 20 Aug 2018 18:07:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xgNmCGxnwLFSjaFb5) @kjroger94 The certificate is the user's certificate, the one which may have been returned from the CA from an enrollment request, the CA was sent a CSR (certificate signing request), the public key is in both.

bretharrison (Mon, 20 Aug 2018 18:37:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=epg6AZsid832yKJic) @pankajcheema Yes Discovery Service will provide an endorsement plan that includes one or both peers that are online at the time of the discovery call. If both peers are on-line at the time of the discovery request, but one goes off-line just before the proposal of the query/invoke is sent, then the NodeSDK will send to the proposal to one, if it fails it will send to the other. If however the discovery service knew that the one of them was off-line then the NodeSDK would only have that one on the list and send the proposal only to that one.

bretharrison (Mon, 20 Aug 2018 18:57:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cDnx3gzazNjw9XXms) @pankajcheema In the client section there are timeouts that apply to all peers ``` ```

bretharrison (Mon, 20 Aug 2018 18:57:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cDnx3gzazNjw9XXms) @pankajcheema In the client section there are timeouts that apply to all peers, notice that the times are in seconds ``` # set connection timeouts for the peer and orderer for the client connection: timeout: peer: # the timeout in seconds to be used on requests to a peer, # for example 'sendTransactionProposal' endorser: 120 # the timeout in seconds to be used by applications when waiting for an # event to occur. This time should be used in a javascript timer object # that will cancel the event registration with the channel event hub instance. eventHub: 60 # the timeout in seconds to be used when setting up the connection # with the peer's event hub. If the peer does not acknowledge the # connection within the time, the application will be notified over the # error callback if provided. eventReg: 3 # the timeout in seconds to be used on request to the orderer, # for example orderer: 30 ``` Then on each peer the timeout may be set to override the more global setting, notice the following is for 3 seconds as the time value is in millis ``` grpcOptions: ssl-target-name-override: peer0.org1.example.com request-timeout: 3000 ```

bretharrison (Mon, 20 Aug 2018 18:57:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cDnx3gzazNjw9XXms) @pankajcheema In the client section there are timeouts that apply to all peers, notice that the times are in seconds ``` # set connection timeouts for the peer and orderer for the client client: connection: timeout: peer: # the timeout in seconds to be used on requests to a peer, # for example 'sendTransactionProposal' endorser: 120 # the timeout in seconds to be used by applications when waiting for an # event to occur. This time should be used in a javascript timer object # that will cancel the event registration with the channel event hub instance. eventHub: 60 # the timeout in seconds to be used when setting up the connection # with the peer's event hub. If the peer does not acknowledge the # connection within the time, the application will be notified over the # error callback if provided. eventReg: 3 # the timeout in seconds to be used on request to the orderer, # for example orderer: 30 ``` Then on each peer the timeout may be set to override the more global setting, notice the following is for 3 seconds as the time value is in millis ``` grpcOptions: ssl-target-name-override: peer0.org1.example.com request-timeout: 3000 ```

Ferrymania (Tue, 21 Aug 2018 01:19:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hMHEWWWb4fYikcjhC) @kjroger94 Yeah ,but I wonder If there is a method to get pubKey

Ferrymania (Tue, 21 Aug 2018 01:23:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7h7vNCfaiceunXQLr) @bretharrison Thanks a lot ,I just try `publickey = identity._public._publicKeyHex`,I will try your methods. When people interact whth others in the network, I think there should be something like pubKey or certficates to recognize each one.

kjroger94 (Tue, 21 Aug 2018 01:53:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DorsP6jzu3BdAFC42) @Ferrymania `var publicKey=Buffer.from(fs.readFileSync(path.join(__dirname,'data/OrgMSP/msp/user/msp/signcerts/cert.pem'))).toString();``` var tmpClient=require('fabric-client/lib/msp/identity.js');``` exports.loadUser= async function(client){ tmpClient=sign.SigningIdentity; var signer=tmp.Signer; cryptoSuite=client.getCryptoSuite(); privateKey = await cryptoSuite.importKey(key, {ephemeral: true}); const user= new User("org-admin"); signer=new signer(cryptoSuite,privateKey); tmpClient=new tmpClient(certificate, publicKey, mspId, cryptoSuite, signer); await user.setEnrollment(privateKey,certificate,mspId) return user;```` so you need to load your whole signing id, just load the privatekey and certificate the same way as I did the public key. ``` ``` ```

kjroger94 (Tue, 21 Aug 2018 01:53:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DorsP6jzu3BdAFC42) @Ferrymania `var `publicKey=Buffer.from(fs.readFileSync(path.join(__dirname,'data/OrgMSP/msp/user/msp/signcerts/cert.pem'))).toString();``` var tmpClient=require('fabric-client/lib/msp/identity.js');``` exports.loadUser= async function(client){ tmpClient=sign.SigningIdentity; var signer=tmp.Signer; cryptoSuite=client.getCryptoSuite(); privateKey = await cryptoSuite.importKey(key, {ephemeral: true}); const user= new User("org-admin"); signer=new signer(cryptoSuite,privateKey); tmpClient=new tmpClient(certificate, publicKey, mspId, cryptoSuite, signer); await user.setEnrollment(privateKey,certificate,mspId) return user;````` so you need to load your whole signing id, just load the privatekey and certificate the same way as I did the public key. ``` ``` ```

Ferrymania (Tue, 21 Aug 2018 02:24:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fiEa36aQZ8r5X8va9) @kjroger94 emem,It seems like the process of creating a user,:joy: when I register and enroll a user , I get user `{"name":"Jim","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"MsWpJJTcamkE","enrollment":{"signingIdentity":"82bc04264063ce383c8efb9094b4c88d87474c9c966a7168ae900548add18f36","identity":{"certificate":"-----BEGIN CERTIFICATE-----\nMIICijCCAjGgAwIBAgIUaTrO2+POdfZvpsjX70vZ9gqrOogwCgYIKoZIzj0EAwIw\nczELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh\nbiBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMT\nE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODIxMDA1NDAwWhcNMTkwODIxMDA1\nOTAwWjBAMTAwDQYDVQQLEwZjbGllbnQwCwYDVQQLEwRvcmcxMBIGA1UECxMLZGVw\nYXJ0bWVudDExDDAKBgNVBAMTA0ppbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBM8uh3CA3hJojoBAFOaZlpambotaQFDe5ItAxoWaKgU7/XIla7swvtsawj+FXtlg\n9HJcXXJMLTlKUCYszKE41iGjgdUwgdIwDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB\n/wQCMAAwHQYDVR0OBBYEFNqY4vE1Pu2fUFUb9S0Nh4q692wxMCsGA1UdIwQkMCKA\nIA5ykiTos/MXhMipPFuO9vTByR2ebld8RcMxY2Cf5AARMGYGCCoDBAUGBwgBBFp7\nImF0dHJzIjp7ImhmLkFmZmlsaWF0aW9uIjoib3JnMS5kZXBhcnRtZW50MSIsImhm\nLkVucm9sbG1lbnRJRCI6IkppbSIsImhmLlR5cGUiOiJjbGllbnQifX0wCgYIKoZI\nzj0EAwIDRwAwRAIgUB5U3GyuIP01WRMwpH1QdqK3EMCtXZm54+y11MMnS90CIGHx\nxD77KEZk7T8A9gkjWg2kjnqdnpLvmQNPzs6NoKgj\n-----END CERTIFICATE-----\n"}}}`

Ferrymania (Tue, 21 Aug 2018 02:24:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fiEa36aQZ8r5X8va9) @kjroger94 emem,It seems like the process of creating a user,:joy: when I register and enroll a user , I get user `{"name":"Jim","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"MsWpJJTcamkE","enrollment":{"signingIdentity":"82bc04264063ce383c8efb9094b4c88d87474c9c966a7168ae900548add18f36","identity":{"certificate":"-----BEGIN CERTIFICATE-----\nMIICijCCAjGgAwIBAgIUaTrO2+POdfZvpsjX70vZ9gqrOogwCgYIKoZIzj0EAwIw\nczELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh\nbiBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMT\nE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODIxMDA1NDAwWhcNMTkwODIxMDA1\nOTAwWjBAMTAwDQYDVQQLEwZjbGllbnQwCwYDVQQLEwRvcmcxMBIGA1UECxMLZGVw\nYXJ0bWVudDExDDAKBgNVBAMTA0ppbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBM8uh3CA3hJojoBAFOaZlpambotaQFDe5ItAxoWaKgU7/XIla7swvtsawj+FXtlg\n9HJcXXJMLTlKUCYszKE41iGjgdUwgdIwDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB\n/wQCMAAwHQYDVR0OBBYEFNqY4vE1Pu2fUFUb9S0Nh4q692wxMCsGA1UdIwQkMCKA\nIA5ykiTos/MXhMipPFuO9vTByR2ebld8RcMxY2Cf5AARMGYGCCoDBAUGBwgBBFp7\nImF0dHJzIjp7ImhmLkFmZmlsaWF0aW9uIjoib3JnMS5kZXBhcnRtZW50MSIsImhm\nLkVucm9sbG1lbnRJRCI6IkppbSIsImhmLlR5cGUiOiJjbGllbnQifX0wCgYIKoZI\nzj0EAwIDRwAwRAIgUB5U3GyuIP01WRMwpH1QdqK3EMCtXZm54+y11MMnS90CIGHx\nxD77KEZk7T8A9gkjWg2kjnqdnpLvmQNPzs6NoKgj\n-----END CERTIFICATE-----\n"}}}` ``` there are two more files `82bc04264063ce383c8efb9094b4c88d87474c9c966a7168ae900548add18f36-priv │   ├── 82bc04264063ce383c8efb9094b4c88d87474c9c966a7168ae900548add18f36-pub ` ``` And what i Do now is that extract the 82bc04264063ce383c8efb9094b4c88d87474c9c966a7168ae900548add18f36-pub for public key

kjroger94 (Tue, 21 Aug 2018 03:25:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DorsP6jzu3BdAFC42) @Ferrymania you are looking for something to fetch it from the CA or something?

GuillaumeTong (Tue, 21 Aug 2018 03:47:04 GMT):
Hello, I am trying to use the fabric-ca-client node SDK to get the necessary files in the MSP folders of the different components of the fabric network (peers, orderers, admins and clients). Is there anywhere I can find examples for that? Or at least a better documentation than at https://fabric-sdk-node.github.io (which does not seem to have most of the documentation pertaining to fabric-ca-client)

kjroger94 (Tue, 21 Aug 2018 04:58:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DPPgDgTpnLY6pSt5X) @GuillaumeTong You won't get samples related to it but you can just see the documentation and play around with it. You will eventually get it. Load your fabric ca from the network config file or use the certificate authority class and initialize it then you can just register and enroll

GuillaumeTong (Tue, 21 Aug 2018 05:58:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9Rts92x8kdCjCFQk2) @kjroger94 @kjroger94 Thanks for the reply. Which documentation? The one at https://fabric-sdk-node.github.io does describe a CertificateAuthority class but most of it just says "see FabricCAServices" which is not documented at all from what I can see.

GuillaumeTong (Tue, 21 Aug 2018 05:58:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9Rts92x8kdCjCFQk2) @kjroger94 Thanks for the reply. Which documentation? The one at https://fabric-sdk-node.github.io does describe a CertificateAuthority class but most of it just says "see FabricCAServices" which is not documented at all from what I can see.

dsanchezseco (Tue, 21 Aug 2018 06:17:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4JfftBvE2EYtbmigw) @bretharrison @bretharrison I know. I was meaning that if the `request.chaincodePath` must exist on the peers as well as in the SDK host and on the same route. If the answer is no i have to thoroughly check my code because something is not like it should. Checking the installation directory for the chaincodes on the peer I see that the chaincode I install using the SDK are "empty" and weight only 100-150 bytes in comparison to the 1.5K the weights the chaincode_example02 installed using the cli(in installing the same chaincode with the SDK). Thanks for the help!

dsanchezseco (Tue, 21 Aug 2018 06:17:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4JfftBvE2EYtbmigw) @bretharrison I know. I was meaning that if the `request.chaincodePath` must exist on the peers as well as in the SDK host and on the same route. If the answer is no i have to thoroughly check my code because something is not like it should. Checking the installation directory for the chaincodes on the peer I see that the chaincode I install using the SDK are "empty" and weight only 100-150 bytes in comparison to the 1.5K the weights the chaincode_example02 installed using the cli(in installing the same chaincode with the SDK). Thanks for the help!

dsanchezseco (Tue, 21 Aug 2018 06:17:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4JfftBvE2EYtbmigw) @bretharrison I know. I was meaning that if the `request.chaincodePath` must exist on the peers as well as in the SDK host and on the same route. If the answer is no i have to thoroughly check my code because something is not like it should. Checking the installation directory for the chaincodes on the peer I see that the chaincode I install using the SDK are "empty" and weight only 100-150 bytes in comparison to the 1.5K the weights the chaincode_example02 installed using the cli(in installing the same chaincode with the SDK). Thanks for the help! Edit: nevermind, it was a mix of not waiting to the unzip(as is asynchronous) and having the source in a folder inside the one specified:sweat:

Ferrymania (Tue, 21 Aug 2018 06:20:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ga8AJ2ZpjjwTdFH7C) @kjroger94 I just want some unique key to distinguish those users and it can be shown to other users :smile:

AkshayBorade (Tue, 21 Aug 2018 11:03:00 GMT):
Has joined the channel.

kapilAtrey (Tue, 21 Aug 2018 11:17:12 GMT):

Clipboard - August 21, 2018 4:47 PM

kapilAtrey (Tue, 21 Aug 2018 11:17:16 GMT):
Hi I was trying to implement PDO in balance transfer application but what i noticed that there is no field for *collection-config* in the instantiate proposal request

kapilAtrey (Tue, 21 Aug 2018 11:17:16 GMT):
Hi I was trying to implement PDO in balance transfer application but what i noticed that there is no field for *collection-config* in the instantiate proposal request

kapilAtrey (Tue, 21 Aug 2018 11:17:45 GMT):

Clipboard - August 21, 2018 4:47 PM

kapilAtrey (Tue, 21 Aug 2018 11:19:30 GMT):
and due to this i couldnt define the collection can anyone help me in that

toddinpal (Tue, 21 Aug 2018 12:00:52 GMT):
@bretharrison thanks, and I have read that page/tutorial numerous times, but I don't find a reference for the connection profile, i.e., something that describes all the fields, their value, and their purpose. All that is provided are some examples.

toddinpal (Tue, 21 Aug 2018 12:03:04 GMT):
@bretharrison For example, I

toddinpal (Tue, 21 Aug 2018 12:03:04 GMT):
@bretharrison For example I've seen where a field called pem can be used to pass in a certificate directly instead of using path to point to a file containing the certificate

AkshayBorade (Tue, 21 Aug 2018 12:04:14 GMT):
Hi, I'm trying to use nodemodules/fabric-client/lib/Channel.js:2600 queryByChaincode method and it seems like it is internally using 45000 for timeout. and In my case, I'm getting timeout error. I'm thinking to set request timeout more than 45000. Can someone please suggest, How can I change this by default timeout ?

AkshayBorade (Tue, 21 Aug 2018 12:04:14 GMT):
Hi, I'm trying to use *nodemodules/fabric-client/lib/Channel.js:2600 queryByChaincode* method and it seems like it is internally using 45000 for timeout. and In my case, I'm getting timeout error. I'm thinking to set request timeout more than 45000. Can someone please suggest, How can I change this by default timeout ?

bretharrison (Tue, 21 Aug 2018 12:04:33 GMT):
@toddinpal How about https://github.com/hyperledger/fabric-sdk-node/blob/release-1.1/test/fixtures/network.yaml , it has some comments in the file to describe the fields

toddinpal (Tue, 21 Aug 2018 12:07:19 GMT):
@bretharrison That's better, but as I mentioned above, it doesn't describe the pem attribute, although it alludes to it. Would be nice if the documentation team could turn that, if complete, into a reference page. Connection profiles are pretty key and it would be great to have complete documentation on them.

bretharrison (Tue, 21 Aug 2018 12:12:40 GMT):
@toddinpal I agree, opened https://jira.hyperledger.org/browse/FABN-883 to track

bretharrison (Tue, 21 Aug 2018 12:20:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yZKHt4FYtQnkQRe7x) @AkshayBorade Looks like that call is a bit lacking .... opened https://jira.hyperledger.org/browse/FABN-884 to fix, however as a workaround you could set it globally before making the call, then set it back ``` const temp = client.getConfigSetting('request-timeout'); client.setConfigSetting('request-timeout', 60000); ... make your call ... client.setConfigSetting('request-timeout', temp); ```

AkshayBorade (Tue, 21 Aug 2018 12:23:54 GMT):
@bretharrison : Okay, I'll try it and will let you know. Thanks!

AkshayBorade (Tue, 21 Aug 2018 12:23:54 GMT):
@bretharrison : Okay, I'll try it and will let you know. Thanks!

Ferrymania (Tue, 21 Aug 2018 13:13:03 GMT):
Hi ,guys In the *Balance-transefer* example, it create channel with Org1 user,when I use org2 user to invoke chaincode ,it would error . So need I join Org2 peers to this channel too?

SunilHirole (Tue, 21 Aug 2018 13:33:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uxRGrEiwGzyTXC6os) @Ferrymania Yes, you need to join channel from peers of Org1 and Org2 and then install chaincode on peers of both organization. After instantiating the chaincode you can invoke chaincode functions.

Ferrymania (Tue, 21 Aug 2018 13:44:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4GBgtnBzDbJjRZNp3) @SunilHirole Thanks a lot ,I would give a try :grinning:,Before Join the channel ,should I use Org2 users to send create channel request again?

kapilAtrey (Tue, 21 Aug 2018 13:51:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d3dbPeAYZLa939Lx5) can anyone please respond to that

kapilAtrey (Tue, 21 Aug 2018 13:51:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d3dbPeAYZLa939Lx5) can anyone please respond to that screenshot and the question following this

SunilHirole (Tue, 21 Aug 2018 14:03:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3XnpcFrmgxXjudwzW) @Ferrymania No, If channel is already created by Org1, then for Org2 users no need to create channel they can join the same channel created by Org1

bdjidi (Tue, 21 Aug 2018 22:49:12 GMT):
Has joined the channel.

dayubian (Wed, 22 Aug 2018 00:11:36 GMT):
Has left the channel.

Ferrymania (Wed, 22 Aug 2018 01:46:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7ELerWGaLsQDWHKHM) @SunilHirole Thanks a ton to you,and It seems I succeed in invoking chaincode with Org users.Process is``` Org1 create channel Org1 join channel,Org2 join channel Org1 install chaincode and instantiate chaincode Org2 install chaincode and insatntiate chaincode ```

Ferrymania (Wed, 22 Aug 2018 01:46:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7ELerWGaLsQDWHKHM) @SunilHirole Thanks a ton to you,and It seems I succeed in invoking chaincode with Org2 users.Process is``` Org1 create channel Org1 join channel,Org2 join channel Org1 install chaincode and instantiate chaincode Org2 install chaincode and insatntiate chaincode ```

Ferrymania (Wed, 22 Aug 2018 01:46:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7ELerWGaLsQDWHKHM) @SunilHirole Thanks a ton to you,and It seems I succeed in invoking chaincode with Org2 users.Process is``` Org1 create channel Org1 join channel,Org2 join channel Org1 install chaincode and instantiate chaincode Org2 install chaincode and insatntiate chaincode ```

Ferrymania (Wed, 22 Aug 2018 01:46:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7ELerWGaLsQDWHKHM) @SunilHirole Thanks a ton to you,and It seems I succeed in invoking chaincode with Org2 users.Process is``` Org1 create channel Org1 join channel,Org2 join channel Org1 install chaincode and instantiate chaincode Org2 install chaincode and insatntiate chaincode ``` ``` I am *not sure* if Org2 should instantiate chaincode because I would meet error when instantiate it,and after install the chaincode,I can query instantiated chaincodes by org2,And even if error happens when instantiated chaincodes ,I still can invoke chaincode by org2 users ```

AdityaV (Wed, 22 Aug 2018 06:01:45 GMT):
Has joined the channel.

rthatcher (Wed, 22 Aug 2018 10:24:06 GMT):
Has joined the channel.

kjroger94 (Wed, 22 Aug 2018 11:28:44 GMT):
which certificates/key do i need present at the sdk for invoking chaincode? I want to import the least and only the necessary crypto material

beshogun (Wed, 22 Aug 2018 12:00:35 GMT):
Has joined the channel.

Legiit (Wed, 22 Aug 2018 12:57:54 GMT):
Hey guys - how do I do an invocation and receive the persisted object in the eventhub succes callback? It only gives back the txId and status :sweat_smile:

Arindam (Wed, 22 Aug 2018 18:03:14 GMT):
I am facing the exact same problem like this: https://stackoverflow.com/questions/50373274/hyperledger-fabric-node-js-sdk-api-failing-on-enrollment Can anyone please help

Arindam (Wed, 22 Aug 2018 18:03:30 GMT):
Failed to register the username Jim for organization Org1 with::failed Error: Enrollment failed with errors [[{"code":19,"message":"CA 'ca.org1.net' does not exist"}]]

Arindam (Wed, 22 Aug 2018 18:03:43 GMT):
I am trying balance transfer sample

Ferrymania (Thu, 23 Aug 2018 03:08:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oWdJpGNQqXFRvaKis) @Arindam I have not met this error ,did you specfiy CA *url* in the sdk network-config file,or use docker ps to see if CA is already starting

AkshayBorade (Thu, 23 Aug 2018 07:46:21 GMT):
Hi, I have some doubts regarding Anchor Peers. https://hyperledger-fabric.readthedocs.io/en/release-1.2/glossary.html#anchor-peer I'm checking the Balance Transfer example in fabric samples and I don't understand the usage of Anchor Peers. So, For now I have just removed the Anchor Peers from the code and tried to run Balance Transfer application and Everthing is working fine without Anchor Peers. So, Can someone please answer my following questions? 1) Is this mandatory to use Anchor Peers? 2) What is the usage of Anchor Peers, Please explain it with an example?

dsanchezseco (Thu, 23 Aug 2018 13:54:17 GMT):
@AkshayBorade 1. is mandatory if you want to use the new service discovery 2. mainly the anchors are a set of well known peers of the different organizations of a channel that are used as the equivalent of the bootstrap nodes on ethereum. Instead of having to share the info of all peers of a organization you set some peers as anchors where all the peers are going to say "hey, I'm here! Can you tell me who is here too?" and instead of having a huge list of peers for each org you have two or three and through them you get the rest

AkshayBorade (Fri, 24 Aug 2018 05:46:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XytB2KPn82xaA5zcA) @dsanchezseco @dsanchezseco : Thanks! :thumbsup:

AkshayBorade (Fri, 24 Aug 2018 05:46:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XytB2KPn82xaA5zcA) @dsanchezseco : Thanks! :thumbsup:

AkshayBorade (Fri, 24 Aug 2018 07:04:53 GMT):
Hi, After successfully instantiation, In docker logs each time I get this error logs.

AkshayBorade (Fri, 24 Aug 2018 07:04:53 GMT):
Hi, After successfully instantiation, In docker logs each time I get this error logs.

AkshayBorade (Fri, 24 Aug 2018 07:06:31 GMT):

20180820png1315×259 .png

AkshayBorade (Fri, 24 Aug 2018 07:06:31 GMT):

20180820png1315×259 .png

AkshayBorade (Fri, 24 Aug 2018 07:06:31 GMT):

20180820png1315×259 .png

xuchenhao001 (Fri, 24 Aug 2018 07:09:45 GMT):
Has joined the channel.

xuchenhao001 (Fri, 24 Aug 2018 07:10:03 GMT):
Hi, I have some questions about event hub in node sdk. Is event hub necessary during invoking/instantiating? 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?

Ferrymania (Fri, 24 Aug 2018 09:46:12 GMT):
Hi,guys Is there a method that return block after I invoke chaincode,what I use now is gethistroyforkey then use txid to get block ,including two steps

SunilHirole (Fri, 24 Aug 2018 11:31:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=S9H69qjFYC4XxjiBY) @Ferrymania Just refer this example of balance transfer that query for block by blocknuber https://github.com/hyperledger/fabric-samples/tree/release-1.2/balance-transfer#query-block-by-blocknumber

DavorKljajic (Fri, 24 Aug 2018 11:34:53 GMT):
Has joined the channel.

DavorKljajic (Fri, 24 Aug 2018 11:35:18 GMT):
hello, I'm wondering if someone has worked custom implementation mps with idemix, and where i can find the setup, on official site is not clear to much.

Ferrymania (Fri, 24 Aug 2018 11:45:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YJDhLmEgBgahg9zY7) @SunilHirole emmm,the method you give already have block number to use, what I want is after invoke the chaincode and create a transaction,this transaction would exits on a block ,can I Get Block number imediately after I invoke the chaincode succesfully?:joy:

joe-alewine (Fri, 24 Aug 2018 13:36:26 GMT):
Hey, it's possible to instantiate a chaincode on a channel using the SDK, isn't it? I'm not seeing any doc about it? @bretharrison

bretharrison (Fri, 24 Aug 2018 13:47:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4EXz9CYnb47SCdmwD) @joe-alewine I do not think we have anything ... here is some sample(test) code that has a few variations

bretharrison (Fri, 24 Aug 2018 13:47:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4EXz9CYnb47SCdmwD) @joe-alewine I do not think we have anything ... here is some sample(test) code that has a few variations https://github.com/hyperledger/fabric-sdk-node/blob/f8ffa90dc1b61a4a60a6fa25de760c647587b788/test/integration/e2e/e2eUtils.js#L178

bretharrison (Fri, 24 Aug 2018 13:55:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rmGHijcs97FS8cYjj) @Ferrymania The easiest way to get the block number for a committed transaction is to use the ChannelEventHub. Register a transaction listener and the callback will get not only the transaction id, transaction status, but the block number. Keep in mind that a block may contain many transactions and the block number will not be known until the transaction gets ordered and committed. ``` channel_event_hub.registerTxEvent((event_tx_id, status, block_num) => { clearTimeout(handle); console.log('Successfully received the transaction event '); console.log('Transaction was in block num: ' + block_num); resolve(block_num); }, (error)=> { clearTimeout(handle); console.log('Failed to receive the transaction event ::'+error); reject(error); }, ```

bretharrison (Fri, 24 Aug 2018 13:56:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EKfEKcieM6eEymDeT) @DavorKljajic idemix is not supported by NodeSDK, check with the Java SDK.

bretharrison (Fri, 24 Aug 2018 14:14:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4YhckQ2Zp8KDY6sjw) @xuchenhao001 The ChannelEventHub is not required when committing a transaction, however the status received from the `sendTransaction()` only indicates that the request was accepted by the orderer. Using the NodeSDK's ChannelEventHub along with the applications registered transaction listener callback will be notified when the block with the committed transaction is written to the ledger. You could set a timer to just wait or you could query the ledger to also check for the completion of the final step of invoking a transaction (writing the block to the ledger).

bretharrison (Fri, 24 Aug 2018 14:19:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CCzJ6XBWBnqLDQyij) @Legiit https://fabric-sdk-node.github.io/tutorial-channel-events.html

Ferrymania (Sat, 25 Aug 2018 01:04:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gddwZwRjHF7bkC8kE) @bretharrison Thanks bretharrison ,That's what I want,and I agree with you that the block number is uncertain:grimacing:

Ferrymania (Sat, 25 Aug 2018 07:39:32 GMT):
Hi ,guys If I turn solo to kafka and there are more orders,should I write orders url in the sdk network-config yaml ``` orderers: orderer0.example.com: url: grpcs://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: orderer0.example.com # grpc-max-send-message-length: 15 tlsCACerts: path: artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/ca.crt orderer1.example.com: url: grpcs://localhost:8050 grpcOptions: ssl-target-name-override: orderer1.example.com # grpc-max-send-message-length: 15 tlsCACerts: path: artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/tls/ca.crt `````` but when I use the sdk application,would it choose one of orderers or send same proposal to all orders ```

Ferrymania (Sun, 26 Aug 2018 02:46:40 GMT):
emmm ,I met a problem again ,in the balance transefer example ,if I invoke the chaincode many times in a second ,it would error with `cause:Error: ChannelEventHub has been shutdown` and some of them succeed but some failed. Is there some methods to solve the problem ?:mask:

Ferrymania (Sun, 26 Aug 2018 03:05:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ArrE8Qq3kPkjC8uDx) @nhrishi Hi, @nhrishi @akshay.lawange have you solve this problem ? I met this serval times and have no idea about it

knagware9 (Mon, 27 Aug 2018 05:37:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2TTAZW4e3kJxtREfx) @Ferrymania Eventhub is removed,,could you please use fabric-client fabric-ca-client to 1.2 version..its mentioned unstable in package.json...

Ferrymania (Mon, 27 Aug 2018 05:59:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fHBoasq5emD7rqnaR) @knagware9 Thanks knagware9, I change it to 1.2 now ,It seems can succeed with invoke by a queue request, but when invoke chaincode many times in a second still have problem, Could the balance transfer achieve high troughput ?

knagware9 (Mon, 27 Aug 2018 06:08:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZeYkHupA5oxcczgvv) @Ferrymania In balance transfer example..its process transaction sequentially

Ferrymania (Mon, 27 Aug 2018 06:16:09 GMT):
:joy: hhhhh,So I need to change the node.js to meet a number of transaction anyway.

Ferrymania (Mon, 27 Aug 2018 06:16:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QDDQH5DcT8QYaHuWw) @knagware9 😂 hhhhh,So I need to change the node.js to meet a number of transaction anyway.

pmuller (Mon, 27 Aug 2018 14:24:25 GMT):
Has joined the channel.

pmuller (Mon, 27 Aug 2018 14:26:18 GMT):
Hi there, Can anyone help me to make the fabric-ca-client.enroll(admin) method work ?

Ferrymania (Mon, 27 Aug 2018 14:53:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uDLkE35vcuEQkmMEM) @pmuller you can read fabcar in the fabric-samples,there is registerAdmin.js method

pmuller (Mon, 27 Aug 2018 15:21:45 GMT):
I can't understand the file... why are so many variable not declared

Ferrymania (Mon, 27 Aug 2018 15:50:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nxme5auNMiJZKQEfR) @pmuller I am new to node too:joy:,each variable has it usage ,you can look https://fabric-sdk-node.github.io/index.html for some instrcutions

hamptonsmith (Mon, 27 Aug 2018 19:22:29 GMT):
When I call `channel.sendTransactionProposal()` and the result is a chaincode error, the `ProposalResponse` looks like `{"code": 2,"metadata":{"_internal_repr":{}},"details":"chaincode error (status: , message: "}`. Is this expected? If so, where is this documented? Is there a convenient way to get the status code and underlying error message without parsing them out of the "details" field?

hamptonsmith (Mon, 27 Aug 2018 19:22:29 GMT):
When I call `channel.sendTransactionProposal()` and the result is a chaincode error, the `ProposalResponse` looks like `{"code": 2,"metadata":{"_internal_repr":{}},"details":"chaincode error (status: , message: )"}`. Is this expected? If so, where is this documented? Is there a convenient way to get the status code and underlying error message without parsing them out of the "details" field?

pmuller (Tue, 28 Aug 2018 07:57:04 GMT):
@Ferrymania I've tried to make this CA works for a month now, I can assure you the documentation is helpless and the example never works. Only things I saw that was barely close to somewhat working is the two CLI commands of enroll() and register() (and you better not hope for TLS to be active)

dsanchezseco (Tue, 28 Aug 2018 08:50:04 GMT):
Hi! Is there any recomended way to store/use the admin certificate when using the sdk on prod? I mean, the certificate must be the same for creating the channel and installing/instantating the chaincodes, so how to deal with the private key in a secure way with no need of manually exchange it? Any idea or recommendation? Thanks!

Ferrymania (Tue, 28 Aug 2018 15:11:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GoAyENeB8MQ7Dxvad) @pmuller eeeee,what I do is follow the examples,what error when you try examples?

pmuller (Wed, 29 Aug 2018 10:33:05 GMT):
@Ferrymania Sorry if I've been rude, it's been highly infuriating to work on this ... My project has an already set-up blockchain that is functioning, using Composer. We would like to add a Identity and Access Management in place. But, in our network, several users (simple application clients) are requesting the blockchain *on the same peer*. So we wanted to use the CA to emit to each and every user a certificate to identify them. I tried to set up a custom IAM server using fabric-sdk to call the CA, using https://github.com/hyperledger/fabric-samples/blob/release-1.1/fabcar/enrollAdmin.js this example. Sadly even the admin can't enroll itself, authorisation failure. Yes I put up the right admin name and admin passwd

Ferrymania (Wed, 29 Aug 2018 10:55:03 GMT):
:joy:That' ok ,I would be crazy too, did you use CA docker container as server ,you may see CA logs by `docker logs ca`see any debug information

Ferrymania (Wed, 29 Aug 2018 10:55:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=stDa9ZKgRuQjzG4jf) @pmuller 😂That' ok ,I would be crazy too, did you use CA docker container as server ,you may see CA logs by `docker logs ca`see any debug information

pmuller (Wed, 29 Aug 2018 10:56:24 GMT):
@Ferrymania yeah, it has nothing logged regarding the operation... as if it never reaches it

Ferrymania (Wed, 29 Aug 2018 11:00:19 GMT):
did you get right ip like `fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite);`

pmuller (Wed, 29 Aug 2018 11:01:25 GMT):
I changed the 'ca.example.com' to 'fabric-ca'

pmuller (Wed, 29 Aug 2018 11:02:04 GMT):
I'm changing it right back and check for changes

Ferrymania (Wed, 29 Aug 2018 11:03:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MNCJYEcttewz47FDy) @pmuller you should change it depends your IAM server and your ca container name

pmuller (Wed, 29 Aug 2018 11:04:18 GMT):
@Ferrymania Still having `Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]`

pmuller (Wed, 29 Aug 2018 11:04:57 GMT):
my CA docker container is named _fabric-ca_

Ferrymania (Wed, 29 Aug 2018 11:05:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nFvFHuQSkAZWuCWLt) @pmuller is your sdk appilication is in the same server with CA server

pmuller (Wed, 29 Aug 2018 11:06:03 GMT):
@Ferrymania yes they are running in the same machine. Let me detail the setup to you, it might help !

pmuller (Wed, 29 Aug 2018 11:06:57 GMT):
I have a docker container with the default Fabric-CA image. I have set up a nodejs server, which I cast into a Docker. Both are running in the same machine

RobertDiebels (Wed, 29 Aug 2018 11:24:09 GMT):
Does anyone know of any issues when using fabric-client `1.1.2` on fabric `1.0.6`?

RobertDiebels (Wed, 29 Aug 2018 11:26:25 GMT):
I'm running into a problem where I can create channels, add peers to that channel, install chaincode and instantiate chaincode. However when I try to invoke the chaincode with a `sendTransactionProposal` I run into a error: `Couch DB Error:not_found, Status Code:404, Reason:missing`

RobertDiebels (Wed, 29 Aug 2018 11:26:33 GMT):
For the name of the chaincode.

RobertDiebels (Wed, 29 Aug 2018 11:27:44 GMT):
`lscc] Invoke -> ERRO 45d[0m error getting chaincode 'chaincodeName' on channel: 'channelName'(err:could not find chaincode with name 'chaincodeName')`

Sreesha (Wed, 29 Aug 2018 12:22:24 GMT):
In balance-transfer are we using anchors.tx

davidkhala (Wed, 29 Aug 2018 12:31:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PyXwk6kf7KRghsxN3) @dsanchezseco What is the meaning of `manually exchange it`?

davidkhala (Wed, 29 Aug 2018 12:33:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=x8Sxftvafi77cPdjy) @RobertDiebels upper case character of channel name is not allowed.

dsanchezseco (Wed, 29 Aug 2018 12:39:48 GMT):
@davidkhala as far as i know there's no way to get the certificate and key of an identity without reenrolling, thing that regenerates the cert making a new one, for the normal user/cli identity that's no problem, but for the admin, as the channel is secured using it's cert if you reenroll the admin the cert changes and the channel is going to asnwer you with "you're not an admin, only an admin can install/instantiate/join channel...". To prevent this the only way i saw to do it is manually gather the admin certificate/key and redistributed where necesary, for example to the admincert folder of the peers or to the sdk to be able to install chaincodes. (by manually I mean that i'm pushing the admin cert and key to an S3 bucket and pulling it from where i need, this is the part and looking how to change using something specific for certificates like an HSM/KMS)

dsanchezseco (Wed, 29 Aug 2018 12:39:48 GMT):
@davidkhala as far as i know there's no way to get the certificate and key of an identity without reenrolling, thing that regenerates the cert making a new one, for the normal user/cli identity that's no problem, but for the admin, as the channel is secured using it's cert if you reenroll the admin the cert changes and the channel is going to asnwer you with "you're not an admin, only an admin can install/instantiate/join channel...". To prevent this the only way i saw to do it is manually gather the admin certificate/key and redistributed where necesary, for example to the admincert folder of the peers or to the sdk to be able to install chaincodes. (by manually I mean that i'm pushing the admin cert and key to an S3 bucket and pulling it from where i need, this is the part and looking how to change using something specific for certificates like an HSM/KMS). Ok i saw the `fabric-ca-client list --id admin` to get the admin cert of your affiliation for the peers be able to work. So now only is missing the private key, i'm thinking the use of an HSM would be the best approach wouldn't it?

RobertDiebels (Wed, 29 Aug 2018 12:58:19 GMT):
@davidkhala thanks for the response! I substituted the actual name (which is all lower-case) for `channelName` in the error message above. I can assure that everything installs and instantiates but I just can't invoke anything.

SunilHirole (Thu, 30 Aug 2018 07:45:16 GMT):

error.png

SunilHirole (Thu, 30 Aug 2018 07:45:16 GMT):

error.png

SunilHirole (Thu, 30 Aug 2018 07:45:16 GMT):

error.png

SunilHirole (Thu, 30 Aug 2018 07:45:16 GMT):

error.png

SunilHirole (Thu, 30 Aug 2018 07:51:14 GMT):
Hi Guys, While trying to install chaincode i am facing this issue. In network-connection file *ssl-target-name-override* field is there . I guess because misconfiguration of *grpcOptions* i am facing this issue. Can someone please help me out with *grpcOptions configuration*

rthatcher (Thu, 30 Aug 2018 08:36:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gJFPBCXM4hbK4jkJw) @pmuller This looks like a networking problem. Did you say your node app is running in a Docker Container? If so then the address 127.0.0.1:7054 will just resolve into the app container rather than connecting to the CA. If you are using docker-compose to start your fabric, then your new app container needs to be started on the same docker network bridge as the fabric, then you will be able to address it with something like ca.example.com:7054 rather than localhost.

Aejnor (Thu, 30 Aug 2018 12:02:20 GMT):
Has joined the channel.

NRaj 2 (Thu, 30 Aug 2018 13:48:29 GMT):
Has joined the channel.

NRaj 2 (Thu, 30 Aug 2018 13:48:35 GMT):
Hi Experts

NRaj 2 (Thu, 30 Aug 2018 13:48:43 GMT):
please help me out with ths

NRaj 2 (Thu, 30 Aug 2018 13:49:05 GMT):
please solve this query of mine

NRaj 2 (Thu, 30 Aug 2018 13:49:06 GMT):
https://stackoverflow.com/questions/52098244/what-is-application-signature-in-hyperledger-fabric-and-how-to-set-it

NRaj 2 (Thu, 30 Aug 2018 13:49:34 GMT):
or please suggest something helpful...

bretharrison (Thu, 30 Aug 2018 15:12:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oRoZxGGiWuYEvySDt) @NRaj 2 A signature is created by the user context assigned to the client object when it signs a request before sending to the fabric network. That signature is created by a user that the application has designated, therefore the application's own signature.

cca88 (Thu, 30 Aug 2018 16:46:17 GMT):
Has left the channel.

davidkhala (Fri, 31 Aug 2018 04:53:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3fC7h39KMp6oz4bHg) @dsanchezseco Indeed, it has been a question for long time, I guess it is designed to be for security concern. Actually `fabric-ca-server` do not receive any private key, the private key and CSR is generated by sdk, only CSR is sent to ca server, so we could never recover the private key in ca server for non-admin user.

NRaj 2 (Fri, 31 Aug 2018 06:54:00 GMT):
@bretharrison so that means that what that peerAdmin created by *admin* as registrar their signatures became the applications signatures, am i right

NRaj 2 (Fri, 31 Aug 2018 06:54:03 GMT):
and if so

NRaj 2 (Fri, 31 Aug 2018 06:57:28 GMT):
it means as admins credentials are already created by the configtxgen itself which has created the peer crednetials using which i have been issuing the CA certificates which are possessed by the peerAdmin, that peer org will accept the request from that certificate, is that right?

NRaj 2 (Fri, 31 Aug 2018 06:57:50 GMT):
sorry for rough explaination

shivann (Fri, 31 Aug 2018 11:36:59 GMT):
tls

kjroger94 (Fri, 31 Aug 2018 13:19:51 GMT):
why is this happening ChannelEventHub has been shutdown

kjroger94 (Fri, 31 Aug 2018 13:19:51 GMT):
why is this happening` ChannelEventHub has been shutdown`

kjroger94 (Fri, 31 Aug 2018 13:19:51 GMT):
why is this happening `ChannelEventHub has been shutdown`

kjroger94 (Fri, 31 Aug 2018 16:25:55 GMT):
when sending a transaction that requires 2 peers, how can i do it via the sdk? what do i change in the proposal request

kjroger94 (Fri, 31 Aug 2018 17:20:21 GMT):
[2018-08-31 16:57:51.285] [INFO] Helper - invoke chaincode proposal was good [2018-08-31 16:57:51.285] [INFO] Helper - invoke chaincode proposal was good [2018-08-31 16:57:51.285] [INFO] Helper - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "", metadata - "", endorsement signature: 0E!�?��ߤ�Mӻ$W���� ��`�m��80�� ,��[9�M����lż q�b.�g6�p�gj�r [2018-08-31 16:57:51.286] [DEBUG] Helper - invokeEventPromise - setting up event [2018-08-31 16:57:53.347] [INFO] Helper - The chaincode invoke chaincode transaction has been committed on peer IP:PORT [2018-08-31 16:57:53.347] [INFO] Helper - Transaction fa40ace4346f12d475f109d1f8d921150aadd3bb15df3efa6d07a92d6ddba1c9 has status of ENDORSEMENT_POLICY_FAILURE in blocl 15 [2018-08-31 16:57:53.347] [INFO] Helper - The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE [2018-08-31 16:57:53.349] [INFO] Helper - Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE

kjroger94 (Fri, 31 Aug 2018 17:21:12 GMT):
my endorsement policy requires signs from org1 and org2 admins. and i am passing their peer objects as targets/ getting proposal good but as you can see there is policy failure

bretharrison (Fri, 31 Aug 2018 17:27:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FonqqTwg4JQkMLheg) @NRaj 2 You may wish to post this question on the #fabric channel

bretharrison (Fri, 31 Aug 2018 17:29:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NuTCBaM7mxmA2xS3e) @kjroger94 the `disconnect()` was issued

bretharrison (Fri, 31 Aug 2018 17:29:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NuTCBaM7mxmA2xS3e) @kjroger94 the `disconnect()` was called on the ChannelEventHub

cutmeurahrudi (Sat, 01 Sep 2018 20:51:09 GMT):
Has joined the channel.

mastersingh24 (Sun, 02 Sep 2018 16:06:30 GMT):
@kjroger94 - Why are you setting the endorsement policy to require Admin signatures? Not sure if you have posted elsewhere, but this is at least the third time I've seen this recently. The Admin role for policies is generally designed for admin type activities ... not for endorsements.

kjroger94 (Mon, 03 Sep 2018 03:35:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DebpBfJse2zEXSzJe) @mastersingh24 so you mean I should set it to org1.member type?

BalaDevasani (Mon, 03 Sep 2018 06:35:39 GMT):
Has joined the channel.

BalaDevasani (Mon, 03 Sep 2018 06:42:24 GMT):
Hi Team, I am facing GRPC limit error while querying data (vol 100+ MB) from chaincode. Is there anyway to increase the grpc limit in node-sdk ? I have tried to increase the grpc limit with this these setting but doesn't seems working for me. 'grpc-max-receive-message-length': 1887436800, 'grpc-max-send-message-length': 1887436800 'grpc.max_receive_message_length': 1887436800, 'grpc.max_send_message_length': 1887436800, Can you any help to resolve this issue. Help will be very much appreciated.

BalaDevasani (Mon, 03 Sep 2018 06:42:24 GMT):
@wlahti Hi Team, I am facing GRPC limit error while querying data (vol 100+ MB) from chaincode. Is there anyway to increase the grpc limit in node-sdk ? I have tried to increase the grpc limit with this these setting but doesn't seems working for me. 'grpc-max-receive-message-length': 1887436800, 'grpc-max-send-message-length': 1887436800 'grpc.max_receive_message_length': 1887436800, 'grpc.max_send_message_length': 1887436800, Can you any help to resolve this issue. Help will be very much appreciated.

BalaDevasani (Mon, 03 Sep 2018 06:43:07 GMT):

Clipboard - September 3, 2018 12:13 PM

Sreesha (Mon, 03 Sep 2018 09:16:57 GMT):
On peer instantiate command iam getting new chaincode docker up

Sreesha (Mon, 03 Sep 2018 09:17:26 GMT):
But while checking the instantiated chaincodes in mychannel it is showing none

Sreesha (Mon, 03 Sep 2018 09:19:29 GMT):
at peer the following log is shown:

Sreesha (Mon, 03 Sep 2018 09:19:33 GMT):
2018-09-03 09:04:20.405 UTC [chaincode] Execute -> DEBU 1b6c Exit 2018-09-03 09:04:20.405 UTC [endorser] callChaincode -> DEBU 1b6d [mychannelnew][04c4f8e6] Exit 2018-09-03 09:04:20.405 UTC [endorser] endorseProposal -> DEBU 1b6e [mychannelnew][04c4f8e6] Exit 2018-09-03 09:04:20.405 UTC [lockbasedtxmgr] Done -> DEBU 1b6f Done with transaction simulation / query execution [04c4f8e604bd10791c816338386e0c8e52196e0a89c56a11a201db840770485b] 2018-09-03 09:04:20.405 UTC [endorser] ProcessProposal -> DEBU 1b70 Exit: request from%!(EXTRA string=10.53.17.70:34546)

Sreesha (Mon, 03 Sep 2018 09:20:48 GMT):
and on invoke chaincode the following error is thrown:

Sreesha (Mon, 03 Sep 2018 09:21:08 GMT):
Error: error endorsing invoke: rpc error: code = Unknown desc = make sure the chaincode mycc2 has been successfully instantiated and try again: could not find chaincode with name 'mycc2' - proposal response:

mevir (Mon, 03 Sep 2018 10:00:43 GMT):
Has joined the channel.

Sreesha (Mon, 03 Sep 2018 10:12:42 GMT):
This is the orderer logs 018-09-03 10:05:39.108 UTC [orderer/common/broadcast] Handle -> WARN 3c65 Error reading from 172.18.0.3:41546: rpc error: code = Canceled desc = context canceled

Akash-digiledge (Mon, 03 Sep 2018 12:12:00 GMT):
Has joined the channel.

Akash-digiledge (Mon, 03 Sep 2018 12:12:10 GMT):
hi am using fabric version 1.1. For getting events am using channel-eventhub. by using registerChaincodeEvent am getting the eventname and txnId but not getting the payload. can any one help me to find out the problem?

Akash-digiledge (Mon, 03 Sep 2018 12:12:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xZahC4ZCEtPrJcfsG) @Akash-digiledge The block number is also included, make a query using the block number if you require the payload.

gumnaaaaam (Mon, 03 Sep 2018 12:53:23 GMT):
Has joined the channel.

davidkhala (Mon, 03 Sep 2018 13:07:53 GMT):
@bretharrison Dear bret, now that we use channel event Hub, I try to invoke chaincode via target peer belongs to OrgA, but an user identity belongs to OrgB is set inside channel as clientContext. Is this allowed?

bretharrison (Mon, 03 Sep 2018 13:11:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3Sr6jBQjCgBQQvycX) @BalaDevasani try using `grpc.max_send_message_length`

gumnaaaaam (Mon, 03 Sep 2018 13:12:42 GMT):
Hi, i am using fabric version 1.1. Using Hyperledger Fabric SDK for node.js and CouchDb as state database. I tried to filter a data from couchdb using "stub.getQueryResult(queryString);" ,where queryString is stringified. I have used a selector to filter data from couchdb state database like this: let query={ "selector": {"requestID": {"$gt": 0} }, "fields": ["_id","_rev"], "limit": 2, "skip": 0 } Everything works fine, but skip and limit are being ignored; This selector returns more than 2 rows when called through chain code. Can you help me with something, that makes skip and limit works ? and Is it implemented in the node sdk?

bretharrison (Mon, 03 Sep 2018 13:14:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iDPNsxFgxe2CYucE8) @gumnaaaaam You may wish to post to #fabric-peer-endorser-committer

dave.enyeart (Mon, 03 Sep 2018 13:21:49 GMT):
@gumnaaaaam Skip is not recommended by CouchDB as a performant way to page, they have a new bookmark capability that will be leveraged in Fabric v1.3 to support paging capability. For details see https://jira.hyperledger.org/browse/FAB-2809

dave.enyeart (Mon, 03 Sep 2018 13:21:49 GMT):
@gumnaaaaam Skip is not recommended by CouchDB as a performant way to page, they have a new bookmark capability that will be leveraged in Fabric v1.3 to support paging capability, along with limit. For details see https://jira.hyperledger.org/browse/FAB-2809

bh4rtp (Tue, 04 Sep 2018 01:07:22 GMT):
@dave.enyeart must i specify `endorsement-policy` in addition to `collections-config` with private data when instantiating chaincode?

bh4rtp (Tue, 04 Sep 2018 01:07:22 GMT):
@dave.enyeart must i specify `endorsement-policy` in addition to `collections-config` when instantiating chaincode with private data?

dave.enyeart (Tue, 04 Sep 2018 01:25:07 GMT):
yes, endorsement policy is same as with public data. the policy within the collection config is the 'dissemination policy', not an endorsement policy

dave.enyeart (Tue, 04 Sep 2018 01:25:07 GMT):
yes, endorsement policy is same as with public data. the policy within the collection config is the 'dissemination policy' defining which orgs should get the private data, not an endorsement policy

dave.enyeart (Tue, 04 Sep 2018 01:25:54 GMT):
in the future an endorsement policy may be introduced at the collection level, which if set would override the chaincode level endorsement policy. but for now, there is only the chaincode level endorsement policy that covers both public and private data

caveman7 (Tue, 04 Sep 2018 06:26:00 GMT):
hi guys, i'm trying to use the new service discovery api. when i issue the command channel.initialize() or refresh() or getDiscoveryResult(), `peers_by_org` is empty. here is the snippet of the code ``` ```

caveman7 (Tue, 04 Sep 2018 06:26:00 GMT):
hi guys, i'm trying to use the new service discovery api. when i issue the command channel.initialize() or refresh() or getDiscoveryResult(), `peers_by_org` is empty. here is the snippet of the code ``` var crypto_suite = Fabric_Client.newCryptoSuite(); let _keyValueStore = await Fabric_Client.newDefaultKeyValueStore(kvs_options); fabric_client.setStateStore(_keyValueStore); crypto_suite.setCryptoKeyStore(Fabric_Client.newCryptoKeyStore(kvs_options)); fabric_client.setCryptoSuite(crypto_suite); let user_from_store = await fabric_client.getUserContext('admin', true); let channel = fabric_client.newChannel('bci-channel'); let info = await channel.initialize({ target: fabric_client.newPeer('grpc://localhost:8051'), discover: true }); console.log(`info: ${util.inspect(info, {depth: null})}`); ```

caveman7 (Tue, 04 Sep 2018 06:26:00 GMT):
hi guys, i'm trying to use the new service discovery api. when i issue the command channel.initialize() or refresh() or getDiscoveryResult(), `peers_by_org` is empty. here is the snippet of the code ``` var crypto_suite = Fabric_Client.newCryptoSuite(); let _keyValueStore = await Fabric_Client.newDefaultKeyValueStore(kvs_options); fabric_client.setStateStore(_keyValueStore); crypto_suite.setCryptoKeyStore(Fabric_Client.newCryptoKeyStore(kvs_options)); fabric_client.setCryptoSuite(crypto_suite); let user_from_store = await fabric_client.getUserContext('admin', true); let channel = fabric_client.newChannel('bci-channel'); let info = await channel.initialize({ target: fabric_client.newPeer('grpc://localhost:8051'), discover: true }); console.log(`info: ${util.inspect(info, {depth: null})}`); ``` and the snippet of result: ``` orderers: { OrdererMSP: { endpoints: [ { host: 'orderer.example.com', port: 7050, name: 'orderer.example.com:7050' } ] } }, peers_by_org: { kbankMSP: { peers: [] } }, timestamp: 1536032118346 } ``` as seen, the `peers` in `peers_by_org` is empty, although there are peers in that organization

caveman7 (Tue, 04 Sep 2018 06:26:00 GMT):
hi guys, i'm trying to use the new service discovery api. when i issue the command channel.initialize() or refresh() or getDiscoveryResult(), `peers_by_org` is empty. here is the snippet of the code ``` var crypto_suite = Fabric_Client.newCryptoSuite(); let _keyValueStore = await Fabric_Client.newDefaultKeyValueStore(kvs_options); fabric_client.setStateStore(_keyValueStore); crypto_suite.setCryptoKeyStore(Fabric_Client.newCryptoKeyStore(kvs_options)); fabric_client.setCryptoSuite(crypto_suite); let user_from_store = await fabric_client.getUserContext('admin', true); let channel = fabric_client.newChannel('bci-channel'); let info = await channel.initialize({ target: fabric_client.newPeer('grpc://localhost:8051'), discover: true }); console.log(`info: ${util.inspect(info, {depth: null})}`); ``` and the snippet of result: ``` orderers: { OrdererMSP: { endpoints: [ { host: 'orderer.example.com', port: 7050, name: 'orderer.example.com:7050' } ] } }, peers_by_org: { kbankMSP: { peers: [] } }, timestamp: 1536032118346 } ``` as seen, the `peers` in `peers_by_org` is empty, although there are peers in that organization. how i see the peers that belong to the organization?

caveman7 (Tue, 04 Sep 2018 06:26:00 GMT):
hi guys, i'm trying to use the new service discovery api. when i issue the command channel.initialize() or refresh() or getDiscoveryResult(), `peers_by_org` is empty. here is the snippet of the code ``` var crypto_suite = Fabric_Client.newCryptoSuite(); let _keyValueStore = await Fabric_Client.newDefaultKeyValueStore(kvs_options); fabric_client.setStateStore(_keyValueStore); crypto_suite.setCryptoKeyStore(Fabric_Client.newCryptoKeyStore(kvs_options)); fabric_client.setCryptoSuite(crypto_suite); let user_from_store = await fabric_client.getUserContext('admin', true); let channel = fabric_client.newChannel('bci-channel'); let info = await channel.initialize({ target: fabric_client.newPeer('grpc://localhost:8051'), discover: true }); console.log(`info: ${util.inspect(info, {depth: null})}`); ``` and the snippet of result: ``` orderers: { OrdererMSP: { endpoints: [ { host: 'orderer.example.com', port: 7050, name: 'orderer.example.com:7050' } ] } }, peers_by_org: { kbankMSP: { peers: [] } }, timestamp: 1536032118346 } ``` as seen, the `peers` in `peers_by_org` is empty, although there are peers in that organization. how i see the peers that belong to the organization? @yacovm

Akash-digiledge (Tue, 04 Sep 2018 06:56:02 GMT):
@dave.enyeart hi am using fabric version 1.1. For getting events am using channel-eventhub. by using registerChaincodeEvent am getting the eventname and txnId but not getting the payload. can any one help me to find out the problem?

davidkel (Tue, 04 Sep 2018 07:01:07 GMT):
@Akash-digiledge You need to request full blocks from the channelEventHub when you connect to get chaincode event information. eg ``` channelEventHub.connect(true); ```

StefanKosc (Tue, 04 Sep 2018 07:16:23 GMT):
hey, can one chaincode install and instantiate the other one?

kjroger94 (Tue, 04 Sep 2018 08:25:26 GMT):
where can i set timeout for a request/eventHub. it is closing before i get a response.

HandsomeRoger (Tue, 04 Sep 2018 08:43:45 GMT):
Has joined the channel.

npc0405 (Tue, 04 Sep 2018 10:08:24 GMT):
Has joined the channel.

npc0405 (Tue, 04 Sep 2018 10:09:57 GMT):
Error: invalid number of arguments to lscc: 7 Trying to add 'collections-config' in request parameter as per https://fabric-sdk-node.github.io/tutorial-private-data.html

npc0405 (Tue, 04 Sep 2018 10:10:06 GMT):
but its not taking up

npc0405 (Tue, 04 Sep 2018 10:10:16 GMT):
any help would be greatly appreciated

mastersingh24 (Tue, 04 Sep 2018 10:32:05 GMT):
@npc0405 - I assume you are using Fabric v1.2? Did you upgrade an existing install? You will get this error if V2 capabilities are not enabled for the channel

mastersingh24 (Tue, 04 Sep 2018 10:32:29 GMT):
(and FYI we submitted a patch to improve the error message in the next fix pack)

npc0405 (Tue, 04 Sep 2018 10:36:53 GMT):
Yes I cloned for v1.2. But still can you tell me how to enable V2 capabilities for channel?

npc0405 (Tue, 04 Sep 2018 10:36:56 GMT):
Thanks

rajesh.paranjpe (Tue, 04 Sep 2018 10:46:15 GMT):
Has joined the channel.

dave.enyeart (Tue, 04 Sep 2018 11:40:26 GMT):
@npc0405 You probably need to set your network's application capability to be V1_2. The private data tutorial https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html uses the first network configuration which sets the capability here: https://github.com/hyperledger/fabric-samples/blob/release-1.2/first-network/configtx.yaml#L111

npc0405 (Tue, 04 Sep 2018 12:16:43 GMT):
Thanks @dave.enyeart Changing file as per first network did not change my error message. Though I restarted my network. Am I missing some thing?

dave.enyeart (Tue, 04 Sep 2018 12:17:26 GMT):
you'll need to regenerate your config transaction

dave.enyeart (Tue, 04 Sep 2018 12:18:10 GMT):
and re-create the channel using that config transaction

npc0405 (Tue, 04 Sep 2018 12:18:24 GMT):
Oh... Let me do that

npc0405 (Tue, 04 Sep 2018 12:18:27 GMT):
Thanks :)

npc0405 (Tue, 04 Sep 2018 12:18:35 GMT):
Will try and let u know

rnisar (Tue, 04 Sep 2018 12:24:28 GMT):
Has joined the channel.

npc0405 (Tue, 04 Sep 2018 12:49:43 GMT):
@dave.enyeart , I tried regenerating config transaction and restarted the network. Still same error persist.

npc0405 (Tue, 04 Sep 2018 12:51:22 GMT):
to be precise channel.tx, genesis.block along with Org1MSPanchors.tx and Org2MSPanchors.tx have been updated.

npc0405 (Tue, 04 Sep 2018 12:51:59 GMT):
I hope I dont have to re-generate crypto files for that

daviorocha (Tue, 04 Sep 2018 14:14:58 GMT):
Has joined the channel.

Ryan2 (Tue, 04 Sep 2018 14:58:59 GMT):
I running multiple orderer endpoint, can someone help me on how to config network-config.json file for application site, which send endorsed tx to Orderer? if using only one orderer endpoint, I config like this https://hastebin.com/palilevuce.json But I dont know how to config if I have more than one orderer endpoint, I using fabric-client v1.2.1 Thanks,

Ryan2 (Tue, 04 Sep 2018 14:58:59 GMT):
I running multiple orderer endpoint, can someone help me on how to config network-config.json file for application site, which send endorsed tx to Orderer? if using only one orderer endpoint, I config like this https://hastebin.com/palilevuce.json But I dont know how to config if I have more than one orderer endpoint, I using fabric-client v1.2.1 @dave.enyeart can you help, Thanks,

Ryan2 (Tue, 04 Sep 2018 14:58:59 GMT):
I running multiple orderer endpoint, can someone help me on how to config network-config.json file for application site, which send endorsed tx to Orderer? if using only one orderer endpoint, I config like this https://hastebin.com/palilevuce.json But I dont know how to config if I have more than one orderer endpoint, I using fabric-client v1.2.1 Thanks,

Ryan2 (Tue, 04 Sep 2018 14:58:59 GMT):
I running multiple orderer endpoint, can someone help me on how to config network-config.json file for application site, which send endorsed tx to Orderer? if using only one orderer endpoint, I config like this https://hastebin.com/palilevuce.json But I dont know how to config if I have more than one orderer endpoint, I using fabric-client v1.2.1 @dave.enyeart can you help, Thanks,

sheetal-hlf (Wed, 05 Sep 2018 04:50:56 GMT):
Has joined the channel.

sheetal-hlf (Wed, 05 Sep 2018 04:53:20 GMT):
Hi All, I am trying the private data feature in v1.2 using node sdk. My network contains 2-Orgs, 2 peers per org, 1 solo orderer, 2-CA nodes(sample network from balance-transfer in fabric-samples). Endorsement policy is default and the collection policy as stated in https://fabric-sdk-node.github.io/tutorial-private-data.html Connection profile contains flag "discover: false". I get following error while invoking chaincode Error: Failed disseminating 2 out of 2 private RWSets Could anyone please guide me?

sheetal-hlf (Wed, 05 Sep 2018 04:54:57 GMT):
if the requiredPeerCount in collectionb-config is set to zero then invoke is success; however it should work with higher value as well

sheetal-hlf (Wed, 05 Sep 2018 05:18:49 GMT):
peer settings are as mentioned in balance transfer ```CORE_PEER_GOSSIP_SKIPHANDSHAKE=true CORE_PEER_GOSSIP_ORGLEADER=false CORE_PEER_GOSSIP_USELEADERELECTION=true ```

sheetal-hlf (Wed, 05 Sep 2018 05:21:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=K7LE4JCC9ikpBtygQ) peer logs when requiredPeerCount is set 1 ``` ERRO 481b9 Failed disseminating private RWSet for TxID 1937aca02486385294583a8414678cc2e03426ff3373ca07d9c831389e15c576 , namespace marblesp1 collection collectionMarbles : Requested to send to at least 1 peers, but know only of 0 suitable peers ```

FaizulHassan (Wed, 05 Sep 2018 06:23:10 GMT):
Has joined the channel.

FaizulHassan (Wed, 05 Sep 2018 06:23:19 GMT):
Hello guys , I needs some clarity in Hyperledger Transaction Flow: Kindly advice whether my assumption is right. Flow: - Client application sends transaction proposal to "Endorsing Peers" - "Endorsing Peers" validates participants by checking - whether their Certificates are valid - whether they are authorized to perform operation - the Endorsement policies, signs the transation and sends response to client application Question: What will be the Response from Endorsing Peers to client application contains ? What are read/write sets ? Also please brief about the transaction flow.. Thanks much in advance

mozkarakoc (Wed, 05 Sep 2018 07:57:01 GMT):
@FaizulHassan the detailed architecture explained here: https://hyperledger-fabric.readthedocs.io/en/release-1.2/arch-deep-dive.html You can find answers about proposal requests and endorsement responses in the section 2 " Basic workflow of transaction endorsement" Also transaction flow explained here: https://hyperledger-fabric.readthedocs.io/en/release-1.2/txflow.htm

mozkarakoc (Wed, 05 Sep 2018 07:57:01 GMT):
@FaizulHassan the detailed architecture explained here: https://hyperledger-fabric.readthedocs.io/en/release-1.2/arch-deep-dive.html You can find answers about proposal requests and endorsement responses in the section 2 "Basic workflow of transaction endorsement" Also transaction flow explained here: https://hyperledger-fabric.readthedocs.io/en/release-1.2/txflow.htm

mozkarakoc (Wed, 05 Sep 2018 08:33:55 GMT):
Hi @bretharrison , Is there any documentation/sample about multiple orderer usage? Is enough adding orderers to network-configuration and set the request.orderer to null?

FaizulHassan (Wed, 05 Sep 2018 09:01:38 GMT):
thanks much @mozkarakoc :)

ArianStef (Wed, 05 Sep 2018 09:17:21 GMT):
Has joined the channel.

ArianStef (Wed, 05 Sep 2018 09:17:26 GMT):
Hi team! Is it possible to have a SDK nodejs application ( interact woth the chaincode by SDK rather then CLI) without having a Fabric CA but generating all the cryptographic material by cryptgen ecc? Do you have an example that I can study? For example I would like to use the byfn example with SDK rather then CLI. Thank you

bourbonkidQ (Wed, 05 Sep 2018 09:39:08 GMT):
Hello, I'm trying to upgrade a chaincode, but I have a problem, when the sdk node does a query or an invoke it still uses the old version of the chaincode. When I check my peers, I notice that the new version of chaincode is running well and i have stop and remove the old version.

bourbonkidQ (Wed, 05 Sep 2018 09:41:27 GMT):
` Error: 2 UNKNOWN: cannot retrieve package for chaincode mycc/v0, error open /var/hyperledger/production/chaincodes/mycc.v0: no such file or directory `

bourbonkidQ (Wed, 05 Sep 2018 09:41:27 GMT):
` ``` Error: 2 UNKNOWN: cannot retrieve package for chaincode mycc/v0, error open /var/hyperledger/production/chaincodes/mycc.v0: no such file or directory ``` `

bourbonkidQ (Wed, 05 Sep 2018 09:41:27 GMT):
``` Error: 2 UNKNOWN: cannot retrieve package for chaincode mycc/v0, error open /var/hyperledger/production/chaincodes/mycc.v0: no such file or directory ```

bourbonkidQ (Wed, 05 Sep 2018 09:42:12 GMT):
Shoud I mention the chaincode version on the node sdk side ?

dave.enyeart (Wed, 05 Sep 2018 09:52:53 GMT):
@sheetal-hlf That means your gossip is not configured correctly. Did you set up gossip anchor peers in the config transaction when creating the channel? If you have follow-up questions, post to #fabric-gossip where the gossip experts could help you.

dave.enyeart (Wed, 05 Sep 2018 09:52:53 GMT):
@sheetal-hlf @npc0405 That means your gossip is not configured correctly. Did you set up gossip anchor peers in the config transaction when creating the channel? If you have follow-up questions, post to #fabric-gossip where the gossip experts could help you.

dave.enyeart (Wed, 05 Sep 2018 09:52:53 GMT):
@sheetal-hlf That means your gossip is not configured correctly. Did you set up gossip anchor peers in the config transaction when creating the channel? If you have follow-up questions, post to #fabric-gossip where the gossip experts could help you.

dave.enyeart (Wed, 05 Sep 2018 09:55:34 GMT):
@npc0405 Did you set application capability to V1_2 in config transaction prior to creating channel?

sheetal-hlf (Wed, 05 Sep 2018 09:56:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pQcG7Mz9a9pcBpCfq) @dave.enyeart yes, I created the Org1MSPanchors.tx files

sheetal-hlf (Wed, 05 Sep 2018 10:00:12 GMT):
Also I am using the network configuration from sample application provided in fabric-samples; did that work for anyone without major changes?

dave.enyeart (Wed, 05 Sep 2018 10:07:50 GMT):
It is known to work for the first-network sample, follow the tutorial at https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html tutorial , which uses they byfn network, you can look at the series of commands in the script https://github.com/hyperledger/fabric-samples/blob/release-1.2/first-network/scripts/script.sh

dave.enyeart (Wed, 05 Sep 2018 10:07:50 GMT):
It is known to work for the first-network sample, follow the tutorial at https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html , which uses they byfn network, you can look at the series of commands in the script https://github.com/hyperledger/fabric-samples/blob/release-1.2/first-network/scripts/script.sh

npc0405 (Wed, 05 Sep 2018 13:24:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5wkocQSFXSCaSSD9s) @dave.enyeart Yes. and regenerated transaction files Still at same point.

npc0405 (Wed, 05 Sep 2018 15:19:38 GMT):
Is there any configuration difference between balance transfer app and first-network application. In first network private data collection works but not in balance transfer app (despite of changes in configtx.yaml) Am I missing anything apart from changes in above file.

npc0405 (Wed, 05 Sep 2018 15:21:13 GMT):
Been trying different things from last 3 days

dave.enyeart (Wed, 05 Sep 2018 15:28:48 GMT):
@npc0405 balance transfer uses a pre-configured network and config transaction and is not set up for private data. That's why we point people to first-network for private data trials

dave.enyeart (Wed, 05 Sep 2018 15:28:48 GMT):
@npc0405 balance transfer uses a pre-configured network and config transaction (rather than re-generating based on configtx.yaml) and is not set up for private data. That's why we point people to first-network for private data trials

Zoultrex (Thu, 06 Sep 2018 02:25:37 GMT):
Has joined the channel.

Zoultrex (Thu, 06 Sep 2018 02:26:46 GMT):
Hi everyone, I'm trying to install the fabric node sdk client but I get the following error 2120 verbose stack Error: Command failed: /usr/bin/git clone -q https://github.com/jimthematrix/mock-couch.git /home/grf/.npm/_cacache/tmp/git-clone-888fee42 2120 verbose stack /home/grf/.npm/_cacache/tmp/git-clone-888fee42/.git: Permission denied

Zoultrex (Thu, 06 Sep 2018 02:27:19 GMT):
I posted a question on stackoverflow here: https://stackoverflow.com/questions/52195283/npm-git-fail-when-installing-fabric-client-node-sdk Would appreciate if someone could take a quick look

sheetal-hlf (Thu, 06 Sep 2018 04:57:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d3hhdiuFR83EGDYkG) @dave.enyeart does that mean, there is need for improvement in balance-transfer sample app for private data to work?

medhak19 (Thu, 06 Sep 2018 05:38:35 GMT):
Has joined the channel.

npc0405 (Thu, 06 Sep 2018 07:14:59 GMT):
@sheetal-hlf @dave.enyeart I tried to add configuration in balance-transfer to make private-data to work. But still some config is missing :|

npc0405 (Thu, 06 Sep 2018 08:52:10 GMT):
Please let me know, if that is documented to do so

mastersingh24 (Thu, 06 Sep 2018 09:00:31 GMT):
The balance-transfer application is provided in order to demonstrate how to use the NodeSDK not how to use specific Fabric features. There are no current plans to showcase the use of private data with the balance-transfer app nor to provide any docs on how to modify the app. Of course if people want to do it, then please create a JIRA item, find some folks who might want to collaborate on it and submit a pull request when done ;)

sheetal-hlf (Thu, 06 Sep 2018 09:18:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=roHiuFJ63ZEvzWaEZ) @mastersingh24 Cool... this clarifies the situation, Thank you.. :)

mastersingh24 (Thu, 06 Sep 2018 09:41:59 GMT):
Sure thing .... it's probably not a bad idea to come up with a community project which show cases a good private data use case

sheetal-hlf (Thu, 06 Sep 2018 09:47:03 GMT):
I plan to start with sample NodeSDK with private data and community project would be a large step

npc0405 (Thu, 06 Sep 2018 10:39:11 GMT):
:thumbsup: Let me know.... I m inn :)

midhun14 (Thu, 06 Sep 2018 11:13:22 GMT):
Has joined the channel.

midhun14 (Thu, 06 Sep 2018 11:14:17 GMT):
Anyone knows how to use service discovery while querying chaincode?

midhun14 (Thu, 06 Sep 2018 11:14:48 GMT):
Is there any API that will retrieve all active peer nodes in the network?

midhun14 (Fri, 07 Sep 2018 05:07:34 GMT):
How to enable discovery service in hyperledger fabric 1.2?

mastersingh24 (Fri, 07 Sep 2018 11:13:10 GMT):
The discovery service is enabled on Fabric peers in v1.2 by default

Ferrymania (Sat, 08 Sep 2018 12:24:12 GMT):
Hi,guys when I do loading test ,I would get error when invoke chaincode manmy times in a second ,how can I improve perfermance?Now I use kafka and deploy all nodes on a machine .And if fabric is queue system with handling transation one by one ,how could it meet many transation in a second?

nicolapaoli (Sat, 08 Sep 2018 13:16:12 GMT):
Has joined the channel.

yousaf (Sat, 08 Sep 2018 14:32:24 GMT):
Has joined the channel.

raviyelleni (Sun, 09 Sep 2018 04:40:47 GMT):
Has joined the channel.

raviyelleni (Mon, 10 Sep 2018 02:32:29 GMT):
Hi, anyone does have a link or pdf to a tutorial for building fabric network from scratch using Node.js SDK with all available features?

Ferrymania (Mon, 10 Sep 2018 08:08:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d5big5DRCW2J4Xy6g) @raviyelleni https://fabric-sdk-node.github.io/index.html Did you mean something like this

RobertDiebels (Tue, 11 Sep 2018 08:39:19 GMT):
Has left the channel.

vikas.kundz (Tue, 11 Sep 2018 13:00:40 GMT):
Has joined the channel.

abityildiz (Wed, 12 Sep 2018 07:55:10 GMT):
Has joined the channel.

vshall20 (Wed, 12 Sep 2018 08:25:10 GMT):
Has joined the channel.

DennisM330 (Wed, 12 Sep 2018 19:23:41 GMT):
Anyone have a code example of using attribute based access control using the Node SDK?

davidkhala (Thu, 13 Sep 2018 06:51:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a8F4t8TXmjWBRM8M4) @DennisM330 well I guess the definition part is in fabric-ca, and the controller is in chaincode

migrenaa (Thu, 13 Sep 2018 08:55:55 GMT):
Hello, I just configured my network to work with TLS. Now I am trying to do the configurations in the nodejs application, but I have problems with the certificates. I am following this tutorial https://fabric-sdk-node.github.io/tutorial-mutual-tls.html , but I don't understand which one is my server certificate. Fabric CA is generating bunch of certificates. Is the one specified in the environment variables of the compose file named `ORDERER_GENERAL_TLS_ROOTCAS`

migrenaa (Thu, 13 Sep 2018 08:55:55 GMT):
Hello, I just configured my network to work with TLS. Now I am trying to do the configurations in the nodejs application, but I have problems with the certificates. I am following this tutorial https://fabric-sdk-node.github.io/tutorial-mutual-tls.html , but I don't understand which one is my server certificate. Fabric CA is generating bunch of certificates. Is the one specified in the environment variables of the compose file named `ORDERER_GENERAL_TLS_ROOTCA`

migrenaa (Thu, 13 Sep 2018 08:55:55 GMT):
Hello, I just configured my network to work with TLS. Now I am trying to do the configurations in the nodejs application, but I have problems with the certificates. I am following this tutorial https://fabric-sdk-node.github.io/tutorial-mutual-tls.html , but I don't understand which one is my server certificate. Fabric CA is generating bunch of certificates. Is the one specified in the environment variables of the compose file named `CORE_PEER_TLS_ROOTCERT_FILE`

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using setTlsClientCertAndKey function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbchannel] creator org [orborgMSP] `

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbchannel] creator org [orborgMSP] `

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbchannel] creator org [orborgMSP] ` Do you have any idea what am I doing wrong?

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbchannel] creator org [orborgMSP] ` Do you have any idea what am I doing wrong?

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbchannel] creator org [orborgMSP] ` I am not sure if I am setting wrong server certificates. Do you have any idea what am I doing wrong?

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbchannel] creator org [orborgMSP] ` I am not sure if I am setting wrong server certificates. And I am not sure if the problem is in the network or in the nodejs code. Do you have any idea what am I doing wrong?

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbixchannel] creator org [orbixorgMSP] ` I am not sure if I am setting wrong server certificates. And I am not sure if the problem is in the network or in the nodejs code. These are the docker-compose variables of the peer service ` - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_ENABLED=true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer0-orbixorg-client.crt - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer0-orbixorg-client.key ` And the server certificates that I am using are in this file `orbixorg-ca-chain.pem`, but in this file, there are two certificates. I don't know if this is a problem for fabric. Do you have any idea what am I doing wrong?

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbixchannel] creator org [orbixorgMSP] ` I am not sure if I am setting wrong server certificates. And I am not sure if the problem is in the network or in the nodejs code. These are the docker-compose variables of the peer service ` - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_ENABLED=true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer0-orbixorg-client.crt - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer0-orbixorg-client.key ` And the server certificates that I am using are in this file `orbixorg-ca-chain.pem`, but in this file, there are two certificates. I don't know if this is a problem for fabric. Do you have any idea what am I doing wrong?

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbixchannel] creator org [orbixorgMSP] ` I am not sure if I am setting wrong server certificates. And I am not sure if the problem is in the network or in the nodejs code. These are the docker-compose variables of the peer service ` - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_ENABLED=true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer0-orbixorg-client.crt - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer0-orbixorg-client.key` And the server certificates that I am using are in this file `orbixorg-ca-chain.pem`, but in this file, there are two certificates. I don't know if this is a problem for fabric. Do you have any idea what am I doing wrong?

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbixchannel] creator org [orbixorgMSP] ` I am not sure if I am setting wrong server certificates. And I am not sure if the problem is in the network or in the nodejs code. These are the docker-compose variables of the peer service ``` - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_ENABLED=true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer0-orbixorg-client.crt - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer0-orbixorg-client.key ``` And the server certificates that I am using are in this file `orbixorg-ca-chain.pem`, but in this file, there are two certificates. I don't know if this is a problem for fabric. Do you have any idea what am I doing wrong?

migrenaa (Thu, 13 Sep 2018 10:39:50 GMT):
Hello guys. I enabled TLS in my network. In the nodejs code when I create peer/orderer instance I am setting the `pem` property with the certificates and also I am using `setTlsClientCertAndKey` function to set the certificates to the client. Now `channel.sendTransactionProposal(request)` throws the following error: ` sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [orbixchannel] creator org [orbixorgMSP] ` I am not sure if I am setting wrong server certificates. And I am not sure if the problem is in the network or in the nodejs code. These are the docker-compose variables of the peer service ``` - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_ENABLED=true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/orbixorg-ca-chain.pem - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer0-orbixorg-client.crt - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer0-orbixorg-client.key ``` And the server certificates that I am using are in this file `orbixorg-ca-chain.pem`, but in this file, there are two certificates. I don't know if this is a problem for fabric. Do you have any idea what am I doing wrong?

JaydipMakadia (Thu, 13 Sep 2018 13:17:10 GMT):
Has joined the channel.

halilkalkan (Thu, 13 Sep 2018 13:46:13 GMT):
Has joined the channel.

npc0405 (Thu, 13 Sep 2018 14:24:14 GMT):
After renaming/adding the orgs in network config; How can I do changes related to affiliations

npc0405 (Thu, 13 Sep 2018 14:25:49 GMT):
after renaming orgs it still shows org1 and org2 inside ca container fabric-ca-server-config.yaml

npc0405 (Thu, 13 Sep 2018 14:25:54 GMT):
any idea?

mahbub227 (Fri, 14 Sep 2018 02:50:06 GMT):
Has joined the channel.

anjalinaik (Fri, 14 Sep 2018 07:28:03 GMT):
Hi..can anybody please help me resolve this error from peer logs ``` 2018-09-14 07:21:10.222 UTC [ConnProducer] NewConnection -> ERRO 95f Failed connecting to testf_orderer0:7050 , error: context deadline exceeded 2018-09-14 07:21:10.226 UTC [deliveryClient] connect -> DEBU 960 Connected to 2018-09-14 07:21:10.226 UTC [deliveryClient] connect -> ERRO 961 Failed obtaining connection: Could not connect to any of the endpoints: [testf_orderer0:7050] ```

xiven (Fri, 14 Sep 2018 14:10:43 GMT):
What format does the ca except to parse attributes from the caClient.register api coming through the node sdk client? I have tried the following: `let secret = await caClient.register({ enrollmentID: username, affiliation: userOrg.toLowerCase() + '.dev', *attrs: ['abac.invoke', true]* }, adminUserObj);` but it returns the following error in the json response: `failed Error: fabric-ca request register failed with errors [[{\"code\":5,\"message\":\"Invalid request body: json: cannot unmarshal string into Go struct field RegistrationRequestNet.attrs of type api.Attribute; body={\\\"id\\\":\\\"user18\\\",\\\"affiliation\\\":\\\"exampleorg.dev\\\",\\\"max_enrollments\\\":1,\\\"attrs\\\":[\\\"abac.invoke\\\",true],\\\"caName\\\":\\\"ca-exampleorg\\\"}\"}]]`

xiven (Fri, 14 Sep 2018 14:10:43 GMT):
What format does the ca except to parse attributes from the caClient.register api coming through the node sdk client? I have tried the following: `let secret = await caClient.register({ enrollmentID: username, affiliation: userOrg.toLowerCase() + '.dev', *attrs: ['abac.invoke', true]* }, adminUserObj);` but it returns the following error in the json response: `failed Error: fabric-ca request register failed with errors [[{\"code\":5,\"message\":\"Invalid request body: json: cannot unmarshal string into Go struct field RegistrationRequestNet.attrs of type api.Attribute; body={\\\"id\\\":\\\"user18\\\",\\\"affiliation\\\":\\\"exampleorg.dev\\\",\\\"max_enrollments\\\":1,\\\"attrs\\\":[\\\"abac.invoke\\\",true],\\\"caName\\\":\\\"ca-exampleorg\\\"}\"}]]`

xiven (Fri, 14 Sep 2018 14:10:43 GMT):
What format does the ca except to parse attributes from the caClient.register api coming through the node sdk client? I have tried the following: `let secret = await caClient.register({ enrollmentID: username, affiliation: userOrg.toLowerCase() + '.dev', *attrs: ['abac.invoke', true]* }, adminUserObj);` but it returns the following error in the json response: `failed Error: fabric-ca request register failed with errors [[{\"code\":5,\"message\":\"Invalid request body: json: cannot unmarshal string into Go struct field RegistrationRequestNet.attrs of type api.Attribute; body={\\\"id\\\":\\\"user18\\\",\\\"affiliation\\\":\\\"exampleorg.dev\\\",\\\"max_enrollments\\\":1,\\\"attrs\\\":[\\\"abac.invoke\\\",true],\\\"caName\\\":\\\"ca-exampleorg\\\"}\"}]]`

xiven (Fri, 14 Sep 2018 14:10:43 GMT):
What format does the ca expect to parse attributes from the caClient.register api coming through the node sdk client? I have tried the following: `let secret = await caClient.register({ enrollmentID: username, affiliation: userOrg.toLowerCase() + '.dev', *attrs: ['abac.invoke', true]* }, adminUserObj);` but it returns the following error in the json response: `failed Error: fabric-ca request register failed with errors [[{\"code\":5,\"message\":\"Invalid request body: json: cannot unmarshal string into Go struct field RegistrationRequestNet.attrs of type api.Attribute; body={\\\"id\\\":\\\"user18\\\",\\\"affiliation\\\":\\\"exampleorg.dev\\\",\\\"max_enrollments\\\":1,\\\"attrs\\\":[\\\"abac.invoke\\\",true],\\\"caName\\\":\\\"ca-exampleorg\\\"}\"}]]`

migrenaa (Fri, 14 Sep 2018 14:49:30 GMT):
hi! I am getting the following error when on sendTransactionProposal ``` svc_blockchain_1 | 2018-09-14T14:43:08.677Z - info: code=2, , details=Transaction is not valid. Got [04fb8051a05d5dd6a50443497160880e5d7f07c85ea9d9628176a04597043a2a], expected [73b89d2f9fe8b68467b7d02fd7998f47ea48ed747ed365b835bbd242defc36b4] ``` Do you have any idea what is the problem? I am struggling with this error for tha past 3 hours..

mrudav.shukla (Sun, 16 Sep 2018 17:52:13 GMT):
Has joined the channel.

caveman7 (Mon, 17 Sep 2018 02:41:06 GMT):
Hello guys, I'm having problems whereby fabric-client does not honor the request timeout parameter when it is invoking transaction: https://stackoverflow.com/questions/52360067/request-timeout-setting-not-honored-when-invoking-transaction-using-fabric-node . Any help is appreciated

TobiasN (Mon, 17 Sep 2018 07:01:04 GMT):
@xiven the SDK expect an array like [{key,value}] where both key and value are strings

TobiasN (Mon, 17 Sep 2018 07:02:21 GMT):
@xiven In my project I made a small method, that map a JS object to this type of array, should not take you more than 5 lines ;-)

caveman7 (Mon, 17 Sep 2018 07:27:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=67WtfH3arDrxNn5dy) @xiven its [{name: 'abac.invoke', value: true}]

caveman7 (Mon, 17 Sep 2018 07:27:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=67WtfH3arDrxNn5dy) @xiven it's [{name: 'abac.invoke', value: true}]

jfodale (Mon, 17 Sep 2018 20:46:19 GMT):
I'm trying to track down a javascript code example of emitting a chaincode event and listening for that event after submitting it. Not finding anything with Google or the search in here. Using Fabric 1.1. Anyone have any links?

jfodale (Mon, 17 Sep 2018 20:46:19 GMT):
I'm trying to track down a javascript code example of emitting a chaincode event and listening for that event after submitting a transaction that will emit it. Not finding anything with Google or the search in here. Using Fabric 1.1. Anyone have any links?

caveman7 (Mon, 17 Sep 2018 21:00:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=veydBya6E4zkXsRag) @jfodale https://fabric-sdk-node.github.io/tutorial-channel-events.html

djohnkang (Tue, 18 Sep 2018 06:12:37 GMT):
Has joined the channel.

mrudav.shukla (Tue, 18 Sep 2018 06:17:30 GMT):
Any references on how do we manage the identities when using node-sdk?

TobiasN (Tue, 18 Sep 2018 08:24:25 GMT):
@mrudav.shukla you might want to checkout the balance-transfer from the fabric samples. there it is storing the identities to filesystem. but you can implement other "keystore" and "CryptoKeyStore". but to really understand it, I had to look deep into the sdk sourcecode,...

TobiasN (Tue, 18 Sep 2018 08:26:13 GMT):
@jfodale just check the eventHub class, it is realy simple

davidkel (Tue, 18 Sep 2018 09:48:58 GMT):
@mrudav.shukla depending on your timeframe the node-sdk will get a better way to manage identities

davidkel (Tue, 18 Sep 2018 09:48:58 GMT):
@mrudav.shukla depending on your timeframe the node-sdk will get a better way to manage identities in the future

as7 (Tue, 18 Sep 2018 11:27:27 GMT):
How to use hyperledger fabric on Azure Cloud? I tried to google but couldn't find enough resources.

bretharrison (Tue, 18 Sep 2018 12:54:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wRaofpqYe7yCGCbcH) @migrenaa Looks like an issue with the transactionID, the client object builds a unique transaction ID object that contains both a transactionID based on the user's identity and a unique nonce value. The fabric peer will check the identity of the incoming request to be sure the transaction ID is based on the same identity.

bretharrison (Tue, 18 Sep 2018 13:01:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2wBdccPXHSXWCFfk9) @midhun14 How would you like this work, I am working on adding a new function to the `Client` object that would query a known peer using discovery to get the peers it knows about. I am not sure what the return result should look like. I am thinking a list of peer objects may be useful. Any thoughts ?

bretharrison (Tue, 18 Sep 2018 13:01:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2wBdccPXHSXWCFfk9) @midhun14 How would you like this to work, I am working on adding a new function to the `Client` object that would query a known peer using discovery to get the peers it knows about. I am not sure what the return result should look like. I am thinking a list of peer objects may be useful. Any thoughts ?

jensmueller (Wed, 19 Sep 2018 08:49:32 GMT):
Has joined the channel.

fanjianhang (Wed, 19 Sep 2018 08:51:29 GMT):
Has joined the channel.

touchingsoil (Wed, 19 Sep 2018 09:51:41 GMT):
Has joined the channel.

garaujo (Wed, 19 Sep 2018 10:24:06 GMT):
Has joined the channel.

touchingsoil (Wed, 19 Sep 2018 10:47:03 GMT):
Hai, i has question about endorsement-policy.json. may i use this below to express the policy of "only Org1MSP is need for sign": { "identities": [ { "role": { "name": "member", "mspId": "Org1MSP" } }, { "role": { "name": "member", "mspId": "Org2MSP" } } ], "policy": { "1-of": [ { "signed-by": 0 } ] } }

knagware9 (Wed, 19 Sep 2018 10:51:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MGi4tL3EZmg2hmcHa) @touchingsoil Yes ..it looks good

touchingsoil (Wed, 19 Sep 2018 11:16:22 GMT):
@knagware9 If Org1MSP only has one peer, and this peer post a tx, will it be ok?

touchingsoil (Wed, 19 Sep 2018 11:16:22 GMT):
@knagware9 Thanks! Further more, if Org1MSP only has one peer, and this peer post a tx, will it be ok?

touchingsoil (Wed, 19 Sep 2018 11:37:06 GMT):
@knagware9 Thanks! Further more, if Org1MSP only has one peer, and this peer post a tx, will it be ok? Now ,i use this endorsement-policy.json for three orgs , and Org1's peer post a tx, but get error about "marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]" ,if this error means the endorsement is ok, but the committer failed?

touchingsoil (Wed, 19 Sep 2018 11:37:06 GMT):
@knagware9 Thanks! Further more, if Org1MSP only has one peer, and this peer post a tx, will it be ok? Now ,i use this endorsement-policy.json for three orgs , and Org1's peer post a tx, but get error about "marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]" from other org's peer ,if this error means the endorsement is ok, but the committer failed?

knagware9 (Wed, 19 Sep 2018 11:39:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bZTjZfE3f5FuBXkpi) @touchingsoil Idealy it should work...may be failed at commiter side

touchingsoil (Wed, 19 Sep 2018 11:44:08 GMT):
@knagware9 this is the log : 2018-09-19 09:20:09.969 UTC [vscc] Invoke -> WARN 052 Endorsement policy failure for transaction txid=5fc184c5de5b285cc7e610b426e2eed417a1ae4fe38613a0b5e7e8e8a8a89928, err: signature set did not satisfy policy 2018-09-19 09:20:09.969 UTC [committer/txvalidator] validateTx -> ERRO 053 VSCCValidateTx for transaction txId = 5fc184c5de5b285cc7e610b426e2eed417a1ae4fe38613a0b5e7e8e8a8a89928 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-09-19 09:20:09.969 UTC [valimpl] preprocessProtoBlock -> WARN 054 Channel [ip-trading]: Block [9] Transaction index [0] TxId [5fc184c5de5b285cc7e610b426e2eed417a1ae4fe38613a0b5e7e8e8a8a89928] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-09-19 09:20:09.980 UTC [kvledger] CommitWithPvtData -> INFO 055 Channel [ip-trading]: Committed block [9] with 1 transaction(s) 2018-09-19 09:20:09.985 UTC [common/deliver] deliverBlocks -> WARN 056 [channel: ip-trading] Error sending to 172.23.0.1:37436: rpc error: code = Unknown desc = the stream has been done 2018-09-19 09:28:48.232 UTC [kvledger] CommitWithPvtData -> INFO 057 Channel [ip-trading]: Committed block [10] with 1 transaction(s)

npc0405 (Wed, 19 Sep 2018 12:26:51 GMT):
Is there any node API available for "peer chaincode upgrade"?

jrosmith (Wed, 19 Sep 2018 12:42:50 GMT):
@npc0405 yes, it is the [docs](https://fabric-sdk-node.github.io/Channel.html#sendUpgradeProposal__anchor)

Sreesha (Wed, 19 Sep 2018 12:44:33 GMT):
Iam trying to create channel using node.js fabric-client node modules

Sreesha (Wed, 19 Sep 2018 12:45:01 GMT):
sdk is unable to connect the orderer

Sreesha (Wed, 19 Sep 2018 12:45:45 GMT):
Since orderer is not showing any logs for channel creation

Sreesha (Wed, 19 Sep 2018 12:46:32 GMT):
The error shown is this:

npc0405 (Wed, 19 Sep 2018 12:46:54 GMT):
@jrosmith Thanks :)

Sreesha (Wed, 19 Sep 2018 12:48:15 GMT):
E0919 17:52:03.753114672 23380 ssl_transport_security.c:177] ssl_info_callback: error occured. E0919 17:52:03.753152744 23380 ssl_transport_security.c:921] Handshake failed with fatal error SSL_ERROR_SSL: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate. error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/Music/hyperledger1.1/fabric-samples/balance-transferca/node_modules/grpc/src/node/src/client.js:255:19)\n at ClientDuplexStream._readsDone (/home/Music/hyperledger1.1/fabric-samples/balance-transferca/node_modules/grpc/src/node/src/client.js:221:8)\n at readCallback (/home/Music/hyperledger1.1/fabric-samples/balance-transferca/node_modules/grpc/src/node/

BarryMcLaughlin (Wed, 19 Sep 2018 13:24:20 GMT):
Has joined the channel.

jrosmith (Wed, 19 Sep 2018 13:28:50 GMT):
@Sreesha looks like you may be referencing the wrong cert

Shyam_Pratap_Singh (Thu, 20 Sep 2018 06:48:02 GMT):
Has joined the channel.

SunilHirole (Thu, 20 Sep 2018 07:27:49 GMT):
Hello guys, how can i get all the blocks by using fabric-node-sdk. I want to have a list of transaction on a channel for this i need all the block numbers, so that i can query transaction by block number. Or Do you guys have any other way to get list of transaction on a channel.

kjroger94 (Thu, 20 Sep 2018 08:41:30 GMT):
if i have 2 peers for each org, lets say 1 peer goes down, how can i make sure that if a transaction went to the peer that is down, it corrects and goes to the one that is still running?

npc0405 (Thu, 20 Sep 2018 10:12:32 GMT):
When I m trying to invoke a private chaincode for 3 orgs, I am getting error in one of peer log as "Failed to distributed private collection, txID dec1bdfb651df6a0f537307d93ad73caf75ba268fb8e5391a93309c65de09be9 channel verizonchannel due to Failed disseminating 1 out of 1 private RWSets"

npc0405 (Thu, 20 Sep 2018 10:12:37 GMT):
any idea on this?

dave.enyeart (Thu, 20 Sep 2018 10:17:43 GMT):
it means there are no other peers up to gossip with, or gossip is misconfigured, for example no anchor peer configuration

dave.enyeart (Thu, 20 Sep 2018 10:17:58 GMT):
regardless, it has nothing to do with node sdk :)

dave.enyeart (Thu, 20 Sep 2018 10:19:23 GMT):
read https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html

npc0405 (Thu, 20 Sep 2018 10:47:01 GMT):
Thanks @dave.enyeart

KGiou (Thu, 20 Sep 2018 11:24:34 GMT):
Hi all, I' ve changed all the config files, the docker files and the byfn scripts and when I run the network with my byfn everything runs smoothly. But when I run my network with *balance-transfer* js files, that I have changed them a little ( changes like paths and files used), node throws me this error: `(node:30234) UnhandledPromiseRejectionWarning: Error: Invalid network configuration due to missing configuration data at _getNetworkConfig (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/node_modules/fabric-client/lib/Client.js:1940:9) at Client.loadFromConfig (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/node_modules/fabric-client/lib/Client.js:134:35) at Function.getClientForOrg (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/classes/Client.js:24:14) at Function.get (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/classes/User.js:52:31) at /Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/app.js:16:25 at at runMicrotasksCallback (internal/process/next_tick.js:121:5) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (module.js:695:11) (node:30234) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7) (node:30234) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. `. Can someone explain me if the problem is network - config specific or nodejs sdk specific? Because what I understand is that I might have a mistake somewhere in my configuration files, but I have ckecked them so many times and I haven't find somthing. Thanks in advance!

KGiou (Thu, 20 Sep 2018 11:24:34 GMT):
Hi all, I' ve changed all the config files, the docker files and the byfn scripts and when I run the network with my byfn everything runs smoothly. But when I run my network with *balance-transfer* js files, that I have changed them a little ( changes like paths and files used), node throws me this error: ```(node:30234) UnhandledPromiseRejectionWarning: Error: Invalid network configuration due to missing configuration data at _getNetworkConfig (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/node_modules/fabric-client/lib/Client.js:1940:9) at Client.loadFromConfig (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/node_modules/fabric-client/lib/Client.js:134:35) at Function.getClientForOrg (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/classes/Client.js:24:14) at Function.get (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/classes/User.js:52:31) at /Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/app.js:16:25 at at runMicrotasksCallback (internal/process/next_tick.js:121:5) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (module.js:695:11) (node:30234) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7) (node:30234) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ```. Can someone explain me if the problem is network - config specific or nodejs sdk specific? Because what I understand is that I might have a mistake somewhere in my configuration files, but I have ckecked them so many times and I haven't find somthing. Thanks in advance!

KGiou (Thu, 20 Sep 2018 11:24:34 GMT):
Hi all, I' ve changed all the config files, the docker files and the byfn scripts and when I run the network with my byfn everything runs smoothly. But when I run my network with *balance-transfer* js files, that I have changed them a little ( changes like paths and files used), node throws me this error: ```(node:30234) UnhandledPromiseRejectionWarning: Error: Invalid network configuration due to missing configuration data at _getNetworkConfig (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/node_modules/fabric-client/lib/Client.js:1940:9) at Client.loadFromConfig (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/node_modules/fabric-client/lib/Client.js:134:35) at Function.getClientForOrg (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/classes/Client.js:24:14) at Function.get (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/classes/User.js:52:31) at /Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/app.js:16:25 at at runMicrotasksCallback (internal/process/next_tick.js:121:5) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (module.js:695:11) (node:30234) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7) (node:30234) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ```. Can someone explain me if the problem is network - config specific or nodejs sdk specific? Because what I understand is that I might have a mistake somewhere in my configuration files, but I have ckecked them so many times and I haven't find somthing. Fabric version 1.1.0. Thanks in advance!

KGiou (Thu, 20 Sep 2018 11:24:34 GMT):
Hi all, I' ve changed all the config files, the docker files and the byfn scripts and when I run the network with my byfn everything runs smoothly. But when I run my network with *balance-transfer* js files, that I have changed them a little ( changes like paths and files used), node throws me this error: ```(node:30234) UnhandledPromiseRejectionWarning: Error: Invalid network configuration due to missing configuration data at _getNetworkConfig (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/node_modules/fabric-client/lib/Client.js:1940:9) at Client.loadFromConfig (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/node_modules/fabric-client/lib/Client.js:134:35) at Function.getClientForOrg (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/classes/Client.js:24:14) at Function.get (/Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/classes/User.js:52:31) at /Users/giou/go/src/github.com/hyperledger/fabric/node-sdk-fabric/app.js:16:25 at at runMicrotasksCallback (internal/process/next_tick.js:121:5) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (module.js:695:11) (node:30234) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7) (node:30234) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ```. Can someone to explain me if the problem is network - config specific or nodejs sdk specific? Because what I understand is that I might have a mistake somewhere in my configuration files, but I have ckecked them so many times and I haven't find something. Fabric version 1.1.0. Thanks in advance!

Luxii (Thu, 20 Sep 2018 13:15:25 GMT):
Hey , Im using chaincode event listener for my application and Ive noticed after being registered with the service for a while no new blocks are discovered by the service application. Has anyone ever encountered that before or knows anything about it ?

Luxii (Thu, 20 Sep 2018 13:15:25 GMT):
Hey , Im using chaincode event listener for my application and Ive noticed after being registered with the service for a while no new blocks are discovered by the service application. Has anyone ever encountered this before or knows anything about it ?

migrenaa (Thu, 20 Sep 2018 14:16:50 GMT):
Hello guys. Is there a way to get all peers connected to a specific channel using the SDK? I saw that there is an issue for this feature which is resolved , but I cannot find the method in the documentation of the SDK.

migrenaa (Thu, 20 Sep 2018 14:16:50 GMT):
Hello guys. Is there a way to get all peers connected to a specific channel using the SDK? I saw that there is an issue for this feature which is resolved , but I cannot find the method in the documentation of the SDK. If not how do you choose a peers for transaction proposal? What do you do when you add new peer to the network?

migrenaa (Thu, 20 Sep 2018 14:16:50 GMT):
Hello guys. Is there a way to get all peers connected to a specific channel using the SDK? I saw that there is an issue for this feature which is resolved , but I cannot find the method in the documentation of the SDK. If not how do you choose a peers for transaction proposal? What do you do when you add new peer to the network? I am looking for best practices in Hyperledger Fabric world :D

migrenaa (Thu, 20 Sep 2018 14:16:50 GMT):
Hello guys. Is there a way to get all peers connected to a specific channel using the SDK? I saw that there is an issue for this feature which is resolved , but I cannot find the method in the documentation of the SDK. If not how do you choose a peers for transaction proposal? What do you do when you add new peer to the network? I am looking for best practices in the Hyperledger Fabric world :D

migrenaa (Thu, 20 Sep 2018 14:16:50 GMT):
Hello guys. Is there a way to get all peers connected to a specific channel using the SDK? I saw that there is an issue for this feature which is resolved , but I cannot find the method in the documentation of the SDK. If not how do you choose a peers for transaction proposal? What do you do when you add new peer to the network? What if the endorsment policy changes? I am looking for best practices in the Hyperledger Fabric world :D

WCamaly (Thu, 20 Sep 2018 15:00:03 GMT):
Has joined the channel.

WCamaly (Thu, 20 Sep 2018 15:04:21 GMT):
Hi everyone ! I'm try use sendTransactionProposal, but It is giving me an error `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF at new createStatusError (/home/walter/Projectos/proxyblockchain/node_modules/grpc/src/client.js:64:15) at /home/walter/Projectos/proxyblockchain/node_modules/grpc/src/client.js:583:15 RESULT [ [ { Error: 14 UNAVAILABLE: EOF at new createStatusError (/home/walter/Projectos/proxyblockchain/node_modules/grpc/src/client.js:64:15) at /home/walter/Projectos/proxyblockchain/node_modules/grpc/src/client.js:583:15 code: 14, metadata: [Object], details: 'EOF' } ], { header: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 1151, littleEndian: false, noAssert: false }, payload: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 145, littleEndian: false, noAssert: false }, extension: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } } ] Transaction proposal was bad `

WCamaly (Thu, 20 Sep 2018 15:04:21 GMT):
Hi everyone ! I'm try use sendTransactionProposal, but It is giving me an error `error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF at new createStatusError (/home/walter/Projectos/proxyblockchain/node_modules/grpc/src/client.js:64:15) at /home/walter/Projectos/proxyblockchain/node_modules/grpc/src/client.js:583:15 RESULT [ [ { Error: 14 UNAVAILABLE: EOF at new createStatusError (/home/walter/Projectos/proxyblockchain/node_modules/grpc/src/client.js:64:15) at /home/walter/Projectos/proxyblockchain/node_modules/grpc/src/client.js:583:15 code: 14, metadata: [Object], details: 'EOF' } ], { header: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 1151, littleEndian: false, noAssert: false }, payload: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 145, littleEndian: false, noAssert: false }, extension: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } } ] Transaction proposal was bad`

arindammondal91 (Thu, 20 Sep 2018 16:22:08 GMT):
Has joined the channel.

arindammondal91 (Thu, 20 Sep 2018 16:24:32 GMT):
Hello guys, what is the best place to learn writing chaincode in node.js. I have gone through the basic architecture of Hyperledger fabric and got an idea how to setup the network. But now I want to write some chaincode and deploy to blockchain network.

bretharrison (Thu, 20 Sep 2018 17:27:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yQPhPTKEQtRu8Txrq) @Luxii Be sure to use ChannelEventHub not the old EventHub

MohammadObaid (Thu, 20 Sep 2018 18:35:30 GMT):
Hey @mastersingh24 does node sdk and balance-transfer in v1.2.0 uses node chaincode bydefault ? if yes how can I switch towards go chaincode ?

MohammadObaid (Thu, 20 Sep 2018 18:36:17 GMT):
It seems like I am having a problem with node chaincode . When ccenv containers startup it fails to fetch shim package and that causing failure in chaincode instantiation . Any workaround for this in ccenv 1.2

MohammadObaid (Thu, 20 Sep 2018 18:38:29 GMT):

fabricshim.png

Taffies (Fri, 21 Sep 2018 01:55:46 GMT):
Hello! Does the SDK allow for multiple orderers to be used in the common connection profile? I read somewhere that you can specify but it will only be sent to the first one & ignore the rest of the orderers, as in this issue: https://jira.hyperledger.org/browse/FABN-568

Taffies (Fri, 21 Sep 2018 01:55:54 GMT):
Just wondering if this issue has been solved :)

arindammondal91 (Fri, 21 Sep 2018 04:17:59 GMT):
Hi Guys, anyone can help me how to start writing chaincode in node.js (any tutorial/documentation where I should start from). I have gone through the fabric documentation to understand the architecture and also setting up a blockchain network.

Luxii (Fri, 21 Sep 2018 05:37:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ofxEPiWhtDjBmwhqh) @bretharrison Yes, Im using channelEventHub. `channel_event_hub = channel.newChannelEventHub(config.myPeer);`

Luxii (Fri, 21 Sep 2018 07:36:56 GMT):
Does anyone know how to fix/resolve *PHANTOM_READ_CONFLICTS* ?

mastersingh24 (Fri, 21 Sep 2018 08:51:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fHvgQchwEbvbQcWjG) @Taffies If you have multiple orderers in your connection profile and/or you've added multiple orderers via addOrderer AND you do not specify the orderer property in the sendTransaction request, then all of the orderers in the list will be tried

Luxii (Fri, 21 Sep 2018 08:53:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qK2pv9PHzuDiic6Nj) @mastersingh24 Could you please help me on this?

varunagarwal (Fri, 21 Sep 2018 09:18:29 GMT):
Has joined the channel.

mastersingh24 (Fri, 21 Sep 2018 09:42:29 GMT):
@Luxii - have a look at https://hyperledger-fabric.readthedocs.io/en/release-1.2/readwrite.html#transaction-validation-and-updating-world-state-using-read-write-set ... it explains why you are getting that error

npc0405 (Fri, 21 Sep 2018 09:58:17 GMT):
I am trying to test private data created between org1 and org2. Scenario 1: When I invoke org3 peer in same channel, its not able to see the private data (between org1 n org2) Scenario 2: When I query org1 or org2 peer for privateData with org3 user, it gives me result of private data. Same is the case for Invoke (creating private data) Ideally scenario 2 should fail. Any help would be greatly appreciated.

davidkel (Fri, 21 Sep 2018 10:15:37 GMT):
@Taffies you can't have multiple orderers in node-sdk 1.1 (and fabric 1.1), you can have multiple orderers in node-sdk 1.2 (fabric 1.2)

davidkel (Fri, 21 Sep 2018 10:15:37 GMT):
@Taffies you can't have multiple orderers in node-sdk 1.1 (and fabric 1.1) as only the first one in the list is used, you can have multiple orderers in node-sdk 1.2 (fabric 1.2) as described by @mastersingh24

dave.enyeart (Fri, 21 Sep 2018 10:47:28 GMT):
@npc0405 See answer in #fabric-questions (the question is not related to fabric-sdk-node)

npc0405 (Fri, 21 Sep 2018 10:50:13 GMT):
@dave.enyeart , I am invoking chaicode from node-sdk with users registered for particular orgs

npc0405 (Fri, 21 Sep 2018 10:50:49 GMT):
Anyways... Got an answer. Thanks :)

dave.enyeart (Fri, 21 Sep 2018 10:50:56 GMT):
no worries

Sreesha (Mon, 24 Sep 2018 06:09:58 GMT):
I am getting the same errors as yours Error: Failed disseminating 1 out of 1 private RWSets while adding to the second collection.But the data insertion to first collection is working fine

Sreesha (Mon, 24 Sep 2018 06:09:58 GMT):
I am getting the Error: Failed disseminating 1 out of 1 private RWSets while adding to the second collection.But the data insertion to first collection is working fine

dave.enyeart (Mon, 24 Sep 2018 10:03:34 GMT):
@Sreesha then you must not have enough peers up that are collection members and known via gossip

Sreesha (Mon, 24 Sep 2018 10:08:01 GMT):
@dave.enyeart all peers are up

negupta (Mon, 24 Sep 2018 20:11:24 GMT):
Has joined the channel.

negupta (Mon, 24 Sep 2018 20:14:17 GMT):
hello. When you use a connection profile to submit requests to a network, you do not have to create peer objects. From the docs: `Notice that we have left off the targets parameter of the request object. This will have the fabric client do a lookup of peers on this channel in the connection profile configuration.`

negupta (Mon, 24 Sep 2018 20:14:45 GMT):
does these mean that you do not have to use peer.close or orderer.close methods to close the network connections? or is that handled by the SDK?

negupta (Mon, 24 Sep 2018 20:14:45 GMT):
does that mean that you do not have to use peer.close or orderer.close methods to close the network connections? or is that handled by the SDK?

negupta (Mon, 24 Sep 2018 20:14:45 GMT):
does that mean that you do not have to use peer.close or orderer.close methods to close the network connections? or is that handled by the SDK behind the scenes?

Taffies (Tue, 25 Sep 2018 07:00:07 GMT):
Hi, does anyone know the cases whereby the eventhub will shut down when I try to invoke a transaction? In my case in particular, this error happens occasionally, and when I try to invoke again, the error goes away and the invoke is successful. Would like to minimise the chances of this happening

Taffies (Tue, 25 Sep 2018 07:09:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CJBEYos9m3YCx7KE4) @mastersingh24 Oh I see. Just to check, will it try ALL the orders on that list and connect to one (or all?), or will it try the orderers sequentially? How does it work?

garaujo (Tue, 25 Sep 2018 08:24:15 GMT):
Is there a trial subscription in IBM cloud to test my hyperledger fabric?

Korvictech (Tue, 25 Sep 2018 08:39:56 GMT):
Has joined the channel.

AnithaReddy (Tue, 25 Sep 2018 08:42:42 GMT):
how to restrict access to users for particular functions created in chaincode developed using node js Fabric-shim??

FaizulHassan (Tue, 25 Sep 2018 09:31:41 GMT):
Hi Hi mates.. It may sound little basic , can somebody kindly say the purpose of enrollAdmin.js & registerUser.js in fabcar sample ? I noticed that by making use of registerUser.js , a new user is registered in the fabric network and all transactions that are made are associated to that user. How will the registerUser.js used in real time scenario ? Is this script used to add new user in to the network ? also please state the purpose of enrollAdmin Js as well..

FaizulHassan (Tue, 25 Sep 2018 09:31:41 GMT):
Hi Hi mates.. It may sound little basic , can somebody kindly say the purpose of enrollAdmin.js & registerUser.js in fabcar sample ? I noticed that by making use of registerUser.js , a new user is registered in the fabric network and all transactions that are made are associated to that user. How will the registerUser.js used in real time scenario ? Is this script used to add new user in to the network ? also please state the purpose of enrollAdmin Js as well.. thanks much in advance :)

FaizulHassan (Tue, 25 Sep 2018 09:31:41 GMT):
Question 1: Hi Hi mates.. It may sound little basic , can somebody kindly say the purpose of enrollAdmin.js & registerUser.js in fabcar sample ? I noticed that by making use of registerUser.js , a new user is registered in the fabric network and all transactions that are made are associated to that user. How will the registerUser.js used in real time scenario ? Is this script used to add new user in to the network ? also please state the purpose of enrollAdmin Js as well.. Question 2: Tried getting Block details from peer using Node SDK. But my previous_hash doesn't match with the previous block. Kindly suggest.. (Compared Current Block's previous_hash with Previous block's data_hash , it mismatches. ) thanks much in advance :)

FaizulHassan (Tue, 25 Sep 2018 09:31:41 GMT):
*Question 1:* Hi Hi mates.. It may sound little basic , can somebody kindly say the purpose of enrollAdmin.js & registerUser.js in fabcar sample ? I noticed that by making use of registerUser.js , a new user is registered in the fabric network and all transactions that are made are associated to that user. How will the registerUser.js used in real time scenario ? Is this script used to add new user in to the network ? also please state the purpose of enrollAdmin Js as well.. *Question 2:* Tried getting Block details from peer using Node SDK. But my previous_hash doesn't match with the previous block. Kindly suggest.. (Compared Current Block's previous_hash with Previous block's data_hash , it mismatches. ) thanks much in advance :)

RachelleJanssen (Tue, 25 Sep 2018 11:20:42 GMT):
Has joined the channel.

RachelleJanssen (Tue, 25 Sep 2018 11:22:15 GMT):
quick question, how is the performance for everyone here? my backend API is between 2.8 and 3.5 seconds :( my client isn't really happy with that

RachelleJanssen (Tue, 25 Sep 2018 11:22:15 GMT):
quick question, how is the performance for everyone here? my backend API is between 2.8 and 3.5 seconds :( my client isn't really happy with that. I'm by no means an expert of hyperledger, but I do know nodejs very well!

Ferrymania (Tue, 25 Sep 2018 12:57:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PSxJ5y4j6Lus2A2MM) @RachelleJanssen Mine is not well too,which don't meet high throughput. I put all docker contaniners on one machine

davidkhala (Tue, 25 Sep 2018 15:35:40 GMT):
@zhaochy @andrew-coleman @bretharrison Dear maintainers, I am interested in development plan of nodejs sdk to support ideMixer MSP. Would you mind sharing about it?

davidkhala (Tue, 25 Sep 2018 15:39:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PSxJ5y4j6Lus2A2MM) @RachelleJanssen Generally, it depends on your orderer batch configuration. But 2.8 second is much too long, Even with the time to catch block event, it is not supposed to longer than 1 second with setting `max 1 transaction in 1 block`

davidkhala (Tue, 25 Sep 2018 15:40:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QC6WKxCF2xivE96xv) @Ferrymania I also recommended to use Hyperledger Caliper to run benchmark test

davidkhala (Tue, 25 Sep 2018 15:40:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QC6WKxCF2xivE96xv) @Ferrymania I also recommend to use Hyperledger Caliper to run benchmark test

ArianStef (Tue, 25 Sep 2018 16:32:00 GMT):
Hi! I would like to know if there is a function which returns the size of a block. Thank you

bretharrison (Tue, 25 Sep 2018 17:54:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=v9b8oHhpLJjWsZPJB) @ArianStef You may wish to ask on the #fabric channel, NodeSDK does not have one and there may be a way to do it or they may suggest a opening a Jira

bretharrison (Tue, 25 Sep 2018 17:54:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=v9b8oHhpLJjWsZPJB) @ArianStef You may wish to ask on the #fabric channel, NodeSDK does not have one and there may be a way to do it or they may suggest opening a Jira

bretharrison (Tue, 25 Sep 2018 18:01:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JykEkYZPB35W3i4MM) @FaizulHassan Question 1: registering a user creates a new user with the CA, usually done by an admin, enrolling a user generates a private key and public key, and has the CA create a Certificate, usually done by the user (to protect the private key). Question 2: how about a trace of this issue and open a JIRA

bretharrison (Tue, 25 Sep 2018 18:24:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=asQneLCotJuz7Hx3i) @negupta NodeSDK will not know when the application is done using those objects, it will still be up to the application to `close()` , however the application could close all the peer and orderer objects by calling the `channel.close()`

bretharrison (Tue, 25 Sep 2018 18:24:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=asQneLCotJuz7Hx3i) @negupta NodeSDK will not know when the application is done using those objects, it will still be up to the application to `close()` , however the application could close all the peer and orderer objects assigned to the channel by calling the `channel.close()`

negupta (Tue, 25 Sep 2018 18:28:08 GMT):
@bretharrison Thanks Bret. Does this mean you can not use the peer.close and orderer.close commands as well? Or is it recommended the channel.close

bretharrison (Tue, 25 Sep 2018 18:36:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qYKe295r89o2LAKXJ) @negupta The channel.close just calls the close on each of the peers and orderer assigned to it, not sure what would happen if close is called more than once.

nekia (Wed, 26 Sep 2018 01:05:18 GMT):
Has joined the channel.

nekia (Wed, 26 Sep 2018 01:32:38 GMT):
Hi, I have a question about query results of instantiated chaincodes configured with private data collections. Non printable characters are included in ChaincodeInfo data which are returned from queryInstantiatedChaincodes. Is there anyone who knows about how we shoud handle this information properly ? I setup a chaincode with private data correction by following [this instruction (Using Private Data in Fabric)](https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html) The detail is on [BE-470](https://jira.hyperledger.org/browse/BE-470) (that I'm looking at in Hyperledger Explorer project ). Thanks

nekia (Wed, 26 Sep 2018 01:32:38 GMT):
Hi, I have a question about query results of instantiated chaincodes configured with private data collections. Non printable characters are included in ChaincodeInfo data which are returned from queryInstantiatedChaincodes. Is there anyone who knows about how we shoud handle this information properly ? I setup a chaincode with private data correction by following [this instruction (Using Private Data in Fabric)](https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html) The detail is on [BE-470](https://jira.hyperledger.org/browse/BE-470) (that I'm looking at in Hyperledger Explorer project ). Thanks

nekia (Wed, 26 Sep 2018 01:33:43 GMT):
https://jira.hyperledger.org/secure/attachment/15866/screenshot-1.png

davidkhala (Wed, 26 Sep 2018 02:49:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=v9b8oHhpLJjWsZPJB) @ArianStef Do you mean the actual file size or count of transaction inside a block?

davidkhala (Wed, 26 Sep 2018 02:53:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=L4nEZTwx8Sr4HcunM) @nekia I guess the issue only appears at `BE` project, since they are using Chinese characters in response. They might be unprintable in your encoding system.

davidkhala (Wed, 26 Sep 2018 03:01:03 GMT):
@nekia I remember they use some Chinese characters in JSON key

nekia (Wed, 26 Sep 2018 03:02:22 GMT):
OK. I'm going to do some double check in terms of that point. Thanks

nekia (Wed, 26 Sep 2018 04:27:23 GMT):
https://gist.github.com/nekia/dc3ec0407fb13b3bc5c5efd369bc3250

nekia (Wed, 26 Sep 2018 04:30:00 GMT):
Even if I would try again without any BE component, unfortunately I'm still same situation. I actually tried this with the above snippet. @davidkhala

hyperlearner (Wed, 26 Sep 2018 05:44:59 GMT):
Has joined the channel.

hyperlearner (Wed, 26 Sep 2018 05:46:17 GMT):
Can anyone help me in configuring gossip in balance transfer folder?

FaizulHassan (Wed, 26 Sep 2018 05:47:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ygM5HCquxayJSDhTi) @bretharrison thanks much @bretharrison :)

ArianStef (Wed, 26 Sep 2018 07:47:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yYrsiRzCFb5tiAzip) @bretharrison thank you

ArianStef (Wed, 26 Sep 2018 07:48:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4LgG4ooKeHwrLG6be) @davidkhala Hi david tahnk you. I mean the actual size of a block

RachelleJanssen (Wed, 26 Sep 2018 11:29:09 GMT):

Clipboard - September 26, 2018 1:29 PM

RachelleJanssen (Wed, 26 Sep 2018 11:29:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DMZ9jTtRTMaBBkK4c) @davidkhala I tested it on VMware with 8 GB ram and 4 processor cores. I also tested it on a t2 2xLarge instance (biggest I'm allowed to boot) on AWB. These are the results:

RachelleJanssen (Wed, 26 Sep 2018 11:29:31 GMT):
oh the result is above my message haha (in ms)

RachelleJanssen (Wed, 26 Sep 2018 11:29:31 GMT):
oh the result is above my message haha (in ms indicated by postman)

nfrunza (Wed, 26 Sep 2018 12:10:18 GMT):
Has joined the channel.

jrosmith (Wed, 26 Sep 2018 15:14:13 GMT):
@RachelleJanssen in addition to tuning the `BatchSize` (max number of transactions in the block) you can also tune the `BatchTimeout` (max time elapsed before cutting a block). by default in fabric it is set to 2s. depending on your volumes you could probably comfortably set it to 500ms or 100ms. the two levers should be used in conjuction to tune your network. more info is available in the [docs](https://hyperledger-fabric.readthedocs.io/en/release-1.1/configtx.html?highlight=BatchTimeout#orderer-system-channel-configuration) and in #fabric-orderer

zhangtailin (Thu, 27 Sep 2018 02:37:07 GMT):
Has joined the channel.

davidkhala (Thu, 27 Sep 2018 02:58:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DqLs8ChZsBQ7rNjHZ) @ArianStef Well I am not sure there is a way to get it from node sdk. @bretharrison , any idea?

Ashish_ydv (Thu, 27 Sep 2018 05:54:40 GMT):
Has joined the channel.

kpratihast (Thu, 27 Sep 2018 07:45:59 GMT):
Has joined the channel.

kpratihast (Thu, 27 Sep 2018 07:53:08 GMT):
Hi, I have created 3 Orgs having 1 peer each and the Orgs name are customized and not the regular ones like Org1. After some initial hiccups, I was able to register a user under each of these 3 orgs and channel is also getting created successfully. However, when I am POST request to join channels, it's throwing error that `[[{"code":2,"metadata":{"_internal_repr":{}},"details":"access denied: channel [] creator org [ABCCorpMSP]"}]]` . I have cross checked all my certs and network-config files and it checks out. Please suggest on how to proceed

krabradosty (Thu, 27 Sep 2018 10:17:57 GMT):
Hello! Fabric docs have a manual how to add a new organization to the existing network. They use the fabric-tool image for this. Can I do the same thing using SDK?

Sreesha (Thu, 27 Sep 2018 11:55:02 GMT):
Connecting to an orderer or peer with TLS client authentication enabled

Sreesha (Thu, 27 Sep 2018 11:55:16 GMT):
let serverCert = fs.readFileSync(path.join(__dirname, 'somepath/msp/tlscacerts/example.com-cert.pem')); let clientKey = fs.readFileSync(path.join(__dirname, 'somepath/tls/client.key')); let clientCert = fs.readFileSync(path.join(__dirname, 'somepath/tls/client.crt')); client.setTlsClientCertAndKey(Buffer.from(clientCert).toString(), Buffer.from(clientKey).toString()); let orderer = client.newOrderer( 'grpcs://localhost:7050', { 'pem': Buffer.from(serverCert).toString() }); let peer = client.newPeer( 'grpcs://localhost:7051', { 'pem': Buffer.from(serverCert).toString() } );

Sreesha (Thu, 27 Sep 2018 11:55:40 GMT):
In this whose cert and key is clientKey and cl;ientCert

Sreesha (Thu, 27 Sep 2018 11:56:10 GMT):
And where do we need to add this code to make tls work

knagware9 (Thu, 27 Sep 2018 13:40:18 GMT):
Hi ,,We have command to udpate the anchor peer.Do we have node sdk function to do the same

knagware9 (Thu, 27 Sep 2018 13:41:06 GMT):
In balance transfer example ,we are using 2 orgs 2 peers but cant see any anchor peer update in sdk function

nekia (Thu, 27 Sep 2018 13:59:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cvvbpp3pJCaxqyJf5) I've issued a new JIRA for this problem. https://jira.hyperledger.org/browse/FABN-939

Aswath8687 (Thu, 27 Sep 2018 14:37:37 GMT):
Has joined the channel.

mahoney1 (Thu, 27 Sep 2018 16:15:45 GMT):
Has joined the channel.

akshay.sood (Thu, 27 Sep 2018 16:33:48 GMT):
```"Error: 14 UNAVAILABLE: TCP Write failed ``` This error occurs when I try to invoke chaincode function using Nodejs SDK this error is returned from eventhub do you know anything about it?

tarun.sharma (Thu, 27 Sep 2018 23:24:42 GMT):
Has joined the channel.

n-horiguchi (Fri, 28 Sep 2018 01:25:23 GMT):
Has joined the channel.

SudeepS 2 (Fri, 28 Sep 2018 03:51:02 GMT):
Has joined the channel.

Luxii (Fri, 28 Sep 2018 05:56:12 GMT):
Hi Im getting following error while subscribing to chaincode events service

Luxii (Fri, 28 Sep 2018 05:56:22 GMT):

Clipboard - September 28, 2018 11:26 AM

Luxii (Fri, 28 Sep 2018 06:05:05 GMT):
could it be anything related to grpc options in the network-cofig.yaml ?

SudeepS 2 (Fri, 28 Sep 2018 06:32:56 GMT):
Hi.. I have setup balance-transfer project with kafka as ordering service and two orderer nodes. But while I make a transaction, I want to load balance orderers such that if one orderer goes down, requests should automatically go to other orderer. I tried searching Node SDK implementation of that in internet but I didn't get anything. Could anyone help me on how it is implemented ? Thanks...

UnaiUrk (Fri, 28 Sep 2018 11:00:24 GMT):
Has joined the channel.

UnaiUrk (Fri, 28 Sep 2018 11:00:42 GMT):
hi, Im trying to make an app with Fabric Node SDK. First of all, I want to create a channel. I was following this tutorial, but I think is not complete. There are some errors in the code. https://fabric-sdk-node.github.io/tutorial-channel-create.html For example, config_json is not declared nowhere can someone bring me an example?

kpratihast (Fri, 28 Sep 2018 11:56:34 GMT):
Hi, where do we provide arguments for execution policy while instantiating a chaincode using node sdk?

WCamaly (Fri, 28 Sep 2018 14:12:21 GMT):
Hi!! I try sendTransactionProposal() but i'm having an error, someone has happened to him? error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: cannot retrieve package for chaincode pfglobal/0, error open /var/hyperledger/production/chaincodes/pfglobal.0: no such file or directory at /home/walter/Projectos/proxyblockchain/node_modules/fabric-client/lib/Peer.js:114:16 at /home/walter/Projectos/proxyblockchain/node_modules/fabric-client/node_modules/grpc/src/client.js:586:7

migrenaa (Fri, 28 Sep 2018 14:34:56 GMT):
Hello guys :) I am trying to revoke the certificates of an identity. When I call revoke method I get success message, but however I am able to query and invoke chaincode using the same identity? Do you have any idea what might cause the problem ?

davidkel (Fri, 28 Sep 2018 14:51:46 GMT):
@migrenaa revoke is only a capability of the fabric ca. For peers/orderers it's however the MSP determines if an identity has been revoked. Some info here https://hyperledger-fabric.readthedocs.io/en/latest/membership/membership.html

migrenaa (Fri, 28 Sep 2018 15:05:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=T9WxfR7G77K2nC2xH) @davidkel Thanks for the fast response. I didn't understand, the revocation process as far as I know is just marking a certificate as inactive and the identities can no longer make transactions on the ledger. How can I implement it using the sdk?

davidkel (Fri, 28 Sep 2018 15:09:22 GMT):
@migrenaa The SDK revoke only revokes the cert in the CA (as you call it from the fabric-ca-client), it doesn't do anything for the peers/orderer. The link I sent you defines the process for how to revoke identities. Don't think the SDK can help you there

migrenaa (Fri, 28 Sep 2018 15:13:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hjosfnY85s8Ybbq58) @davidkel @davidkel thanks :)

migrenaa (Fri, 28 Sep 2018 15:13:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hjosfnY85s8Ybbq58) @davidkel thanks :)

akshay.sood (Sun, 30 Sep 2018 04:43:24 GMT):
Hi Experts I need expert reviews on this question https://stackoverflow.com/questions/52574694/user-registration-login-in-hyperledger-fabric

krabradosty (Sun, 30 Sep 2018 12:18:52 GMT):
Hello! Is there a plan to split the process of signing and sending transaction proposals to peers? I don't want my clients directly communicate with Fabric. I want them just to sign the payload I give them and then I send the proposal to peers by myself.

Sreesha (Mon, 01 Oct 2018 05:44:46 GMT):
On channel creation clientUthentication set to false iam able to create channel

Sreesha (Mon, 01 Oct 2018 05:45:11 GMT):
VUt on clientauthentication set to true ssl handshake error is occuring

Sreesha (Mon, 01 Oct 2018 05:45:26 GMT):
should i add any line of code in app.js

UnaiUrk (Mon, 01 Oct 2018 06:10:28 GMT):
hi how I can create a channel??

UnaiUrk (Mon, 01 Oct 2018 06:10:31 GMT):
node SDK

UnaiUrk (Mon, 01 Oct 2018 06:15:25 GMT):
https://fabric-sdk-node.github.io/tutorial-channel-create.html I was following this tutorial but I cant create a channel

migrenaa (Mon, 01 Oct 2018 09:13:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EBWyGMud9Kmpo6sc9) @UnaiUrk you can't create channel using the SDK. You have to setup your network first, join the peers to the channel etc. You can interact with the network as a client using the SDK, meaning - invoking chaincode, enrolling and registering identities etc

UnaiUrk (Mon, 01 Oct 2018 11:03:49 GMT):
So, what tutorial is this? https://fabric-sdk-node.github.io/tutorial-channel-create.html

UnaiUrk (Mon, 01 Oct 2018 11:04:19 GMT):
Its says, fabric node SDN and the tutorial name is Channel Create...

UnaiUrk (Mon, 01 Oct 2018 11:04:19 GMT):
Its says, fabric node SDK and the tutorial name is Channel Create...

jrosmith (Mon, 01 Oct 2018 12:52:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kEopyrTssTEGbbgi3) +1

UnaiUrk (Mon, 01 Oct 2018 13:55:17 GMT):
@migrenaa thankyou for your answe, but I was trying to follow that tutorial https://fabric-sdk-node.github.io/tutorial-channel-create.html and here says that it is posible to create channel from SDK

UnaiUrk (Mon, 01 Oct 2018 13:55:17 GMT):
@migrenaa thank you for your answer, but I was trying to follow that tutorial https://fabric-sdk-node.github.io/tutorial-channel-create.html and here says that it is posible to create channel from SDK

dpk2877 (Tue, 02 Oct 2018 06:12:17 GMT):
Has joined the channel.

dpk2877 (Tue, 02 Oct 2018 06:15:21 GMT):
attribute

dpk2877 (Tue, 02 Oct 2018 06:16:32 GMT):
I am able to generate certificates with attribute but when i am printing it in chaincode it shows blank value. Please help.

migrenaa (Tue, 02 Oct 2018 07:33:54 GMT):
Hi! Is there a way to request the last version of the Certificate Revocation List using the node SDK?

yacovm (Tue, 02 Oct 2018 07:37:20 GMT):
I have no clue in the SDK but I think your best bet is to retrieve the latest config block for the channel, and then parse the MSPConfig

yacovm (Tue, 02 Oct 2018 07:37:20 GMT):
I'm don't know much in the SDK but I think your best bet is to retrieve the latest config block for the channel, and then parse the MSPConfig

yacovm (Tue, 02 Oct 2018 07:37:33 GMT):
@bretharrison am I right?

yacovm (Tue, 02 Oct 2018 07:38:08 GMT):
(about the CRL retrieval not a method in the SDK, not about the part that I have no clue in the SDK)

yacovm (Tue, 02 Oct 2018 07:39:15 GMT):
(about the CRL retrieval not a method in the SDK)

Bartb0 (Tue, 02 Oct 2018 10:57:06 GMT):
Has joined the channel.

bretharrison (Tue, 02 Oct 2018 12:20:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yY8rfrtgqtbQrDtZn) @jrosmith Yes, 1.3 will allow for off line signing

bretharrison (Tue, 02 Oct 2018 12:27:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vBY2m9e5FRA3dZCyw) @UnaiUrk Yes it is possible to create a channel with the NodeSDK, however there must be a configtx binary created by the fabric tool `configtxgen`

bestbeforetoday (Tue, 02 Oct 2018 13:43:04 GMT):
Hi Bret, the docs at https://fabric-sdk-node.github.io/global.html#InitializeRequest say that the default is to use the discovery service. However, the code in Channel says: ```this._use_discovery = sdk_utils.getConfigSetting('initialize-with-discovery', false); ``` Not sure if this is an issue or if the docs should be changed?

UnaiUrk (Tue, 02 Oct 2018 15:23:56 GMT):
@bretharrison Yeah, I supossed that, but I cant do it. I have this error, maybe because Im using another example. Can someone bring a good example? - In orderer logs, it says: identity 0 does not satisfy principal: the identity is a member of a different MSP (expected OrdererMSP, got Org1MSP)

bh4rtp (Tue, 02 Oct 2018 15:34:45 GMT):
hi, for a fabric network with fabric-ca and without fabric-a, what is the difference to use node sdk?

bh4rtp (Tue, 02 Oct 2018 15:34:45 GMT):
hi, for fabric network with fabric-ca and without fabric-a, what is the difference to use node sdk?

LevinLMKwong (Wed, 03 Oct 2018 00:48:21 GMT):
Has joined the channel.

cinnnn (Wed, 03 Oct 2018 07:56:21 GMT):
Has joined the channel.

MohammadObaid (Wed, 03 Oct 2018 08:00:19 GMT):
what is the purpose of hfc-key-store when using fabric--ca-client node sdk ? especially if we already enrolled bootstrap identity in fabric-ca-server config file ? https://github.com/hyperledger/fabric-samples/blob/release-1.2/fabcar/enrollAdmin.js#L53-L61

SudeepS 2 (Wed, 03 Oct 2018 08:12:43 GMT):
Hi.. I have balance-transfer project setup with kafka as ordering service and two orderer nodes. But while I make a transaction, I want to load balance orderers such that if one orderer goes down, requests should automatically go to other orderer. I tried searching Node SDK implementation of that in internet but I didn't get anything. Can anyone help me on how it is implemented ?

davidkel (Wed, 03 Oct 2018 08:27:20 GMT):
@SudeepS 2 That feature is available in the node-sdk 1.2 and beyond versions

davidkel (Wed, 03 Oct 2018 08:27:20 GMT):
@SudeepS 2 That feature is available in the node-sdk 1.2 and beyond versions and it is done automatically

SudeepS 2 (Wed, 03 Oct 2018 09:37:25 GMT):
@davidkel Thank you for the information.. Now I am running my network with 2 orderers, 4 Kafka nodes and 3 zookeper instances. After instantiating channel and invoking once, When I stop Orderer0, invoking is not working, getting error saying connecting to URL is failing. When I restart network and this time when I am stopping orderer1, invokation is working fine. I am not invoking from CLI, I don't understand how it is working. Please help me here.

SudeepS 2 (Wed, 03 Oct 2018 09:37:25 GMT):
@davidkel Thank you for the information.. Now I am running my network with 2 orderers, 4 Kafka nodes and 3 zookeper instances. After instantiating channel and invoking once, When I stop Orderer0, invoking is not working, getting error saying connecting to URL is failing. When I restart network and this time when I am stopping orderer1, invokation is working fine. I am not invoking from CLI, I don't understand how it is working. I have got reply in 'fabric-orderer' chat that I have yo handle this in node sdk. So, are you saying it is being handled automatically in v1.2 ?

SudeepS 2 (Wed, 03 Oct 2018 09:37:25 GMT):
@davidkel Thank you for the information.. Now I am running my network with 2 orderers, 4 Kafka nodes and 3 zookeper instances. After instantiating channel and invoking once, When I stop Orderer0, invoking is not working, getting error saying connecting to URL is failing. When I restart network and this time when I am stopping orderer1, invokation is working fine. I am not invoking from CLI, I don't understand how it is working. I have got reply in 'fabric-orderer' chat that I have to handle this in node sdk. So, are you saying it is being handled automatically in v1.2 ?

davidkel (Wed, 03 Oct 2018 09:42:49 GMT):
@SudeepS 2 the node-sdk from 1.2 has logic to hopefully detect that it can't send to the orderer so will try the next orderer in the list of orderers defined. The list of orderers should either be in the common connection profile or if you do it programmatically create multiple orderer objects and add these to the channel.

SudeepS 2 (Wed, 03 Oct 2018 09:47:55 GMT):
@davidkel Oh.. Thanks.. I have specified both the orderers in configtx.yaml as well as necessary docker compose files. Is it sufficient or do I need to make any other changes ?

SudeepS 2 (Wed, 03 Oct 2018 09:47:55 GMT):
@davidkel Oh.. Thanks.. I have specified both the orderers in configtx.yaml with kafka as ordering service as well as necessary docker compose files. Is it sufficient or do I need to make any other changes ?

davidkel (Wed, 03 Oct 2018 09:51:48 GMT):
I can't help with the fabric side config side of things, but my comments apply to your client application using the fabric-sdk-node

SudeepS 2 (Wed, 03 Oct 2018 09:57:59 GMT):
Oh ok Thanks for the help @davidkel

pvrbharg (Wed, 03 Oct 2018 19:16:36 GMT):
Has joined the channel.

pvrbharg (Wed, 03 Oct 2018 19:19:15 GMT):
I am working on an effort to setup a customized use case that mimics fabric-samples/balance-transfer in release v1.1.0 - that features fabric-ca-server/client with fabric-sdk-node programming model. The sample works great. When I customize the sample with my PoC use case [4 orgs, 4 CAs, 1 orderer with customized crypto and domain names] - all is well and network comes up with with express webserver. However user registration for each org fails and this is because the fabric-ca-client-kv* contents are not created in the root sample folder or their backing storage defined in yaml files for each org [/tmp]. This only happens with customized network and crypto but not our-of-box sample. Sample works even if the fabric-ca-client-kv* contents are deleted and re-run. So do I have to do anything specific that I am not doing - in terms of missed step? We may have an opportunity to improve documentation or do we have a documentation defect here - potentially? Current I am blocked on this issue - how do I get the fabric-ca-client-kv* contents created to succeed with my PoC and what steps do I need to perform? Can you please guide me and tell me if this question needs to be posted elsewhere or an issue created? Thank you

pvrbharg (Wed, 03 Oct 2018 19:19:15 GMT):
I am working on an effort to setup a customized use case that mimics fabric-samples/balance-transfer in release v1.1.0 - that features fabric-ca-server/client with fabric-sdk-node programming model. The sample works great. When I customize the sample with my PoC use case [4 orgs, 4 CAs, 1 orderer with customized crypto and domain names] - all is well and network comes up with with express webserver. However user registration for each org fails and this is because the fabric-ca-client-kv* contents are not created in the root sample folder or their backing storage defined in yaml files for each org [/tmp]. This only happens with customized network and crypto but not our-of-box sample. Sample works even if the fabric-ca-client-kv* contents are deleted and re-run. So do I have to do anything specific that I am not doing - in terms of missed step? We may have an opportunity to improve documentation or do we have a documentation defect here - potentially? Current I am blocked on this issue - how do I get the fabric-ca-client-kv* contents created to succeed with my PoC and what steps do I need to perform? Can you please guide me and tell me if this question needs to be posted elsewhere or an issue created? Thank you. RESOLVED - this issue is related to the answer addressed here - https://stackoverflow.com/questions/48836728/unable-to-enroll-user-in-new-org-added-to-balance-transfer-sample. Thanks

Tony (Wed, 03 Oct 2018 19:27:41 GMT):
Gossip protocol for multiple node in different vm is not working, I am using docker swarm, peer 0 and peer 1 is different vm, goosip bootstrap for perr0 is defined peer1 target port id and vice versa, but error is handshake failed as peer0 not able to find peer 1

Tony (Wed, 03 Oct 2018 19:31:08 GMT):

IMG_20181003_195539.jpg

Tony (Wed, 03 Oct 2018 19:31:10 GMT):

IMG_20181003_195650.jpg

SudeepS 2 (Thu, 04 Oct 2018 05:18:30 GMT):
While creating channel how to select some or all orderers to be available for that channel.

OlegLukasonok (Thu, 04 Oct 2018 07:04:56 GMT):
Has joined the channel.

mrjdomingus (Thu, 04 Oct 2018 08:08:51 GMT):
Has joined the channel.

kjroger94 (Thu, 04 Oct 2018 11:29:25 GMT):
is there a different way that we have to invoke private data transactions ? my endorsement is set to org1 member and org2, i am getting a data mismatch error. i used the collections config in which i set the same endorsement

npc0405 (Thu, 04 Oct 2018 11:43:38 GMT):
Suppose private collection contains 3 orgs and which can see private data and while invoke if I mention only org1 peer then org2 and org3 should also be able to view that data right? But I am not able to see...it it throws permission error

npc0405 (Thu, 04 Oct 2018 11:43:52 GMT):
I m hitting invoke thru node api

dave.enyeart (Thu, 04 Oct 2018 11:49:43 GMT):
@kjroger94 @npc0405 i've responded to your duplicate questions in the other channels

ffiore81 (Thu, 04 Oct 2018 15:10:20 GMT):
Has joined the channel.

grice32 (Thu, 04 Oct 2018 17:42:12 GMT):
Has joined the channel.

kjroger94 (Fri, 05 Oct 2018 00:19:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DNHKyimxiyi7efFsx) @dave.enyeart this is the first time i have asked about private data so idk what you're talking about

tahaf10 (Fri, 05 Oct 2018 06:25:01 GMT):
Has joined the channel.

Tony (Fri, 05 Oct 2018 06:54:51 GMT):
Hi, we are getting access denied issue while instantiating the chaincode on the peers of organisations who are part of common channel, we are doing this using node sdk in multiple vm using docker swarm. Attached screenshot of the error

OlegLukasonok (Fri, 05 Oct 2018 07:26:14 GMT):
Hello, How I can figure out -> How actually fabric sdk node actually connects to business network. Where connection credentials are stored and picked up by fabric sdk node?

tahaf10 (Fri, 05 Oct 2018 07:45:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eXCszZp2SZzDXXJYu) @OlegLukasonok Would like to know this as well

davidkel (Fri, 05 Oct 2018 07:52:56 GMT):
@tahaf10 @OlegLukasonok As part of a higher level api package coming very soon to the fabric-sdk-node is a `wallet` capability that makes it easy to manage client side identities and interact with chaincode. We hope to be able to release a beta very soon.

davidkel (Fri, 05 Oct 2018 07:52:56 GMT):
@tahaf10 @OlegLukasonok As part of a higher level api package for the fabric-sdk-node is a `wallet` capability that makes it easy to manage client side identities and interact with chaincode. We hope to be able to release a beta very soon.

asaningmaxchain123 (Fri, 05 Oct 2018 08:19:24 GMT):
@bretharrison the sdk support the `matedataPath` for chaincode install

asaningmaxchain123 (Fri, 05 Oct 2018 08:20:44 GMT):
this is my install request ```{ targets: [ 'peer0.org1.example.com', 'peer1.org1.example.com' ], chaincodePath: 'github.com/example_cc_private/go', chaincodeId: 'mycc2', chaincodeVersion: 'v0', chaincodeType: 'golang', metadataPath: '/Users/chenxuan/gopath/src/github.com/hyperledger/fabric-rest/app/../artifacts/META-INF' } ` `` however it doesn't work, can you take a look? ```

asaningmaxchain123 (Fri, 05 Oct 2018 08:20:44 GMT):
this is my install request ```{ targets: [ 'peer0.org1.example.com', 'peer1.org1.example.com' ], chaincodePath: 'github.com/example_cc_private/go', chaincodeId: 'mycc2', chaincodeVersion: 'v0', chaincodeType: 'golang', metadataPath: '/Users/chenxuan/gopath/src/github.com/hyperledger/fabric-rest/app/../artifacts/META-INF' } ` `` however it doesn't work, can you take a look? ```

asaningmaxchain123 (Fri, 05 Oct 2018 08:20:44 GMT):
this is my install request ```{ targets: [ 'peer0.org1.example.com', 'peer1.org1.example.com' ], chaincodePath: 'github.com/example_cc_private/go', chaincodeId: 'mycc2', chaincodeVersion: 'v0', chaincodeType: 'golang', metadataPath: '/Users/chenxuan/gopath/src/github.com/hyperledger/fabric-rest/app/../artifacts/META-INF' } ` `` however it doesn't work, can you take a look?

asaningmaxchain123 (Fri, 05 Oct 2018 08:21:52 GMT):

Clipboard - October 5, 2018 4:21 PM

asaningmaxchain123 (Fri, 05 Oct 2018 08:22:02 GMT):
as you see the metadata path does exist

asaningmaxchain123 (Fri, 05 Oct 2018 08:22:49 GMT):
but when i use the cmd `docker logs peer0.org1.example.com 2>&1 | grep "CouchDB index"`

asaningmaxchain123 (Fri, 05 Oct 2018 08:23:01 GMT):
it doesn't show anything

OlegLukasonok (Fri, 05 Oct 2018 08:26:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wcpooGgShJs4gH7KN) @tahaf10 And what options we have meanwhile ?

OlegLukasonok (Fri, 05 Oct 2018 08:27:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=G2NwY675ZAvJZDeZs) @davidkel And what options we have meanwhile?

asaningmaxchain123 (Fri, 05 Oct 2018 08:30:54 GMT):
@jimthematrix the `metadataPath` must locate in the chaincode source dir?

davidkel (Fri, 05 Oct 2018 08:31:59 GMT):
@OlegLukasonok suggest you look at the balance transfer app in fabric samples for now.

OlegLukasonok (Fri, 05 Oct 2018 08:32:28 GMT):
I am looking into it. And can't figure it out.

davidkel (Fri, 05 Oct 2018 08:34:04 GMT):
@OlegLukasonok fabcar would be the other one to look at then

OlegLukasonok (Fri, 05 Oct 2018 08:34:08 GMT):
And one more question -> In composer there is easy to understand way how to manage data model in hyperledger, when in fabric it is kind of tricky

davidkel (Fri, 05 Oct 2018 08:34:56 GMT):
@OlegLukasonok That was one of the value add features of composer.

OlegLukasonok (Fri, 05 Oct 2018 08:35:23 GMT):
So is it correct to state, that in fabric -> Whole model actually is managed by chaincodes ?

davidkel (Fri, 05 Oct 2018 08:36:50 GMT):
@OlegLukasonok sorry not sure what you mean by that. In composer the composer runtime which formed part of the overall running chaincode provided the composer capabilities

OlegLukasonok (Fri, 05 Oct 2018 08:38:02 GMT):
So you are meaning that composer capabilities are actually collection of chaincodes nicely wrapped under rest services?

davidkel (Fri, 05 Oct 2018 08:41:07 GMT):
@OlegLukasonok I would suggest moving further composer questions to the #composer. But basically your business network was a single chaincode package which included the composer runtime

davidkel (Fri, 05 Oct 2018 08:41:07 GMT):
@OlegLukasonok I would suggest moving further composer questions to the #composer channel. But basically your business network was a single chaincode package which included the composer runtime

OlegLukasonok (Fri, 05 Oct 2018 08:41:23 GMT):
Understood.

OlegLukasonok (Fri, 05 Oct 2018 08:42:38 GMT):
In fabcar -> https://github.com/hyperledger/fabric-samples/blob/release/fabcar/query.js We are creating newChannel and newPeer -> Is it required action each time when query is passed -> Or is it enough configure it once while setuping business network ?

OlegLukasonok (Fri, 05 Oct 2018 08:42:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ypDbTLG7eJiGAoT23) @davidkel In fabcar -> https://github.com/hyperledger/fabric-samples/blob/release/fabcar/query.js We are creating newChannel and newPeer -> Is it required action each time when query is passed -> Or is it enough configure it once while setuping business network ?

asaningmaxchain123 (Fri, 05 Oct 2018 08:46:15 GMT):
@OlegLukasonok how can i start the sdk logger

OlegLukasonok (Fri, 05 Oct 2018 08:54:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HrmsuCxDzdJbh5r4X) @asaningmaxchain123 I am not sure yet. Just trying to come out with most efficient way to configure fabric and use it for my case at this moment. And there is enourmous quantity of questions and uncertenties which I have :D

asaningmaxchain123 (Fri, 05 Oct 2018 09:35:05 GMT):
@bretharrison i have find the answer, i should use the latest version, i have find `https://github.com/hyperledger/fabric-sdk-node/commit/a6904633e27b9f78bcd322ef6419f95c0591696e`

asaningmaxchain123 (Fri, 05 Oct 2018 09:35:05 GMT):
@bretharrison i have find the answer, i should use the latest version, i have find https://github.com/hyperledger/fabric-sdk-node/commit/a6904633e27b9f78bcd322ef6419f95c0591696e

SudeepS 2 (Fri, 05 Oct 2018 09:46:57 GMT):
Did anyone use multiple orderers in balance-transfer project ? Can you tell me advantages of multiple orderers and on what basis the count of orderers should be ?

Tony (Fri, 05 Oct 2018 10:51:24 GMT):

IMG_20181004_210117.jpg

Tony (Fri, 05 Oct 2018 10:53:23 GMT):
Hi, we are getting access denied issue while instantiating the chaincode on the peers of organisations who are part of common channel, we are doing this using node sdk in multiple vm using docker swarm. Attached screenshot of the error

OlegLukasonok (Fri, 05 Oct 2018 11:19:38 GMT):
@davidkel -> What value I should provide for args and fcn -> that invoke.js would give me any result ?

OlegLukasonok (Fri, 05 Oct 2018 11:20:31 GMT):

Capture.PNG

OlegLukasonok (Fri, 05 Oct 2018 11:20:37 GMT):
this one does not work.

OlegLukasonok (Fri, 05 Oct 2018 11:20:52 GMT):
I am getting this response:

OlegLukasonok (Fri, 05 Oct 2018 11:21:53 GMT):

Error.PNG

OlegLukasonok (Fri, 05 Oct 2018 11:49:13 GMT):
I got it -> for some reason start.sh script -> under basic-network was not executing last line.

bretharrison (Fri, 05 Oct 2018 12:19:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pDWSsu7RxhCuydHwk) @asaningmaxchain123 `metadataPath` may be any where, the required files will be placed into the chaincode package (zipped up) before sending the package to the peer to be installed

bretharrison (Fri, 05 Oct 2018 12:19:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pDWSsu7RxhCuydHwk) @asaningmaxchain123 `metadataPath` may be any where, the required files will be placed into the chaincode package (zipped up) before sending the package to the peer to be installed. You may not want to have it under the source files for the chaincode code as it will placed into the package twice.

asaningmaxchain123 (Fri, 05 Oct 2018 12:33:53 GMT):
@bretharrison yes, i see the source code

bretharrison (Fri, 05 Oct 2018 12:39:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qvwz2NZTYKCDvyBys) @asaningmaxchain123 Which version of code are you working with ?

asaningmaxchain123 (Fri, 05 Oct 2018 12:39:54 GMT):
before i use the `1.3.0-snapshot.65`

asaningmaxchain123 (Fri, 05 Oct 2018 12:40:08 GMT):
now i use the `1.3.0-snapshot.75`

bretharrison (Fri, 05 Oct 2018 12:44:29 GMT):
Looks like we are a little out of sync ... there is a `fabric-client` at 74 and a `fabric-ca-client` at 75. We did have an issue where the `metadataPath` parameter took a little vacation. It is back now, so it should be working for the `unstable` tagged version of `fabric-client`

asaningmaxchain123 (Fri, 05 Oct 2018 12:48:22 GMT):
you are right,

asaningmaxchain123 (Fri, 05 Oct 2018 12:48:34 GMT):
the fabric-ca-client is 75 and fabric-client is 74

asaningmaxchain123 (Fri, 05 Oct 2018 12:49:19 GMT):

Clipboard - October 5, 2018 8:49 PM

jg507 (Fri, 05 Oct 2018 16:42:17 GMT):
Has joined the channel.

asaningmaxchain123 (Sat, 06 Oct 2018 01:25:01 GMT):
@bretharrison how can i use the discovery service not assign peer for endorsement when invoke transaction?

klenik (Sat, 06 Oct 2018 14:52:37 GMT):
Has joined the channel.

klenik (Sun, 07 Oct 2018 10:27:20 GMT):
Hi! I encountered a strange behavior. I installed and instantiated the marbles chaincode on mychannel. On the next run, I queried the instantiated chaincodes with the admin of a channel org from an endorsing peer of the channel from the same org. I got the result, but it was an empty list (but the installed cc query returned that it's installed). So my script tried to instantiate the cc again, and the call was successful but really quick (unlike the first time). I'm using v1.1 (haven't checked with newer versions). So it looks like the instantiation is a reentrant function (which is reasonable), but why the empty list from the query?

LevinLMKwong (Mon, 08 Oct 2018 03:57:11 GMT):
Hi guys, let say I need to get endorsements from two peers from two organisations. In SDK, do I need to switch between users to do so?

Legiit (Mon, 08 Oct 2018 05:55:32 GMT):
how do you get the private key from a user during registration and can one use this to sign proposals outside of the server, where registrations etc are done?

Legiit (Mon, 08 Oct 2018 05:55:51 GMT):
(node-sdk)

klenik (Mon, 08 Oct 2018 06:23:50 GMT):
@LevinLMKwong you don't need to switch user to submit a transaction proposal to peers in different organizations. In production, you wouldn't have access to the signing materials to other org users.

klenik (Mon, 08 Oct 2018 06:27:04 GMT):
@Legiit during a CA `register` call, you get back a secret/password for your username. With that name and secret, you can `enroll` the user with the CA, and you get back the signing material and cert.

Legiit (Mon, 08 Oct 2018 06:30:13 GMT):
So basically the ``` privateKeyPEM: enrollment.key.toBytes(), signedCertPEM: enrollment.certificate ``` Which is used with `fabricClient.createUser` after enrolling is what you can send back to the user, which he can use to sign proposals? :D @klenik

Legiit (Mon, 08 Oct 2018 06:32:04 GMT):

Clipboard - October 8, 2018 8:31 AM

klenik (Mon, 08 Oct 2018 06:32:14 GMT):
Yes. If you want to sign transactions manually/offline outside the sdk, there is a tutorial for that in the docs

Legiit (Mon, 08 Oct 2018 06:32:22 GMT):
This is my code, so I should basically send the privateKey and cert back instead of the thing I am returning now?

Legiit (Mon, 08 Oct 2018 06:32:28 GMT):
Yes I saw that tutorial :)

Legiit (Mon, 08 Oct 2018 06:32:43 GMT):
I am a little confused why the `fabricClient.createUser` is needed right now haha :P

Legiit (Mon, 08 Oct 2018 06:32:58 GMT):
as everything you need you get back from the enrollment

klenik (Mon, 08 Oct 2018 06:34:28 GMT):
The create user method sets up a user object in the sdk with the keys, so the sdk can automatically sign your transactions, no need for manual crypto stuff

UnaiUrk (Mon, 08 Oct 2018 07:09:52 GMT):
hi, how can I use admin user to create a channel?

LevinLMKwong (Mon, 08 Oct 2018 07:11:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RtsoTe6ZHEXfxHbsw) What does it mean? If I have a chaincode with endorsement policy of `AND( OrgA.Peer, OrgB.Peer)`, I have to submit proposal to both orgs, right?

klenik (Mon, 08 Oct 2018 07:25:19 GMT):
@LevinLMKwong yes, when calling `channel.sendTransactionProposal(request, timeout)`, you have to specify a peer from OrgA and a peer from OrgB in `request.targets` ([tx proposal docs](https://fabric-sdk-node.github.io/Channel.html#sendTransactionProposal__anchor), [request docs](https://fabric-sdk-node.github.io/global.html#ChaincodeInvokeRequest))

klenik (Mon, 08 Oct 2018 07:27:33 GMT):
@UnaiUrk [here](https://fabric-sdk-node.github.io/tutorial-channel-create.html) is the tutorial for creating a channel. It's a little complicated, since every org admin in the channel has to sign the transaction

LevinLMKwong (Mon, 08 Oct 2018 07:27:50 GMT):
@klenik And I can do that using any User from OrgA or OrgB?

klenik (Mon, 08 Oct 2018 07:28:54 GMT):
if your chaincode doesn't have any special requirements (user roles in the cert, etc.), I think yes

LevinLMKwong (Mon, 08 Oct 2018 07:29:40 GMT):
Thanks!:bow:

UnaiUrk (Mon, 08 Oct 2018 07:45:11 GMT):
@klenik thanks, but I have some problems with that. For example, the orderer log says that my admin user has not ADMIN roles. How can I create an admin user with admin roles?

klenik (Mon, 08 Oct 2018 07:55:25 GMT):
I think (but I'm not sure, maybe the #fabric channel is a better source) the genesis block specifies which user role should be considered as an admin principal. This is a part of my `configtx.yaml` file for a v1.1 setup (not production ready config): ``` Organizations: - &OrdererOrg Name: OrdererMSP ID: OrdererMSP MSPDir: crypto-config/ordererOrganizations/example.com/msp AdminPrincipal: Role.MEMBER - &Org0 Name: Org1MSP ID: Org1MSP MSPDir: crypto-config/peerOrganizations/org1.example.com/msp AdminPrincipal: Role.ADMIN AnchorPeers: - Host: %ORG1_PEER0_IP% Port: 7051 - &Org1 Name: Org2MSP ID: Org2MSP MSPDir: crypto-config/peerOrganizations/org2.example.com/msp AdminPrincipal: Role.ADMIN AnchorPeers: - Host: %ORG2_PEER0_IP% Port: 7051 ``` But some else should also verify this, identity management is not my strong suit

Legiit (Mon, 08 Oct 2018 08:07:58 GMT):
1 more thing :) is the enrollment secret deterministic depending on the input? If not, how is this "randomized"? I would like to generate a pub-priv keypair which I can re-generate depending on a certain secret, so that I don't have to store the privatekeys anywhere :)

Legiit (Mon, 08 Oct 2018 08:07:58 GMT):
1 more thing :) is the enrollment secret (read: pub-priv keys inside the enrollment object) deterministic depending on the input? If not, how is this "randomized"? I would like to generate a pub-priv keypair which I can re-generate depending on a certain secret, so that I don't have to store the privatekeys anywhere :)

UnaiUrki (Mon, 08 Oct 2018 08:27:54 GMT):
Has joined the channel.

UnaiUrki (Mon, 08 Oct 2018 08:28:49 GMT):
thanks @klenik, and can I set AdminPrincipal: Role.ADMIN from node SDK ?

klenik (Mon, 08 Oct 2018 08:30:51 GMT):
I think this information is contained in the orderer genesis block, so it has to be set before starting the network (or when updating it when a new org joins), so it's not a client side operation

UnaiUrki (Mon, 08 Oct 2018 08:31:10 GMT):
ok thanks!

klenik (Mon, 08 Oct 2018 08:36:35 GMT):
@Legiit I don't think it's deterministic. Is there any reason you don't want to store private keys?

Legiit (Mon, 08 Oct 2018 08:42:14 GMT):
for UX and more easy usability. & implementation wise, you don't need a top notch secure env just to handle the storage of private keys Users don't want/can't store these certificates properly (or lose them) and they won't trust a server to do it for them :) You would be able to regenerate the keypair client-sided using a simple email-pw strategy and use that to sign transactions offline and send them off to the server

Legiit (Mon, 08 Oct 2018 08:43:43 GMT):
I could maybe use the reenroll feature for this and set the amount of reenrollments. But this is limited in numbers, that's not ideal :sweat_smile:

Legiit (Mon, 08 Oct 2018 08:44:16 GMT):
if due to some bug you would hit the max reenrollments, you're basically done :P

klenik (Mon, 08 Oct 2018 08:50:01 GMT):
They still have to store the password, so why not store the private key instead? But I'm no security/crypto expert. Maybe ask around the #fabric channel for supported/suggested scenarios/best practices

Legiit (Mon, 08 Oct 2018 09:07:12 GMT):
most people have password managers or remember their password. This is nearly impossible with a private key :D That's the difference

Legiit (Mon, 08 Oct 2018 09:07:12 GMT):
most people have password managers or remember their password. You don't have a PK/Certificate manager and it's impossible to remember these :D That's the difference

UnaiUrki (Mon, 08 Oct 2018 09:21:32 GMT):
hi @klenik , I want to connect Node SDK to my fabric 1.2. It has TLS enabled, so I think that I have to pass de certs. Which certs are necesary to TLS conection fron node SDK?

midhun14 (Mon, 08 Oct 2018 10:02:00 GMT):
Can we generate custom chaincode events with hyperledger fabric 1.2?

klenik (Mon, 08 Oct 2018 10:57:36 GMT):
@Legiit The clients of a blockchain network are not the usual end users, like a client of a webshop. These clients are mainly the app servers of the organizations, and I'm sure they already have an appropriate PKI :) But this is kind of off topic for this channel @UnaiUrki take a look at [this tutorial](https://fabric-sdk-node.github.io/tutorial-network-config.html) about the common connection profile. Go to the `Loading connection profile configurations` section, and you will see an example config, which contains `tlsCACerts` entries for every peer in the `peers` section (based on the generated directory structure of the `cryptogen` tool). You need to set these for the `Peer` object to be able to verify their identity. If you want mutual TLS, take a look at [this tutorial](https://fabric-sdk-node.github.io/tutorial-mutual-tls.html) @midhun14 you can generate custom chaincode events with the [SetEvent](https://github.com/hyperledger/fabric/blob/e6d9c55b0cd556d8d92d74de57c476d393fdf5cd/core/chaincode/shim/interfaces.go#L262) chaincode stub functino

klenik (Mon, 08 Oct 2018 10:57:36 GMT):
@UnaiUrki take a look at [this tutorial](https://fabric-sdk-node.github.io/tutorial-network-config.html) about the common connection profile. Go to the `Loading connection profile configurations` section, and you will see an example config, which contains `tlsCACerts` entries for every peer in the `peers` section (based on the generated directory structure of the `cryptogen` tool). You need to set these for the `Peer` object to be able to verify their identity. If you want mutual TLS, take a look at [this tutorial](https://fabric-sdk-node.github.io/tutorial-mutual-tls.html) @midhun14 you can generate custom chaincode events with the [SetEvent](https://github.com/hyperledger/fabric/blob/e6d9c55b0cd556d8d92d74de57c476d393fdf5cd/core/chaincode/shim/interfaces.go#L262) chaincode stub function @Legiit The clients of a blockchain network are not the usual end users, like a client of a webshop. These clients are mainly the app servers of the organizations, and I'm sure they already have an appropriate PKI :) But this is kind of off topic for this channel

Legiit (Mon, 08 Oct 2018 11:12:33 GMT):
Thanks! @klenik :)

UnaiUrki (Mon, 08 Oct 2018 11:21:36 GMT):
thanks @klenik !

bretharrison (Mon, 08 Oct 2018 12:04:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GPwWXoK6e9yiNRTx7) @asaningmaxchain123 If you have initialized the channel with discovery and do not pass a `targets` list of peers when endorsing then discovery will be called to determine the target list. So if you want to use a list that you determine then create a list of peers and pass it on the endorsing call using the `targets` parameter.

UnaiUrki (Mon, 08 Oct 2018 12:05:52 GMT):
hi @klenik , have you got a example of createChannel function. It is not working for me

ShefaliMittal (Mon, 08 Oct 2018 12:12:30 GMT):
Has joined the channel.

ShefaliMittal (Mon, 08 Oct 2018 12:13:05 GMT):
Hi, Can anyone please tell me how do I paas an array of strings with other parameters via node sdk while calling chaincode and also retrieve that array in go chaincode.

klenik (Mon, 08 Oct 2018 12:19:10 GMT):
@UnaiUrki I can't put together a self-contained example right now, but [here](https://gist.github.com/aklenik/daafdaa9f3000dee77e8c5eecf8c5f35) is a pseudo code for the meantime

UnaiUrki (Mon, 08 Oct 2018 13:17:59 GMT):
you are the best! thankyou!

asaningmaxchain123 (Mon, 08 Oct 2018 13:43:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NPmYkm8SikZSaemSF) @bretharrison the discovery will filter the peer which defined in the network connection config file and own endorser feature

asaningmaxchain123 (Mon, 08 Oct 2018 13:43:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NPmYkm8SikZSaemSF) @bretharrison the discovery will filter the peer which defined in the network connection config file and own endorser feature?

bretharrison (Mon, 08 Oct 2018 14:20:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ja2jm7kS44ncsnZ26) @asaningmaxchain123 The discovery service which runs on the peer will understand the endorsement policy of the chaincode. The service will put together a list based on active peers on the network that would satisfy the endorsement policy. The NodeSDK will make a request to the discovery service when the endorsement request does not have a target list of peers.

nfrunza (Mon, 08 Oct 2018 16:57:31 GMT):
Hello SDK node, is there an API to get the chaincode source code from the fabric?

kisna (Mon, 08 Oct 2018 19:35:32 GMT):
Has joined the channel.

asaningmaxchain123 (Tue, 09 Oct 2018 00:47:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sZZuSezBkZjgNQq8m) @bretharrison thx, i got it

ashlinSajan (Tue, 09 Oct 2018 03:43:28 GMT):
Has joined the channel.

dave.enyeart (Tue, 09 Oct 2018 06:01:01 GMT):
@bretharrison @andrew-coleman could you take a look at the test failure here? https://gerrit.hyperledger.org/r/#/c/26871/

asaningmaxchain123 (Tue, 09 Oct 2018 06:21:56 GMT):
@bretharrison can you give me an example how to use the `generateCRL`

asaningmaxchain123 (Tue, 09 Oct 2018 06:21:56 GMT):
@bretharrison can you give me an example how to use the `generateCRL`,and tell me what's the difference between `enroll` and `reenroll`

kpratihast (Tue, 09 Oct 2018 06:45:53 GMT):
How do I sort on a time-stamped field while using couchdb in a get method of chaincode ?

UnaiUrki (Tue, 09 Oct 2018 07:03:20 GMT):
Hi there! I am trying to connect node SDK to my fabric, via SSL. But I get this error: ssl3_get_server_certificate:certificate verify failed. Where is the server cert?

asaningmaxchain123 (Tue, 09 Oct 2018 07:06:16 GMT):
@bretharrison @andrew-coleman ```const authentication = new _discoveryProto.AuthInfo(); authentication.setClientIdentity(signer.serialize()); const cert_hash = this._clientContext.getClientCertHash(true); if (cert_hash) { authentication.setClientTlsCertHash(cert_hash); } discovery_request.setAuthentication(authentication);``` use discovery should enable tls?

asaningmaxchain123 (Tue, 09 Oct 2018 07:06:16 GMT):
@bretharrison @andrew-coleman when i use the discovery service to get target peer, i got the following error ```error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:7051 [2018-10-09 15:07:55.898] [WARN] Helper - [DiscoveryEndorsementHandler]: _endorse_group_member >> G1:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:7051 error[2018-10-09 15:07:58.903] [WARN] Helper - : [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051 [DiscoveryEndorsementHandler]: _endorse_group_member >> G1:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051 error[2018-10-09 15:08:01.911] [WARN] Helper - : [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org2.example.com:7051 [DiscoveryEndorsementHandler]: _endorse_group_member >> G2:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://peer0.org2.example.com:7051 error[2018-10-09 15:08:04.916] [WARN] Helper - : [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer1.org2.example.com:7051 [DiscoveryEndorsementHandler]: _endorse_group_member >> G2:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://peer1.org2.example.com:7051 [2018-10-09 15:08:04.920] [ERROR] chaincode - undefined [2018-10-09 15:08:04.922] [ERROR] chaincode - Failed to invoke chaincode. cause:Error: Failed to connect before the deadline URL:grpcs://peer1.org2.example.com:7051···

nkl199 (Tue, 09 Oct 2018 08:27:40 GMT):
@dave.enyeart the failure in https://gerrit.hyperledger.org/r/#/c/26871/ is within the java chaincode instantiation - we will need @rameshthoomu to re-run that build in sandbox mode to get the full debug peer logs. 50p bet is that it can't find the correct tagged javaenv module ...

UnaiUrki (Tue, 09 Oct 2018 09:15:15 GMT):
Hi there! I am trying to connect node SDK to my fabric, via SSL. But I get this error: ssl3_get_server_certificate:certificate verify failed. Where is the server cert? and why is setTlsClientCertAndKey giving an error? It says that is not a function...

bretharrison (Tue, 09 Oct 2018 12:49:54 GMT):
The peer is not at the address shown, maybe running on the same box with a docker compose and therefore the NodeSDK application sees the peers as localhost not peer1.org1.example.com. You must use the request setting `asLocalhost: true` when initializing the channel. This will translate all host addresses that discovery presents as localhost, however it will not change the ports, therefore all port addresses mapped in the docker compose file must be the same value internally and externally. The discovery service running on the peer sees itself and other peers with the virtual addresses from within the container.

bretharrison (Tue, 09 Oct 2018 12:50:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7CtP6599wgeT6R63x) @asaningmaxchain123 The peer is not at the address shown, maybe running on the same box with a docker compose and therefore the NodeSDK application sees the peers as localhost not peer1.org1.example.com. You must use the request setting `asLocalhost: true` when initializing the channel. This will translate all host addresses that discovery presents as localhost, however it will not change the ports, therefore all port addresses mapped in the docker compose file must be the same value internally and externally. The discovery service running on the peer sees itself and other peers with the virtual addresses from within the container.

bretharrison (Tue, 09 Oct 2018 12:56:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rx4msjeKkNRMTQtif) @dave.enyeart There is an issue with the Java chaincode, it will not instantiate.

bretharrison (Tue, 09 Oct 2018 12:57:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dXuWFEw8EPBPo2DGZ) @nfrunza No, You may wish to open a JIRA, this sounds like an useful function.

asaningmaxchain123 (Tue, 09 Oct 2018 14:05:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bzosj9CWYXhygP74E) @bretharrison can you tell me the source code where the sdk process the address?

asaningmaxchain123 (Tue, 09 Oct 2018 14:05:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bzosj9CWYXhygP74E) @bretharrison i try it , but can you tell me the source code where the sdk process the address?

asaningmaxchain123 (Tue, 09 Oct 2018 14:05:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bzosj9CWYXhygP74E) @bretharrison i try it , but can you tell me the source code where the sdk process the address when i use the discovery service?

asaningmaxchain123 (Tue, 09 Oct 2018 14:11:52 GMT):
@bretharrison @andrew-coleman the sdk support page for invoke method `IdentityService.getAll`

asaningmaxchain123 (Tue, 09 Oct 2018 14:25:14 GMT):
@bretharrison i don't use the tls but it give me following error

asaningmaxchain123 (Tue, 09 Oct 2018 14:25:16 GMT):
```E1009 22:24:41.751168000 140735879402368 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E1009 22:24:41.752646000 140735879402368 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E1009 22:24:42.753071000 140735879402368 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E1009 22:24:42.754772000 140735879402368 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E1009 22:24:44.075801000 140735879402368 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E1009 22:24:44.472760000 140735879402368 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. error[2018-10-09 22:24:44.751] [WARN] Helper - : [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051 [DiscoveryEndorsementHandler]: _endorse_group_member >> G0:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://localhost:7051 [2018-10-09 22:24:44.752] [ERROR] chaincode - undefined [2018-10-09 22:24:44.752] [ERROR] chaincode - Failed to invoke chaincode. cause:Error: Failed to connect before the deadline URL:grpcs://localhost:7051```

asaningmaxchain123 (Tue, 09 Oct 2018 14:28:33 GMT):
however when i enable tls,it does works

asaningmaxchain123 (Tue, 09 Oct 2018 14:31:35 GMT):
but in the channel #fabric-gossip i ask @yacovm , he tell me it doesn't need

yacovm (Tue, 09 Oct 2018 14:36:11 GMT):
but you're trying to connect with grpcs

yacovm (Tue, 09 Oct 2018 14:36:17 GMT):
so you are trying to connect with TLS

yacovm (Tue, 09 Oct 2018 14:36:37 GMT):
if the peer doesn't run TLS then you can't connect to it with TLS!

asaningmaxchain123 (Tue, 09 Oct 2018 14:50:15 GMT):
@yacovm wait a moment , i make a check

nfrunza (Tue, 09 Oct 2018 14:52:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KFTPBTxxNcXQCkeaB) @bretharrison thank you, i'll create one

bretharrison (Tue, 09 Oct 2018 14:58:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=k8KwwigDvCZB6razK) @asaningmaxchain123 see https://fabric-sdk-node.github.io/tutorial-discovery.html look for `discovery-protocol` a new setting to control the protocol of the discovered peers. The discovery service does not indicate the protocol, only the host and port, the new config setting indicates to the NodeSDK the protocol to use when building connections to the discovered peers.

bretharrison (Tue, 09 Oct 2018 14:58:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=k8KwwigDvCZB6razK) @asaningmaxchain123 see https://fabric-sdk-node.github.io/tutorial-discovery.html look for `discovery-protocol` a new setting to control the protocol of the discovered peers. The discovery service does not indicate the protocol, only the host and port, the new config setting indicates to the NodeSDK the protocol to use when building connections to the discovered peers. The default is 'grpcs'.

nfrunza (Tue, 09 Oct 2018 15:04:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PTzXNoBAPoSCbjHgd) thank you, added jira https://jira.hyperledger.org/browse/FABN-965

asaningmaxchain123 (Tue, 09 Oct 2018 15:09:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=agEWfECt62odnL55s) @bretharrison in the sdk v1.3, i see the network connection config file,it doesn't include the discover role.https://github.com/hyperledger/fabric-sdk-node/blob/47bcae320974c4373110bcc1cae4a08c2d7c9bd1/test/fixtures/network.yaml#L93

asaningmaxchain123 (Tue, 09 Oct 2018 15:09:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=agEWfECt62odnL55s) @bretharrison i try it, in the sdk v1.3, i see the network connection config file,it doesn't include the discover role.https://github.com/hyperledger/fabric-sdk-node/blob/47bcae320974c4373110bcc1cae4a08c2d7c9bd1/test/fixtures/network.yaml#L93

asaningmaxchain123 (Tue, 09 Oct 2018 15:12:23 GMT):
@bretharrison it doesn't work,can you take a look

asaningmaxchain123 (Tue, 09 Oct 2018 15:12:56 GMT):

Clipboard - October 9, 2018 11:12 PM

asaningmaxchain123 (Tue, 09 Oct 2018 15:14:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bzosj9CWYXhygP74E) @bretharrison can you tell me where the sdk source code use the `asLocation` properties

asaningmaxchain123 (Tue, 09 Oct 2018 15:20:52 GMT):

Clipboard - October 9, 2018 11:20 PM

asaningmaxchain123 (Tue, 09 Oct 2018 15:20:52 GMT):
@bretharrison i find it

asaningmaxchain123 (Tue, 09 Oct 2018 15:51:46 GMT):
@bretharrison how can i enable sdk logging , i want to see the full log

asaningmaxchain123 (Tue, 09 Oct 2018 15:51:46 GMT):
@bretharrison how can i enable sdk logging , i want to see the full log?

EyeBeam (Tue, 09 Oct 2018 16:01:44 GMT):
Has joined the channel.

EyeBeam (Tue, 09 Oct 2018 16:03:10 GMT):
while using the node sdk .. fabric-client 1.1 , I’m loading a `client-profile.json` with a path to hfc-key-store .. then I’m creating a user and setting him in the context like this ```const _fabricClient = FABRIC_CLIENT.loadFromConfig(clientConfig); await _fabricClient.initCredentialStores(); const respBody = await getEnrollmentCertificate(); const enrollment = respBody.enrollment; memberUser = await _fabricClient.createUser( { username: userId, mspid: respBody.mspid, cryptoContent: { privateKeyPEM: enrollment.signingIdentity.privateKey, signedCertPEM: enrollment.identity.certificate, }, skipPersistence: true, }); } await _fabricClient.setUserContext(memberUser, true);``` it still creates the *.priv and* .pub keys under hfc-key-store and persists the user .. bug? User-error? every run creates a new set of priv/pub files..

EyeBeam (Tue, 09 Oct 2018 16:04:11 GMT):
@bretharrison .. thoughts? ^^

bretharrison (Tue, 09 Oct 2018 16:41:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WJXv5MdqisYnpzCCy) @asaningmaxchain123 `export HFC_LOGGING='{"debug":"console"}'`

asaningmaxchain123 (Tue, 09 Oct 2018 16:44:16 GMT):
thx , it works

rameshthoomu (Tue, 09 Oct 2018 20:31:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4PBD2Hd6ZtPkrF4i7) @nkl199 this issue is fixed now.. javaenv images are missing in fabric-sdk-node release-1.3 branch..

mmick (Tue, 09 Oct 2018 20:32:48 GMT):
Hey guys! i wanted to know what are the pluses when using fabric sdk node or go sdk Then using composer framework?

mmick (Tue, 09 Oct 2018 20:33:18 GMT):
Does it makes much difference or What do you guys feel? Thanks!

UnaiUrki (Wed, 10 Oct 2018 08:03:21 GMT):
Hi, does anyone know why the 'setTlsClientCertAndKey' and 'addTlsClientCertAndKey' are not working?

UnaiUrki (Wed, 10 Oct 2018 08:14:10 GMT):
Log says that they are not a function

UnaiUrki (Wed, 10 Oct 2018 08:14:34 GMT):
Its another way to pass de certs for creating an orderer?

chaitanya (Wed, 10 Oct 2018 08:43:04 GMT):
Has joined the channel.

chaitanya (Wed, 10 Oct 2018 08:49:54 GMT):
Hi everyone, Is there someway for me to extract chaincode name and input arguments from the block using NodeSDK? I've been able to parse out timestamp, blocknumber, channelID but can't find the chaincodeName and input arguments. Is there someone who's tried this?

krabradosty (Wed, 10 Oct 2018 09:31:35 GMT):
Hello! I'm getting familiar Service Discovery feature. In nodejs SDK documentation I see the following statement: "The handler then sends all the request out at once. If any of the request fail the handler will select another peer from the group list" Am I right that SD doesn't distinguish expected fails (like client certificate didn't pass the attributes check) and unexpected (peer ledger is outdated)? Hence SD will resend proposal to another peers in any case?

klenik (Wed, 10 Oct 2018 10:09:09 GMT):
@chaitanya I think by default you receive filtered block events, but you can opt-in also for unfiltered data, maybe that'll contain it

UnaiUrki (Wed, 10 Oct 2018 11:06:07 GMT):
Hi @klenik setTlsClientCertAndKey is giving me a error

UnaiUrki (Wed, 10 Oct 2018 11:06:17 GMT):
it says that is not a function

davidkel (Wed, 10 Oct 2018 11:09:05 GMT):
@UnaiUrki which object are you trying to invoke these methods on ?

klenik (Wed, 10 Oct 2018 11:09:10 GMT):
Check that the installed sdk version supports it. I think it's a recent feature, like 1.2 or 1.3

UnaiUrki (Wed, 10 Oct 2018 11:14:41 GMT):
fabric-client

Tipuch (Wed, 10 Oct 2018 11:59:54 GMT):
Has joined the channel.

Tipuch (Wed, 10 Oct 2018 12:10:59 GMT):
Hello, I've setup an hyperledger fabric network and everything seems to work, I've a very simple chaincode installed and instantiated, and I can write on the ledger via the chaincode via the node sdk but when I try to read I get a permission denied error from grpc network directly, no error logs from the peer and when invoking the same chaincode function from cli it works without a problem.

Tipuch (Wed, 10 Oct 2018 12:11:48 GMT):
I think my user doesn't have the proper rights (hence the permission denied error) but I don't understand which rights he should have / doesn't have and I don't understand why the user can write but not read.

Tipuch (Wed, 10 Oct 2018 12:17:40 GMT):
it's one consortium, one organization, one msp, one channel

alejandrolr (Wed, 10 Oct 2018 12:50:38 GMT):
Hi people! I cannot find the fabric-ca-client node SDK documentation, has it disappeared?

alejandrolr (Wed, 10 Oct 2018 12:52:10 GMT):
It used to be here: https://fabric-sdk-node.github.io

alejandrolr (Wed, 10 Oct 2018 12:52:52 GMT):
I mean the register, enroll, ... methods

UnaiUrki (Wed, 10 Oct 2018 13:33:50 GMT):
@klenik yes, I have the latest. I think that when I use setTlsClientCertAndKey(clientCert, clientKey), one of those parameters is wrong. ClientCert has to be string and clientKey has to be Array.. So, I have to parse de cert to Array of bytes? And, which are the cert I have to put there? I generate them with cryptogen

UnaiUrki (Wed, 10 Oct 2018 13:35:53 GMT):
@davidkel Im using fabric-client, I create a client with var client = new Fabric_Client(); function

klenik (Wed, 10 Oct 2018 13:46:30 GMT):
@UnaiUrki it's a good question, I always get lost in the crypto dir. @nkl199 could you clarify this for us maybe?

davidkel (Wed, 10 Oct 2018 13:47:57 GMT):
@UnaiUrki just to confirm you don't reference latest in your package.json. You do reference a specific release such as `^1.2.0` ?

davidkel (Wed, 10 Oct 2018 13:48:56 GMT):
Also you don't get get a `not a function` error for incorrect parameter. So also check you have the method name correct case wise as well

davidkel (Wed, 10 Oct 2018 13:48:56 GMT):
Also you don't get a `not a function` error for incorrect parameter. So also check you have the method name correct case wise as well

UnaiUrki (Wed, 10 Oct 2018 14:01:43 GMT):
Finally, I delete all the packages and I reinstall all, maybe there is something wrong on the installation. Now the setTlsClientCertAndKey works, but Handshake failed with fatal error SSL_ERROR_SSL fails. Im going to try with another cert. Thanks a lot @davidkel and @klenik

chaitanya (Wed, 10 Oct 2018 15:10:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FJsMotFjCBM433Wx2) @klenik @klenik Thanks, could you also tell me how I could opt-in for unfiltered data? I only see some RegistrationOpts for the `registerBlockEvent` method here: https://fabric-sdk-node.github.io/ChannelEventHub.html#registerBlockEvent__anchor

chaitanya (Wed, 10 Oct 2018 15:10:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FJsMotFjCBM433Wx2) @klenik Thanks, could you also tell me how I could opt-in for unfiltered data? I only see some RegistrationOpts for the `registerBlockEvent` method here: https://fabric-sdk-node.github.io/ChannelEventHub.html#registerBlockEvent__anchor

klenik (Wed, 10 Oct 2018 15:47:09 GMT):
@chaitanya Requesting unfiltered block has to be set on the channel event hub level, when you connect. connect: https://fabric-sdk-node.github.io/ChannelEventHub.html#connect__anchor options: https://fabric-sdk-node.github.io/global.html#ConnectOptions

AndreiLovin (Thu, 11 Oct 2018 08:21:06 GMT):
Has joined the channel.

AndreiLovin (Thu, 11 Oct 2018 08:31:37 GMT):
Hello, I've been trying to integrate a NodeJS application to my Fabric network. I'm using the following sample https://github.com/olegabu/fabric-starter-rest. The problem is that I'm receiving the following errors while I'm trying to register a user: JWT=`(curl -d '{"username":"user1","password":"pass"}' --header "Content-Type: application/json" http://localhost:3000/users | tr -d '"')` echo $JWT fabric-ca request register failed with errors [[{\code\:0,\message\:\Registration of 'user1' failed in affiliation validation: Failed getting affiliation 'manager': : scode: 404, code: 63, msg: Failed to get Affiliation: sql: no rows in result set\}]] The CA Logs are: ca.Config: &{Version:1.3.0-rc1 Cfg:{Identities:{AllowRemove:false} Affiliations:{AllowRemove:false}} CA:{Name:ca-manager Keyfile:/etc/hyperledger/fabric-ca-server-config/d7eb2855ec763f3f07071111797926920c1900c42b00f564a5aa27e6fbfd2a79_sk Certfile:/etc/hyperledger/fabric-ca-server-config/ca.manager.test.com-cert.pem Chainfile:/etc/hyperledger/fabric-ca-server/ca-chain.pem} Signing:0xc4205411f0 CSR:{CN:ca.manager.test.com Names:[{C:US ST:North Carolina L: O:Hyperledger OU:Fabric SerialNumber:}] Hosts:[ae9e461c2d7f localhost] KeyRequest:0xc42054e260 CA:0xc420519fe0 SerialNumber:} Registry:{MaxEnrollments:-1 Identities:[{ Name:**** Pass:**** Type:client Affiliation: MaxEnrollments:0 Attrs:map[hf.Registrar.Roles:* hf.Registrar.DelegateRoles:* hf.Revoker:1 hf.IntermediateCA:1 hf.GenCRL:1 hf.Registrar.Attributes:* hf.AffiliationMgr:1] }]} Affiliations:map[org1:[department1 department2] org2:[department1]] LDAP:{ Enabled:false URL:ldap://****:****@:/ UserFilter:(uid=%s) GroupFilter:(memberUid=%s) Attribute:{[uid member] [{ }] map[groups:[{ }]]} TLS:{false [] { }} } DB:{ Type:sqlite3 Datasource:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db TLS:{false [] { }} } CSP:0xc4205184a0 Client: Intermediate:{ParentServer:{ URL: CAName: } TLS:{Enabled:false CertFiles:[] Client:{KeyFile: CertFile:}} Enrollment:{ Name: Secret:**** CAName: AttrReqs:[] Profile: Label: CSR: Type:x509 }} CRL:{Expiry:24h0m0s} Idemix:{IssuerPublicKeyfile:/etc/hyperledger/fabric-ca-server/IssuerPublicKey IssuerSecretKeyfile:/etc/hyperledger/fabric-ca-server/msp/keystore/IssuerSecretKey RevocationPublicKeyfile:/etc/hyperledger/fabric-ca-server/IssuerRevocationPublicKey RevocationPrivateKeyfile:/etc/hyperledger/fabric-ca-server/msp/keystore/IssuerRevocationPrivateKey RHPoolSize:1000 NonceExpiration:15s NonceSweepInterval:15m}} 2018/10/10 14:08:34 [DEBUG] DB: Getting identity user1 2018/10/10 14:08:34 [INFO] 172.21.0.1:59522 POST /api/v1/enroll 401 23 "Failed to get user: : scode: 404, code: 63, msg: Failed to get User: sql: no rows in result set" 2018/10/10 14:08:34 [DEBUG] Received request for /api/v1/register 2018/10/10 14:08:34 [DEBUG] Caller is using a x509 certificate 2018/10/10 14:08:34 [INFO] 172.21.0.1:59524 POST /api/v1/register 401 26 "Untrusted certificate: Failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.manager.test.com")"

Hangyu (Thu, 11 Oct 2018 09:38:13 GMT):
Hello, I am now using nodesdk(v1.2) to make invoking transactions to fabric network(v1.2) , the invoking seems successful and blocks are committed fine, only when the sdk tries to get the block event from peer, here comes the authentication error from peer side: ``` deduplicate -> ERRO d33\u001B[0m Principal deserialization failure (the supplied identity is not valid: x509: certificate signed by unknown authority) for identity ``` from the error itself, it indicates that the certificate is not signed by the known organization, but there is only one organization in the network, and the invoking works fine. So, I am confused, has anyone encountered the same problem? Did the certificate somehow get malformed in the eventhub?

qubing (Thu, 11 Oct 2018 14:52:59 GMT):
Hello, Anyone upgraded from 1.2.1 to v1.2.2? client.newEventHub removed. I tried to use channel.newChannelEventHub, but can not get payload from event returned.

qubing (Thu, 11 Oct 2018 14:55:16 GMT):
Anyone knows this change? I could not find it in changelogs from github.com.

klenik (Thu, 11 Oct 2018 14:58:16 GMT):
@Hangyu since Fabric v1.1, the network-level event hub connection is deprecated, and since recently (in v1.3 for sure) it's completely removed I think. As for why you don't get event payload, see my previous message in this channel from yesterday

klenik (Thu, 11 Oct 2018 14:58:16 GMT):
@qubing since Fabric v1.1, the network-level event hub connection is deprecated, and since recently (in v1.3 for sure) it's completely removed I think. As for why you don't get event payload, see my previous message in this channel from yesterday

klenik (Thu, 11 Oct 2018 14:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nNwo6GBLnpsLH58gj) @Hangyu found it quickly

klenik (Thu, 11 Oct 2018 14:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nNwo6GBLnpsLH58gj) @qubing found it quickly

qubing (Thu, 11 Oct 2018 15:03:57 GMT):
@klenik can you provide some guides about upgrade from 1.2.1 to 1.2.2? Where can I get the detailed changelist in 1.2.2?

qubing (Thu, 11 Oct 2018 15:28:56 GMT):
@klenik I found 1.3 just released. I found this feature in changelog of 1.3. I will try to upgrade, thank you very much.

qubing (Thu, 11 Oct 2018 15:29:41 GMT):
Anyone encountered the same problem, please refer the doc. https://fabric-sdk-node.github.io/tutorial-channel-events.html

qubing (Thu, 11 Oct 2018 15:34:06 GMT):
to get payload from event, need to use `eventhub.connect(true)` :grinning:

tahaf10 (Fri, 12 Oct 2018 06:29:05 GMT):
Can someone please help me out with this? https://stackoverflow.com/questions/52773529/hyperledger-fabric-nodejs-sdk-eventhub-has-been-shutdown

klenik (Fri, 12 Oct 2018 10:09:46 GMT):
@tahaf10 If I understand correctly, your network is deployed to the cloud. What's the topology of the network? Are they distributed on multiple VMs? I've run into these errors myself under high load with weak VMs. Remarks: - unless you're using Fabric v1.0, consider using the `ChannelEventHub` instead of the deprecated (and from Fabric v1.3 completely removed) `EventHub`. Usage is the same, but you can access it through the `Channel` object's [method](https://fabric-sdk-node.github.io/Channel.html#getChannelEventHub__anchor) - It's good practice to register the event handler first, then send the transaction to the orderer. - **Most important:** connection to an eventhub is NOT a lightweight process. Your issue is probably that you connect/disconnect for every transaction. Keep the eventhub connection open towards the peer node, and treat is as any connection resource (like a DB access)

atirekg (Fri, 12 Oct 2018 10:22:50 GMT):
Has joined the channel.

atirekg (Fri, 12 Oct 2018 10:24:39 GMT):
Guys, anyone please share some example code to add affiliation

atirekg (Fri, 12 Oct 2018 10:37:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aB5gEsbq9pcnNKBpi) @klenik When was it depreceted?

atirekg (Fri, 12 Oct 2018 10:37:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aB5gEsbq9pcnNKBpi) @klenik When was it deprecated?

atirekg (Fri, 12 Oct 2018 10:37:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aB5gEsbq9pcnNKBpi) @klenik When was it deprecated?

klenik (Fri, 12 Oct 2018 10:44:18 GMT):
@atirekg Since v1.1 it is marked as deprecated, and since the recent 1.3 release it is completely removed Affiliation: you can set it (and optionally a role) when [registering](https://github.com/hyperledger/fabric-sdk-node/blob/release-1.3/fabric-ca-client/lib/FabricCAClient.js#L93-L107) the user via the CA: ``` let secret = await ca.register({ enrollmentID: 'someClientName', affiliation: 'org1.department1', role: 'romeRole' }, adminUserObject); ```

atirekg (Fri, 12 Oct 2018 10:49:59 GMT):
@klenik - deprecated - ok Affiliation: this is to register user to the affiliation, I need sample for adding new affiliation to the CA Say I have affiliation org1.department1 and org1.department2 now if I want to add org1.department3 then how can I do this

atirekg (Fri, 12 Oct 2018 10:49:59 GMT):
@klenik - deprecated - ok Affiliation: this is to register user to the affiliation, I need sample for adding new affiliation to the CA Say I have affiliation org1.department1 and org1.department2 now if I want to add org1.department3 then how can I do this?

tahaf10 (Fri, 12 Oct 2018 10:51:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aB5gEsbq9pcnNKBpi) @klenik My network is deployed on IBM Clouds Blockchain Platform. I don't know about the specs of these machines and whether they're distributed on multiples VMs or not. I think I should consider your most important point because I AM making new connections every time.

klenik (Fri, 12 Oct 2018 10:54:11 GMT):
@atirekg well, my guess is that it's a CA side operation, and not the responsibility of the SDK. At least I don't know about an SDK API that does that, but maybe I'm wrong. You should take a look at the docs of the CA solution you're using

atirekg (Fri, 12 Oct 2018 10:55:07 GMT):
I have checked the doc

atirekg (Fri, 12 Oct 2018 10:55:07 GMT):
I have checked the doc and get this link https://fabric-sdk-node.github.io/AffiliationService.html But not getting how to use it

klenik (Fri, 12 Oct 2018 10:59:32 GMT):
Ah, I'm not familiar with that API, but I'll play around with it. In the meantime hopefully someone can answer your question

atirekg (Fri, 12 Oct 2018 12:01:13 GMT):
sure thanks

deenario (Fri, 12 Oct 2018 12:36:53 GMT):
Has joined the channel.

knagware9 (Fri, 12 Oct 2018 13:14:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Xp2f94YW6EmDtHyeZ) @atirekg @klenik try this

knagware9 (Fri, 12 Oct 2018 13:14:53 GMT):
var admins = hfc.getConfigSetting('admins'); let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret}); if(adminUserObj.getAffiliation() != userOrg.toLowerCase()){ logger.info('Admin affiliation not registered. Registering now.'); adminUserObj.setAffiliation(userOrg.toLowerCase()); adminUserObj.setRoles(['peer','orderer','client','user']); adminUserObj = await client.setUserContext(adminUserObj); } logger.info('Admin User: %s', adminUserObj); // Register and enroll the user let caClient = client.getCertificateAuthority(); let affiliation = userOrg.toLowerCase() + '.department1'; // Check if organization exists const affiliationService = caClient.newAffiliationService(); const registeredAffiliations = await affiliationService.getAll(adminUserObj); if(!registeredAffiliations.result.affiliations.some(x => x.name == userOrg.toLowerCase())){ logger.info('Register the new affiliation: %s ', affiliation); await affiliationService.create({name: affiliation, force: true}, adminUserObj); }

atirekg (Fri, 12 Oct 2018 13:16:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3FiwmqgZgqMGAvumn) @knagware9 Thanks trying this

atirekg (Fri, 12 Oct 2018 15:00:19 GMT):
@knagware9 - Hi tell me more about hfc.getConfigSetting('admins'); here hfc is different from fabric-client?

atirekg (Fri, 12 Oct 2018 15:00:19 GMT):
@knagware9 - Hi tell me more about hfc.getConfigSetting('admins'); here hfc is different from fabric-client? I am getting this error TypeError: Cannot read property '0' of undefined for var admins = Fabric_Client.getConfigSetting('admins');

atirekg (Fri, 12 Oct 2018 15:00:19 GMT):
@knagware9 - Hi tell me more about hfc.getConfigSetting('admins'); here hfc is different from fabric-client? I am getting this error TypeError: Cannot read property '0' of undefined for var Fabric_Client = require('fabric-client'); var admins = Fabric_Client.getConfigSetting('admins');

atirekg (Fri, 12 Oct 2018 15:03:45 GMT):
var Fabric_Client = require('fabric-client');

httran88 (Sat, 13 Oct 2018 00:09:24 GMT):
Has joined the channel.

davidkhala (Mon, 15 Oct 2018 10:38:03 GMT):
@bretharrison Hi Bret, I see a statement in `metadata-chaincode.md` saying ```'META-INF' should not be included in your local directory structure.``` What does it means? What will happened if there is a directory naming `META-INF` under `chaincodePath` ?

gumnaaaaam (Mon, 15 Oct 2018 10:48:28 GMT):
How chaincode is instantiated? I have read during instantiation, it uses the ccenv fabric images to instantiate, this process also uses internet. Why is instantiation uses internet, and if it is using what does it look for, some urls? if yes, please provide me the link.

Taaanos (Mon, 15 Oct 2018 12:58:33 GMT):
Has joined the channel.

Taaanos (Mon, 15 Oct 2018 13:00:50 GMT):
Hey all Is there anyone working on an SDK for devices?

MohammadObaid (Mon, 15 Oct 2018 16:58:15 GMT):
@gumnaaaaam I am not 100% sure but if you are using node js chaincode then it fetches shim library for node js https://github.com/hyperledger/fabric-samples/blob/release-1.3/balance-transfer/artifacts/src/github.com/example_cc/node/example_cc.js#L7 since node_module folder is not mounted in ccenv container so it will require to download that package to execute transaction .

siva.a (Mon, 15 Oct 2018 17:41:26 GMT):
Has joined the channel.

caveman7 (Mon, 15 Oct 2018 23:03:29 GMT):
@gumnaaaaam it will try to reach an npm registry (by default the public registry: registry.npmjs.org) as it will run the command npm install to download dependencies.

bretharrison (Tue, 16 Oct 2018 04:40:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FD76ex5FZPkQ4Yx8n) @davidkhala I dont think it will actually hurt anything, however it will be copied twice into the chaincode package, once for source and once for meta-data

bretharrison (Tue, 16 Oct 2018 04:42:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qeu5AY7hAtQXJg5bd) @MohammadObaid And any other packages called out in the chaincode's package.json

davidkhala (Tue, 16 Oct 2018 07:33:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qDWWxbyWMaTmKXsHp) @bretharrison Then if we have `META-INF` directory already under `chaincodePath`, could we skip setting ```metadataPath: metadata_path, // notice this is the new attribute of the request``` in request, assuming the packager could recognize it implicitly.

davidkhala (Tue, 16 Oct 2018 07:33:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qDWWxbyWMaTmKXsHp) @bretharrison Then if we have `META-INF` directory already under `chaincodePath`, could we skip setting ```metadataPath: metadata_path, // notice this is the new attribute of the request``` in request, assuming the packager could recognize it implicitly?

davidkhala (Tue, 16 Oct 2018 08:02:07 GMT):
@bretharrison I did a test for it, the json file under `META-INF` of local directory seems to not be recognized without setting `metadataPath` in request.

hyperlearner (Tue, 16 Oct 2018 10:44:25 GMT):
Can anyone tell me how to package and sign a chaincode ?

DeepaMotwani (Tue, 16 Oct 2018 11:41:13 GMT):
Has joined the channel.

DeepaMotwani (Tue, 16 Oct 2018 11:41:52 GMT):
i am getting error as "cannot find module fabric-contract-api" while instantiating chaincode

Nihcep (Tue, 16 Oct 2018 12:13:30 GMT):
Has joined the channel.

Nihcep (Tue, 16 Oct 2018 12:16:21 GMT):
Hi everyone, I'm trying to use `channel.queryInfo()` but go an error `No identity has been assigned to this client` any idea ? (I call `client.loadFromConfig('org1.yaml')` and `client.initCredentialStores()` before)

rthatcher (Tue, 16 Oct 2018 12:57:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rXwaRNKh89NfKwgnR) @DeepaMotwani there is a 'conversation' on this subject going on in the #fabric-chaincode-dev channel

Nihcep (Tue, 16 Oct 2018 13:02:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XRcanvB9h5z64wSwf) Done, It was about promise

ArianStef (Tue, 16 Oct 2018 13:48:50 GMT):
Hi! Where I can find some documentation about CPU usage for node SDK appliation? I am using a client code similar to invoke.js from fabcar example. I am sending 10 transactions together and each node code use a maximum of 44% CPU (in a machine 4 core). Why this SDK is so heavy? Is there an optimization that I can do? Thank you

Ferrymania (Tue, 16 Oct 2018 13:49:56 GMT):
Hi,guys in

billchen (Tue, 16 Oct 2018 13:52:34 GMT):
Has joined the channel.

Ferrymania (Tue, 16 Oct 2018 13:52:40 GMT):
Hi ,guys I meet same problem in the question https://stackoverflow.com/questions/52481715/channeleventhub-with-multiple-rapid-request-hyperledger-fabric-node-sdk *ChannelEventHub with multiple rapid request (hyperledger fabric node SDK)* ``` I running into "ChannelEventHub has been shutdown" error when I am trying to send quickly transaction proposal one after another to my node SDK backend. I am aware that this is the error thrown through the error callback of ChannelEventHub. I was wondering how you guys handle multiple quick request and listen to registerTxEvent. Solved: Creating a instance at every request ``` what does it mean Creating a instance at every request?

billchen (Tue, 16 Oct 2018 13:55:11 GMT):
Hey, does anyone know if there are resources to implement Peer channel-based event services (introduced in fabric 1.3) with the node-sdk?

Nihcep (Tue, 16 Oct 2018 13:58:03 GMT):
@billchen https://fabric-sdk-node.github.io/tutorial-channel-events.html

blakem (Tue, 16 Oct 2018 14:10:47 GMT):
Has joined the channel.

blakem (Tue, 16 Oct 2018 14:14:47 GMT):
I am currently adapting my fabric network to a new fabric-ca network and am trying to get the node sdk to work with the new network. I have been able to enroll a user, however, upon trying to invoke to the network I get the error ```error: [Client.js]: Channel not found for name mychannel. ``` Upon going into the peers and running "peer channel list" I see that the peers are indeed connected to the channel "mychannel" Any advice on this area would be greatly appreciated.

Nihcep (Tue, 16 Oct 2018 14:15:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3nJvr25bCFSbNKkdd) @blakem Is your channel declared on your network config file ?

atirekg (Tue, 16 Oct 2018 14:56:45 GMT):
Guys anyone know anything about this error `npm ERR! code EINTEGRITY npm ERR! sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA== integrity checksum failed when using sha512: wanted sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA== but got sha512-lvczS6LfK0CVXC3NI1wppXAi18dmoguEWJYyoiFurfV7ccE2ouOUZRBdSAOhob5rxI+NMPyzXHTiBYw96TVV6w==. (1436 bytes)`

atirekg (Tue, 16 Oct 2018 14:56:45 GMT):
Guys anyone know anything about this error `npm ERR! code EINTEGRITY` `npm ERR! sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA== integrity checksum failed when using sha512: wanted sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA== but got sha512-lvczS6LfK0CVXC3NI1wppXAi18dmoguEWJYyoiFurfV7ccE2ouOUZRBdSAOhob5rxI+NMPyzXHTiBYw96TVV6w==. (1436 bytes)`

atirekg (Tue, 16 Oct 2018 14:56:45 GMT):
Guys anyone know anything about this error `npm ERR! code EINTEGRITY` `npm ERR! sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA== integrity checksum failed when using sha512: wanted sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA== but got sha512-lvczS6LfK0CVXC3NI1wppXAi18dmoguEWJYyoiFurfV7ccE2ouOUZRBdSAOhob5rxI+NMPyzXHTiBYw96TVV6w==. (1436 bytes)` tried `npm cache clean --force` `npm cache verify` to solve it but no luck also tried upgrading npm version `npm i -g npm` tried `npm cache clean --force` as well

atirekg (Tue, 16 Oct 2018 14:57:37 GMT):
tried `npm cache clean --force` `npm cache verify` to solve it but no luck

atirekg (Tue, 16 Oct 2018 14:59:24 GMT):
also tried upgrading npm version `npm i -g npm`

atirekg (Tue, 16 Oct 2018 15:01:40 GMT):
tried `npm cache clean --force` as well

anillewis (Tue, 16 Oct 2018 15:02:47 GMT):
Team.. a question on the version of fabric-client...how do I know which version to use for hyperledger fabric v1.2... in the npm site I see 1.2.0-snapshot.79 but this also tagged with unstable-1.2.... how do I select the correct fabric client version for the underlying fabric environment?

atirekg (Tue, 16 Oct 2018 15:03:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kT9MRcyhywHQ5QHes) @anillewis I guess current version release is 1.3.0

anillewis (Tue, 16 Oct 2018 15:05:59 GMT):
@atirekg so I can use a higher fabric client version with a lower fabric environment?

atirekg (Tue, 16 Oct 2018 15:06:25 GMT):
they will conflict I guess

atirekg (Tue, 16 Oct 2018 15:06:32 GMT):
at some points

atirekg (Tue, 16 Oct 2018 15:06:59 GMT):
you know how to check fabric client version on fabric environment

atirekg (Tue, 16 Oct 2018 15:07:42 GMT):
you can use fabric-client 1.2.2

atirekg (Tue, 16 Oct 2018 15:07:42 GMT):
you can use fabric-client 1.2.2 it was stable

anillewis (Tue, 16 Oct 2018 15:09:45 GMT):
@atirekg but i do not see this version in the tagged version

anillewis (Tue, 16 Oct 2018 15:10:02 GMT):
1.3.0 latest 1.4.0-snapshot.76 unstable 1.1.0-snapshot.103 unstable-1.1 1.2.0-snapshot.79 unstable-1.2 1.0.8 latest-1.0 1.1.2 latest-1.1 1.0.2-snapshot.12 unstable-1.0 1.3.0-snapshot.74 unstable-1.3

blakem (Tue, 16 Oct 2018 15:10:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dYQgWpFqcLN4KHGH7) @Nihcep @Nihcep thank you very much, such an easy fix but one that I could not find.

atirekg (Tue, 16 Oct 2018 15:14:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uBB82qjc7YdGJqRTv) @anillewis where are you checking it

anillewis (Tue, 16 Oct 2018 15:16:11 GMT):
@atirekg in https://www.npmjs.com/package/fabric-client under versions tab

atirekg (Tue, 16 Oct 2018 15:18:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Np5iWqTox86Bx8c6o) @anillewis It is there in version history

atirekg (Tue, 16 Oct 2018 15:18:52 GMT):
I am using this version right now

atirekg (Tue, 16 Oct 2018 15:18:52 GMT):
I am using this version right now and trying to upgrade to 1.3.0

atirekg (Tue, 16 Oct 2018 15:20:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ea7jD9AMEJQ9paeZd) got it solved by `npm install --update-binary --no-shrinkwrap`

atirekg (Tue, 16 Oct 2018 15:21:08 GMT):
Guys, anyone upgraded fabric client version 1.2 to 1.3 ?

anillewis (Tue, 16 Oct 2018 15:22:51 GMT):
@atirekg but not in the current tagged versions right

anillewis (Tue, 16 Oct 2018 15:26:49 GMT):
@atirekg also when we installed 1.2.2 and ran the npm audit command...the output was to use fabric client 1.3.0

anillewis (Tue, 16 Oct 2018 15:28:20 GMT):
@atirekg this is the output of the npm audit command

anillewis (Tue, 16 Oct 2018 15:28:22 GMT):
# Run npm install fabric-client@1.3.0 to resolve 2 vulnerabilities ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Low │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ deep-extend │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ fabric-client │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ fabric-client > grpc > node-pre-gyp > rc > deep-extend │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://nodesecurity.io/advisories/612 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Moderate │ Out-of-bounds Read │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ stringstream │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ fabric-client │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ fabric-client > grpc > node-pre-gyp > request > stringstream │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://nodesecurity.io/advisories/664 │ └───────────────┴──────────────────────────────────────────────────────────────┘

atirekg (Tue, 16 Oct 2018 15:38:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xWReWwhErvaD3ftGY) @anillewis yes, but don't have so much knowledge in this

blakem (Tue, 16 Oct 2018 19:47:49 GMT):
I am having an issue where after attempting to invoke invoke a change to the blockchain, I am getting an error ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed ``` Any help with this error by pointing me in the right direction would be greatly appreciated.

blakem (Tue, 16 Oct 2018 19:48:37 GMT):
I am doing this from my rest server that was previously worked with my fabric network. I am now trying to make it work with a fabric-ca network.

jrosmith (Tue, 16 Oct 2018 19:57:14 GMT):
@blakem you are not able to connect to the peer, 14 unavailable typically means the peer itself is not running

jrosmith (Tue, 16 Oct 2018 19:57:14 GMT):
@blakem you are not able to connect to the peer, when i've seen 14 unavailable ive found that the peer itself is not running

blakem (Tue, 16 Oct 2018 20:37:28 GMT):
@jrosmith Thanks for the input, though I do not think that is it as I can see the peer containers running upon running docker ps and can enter them. For some reason they can't connect, I think it may have to do with having the correct cert paths in the config file, though I am not sure as I have not found an example for node sdk with fabric-ca. It would make sense that if the peer was not running that you would get the same error, just for a different reason than what I have I believe.

rameshthoomu (Wed, 17 Oct 2018 03:41:27 GMT):
@andrew-coleman @davidkhala I see sdk-node builds are failing consistently in CI.. Could you please check https://jenkins.hyperledger.org/view/fabric-sdk-node/job/fabric-sdk-node8-verify-release-1.3-x86_64/13/consoleFull

dexhunter (Wed, 17 Oct 2018 05:46:44 GMT):
Has joined the channel.

dexhunter (Wed, 17 Oct 2018 05:47:58 GMT):
Hi! I was wondering how do I specify the private key path with nodesdk? I am following `balance-transfer` tutorial while all the public & private keys are stored in one place, I want to move the private key somewhere else, is it possible? Thanks in advance!

dexhunter (Wed, 17 Oct 2018 05:56:32 GMT):
@EyeBeam Hi! Any updates on your issue?

dexhunter (Wed, 17 Oct 2018 07:57:46 GMT):
Hi! Is there an example for storing all certificates to counchDB with fabric-sdk-node? Thank you!

Legiit (Wed, 17 Oct 2018 14:02:41 GMT):
Is there a way to sign transactions with the user's private key (pem file??) without using offline transactions?

yuki-kon (Wed, 17 Oct 2018 22:26:57 GMT):
Hello, maintainers. I submitted a CR to update anchor peers with fabric-sdk-node in samples/balance-transfer. Could you have a review? https://gerrit.hyperledger.org/r/#/c/26956/

LevinLMKwong (Thu, 18 Oct 2018 05:30:19 GMT):
Hi all, is there any documentation on network-config.yaml? I am quite confused about the peers setting in different sections.

Taffies (Thu, 18 Oct 2018 06:56:00 GMT):
Hello, I'm currently trying to invoke a transaction that requires multiple endorsers in the endorsement policy. Is it required that in the common configuration profile, I would need to write all the relevant peers & their IP addresses? Is there any way I am able to using multiple endorsers from different orgs without putting them in the common configuration profile? I have tried removing the peers from the profile, and my invoke fails due to endorsement policy failure. Just wondering if there is a workaround around this.

Taffies (Thu, 18 Oct 2018 07:37:26 GMT):
Also, I have trying to use multiple orderers (in my common connection profile). If my first orderer is down, my channeleventhub shuts down and produces an error, even if my second orderer is up and the invoke is successful. Does anyone know of a solution to this?

Taffies (Thu, 18 Oct 2018 07:37:26 GMT):
Also, I have trying to use multiple orderers (in my common connection profile). If my first orderer is down, my channeleventhub shuts down and produces an error, even if my second orderer is up and the invoke is successful. Does anyone know of a solution to this? This is similar to this problem: https://lists.hyperledger.org/g/fabric/message/4635

tchataigner (Thu, 18 Oct 2018 15:32:41 GMT):
Has joined the channel.

davidkhala (Fri, 19 Oct 2018 02:02:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vNRqj5uM6znLNWBvH) @rameshthoomu @andrew-coleman Looks there are nodejs chaincode instantiate failures, any idea with node-chaincode recent change?

davidkhala (Fri, 19 Oct 2018 02:07:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cmQeW9ERzJCsaBHAu) @yuki-kon Great mind think alike. I also provide a sample in fabric-sdk-node/test/integration/e2e/updateAnchorPeers.js, do you think it can be merged into Channel.js?

davidkhala (Fri, 19 Oct 2018 02:13:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TMGCF9bv2qX2qX8va) @dexhunter take care of the the `CryptoKeyStore` in `CryptoSuite`, we could get rid of the priv, pubkey cache storage

dexhunter (Fri, 19 Oct 2018 04:50:30 GMT):
@davidkhala Hi! Thank you for the reply. Another questions is that is it possible to move a user from node A to node B without moving the pub/priv key? Thanks again.

davidkhala (Fri, 19 Oct 2018 05:02:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yc7puZDxkoh88CCCe) @dexhunter But at first Fabric User does not have to bound to any node.

dexhunter (Fri, 19 Oct 2018 05:09:04 GMT):
@davidkhala Sorry but I am confused. So supposing there is a user1 created on node A with the sdk , how do I get access of it on node B?

davidkhala (Fri, 19 Oct 2018 05:14:02 GMT):
So your `node` means an machine instance?

dexhunter (Fri, 19 Oct 2018 05:20:07 GMT):
@davidkhala yep

dexhunter (Fri, 19 Oct 2018 05:21:09 GMT):
or a container (but we treat as distributed networks

davidkhala (Fri, 19 Oct 2018 05:28:45 GMT):
if you refer a `peer` as `node`, then the Fabric User is not created in peer.

davidkhala (Fri, 19 Oct 2018 05:28:45 GMT):
the Fabric User is not created in peer.

dexhunter (Fri, 19 Oct 2018 06:19:21 GMT):
Hmm.. I know the user and peer are different. But the user couldn't be moved to another node without credentials, is that right? @davidkhala

zhaochy (Fri, 19 Oct 2018 06:29:46 GMT):
@dexhunter it is possible to sign transaction offline now

zhaochy (Fri, 19 Oct 2018 06:30:32 GMT):
please see the Epic https://jira.hyperledger.org/browse/FABN-895

zhaochy (Fri, 19 Oct 2018 06:31:19 GMT):
you can move private key anywhere else now.

davidkhala (Fri, 19 Oct 2018 07:45:23 GMT):
@zhaochy Agree, I think for that purpose we could refactor some function to be stateless, or at least only signer/user is required

dexhunter (Fri, 19 Oct 2018 08:45:46 GMT):
@davidkhala @zhaochy I see. Thank you very much!

Nihcep (Fri, 19 Oct 2018 09:00:39 GMT):
Hi, got a problem using getBlockByHash(), I convert hash from string to bytearray but Hyperledger seem to not find it

Nihcep (Fri, 19 Oct 2018 09:01:14 GMT):

SdkHash.png

Nihcep (Fri, 19 Oct 2018 09:02:07 GMT):
The first box is for response from queryBlock(0), the second one is the error message from queryBlockByHash

Nihcep (Fri, 19 Oct 2018 09:02:11 GMT):
Any idea about that ?

davidkhala (Fri, 19 Oct 2018 09:10:15 GMT):
I remember data_hash is not for queryBlockByHash, could you try by using queryBlock(1). previous_hash

Nihcep (Fri, 19 Oct 2018 09:14:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qp9CJsAmwDCxAS9nG) @davidkhala That was it !

Nihcep (Fri, 19 Oct 2018 09:14:17 GMT):
Thank you

Legiit (Fri, 19 Oct 2018 09:37:40 GMT):
Where does `const certPem = '';` and ` const privateKeyPEM = '';` Come from when signing transactions offline? https://fabric-sdk-node.github.io/tutorial-sign-transaction-offline.html

Legiit (Fri, 19 Oct 2018 09:38:11 GMT):
how do we retreive these 2 PEMs? I get an access denied error when I try to sign using the enrollment certificates (privateKeyPEM and signedCertPEM)

Legiit (Fri, 19 Oct 2018 11:12:23 GMT):
anyone an idea?

davidkel (Fri, 19 Oct 2018 11:33:44 GMT):
@davidkhala saw CR https://gerrit.hyperledger.org/r/#/c/27105/ does that help with FABN-956 ?

davidkel (Fri, 19 Oct 2018 11:33:44 GMT):
@davidkhala saw CR https://gerrit.hyperledger.org/r/#/c/27105/ does that help with FABN-956 ? assuming you are the submitter of course ?

angelsuarez (Fri, 19 Oct 2018 12:21:46 GMT):
Has joined the channel.

angelsuarez (Fri, 19 Oct 2018 16:58:04 GMT):
Hello, I am looking at balance-transfer example. While sending the API call that creates a channel I've got this error back.

angelsuarez (Fri, 19 Oct 2018 16:58:27 GMT):
hyperledger/fabric-samples/balance-transfer/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node: undefined symbol: SSL_library_init

angelsuarez (Fri, 19 Oct 2018 16:59:25 GMT):
I have found of links that did not help

angelsuarez (Fri, 19 Oct 2018 16:59:48 GMT):
has anyone come across this issue before? thank in advanced

yuki-kon (Fri, 19 Oct 2018 17:11:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=k3JHh5PDwLG45hWvf) @davidkhala @davidkhala Thank you for your comment. I think updating anchor peer is application’s role.

WouterVanHecke (Fri, 19 Oct 2018 18:50:21 GMT):
Has joined the channel.

WouterVanHecke (Fri, 19 Oct 2018 18:50:27 GMT):
Got some problems creating my proposal and singing my offline transaction. I'm saving the PEM strings of a newly registered user in a seperate mongoDB, when I want to invoke a function, I'm getting the pem string of that specific user. I'm creating an unsigned proposal to send to the peer, with this proposel, I have to send my certificate. I'm getting the next error, and yes, I'm sure I registered the user. ``` 2018-10-19 18:33:54.485 UTC [protoutils] ValidateProposalMessage -> WARN 046 channel [mychannel]: creator's signature over the proposal is not valid: could not determine the validity of the signature: Failed verifing with opts []: Invalid S. Must be smaller than half the order [84298445310729447882992216053185201901884850364806608846154393282849943336833][57896044605178124381348723474703786764998477612067880171211129530534256022184]. ``` I'm using version 1.3 for the offline transaction signing, but I'm not sure what I have to do with the cryptoStore and so on and how I get this working. Thanks!

knagware9 (Sat, 20 Oct 2018 15:06:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ezu8zNmrgDwNLLdsq) @angelsuarez do npm rebuild grpc

davidkhala (Mon, 22 Oct 2018 03:40:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gZkJRuhrt33MR2Zh2) @davidkel hi dave, I think we can simply change it via https://gerrit.hyperledger.org/r/#/c/27144/

davidkhala (Mon, 22 Oct 2018 03:42:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pjHBJBMLSMPKD3R3s) @yuki-kon sure, would it be helpful we named a new function like `updateAnchorPeer` but actually do similar stuff as `updateChannel`

khetesh (Mon, 22 Oct 2018 06:48:50 GMT):
Has joined the channel.

khetesh (Mon, 22 Oct 2018 06:50:50 GMT):
hello guys i am struggling with this problem NOt able to propose transaction proposal in fabric netweork Please help me with this TypeError: Cannot read property 'curve' of undefined at Object.KEYUTIL.getKey (/home/kheteshr/Downloads/smob-node/supplychain_BK/node_modules/fabric-client/node_modules/jsrsasign/lib/jsrsasign.js:247:10379) at CryptoSuite_ECDSA_AES.getKey (/home/kheteshr/Downloads/smob-node/supplychain_BK/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:204:27) at Failed to order the transaction. Error code: undefined

DheerajBalodia (Mon, 22 Oct 2018 07:40:27 GMT):
Has joined the channel.

MohitYadav2317 (Mon, 22 Oct 2018 07:41:22 GMT):
Hi Everyone, i have a use case, we have two assets order and package and order contains reference to packages, so while retrieving history of particular order, how i can resolve the reference, what should be the ideal approach for resolving and retrieving order history along with package data at that particular time in history

davidkhala (Mon, 22 Oct 2018 08:20:00 GMT):
@MohitYadav2317 the question should appear at #fabric channel , but in my opinion, you could design system powered by `stub.GetHistoryForKey`

angelsuarez (Mon, 22 Oct 2018 08:22:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=r7FjfWg8PpnEoCigf) @knagware9 Hi, thanks for the suggestion. That did not work. I've got the same error.

angelsuarez (Mon, 22 Oct 2018 08:22:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=r7FjfWg8PpnEoCigf) @knagware9 Hi, thanks for the suggestion. That did not work. I've got the same error. I am using node version 8.10.0, balance-transfer 1.3.0-rc1 and go1.11 linux/amd64

craigliu (Mon, 22 Oct 2018 08:28:10 GMT):
Has joined the channel.

MohitYadav2317 (Mon, 22 Oct 2018 08:29:05 GMT):
@davidkhala i tried GetHistoryForKey stub method but it returns the data containing references of package, my question is how can i resolve this reference, for example if my order was placed and at time t1 the world state of order with orderid 1 was {orderNumber: 1, packageId: 'pkg1', status: 'NEW'} and value package was {id: 'pkg1', name: 'package new'}, now at time t2 if pkg1 value changes to {id: 'pkg1', name: 'package updated'} then at time t3 > t2 i will be getting history like [{orderNumber: 1, packageId: 'pkg1', status: 'NEW'} ] and if i query for pkg1 i will get value of it as {id: 'pkg1', name: 'package updated'} and i can resolve it to make something like [{orderNumber: 1, package: {id: 'pkg1', name: 'package updated'}, status: 'NEW'} ] but in reality i should be getting [{orderNumber: 1, package: {id: 'pkg1', name: 'package new'}, status: 'NEW'} ] so my basic question is how do i get correct history with the referenced values

knagware9 (Mon, 22 Oct 2018 09:30:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HBNhGYJxAsJ7KJs4v) @angelsuarez okay...but here isssue with grpc module ,,try to install grpc using npm

davidkhala (Mon, 22 Oct 2018 10:01:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jCm8mumA2u5A5pEpa) @MohitYadav2317 I am confused. but could we GetHistoryForKey(pkg1)?

deenario (Mon, 22 Oct 2018 10:58:16 GMT):
Hey after 49 successfully post insertions i get this error from my fab clien Using NodeJs SDK

deenario (Mon, 22 Oct 2018 10:58:18 GMT):
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed at new createStatusError (/home/danyal/Blockchain/fabcar-ibmcloud/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15) at /home/danyal/Blockchain/fabcar-ibmcloud/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15

deenario (Mon, 22 Oct 2018 11:00:29 GMT):
Even if i am send 10 post requests i can only send them 5 times. ( 1 transaction is dropped)

deenario (Mon, 22 Oct 2018 11:00:51 GMT):
When i restart my nodeJS app. I can again send 49 transactions and the rest drops.

rmaurer (Mon, 22 Oct 2018 13:11:13 GMT):
Has joined the channel.

Nihcep (Mon, 22 Oct 2018 13:34:30 GMT):
Hi, got an error using `client.getChannel()`, code return ` Error: 2 UNKNOWN: access denied: channel [hto] creator org [Org1MSP]` and peer logs display :

Nihcep (Mon, 22 Oct 2018 13:34:42 GMT):

Channel.png

Nihcep (Mon, 22 Oct 2018 13:34:49 GMT):
Any idea ? Thank you

Nihcep (Mon, 22 Oct 2018 14:04:19 GMT):
Resolved, I had to enroll admin using `fabricCAClient.enroll` how ever, it is weird because `getUserContext` worked even before

Taffies (Tue, 23 Oct 2018 03:08:45 GMT):
Hi, my event hub keeps getting a timeout when the first orderer in my common connection profile fails, even if the other orderers are successful. Does anyone have a workaround around this problem?

Taffies (Tue, 23 Oct 2018 03:08:45 GMT):
Hi, my event hub keeps getting a timeout when the first orderer in my common connection profile fails, even if the other orderers are successful. Does anyone have a workaround around this problem? https://lists.hyperledger.org/g/fabric/message/4635

Taffies (Tue, 23 Oct 2018 04:07:02 GMT):
does channel event hub require orderer?

GowriR (Tue, 23 Oct 2018 05:15:44 GMT):
Has joined the channel.

GowriR (Tue, 23 Oct 2018 05:20:14 GMT):
Hello, Experts. I am having a problem joining the channel. I have 3 orgs and a peer in each org. I have restructured my code and it can be found at https://github.com/sahirvsahirv/hypledpoc. Why using the channel.getGenesisBlock(orderername) before joining the channel. I get the following error - > error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND

GowriR (Tue, 23 Oct 2018 05:20:14 GMT):
Hello, Experts. I am having a problem joining the channel. I have 3 orgs and a peer in each org. I have restructured my code and it can be found at https://github.com/sahirvsahirv/hypledpoc. While using the channel.getGenesisBlock(orderername) before joining the channel. I get the following error - > error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND

GowriR (Tue, 23 Oct 2018 05:21:27 GMT):
And also if i try "peer channel fetch newest -o orderer.acme.com:7050 -c mychannel, I get the following error

GowriR (Tue, 23 Oct 2018 05:21:29 GMT):
2018-10-20 12:43:51.367 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-10-20 12:43:51.376 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-10-20 12:43:51.377 UTC [grpc] Printf -> DEBU 003 transport: http2Client.notifyError got notified that the client transport was broken write tcp 172.21.0.2:39092->172.21.0.5:7050: write: broken pipe. Error: failed to create deliver client: rpc error: code = Unavailable desc = transport: write tcp 172.21.0.2:39092->172.21.0.5:7050: write: broken pipe

GowriR (Tue, 23 Oct 2018 05:21:42 GMT):
Any idea on how to resolve this please?

deenario (Tue, 23 Oct 2018 07:42:58 GMT):
I have successfully deployed my network on the IBM starter cloud platform. Now i want to move towards the enterprise plan. I Already have its connection profile. The problem is the fabcar-network enroll admin worked perfectly with the starter plan but its not working with the enterprise plan. Does anyone know what i have to change or do in order to fix this ?

deenario (Tue, 23 Oct 2018 07:43:26 GMT):
$ node enrollAdminNetwork.js Found organization: PeerOrg1 and ca name: fabric-ca-peerorg1-20300a Enrolling using enrollmentId: undefined and EnrollmentSecret: undefined Failed to enroll admin: Error: Illegal arguments: "checkPersistence" is truthy but "name" is not a valid string value

nnikka (Tue, 23 Oct 2018 09:52:24 GMT):
Has joined the channel.

nnikka (Tue, 23 Oct 2018 09:53:30 GMT):
Can anyone help me in this? https://stackoverflow.com/questions/52927032/how-certificates-get-derived-from-the-real-fabric-ca-server-certificate-in-hfc-k?fbclid=IwAR1aZNVg-mT08Th4mnzXE_g9c3YYmtVIFuIlz6o67iCwwO2FPn_Qc34PwpU

nnikka (Tue, 23 Oct 2018 09:54:35 GMT):
I am trying to answer this questions really long time but with no luck

nnikka (Tue, 23 Oct 2018 10:15:04 GMT):
Is anyone here ?

GowriR (Tue, 23 Oct 2018 11:18:19 GMT):
Hi all the const channel = client.getChannel(channelName, true); The true option does not throw an error if the channel is not created

GowriR (Tue, 23 Oct 2018 11:18:35 GMT):
Is this a bug or is there any other way to identify it?

nnikka (Tue, 23 Oct 2018 12:10:10 GMT):
Hello ? Is anyone here who can answer technical questions ?

MuhammedHafil (Tue, 23 Oct 2018 12:47:55 GMT):
Has joined the channel.

MuhammedHafil (Tue, 23 Oct 2018 12:48:09 GMT):
how can i set endorsement policy while instantiating with fabric node sdk?

OmarShekriladze (Tue, 23 Oct 2018 13:03:32 GMT):
Has joined the channel.

OmarShekriladze (Tue, 23 Oct 2018 13:06:52 GMT):
Hello I have simple question about certificates. How certificates are used in Hyperledger Fabric network? I have certificates in hfc_key_store, fabric_ca_server also saves certificates. so how they are used, I am interested in flow. I mean I sign transaction and send, so why I need certificate under hfc_key_store?

AndreiLovin (Tue, 23 Oct 2018 13:57:05 GMT):
Here's an interesting situation... I've deployed a Fabric network over two machines and I'm able to query and invoke transaction through cli. I'm also using a NodeJS app with which I can query the network but can't invoke. This error appears whenever I invoke from the NodeJS app: "Failed to connect before the deadline". The logs from the node app: [Remote.js]: Error: Failed to connect before the deadline error: [Orderer.js]: Orderer grpcs://orderer.test.com:7050 has an error Error: Failed to connect before the deadline Any ideea what's wrong? PS the containers are all running

titog (Tue, 23 Oct 2018 14:14:12 GMT):
Has joined the channel.

jrosmith (Tue, 23 Oct 2018 16:48:35 GMT):
@AndreiLovin it sounds like the rest of the network is communicating fine but your app is failing to communicate with the services. have you double checked your network config to make sure its pointing to the appropriate servers and certs? also are there any logs on the peer/orderers that might give more color to the specific reason why the app was not able to connect?

Taffies (Wed, 24 Oct 2018 06:36:23 GMT):
Hi, is there a best or recommended practice when it comes to securing the common connection profile (config.yaml)? Right now all the urls & tlscerts of all the peers are there in plaintext, would there be an alternate way to this??

DeepakMP (Wed, 24 Oct 2018 06:56:53 GMT):
Has joined the channel.

DeepakMP (Wed, 24 Oct 2018 06:57:34 GMT):
Hi, I'm having a difficult time installing node sdk on my macOS Sierra 10.12.6

DeepakMP (Wed, 24 Oct 2018 06:57:57 GMT):
Deepaks-MacBook-Air:sdknode deepak$ node -v v8.11.4 Deepaks-MacBook-Air:sdknode deepak$ npm -v 5.6.0

DeepakMP (Wed, 24 Oct 2018 06:58:24 GMT):
npm install -g hfc

DeepakMP (Wed, 24 Oct 2018 07:07:23 GMT):
gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Darwin 16.7.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/hfc/node_modules/grpc/src/node/extension_binary/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/lib/node_modules/hfc/node_modules/grpc/src/node/extension_binary" gyp ERR! cwd /usr/local/lib/node_modules/hfc/node_modules/grpc gyp ERR! node -v v8.11.4 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/hfc/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/hfc/node_modules/grpc/src/node/extension_binary' (1) node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/hfc/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) node-pre-gyp ERR! System Darwin 16.7.0 node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/hfc/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /usr/local/lib/node_modules/hfc/node_modules/grpc node-pre-gyp ERR! node -v v8.11.4 node-pre-gyp ERR! node-pre-gyp -v v0.6.29 node-pre-gyp ERR! not ok Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/hfc/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/hfc/node_modules/grpc/src/node/extension_binary' (1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! grpc@1.0.0 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the grpc@1.0.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in:

yigitpolat (Wed, 24 Oct 2018 08:27:23 GMT):
Has joined the channel.

yigitpolat (Wed, 24 Oct 2018 08:36:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xkntDRHGJY7xsJvWx) @DeepakMP im using "grpc": "^1.6.0" and i do not get error

yigitpolat (Wed, 24 Oct 2018 08:36:15 GMT):
i am using "grpc": "^1.6.0" and dont get errors

yigitpolat (Wed, 24 Oct 2018 08:41:25 GMT):
Hello everybody ! I just enabled TLS on my network. I am trying to do query on my peer. I know I have to add ConnectionOpts as a parameter next to my URL. var peer = fabric_client.newPeer('grpc://localhost:7051', connectionOpts ); I am adding it as const connectionOpts = { pem: peerPem }; but still having error on handshake. Do you guys know which pem document I need to give as reference? Thank you in advance

yigitpolat (Wed, 24 Oct 2018 08:42:12 GMT):
I forgot to mentioned I changed grpc to grpcs

DeepakMP (Wed, 24 Oct 2018 08:52:56 GMT):
Any body understand this instantiate call error from node sdk?

DeepakMP (Wed, 24 Oct 2018 08:52:56 GMT):
[2018-10-24 08:51:23.006] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Error: Invalid network confi guration due to missing configuration data

caveman7 (Wed, 24 Oct 2018 09:14:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qSPDX9nNaWy8mKTfM) @DeepakMP should be ```npm install fabric-client``` not sure why you want to install it globally though (the -g)

caveman7 (Wed, 24 Oct 2018 09:17:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HwfmHGZrXaXaeu6fP) @yigitpolat you need to use gprcs instead of grpc. if you're using cryptogen, for the peer it should be in peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem

caveman7 (Wed, 24 Oct 2018 09:17:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HwfmHGZrXaXaeu6fP) @yigitpolat you need to use gprcs instead of grpc. if you're using cryptogen, for the peer it should be in ```peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem```

caveman7 (Wed, 24 Oct 2018 09:17:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HwfmHGZrXaXaeu6fP) @yigitpolat you need to use gprcs instead of grpc. if you're using cryptogen, for the peer it should be in ```peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem```don't forget to override the sslHostname

DeepakMP (Wed, 24 Oct 2018 09:34:00 GMT):
Error: Failed to instantiate. cause:Error: Invalid policy, missing t he "identities" property

DeepakMP (Wed, 24 Oct 2018 09:39:10 GMT):
2018-10-24 09:38:37.894] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:20367) UnhandledPromiseRejectionWarning: Error: Failed to instantiate. cause:Failed to send Proposal and rece ive all good ProposalResponse

DeepakMP (Wed, 24 Oct 2018 09:39:42 GMT):
I'm having trouble instantiating a chaincode that uses a private collection.

DeepakMP (Wed, 24 Oct 2018 09:39:53 GMT):
Would sincerely appreciate help. I'm using node sdk.

UnaiUrki (Wed, 24 Oct 2018 10:29:02 GMT):
Hello everybody, Im trying to create a channel fron Node SDK, one more time. I have the fabric_client user created and I use the setAdminSigningIdentity function to set admin certs that I have in my fabric network, then I pass the server root cert to de orderer to connect by gprsc. But I have an error in my log and I dont understand why: Cannot read property 'toArray' of null. Whats wrong with that?

yigitpolat (Wed, 24 Oct 2018 10:40:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5oRrwy95gQSsyKtR4) @caveman7 Caveman, first of all thank you for your answer. I have done what you have said. My code as following; const serverCert = fs.readFileSync('/Users/yigit/Documents/first-network/config/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem', 'utf8'); const peer = fabric_client.newPeer('grpcs://localhost:7051', { pem: serverCert, 'ssl-target-name-override': 'peer0.org1.example.com' }); channel.addPeer(peer); However, still getting Handshake failed with fatal error SSL_ERROR_SSL As in https://hyperledger-fabric.readthedocs.io/en/release-1.3/enable_tls.html mentioned, do I need to add peer.tls.clientAuthRequired / peer.tls.clientRootCAs.files variables?

DeepakMP (Wed, 24 Oct 2018 11:34:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2notcdKHaw68bQHLQ) @UnaiUrki This is coding/logical error. Please look at how your variables and values are transforming from raw input to this stage. If possible test each step in a seperate environment such as Jupyter notebook running Nodejs kernel. Keep in mind things like last and first elements of arrays, data types, capitals/lower cases, zero divisions, so on. @UnaiUrki

UnaiUrki (Wed, 24 Oct 2018 12:49:29 GMT):
@DeepakMP Hi, thanks for your answer. I think that the error maybe is in de cert conding. How i have to cast them? I make Buffer.from(...).toString().. but I dont know if Im doing it ok.

Chandoo (Wed, 24 Oct 2018 14:35:50 GMT):
Has joined the channel.

cagdast (Thu, 25 Oct 2018 08:08:31 GMT):
Has joined the channel.

DeepakMP (Thu, 25 Oct 2018 09:06:45 GMT):
I'm trying to create or load a marbles private collection example using or that uses the node sdk. I'm not finding any good repositories or examples. The fabric-sdk-node.github.io is not as helpful as fabric documentation. ANyone can help me find a working demo (i need api access thus node sdk and I need private collections working, thus marbles)- anything else similar would also help.

j.rosa (Thu, 25 Oct 2018 09:49:14 GMT):
Has joined the channel.

j.rosa (Thu, 25 Oct 2018 10:12:26 GMT):
Hello, I am testing the sdk node of hyperledger fabric, specifically with the balance-transfer folder of fabric-samples and it does not allow me to instantiate chaincode divided into different parts, I can only install chaincodes that are programmed in a single file. when I try to instantiate the chaincode formed by several files, the error that comes out of the console is that the packages are not within the GOPATH or GOROOT variable, but when I see where these variables are, I can not access them because the GOPATH variable is in a route in which I do not have permissions and does not let me give them, and the variable GOROOT has a route that does not even exist. And even if I change the value of the routes for these variables, I do not get anything. Does anyone know what to do to be able to instantiate chaincodes structured in different files?

j.rosa (Thu, 25 Oct 2018 10:12:51 GMT):

Pregunta.jpg

ShashankMotepalli (Thu, 25 Oct 2018 10:26:23 GMT):
Has joined the channel.

GowriR (Thu, 25 Oct 2018 10:46:21 GMT):
How do I use client.loadfromConfig - the tutorial is not clear. Is there any other documentation or blog that explains the same. My purpose is to have peers from multiple orgs join the channel. With one org it worked by putting the client section in the main file. How do I managing loading of the client with peers from multiple orgs?

GowriR (Thu, 25 Oct 2018 10:46:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qnwKYDDigBT7y4ynL) How do I use client.loadfromConfig - the tutorial is not clear. Is there any other documentation or blog that explains the same. My purpose is to have peers from multiple orgs join the channel. With one org it worked by putting the client section in the main file. How do I manage loading of the client with peers from multiple orgs?

DeepakMP (Thu, 25 Oct 2018 11:49:13 GMT):
` ``` ``` ``[2018-10-25 17:14:25.175] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-10-25 17:14:25.175] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-10-25 17:14:25.175] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse [2018-10-25 17:14:25.175] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:98965) UnhandledPromiseRejectionWarning: Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse at Object.instantiateChaincode (/Users/deepak/Desktop/Project/blockchain/attempt6/fabric-samples/balance-transfer/app/instantiate-chaincode.js:200:9)`` `` ` ``` ``` anybody understands this? I'm sending marbles chaincode to be instantiated, but I'm not able to.

DeepakMP (Thu, 25 Oct 2018 11:49:23 GMT):
I've replaced the chaincode in balance-transfer example with that of marbles from first-network. Haven't changed anything else, including the name of the chaincode file- it remains as example_cc.go. Why am I not able to instantiate? Can anyone help me?

DeepakMP (Thu, 25 Oct 2018 11:53:11 GMT):
sorry, this is the instantiate error log: [2018-10-25 17:14:25.175] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-10-25 17:14:25.175] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-10-25 17:14:25.175] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse [2018-10-25 17:14:25.175] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:98965) UnhandledPromiseRejectionWarning: Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse at Object.instantiateChaincode (/Users/deepak/Desktop/Project/blockchain/attempt6/fabric-samples/balance-transfer/app/instantiate-chaincode.js:200:9) at (node:98965) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:98965) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code

dave.enyeart (Thu, 25 Oct 2018 12:00:35 GMT):
@bretharrison Any ideas? Can the message "Failed to send Proposal and receive all good ProposalResponse" be improved to indicate whether the error was within the send or due to a bad response or due to N responses not matching

dave.enyeart (Thu, 25 Oct 2018 12:00:35 GMT):
@bretharrison Any ideas? Can the message "Failed to send Proposal and receive all good ProposalResponse" be improved to indicate whether the error was within the send or due to a bad response or due to N responses not matching. Also to indicate the underlying error in PropopsalResponse so that people don't have to add code to print out the error (either in the SDK code itself or in all the samples)

dave.enyeart (Thu, 25 Oct 2018 12:02:59 GMT):
Also could you point DeepakMP to a private data instantiate example, even if it's within an SDK integration test

DeepakMP (Thu, 25 Oct 2018 12:06:32 GMT):
I installed the following lines between the `await channel.sendInstantiateProposal(request, 60000)` and ``: ` logger.debug('\n\n============ Proposal & results as follows ============\n'); logger.debug('Proposal: '+proposal) logger.debug('ProposalResponses: '+ proposalResponses) logger.debug('\n\n============ Proposal & results concluded ============\n'); `

DeepakMP (Thu, 25 Oct 2018 12:06:46 GMT):
The following were the results:

DeepakMP (Thu, 25 Oct 2018 12:06:48 GMT):
============ Proposal & results as follows ============ [2018-10-25 17:34:23.084] [DEBUG] instantiate-chaincode - Proposal: .protos.Proposal [2018-10-25 17:34:23.084] [DEBUG] instantiate-chaincode - ProposalResponses: Error: as V1_2 or later capability is not enabled, private channel collections and data are not available,Error: as V1_2 or later capability is not enabled, private channel collections and data are not available [2018-10-25 17:34:23.085] [DEBUG] instantiate-chaincode - ============ Proposal & results concluded ============

DeepakMP (Thu, 25 Oct 2018 12:08:14 GMT):
So I think balance transfer might be referring to an older set of images (not sure why though as I pulled everything using, `curl -sSL http://bit.ly/2ysbOFE | bash -s 1.3.0 1.3.0 0.4.13`.

dave.enyeart (Thu, 25 Oct 2018 12:08:21 GMT):
that indicates you need to set capability as here:https://github.com/hyperledger/fabric-samples/blob/release-1.3/first-network/configtx.yaml#L154-L160

dave.enyeart (Thu, 25 Oct 2018 12:08:37 GMT):
it is a config thing, not an image thing

DeepakMP (Thu, 25 Oct 2018 12:08:51 GMT):
`Proposal: .protos.Proposal` not sure what this means.

DeepakMP (Thu, 25 Oct 2018 12:09:00 GMT):
Yes @dave.enyeart trying that now.

AndreiLovin (Thu, 25 Oct 2018 12:09:04 GMT):
Hello, is there any good nodejs rest library that I could install over my multi-host fabric network. I've been through all the available samples you can find online but they aren't really made to be expandable. The best thing I could find is this https://github.com/olegabu/fabric-starter-rest. But even with that solution I hit a brick wall where no one in the community can help... (My network work great I just need a good starting point for the NodeJS app)

ShashankMotepalli (Thu, 25 Oct 2018 12:14:13 GMT):
On successful proposal, when I sent to orderer, I got : Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (4148 vs. 15)

DeepakMP (Thu, 25 Oct 2018 12:21:37 GMT):
I've inserted the following in `/balance-transfer/artifacts/channel/configtx.yaml`: Capabilities: Channel: &ChannelCapabilities V1_3: true Orderer: &OrdererCapabilities V1_3: true Application: &ApplicationCapabilities V1_3: true V1_2: false V1_1: false

DeepakMP (Thu, 25 Oct 2018 12:22:05 GMT):
Error remains the same: ` ============ Proposal & results as follows ============ [2018-10-25 17:48:08.911] [DEBUG] instantiate-chaincode - Proposal: .protos.Proposal [2018-10-25 17:48:08.911] [DEBUG] instantiate-chaincode - ProposalResponses: Error: as V1_2 or later capability is not enabled, private channel collections and data are not available,Error: as V1_2 or later capability is not enabled, private channel collections and data are not available [2018-10-25 17:48:08.911] [DEBUG] instantiate-chaincode - ============ Proposal & results concluded ============ `

bretharrison (Thu, 25 Oct 2018 12:25:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=i5yAJwiHyXaeLHTkZ) @ShashankMotepalli check the following settings, could be coming in from the config or set on the peer create options, or even in the common connection profile file. ``` "grpc.max_receive_message_length": -1, "grpc.max_send_message_length": -1, ``` The above will set to unlimited size for the NodeSDK (client side), there by the fabric network side controls the size

ShashankMotepalli (Thu, 25 Oct 2018 12:26:50 GMT):
Thanks @bretharrison got it!

dave.enyeart (Thu, 25 Oct 2018 12:55:59 GMT):
@DeepakMP you have to re-generate the channel transaction and recreate the channel

dave.enyeart (Thu, 25 Oct 2018 12:55:59 GMT):
@DeepakMP you have to re-generate the channel transaction and recreate the channel, after making that change

gentios (Thu, 25 Oct 2018 12:56:22 GMT):
In the fabric-samples in balance-transfer example there is a *Org1.yaml *and *Org2.yaml * file specifying the *credentialStore* and *cryptoStore*. My question is how to know for which Identity which keys (priv, public) belongs to ?

DeepakMP (Thu, 25 Oct 2018 13:04:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3qJGdfwPFKjbGguf3) @dave.enyeart I killed all docker containers and relaunched the app. The problem i think is with example itself- https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer - the 'Artifacts' section of the documentation reads. "An Orderer genesis block (genesis.block) and channel configuration transaction (mychannel.tx) has been pre generated using the configtxgen tool from Hyperledger Fabric and placed within the artifacts folder."

bestbeforetoday (Thu, 25 Oct 2018 13:15:53 GMT):
Hey community, as part of some ease-of-use additions to the node SDK targeted for a 1.4 release, I've done some work on waiting for transaction commit events following a transaction submission. There is some explanation and code examples here: https://github.com/hyperledger/fabric-sdk-node/blob/master/docs/tutorials/transaction-commit-events.md Any constructive feedback is welcome. You can probably play with it by using _fabric-network@unstable_ with Fabric 1.3

bestbeforetoday (Thu, 25 Oct 2018 13:20:30 GMT):
There are some (possibly not entirely up-to-date) examples of general client API usage here: https://github.com/hyperledger/fabric-samples/blob/master/commercial-paper/application/application.js And for the (very!) brave you could look at some of the integration test code for examples of usage: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/network-e2e/invoke.js

DeepakMP (Thu, 25 Oct 2018 13:23:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vuKmy46CsLrjvgueH) @bestbeforetoday Hey @bestbeforetoday , could you please point me to a working example of a private collection being invoked and queried through node SDK APIs?

DeepakMP (Thu, 25 Oct 2018 13:31:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3qJGdfwPFKjbGguf3) @dave.enyeart @dave.enyeart , hey. So I'm not very sure how to do that. I looked at (https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#createchanneltx) and made the following: 1. Pointed FABRIC_CFG_PATH to the directory containing my configtx.yaml in the balance-transfer directory where I'm currently working. 2. Called the configtxgen to generate a mychannel.tx in the same place as my current mychannel.tx was using this command `export CHANNEL_NAME=mychannel && ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./artifacts/channel/mychannel.tx -channelID $CHANNEL_NAME` I think it executed successfully: `2018-10-25 18:57:52.303 IST [common/tools/configtxgen] main -> INFO 001 Loading configuration 2018-10-25 18:57:52.316 IST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx 2018-10-25 18:57:52.316 IST [common/tools/configtxgen/encoder] NewApplicationGroup -> WARN 003 Default policy emission is deprecated, please include policy specifications for the application group in configtx.yaml 2018-10-25 18:57:52.319 IST [common/tools/configtxgen/encoder] NewApplicationOrgGroup -> WARN 004 Default policy emission is deprecated, please include policy specifications for the application org group Org1MSP in configtx.yaml 2018-10-25 18:57:52.326 IST [common/tools/configtxgen/encoder] NewApplicationOrgGroup -> WARN 005 Default policy emission is deprecated, please include policy specifications for the application org group Org2MSP in configtx.yaml 2018-10-25 18:57:52.327 IST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 006 Writing new channel tx ` 3. Then I killed all docker containers and re-ran the app from balance-transfer root dir using `./runApp.sh` and ran `./testAPIs.sh`. But this is leading me to the same error:

DeepakMP (Thu, 25 Oct 2018 13:32:13 GMT):
`============ Proposal & results as follows ============ [2018-10-25 18:59:10.940] [DEBUG] instantiate-chaincode - Proposal: .protos.Proposal [2018-10-25 18:59:10.940] [DEBUG] instantiate-chaincode - ProposalResponses: Error: as V1_2 or later capability is not enabled, private channel collections and data are not available,Error: as V1_2 or later capability is not enabled, private channel collections and data are not available [2018-10-25 18:59:10.940] [DEBUG] instantiate-chaincode - ============ Proposal & results concluded ============ `

bestbeforetoday (Thu, 25 Oct 2018 13:33:37 GMT):
@DeepakMP There is some tutorial information at https://fabric-sdk-node.github.io/tutorial-private-data.html Unfortunately the samples those docs point look to be Go rather than Node. I am looking at how we might provide a simpler API in the SDK for passing transient data to be stored in private data collections in this Jira: https://jira.hyperledger.org/browse/FABN-929 Ideas / comments welcome

DeepakMP (Thu, 25 Oct 2018 13:41:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CSHrFi8yPfEwBacFN) @bestbeforetoday I referred that tutorial, but it didn't help much as it simply said I've to make the collection_config.json and include in the instantiate request. I created the file, and hard-coded the path `(((not sure if path.resolve(__dirname, collection_definition_json_filepath) makes a difference compared to simply saying var collectionConfigPath = "/Users/deepak/Desktop/Project/blockchain/attempt6/fabric-samples/balance-transfer/artifacts/src/github.com/example_cc/collections_config.json")))` but it didn't really help much apart from that, and didn't show me how I can proceed closer to goal.

DeepakMP (Thu, 25 Oct 2018 13:42:47 GMT):
golang is fine, go or node or anything, I need the ability to invoke and query via an API that can be called from anywhere (when exposed), and it needs to write and read the data from a private collection (and not the main ledger).

DeepakMP (Thu, 25 Oct 2018 13:43:05 GMT):
@bestbeforetoday Can you help with this at all?

DeepakMP (Thu, 25 Oct 2018 13:45:08 GMT):
This is why, I'm trying to work with /fabric-samples/balance-transfer example and implement a private collection there. Replace the whole chaincode of balance-transfer and put the whole chaincode of marbles in it. It's not letting me proceed as the default channel artifacts that come the balance-transfer example are not V1_2 enabled.

DeepakMP (Thu, 25 Oct 2018 13:46:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YxRj3opB26MX4HZqq) I tried re-generating the mychannel.tx artificat in /artifacts/channel/, but either my steps are wrong or something else is the issue.

javaguirre (Thu, 25 Oct 2018 20:30:07 GMT):
Has joined the channel.

AndreiLovin (Fri, 26 Oct 2018 07:54:37 GMT):
Has anyone successfully developed a NodeJS app that works over a multi host fabric network?

AndreiLovin (Fri, 26 Oct 2018 07:54:37 GMT):
Has anyone successfully developed a NodeJS app that works over a multi host fabric network? With TLS enabled

ArianStef (Fri, 26 Oct 2018 14:03:05 GMT):
Hi! I have a client who send 500 transaction in parallel. When I check the commit sometimes the timeout expire so I cannot know the commit peer response. Can any one help me?

ArianStef (Fri, 26 Oct 2018 14:05:53 GMT):
Hi! I have a client who send 500 transaction in parallel. When I check the commit sometimes the timeout expire so I cannot know the commit peer response. Can any one help me? \textit{eventPromises.push(new Promise((resolve, reject) => { let event_timeout = setTimeout(() => { let message = 'REQUEST_TIMEOUT:' + eh.getPeerAddr(); console.error(message); eh.disconnect(); reject(new Error(message)); }, 360000); eh.registerTxEvent(tx_id_multi[num_processo],(tx, code,block) => { clearTimeout(event_timeout); eh.unregisterTxEvent(tx_id_multi[num_processo]); console.log(util.format('Transaction %s has completed, %s', tx_id_multi[num_processo]),num_processo); eh.disconnect(); var dt5 = datetime.create(); var time5= dt5.getTime(); stop_time[num_processo]=time5; if (code !== 'VALID') { let message = util.format('The invoke chaincode transaction was invalid, code:%s',code); // console.error(message); reject(new Error(message)); } else { let message = 'The invoke chaincode transaction was valid.'; //console.info(message); resolve(message); } ); eh.connect(); } ))}

ArianStef (Fri, 26 Oct 2018 14:06:39 GMT):
Hi! I have a client who send 500 transaction in parallel. When I check the commit sometimes the timeout expire so I cannot know the commit peer response. Can any one help me? eventPromises.push(new Promise((resolve, reject) => { let event_timeout = setTimeout(() => { let message = 'REQUEST_TIMEOUT:' + eh.getPeerAddr(); console.error(message); eh.disconnect(); reject(new Error(message)); }, 360000); eh.registerTxEvent(tx_id_multi[num_processo],(tx, code,block) => { clearTimeout(event_timeout); eh.unregisterTxEvent(tx_id_multi[num_processo]); console.log(util.format('Transaction %s has completed, %s', tx_id_multi[num_processo]),num_processo); eh.disconnect(); var dt5 = datetime.create(); var time5= dt5.getTime(); stop_time[num_processo]=time5; if (code !== 'VALID') { let message = util.format('The invoke chaincode transaction was invalid, code:%s',code); // console.error(message); reject(new Error(message)); } else { let message = 'The invoke chaincode transaction was valid.'; //console.info(message); resolve(message); } ); eh.connect(); } ))

AndreiLovin (Fri, 26 Oct 2018 15:11:22 GMT):
I'm running a NodeJS app inside a docker container installed over a Hyperledger Fabric multi host network. The container's NodeJS ports are 4000:3000; The app needs to connect to the network and query or invoke transactions. When I try to curl to the 4000 port, the request just hangs, without any response for an unlimited ammount of time. This is the start of the docker-compose.yaml api: build: fabric-starter-rest #image: olegabu/fabric-starter-rest container_name: api.sponsor.test.com ports: - 4000:3000 environment:

Sreesha (Mon, 29 Oct 2018 11:07:05 GMT):
What does packaging a chaincode means

ArianStef (Mon, 29 Oct 2018 13:40:58 GMT):
Hi! I would like to know how to batch more transactions together and send them to the orderer nodejs instead of use sendTransaction(request, timeout) and sending only one transaction

ArianStef (Mon, 29 Oct 2018 13:41:34 GMT):
Hi! I would like to know if there is a funciont which batch more transactions together and send them to the orderer instead of use sendTransaction(request, timeout) and sending only one transaction

bretharrison (Mon, 29 Oct 2018 15:40:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nGnSxS9YPSnWzvov2) @ArianStef NodeSDK does not have one, and I do not see it in the protobuf definition of the interface of the fabric. You wish to ask on the #fabric-peer-endorser-committer channel

bretharrison (Mon, 29 Oct 2018 15:40:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nGnSxS9YPSnWzvov2) @ArianStef NodeSDK does not have one, and I do not see it in the protobuf definition of the interface of the fabric. You may wish to ask on the #fabric-peer-endorser-committer channel

bretharrison (Mon, 29 Oct 2018 15:42:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Su2AjqaN6fPZ3wSSr) @Sreesha Zips up the files so that it can be sent as one to peer.

bretharrison (Mon, 29 Oct 2018 15:42:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Su2AjqaN6fPZ3wSSr) @Sreesha Zips up the files so that it can be sent as one to a peer.

bh4rtp (Tue, 30 Oct 2018 00:46:51 GMT):
hi, i'm using release-1.3. when starting `balance-transfer`, it prints a warning message: ```(node:6984) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead``` does it matter?

dexhunter (Tue, 30 Oct 2018 02:39:32 GMT):

Screenshot_20181030_103824.png

dexhunter (Tue, 30 Oct 2018 02:42:47 GMT):
@davidkhala Have you tried the test before?

dexhunter (Tue, 30 Oct 2018 02:43:53 GMT):
@zhaochy Hi! Could you help to solve the issue? Thank you!

zhaochy (Tue, 30 Oct 2018 02:51:37 GMT):
you must failed at the endorse step

zhaochy (Tue, 30 Oct 2018 02:52:43 GMT):
can you change line 197 and print the variable proposalResponses[0]

zhaochy (Tue, 30 Oct 2018 02:52:51 GMT):
`proposalResponses[0]`

zhaochy (Tue, 30 Oct 2018 02:53:06 GMT):
this should be an instance of `Error`

zhaochy (Tue, 30 Oct 2018 02:53:18 GMT):
and can you show me the error message

dexhunter (Tue, 30 Oct 2018 02:56:12 GMT):

Screenshot_20181030_105557.png

dexhunter (Tue, 30 Oct 2018 02:57:21 GMT):
@zhaochy yes, you are right the error indicates access denied but I am unsure is the certpem or something else went wrong. And thank you for the help

dexhunter (Tue, 30 Oct 2018 03:00:21 GMT):
or is the way I set up docker wrong? I just ran the `gulp test` and set up the docker images .

zhaochy (Tue, 30 Oct 2018 03:01:13 GMT):
usually this `access denied` problem is caused by using the wrong certificate

dexhunter (Tue, 30 Oct 2018 03:01:41 GMT):
hmm... but I didn't change the code for certificate. I thought the default one should passed?

zhaochy (Tue, 30 Oct 2018 03:02:49 GMT):
can you do: 1. git pull from master. 2. remove all node_modules and install again 3. re-run the tests and try again ?

dexhunter (Tue, 30 Oct 2018 03:03:05 GMT):
sure, wait a sec

dexhunter (Tue, 30 Oct 2018 03:04:04 GMT):
@zhaochy by master you mean release-1.3 right?

zhaochy (Tue, 30 Oct 2018 03:04:11 GMT):
no

zhaochy (Tue, 30 Oct 2018 03:04:20 GMT):
`master` branch

dexhunter (Tue, 30 Oct 2018 03:04:23 GMT):
ok

zhaochy (Tue, 30 Oct 2018 03:04:33 GMT):
and `release-1.3` should work too

dexhunter (Tue, 30 Oct 2018 03:12:59 GMT):

Screenshot_20181030_111244.png

dexhunter (Tue, 30 Oct 2018 03:13:08 GMT):
@zhaochy Hi! I changed to master branch but still got the same error

dexhunter (Tue, 30 Oct 2018 03:28:36 GMT):
@zhaochy I wonder what's the result you run on your side? Did you pass the test, or what suggestions do you have?

Sreesha (Tue, 30 Oct 2018 04:35:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wRhJXMmKPJshXmjfJ) @bretharrison @bretharrison so its just compression of the file and nothing like encryption or something.The packaged file seems not to be in a human readable format.So what could be the possible algorithm behind this encoding?

zhaochy (Tue, 30 Oct 2018 05:23:57 GMT):
@dexhunter I tried this on my mac. It works. So you need double check for the certificates and private keys.

zhaochy (Tue, 30 Oct 2018 05:25:17 GMT):
please see line 24 and 26, and check if the private key and certificate is correct.

knagware9 (Tue, 30 Oct 2018 06:30:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QMdFdNWj2o5E6b5DQ) @bh4rtp No..

ascatox (Tue, 30 Oct 2018 08:14:54 GMT):
Hi All! I'm using the newest version of node sdk 1.3 in order to register and receive *chaincode events*, I receive correctly events but the payload field is not present, in the previous version of sdk 1.2, the payload was correctly received. Someone knows nothing about this problem.

ascatox (Tue, 30 Oct 2018 08:14:54 GMT):
Hi All! I'm using the newest version of node sdk 1.3 in order to register and receive *chaincode events*, I receive correctly events but the *payload field* is not present, in the previous version of sdk 1.2, the payload was correctly received. Someone knows nothing about this problem.

bh4rtp (Tue, 30 Oct 2018 08:27:35 GMT):
hi! instantiate chaincode failed, how can i probe the problem from log messages?

dexhunter (Tue, 30 Oct 2018 08:55:21 GMT):

photo_2018-10-30_16-54-37.jpg

dexhunter (Tue, 30 Oct 2018 08:56:12 GMT):
@zhaochy Hi! I changed some code and now it passes all the tests while for test 9 I got ENDORSEMENT_POLICY_FAILURE and the asset did not move, do you know how to solve it? Thanks!

zhaochy (Tue, 30 Oct 2018 09:00:47 GMT):
hello dex, the ENDORSEMENT_POLICY_FAILURE error is correct. Because we just send the proposal to just one endorser, while the endorsement policy requires two.

dexhunter (Tue, 30 Oct 2018 09:05:54 GMT):
@zhaochy so if I want to make the status change, how should I do it? I see the current peer is `const peer = channel.getPeer('localhost:7051');` I am not sure how to add another endorser? Could you help a bit more? Many thanks!

zhaochy (Tue, 30 Oct 2018 09:06:42 GMT):
run `docker ps -a`

zhaochy (Tue, 30 Oct 2018 09:06:49 GMT):
you should see two peers

zhaochy (Tue, 30 Oct 2018 09:07:07 GMT):
another peer is 'localhost:8051'

UnaiUrki (Tue, 30 Oct 2018 09:17:57 GMT):
Hi, when I make enrollment with Node SDK, the CA is not returning correct certs... it has to be .pem cert?

UnaiUrki (Tue, 30 Oct 2018 09:24:04 GMT):
error: returned x509: certificate signed by unknown authority

dexhunter (Tue, 30 Oct 2018 09:53:05 GMT):
@zhaochy succeed. Thank you very much!

AndreiLovin (Tue, 30 Oct 2018 10:54:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MB2rfCo9mTCwjPHMu) @knagware9 I'm interested in this warning too!

AndreiLovin (Tue, 30 Oct 2018 10:55:31 GMT):
Has anyone used this repo https://github.com/olegabu/fabric-starter for development? I'm interested more in the NodeJS app, then the example network...

OlegLukasonok (Tue, 30 Oct 2018 11:11:39 GMT):
Hi, does anybody knows where to find API documentation of utill which are used in fabric-shim ?

npc0405 (Tue, 30 Oct 2018 12:35:30 GMT):
I have setup Kafka based orderer service with 2 orderers configured. While testing I have taken down 1st orderer and tring to transact with second. It gets redirected to second orderer but Its not able to return the response, however transaction is getting posted to ledger. Any help would be greatly appreciated.

npc0405 (Tue, 30 Oct 2018 12:36:12 GMT):
Transaction hash is not being returned.

jrosmith (Tue, 30 Oct 2018 12:51:21 GMT):
@npc0405 can you post logs (using hastebin.com) of what is getting returned?

npc0405 (Tue, 30 Oct 2018 12:51:53 GMT):
[2018-10-30 07:16:58.727] [DEBUG] Helper - [BasicCommitHandler]: _commit - found 2 orderers assigned to channel [2018-10-30 07:16:58.727] [DEBUG] Helper - [BasicCommitHandler]: _commit - starting orderer orderer0.example.com [2018-10-30 07:17:01.707] [ERROR] invoke-chaincode - REQUEST_TIMEOUT:localhost:7051 [2018-10-30 07:17:01.710] [ERROR] invoke-chaincode - Error: ChannelEventHub has been shutdown at ChannelEventHub.disconnect (/home/vagrant/Packaging/PackageTracking_Network_ordererKafka/node_modules/fabric-client/lib/ChannelEventHub.js:440:21) at Timeout.setTimeout (/home/vagrant/Packaging/PackageTracking_Network_ordererKafka/app/invoke-transaction.js:92:10) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) [2018-10-30 07:17:01.734] [ERROR] invoke-chaincode - Error: ChannelEventHub has been shutdown at ChannelEventHub.disconnect (/home/vagrant/Packaging/PackageTracking_Network_ordererKafka/node_modules/fabric-client/lib/ChannelEventHub.js:440:21) at Timeout.setTimeout (/home/vagrant/Packaging/PackageTracking_Network_ordererKafka/app/invoke-transaction.js:92:10) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) [2018-10-30 07:17:01.737] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: ChannelEventHub has been shutdown (node:536) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Failed to invoke chaincode. cause:Error: ChannelEventHub has been shutdow n (node:536) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js proc ess with a non-zero exit code. error: [Remote.js]: Error: Failed to connect before the deadline error: [Orderer]: Orderer grpcs://localhost:7050 has an error Error: Failed to connect before the deadline [2018-10-30 07:17:01.761] [DEBUG] Helper - [BasicCommitHandler]: _commit - Caught: Error: Failed to connect before the deadline [2018-10-30 07:17:01.761] [DEBUG] Helper - [BasicCommitHandler]: _commit - finished orderer orderer0.example.com [2018-10-30 07:17:01.762] [DEBUG] Helper - [BasicCommitHandler]: _commit - starting orderer orderer1.example.com [2018-10-30 07:17:01.804] [DEBUG] Helper - [BasicCommitHandler]: _commit - Successfully sent transaction to the orderer orderer1.example.com

npc0405 (Tue, 30 Oct 2018 12:52:31 GMT):
Whats this hastebin.com

jrosmith (Tue, 30 Oct 2018 12:53:48 GMT):
it lets you post large code snippets so that this channel remains readable and is not just a clutter of error logs

npc0405 (Tue, 30 Oct 2018 12:53:58 GMT):
:) cool

npc0405 (Tue, 30 Oct 2018 12:54:02 GMT):
let me try that

npc0405 (Tue, 30 Oct 2018 12:59:59 GMT):
https://hastebin.com/egayireyin.js

npc0405 (Tue, 30 Oct 2018 13:01:12 GMT):
After this, It goes in infinity and later gets timed out

npc0405 (Tue, 30 Oct 2018 13:22:01 GMT):
Any idea?

npc0405 (Tue, 30 Oct 2018 13:22:25 GMT):
is there a missing config?

npc0405 (Tue, 30 Oct 2018 13:22:37 GMT):
@jrosmith

waxer (Tue, 30 Oct 2018 13:25:43 GMT):
Has joined the channel.

waxer (Tue, 30 Oct 2018 13:26:08 GMT):
Question: There's any documentation about the network confguration yaml? What it means its fields?

AndreiLovin (Tue, 30 Oct 2018 13:30:10 GMT):
Hello again, I'm trying to develop a NodeJS app to connect to my Fabric network. At the moment I'm able to query the network but no invoke. [Remote.js]: Error: Failed to connect before the deadline error: [Orderer.js]: Orderer grpcs://orderer.test.com:7050 has an error Error: Failed to connect before the deadline This is what I'm getting. Any ideas? Because I really don't know what to try...

npc0405 (Tue, 30 Oct 2018 13:41:48 GMT):
@AndreiLovin check if your orderer docker container is up

AndreiLovin (Tue, 30 Oct 2018 13:44:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8Jr7M4LNS3kkDmf7X) @npc0405 everything is up, the network work perfectly if I use the cli container ... meaning that I can query and invoke transactions

waxer (Tue, 30 Oct 2018 13:52:04 GMT):
Question: Can I use the generated user MSP directly in the SDK without using a CA server? There's any example of how to do this?

jrosmith (Tue, 30 Oct 2018 14:17:23 GMT):
@npc0405 youre connecting to multiple peers and orderers, right? from those logs it looks like its not able to connect to multiple identities.

jrosmith (Tue, 30 Oct 2018 14:17:46 GMT):
try connecting to only one at a time to see which one is misconfigured. could be a cert issue

npc0405 (Tue, 30 Oct 2018 14:18:28 GMT):
I checked that.. Orderer0 works fine with orderer1 down. But viceversa is not working

npc0405 (Tue, 30 Oct 2018 14:18:51 GMT):
Also transaction is getting committed in ledger but I am not getting hash in return in response

npc0405 (Tue, 30 Oct 2018 14:19:03 GMT):
its getting stuck.

npc0405 (Tue, 30 Oct 2018 14:21:10 GMT):
Also, If I check the logs of orderer1...nothing erroneous getting printed

jrosmith (Tue, 30 Oct 2018 14:25:56 GMT):
not getting a hash return as in the peers are not returning anything from transaction endorsement? or youre saying youre not getting alerted of transaction commitment?

npc0405 (Tue, 30 Oct 2018 14:45:11 GMT):
Peers are not returning response I believe

npc0405 (Tue, 30 Oct 2018 14:48:48 GMT):
Not getting alert for transactions

npc0405 (Tue, 30 Oct 2018 14:49:05 GMT):
Is there working example...I can refer to

npc0405 (Tue, 30 Oct 2018 14:53:08 GMT):
@jrosmith

bretharrison (Tue, 30 Oct 2018 16:49:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tExPxnz46rJbpFPhB) @ascatox try `eventHub.connect(true`, this will create a connection to the peer to receive the full block and not the filtered block which is required to see the payload of chaincode events

bretharrison (Tue, 30 Oct 2018 16:52:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aAxb2Ckx7GtsATza7) @Sreesha see https://github.com/hyperledger/fabric-sdk-node/blob/e9c979e1e10c5b25bd53f8ab80d09f079a9c6873/fabric-client/lib/packager/BasePackager.js#L154

bretharrison (Tue, 30 Oct 2018 16:53:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wPWNM36km5sPGp3aw) @bh4rtp Check the docker Peer logs

bh4rtp (Wed, 31 Oct 2018 01:04:11 GMT):
@bretharrison hi, i did not find any message on chaincode instantiate from peer logs. and there was a message about chaincode install: ```2018-10-31 08:40:33.603 CST [cceventmgmt] HandleChaincodeInstall -> DEBU 4d51 Channel [mychannel]: Chaincode [Name=register, Version=v1, Hash=[]byte{0xc4, 0xb0, 0xd, 0xc, 0xaf, 0xdc, 0xda, 0xb1, 0x5, 0xc6, 0x7c, 0x2d, 0xc3, 0xe2, 0xc, 0x17, 0xd1, 0xfc, 0xf0, 0x1f, 0x53, 0xb5, 0x7f, 0x63, 0x54, 0x5e, 0xc2, 0xd, 0x6d, 0x8, 0x4b, 0xa5}] is not deployed on channel hence not creating chaincode artifacts.``` what does `not deployed on channel hence not creating chaincode artifacts` mean? and is it the reason?

Sreesha (Wed, 31 Oct 2018 05:21:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=L4Cbzx9zphq43LG4X) @bretharrison @bretharrison thank you very much.So what happens when organisations sign the package, is that any kind of encryption or not?

Legiit (Wed, 31 Oct 2018 09:09:48 GMT):
Are there any plans to support node 10.x as this is the new LTS release?

bh4rtp (Wed, 31 Oct 2018 10:41:54 GMT):
@bretharrison `channel.sendInstantiateProposal` failed, how to get the debug message from sdk? the proposal did not send to peer at all.

ArianStef (Wed, 31 Oct 2018 11:54:39 GMT):

Clipboard - October 31, 2018 12:54 PM

ArianStef (Wed, 31 Oct 2018 11:55:07 GMT):

Clipboard - October 31, 2018 12:54 PM

davidkel (Wed, 31 Oct 2018 11:57:25 GMT):
@Legiit I have raised a Jira about this https://jira.hyperledger.org/browse/FABN-986

bretharrison (Wed, 31 Oct 2018 13:17:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8FDZay4DWZZZXiMeT) @bh4rtp export HFC_LOGGING='{"debug":"console"}'

Legiit (Wed, 31 Oct 2018 13:35:09 GMT):
Great news! @davidkel this will be near approx december or januari? (assuming 1.4 will be released with fabric 1.4, which is every 3-4 months)

Legiit (Wed, 31 Oct 2018 13:35:09 GMT):
Great news! @davidkel this will approx be near december or januari? (assuming 1.4 will be released with fabric 1.4, which is every 3-4 months)

DeepakMP (Wed, 31 Oct 2018 14:00:22 GMT):
I'm having some trouble getting started with node sdk. I'm trying to interact with my `first-network` chaincodes- invoke, query, but I'm not able to get started. Would someone be willing to help me walk through this?

DeepakMP (Wed, 31 Oct 2018 14:01:53 GMT):
It would be supremely helpful if I could get on skype call with any of you and I could share my screen and show you how I'm going about it.

DeepakMP (Wed, 31 Oct 2018 14:02:51 GMT):
I'm really not sure how to get started to be honest, the sdk documentation doesn't have a walkthrough of setting up first file, first code, so forth for interacting with a existing network.

DeepakMP (Wed, 31 Oct 2018 14:03:01 GMT):
Would highly appreciate support.

bretharrison (Wed, 31 Oct 2018 14:58:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LyeBGiQa2YMiXB6Ha) @bh4rtp I do not know what that means... you should post this question on the #fabric-peer-endorser-committer channel

bretharrison (Wed, 31 Oct 2018 15:01:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FEBHAmtzKXcNGtmzq) @DeepakMP https://hyperledger-fabric.readthedocs.io/en/release-1.3/build_network.html https://www.youtube.com/watch?v=rtuwuo1dcTY

bretharrison (Wed, 31 Oct 2018 15:04:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ftavuBnZ46ordiWPL) @ArianStef Are there any messages on the NodeSDK client side, do you have an error callback registered along with the transaction listener callback. Have you tried using a smaller transaction count to see if hitting a size issue ?

ArianStef (Wed, 31 Oct 2018 15:12:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yPAcGCk8ZQzzoNQuu) @bretharrison Thanks for your time. On the node side I have that the commit's event doesn't arrive and so the timeout expire. (please see the code below ). No error returns. Using a smaller transaction count I have not this issue. (but I had to send a high numer of transactions for my project)

ArianStef (Wed, 31 Oct 2018 15:12:27 GMT):

Clipboard - October 31, 2018 4:12 PM

DeepakMP (Wed, 31 Oct 2018 15:19:45 GMT):
@bretharrison Hi, the video is a good walkthrough of `/fabric-samples/first-network/` but doesn't indicate how I can go beyond that to call queries and invokes via API s (post, get, so on from same machine or over internet through other machines).

DeepakMP (Wed, 31 Oct 2018 15:21:11 GMT):
Resources on this? I just need atleast one hello-world sort of interaction from a node script to connect to this `/fabric-samples/first-network/` network.

DeepakMP (Wed, 31 Oct 2018 15:21:43 GMT):
I tried integrating balance-transfer example app into my first-network fabric, but i dont know how to do that.

DeepakMP (Wed, 31 Oct 2018 15:22:38 GMT):
On the other side, I can deploy the chaincode i need on balance transfer example, but balance transfer has been created to use V1_1 capabilities and doesn't support private collections which is something I need.

DeepakMP (Wed, 31 Oct 2018 15:23:38 GMT):
I tried replacing the mychannel.tx and genesis.block in `balance-transfer/artifacts/channel` with the ones from `first-network` but it failed with a different error.

DeepakMP (Wed, 31 Oct 2018 15:25:09 GMT):
So, I have two working versions: 1 of first-network implementing private collections, and 1 of balance-transfer implementing node api calls, but I dont know how to create a combinations of these two because I need both these features.

bretharrison (Wed, 31 Oct 2018 15:25:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=t32dpzyoFyWPZkut2) @ArianStef add a callback to receive any errors to the tx registration, it is the third parameter on the call and is missing from you registration

DeepakMP (Wed, 31 Oct 2018 15:26:38 GMT):
I also tried running the node scripts from /fabric-samples/fabcar/, but they couldn't validate the user1, and admin that is implemented in fabcar.

DeepakMP (Wed, 31 Oct 2018 15:27:36 GMT):
the node sdk documentation does not seem to have a walk through of first few steps of connecting to a deployed fabric network.

DeepakMP (Wed, 31 Oct 2018 15:28:46 GMT):
I know I have to do `npm install fabric-client` & `fabric=require('fabric-client')`. But beyond that, I'm blank.

ArianStef (Wed, 31 Oct 2018 15:28:59 GMT):

Clipboard - October 31, 2018 4:28 PM

ArianStef (Wed, 31 Oct 2018 15:29:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bzWMPjrdh9Zwjwjbc) @bretharrison thanks, see the code above please

DeepakMP (Wed, 31 Oct 2018 15:29:51 GMT):
I just need one hello-world sort of implementation of fabric sdk connecting to my first-network fabric thats been deployed successfully. Even if its a simple read query.

DeepakMP (Wed, 31 Oct 2018 15:30:51 GMT):
Once I have just one function that works, I can repeat that structure into other functions by referring to the documentation.

DeepakMP (Wed, 31 Oct 2018 15:31:02 GMT):
Anyone, any help with this?

ArianStef (Wed, 31 Oct 2018 15:31:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=r9Cw36fkzkCJpmPb7) @DeepakMP I started studing the fabcar example, I don't know if this could help you :)

DeepakMP (Wed, 31 Oct 2018 15:33:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Kca7f58RrfyR8ZCPa) @bretharrison Thanks, but that wasn't very helpful. I'm able to interact with my network from cli. I just need a sdk-api version of the same stuff.

bretharrison (Wed, 31 Oct 2018 15:34:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=R9DHfr4rRPRR8Szjv) @ArianStef looks good, the unregister and disconnect are not needed as this will be done automatically

DeepakMP (Wed, 31 Oct 2018 15:34:10 GMT):
I've proxied this by hardcoding my shell commands into a express.js server by using shelljs library.

DeepakMP (Wed, 31 Oct 2018 15:35:02 GMT):
`docker exec -it cli bash query -C mychannel -n tccc -c '{"Args":["readData","id5"]}'`

DeepakMP (Wed, 31 Oct 2018 15:35:24 GMT):
Args can sent to my server remotely and it executes shell commands.

DeepakMP (Wed, 31 Oct 2018 15:35:29 GMT):
This is not scalable.

DeepakMP (Wed, 31 Oct 2018 15:35:36 GMT):
Appreciate anyone's help.

DeepakMP (Wed, 31 Oct 2018 15:36:00 GMT):
Simple hello world example would be enough to get started on.

DeepakMP (Wed, 31 Oct 2018 15:36:25 GMT):
both fabcar and balance-transfer use fabric V1_1 network. so I cant use them.

ArianStef (Wed, 31 Oct 2018 15:36:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JMM4Z3opvQSs3aefB) @DeepakMP try this : https://github.com/hyperledger/fabric-samples/tree/release-1.2/fabcar It doesn't use first-network but is quite the same

DeepakMP (Wed, 31 Oct 2018 15:36:57 GMT):
It uses V1_2 capabilities?

ArianStef (Wed, 31 Oct 2018 15:37:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZqwXd6X8rqhBZBvnN) @DeepakMP I think so

DeepakMP (Wed, 31 Oct 2018 15:37:53 GMT):
I download the 1.3.0 images and I still get error stating that capabilities are not enabled. I tried replacing the mychannel.tx with the latest from first-network.

ArianStef (Wed, 31 Oct 2018 15:38:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AumDe24c97R4oYfb4) @bretharrison Thanks a lot. As before the timeout expire and I got this error:

DeepakMP (Wed, 31 Oct 2018 15:39:23 GMT):
I need sdk to work. Due to paucity of time, I wont be able to study configtxgen behavior as well.

DeepakMP (Wed, 31 Oct 2018 15:39:28 GMT):
I just need sdk to work.

DeepakMP (Wed, 31 Oct 2018 15:39:57 GMT):
I can do a skype call and screenshare if anyone can help.

ArianStef (Wed, 31 Oct 2018 15:41:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AumDe24c97R4oYfb4) @bretharrison Thanks a lot. As before the timeout expires and I got this error: REQUEST_TIMEOUT:localhost:7051 Error Error: ChannelEventHub has been shutdown! Transaction listener for localhost:7051 has been deregistered with %s Error: ChannelEventHub has been shutdown at ChannelEventHub.disconnect (/home/fwd/node_modules/fabric-client/lib/ChannelEventHub.js:439:20) at Timeout.setTimeout [as _onTimeout] (/home/fwd/Documents/fabric/app_tesi_high_throughput/invoke.js:153:30) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5) at Timer.listOnTimeout (timers.js:277:5) I have already set the timeout at 300000 ms! Is there something else that I can do?

bretharrison (Wed, 31 Oct 2018 15:43:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XYtX9z2gRQ6yrEY2M) @ArianStef If it works when the block size is smaller then you may wish to try the #fabric-peer-endorser-committer channel

ArianStef (Wed, 31 Oct 2018 15:56:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vmnaMEs5kfzWHoHgc) @bretharrison Thanks for your time! I hope to find someone who will help me

DeepakMP (Wed, 31 Oct 2018 20:06:43 GMT):
(error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]

DeepakMP (Wed, 31 Oct 2018 20:09:06 GMT):
Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 104.196.209.167:7054] at ClientRequest.request.on (/home/deepak/fabric-samples/first-network/node_modules/fabric-ca-client/lib/FabricCAClient.js:487:12) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at Socket.socketErrorListener (_http_client.js:387:9) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at emitErrorNT (internal/streams/destroy.js:64:8) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

bh4rtp (Thu, 01 Nov 2018 01:55:51 GMT):
hi, is the instantiate proposal commited to endorsor peer? and from the peer logs, which message indicates the proposal is sent to the peer?

sheetal-hlf (Thu, 01 Nov 2018 05:50:14 GMT):
@DeepakMP for the network setup you can refer to first-network and for sdk part refer balance transfer; doesn't that help?

sheetal-hlf (Thu, 01 Nov 2018 06:02:57 GMT):
@ArianStef do you wish to run the event listener forever? In that case you should not add the setTimeout(); using setTimeout will always make the event listener stop after specified timeout

sheetal-hlf (Thu, 01 Nov 2018 06:07:31 GMT):
you could have the event listener as a separate code and only register to event of your choice , handle success and error cases; connect to event hub for either full block (event_hub.connect(true);) or filtered blocks

mat0pad (Thu, 01 Nov 2018 12:12:47 GMT):
Hi, I'm trying to migrate a solution using the node sdk. The current system uses fabric 1.2 and works as expected, but we would like the new features of 1.3. I have updated the network to 1.3, the node sdk to 1.3.0 and changed the application code to using the channel eventhub. But I'm having issues with organisations that have more than 1 peer when installing chaincode. For some reason I can only install chaincode on organisations that have one peer? It seems that the eventhub cannot connect to the other peers in the same org. Looking at the logs from the peers I also only see traffic from the one that can connect to the eventhub *What I'm doing:* For a given org I have 3 peers where chaincode should be installed. For testing I have 3 peers on localhost with the following config: ` { host: "peer0", url: `grpcs://${Config.ip}:8001`, publicKey: readFileSync(resolve("./resources/certs/some.org/peer0.pem")).toString() }, { host: "peer1", url: `grpcs://${Config.ip}:8002`, publicKey: readFileSync(resolve("./resources/certs/some.org/peer1.pem")).toString() },g { host: "peer2", url: `grpcs://${Config.ip}:8003`, publicKey: readFileSync(resolve("./resources/certs/some.org/peer2.pem")).toString() } ` So before doing any operations I initialize the eventhub for each peer _like so:_ `initEventHubs() { logger.debug("Running initEventHubs"); // Setup event hubs try { // Now: 1.3.0 this._peers.forEach((peer: Peer) => { const eventHub = this._channel.newChannelEventHub(peer); eventHub.registerBlockEvent((block: any) => { logger.debug('block', Utils.unmarshalBlock(block)); this.emit('block', Utils.unmarshalBlock(block)); }, (err) => { logger.error(err); }); eventHub.connect(true); this._eventHubs.push(eventHub); }); // Before: 1.2.0 /*this._organisation.peers.forEach((peer: any) => { const eventHub = this._client.newEventHub(); const peerOptions: object = { pem: peer.publicKey, 'ssl-target-name-override': peer.host }; eventHub.setPeerAddr(peer.eventHub, peerOptions); eventHub.connect(); eventHub.registerBlockEvent((block: any) => { this.emit('block', Utils.unmarshalBlock(block)); }); this._eventHubs.push(eventHub); });*/ } catch (e) { logger.error(`Failed to configure event hubs. Error ${e.message}`); } }` When I perform the channel creation or trying to join the channel. The for peer2 it works and behaves as expected. The two others are throwing `Error: 14 UNAVAILABLE: Connect Failed` from the eventhub `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001`. They are at the correct port reachable. Because if I just one peer at the same port with the same config it works. Does anyone have experience with 1.3 and chaincode install through the node sdk on muliple peers of the same org?

mat0pad (Thu, 01 Nov 2018 12:12:47 GMT):
Hi, I'm trying to migrate a solution using the node sdk. The current system uses fabric 1.2 and works as expected, but we would like the new features of 1.3. I have updated the network to 1.3, the node sdk to 1.3.0 and changed the application code to using the channel eventhub. But I'm having issues with organisations that have more than 1 peer when installing chaincode. For some reason I can only install chaincode on organisations that have one peer? It seems that the eventhub cannot connect to the other peers in the same org. Looking at the logs from the peers I also only see traffic from the one that can connect to the eventhub *What I'm doing:* For a given org I have 3 peers where chaincode should be installed. For testing I have 3 peers on localhost with the following config: ` { host: "peer0", url: 'grpcs://${Config.ip}:8001', publicKey: readFileSync(resolve("./resources/certs/some.org/peer0.pem")).toString() }, { host: "peer1", url: 'grpcs://${Config.ip}:8002', publicKey: readFileSync(resolve("./resources/certs/some.org/peer1.pem")).toString() },g { host: "peer2", url: 'grpcs://${Config.ip}:8003', publicKey: readFileSync(resolve("./resources/certs/some.org/peer2.pem")).toString() } ` So before doing any operations I initialize the eventhub for each peer _like so:_ `initEventHubs() { logger.debug("Running initEventHubs"); // Setup event hubs try { // Now: 1.3.0 this._peers.forEach((peer: Peer) => { const eventHub = this._channel.newChannelEventHub(peer); eventHub.registerBlockEvent((block: any) => { logger.debug('block', Utils.unmarshalBlock(block)); this.emit('block', Utils.unmarshalBlock(block)); }, (err) => { logger.error(err); }); eventHub.connect(true); this._eventHubs.push(eventHub); }); // Before: 1.2.0 /*this._organisation.peers.forEach((peer: any) => { const eventHub = this._client.newEventHub(); const peerOptions: object = { pem: peer.publicKey, 'ssl-target-name-override': peer.host }; eventHub.setPeerAddr(peer.eventHub, peerOptions); eventHub.connect(); eventHub.registerBlockEvent((block: any) => { this.emit('block', Utils.unmarshalBlock(block)); }); this._eventHubs.push(eventHub); });*/ } catch (e) { logger.error(`Failed to configure event hubs. Error ${e.message}`); } }` When I perform the channel creation or trying to join the channel. The for peer2 it works and behaves as expected. The two others are throwing `Error: 14 UNAVAILABLE: Connect Failed` from the eventhub `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001`. They are at the correct port reachable. Because if I just one peer at the same port with the same config it works. Does anyone have experience with 1.3 and chaincode install through the node sdk on muliple peers of the same org?

mat0pad (Thu, 01 Nov 2018 12:12:47 GMT):
Hi, I'm trying to migrate a solution using the node sdk. The current system uses fabric 1.2 and works as expected, but we would like the new features of 1.3. I have updated the network to 1.3, the node sdk to 1.3.0 and changed the application code to using the channel eventhub. But I'm having issues with organisations that have more than 1 peer when installing chaincode. For some reason I can only install chaincode on organisations that have one peer? It seems that the eventhub cannot connect to the other peers in the same org. Looking at the logs from the peers I also only see traffic from the one that can connect to the eventhub *What I'm doing:* For a given org I have 3 peers where chaincode should be installed. For testing I have 3 peers on localhost with the following config: ``` { host: "peer0", url: 'grpcs://${Config.ip}:8001', publicKey: readFileSync(resolve("./resources/certs/some.org/peer0.pem")).toString() }, { host: "peer1", url: 'grpcs://${Config.ip}:8002', publicKey: readFileSync(resolve("./resources/certs/some.org/peer1.pem")).toString() },g { host: "peer2", url: 'grpcs://${Config.ip}:8003', publicKey: readFileSync(resolve("./resources/certs/some.org/peer2.pem")).toString() } ` So before doing any operations I initialize the eventhub for each peer _like so:_ `initEventHubs() { logger.debug("Running initEventHubs"); // Setup event hubs try { // Now: 1.3.0 this._peers.forEach((peer: Peer) => { const eventHub = this._channel.newChannelEventHub(peer); eventHub.registerBlockEvent((block: any) => { logger.debug('block', Utils.unmarshalBlock(block)); this.emit('block', Utils.unmarshalBlock(block)); }, (err) => { logger.error(err); }); eventHub.connect(true); this._eventHubs.push(eventHub); }); // Before: 1.2.0 /*this._organisation.peers.forEach((peer: any) => { const eventHub = this._client.newEventHub(); const peerOptions: object = { pem: peer.publicKey, 'ssl-target-name-override': peer.host }; eventHub.setPeerAddr(peer.eventHub, peerOptions); eventHub.connect(); eventHub.registerBlockEvent((block: any) => { this.emit('block', Utils.unmarshalBlock(block)); }); this._eventHubs.push(eventHub); });*/ } catch (e) { logger.error(`Failed to configure event hubs. Error ${e.message}`); } }``` When I perform the channel creation or trying to join the channel. The for peer2 it works and behaves as expected. The two others are throwing `Error: 14 UNAVAILABLE: Connect Failed` from the eventhub `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001`. They are at the correct port reachable. Because if I just one peer at the same port with the same config it works. Does anyone have experience with 1.3 and chaincode install through the node sdk on muliple peers of the same org?

mat0pad (Thu, 01 Nov 2018 12:12:47 GMT):
Hi, I'm trying to migrate a solution using the node sdk. The current system uses fabric 1.2 and works as expected, but we would like the new features of 1.3. I have updated the network to 1.3, the node sdk to 1.3.0 and changed the application code to using the channel eventhub. But I'm having issues with organisations that have more than 1 peer when installing chaincode. For some reason I can only install chaincode on organisations that have one peer? It seems that the eventhub cannot connect to the other peers in the same org. Looking at the logs from the peers I also only see traffic from the one that can connect to the eventhub *What I'm doing:* For a given org I have 3 peers where chaincode should be installed. For testing I have 3 peers on localhost with the following config: ``` { host: "peer0", url: 'grpcs://${Config.ip}:8001', publicKey: readFileSync(resolve("./resources/certs/some.org/peer0.pem")).toString() }, { host: "peer1", url: 'grpcs://${Config.ip}:8002', publicKey: readFileSync(resolve("./resources/certs/some.org/peer1.pem")).toString() },g { host: "peer2", url: 'grpcs://${Config.ip}:8003', publicKey: readFileSync(resolve("./resources/certs/some.org/peer2.pem")).toString() } ``` So before doing any operations I initialize the eventhub for each peer _like so:_ ```initEventHubs() { logger.debug("Running initEventHubs"); // Setup event hubs try { // Now: 1.3.0 this._peers.forEach((peer: Peer) => { const eventHub = this._channel.newChannelEventHub(peer); eventHub.registerBlockEvent((block: any) => { logger.debug('block', Utils.unmarshalBlock(block)); this.emit('block', Utils.unmarshalBlock(block)); }, (err) => { logger.error(err); }); eventHub.connect(true); this._eventHubs.push(eventHub); }); // Before: 1.2.0 /*this._organisation.peers.forEach((peer: any) => { const eventHub = this._client.newEventHub(); const peerOptions: object = { pem: peer.publicKey, 'ssl-target-name-override': peer.host }; eventHub.setPeerAddr(peer.eventHub, peerOptions); eventHub.connect(); eventHub.registerBlockEvent((block: any) => { this.emit('block', Utils.unmarshalBlock(block)); }); this._eventHubs.push(eventHub); });*/ } catch (e) { logger.error(`Failed to configure event hubs. Error ${e.message}`); } }``` When I perform the channel creation or trying to join the channel. The for peer2 it works and behaves as expected. The two others are throwing `Error: 14 UNAVAILABLE: Connect Failed` from the eventhub `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001`. They are at the correct port reachable. Because if I just one peer at the same port with the same config it works. Does anyone have experience with 1.3 and chaincode install through the node sdk on muliple peers of the same org?

mat0pad (Thu, 01 Nov 2018 12:12:47 GMT):
Hi, I'm trying to migrate a solution using the node sdk. The current system uses fabric 1.2 and works as expected, but we would like the new features of 1.3. I have updated the network to 1.3, the node sdk to 1.3.0 and changed the application code to using the channel eventhub. But I'm having issues with organisations that have more than 1 peer when installing chaincode. For some reason I can only install chaincode on organisations that have one peer? It seems that the eventhub cannot connect to the other peers in the same org. Looking at the logs from the peers I also only see traffic from the one that can connect to the eventhub *What I'm doing:* For a given org I have 3 peers where chaincode should be installed. For testing I have 3 peers on localhost with the following config: ``` { host: "peer0", url: 'grpcs://${Config.ip}:8001', publicKey: readFileSync(resolve("./resources/certs/some.org/peer0.pem")).toString() }, { host: "peer1", url: 'grpcs://${Config.ip}:8002', publicKey: readFileSync(resolve("./resources/certs/some.org/peer1.pem")).toString() },g { host: "peer2", url: 'grpcs://${Config.ip}:8003', publicKey: readFileSync(resolve("./resources/certs/some.org/peer2.pem")).toString() } ``` So before doing any operations I initialize the eventhub for each peer _like so:_ ```initEventHubs() { logger.debug("Running initEventHubs"); // Setup event hubs try { // Now: 1.3.0 this._peers.forEach((peer: Peer) => { const eventHub = this._channel.newChannelEventHub(peer); eventHub.registerBlockEvent((block: any) => { logger.debug('block', Utils.unmarshalBlock(block)); this.emit('block', Utils.unmarshalBlock(block)); }, (err) => { logger.error(err); }); eventHub.connect(true); this._eventHubs.push(eventHub); }); // Before: 1.2.0 /*this._organisation.peers.forEach((peer: any) => { const eventHub = this._client.newEventHub(); const peerOptions: object = { pem: peer.publicKey, 'ssl-target-name-override': peer.host }; eventHub.setPeerAddr(peer.eventHub, peerOptions); eventHub.connect(); eventHub.registerBlockEvent((block: any) => { this.emit('block', Utils.unmarshalBlock(block)); }); this._eventHubs.push(eventHub); });*/ } catch (e) { logger.error(`Failed to configure event hubs. Error ${e.message}`); } }``` When I perform the channel creation or when trying to join the channel the `peer2` works and behaves as expected. The two others are throwing `Error: 14 UNAVAILABLE: Connect Failed` from the eventhub `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001`. They are at the correct port reachable. Because if I just one peer at the same port with the same config it works. Does anyone have experience with 1.3 and chaincode install through the node sdk on muliple peers of the same org?

mat0pad (Thu, 01 Nov 2018 12:12:47 GMT):
Hi, I'm trying to migrate a solution using the node sdk. The current system uses fabric 1.2 and works as expected, but we would like the new features of 1.3. I have updated the network to 1.3, the node sdk to 1.3.0 and changed the application code to using the channel eventhub. But I'm having issues with organisations that have more than 1 peer when installing chaincode. For some reason I can only install chaincode on organisations that have one peer? It seems that the eventhub cannot connect to the other peers in the same org. Looking at the logs from the peers I also only see traffic from the one that can connect to the eventhub *What I'm doing:* For a given org I have 3 peers where chaincode should be installed. For testing I have 3 peers on localhost with the following config: ``` { host: "peer0", url: 'grpcs://${Config.ip}:8001', publicKey: readFileSync(resolve("./resources/certs/some.org/peer0.pem")).toString() }, { host: "peer1", url: 'grpcs://${Config.ip}:8002', publicKey: readFileSync(resolve("./resources/certs/some.org/peer1.pem")).toString() },g { host: "peer2", url: 'grpcs://${Config.ip}:8003', publicKey: readFileSync(resolve("./resources/certs/some.org/peer2.pem")).toString() } ``` So before doing any operations I initialize the eventhub for each peer _like so:_ ```initEventHubs() { logger.debug("Running initEventHubs"); // Setup event hubs try { // Now: 1.3.0 this._peers.forEach((peer: Peer) => { const eventHub = this._channel.newChannelEventHub(peer); eventHub.registerBlockEvent((block: any) => { logger.debug('block', Utils.unmarshalBlock(block)); this.emit('block', Utils.unmarshalBlock(block)); }, (err) => { logger.error(err); }); eventHub.connect(true); this._eventHubs.push(eventHub); }); // Before: 1.2.0 /*this._organisation.peers.forEach((peer: any) => { const eventHub = this._client.newEventHub(); const peerOptions: object = { pem: peer.publicKey, 'ssl-target-name-override': peer.host }; eventHub.setPeerAddr(peer.eventHub, peerOptions); eventHub.connect(); eventHub.registerBlockEvent((block: any) => { this.emit('block', Utils.unmarshalBlock(block)); }); this._eventHubs.push(eventHub); });*/ } catch (e) { logger.error(`Failed to configure event hubs. Error ${e.message}`); } }``` When I perform the channel creation or when trying to join the channel the `peer2` works and behaves as expected. The two others are throwing `Error: 14 UNAVAILABLE: Connect Failed` from the eventhub `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001`. They are at the correct port and reachable. Because if I just one peer at the same port with the same config it works. Does anyone have experience with 1.3 and chaincode install through the node sdk on muliple peers of the same org?

mat0pad (Thu, 01 Nov 2018 12:12:47 GMT):
Hi, I'm trying to migrate a solution using the node sdk. The current system uses fabric 1.2 and works as expected, but we would like the new features of 1.3. I have updated the network to 1.3, the node sdk to 1.3.0 and changed the application code to using the channel eventhub. But I'm having issues with organisations that have more than 1 peer when installing chaincode. For some reason I can only install chaincode on organisations that have one peer? It seems that the eventhub cannot connect to the other peers in the same org. Looking at the logs from the peers I also only see traffic from the one that can connect to the eventhub *What I'm doing:* For a given org I have 3 peers where chaincode should be installed. For testing I have 3 peers on localhost with the following config: ``` { host: "peer0", url: 'grpcs://${Config.ip}:8001', publicKey: readFileSync(resolve("./resources/certs/some.org/peer0.pem")).toString() }, { host: "peer1", url: 'grpcs://${Config.ip}:8002', publicKey: readFileSync(resolve("./resources/certs/some.org/peer1.pem")).toString() },g { host: "peer2", url: 'grpcs://${Config.ip}:8003', publicKey: readFileSync(resolve("./resources/certs/some.org/peer2.pem")).toString() } ``` So before doing any operations I initialize the eventhub for each peer _like so:_ ```initEventHubs() { logger.debug("Running initEventHubs"); // Setup event hubs try { // Now: 1.3.0 this._peers.forEach((peer: Peer) => { const eventHub = this._channel.newChannelEventHub(peer); eventHub.registerBlockEvent((block: any) => { logger.debug('block', Utils.unmarshalBlock(block)); this.emit('block', Utils.unmarshalBlock(block)); }, (err) => { logger.error(err); }); eventHub.connect(true); this._eventHubs.push(eventHub); }); // Before: 1.2.0 /*this._organisation.peers.forEach((peer: any) => { const eventHub = this._client.newEventHub(); const peerOptions: object = { pem: peer.publicKey, 'ssl-target-name-override': peer.host }; eventHub.setPeerAddr(peer.eventHub, peerOptions); eventHub.connect(); eventHub.registerBlockEvent((block: any) => { this.emit('block', Utils.unmarshalBlock(block)); }); this._eventHubs.push(eventHub); });*/ } catch (e) { logger.error(`Failed to configure event hubs. Error ${e.message}`); } }``` When I perform the channel creation or when trying to join the channel the `peer2` works and behaves as expected. The two others are throwing `Error: 14 UNAVAILABLE: Connect Failed` from the eventhub `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001`. They are at the correct port and reachable. Because if I just use one peer at the same port with the same config it works. Does anyone have experience with 1.3 and chaincode install through the node sdk on muliple peers of the same org?

LazarLukic (Thu, 01 Nov 2018 12:53:35 GMT):
Has joined the channel.

IgarashiTakashi (Thu, 01 Nov 2018 13:44:59 GMT):
Has joined the channel.

ArianStef (Thu, 01 Nov 2018 14:02:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TXRbbDq3QGyZeNnM6) @sheetal-hlf thank you so much! I am testing hf performance in terms of latency and commit time, so once I send a transaction (I am trying to stress sending until 1000 transactions together) I would like to know when it is commited. But sometimes when the number of transactions is more than 500 the client didn't receive the commit event but I saw form peer logs that the block is commited. Do you have same example code that I can study about event hub for either full block or filtered blocks? Cause I have tried to use registerBlockEvent (https://fabric-sdk-node.github.io/tutorial-channel-events.html) without success. ù

Randyshu2018 (Thu, 01 Nov 2018 14:53:10 GMT):

Clipboard - November 1, 2018 10:51 PM

DeepakMP (Thu, 01 Nov 2018 15:34:59 GMT):
Hi, for setting up indexes, for a chaincode that defines multiple data models, how do we differentiate which model a index applies to?

DeepakMP (Thu, 01 Nov 2018 15:35:55 GMT):
If there are two data models with "name", "owner", "task" fields- creating an index on "owner" would be ambiguous correct?

DeepakMP (Thu, 01 Nov 2018 15:36:35 GMT):
Because it can apply to model 1 which has "owner" column, but also can apply to model 2 which also has "owner" column?

mat0pad (Thu, 01 Nov 2018 15:45:27 GMT):
@DeepakMP If these diffferent models are in the same chaincode then you must already have a way to differentiate between them correct? Like `docType` ? So using fields that check for a given `docType` could work: `{"index":{"fields":["docType","someModel1"]},"ddoc":"indexOwnerDoc", "name":"indexOwner","type":"json"}`

mat0pad (Thu, 01 Nov 2018 15:45:27 GMT):
@DeepakMP If these diffferent models are in the same chaincode then you must already have a way to differentiate between them correct? Like `docType` ? So using fields that check for a given `docType` could work: `{"index":{"fields":["docType","someModel1"]},"ddoc":"indexOwnerDoc", "name":"indexOwner","type":"json"}` The you've one index for model1 with `docType:product` and for model2 `docType:item`

mat0pad (Thu, 01 Nov 2018 15:45:27 GMT):
@DeepakMP If these diffferent models are in the same chaincode then you must already have a way to differentiate between them correct? Like `docType` ? So using fields that check for a given `docType` could work: `{"index":{"fields":["docType","someModel1"]},"ddoc":"indexOwnerDoc", "name":"indexOwner","type":"json"}` Then you've one index for model1 with `docType:product` and for model2 `docType:item`

DeepakMP (Thu, 01 Nov 2018 15:58:38 GMT):
I'm missing something. In my chaincode.go, I've defined all my model structs with: ` ObjectType string `json:"docType"` Where would I add types of product? Something like ` ObjectType string `json:"docType:Product"` and ` ObjectType string `json:"docType:item"`

DeepakMP (Thu, 01 Nov 2018 15:58:38 GMT):
I'm missing something. In my chaincode.go, I've defined all my model structs with: ` ObjectType string `json:"docType"`` Where would I add types of product? Something like ` ObjectType string `json:"docType:Product"`` and ` ObjectType string `json:"docType:item"``

DeepakMP (Thu, 01 Nov 2018 15:58:38 GMT):
I'm missing something. In my chaincode.go, I've defined all my model structs with: ` ObjectType string \`json:"docType"`` Where would I add types of product? Something like ` ObjectType string \`json:"docType:Product"`` and ` ObjectType string \`json:"docType:item"``

DeepakMP (Thu, 01 Nov 2018 15:58:38 GMT):
I'm missing something. In my chaincode.go, I've defined all my model structs with: ` ObjectType string `json:"docType"`` Where would I add types of product? Something like ` ObjectType string `json:"docType:Product"`` and ` ObjectType string `json:"docType:item"``

DeepakMP (Thu, 01 Nov 2018 15:59:34 GMT):
@mat0pad

mat0pad (Thu, 01 Nov 2018 17:35:36 GMT):
@DeepakMP You should add them to each model definition. Take a look at https://github.com/hyperledger/fabric-samples/blob/release-1.3/chaincode/marbles02/go/marbles_chaincode.go#L201 Lini 201 and 99

mat0pad (Thu, 01 Nov 2018 17:35:36 GMT):
@DeepakMP You should add them to each model definition. Take a look at https://github.com/hyperledger/fabric-samples/blob/release-1.3/chaincode/marbles02/go/marbles_chaincode.go#L201 Line 201 and 99

waxer (Thu, 01 Nov 2018 18:09:17 GMT):
Question: How can I configure in the network-configuration.yaml to connect to peers and orderers WITHOUT TLS?

DeepakMP (Fri, 02 Nov 2018 01:41:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hH2RFZyzeiET9XnbJ) @mat0pad I meant, to an index it looks the same or somehow differentiated. For example, I need to add `{ "index":{ "fields":["docType","RequestingMemberId"] }, "ddoc":"indexTaskCreatorDoc", "name":"indexCreator", "type":"json" }` however, this is an index that I want to use only for my 2nd data model. How should the index know this? "RequestingMemberId" is there in my third model as well and all my models are defined using a struct with `ObjectType string `json:"docType"``.

DeepakMP (Fri, 02 Nov 2018 01:45:40 GMT):
Also, when we say, `MeetingDate string `json:"meetingdate"`` in our data model definitions, examples have implemented int and string types. What other data types are possible to store and how are they used>

DeepakMP (Fri, 02 Nov 2018 01:45:55 GMT):
used/defined?**

LevinLMKwong (Fri, 02 Nov 2018 02:54:39 GMT):
Hi guys, may I know if there is any equivalent function in node sdk for `peer chaincode package`? I used this command to make sure late joiner can install the same chaincode (there was problem where `peer chaincode install` depending on install date)

sheetal-hlf (Fri, 02 Nov 2018 04:28:02 GMT):

block-listener.png

sheetal-hlf (Fri, 02 Nov 2018 04:29:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qRQz5Gu8WTwNJKS3c) @ArianStef I have used chaincode-event-listener; I think the code for block listener might look like the one I uploaded..

ArianStef (Fri, 02 Nov 2018 09:03:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3ck4K5K3evv2R4xgK) @sheetal-hlf many thanks for your help!

davidkhala (Fri, 02 Nov 2018 10:27:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jCm8mumA2u5A5pEpa) @MohitYadav2317 I think it could only be handled by your design, chaincode only alow write/read in key-value format

Paradox-AT (Fri, 02 Nov 2018 10:32:56 GMT):
Has joined the channel.

Sreesha (Fri, 02 Nov 2018 11:50:58 GMT):
What is Idemix used for?

Sreesha (Fri, 02 Nov 2018 11:51:08 GMT):
how to install it

VadimInshakov (Fri, 02 Nov 2018 12:53:40 GMT):
Has joined the channel.

VadimInshakov (Fri, 02 Nov 2018 13:07:28 GMT):
tell me please, why I get this error when I try to install chaincode: ``` [ [ { Error: access denied for [install]: Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin] at self._endorserClient.processProposal (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true } ] ``` I enrolled admin using script from "fabcar" example. Source of my install chaincode script: https://codeshare.io/arQe1q

migbot (Fri, 02 Nov 2018 21:42:47 GMT):
Has joined the channel.

migbot (Fri, 02 Nov 2018 21:43:00 GMT):
Hello. I'm wondering if there is some tool that takes files `configtx.yaml`, `crypto-config.yaml`, and `docker-compose.yaml` and generates a connection profile configuration to use with fabric-client?

DeepakMP (Sat, 03 Nov 2018 03:59:59 GMT):
https://stackoverflow.com/questions/53127253/my-hyperledger-fabric-fails-to-detect-function-despite-being-defined-in-chaincod

bh4rtp (Sat, 03 Nov 2018 09:51:38 GMT):
does fabric-sdk-node support `ChannelCapabilities V1_3`? i read https://github.com/hyperledger/fabric-sdk-node/blob/release-1.3/test/fixtures/channel/configtx.yaml, it still uses V1_1.

Legiit (Sun, 04 Nov 2018 10:19:32 GMT):
We're trying to add a organization with the `configtxlater` - we've started it as an API and when calling the decode, everything goes well But when we call the decode API function we get this error: ```` 018/11/02 15:52:06 http: panic serving 127.0.0.1:50019: runtime error: invalid memory address or nil pointer dereference goroutine 6 [running]: net/http.(*conn).serve.func1(0xc42032c000) /usr/local/go/src/net/http/server.go:1726 +0xd0 panic(0x463bfc0, 0x4b03800) /usr/local/go/src/runtime/panic.go:502 +0x229 github.com/hyperledger/fabric/common/tools/protolator.(*plainField).PopulateFrom(0xc4201522a0, 0x0, 0x0, 0x10, 0xc4203ede00) /Users/wouter/go/src/github.com/hyperledger/fabric/common/tools/protolator/json.go:84 +0x6a ```

Legiit (Sun, 04 Nov 2018 10:19:32 GMT):
We're trying to add a organization with the `configtxlater` - we've started it as an API and when calling the decode, everything goes well But when we call the decode API function we get this error: ``` 018/11/02 15:52:06 http: panic serving 127.0.0.1:50019: runtime error: invalid memory address or nil pointer dereference goroutine 6 [running]: net/http.(*conn).serve.func1(0xc42032c000) /usr/local/go/src/net/http/server.go:1726 +0xd0 panic(0x463bfc0, 0x4b03800) /usr/local/go/src/runtime/panic.go:502 +0x229 github.com/hyperledger/fabric/common/tools/protolator.(*plainField).PopulateFrom(0xc4201522a0, 0x0, 0x0, 0x10, 0xc4203ede00) /Users/wouter/go/src/github.com/hyperledger/fabric/common/tools/protolator/json.go:84 +0x6a ```

Legiit (Sun, 04 Nov 2018 10:19:32 GMT):
We're trying to add an organization with the `configtxlater` - we've started it as an API and when calling the decode, everything goes well But when we call the decode API function we get this error: ``` 018/11/02 15:52:06 http: panic serving 127.0.0.1:50019: runtime error: invalid memory address or nil pointer dereference goroutine 6 [running]: net/http.(*conn).serve.func1(0xc42032c000) /usr/local/go/src/net/http/server.go:1726 +0xd0 panic(0x463bfc0, 0x4b03800) /usr/local/go/src/runtime/panic.go:502 +0x229 github.com/hyperledger/fabric/common/tools/protolator.(*plainField).PopulateFrom(0xc4201522a0, 0x0, 0x0, 0x10, 0xc4203ede00) /Users/wouter/go/src/github.com/hyperledger/fabric/common/tools/protolator/json.go:84 +0x6a ```

Legiit (Sun, 04 Nov 2018 10:19:32 GMT):
We're trying to add an organization with the using the `configtxlater` (Is there any other way to add organization to an existing network?) - we've started it as an API and when calling the decode, everything goes well But when we call the decode API function we get this error: ``` 018/11/02 15:52:06 http: panic serving 127.0.0.1:50019: runtime error: invalid memory address or nil pointer dereference goroutine 6 [running]: net/http.(*conn).serve.func1(0xc42032c000) /usr/local/go/src/net/http/server.go:1726 +0xd0 panic(0x463bfc0, 0x4b03800) /usr/local/go/src/runtime/panic.go:502 +0x229 github.com/hyperledger/fabric/common/tools/protolator.(*plainField).PopulateFrom(0xc4201522a0, 0x0, 0x0, 0x10, 0xc4203ede00) /Users/wouter/go/src/github.com/hyperledger/fabric/common/tools/protolator/json.go:84 +0x6a ```

Legiit (Sun, 04 Nov 2018 10:19:32 GMT):
We're trying to add an organization with the using the `configtxlater` *(Is there any other way to add organization to an existing network?)* - we've started it as an API and when calling the decode, everything goes well But when we call the decode API function we get this error: ``` 018/11/02 15:52:06 http: panic serving 127.0.0.1:50019: runtime error: invalid memory address or nil pointer dereference goroutine 6 [running]: net/http.(*conn).serve.func1(0xc42032c000) /usr/local/go/src/net/http/server.go:1726 +0xd0 panic(0x463bfc0, 0x4b03800) /usr/local/go/src/runtime/panic.go:502 +0x229 github.com/hyperledger/fabric/common/tools/protolator.(*plainField).PopulateFrom(0xc4201522a0, 0x0, 0x0, 0x10, 0xc4203ede00) /Users/wouter/go/src/github.com/hyperledger/fabric/common/tools/protolator/json.go:84 +0x6a ```

Legiit (Sun, 04 Nov 2018 10:19:32 GMT):
We're trying to add an organization with the using the `configtxlater` *(Is there any other way to add organization to an existing network?)* - we've started it as an API and when calling the decode, everything goes well But when we call the encode API function we get this error: ``` 018/11/02 15:52:06 http: panic serving 127.0.0.1:50019: runtime error: invalid memory address or nil pointer dereference goroutine 6 [running]: net/http.(*conn).serve.func1(0xc42032c000) /usr/local/go/src/net/http/server.go:1726 +0xd0 panic(0x463bfc0, 0x4b03800) /usr/local/go/src/runtime/panic.go:502 +0x229 github.com/hyperledger/fabric/common/tools/protolator.(*plainField).PopulateFrom(0xc4201522a0, 0x0, 0x0, 0x10, 0xc4203ede00) /Users/wouter/go/src/github.com/hyperledger/fabric/common/tools/protolator/json.go:84 +0x6a ```

Legiit (Sun, 04 Nov 2018 10:19:32 GMT):
We're trying to add an organization with the using the `configtxlater` *(Is there any other way to add organization to an existing network?)* - we've started it as an API and when calling the decode, everything goes well But when we call the encode API endpoint we get this error: ``` 018/11/02 15:52:06 http: panic serving 127.0.0.1:50019: runtime error: invalid memory address or nil pointer dereference goroutine 6 [running]: net/http.(*conn).serve.func1(0xc42032c000) /usr/local/go/src/net/http/server.go:1726 +0xd0 panic(0x463bfc0, 0x4b03800) /usr/local/go/src/runtime/panic.go:502 +0x229 github.com/hyperledger/fabric/common/tools/protolator.(*plainField).PopulateFrom(0xc4201522a0, 0x0, 0x0, 0x10, 0xc4203ede00) /Users/wouter/go/src/github.com/hyperledger/fabric/common/tools/protolator/json.go:84 +0x6a ```

DeepakMP (Mon, 05 Nov 2018 04:57:41 GMT):
Hi, I'm getting this error: ECONNREFUSED when trying to use nodesdk to register a user in my modified first-network application.

DeepakMP (Mon, 05 Nov 2018 04:57:52 GMT):
WHat does it mean and how do I get past it?

DeepakMP (Mon, 05 Nov 2018 04:58:09 GMT):
My registerAdmin is working well, but enroll user is not.

DeepakMP (Mon, 05 Nov 2018 04:58:43 GMT):
Both are using the same line, ip & port to connect to fabric-ca server: `fabric_ca_client = new Fabric_CA_Client('https://localhost:7054', tlsOptions, 'ca-org1', crypto_suite);`

DeepakMP (Mon, 05 Nov 2018 04:59:01 GMT):
Error: `Failed to register: Error: Calling register endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]`

DeepakMP (Mon, 05 Nov 2018 05:01:28 GMT):
` Store path:/home/deepak/fabric-samples/first-network/hfc-key-store (node:832) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead Successfully loaded admin from persistence Failed to register: Error: Calling register endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]`

dexhunter (Mon, 05 Nov 2018 07:27:24 GMT):
Hi! Why in the `package.json` there is a package couldn't be found https://github.com/hyperledger/fabric-sdk-node/blob/release-1.3/package.json#L51 ? I am unable to install this one? Any help?

Legiit (Mon, 05 Nov 2018 08:07:00 GMT):
I get this when my fabric-ca (or network in general) is not up and running @DeepakMP

Legiit (Mon, 05 Nov 2018 08:25:09 GMT):
is `fabric-contract-api` going to be replaced by `fabric-shim` And `fabricClient/fabricCa` in the node-sdk by the gateWay api?

Sreesha (Mon, 05 Nov 2018 10:25:32 GMT):
Is there an implementation for Idemix in nodesdk

DeepakMP (Mon, 05 Nov 2018 11:35:31 GMT):
Hi

DeepakMP (Mon, 05 Nov 2018 11:35:50 GMT):
I'm trying to run a query via node sdk. and get the following error: `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051`

DeepakMP (Mon, 05 Nov 2018 11:37:55 GMT):
It is on the method: `channel.queryByChaincode(request)`

mastersingh24 (Mon, 05 Nov 2018 11:38:46 GMT):
@DeepakMP - what host system are you using?

DeepakMP (Mon, 05 Nov 2018 11:38:52 GMT):
MacOS

DeepakMP (Mon, 05 Nov 2018 11:38:57 GMT):
macos

DeepakMP (Mon, 05 Nov 2018 11:39:23 GMT):
10.12.6

DeepakMP (Mon, 05 Nov 2018 11:40:11 GMT):
@mastersingh24

DeepakMP (Mon, 05 Nov 2018 11:42:27 GMT):
Full error message: `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051 Query has completed, checking results error from query = Error: Failed to connect before the deadline URL:grpcs://localhost:7051 at checkState (/Users/deepak/Desktop/Project/node_modules/fabric-client/node_modules/grpc/src/client.js:720:16)`

mastersingh24 (Mon, 05 Nov 2018 11:43:46 GMT):
And how are you running your peers and orderers? Are you using one of the sample networks?

DeepakMP (Mon, 05 Nov 2018 11:45:50 GMT):
`/fabric-samples/first-network` thats the one I'm using. I've modified it by launching ca containers along with cli by including ca services settings into docker-compose-cli.yaml from docker-compose-e2e.yaml. So far, its worked, and its let me register and load admin and users.

DeepakMP (Mon, 05 Nov 2018 12:02:01 GMT):
@mastersingh24

rthatcher (Mon, 05 Nov 2018 12:05:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ku3oiGiaCd8GpAhxA) @DeepakMP Are you seeing this error when you are issuing a command in the CLI container?

DeepakMP (Mon, 05 Nov 2018 12:11:14 GMT):
`root@d7ac74350a87:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}' Error: error getting endorser client for query: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded`

DeepakMP (Mon, 05 Nov 2018 12:16:02 GMT):
This is what I get from cli. @rthatcher

DeepakMP (Mon, 05 Nov 2018 12:16:20 GMT):
So my peer is unreachable? Why would this be?

DeepakMP (Mon, 05 Nov 2018 12:20:27 GMT):

Screen Shot 2018-11-05 at 5.49.05 PM.png

DeepakMP (Mon, 05 Nov 2018 12:22:27 GMT):
Sorry mybad- had accidentally stopped it.

DeepakMP (Mon, 05 Nov 2018 12:22:29 GMT):
Deepaks-MacBook-Air:first-network deepak$ docker attach e1b2eeeb6c02 You cannot attach to a stopped container, start it first Deepaks-MacBook-Air:first-network deepak$ docker start e1b2eeeb6c02 e1b2eeeb6c02 Deepaks-MacBook-Air:first-network deepak$ docker attach e1b2eeeb6c02 2018-11-05 12:21:44.541 UTC [gossip/gossip] func1 -> WARN 031 Deep probe of peer0.org2.example.com:7051 failed: context deadline exceeded github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).learnAnchorPeers.func1 /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:247 github.com/hyperledger/fabric/gossip/discovery.(*gossipDiscoveryImpl).Connect.func1 /opt/gopath/src/github.com/hyperledger/fabric/gossip/discovery/discovery_impl.go:159 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 2018-11-05 12:21:44.542 UTC [gossip/discovery] func1 -> WARN 032 Could not connect to {peer0.org2.example.com:7051 [] [] peer0.org2.example.com:7051 } : context deadline exceeded

DeepakMP (Mon, 05 Nov 2018 12:23:01 GMT):
So, its not able to communicate to other endorsers?

rthatcher (Mon, 05 Nov 2018 12:24:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=97BwJe9SQGbS5GxEh) @Legiit The `fabric-contract-api` will replace the fabric-shim as the best practise for Smart Contract (chaincode) development, though I think you will still be able to use the shim. Similarly the `fabric-network` will become the best practise for sdk programming, though the client will still be available. Both the new npm modules have recently published 'unstable' versions for the Fabric 1.4 beta

DeepakMP (Mon, 05 Nov 2018 12:28:08 GMT):
@rthatcher Any suggestions?

rthatcher (Mon, 05 Nov 2018 12:35:46 GMT):
- only a couple of broad suggestions: 1. Unless you are specifically testing some failover scenario, I would always start/stop all the Development Fabric containers in one go with Docker Compose, for consistency and to ensure the same docker network setup is used. 2. Be sure of your use of the addresses `localhost' and the full names `peer0.org2...etc` - the containers 'see' each other using the full names and the default port numbers, but your host machine uses localhost and port forwarding with non-default port numbers for additional peers. So you need to be clear what address and port you need for different contexts.

rthatcher (Mon, 05 Nov 2018 12:35:46 GMT):
- only a couple of broad suggestions: 1. Unless you are specifically testing some failover scenario, I would always start/stop all the Development Fabric containers in one go with Docker Compose, for consistency and to ensure the same docker network setup is used. 2. Be sure of your use of the addresses `localhost` and the full names `peer0.org2...etc` - the containers 'see' each other using the full names and the default port numbers, but your host machine uses localhost and port forwarding with non-default port numbers for additional peers. So you need to be clear what address and port you need for different contexts.

DeepakMP (Mon, 05 Nov 2018 12:39:26 GMT):
I havent changed any of them from defaults.

DeepakMP (Mon, 05 Nov 2018 12:40:49 GMT):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 45e99502101f dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab "chaincode -peer.add…" 2 hours ago Up 2 hours dev-peer1.org2.example.com-mycc-1.0 e340a89e44f6 dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b "chaincode -peer.add…" 2 hours ago Up 2 hours dev-peer0.org2.example.com-mycc-1.0 d7ac74350a87 hyperledger/fabric-tools:latest "/bin/bash" 2 hours ago Up 2 hours cli e1b2eeeb6c02 hyperledger/fabric-peer:latest "peer node start" 2 hours ago Up 11 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 7e9fb9343210 hyperledger/fabric-peer:latest "peer node start" 2 hours ago Up 2 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com b9209aa9dcd4 hyperledger/fabric-peer:latest "peer node start" 2 hours ago Up 2 hours 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com 7dbbe782e469 hyperledger/fabric-peer:latest "peer node start" 2 hours ago Up 2 hours 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com fdc0e22b9e86 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:8984->5984/tcp couchdb3 ac06d5066fba hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp couchdb1 a0d9fc596996 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb0 cda0807be569 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 2 hours ago Up 2 hours 0.0.0.0:8054->7054/tcp ca_peerOrg2 f58457125535 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 2 hours ago Up 2 hours 0.0.0.0:7054->7054/tcp ca_peerOrg1 7c53d5dd07e2 hyperledger/fabric-orderer:latest "orderer" 2 hours ago Up 2 hours 0.0.0.0:7050->7050/tcp orderer.example.com 9f8071d62db9 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp couchdb2

DeepakMP (Mon, 05 Nov 2018 12:41:46 GMT):
first-network with ca1 and ca2.

DeepakMP (Mon, 05 Nov 2018 12:44:16 GMT):
main error shows its not able to connect to peer0.org1. But when I do `docker attach peer0.org1` its saying it cant connect to peer0.org2. Does this mean some gossip protocol isn't working?

greg2git (Mon, 05 Nov 2018 12:44:20 GMT):
Has joined the channel.

DeepakMP (Mon, 05 Nov 2018 12:44:23 GMT):
or something like that.

DeepakMP (Mon, 05 Nov 2018 12:46:44 GMT):
how do we check communications from a docker and between two docker containers?

Legiit (Mon, 05 Nov 2018 13:20:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wWvzzCT5ypsgP4x9B) Anyone a suggestion?

rthatcher (Mon, 05 Nov 2018 14:20:06 GMT):
@Legiit - that looks like a Fabric question, not a sdk-node question - I would suggest asking in the #fabric channel

Legiit (Mon, 05 Nov 2018 14:29:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oj7WGKLG7Wms546SM) Well, we're trying to add organizations dynamically to an existing network using the SDK, but it's not supported? So we needed to use the configtxlater, to update the channel config etc, with the added organizations

Legiit (Mon, 05 Nov 2018 14:29:42 GMT):
If there would be an other way of doing it, using the SDK. That would be great!

UnaiUrki (Mon, 05 Nov 2018 16:02:02 GMT):
Hi! If got another problem when creating a channel... Im thinking that it is not posible, Im going to explain you why. I've got a Fabric network running on my local machine. This network has a channel previously created by command line. I was following the steps to create the channel by node SDK. When I put another channel name, It doesn't work. Only works if I put the same channel name that I put previously by command line. So, its not posible to create a channel?

VadimInshakov (Mon, 05 Nov 2018 19:08:53 GMT):
tell me please, why I get this error when I try to install chaincode: ``` [ [ { Error: access denied for [install]: Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin] at self._endorserClient.processProposal (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/admin/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true } ] ``` I enrolled admin using script from "fabcar" example. Source of my install chaincode script: https://codeshare.io/arQe1q

sambhavdutt (Mon, 05 Nov 2018 19:19:25 GMT):
Has joined the channel.

sambhavdutt (Mon, 05 Nov 2018 19:22:50 GMT):
FABN-996 - https://jira.hyperledger.org/browse/FABN-996 FAB-12321 - https://jira.hyperledger.org/browse/FAB-12321

sambhavdutt (Mon, 05 Nov 2018 19:25:38 GMT):
Can someone look into these JIRA Bugs, failing in the sdk-node tests @bretharrison @rameshthoomu

rameshthoomu (Mon, 05 Nov 2018 19:28:09 GMT):
@bretharrison ^^

bretharrison (Mon, 05 Nov 2018 20:57:05 GMT):
I will try tomorrow

awes0menessInc (Tue, 06 Nov 2018 03:40:14 GMT):
Has joined the channel.

bh4rtp (Tue, 06 Nov 2018 07:20:37 GMT):
hi all, if fabric network has 3 orderers, i.e. orderer0~orderer2, which orderer will sdk send the invoke proposal response to order? default to be orderer0, all of the three orderers or random of them?

bretharrison (Tue, 06 Nov 2018 08:48:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ywkinFQsaggqmJSL5) @bh4rtp starting with 1.2 the `channel.sendTransaction()` will start with first orderer added and continue with all until it receives a 'Success' as a response as defined in the `BasicCommitHandler`. The application may use it's own `CommitHandler` for their desired behavior.

bretharrison (Tue, 06 Nov 2018 08:50:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CTSSHMqGNQoErK88e) @UnaiUrki The channel name is also built into the byte output of the `configtxgen` so the name being used in the NodeSDK request must match the name burned into the config file being used in the create.

Taaanos (Tue, 06 Nov 2018 08:51:38 GMT):
Has left the channel.

bretharrison (Tue, 06 Nov 2018 08:55:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KBKgfutrb57LuZaYF) @Sreesha idemix is java only right now, you may wish to post to #fabric-sdk-java

bretharrison (Tue, 06 Nov 2018 09:08:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=399xHjWR7M5J9Hhx5) @mat0pad There is a bug in the `Channel.newChannelEventHub()` where the first peer assigned to the channel is being used and not the peer on the call. https://jira.hyperledger.org/browse/FABN-998

VadimInshakov (Tue, 06 Nov 2018 11:38:58 GMT):
help me please to install chaincode using sdk: https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PREcZAqFjFDX8f6fg

Fleda (Tue, 06 Nov 2018 13:14:46 GMT):
Has joined the channel.

Fleda (Tue, 06 Nov 2018 14:59:13 GMT):
Hey, I'm using hyperledger 1.3.0 with the node sdk that is running in a docker which is supposed to serve a simple api for channel creation, chaincode install and such. Channel create and join seems to work fine. However I ran into a problem when installing chaincodes. ``` [ { Error: nil code package at self._endorserClient.processProposal (/app/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/app/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/app/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/app/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/app/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true } ] ``` My chaincode is written in GO so I have set GOPATH=/opt/gopath env variable and the chaincode is in /opt/gopath/src/github.com/mycc mounted as a docker volume. Here is how I'm trying install the chaincode: ``` var request = { targets: client.getPeersForOrg(), chaincodePath: 'github.com/mycc', chaincodeId: 'mycc', chaincodeVersion: 'v1' }; client.installChaincode(request).then((results) => { var proposalResponses = results[0]; }, (err) => { throw new Error('Failed to send install proposal due to error: ' + err.stack ? err.stack : err); }); ``` Any ideas? Thanks!

vieiramanoel (Tue, 06 Nov 2018 18:51:16 GMT):
Has joined the channel.

vieiramanoel (Tue, 06 Nov 2018 18:52:15 GMT):
hey guys, I was checking https://fabric-sdk-node.github.io/release-1.3/Client.html#createChannel the documentation says: ```Promise for a result object with status on the acceptance of the create request by the orderer. Note that this is not the confirmation of successful creation of the channel. The client application must poll the orderer to discover whether the channel has been created completely or not.``` how do I poll the orderer to check if channel exists already or not?

vieiramanoel (Tue, 06 Nov 2018 18:52:15 GMT):
hey guys, I was checking https://fabric-sdk-node.github.io/release-1.3/Client.html#createChannel the documentation says: ```Promise for a result object with status on the acceptance of the create request by the orderer. Note that this is not the confirmation of successful creation of the channel. The client application must poll the orderer to discover whether the channel has been created completely or not.``` how do I poll the orderer to check if channel already exists or not?

vieiramanoel (Tue, 06 Nov 2018 18:52:15 GMT):
hey guys, I was checking https://fabric-sdk-node.github.io/release-1.3/Client.html#createChannel the documentation says: ```Promise for a result object with status on the acceptance of the create request by the orderer. Note that this is not the confirmation of successful creation of the channel. The client application must poll the orderer to discover whether the channel has been created completely or not.``` how do I poll the orderer to check whether channel already exists or not?

vieiramanoel (Tue, 06 Nov 2018 18:52:15 GMT):
hey guys, I was checking https://fabric-sdk-node.github.io/release-1.3/Client.html#createChannel the documentation says: ```Promise for a result object with status on the acceptance of the create request by the orderer. Note that this is not the confirmation of successful creation of the channel. The client application must poll the orderer to discover whether the channel has been created completely or not.``` how do I poll the orderer to check whether the channel already exists or not?

bretharrison (Tue, 06 Nov 2018 22:42:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ereeYaz5ccXk9FKBe) No I was mistaken, it is working

npc0405 (Wed, 07 Nov 2018 05:37:40 GMT):
start failed: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package /github.com/example_cc/go: import "/github.com/example_cc/go": cannot import absolute path trying to instantiate chaincode getting above error any idea?

Legiit (Wed, 07 Nov 2018 08:52:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3dvK3DEMM4xNjGXYw) Does anyone know a way to add organizations to an existing network, besides using the `configtxlator` tool? I don't want a dependency on that "API"

bestbeforetoday (Wed, 07 Nov 2018 09:51:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=T5iT7kayZE6E3TzF4) @npc0405 Have you got an import in your Go chaincode that reads `import "/github.com/example_cc/go"` but should actually be `import "github.com/example_cc/go"`?

UnaiUrki (Wed, 07 Nov 2018 11:07:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Z79Du3P8HrtYAac2f) @bretharrison So, if Is posible to create another channel, with another name?

UnaiUrki (Wed, 07 Nov 2018 11:07:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Z79Du3P8HrtYAac2f) @bretharrison So, Is posible to create another channel, with another name?

bretharrison (Wed, 07 Nov 2018 11:08:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZvuveswkPZAmoZuir) @UnaiUrki yes, run the `configtxgen` utility with the new channel name

UnaiUrki (Wed, 07 Nov 2018 11:09:27 GMT):
So, to create a new channel, I have to use configxgen by command line? I cant do it from node SDK ?

UnaiUrki (Wed, 07 Nov 2018 11:09:27 GMT):
@bretharrison So, to create a new channel, I have to use configxgen by command line? I cant do it from node SDK ?

UnaiUrki (Wed, 07 Nov 2018 11:19:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eZWA2gdH3AgJW9wW5) @bretharrison So, to create a new channel, I have to use configxgen by command line? I cant do it from node SDK ?

bretharrison (Wed, 07 Nov 2018 11:49:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vf2Cu9s5TEnKezshw) @UnaiUrki yes

enriquebusti (Wed, 07 Nov 2018 12:02:13 GMT):
Has joined the channel.

VadimInshakov (Wed, 07 Nov 2018 12:49:08 GMT):
help me please to install chaincode using sdk: https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PREcZAqFjFDX8f6fg

vieiramanoel (Wed, 07 Nov 2018 13:41:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=twwTyARYPjAFXNJtT) Since no one has replied this is the answer: ``` channelExists = async () => { const channel = this.createChannelWithOrderer(); const txId = this.client.newTransactionID(true); const request: Client.OrdererRequest = { txId }; try { const block = await channel.getGenesisBlock(request); return true; } catch (err) { throw err; } }; createChannelWithOrderer = () => { const channel = new Channel(this.channelName, this.client); channel.addOrderer(this.client.getOrderer('orderer0')); return channel; }; ```

vieiramanoel (Wed, 07 Nov 2018 14:11:54 GMT):
why do I need to [set admin identity](https://fabric-sdk-node.github.io/release-1.3/Client.html#setAdminSigningIdentity) if this is already set in configfile.yaml?

vieiramanoel (Wed, 07 Nov 2018 14:12:29 GMT):
```client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" organization: Org1 # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: # Specific to FileKeyValueStore.js. Can be others if using an alternative impl. For instance, # CouchDBKeyValueStore.js would require an object here for properties like url, db name, etc. path: "/tmp/hfc-kvs/org1" # Specific to the CryptoSuite implementation. Software-based implementations like # CryptoSuite_ECDSA_AES.js requires a key store. PKCS#11 based implementations does # not. cryptoStore: # Specific to the underlying KeyValueStore that backs the crypto key store. path: "/tmp/hfc-cvs/org1" # [Optional]. Specific to Composer environment #wallet: wallet-name # # list of participating organizations in this network # organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com # [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: - ca-org1 adminPrivateKey: path: ../fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/9ef29c2fa6759c85b2bd6442180f339aeb947285294b1a17e465662339f0f08b_sk signedCert: path: ../fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem ````

vieiramanoel (Wed, 07 Nov 2018 14:12:29 GMT):
```client: organization: Org1 credentialStore: path: "/tmp/hfc-kvs/org1" cryptoStore: path: "/tmp/hfc-cvs/org1" organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com certificateAuthorities: - ca-org1 adminPrivateKey: path: ../fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/9ef29c2fa6759c85b2bd6442180f339aeb947285294b1a17e465662339f0f08b_sk signedCert: path: ../fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem ````

vieiramanoel (Wed, 07 Nov 2018 14:12:29 GMT):
```client: organization: Org1 credentialStore: path: "/tmp/hfc-kvs/org1" cryptoStore: path: "/tmp/hfc-cvs/org1" organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com certificateAuthorities: - ca-org1 adminPrivateKey: path: ../fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/9ef29c2fa6759c85b2bd6442180f339aeb947285294b1a17e465662339f0f08b_sk signedCert: path: ../fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem ````

vieiramanoel (Wed, 07 Nov 2018 14:14:14 GMT):
With my client instance I'm able to: create channel, install chaincode, but I can't `queryInstalledChaincodes()` this returns me ```Error: No identity has been assigned to this client at Client._getSigningIdentity (/home/vieirinho/goledger/aws-deploy/network-api/node_modules/fabric-client/lib/Client.js:1173:11) at Client.queryInstalledChaincodes (/home/vieirinho/goledger/aws-deploy/network-api/node_modules/fabric-client/lib/Client.js:930:23)```

jrosmith (Wed, 07 Nov 2018 14:53:50 GMT):
@VadimInshakov try #fabric-sdk-go

jrosmith (Wed, 07 Nov 2018 14:54:47 GMT):
@vieiramanoel the node sdk is stateful, your client instance needs a [user context](https://fabric-sdk-node.github.io/release-1.3/Client.html#setUserContext__anchor)

vieiramanoel (Wed, 07 Nov 2018 14:57:24 GMT):
@jrosmith What I didn't understand is why can I do admin that only admin can do

vieiramanoel (Wed, 07 Nov 2018 14:57:24 GMT):
@jrosmith What I don't understand is why can I do admin that only admin can do

vieiramanoel (Wed, 07 Nov 2018 14:57:24 GMT):
@jrosmith What I don't understand is why can I do operations that only admin can do

vieiramanoel (Wed, 07 Nov 2018 14:57:40 GMT):
but I can't query installed chaincodes?

amolpednekar (Wed, 07 Nov 2018 15:39:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gGJK8Eqt9eCH99FiC) @vieiramanoel like jro said, you client instance needs to set a user context; this could be the peer admin or even a user that you enroll look at fabric-samples repo, lot of examples for NodeJS available

vieiramanoel (Wed, 07 Nov 2018 16:08:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DWK4LRCdX5wcKnWa2) @amolpednekar @amolpednekar, I'm trying to understand the sdk itself: I don't understand why I can perform operations on channel (such as create the channel itself, join peers into it, install chaincode on all peers) and its peers for the org that my sdk is set, but I can't do a simple query on peers?

vieiramanoel (Wed, 07 Nov 2018 16:08:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DWK4LRCdX5wcKnWa2) @amolpednekar, I'm trying to understand the sdk itself: I don't understand why I can perform operations on channel (such as create the channel itself, join peers into it, install chaincode on all peers) and its peers for the org that my sdk is set, but I can't do a simple query on peers?

vieiramanoel (Wed, 07 Nov 2018 16:08:24 GMT):
take a look at my config.yaml

vieiramanoel (Wed, 07 Nov 2018 16:08:30 GMT):
the user context is set there

amolpednekar (Wed, 07 Nov 2018 17:07:44 GMT):
the usercontext would actually be set in your js code, something like this - https://github.com/hyperledger/fabric-samples/blob/94c21eb9bd6f6ac808e189259bc1abec756694e6/balance-transfer/app/helper.js#L52

amolpednekar (Wed, 07 Nov 2018 17:08:02 GMT):
and then use this client instance to do what you want

vieiramanoel (Wed, 07 Nov 2018 17:30:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2nTxMhSbbAh9enB9h) @amolpednekar ok, I guess this is the last question: https://github.com/hyperledger/fabric-samples/blob/94c21eb9bd6f6ac808e189259bc1abec756694e6/balance-transfer/artifacts/network-config.yaml

vieiramanoel (Wed, 07 Nov 2018 17:31:09 GMT):
that line you sent tries to get user from this ^ file

vieiramanoel (Wed, 07 Nov 2018 17:31:39 GMT):
but it has anything about a user to used in getUserContext()

vieiramanoel (Wed, 07 Nov 2018 17:31:39 GMT):
but it has anything about a user to be used in getUserContext()

vieiramanoel (Wed, 07 Nov 2018 18:06:29 GMT):
I really don't get it sorry

ahern077 (Wed, 07 Nov 2018 18:34:27 GMT):
Has joined the channel.

vieiramanoel (Wed, 07 Nov 2018 20:04:54 GMT):
@amolpednekar @jrosmith How can I access these fields bellow?

vieiramanoel (Wed, 07 Nov 2018 20:04:59 GMT):
```adminPrivateKey: path: ../fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/9ef29c2fa6759c85b2bd6442180f339aeb947285294b1a17e465662339f0f08b_sk signedCert: path: ../fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem ```

vieiramanoel (Wed, 07 Nov 2018 20:05:35 GMT):
I want the path to adminPrivateKey, signedCert (which are at my config.yaml)

vieiramanoel (Wed, 07 Nov 2018 20:05:48 GMT):
from client or something else

vieiramanoel (Wed, 07 Nov 2018 20:19:41 GMT):
I've been able to perform the query doing: ``` isChaincodeInstalled = async (chaincode) => { await this.client.initCredentialStores(); this.client.setUserContext({ username: 'admin', password: 'adminpw' }); this.getAllPeers().map(async (peer) => { console.log(peer, await this.client.queryInstalledChaincodes(peer, true)); }); };```

vieiramanoel (Wed, 07 Nov 2018 20:19:41 GMT):
I've been able to perform the query doing: ``` isChaincodeInstalled = async (chaincode) => { await this.client.initCredentialStores(); this.client.setUserContext({ username: 'admin', password: 'adminpw' }); this.getAllPeers().map(async (peer) => { console.log(peer, await this.client.queryInstalledChaincodes(peer, true)); }); }; getAllPeers = () => { const orgName: string = this.client.getMspid(); const targets: Client.Peer[] = this.client.getPeersForOrg(orgName); return targets; };```

vieiramanoel (Wed, 07 Nov 2018 20:19:53 GMT):
the problem is `this.client.setUserContext({ username: 'admin', password: 'adminpw' });`

vieiramanoel (Wed, 07 Nov 2018 20:20:04 GMT):
this are my ca credentials

vieiramanoel (Wed, 07 Nov 2018 20:20:20 GMT):
they have nothing to do with the fabric network itself

vieiramanoel (Wed, 07 Nov 2018 20:20:27 GMT):
why does it works??

vieiramanoel (Wed, 07 Nov 2018 20:20:27 GMT):
why does it work??

enyalete (Wed, 07 Nov 2018 20:27:59 GMT):
Has joined the channel.

enyalete (Wed, 07 Nov 2018 20:28:05 GMT):
Hello. I'm trying to register a user to the sample fabric network using the online tutorial but I'm getting fabric-client module not found. I've removed and reinstalled nodejs and npm without success. Any pointers would be greatly appreciated. I'm new to fabric. Thanks

VadimInshakov (Wed, 07 Nov 2018 22:57:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5GruSgrCywHKesE99) @jrosmith but I set the context, please look at line 25: https://codeshare.io/arQe1q

VadimInshakov (Wed, 07 Nov 2018 22:57:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iBKnnyKB3R8yWgimi) @jrosmith but I set the context, please look at line 25: https://codeshare.io/arQe1q

ynamiki (Thu, 08 Nov 2018 00:30:07 GMT):
Has joined the channel.

ynamiki (Thu, 08 Nov 2018 00:34:56 GMT):
I have created FABN-994, then submitted a patch to Gerrit, and the patch was merged. But the status of the issue is still "UNVERIFIED". How do I change the status to "CLOSED". https://jira.hyperledger.org/browse/FABN-994

ascatox (Thu, 08 Nov 2018 09:10:27 GMT):
Hi All! I'm trying to develop a node application on *Windows 10 platform*, but I'm encountering lot of problems with the fabric-client npm module installation!

ascatox (Thu, 08 Nov 2018 09:12:44 GMT):
in particular with grpc module, I couldn't install, I always got an error, making impossible to develop fabric applications with this *OS*. has someone solutions to use Windows with fabric node client? Thanks all in advance!!!

ascatox (Thu, 08 Nov 2018 09:12:44 GMT):
in particular with *grpc module*, I couldn't install, I always got an error, making impossible to develop fabric applications with this *OS*. has someone solutions to use Windows with fabric node client? Thanks all in advance!!!

ascatox (Thu, 08 Nov 2018 09:12:44 GMT):
in particular with *grpc module*, I couldn't install, I always got an error, making impossible to develop fabric applications with this *OS*. Has someone solutions to use Windows with fabric node client? Thanks all in advance!!!

bestbeforetoday (Thu, 08 Nov 2018 09:34:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mYjoYtEnrYu3MfPSa) @ynamiki You just need to change states on the Jira to move it through the workflow to closed. Try to _View Workflow_ link to the right of the status to get the idea, then start with clicking *Accept* at the top of the Jira. I think you need to be logged in to view those options

Legiit (Thu, 08 Nov 2018 09:55:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JLcLPZPpGA9QQAnx7) Anyone a clue? :smiley:

bretharrison (Thu, 08 Nov 2018 10:39:04 GMT):
This is a convenience method to enroll if needed when using a common connection profile. It will only work when the client instance has been loaded with a common connection profile which contains a definition of a certificate authority and the client section of the profile points to that certificate authority.

bretharrison (Thu, 08 Nov 2018 10:43:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pD8SxMggmZYLJhjLf) @vieiramanoel The `client.intiCredentialStores()` requires that the client be loaded with a common connection profile also referred to as a network config https://fabric-sdk-node.github.io/release-1.3/Client.html#initCredentialStores__anchor

feitnomore (Thu, 08 Nov 2018 10:48:38 GMT):
Has joined the channel.

feitnomore (Thu, 08 Nov 2018 10:48:53 GMT):
if I'm using a policy -P "AND('Org1.member','Org2.member','Org3.member')", is there anything special I should consider on my NodeJS application in order to get the endorsement correctly working? I'm having trouble with this...

bretharrison (Thu, 08 Nov 2018 10:50:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=h6wH8Z6soTmzSfC6d) @vieiramanoel There are no actual methods on the `Client` class to get at a loaded configuration, it was assumed since the application has loaded it that it already had it. However you can get to it by the internal name `client._network_config` for now. Open a JIRA if you would like to have a change put in to have some getters and setters.

bretharrison (Thu, 08 Nov 2018 10:56:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oL9jSJEg7kBbZqoee) @vieiramanoel See the following on how an admin user from a loaded config may be used https://github.com/hyperledger/fabric-sdk-node/blob/release-1.3/test/integration/only-admin.js

VenkatThota (Thu, 08 Nov 2018 11:13:36 GMT):
Has joined the channel.

vieiramanoel (Thu, 08 Nov 2018 12:31:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vXbCSpWSXzZrMtEmx) @bretharrison thanks for your reply! It clarifies some questions that I had yesterday, I can see value of `client._adminSigningIdentity`, so why does the sdk says that I've no identity assigned to client if I try to query installed chaincodes?

vieiramanoel (Thu, 08 Nov 2018 12:31:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vXbCSpWSXzZrMtEmx) @bretharrison thanks for your reply! It clarifies some questions that I had yesterday, I can see value of `client._adminSigningIdentity`, so why does the sdk says that I've no identity assigned to client if I try without set a userContext to query installed chaincodes?

vieiramanoel (Thu, 08 Nov 2018 12:33:12 GMT):
more than that: why does the query works if I call the line `client.setUserContext({ username: 'admin', password: 'adminpw' });`

vieiramanoel (Thu, 08 Nov 2018 13:15:48 GMT):
I've found my problem:

vieiramanoel (Thu, 08 Nov 2018 13:18:08 GMT):
even `credentialStore` is set ```client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" organization: Org1 # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: # Specific to FileKeyValueStore.js. Can be others if using an alternative impl. For instance, # CouchDBKeyValueStore.js would require an object here for properties like url, db name, etc. path: "/tmp/hfc-kvs/org1" # Specific to the CryptoSuite implementation. Software-based implementations like # CryptoSuite_ECDSA_AES.js requires a key store. PKCS#11 based implementations does # not. cryptoStore: # Specific to the underlying KeyValueStore that backs the crypto key store. path: "/tmp/hfc-cvs/org1"``` and call `await client.initCredentialStores()` My folder `/tmp/hfc-cvs/org1` is empty

vieiramanoel (Thu, 08 Nov 2018 13:18:08 GMT):
even with `credentialStore` is set ```client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" organization: Org1 # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: # Specific to FileKeyValueStore.js. Can be others if using an alternative impl. For instance, # CouchDBKeyValueStore.js would require an object here for properties like url, db name, etc. path: "/tmp/hfc-kvs/org1" # Specific to the CryptoSuite implementation. Software-based implementations like # CryptoSuite_ECDSA_AES.js requires a key store. PKCS#11 based implementations does # not. cryptoStore: # Specific to the underlying KeyValueStore that backs the crypto key store. path: "/tmp/hfc-cvs/org1"``` and call `await client.initCredentialStores()` My folder `/tmp/hfc-cvs/org1` is empty

vieiramanoel (Thu, 08 Nov 2018 13:18:08 GMT):
even with `credentialStore` is set ```client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" organization: Org1 # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: # Specific to FileKeyValueStore.js. Can be others if using an alternative impl. For instance, # CouchDBKeyValueStore.js would require an object here for properties like url, db name, etc. path: "/tmp/hfc-kvs/org1" # Specific to the CryptoSuite implementation. Software-based implementations like # CryptoSuite_ECDSA_AES.js requires a key store. PKCS#11 based implementations does # not. cryptoStore: # Specific to the underlying KeyValueStore that backs the crypto key store. path: "/tmp/hfc-cvs/org1"``` and calling `await client.initCredentialStores()` My folder `/tmp/hfc-cvs/org1` is empty

vieiramanoel (Thu, 08 Nov 2018 13:19:22 GMT):
And I still dont understand why even having `client._adminSigningIdentity` set I need to set a userContext to my client in order to request client.queryInstalledChaincodes() :thinking:

mat0pad (Thu, 08 Nov 2018 22:21:04 GMT):
@bretharrison Colud you explain the proper usage of the ChannelEve t

mat0pad (Thu, 08 Nov 2018 22:21:04 GMT):
@bretharrison Colud you explain the proper usage of the ChannelEventhub vs the old way

mat0pad (Thu, 08 Nov 2018 22:21:04 GMT):
@bretharrison Colud you explain the proper usage of the ChannelEventhub vs the old way? Also should the first peer always be an anchor peer then?

Randyshu2018 (Fri, 09 Nov 2018 02:52:12 GMT):
hi,all does fabric-sdk-node support multi transactionIDs query?

LevinLMKwong (Fri, 09 Nov 2018 04:59:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EPPrPSu7s5BTBaZxT) @vieiramanoel Did you set the `useAdmin` flag to true? https://github.com/hyperledger/fabric-sdk-node/blob/release-1.3/fabric-client/lib/Client.js#L916

LevinLMKwong (Fri, 09 Nov 2018 05:03:29 GMT):
@bretharrison Is there going to be an example on how to add organization to the network using node sdk? I am currently migrating my administration functions (create channel, join channel, etc) from CLI to SDK but get stuck at add organization. The problem I don't know how to do is to translate an `org.json` from `configtxgen printOrg` to a correct `config update envelop` and further package into a channel config.

LevinLMKwong (Fri, 09 Nov 2018 05:03:29 GMT):
@bretharrison Is there going to be an example on how to add organization to the network using node sdk? I am currently migrating my administration functions (create channel, join channel, etc) from CLI to SDK but get stuck at add organization. The problem is I don't know how to translate an `org.json` from `configtxgen printOrg` to a correct `config update envelop` and further package into a channel config.

LevinLMKwong (Fri, 09 Nov 2018 05:05:30 GMT):
The CLI version is heavily depending on configtxlator, it would be awesome if we have similar modules in node sdk.

VadimInshakov (Fri, 09 Nov 2018 08:09:48 GMT):
@bretharrison https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fcCSFBZDem4tXLRit

LevinLMKwong (Fri, 09 Nov 2018 09:20:22 GMT):
@VadimInshakov I cannot open your codeshare link

LevinLMKwong (Fri, 09 Nov 2018 09:30:44 GMT):
@VadimInshakov I checked your script and fabcar example's enrollAdmin.js. I think the problem is the MSP of the admin identity in your channel MSP is different from the one you enrolled from fabric-ca.

LevinLMKwong (Fri, 09 Nov 2018 09:31:13 GMT):
You may need to provide how your channel is created

vieiramanoel (Fri, 09 Nov 2018 12:17:29 GMT):
I'm not sure if I had tried, let me see here. Thanks in advance! @LevinLMKwong [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MFq8DJNSepGz9FPX3)

vieiramanoel (Fri, 09 Nov 2018 12:17:53 GMT):
I'm not sure if I had tried, let me see here. Thanks in advance! @LevinLMKwong [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MFq8DJNSepGz9FPX3)

vieiramanoel (Fri, 09 Nov 2018 12:31:40 GMT):
@LevinLMKwong Thanks a lot! it worked, little by little I'm starting to understanding node-sdk arch.

feitnomore (Fri, 09 Nov 2018 12:55:48 GMT):
Hello, I've created a Hyperledger Fabric Network over Kubernetes with 4 Orgs, 1 Peer each, + 1 orderer, and I'm trying to use a policy -P "AND('Org1.member','Org2.member','Org3.member','Org4.member')" but I'm not having success. People told me I would not be able to fire a transaction from command line for a policy like that because I need to collect endorsement from every organization, so I've tried with Node SDK, but it is still not working. Any help would be much appreciated. I have all the config files and log files available if needed.

VadimInshakov (Fri, 09 Nov 2018 13:07:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gqAGkqKxZ5uWzNtao) @LevinLMKwong I started network using `startnetwork.sh` script: https://github.com/hyperledger/fabric-samples/blob/release-1.3/fabcar/startFabric.sh So, I have Org1MSP, and this MSP name used in my script too.

vieiramanoel (Fri, 09 Nov 2018 13:11:31 GMT):
another thing that I could not perform was use service discovery, following this tutorial: https://fabric-sdk-node.github.io/release-1.3/tutorial-discovery.html all I got is the peer which is at config file

SamRasha (Fri, 09 Nov 2018 14:11:04 GMT):
Has joined the channel.

vieiramanoel (Fri, 09 Nov 2018 14:35:31 GMT):
```getAllPeers = (discover?: boolean) => { const orgName: string = this.client.getMspid(); const targets: Client.Peer[] = this.client.getPeersForOrg(orgName); if (discover && targets.length > 0) { const channel: Channel = this.createChannelWithOrderer(); channel.addPeer(targets[0], this.client.getMspid()); channel.initialize({ discover: true }).then(() => { channel.getDiscoveryResults().then((results) => { console.log(results.peers_by_org[this.client.getMspid()]); return results.peers_by_org[this.client.getMspid()].peers.map(peer => peer.name); }); }); } return targets; }; ``` but all I got is

vieiramanoel (Fri, 09 Nov 2018 14:40:21 GMT):
```{ peers: [ { mspid: 'Org1MSP', endpoint: 'peer0.org1.example.com:7051', ledger_height: [Object], chaincodes: [], name: 'peer0.org1.example.com:7051' } ] }```

vieiramanoel (Fri, 09 Nov 2018 15:20:28 GMT):
when I have 2 peers on org, but just one described in file

vieiramanoel (Fri, 09 Nov 2018 15:21:51 GMT):
how do I get all peers that talk with anchor trough gossip

minollo (Fri, 09 Nov 2018 15:25:23 GMT):
Has joined the channel.

minollo (Fri, 09 Nov 2018 15:26:22 GMT):
Is there a way to fetch a chaincode's endorsement policy definition through the node SDK?

bretharrison (Fri, 09 Nov 2018 15:30:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8ShsjRxTtQegKdPDB) @minollo No

bretharrison (Fri, 09 Nov 2018 15:37:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qp9nJmt8jzQiMjvZu) @vieiramanoel Use the `client.queryPeers(target_peer)` - target peer may be a peer instance or the name of the peer in the file

vieiramanoel (Fri, 09 Nov 2018 15:37:44 GMT):
I'll try

bretharrison (Fri, 09 Nov 2018 15:43:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QyH34EK2LYddX9TtY) @feitnomore Are you sending the proposal to at least four peers, one in each organization ?

bretharrison (Fri, 09 Nov 2018 15:44:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Aw22X7Np5T8sCSisK) @LevinLMKwong You may wish to open a JIRA to push for this function

bretharrison (Fri, 09 Nov 2018 15:45:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2LjMW4sEmHit87xev) @Randyshu2018 No

nfrunza (Fri, 09 Nov 2018 15:45:54 GMT):
Dear community we need contributors for HL Explorer, we are very limited in resource

vieiramanoel (Fri, 09 Nov 2018 15:47:56 GMT):
@bretharrison Thanks! Maybe I should report a jyra: client.querypeers() is not described in index.d.ts

vieiramanoel (Fri, 09 Nov 2018 15:49:01 GMT):
so typescript complains about nonexistent property

vieiramanoel (Fri, 09 Nov 2018 15:49:02 GMT):
error TS2339: Property 'queryPeers' does not exist on type 'Client'.

vieiramanoel (Fri, 09 Nov 2018 15:49:02 GMT):
`error TS2339: Property 'queryPeers' does not exist on type 'Client'.`

vieiramanoel (Fri, 09 Nov 2018 15:49:27 GMT):
it isn't a big thing, once the code is still compiled and works

feitnomore (Fri, 09 Nov 2018 15:52:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YaMjhRHYzKosqAA4i) @bretharrison I have .addPeer() to the channel, for each peer... 1 peer per Org...

bretharrison (Fri, 09 Nov 2018 15:57:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CkDqCwwXqsNZEsxmF) @mat0pad ChannelEventHub API's are basically the same way as the old EventHub. The best way to create ChannelEventHub is to get it from a Channel instance. ``` channel.getChannelEventHub(); ``` There are many added features of the ChannelEventHub, -- able to start and/or end on any block -- auto unregister and/or disconnect -- uses the same Peer port as other Peer services (therefore the same connection information)

bretharrison (Fri, 09 Nov 2018 15:57:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CkDqCwwXqsNZEsxmF) @mat0pad ChannelEventHub API's are basically the same way as the old EventHub. The best way to create ChannelEventHub is to get it from a Channel instance. ``` channel.getChannelEventHub(); // uses peers that are assigned to this channel channel.newChannelEventHub(); ``` There are many added features of the ChannelEventHub, -- able to start and/or end on any block -- auto unregister and/or disconnect -- uses the same Peer port as other Peer services (therefore the same connection information)

bretharrison (Fri, 09 Nov 2018 15:57:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CkDqCwwXqsNZEsxmF) @mat0pad ChannelEventHub API's are basically the same way as the old EventHub. The best way to create ChannelEventHub is to get it from a Channel instance. ``` channel.getChannelEventHub(); // uses peers that are assigned to this channel channel.newChannelEventHub(); ``` There are many added features of the ChannelEventHub, -- able to start and/or end on any block -- auto unregister and/or disconnect -- uses the same Peer port as other Peer services (therefore the same connection information) https://fabric-sdk-node.github.io/release-1.3/tutorial-channel-events.html

bretharrison (Fri, 09 Nov 2018 15:57:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CkDqCwwXqsNZEsxmF) @mat0pad ChannelEventHub API's are basically the same way as the old EventHub. The best way to create ChannelEventHub is to get it from a Channel instance. ``` channel.getChannelEventHub(); // uses peers that are assigned to this channel channel.newChannelEventHub(); ``` There are many added features of the ChannelEventHub, -- able to start and/or end on any block -- auto unregister and/or disconnect -- uses the same Peer port as other Peer services (therefore the same connection information) https://fabric-sdk-node.github.io/release-1.3/tutorial-channel-events.html

bretharrison (Fri, 09 Nov 2018 16:03:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3aNSbFmPjLAg5nFLq) @feitnomore do have each of these peers in the `targets` request attribute when calling the `sendTransactionProposal`

bretharrison (Fri, 09 Nov 2018 16:03:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3aNSbFmPjLAg5nFLq) @feitnomore do you have each of these peers in the `targets` request attribute when calling the `sendTransactionProposal`

minollo (Fri, 09 Nov 2018 16:10:12 GMT):
Has left the channel.

bretharrison (Fri, 09 Nov 2018 16:10:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qx5Jkn2Z2hRyYz8Hc) @vieiramanoel The `useAdmin` parameter on many of the calls indicates that the NodeSDK calls should use the assigned admin identity, this will then skip the checking of the user context it's identity.

bretharrison (Fri, 09 Nov 2018 16:10:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qx5Jkn2Z2hRyYz8Hc) @vieiramanoel The `useAdmin` parameter on many of the calls indicates that the NodeSDK calls should use the assigned admin identity, this will then skip the checking of the user context it's identity. On other calls where a transactionID object is required, the transactionID must be created using the admin identity. Note that transactionIDs are generated based on an identity and these will be checked by fabric.

bretharrison (Fri, 09 Nov 2018 16:10:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qx5Jkn2Z2hRyYz8Hc) @vieiramanoel The `useAdmin` parameter on many of the calls indicates that the NodeSDK calls should use the assigned admin identity, this will then skip the checking of the user context's identity. On other calls where a transactionID object is required, the transactionID must be created using the admin identity. Note that transactionIDs are generated based on an identity and these will be checked by fabric.

bretharrison (Fri, 09 Nov 2018 16:10:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qx5Jkn2Z2hRyYz8Hc) @vieiramanoel The `useAdmin` parameter on many of the calls indicates that the NodeSDK calls should use the assigned admin identity, this will then skip the checking of the user context's identity. On other calls where a transactionID object is required, the transactionID must be created using the admin identity in orderer to make the call using the admin identity and not the user context. Note that transactionIDs are generated based on an identity and these will be checked by fabric.

vieiramanoel (Fri, 09 Nov 2018 16:19:03 GMT):
@bretharrison https://jira.hyperledger.org/browse/FABN-1009 I'll try to see this

feitnomore (Fri, 09 Nov 2018 16:47:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3eKrmpP7jCyfoLncr) @bretharrison no, any example on how to implement that?

feitnomore (Fri, 09 Nov 2018 16:49:05 GMT):
just assign my peers to targets?

bretharrison (Fri, 09 Nov 2018 17:38:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sRb7vwDfJMYttHAWt) @feitnomore ``` const targets = channel.getPeers(); // will return all peers added to the channel const request = { ```

bretharrison (Fri, 09 Nov 2018 17:38:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sRb7vwDfJMYttHAWt) @feitnomore ``` const targets = channel.getPeers(); // will return all peers added to the channel const request = { targets: targets,chaincodeId : chaincodeId, fcn: fcn, args: args, txId: tx_id, } ```

bretharrison (Fri, 09 Nov 2018 17:38:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sRb7vwDfJMYttHAWt) @feitnomore ``` const targets = channel.getPeers(); // will return all peers added to the channel const request = { targets: targets, chaincodeId : chaincodeId, fcn: fcn, args: args, txId: tx_id, } ```

bretharrison (Fri, 09 Nov 2018 17:38:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sRb7vwDfJMYttHAWt) @feitnomore ``` const targets = channel.getPeers(); // will return all peers added to the channel const request = { targets: targets, chaincodeId : chaincodeId, fcn: fcn, args: args, txId: tx_id, } ``` however you should not have to pass a `targets` when the peers have been added to the channel, all peers added will be used for endorsement

bretharrison (Fri, 09 Nov 2018 17:38:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sRb7vwDfJMYttHAWt) @feitnomore ``` const targets = channel.getPeers(); // will return all peers added to the channel const request = { targets: targets, chaincodeId : chaincodeId, fcn: fcn, args: args, txId: tx_id }; const results = await channel.sendTransactionProposal(request); ``` however you should not have to pass a `targets` when the peers have been added to the channel, all peers added will be used for endorsement

feitnomore (Fri, 09 Nov 2018 18:26:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bi4mbijtwcvuzTELp) @bretharrison So, if that is not the case, than what you think should be my problem?

bretharrison (Fri, 09 Nov 2018 19:28:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EENqivzp4C6KAkfhr) @feitnomore maybe a trace will help `export HFC_LOGGING='{"debug":"console"}'`

feitnomore (Fri, 09 Nov 2018 19:30:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GSgnBCTi5Wg79jvAn) @bretharrison I feel like its a certificate issue... I have the logs, can you take a look?

feitnomore (Fri, 09 Nov 2018 19:51:11 GMT):
I see lots of: ``` 2018-10-29 16:17:30.884 UTC [cauthdsl] func2 -> DEBU c37 0xc42000e028 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected OrdererMSP, got Org1MSP) ```

ynamiki (Sun, 11 Nov 2018 11:54:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nW8EyKxCbnHHmiFqc) @bestbeforetoday @bestbeforetoday Thanks for the info. I have closed my issue.

mat0pad (Sun, 11 Nov 2018 20:12:21 GMT):
Using Fabric Client 1.3.0. with multiple peers of the same organisation. What reasons are there for why fabric client is reporting `14 UNAVAILABLE: Connect Failed` when doing operations with the peer. I'm using 3 peers in the samme organisation. What seems weird is that I can always connect to the last peer somehow. I've looked through the sdk integration tests and the fabric samples (not all updated to 1.3), but I didn't find anything amiss. My crypto-config.yaml file looks like: ` OrdererOrgs: - Name: OrdererOrg Domain: orderer.org CommonName: orderer.org Specs: - Hostname: orderer0 CommonName: "{{.Hostname}}" PeerOrgs: - Name: SOME_ORG Domain: some.org Template: Count: 3 # The number of peers Users: Count: 1 # The number of user accounts in addition to Admin # SANS: # - "localhost" ` If I try to connect to peer2 (the last peer) there are no issues, but when I try to connect to peer0 or peer1 I get `Error 14`. Nmap and netstat clearly shows they are there and listening? One thing I've noticed is that it's always the peer that is elected as Leader that I can connect to. ` { Error: 14 UNAVAILABLE: Connect Failed at Object.exports.createStatusError (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/common.js:87:15) at ClientDuplexStream._emitStatusIfDone (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client.js:235:26) at ClientDuplexStream._receiveStatus (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client.js:213:8) at Object.onReceiveStatus (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1290:15) at InterceptingListener._callNext (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at /Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1110:18 code: 14, metadata: Metadata { _internal_repr: {} }, details: 'Connect Failed' } error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001 Error: Failed to connect before the deadline URL:grpcs://localhost:8001 at checkState (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client.js:827:16) ` My docker-compose (version 3.5) file: ` ... # orderer & ca ^ peer0.some.org: container_name: peer0.some.org image: peer0.some.org env_file: ./base/peer-base.env environment: - CORE_PEER_ID=peer0.some.org - CORE_PEER_ADDRESS=peer0.some.org:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.some.org:7051 - CORE_PEER_LOCALMSPID=SOMEORGMSP - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0.some.org:5984 #- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.some.org:7051 working_dir: /peer command: peer node start volumes: - /var/run/:/host/var/run/ ports: - 8001:7051 depends_on: - orderer0 - couchdb0.some.org networks: - default peer1.some.org: container_name: peer1.some.org image: peer1.some.org env_file: ./base/peer-base.env environment: - CORE_PEER_ID=peer1.some.org - CORE_PEER_ADDRESS=peer1.some.org:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.some.org:7051 - CORE_PEER_LOCALMSPID=SOMEORGMSP - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1.some.org:5984 #- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.some.org:7051 working_dir: /peer command: peer node start volumes: - /var/run/:/host/var/run/ ports: - 8002:7051 depends_on: - orderer0 - couchdb1.some.org networks: - default # ... couchdb's `

mat0pad (Sun, 11 Nov 2018 20:12:21 GMT):
Using Fabric Client 1.3.0. with multiple peers of the same organisation. What reasons are there for why fabric client is reporting `14 UNAVAILABLE: Connect Failed` when doing operations with the peer. I'm using 3 peers in the samme organisation. What seems weird is that I can always connect to the last peer somehow. I've looked through the sdk integration tests and the fabric samples (not all updated to 1.3), but I didn't find anything amiss. My crypto-config.yaml file looks like: ``` OrdererOrgs: - Name: OrdererOrg Domain: orderer.org CommonName: orderer.org Specs: - Hostname: orderer0 CommonName: "{{.Hostname}}" PeerOrgs: - Name: SOME_ORG Domain: some.org Template: Count: 3 # The number of peers Users: Count: 1 # The number of user accounts in addition to Admin # SANS: # - "localhost" ``` If I try to connect to peer2 (the last peer) there are no issues, but when I try to connect to peer0 or peer1 I get `Error 14`. Nmap and netstat clearly shows they are there and listening? One thing I've noticed is that it's always the peer that is elected as Leader that I can connect to. ``` { Error: 14 UNAVAILABLE: Connect Failed at Object.exports.createStatusError (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/common.js:87:15) at ClientDuplexStream._emitStatusIfDone (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client.js:235:26) at ClientDuplexStream._receiveStatus (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client.js:213:8) at Object.onReceiveStatus (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1290:15) at InterceptingListener._callNext (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at /Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1110:18 code: 14, metadata: Metadata { _internal_repr: {} }, details: 'Connect Failed' } error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8001 Error: Failed to connect before the deadline URL:grpcs://localhost:8001 at checkState (/Users/SOME_NAME/blockchain-management/tool/node_modules/fabric-client/node_modules/grpc/src/client.js:827:16) ``` My docker-compose (version 3.5) file: ``` ... # orderer & ca ^ peer0.some.org: container_name: peer0.some.org image: peer0.some.org env_file: ./base/peer-base.env environment: - CORE_PEER_ID=peer0.some.org - CORE_PEER_ADDRESS=peer0.some.org:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.some.org:7051 - CORE_PEER_LOCALMSPID=SOMEORGMSP - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0.some.org:5984 #- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.some.org:7051 working_dir: /peer command: peer node start volumes: - /var/run/:/host/var/run/ ports: - 8001:7051 depends_on: - orderer0 - couchdb0.some.org networks: - default peer1.some.org: container_name: peer1.some.org image: peer1.some.org env_file: ./base/peer-base.env environment: - CORE_PEER_ID=peer1.some.org - CORE_PEER_ADDRESS=peer1.some.org:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.some.org:7051 - CORE_PEER_LOCALMSPID=SOMEORGMSP - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1.some.org:5984 #- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.some.org:7051 working_dir: /peer command: peer node start volumes: - /var/run/:/host/var/run/ ports: - 8002:7051 depends_on: - orderer0 - couchdb1.some.org networks: - default # ... couchdb's ```

MuhammedHafil (Mon, 12 Nov 2018 07:04:16 GMT):
Can anybody tell me how to fix this error with fabric ca and node sdk? ``` Failed to register: Error: fabric-ca request register failed with errors [[{"code":0,"message":"Registration of 'user2' failed in affiliation validation: Failed getting affiliation 'myorgmsp.department1': : scode: 404, code: 63, msg: Failed to get Affiliation: sql: no rows in result set"}]] ```

MuhammedHafil (Mon, 12 Nov 2018 08:04:03 GMT):
I'm getting `failed TypeError: Cannot read property 'curve' of undefined` when calling `let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret})`

AlexanderZhovnuvaty (Mon, 12 Nov 2018 11:06:37 GMT):
Has left the channel.

sheetal-hlf (Mon, 12 Nov 2018 11:27:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EDf6ss6oZtpe8DjAk) @MuhammedHafil you need to modify the affiliations in the default config file for fabric ca - https://hyperledger-fabric-ca.readthedocs.io/en/latest/serverconfig.html

sheetal-hlf (Mon, 12 Nov 2018 11:28:59 GMT):
the affiliations section have only org1 and org2; whereas you require myorgmsp.department1

MuhammedHafil (Mon, 12 Nov 2018 12:15:55 GMT):
@sheetal-hlf : Thank you

wuqilv (Mon, 12 Nov 2018 16:43:16 GMT):
Has joined the channel.

wuqilv (Mon, 12 Nov 2018 16:56:00 GMT):
Thanks for help! I have encountered such a problem: Promise is rejected: Error: failed to execute transaction error sending: txid ... error sending: txid my env: node version 8.12.0 blockchain-explorer tag:3.8.0 fabric-client 1.3.0 fabric-ca-client 1.3.0 Network is fabric v1.3.0 and the example is first-network my invoke script: ```javascript ... }).then(() => { tx_id = client.newTransactionID(); console.log("Assigning transaction_id: ", tx_id._transaction_id); var request = { targets: targets, chaincodeId: options.chaincode_id, fcn: 'write', args: [tx_id._transaction_id, write_data], chainId: options.channel_id, txId: tx_id }; return channel.sendTransactionProposal(request); }).then((results) => { var proposalResponses = results[0]; var proposal = results[1]; var header = results[2]; let isProposalGood = false; if (proposalResponses && proposalResponses[0].response && proposalResponses[0].response.status === 200) { isProposalGood = true; ``` Is the function "channel.sendTransactionProposal" result of it? problem: ```bash Load privateKey and signedCert Assigning transaction_id: 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: failed to execute transaction 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3: error sending: txid: 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3(mychannel) error sending: txid at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-client/lib/Peer.js:114:16 at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/grpc/src/client.js:586:7 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: failed to execute transaction 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3: error sending: txid: 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3(mychannel) exists at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-client/lib/Peer.js:114:16 at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/grpc/src/client.js:586:7 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: failed to execute transaction 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3: error sending: txid: 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3(mychannel) exists at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-client/lib/Peer.js:114:16 at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/grpc/src/client.js:586:7 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: failed to execute transaction 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3: error sending: txid: 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3(mychannel) exists at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-client/lib/Peer.js:114:16 at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/grpc/src/client.js:586:7 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: failed to execute transaction 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3: error sending: txid: 9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3(mychannel) exists at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-client/lib/Peer.js:114:16 at /opt/gopath/src/github.com/hyperledger/blockchain-explorer/node_modules/grpc/src/client.js:586:7 transaction proposal was good Successfully sent Proposal and received ProposalResponse: Status - 200, message - "", metadata - "9d48d072b64fcfb1f29b48ccf5ffceac922f9636e2a947a81f331562d02b16a3", endorsement signature: 0D ��K)g]XÕש�#q��~�*�eɑ����zdT a�bg���6G��bY�in2-󯎏i ```

VadimInshakov (Mon, 12 Nov 2018 23:08:26 GMT):
help me please to install chaincode using sdk: https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PREcZAqFjFDX8f6fg

LevinLMKwong (Tue, 13 Nov 2018 02:21:37 GMT):
@VadimInshakov Because "admin" cert enrolled from fabric-ca is not in the channel MSP's admincert folder, so basically it is not an admin

GowriR (Tue, 13 Nov 2018 10:30:52 GMT):
Hi, I getting a REQUEST_TIMEOUT while using the channel.sendInstantiateProposal API. Docker logs on peer output is as follows - 2018-10-31 22:42:39.627 UTC [endorser] simulateProposal -> DEBU 291b [][7c550f74] Exit 2018-10-31 22:42:39.627 UTC [endorser] ProcessProposal -> ERRO 291c [][7c550f74] simulateProposal() resulted in chaincode name:"cscc" response status 500 for txid: 7c550f74e27843f04cf2be20b287608b4b56b5ddd412deb303ae3894c09552e1 2018-10-31 22:42:39.627 UTC [endorser] ProcessProposal -> DEBU 291d Exit: request from%!(EXTRA string=172.21.0.1:53420) 2018-10-31 22:42:40.682 UTC [endorser] ProcessProposal -> DEBU 291e Entering: Got request from 172.21.0.1:53432 2018-10-31 22:42:40.682 UTC [protoutils] ValidateProposalMessage -> DEBU 291f ValidateProposalMessage starts for signed proposal 0xc421bcab40 2018-10-31 22:42:40.682 UTC [protoutils] validateChannelHeader -> DEBU 2920 validateChannelHeader info: header type 3

GowriR (Tue, 13 Nov 2018 10:32:08 GMT):
The way I send parameters is as follows: await ClientUtils.instantiateChaincode([Constants.peer0org1], 'mychannel', 'utility_workflow', 'v0', 'init', 'go', '[]', ClientUtils.getUserName(), Constants.ORG1);

GowriR (Tue, 13 Nov 2018 10:32:23 GMT):
Any pointers would be greatly helpful

GowriR (Tue, 13 Nov 2018 11:08:48 GMT):
Peer and orderer versions if required

GowriR (Tue, 13 Nov 2018 11:08:51 GMT):
hypledvm@hypledvm-VirtualBox:~/go/src/utilitypoc/network/acmedevmode$ docker exec -it peer0.org1.acme.com bash onot@9868008e9d56:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer versi peer: Version: 1.1.0 Go version: go1.9.2 OS/Arch: linux/amd64 Experimental features: false Chaincode: Base Image Version: 0.4.6 Base Docker Namespace: hyperledger Base Docker Label: org.hyperledger.fabric Docker Namespace: hyperledger 2018-10-31 23:27:29.015 UTC [main] main -> INFO 001 Exiting..... root@9868008e9d56:/opt/gopath/src/github.com/hyperledger/fabric/peer# exit exit hypledvm@hypledvm-VirtualBox:~/go/src/utilitypoc/network/acmedevmode$ docker exec -it orderer.acme.com bash orderer:599ccd21b:/opt/gopath/src/github.com/hyperledger/fabric# orderer version Version: 1.2.0 Commit SHA: cae2ad4 Go version: go1.10 OS/Arch: linux/amd64

feitnomore (Tue, 13 Nov 2018 12:01:21 GMT):
I'm trying to use a Policy with -P "AND('Org1.Member','Org2.Member','Org3.Member')" and this is not working... I'm getting lots of: ``` 2018-10-29 16:17:30.884 UTC [cauthdsl] func2 -> DEBU c37 0xc42000e028 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected OrdererMSP, got Org1MSP) ```

ApurvTandon (Tue, 13 Nov 2018 14:36:56 GMT):
Hi, could any one tell me if there is a way to look for a set of transactions based on certain parameters from the entire blockchain ? Or do we need to manually iterate through each of the transactions ?

fdu (Tue, 13 Nov 2018 16:05:52 GMT):
Has joined the channel.

GowriR (Wed, 14 Nov 2018 11:47:52 GMT):
Added hash-tags. Is it the right way to add them? saw it on the mailing lists. On Wed, Nov 14, 2018 at 5:08 PM Gowri R wrote: Hello all, I am trying to use the fabric node SDK. All was well with the installation of chaincode. I can see the chaincode in /var/hyperledger/production/chaincodes I try to use sendInstantiateProposal through nodeSDK and I get a timeout. To get more clues, I login into the peer container and execute the following on the command line. root@dd30e03ee9b3:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.acme.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/acme.com/orderers/orderer.acme.com/msp/tlscacerts/tlsca.acme.com-cert.pem -C mychannel -n utility_workflow -v v2 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member','Org3MSP.member')" --logging-level debug 2018-11-01 06:01:54.561 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-11-01 06:01:54.561 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-11-01 06:01:54.579 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-11-01 06:01:54.579 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2018-11-01 06:01:54.579 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled 2018-11-01 06:01:54.579 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0A9F070A6708031A0C08D2ADEADE0510...334D53500A04657363630A0476736363 2018-11-01 06:01:54.579 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: AE0829701BD8EE9821CFA416B533F9EF953D46343BE1684E98A046F5E1889453 Error: Error endorsing chaincode: rpc error: code = Unknown desc = chaincode error (status: 500, message: instantiation policy violation: signature set did not satisfy policy) Any pointers would be helpful.

rthatcher (Wed, 14 Nov 2018 12:27:26 GMT):
@GowriR - I have seen that error when trying to instantiate on a peer - you may have an environment variable set `CORE_PEER_MSPCONFIGPATH` that is pointing to a Peer Identity, where your Instantiate command may require an Admin Identity. In my test the original value was `/etc/hyperledger/peer/msp` and I set it to `/etc/hyperledger/msp/users/Admin\@org1.example.com/msp/` - my instantiate was successful after that.

NavjotSingh1 (Wed, 14 Nov 2018 13:50:22 GMT):
Has joined the channel.

JonasM (Wed, 14 Nov 2018 15:17:02 GMT):
Has joined the channel.

GowriR (Thu, 15 Nov 2018 05:54:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SjLMHDmLorKaRYsys) @rthatcher Thanks @rthatcher. That was absolutely cool and wonderful. The instantiation is not yet successful though. (I shall explain the problem next - my real problem is not the command line but to execute it through node SDK - i was using the command line just to get some clues. Through the node SDK, the client object is with "admin" permissions for ORG1). Now the error on the command line is as follows - oot@dd30e03ee9b3:/opt/gopath/src/github.com/hyperledger/fabric/peer# clear ,'Org3MSP.member')""100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member' 2018-11-01 06:37:35.567 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-11-01 06:37:35.567 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-11-01 06:37:35.570 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-11-01 06:37:35.570 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2018-11-01 06:37:35.571 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled 2018-11-01 06:37:35.572 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0A9F070A6708031A0C08AFBEEADE0510...334D53500A04657363630A0476736363 2018-11-01 06:37:35.573 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: 4465B31B2E63FBF9D9F2657F7E0C8F4F8B4D09FED903BCC71D30CA4CF9868D86 Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package /utilitypoc/chaincode/src: import "/utilitypoc/chaincode/src": cannot import absolute path

GowriR (Thu, 15 Nov 2018 05:54:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SjLMHDmLorKaRYsys) @rthatcher Thanks @rthatcher. That was absolutely cool and wonderful. The instantiation is not yet successful though. (I shall explain the problem next - my real problem is not the command line but to execute it through node SDK - i was using the command line just to get some clues. Through the node SDK, the client object is with "admin" permissions for ORG1). Now the error on the command line is as follows - oot@dd30e03ee9b3:/opt/gopath/src/github.com/hyperledger/fabric/peer# clear ,'Org3MSP.member')""100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member' 2018-11-01 06:37:35.567 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-11-01 06:37:35.567 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-11-01 06:37:35.570 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-11-01 06:37:35.570 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2018-11-01 06:37:35.571 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled 2018-11-01 06:37:35.572 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0A9F070A6708031A0C08AFBEEADE0510...334D53500A04657363630A0476736363 2018-11-01 06:37:35.573 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: 4465B31B2E63FBF9D9F2657F7E0C8F4F8B4D09FED903BCC71D30CA4CF9868D86 Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 *"can't load package: package /utilitypoc/chaincode/src: import "/utilitypoc/chaincode/src": cannot import absolute path*. The installation was through node SDK code - The chaincode src path is set to "CC_SRC_PATH":"../../../../../" . And Constants.logger.info('****************************INSTALL Chaincode for ORG3****************************'); await ClientUtils.installChaincode([Constants.peer0org3], 'utility_workflow', './utilitypoc/chaincode/src/', 'v2', 'go', ClientUtils.getUserName(), Constants.ORG3);

GowriR (Thu, 15 Nov 2018 05:54:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SjLMHDmLorKaRYsys) @rthatcher Thanks @rthatcher. That was absolutely cool and wonderful. The instantiation is not yet successful though. (I shall explain the problem next - my real problem is not the command line but to execute it through node SDK - i was using the command line just to get some clues. Through the node SDK, the client object is with "admin" permissions for ORG1). Now the error on the command line is as follows - oot@dd30e03ee9b3:/opt/gopath/src/github.com/hyperledger/fabric/peer# clear ,'Org3MSP.member')""100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member' 2018-11-01 06:37:35.567 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-11-01 06:37:35.567 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-11-01 06:37:35.570 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-11-01 06:37:35.570 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2018-11-01 06:37:35.571 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled 2018-11-01 06:37:35.572 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0A9F070A6708031A0C08AFBEEADE0510...334D53500A04657363630A0476736363 2018-11-01 06:37:35.573 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: 4465B31B2E63FBF9D9F2657F7E0C8F4F8B4D09FED903BCC71D30CA4CF9868D86 Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 *"can't load package: package /utilitypoc/chaincode/src: import "/utilitypoc/chaincode/src": cannot import absolute path*. The installation was through node SDK code - The chaincode src path is set to "CC_SRC_PATH":"../../../../../" . And Constants.logger.info('****************************INSTALL Chaincode for ORG3****************************'); await ClientUtils.installChaincode([Constants.peer0org3], 'utility_workflow', './utilitypoc/chaincode/src/', 'v2', 'go', ClientUtils.getUserName(), Constants.ORG3); I thought the path given to installChaincode as a parameter is at the host side (not within the docker container). The installation happens successfully. It picks up the file from the host machine and puts the go object *file in /var/hyperledger/production/chaincodes.* *Why is it still searching for this path within the peer container during instantiate?* Any pointers here too would be wonderful.

VadimInshakov (Thu, 15 Nov 2018 08:25:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=29zxmtcE7QCqqo22K) @LevinLMKwong Please, tell me how I need to do it. I just use `fabcar` network from `fabric samples`, and all crypto is stored in `hfc-key-store`. Can you help me with some instructions?

LevinLMKwong (Thu, 15 Nov 2018 08:27:44 GMT):
@VadimInshakov Depends on what you want to do: 1) If you want to enroll admin from fabric-ca, you will need to update the channel MSP using the enrolled admin 2) If you just want to use the sdk, you can construct the admin user using the cryptos in fabric samples instead of enrolling a new admin from fabric-ca.

LevinLMKwong (Thu, 15 Nov 2018 08:27:44 GMT):
@VadimInshakov Depends on what you want to do: 1) If you want to enroll admin from fabric-ca, you will need to update the channel MSP to add the enrolled admin identity 2) If you just want to use the sdk, you can construct the admin user using the cryptos in fabric samples instead of enrolling a new admin from fabric-ca.

LevinLMKwong (Thu, 15 Nov 2018 08:30:05 GMT):
I only know how to do 2), ``` let adminUser = await client.createUser( {username: admins[0].username, mspid: 'XXXMSP', cryptoContent: { privateKeyPEM: Buffer.from( key, 'utf8' ) , signedCertPEM: certificate } }); await client.setUserContext(adminUser); ```

VadimInshakov (Thu, 15 Nov 2018 08:30:30 GMT):
@LevinLMKwong how can I update channel MSP?

LevinLMKwong (Thu, 15 Nov 2018 08:30:51 GMT):
I only know how to update channel MSP using CLI

LevinLMKwong (Thu, 15 Nov 2018 08:31:39 GMT):
Using CLI, you can refer to this https://hyperledger-fabric.readthedocs.io/en/latest/channel_update_tutorial.html

GowriR (Thu, 15 Nov 2018 09:14:19 GMT):
Hello all, How do I set the fully qualified package name for the chaincodePath parameter in ChannelRequest while installing chaincode using "installChaincode" in Clien

GowriR (Thu, 15 Nov 2018 09:14:19 GMT):
Hello all, How do I set the fully qualified package name for the chaincodePath parameter in ChannelRequest while installing chaincode using "installChaincode" in Client. It appends it to the GOPATH enviromment variable and if I just give current directory, it says can't find any GO files there

GowriR (Thu, 15 Nov 2018 12:05:36 GMT):
This error got solved. Now I am getting the error (I am instantiating from DEV chaincode container given in fabric-samples) - Error: Error endorsing chaincode: rpc error: code = Unknown desc = *failed to init chaincode: handler not found for chaincode*

GowriR (Thu, 15 Nov 2018 12:05:54 GMT):
any pointer would be great. Thanks

vijay.bP (Thu, 15 Nov 2018 14:26:12 GMT):
Has joined the channel.

gremp (Thu, 15 Nov 2018 14:47:33 GMT):
Has joined the channel.

gremp (Thu, 15 Nov 2018 14:55:41 GMT):
Hello, I'm trying to join a channel (after creating it successfully) with the node SDK and I'm getting: "Rejecting deliver for deliverBlocks -> WARN 367 172.24.0.1:56538 due to envelope validation error: claimed TLS cert hash is [[#hash1]] but actual TLS cert hash is [[#hash2]]". Every time I try to join the channel the #hash1 parameter is different.... Can anyone point me in the right direction please....? Thanks!

gremp (Thu, 15 Nov 2018 15:01:26 GMT):
I get that error when I'm trying to get the genesisBlock actually

gremp (Thu, 15 Nov 2018 15:01:26 GMT):
I get that error (in the orderer logs) when I'm trying to get the genesisBlock actually

gremp (Thu, 15 Nov 2018 15:01:26 GMT):
I get that error (in the orderer logs) when I'm trying to get the genesisBlock actually

gremp (Thu, 15 Nov 2018 16:22:09 GMT):
Is there any extended documentation for the network-config.yaml (the file that consumes the client.loadFromConfig method)?

GowriR (Fri, 16 Nov 2018 09:19:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zDiNGJdwv268RtpkK) @gremp I have not seen any. It would be nice to know where it is. I use the samples as a reference

gremp (Fri, 16 Nov 2018 10:10:46 GMT):
@GowriR true but if the fabric network architecture is a bit different, its impossible to find out how to set the yaml file correctly

Unni_1994 (Fri, 16 Nov 2018 12:04:48 GMT):
Has joined the channel.

FaizulHassan (Fri, 16 Nov 2018 12:37:39 GMT):
Hi Devs, May I know what is the purpose of transaction ID that were generated that we get as a response after successfully making a transaction ? I ran the fabcar sample..

FaizulHassan (Fri, 16 Nov 2018 12:37:39 GMT):
Hi Devs, May I know what is the purpose of transaction ID that were generated that we get as a response after successfully making a transaction ? I ran the fabcar sample.. is that the right way to query couch DB and show results ? or do the blocks needs to be explored/queried ?

FaizulHassan (Fri, 16 Nov 2018 12:37:39 GMT):
Hi Devs, May I know what is the purpose of transaction ID that were generated which we get as a response after successfully making a transaction ? I ran the fabcar sample.. is that the right way to query couch DB and show results ? or do the blocks needs to be explored/queried ?

FaizulHassan (Fri, 16 Nov 2018 12:37:39 GMT):
Hi Devs, I had gone through fabcar sample.. May I know what is the purpose of transaction ID that were generated which we get as a response after successfully making a transaction ? Does that transactionID be helpful in querying particular block is that the right way to query couch DB and show results ? or do the blocks needs to be explored/queried ?

dave.enyeart (Fri, 16 Nov 2018 14:47:17 GMT):
@FaizulHassan if you have the transaction id you can query the blockchain for the transaction id to see what was done in that transaction and whether it was validated or invalidated.

dave.enyeart (Fri, 16 Nov 2018 14:47:48 GMT):
CouchDB only has current state of all keys. The transaction ids are not tracked within couchdb.

BellaAdams (Sat, 17 Nov 2018 00:47:20 GMT):
Has joined the channel.

AsifJaved (Sun, 18 Nov 2018 18:35:41 GMT):
Has joined the channel.

GowriR (Mon, 19 Nov 2018 06:50:14 GMT):
Hi all peer instantiate chaincode on the peer docker container executes successfully. But the API - sendInstantiateProposal times out. Which timeout parameter should I set and where should I set it? Thanks

Randyshu2018 (Mon, 19 Nov 2018 07:16:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=39SQNXCATDKx6dwNJ) @GowriR you could increase timeout,but in some way u need to check the peer/orderer logs firstly.

GowriR (Mon, 19 Nov 2018 07:19:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9L6jMNtam72cX5uCt) @Randyshu2018 The logs give a Tx timeout with a code of 500

GowriR (Mon, 19 Nov 2018 07:20:19 GMT):
kflow, channel mychannel peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [stateleveldb] GetState -> DEBU b72 GetState(). ns=lscc, key=utility_workflow peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [chaincode] func1 -> DEBU b73 [192eb60e]No state associated with key: peer0.org1.acme.com | utility_workflow. Sending RESPONSE with an empty payload peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [chaincode] 1 -> DEBU b74 [192eb60e]handleGetState serial send RESPONSE peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [shim] func1 -> DEBU b75 [192eb60e]Received message RESPONSE from shim peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [shim] handleMessage -> DEBU b76 [192eb60e]Handling ChaincodeMessage of type: RESPONSE(state:ready) peer0.org1.acme.com | 2018-11-01 23:16:53.519 UTC [shim] sendChannel -> DEBU b77 [192eb60e]before send peer0.org1.acme.com | 2018-11-01 23:16:53.519 UTC [shim] sendChannel -> DEBU b78 [192eb60e]after send peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] afterResponse -> DEBU b79 [192eb60e]Received RESPONSE, communicated (state:ready) peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] handleGetState -> DEBU b7a [192eb60e]GetState received payload RESPONSE peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] func1 -> DEBU b7b [192eb60e]Transaction completed. Sending COMPLETED peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] func1 -> DEBU b7c [192eb60e]Move state message COMPLETED peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] handleMessage -> DEBU b7d [192eb60e]Handling ChaincodeMessage of type: COMPLETED(state:ready) peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] func1 -> DEBU b7e [192eb60e]send state message COMPLETED peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] processStream -> DEBU b7f [192eb60e]Received message COMPLETED from shim peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] handleMessage -> DEBU b80 [192eb60e]Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] handleMessage -> DEBU b81 [192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba]HandleMessage- COMPLETED. Notify peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] notify -> DEBU b82 notifying Txid:192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba, channelID:mychannel peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] Execute -> DEBU b83 Exit peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [endorser] callChaincode -> DEBU b84 [mychannel][192eb60e] Exit peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [lockbasedtxmgr] GetTxSimulationResults -> DEBU b85 Simulation completed, getting simulation results peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [lockbasedtxmgr] Done -> DEBU b86 Done with transaction simulation / query execution [192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba] peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [endorser] simulateProposal -> DEBU b87 [mychannel][192eb60e] Exit peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [endorser] ProcessProposal -> ERRO b88 [mychannel][192eb60e] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: 192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba peer0.org1.acme.com | 2018-11-01 23:16:53.521 UTC [lockbasedtxmgr] Done -> DEBU b89 Done with transaction simulation / query execution [192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba] peer0.org1.acme.com | 2018-11-01 23:16:53.521 UTC [endorser] ProcessProposal -> DEBU b8a Exit: request from%!(EXTRA string=172.21.0.1:53700)* [This is at the peer]*

GowriR (Mon, 19 Nov 2018 07:20:19 GMT):
kflow, channel mychannel peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [stateleveldb] GetState -> DEBU b72 GetState(). ns=lscc, key=utility_workflow peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [chaincode] func1 -> DEBU b73 [192eb60e]No state associated with key: peer0.org1.acme.com | utility_workflow. Sending RESPONSE with an empty payload peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [chaincode] 1 -> DEBU b74 [192eb60e]handleGetState serial send RESPONSE peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [shim] func1 -> DEBU b75 [192eb60e]Received message RESPONSE from shim peer0.org1.acme.com | 2018-11-01 23:16:53.518 UTC [shim] handleMessage -> DEBU b76 [192eb60e]Handling ChaincodeMessage of type: RESPONSE(state:ready) peer0.org1.acme.com | 2018-11-01 23:16:53.519 UTC [shim] sendChannel -> DEBU b77 [192eb60e]before send peer0.org1.acme.com | 2018-11-01 23:16:53.519 UTC [shim] sendChannel -> DEBU b78 [192eb60e]after send peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] afterResponse -> DEBU b79 [192eb60e]Received RESPONSE, communicated (state:ready) peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] handleGetState -> DEBU b7a [192eb60e]GetState received payload RESPONSE peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] func1 -> DEBU b7b [192eb60e]Transaction completed. Sending COMPLETED peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] func1 -> DEBU b7c [192eb60e]Move state message COMPLETED peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] handleMessage -> DEBU b7d [192eb60e]Handling ChaincodeMessage of type: COMPLETED(state:ready) peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [shim] func1 -> DEBU b7e [192eb60e]send state message COMPLETED peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] processStream -> DEBU b7f [192eb60e]Received message COMPLETED from shim peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] handleMessage -> DEBU b80 [192eb60e]Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] handleMessage -> DEBU b81 [192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba]HandleMessage- COMPLETED. Notify peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] notify -> DEBU b82 notifying Txid:192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba, channelID:mychannel peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [chaincode] Execute -> DEBU b83 Exit peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [endorser] callChaincode -> DEBU b84 [mychannel][192eb60e] Exit peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [lockbasedtxmgr] GetTxSimulationResults -> DEBU b85 Simulation completed, getting simulation results peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [lockbasedtxmgr] Done -> DEBU b86 Done with transaction simulation / query execution [192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba] peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [endorser] simulateProposal -> DEBU b87 [mychannel][192eb60e] Exit peer0.org1.acme.com | 2018-11-01 23:16:53.520 UTC [endorser] ProcessProposal -> ERRO b88 [mychannel][192eb60e] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: 192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba peer0.org1.acme.com | 2018-11-01 23:16:53.521 UTC [lockbasedtxmgr] Done -> DEBU b89 Done with transaction simulation / query execution [192eb60e6d88a2ece0a2162ae46e49ea5fb481597a99f4e643a9df6c3460fbba] peer0.org1.acme.com | 2018-11-01 23:16:53.521 UTC [endorser] ProcessProposal -> DEBU b8a Exit: request from%!(EXTRA string=172.21.0.1:53700*)* [This is at the peer]**

GowriR (Mon, 19 Nov 2018 09:17:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rbgLKBeTN6qphZoH5) I have pasted the peer logs above. I have spent loads of time on this and am clueless

GowriR (Mon, 19 Nov 2018 09:44:18 GMT):
Hi all got some clue (https://github.com/hyperledger/caliper/issues/175) . The results of hypledvm@hypledvm-VirtualBox:~/go/src/utilitypoc/network/acmedevmode$ npm ls fabric-client fabric-ca-client DRWebapp@1.0.0 /home/hypledvm/go/src/utilitypoc/network/acmedevmode +-- fabric-ca-client@1.2.2 `-- fabric-client@1.2.2

GowriR (Mon, 19 Nov 2018 09:49:00 GMT):
RepoTags": [ "hyperledger/fabric-baseos:x86_64-0.4.6" "RepoTags": [ "hyperledger/fabric-ccenv:latest", "hyperledger/fabric-ccenv:x86_64-1.1.1-snapshot-ff5e861de" ], "hyperledger/fabric-peer:latest", "hyperledger/fabric-peer:x86_64-1.1.0"

GowriR (Mon, 19 Nov 2018 09:49:22 GMT):
Is this compatible? what should I be doing?

Paradox-AT (Mon, 19 Nov 2018 10:33:34 GMT):
Hey guys, where can I find documentation/Getting started guide to connect to the network?

bretharrison (Mon, 19 Nov 2018 20:11:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=39SQNXCATDKx6dwNJ) @GowriR ``` client.setConfigSetting('request-timeout', 5*60000); // set the config setting before a call -- or -- channel.sendInstantiateProposal(request, 5*60000); // pass timeout directly on most calls ```

bretharrison (Mon, 19 Nov 2018 20:11:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=39SQNXCATDKx6dwNJ) @GowriR The following is how to set client side request timeout ``` client.setConfigSetting('request-timeout', 5*60000); // set the config setting before a call -- or -- channel.sendInstantiateProposal(request, 5*60000); // pass timeout directly on most calls ```

bretharrison (Mon, 19 Nov 2018 20:13:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wx2gwey6F7jSdcHDX) @GowriR https://fabric-sdk-node.github.io/release-1.3/tutorial-network-config.html

bretharrison (Mon, 19 Nov 2018 20:36:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=T9JDiHJ5GenAMwxQM) @Paradox-AT https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html

huxiangdong (Tue, 20 Nov 2018 00:36:07 GMT):
Has joined the channel.

MuthuT (Tue, 20 Nov 2018 05:14:25 GMT):
Has joined the channel.

GowriR (Tue, 20 Nov 2018 06:19:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=T9JDiHJ5GenAMwxQM) @Paradox-AT fabric - network? using sdk?

FaizulHassan (Tue, 20 Nov 2018 07:48:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ojD5Wb9oN6rwntLzW) @dave.enyeart thank you @dave.enyeart :)

FaizulHassan (Tue, 20 Nov 2018 10:38:02 GMT):
Hi Devs !, I had gone through FabCar sample & may I get clear view of the below queries ? - I had enrolledAdmin & registered new user using registerUser.js, say for example the user name is *'Faizul'* - Using the above user I had added a Car into the block. let the Car name be 'Fiat' - Now I had registered another user named *'Hassan'* & He too adds new Car into the block & this car name be 'Tesla'. Question 1: Will that be possible to show user's their own Car details that they had inserted in blocks ? ie., *Faizul* must view only 'Fiat' & meta data. *Hassan* must view only 'Tesla' & its meta data. Question 2: How to split user's based upon their role during their registration. Ex: *"Buyer's"* can view all the Cars available *"Seller's"* can view only their Car that they sell..

FaizulHassan (Tue, 20 Nov 2018 10:38:02 GMT):
Hi Devs !, I had gone through FabCar sample & may I get clear view of the below queries ? - I had enrolledAdmin & registered new user using registerUser.js, say for example the user name is *'Faizul'* - Using the above user I had added a Car into the block. Let the Car name be 'Fiat' - Now I had registered another user named *'Hassan'* & He too adds new Car into the block & this car name be 'Tesla'. Question 1: Will that be possible to show user's their own Car details that they had inserted in blocks ? ie., *Faizul* must view only 'Fiat' & meta data. *Hassan* must view only 'Tesla' & its meta data. Question 2: How to split user's based upon their role during their registration. Ex: *"Buyer's"* can view all the Cars available *"Seller's"* can view only their Car that they sell..

FaizulHassan (Tue, 20 Nov 2018 10:38:02 GMT):
Hi Devs, I had gone through FabCar sample & may I get clear view of the below queries ? - I had enrolledAdmin & registered new user using registerUser.js, say for example the user name is *'Faizul'* - Using the above user I had added a Car into the block. Let the Car name be 'Fiat' - Now I had registered another user named *'Hassan'* & He too adds new Car into the block & this car name be 'Tesla'. Question 1: Will that be possible to show user's their own Car details that they had inserted in blocks ? ie., *Faizul* must view only 'Fiat' & meta data. *Hassan* must view only 'Tesla' & its meta data. Question 2: How to split user's based upon their role during their registration. Ex: *"Buyer's"* can view all the Cars available *"Seller's"* can view only their Car that they sell..

FaizulHassan (Tue, 20 Nov 2018 10:38:02 GMT):
Hi Devs, I had gone through FabCar sample & may I get clear view of the below queries ? - I had enrolledAdmin & registered new user using registerUser.js, say for example the user name is *'Faizul'* - Using the above user I had added a Car into the block. Let the Car name be 'Fiat' - Now I had registered another user named *'Hassan'* & He too adds new Car into the block & this car name be 'Tesla'. Question 1: Will that be possible to show user's their own Car details that they had inserted in blocks ? ie., *Faizul* must view only 'Fiat' & meta data. *Hassan* must view only 'Tesla' & its meta data. Question 2: How to split user's based upon their role during their registration. Ex: *"Buyer's"* can view all the Cars available *"Seller's"* can view only their Car that they sell.. Question 3: I am clear that registered user's Certificates & keys will be present in their local system. How about admin's Certificates & keys ? Does that needs to be present in all user's that joins our network ?

Paradox-AT (Wed, 21 Nov 2018 08:37:39 GMT):
@GowriR sdk

Paradox-AT (Wed, 21 Nov 2018 08:38:10 GMT):
@FaizulHassan Which sample you are talking about

Paradox-AT (Wed, 21 Nov 2018 08:38:10 GMT):
@FaizulHassan Which sample you are talking about?

Paradox-AT (Wed, 21 Nov 2018 08:38:10 GMT):
@FaizulHassan Which sample you are talking about? fabric-ca?

Paradox-AT (Wed, 21 Nov 2018 08:45:04 GMT):
fabric-ca?

Legiit (Wed, 21 Nov 2018 10:13:00 GMT):
can we have a mongodb as CryptoSuite/CryptoStore (I don't know the difference) to store the keys on generation? Or even "ignore" the crypto store and let the users manage them?

Legiit (Wed, 21 Nov 2018 10:13:00 GMT):
can we have a mongodb as CryptoSuite/CryptoStore (I don't know the difference between state and crypto store) to store the keys on generation? Or even "ignore" the crypto store and let the users manage them?

Legiit (Wed, 21 Nov 2018 10:18:18 GMT):
and how are certificates from the CryptoStore related to the MySQL/PostGresQL from the CA? https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#mysql What's the difference or what's stored in both

ArianStef (Wed, 21 Nov 2018 11:01:38 GMT):
Hi! There is a way to do a query with getHistoryForKey(key) but with a composite key?

ArianStef (Wed, 21 Nov 2018 11:03:06 GMT):
I had the asset in the leader that the key are something like FeatureID_op_value, I want to select all the asset with FeatureID in the transaction log

ArianStef (Wed, 21 Nov 2018 11:03:26 GMT):
I had the asset in the ledger that the key are something like FeatureID_op_value, I want to select all the asset with FeatureID in the transaction log

ArianStef (Wed, 21 Nov 2018 11:03:59 GMT):
I had assets in the ledger which keys are something like FeatureID_op_value, I want to select all the assets with FeatureID in the transaction log

Paradox-AT (Wed, 21 Nov 2018 11:19:09 GMT):
How can I get the certificates from sdk

Paradox-AT (Wed, 21 Nov 2018 11:19:09 GMT):
How can I get the certificates from sdk?

ascatox (Wed, 21 Nov 2018 15:59:00 GMT):
Hi All! I'm developing a simple client Application, I've a chaincode with different versions instantiated in my chain. Is it mandatory to set the chaincode version in the client application. If I set the version to empty, Fabric make the calls in the last version of chaincode?

ascatox (Wed, 21 Nov 2018 15:59:00 GMT):
Hi All! I'm developing a simple client Application, I've a chaincode with different versions instantiated in my chain. Is it mandatory to set the chaincode version in the client application? If I set the version to empty, Fabric make the calls in the last version of chaincode?

nfrunza (Wed, 21 Nov 2018 16:30:33 GMT):
Dear SDK Node developers, how to discover new channels while running an application already connected to the fabric ?

nfrunza (Wed, 21 Nov 2018 16:30:33 GMT):
Dear SDK Node developers, how to discover new channels while running an application already connected to the fabric 1.3, and using fabric-client-1.3 API?

bestbeforetoday (Wed, 21 Nov 2018 16:33:42 GMT):
@ascatox You can have many versions of a specific named chaincode installed. (At most) only version of a specific named chaincode is instantiated at any time. You don't specify the chaincode versions when you send transactions. It invokes the currently instantated versions of the target chaincode. See here for lifecycle information: https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4noah.html

bestbeforetoday (Wed, 21 Nov 2018 16:33:42 GMT):
@ascatox You can have many versions of a specific named chaincode installed. (At most) only one version of a specific named chaincode is instantiated at any time. You don't specify the chaincode versions when you send transactions. It invokes the currently instantated versions of the target chaincode. See here for lifecycle information: https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4noah.html

bestbeforetoday (Wed, 21 Nov 2018 16:33:42 GMT):
@ascatox You can have many versions of a specific named chaincode installed. (At most) only one version of a specific named chaincode is instantiated at any time. You don't specify the chaincode versions when you send transactions. It invokes the currently instantated version of the target chaincode. See here for lifecycle information: https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4noah.html

bestbeforetoday (Wed, 21 Nov 2018 16:36:47 GMT):
^^ I personally find that easier to read if I replace "instantiated" with "started"... but _instantiated_ was the terminology chosen.

silliman (Wed, 21 Nov 2018 17:17:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4iDNdqjKi7NryM9q6) @bestbeforetoday "(At most) only one version of a specific named chaincode is instantiated at any time" I would add *per channel* to this statement, i.e., "(At most) only one version of a specific named chaincode is instantiated at any time *per channel*", as different versions of a named chaincode can be instantiated on different channels at any given time, in fact, this is why the older versions of chaincode Docker images and containers hang around when a chaincode is upgraded, in case other channels are still using the earlier version.

ascatox (Thu, 22 Nov 2018 08:15:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cTtzog2z5gitRigWT) @silliman Thanks for the complete answer!

ascatox (Thu, 22 Nov 2018 08:15:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4iDNdqjKi7NryM9q6) @bestbeforetoday Thank you very much!

miiiiiyoung (Fri, 23 Nov 2018 05:26:32 GMT):
Has joined the channel.

varunagarwal (Fri, 23 Nov 2018 10:58:19 GMT):
Hey guys, I am migrating my code from `composer` to using the `shim` nodejs SDK. Is there any tutorial I can start with? Most I have found are to do with `GO`, cant find a hello world equivalent forthis.

JayJong (Mon, 26 Nov 2018 00:40:18 GMT):
Hi everyone, can i just ask why is there a need to setTimeOut to listen to events in the fabcar example?

sheetal-hlf (Mon, 26 Nov 2018 05:36:02 GMT):
Hello All, Please review the sample for private-data feature which includes fabric network, smart contract, REST APIs in Node SDK (https://gerrit.hyperledger.org/r/#/c/27568/)

bochuxt (Mon, 26 Nov 2018 07:15:02 GMT):
Has joined the channel.

Legiit (Mon, 26 Nov 2018 08:03:06 GMT):
Is it possilbe to derive the Public Key from the Private Key only? (PrivateKeyPem)

Legiit (Mon, 26 Nov 2018 08:05:21 GMT):
This is done to prevent the eventHub from staying connected forever. But I recommend to not use this as the eventHub now has a 3rd parameter as option to automatically close itself. Or you could close it in the success and error callback of the registerTxEvent @JayJong

Legiit (Mon, 26 Nov 2018 08:05:21 GMT):
This is done to prevent the eventHub from staying connected forever. But I recommend to not use this as the eventHub now has a parameter as option to automatically close itself. Or you could close it in the success and error callback of the registerTxEvent @JayJong

JayJong (Mon, 26 Nov 2018 09:00:15 GMT):
@Legiit thx for the reply, whats wrong with the channeleventhub being connected forever?

Legiit (Mon, 26 Nov 2018 09:02:28 GMT):
Draining system resources @JayJong It's better to close of any open connections after usage so unload your system CPU etc.

davidkel (Mon, 26 Nov 2018 10:45:28 GMT):
@JayJong I don't agree with @Legiit around this, best practice is to leave the channeleventhub connected for as long as you need it. It would be bad paractice to constantly connect and disconnect from a channeleventhub

davidkel (Mon, 26 Nov 2018 10:45:28 GMT):
@JayJong I don't agree with @Legiit around this, best practice is to leave the channeleventhub connected for as long as you need it. It would be bad paractice to constantly connect and disconnect a channeleventhub

Legiit (Mon, 26 Nov 2018 10:50:53 GMT):
Well, if you received your information from your TX, you should close it right? :P @davidkel If only subscribed on that particular TX

Legiit (Mon, 26 Nov 2018 10:52:48 GMT):
It's also done in the examples if it did not timeout within the 3 seconds https://github.com/hyperledger/fabric-samples/blob/ed81d7b9b17bce5f103ebdae97c3bb12f97cf9a5/fabcar/invoke.js#L122

davidkel (Mon, 26 Nov 2018 10:53:55 GMT):
@Legiit No you shouldn't close the eventhub and on receiving information about the tx the listener should be automatically unregistered but you can always unregister manually

davidkel (Mon, 26 Nov 2018 10:53:55 GMT):
@Legiit No you shouldn't close the eventhub and on receiving information about the tx. the listener should be automatically unregistered but you can always unregister manually

davidkel (Mon, 26 Nov 2018 10:55:07 GMT):
Consider a long running application which will want to receive multiple events during it's execution lifecycle, you would actually use a lot more resources constantly connecting to the event hub then disconnecting

davidkel (Mon, 26 Nov 2018 10:56:01 GMT):
This is the pattern that was used by hyperledger-composer and is the same pattern employed in the coming fabric-network node api which is part of the fabric-sdk-node

Legiit (Mon, 26 Nov 2018 10:56:53 GMT):
and in the case you receive a signedEvent (which needs to be passed in the eventHub.connect) do you disconnect first and reconnect. How should this be handled in your opinion

davidkel (Mon, 26 Nov 2018 10:57:34 GMT):
If you have multiple identities that need to connect to an event hub, then you should have each identity establish a connection within your application.

davidkel (Mon, 26 Nov 2018 10:57:34 GMT):
If you have multiple identities that need to connect to an event hub, then you should have each identity establish a connection within your application, but I would look to keeping that connection cached for the user of that identity.

Legiit (Mon, 26 Nov 2018 10:58:40 GMT):
1 identity with the possibility to either pass in a TX to register on or a signedEvent

bretharrison (Mon, 26 Nov 2018 17:04:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=W4Y2q6hPMTuiADLbC) @FaizulHassan Your questions are not NodeSDK questions, please post to the #fabric channel

bretharrison (Mon, 26 Nov 2018 17:12:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QxCkCxuKscF7hakyx) @nfrunza to find the channels a specific peer has joined https://fabric-sdk-node.github.io/release-1.3/Client.html#queryChannels__anchor

nfrunza (Mon, 26 Nov 2018 17:15:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a8MNxLDg5xuzvsXoK) @bretharrison thank you

GowriR (Tue, 27 Nov 2018 08:50:22 GMT):
Hi all, I am getting "*info: [APPLICATION]: TypeError: client.getPeer is not a function*"

GowriR (Tue, 27 Nov 2018 08:51:55 GMT):
I followed this link https://github.com/hyperledger/caliper/issues/175 and I have - npm install grpc@1.10.1 fabric-ca-client@1.1.0 fabric-client@1.1.0 this environment and I am still getting this error

GowriR (Tue, 27 Nov 2018 08:52:14 GMT):
Would appreciate if I could get pointers on this

FaizulHassan (Tue, 27 Nov 2018 09:12:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ACQQtYF3jQatCMDxA) @bretharrison Thanks for the suggestion @bretharrison :)

FaizulHassan (Tue, 27 Nov 2018 09:13:07 GMT):
Hi Devs,

FaizulHassan (Tue, 27 Nov 2018 09:13:07 GMT):
Hi Devs, Is there a way to decode *data_hash* to see the actual data that we passed in block ?

nnikka (Tue, 27 Nov 2018 11:42:02 GMT):
hello guys, where can i see node chaincode's console logs? I am running fabcar

FaizulHassan (Tue, 27 Nov 2018 12:01:33 GMT):
you would be able to find them in docker logs..

FaizulHassan (Tue, 27 Nov 2018 12:01:33 GMT):
you would be able to find them in docker logs.. *docker logs -f container_name*

GowriR (Tue, 27 Nov 2018 15:14:57 GMT):
Hi All, I have two issues. 1. Some client SDK functions stop working saying, function XYZ is not a function. "*info: [APPLICATION]: TypeError: client.getPeer is not a function*" I tried to resolve this and the only way it got resolved is by rewinding to my old installations (not as given in the link - https://github.com/hyperledger/caliper/issues/175) My current installations are (picked from package.json) "fabric-ca-client": "^1.2.2", "fabric-client": "^1.2.2", "grpc": "^1.15.1", AND npm version { DRWebapp: '1.0.0', npm: '5.6.0', ares: '1.10.1-DEV', cldr: '31.0.1', http_parser: '2.7.0', icu: '59.1', modules: '57', nghttp2: '1.25.0', node: '8.9.4', Now the problem is the code works if I have this but chaincode instantiation fails - Error: 2 UNKNOWN: chaincode error (status: 500, message: is not a valid endorsement system chaincode) The link https://github.com/hyperledger/caliper/issues/175, gives a solution to it but if I do that my code does not work. What is the underlying problem here? Thanks Gowri

JayJong (Wed, 28 Nov 2018 04:45:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RvRhpiqZCxgJuhyth) @bretharrison do u agree with this sentence?

ynamiki (Wed, 28 Nov 2018 08:12:05 GMT):
Has left the channel.

davidkel (Wed, 28 Nov 2018 08:13:18 GMT):
@JayJong Just to give you some background I implemented the connection management for hyperledger composer and that includes doing event handling management. I am also a contributor to both node-sdk and maintainer on fabric-shim. I have a

davidkel (Wed, 28 Nov 2018 08:13:18 GMT):
@JayJong Just to give you some background I implemented the connection management for hyperledger composer and that includes doing event handling management. So I spent a good amount of time getting this correct for long running applications. Constant connect and disconnect on a channeleventhub uses a lot of resources both client side and fabric side and requires fabric to constantly manage what is connected and what isn't. This makes it bad practice as well as actually making it harder for the application itself

davidkel (Wed, 28 Nov 2018 08:18:17 GMT):
Unfortunately I haven't seen any fabric samples that provide a good example of event handling for long running applications. For example fabcar as invoke.js but invoke.js is a cli type of program so it launches, does 1 thing then terminates so the event handling shown there is applicable only to that type of invocation and not long running apps.

davidkel (Wed, 28 Nov 2018 08:18:17 GMT):
Unfortunately I haven't seen any fabric samples that provide a good example of event handling for long running applications. For example fabcar has invoke.js but invoke.js is a cli type of program so it launches, does 1 thing then terminates so the event handling shown there is applicable only to that type of invocation and not long running apps.

Purbaja (Wed, 28 Nov 2018 10:03:08 GMT):
Has joined the channel.

Purbaja (Wed, 28 Nov 2018 10:06:25 GMT):
Hi, Hi Team, we are getting below error from node sdk after some time whie using balance transfer application: [2018-11-28 10:00:05.287] [ERROR] invoke-chaincode - Error: Unable to connect to the peer event hub at Timeout._onTimeout (/home/ubuntu/mastercard-hlf/node-layer/node_modules/fabric-client/lib/ChannelEventHub.js:307:21) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) [2018-11-28 10:00:05.290] [ERROR] invoke-chaincode - Error: Unable to connect to the peer event hub at Timeout._onTimeout (/home/ubuntu/mastercard-hlf/node-layer/node_modules/fabric-client/lib/ChannelEventHub.js:307:21) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) [2018-11-28 10:00:05.290] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: Unable to connect to the peer event hub (node:9577) UnhandledPromiseRejectionWarning: Error: Failed to invoke chaincode. cause:Error: Unable to connect to the peer event hub at Object.invokeChaincode (/home/ubuntu/mastercard-hlf/node-layer/app/invoke-transaction.js:171:9) at at process._tickCallback (internal/process/next_tick.js:189:7) Error goes away temporarirly once the peer is restarted Also, the invoke is working fine from cli always

Purbaja (Wed, 28 Nov 2018 10:07:57 GMT):
Hi, Hi Team, we are getting below error from node sdk after some time whie using balance transfer application: [2018-11-28 10:00:05.287] [ERROR] invoke-chaincode - Error: Unable to connect to the peer event hub at Timeout._onTimeout (/home/ubuntu/hlf/node-layer/node_modules/fabric-client/lib/ChannelEventHub.js:307:21) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) [2018-11-28 10:00:05.290] [ERROR] invoke-chaincode - Error: Unable to connect to the peer event hub at Timeout._onTimeout (/home/ubuntu/hlf/node-layer/node_modules/fabric-client/lib/ChannelEventHub.js:307:21) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) [2018-11-28 10:00:05.290] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: Unable to connect to the peer event hub (node:9577) UnhandledPromiseRejectionWarning: Error: Failed to invoke chaincode. cause:Error: Unable to connect to the peer event hub at Object.invokeChaincode (/home/ubuntu/hlf/node-layer/app/invoke-transaction.js:171:9) at at process._tickCallback (internal/process/next_tick.js:189:7) Error goes away temporarirly once the peer is restarted Also, the invoke is working fine from cli always

Jayakrishna.V (Wed, 28 Nov 2018 12:59:58 GMT):
Has joined the channel.

Jayakrishna.V (Wed, 28 Nov 2018 13:00:09 GMT):
Hi All, I am looking for the source code that explains the process of subscribing to events generated by Peers after committing the transactions to Ledger and handling those events. Can anyone suggest me a best sample available on the internet.

jrosmith (Wed, 28 Nov 2018 13:50:53 GMT):
@Jayakrishna.V the [balance-transfer](https://github.com/hyperledger/fabric-samples/blob/release-1.3/balance-transfer/app/invoke-transaction.js#L79) example is pretty complete

billchen (Wed, 28 Nov 2018 21:38:25 GMT):
is there a way to determine if a chaincode container has been instantiated using the SDK, or to start the chaincode container? Right now, i'm just querying the chaincode in order to spin it up, but I'm finding that to be inefficient having to query it an unnecessary number of times

theezenaku (Wed, 28 Nov 2018 22:53:25 GMT):
Has joined the channel.

varunagarwal (Thu, 29 Nov 2018 05:32:03 GMT):
hey are there any good tutorials for fabric-sdk-node? I can't seem to find some

haggis (Thu, 29 Nov 2018 08:08:34 GMT):
Has joined the channel.

ashlinSajan (Thu, 29 Nov 2018 11:12:36 GMT):
Can I specify different endorsement policy on function/method level in hyperledger-fabric when all functions/methods are in a single chaincode?

jrosmith (Thu, 29 Nov 2018 16:20:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PBJDTXDBmCoeDnpQd) @varunagarwal

bretharrison (Thu, 29 Nov 2018 17:28:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TX4KBfrR8HYvwQqyH) @Jayakrishna.V https://fabric-sdk-node.github.io/release-1.3/tutorial-channel-events.html

bretharrison (Thu, 29 Nov 2018 17:35:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sfPH6nfsCQcMQCDC8) @JayJong yes i agree

JayJong (Thu, 29 Nov 2018 18:50:34 GMT):
@bretharrison thank you for ur response @davidkel thank you for the valuable insights into channeleventhub

varunagarwal (Fri, 30 Nov 2018 05:46:19 GMT):
Thanks, the one thing I cannot find in the `balance-transfer` example and others is a way to implement user based ACL. I am migrating from `composer` and over there, we have a few functions to implement acl within the smart contracts by retrieving the public certificate of the user who sends the transaction.

varunagarwal (Fri, 30 Nov 2018 05:48:16 GMT):
@jrosmith Thing is, other people migrating from composer will probably face similar challenges and confusion as I am, so my aim in understanding this was also to write a repo using fabric-sdk-node and node-shim that does the same thing as one of the `composer ` sample code.

varunagarwal (Fri, 30 Nov 2018 05:49:18 GMT):
and then share the link here of course

varunagarwal (Fri, 30 Nov 2018 05:50:00 GMT):
so I am looking for 1-2 collaborators who would like to work with me on this and help ppl migrate from `composer` as I am :)

davidkel (Fri, 30 Nov 2018 07:45:11 GMT):
@varunagarwal You would need to look at implementing your own logic to handle user ACL. You could consider using Attribute based access control to help but be aware that requires up front planning to ensure you put the right attributes into the certificates you issue.

ttarey (Fri, 30 Nov 2018 09:37:27 GMT):
Has joined the channel.

Jayakrishna.V (Fri, 30 Nov 2018 11:02:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PBJDTXDBmCoeDnpQd) @jrosmith Hi @jrosmith Thansk for the example. I have analyzed the source directory of this example. From the documentation I understand that in this sample, there are going to be 4 peers, A SOLO Orderer and 2 CAs (1 per Org) in the network. Then there is a node app which is nothing but the client application through which transactions can be invoked and a REST API that communicates with the fabric network. In order to analyze the events generated by Fabric, I hope I would need to analyze the source code of the REST APIs. But I am unable to locate the source code of the REST APIS. Please help me in understanding the source code directory structure. Thank you.

davidkel (Fri, 30 Nov 2018 11:07:25 GMT):
@Jayakrishna.V Not sure what rest api you are referring to, why do you think there is a rest api communicating with the fabric network ? The communications will be via the fabric node sdk which uses GRPC under the covers

Jayakrishna.V (Fri, 30 Nov 2018 11:22:34 GMT):
Hi @davidkel I am referring to the README.md file of this example where there is a section to execute REST APIs. Also I cannot understand the Business definition of this example. Generally in a business network there will be Participants, Assets and Transactions. I could not find the ACL file or the CTO file. Please correct me if my understanding is wrong.

davidkel (Fri, 30 Nov 2018 11:24:32 GMT):
@Jayakrishna.V Sounds like you are referring to hyperledger composer samples, not fabric samples

Jayakrishna.V (Fri, 30 Nov 2018 11:25:22 GMT):
Hi @davidkel I am referring to this link https://github.com/hyperledger/fabric-samples/tree/release-1.3/balance-transfer

davidkel (Fri, 30 Nov 2018 11:29:13 GMT):
@Jayakrishna.V ok, I see it now. The balance transfer app is a fabric application so it won't have ACL files or a CTO file. These are hyperledger composer concepts, so you won't find them in here. The sample itself looks like it creates an express server that provides a REST API to balance transfer application. It will use the node-sdk to communicate with the instantiated chaincode running on the fabric setup and that comms is via GRPC.

davidkel (Fri, 30 Nov 2018 11:29:13 GMT):
@Jayakrishna.V ok, I see it now. The balance transfer app is a fabric application so it won't have ACL files or a CTO file. These are hyperledger composer concepts, so you won't find them in here. The sample itself looks like it creates an express server that provides a REST API to the balance transfer application. It will use the node-sdk to communicate with the instantiated chaincode running on the fabric setup and that comms is via GRPC.

Jayakrishna.V (Fri, 30 Nov 2018 11:32:53 GMT):
@davidkel I have never come across GRPC in the Hyperledger Fabric tutorials like BYFN and Creating your first application. There is a file called helper.js where fabric-client package is used. Is this the page I should refer? Can you please tell me the file where node-sdk is used to communicate with the chaincode.

Jayakrishna.V (Fri, 30 Nov 2018 11:32:53 GMT):
@davidkel I have never come across GRPC in the Hyperledger Fabric tutorials like BYFN and Creating your first application. There is a file called helper.js where fabric-client package is used. Is this the page I should refer? Can you please tell me the file where node-sdk is used to communicate with the chaincode. It would be great if you can explain me the source directory structure. Also not sure if all the fabric applicatin will have the same structure.

Jayakrishna.V (Fri, 30 Nov 2018 11:32:53 GMT):
@davidkel I have never come across GRPC in the Hyperledger Fabric tutorials like BYFN and Creating your first application. There is a file called helper.js where fabric-client package is used. Is this the page I should refer? Can you please tell me the file where node-sdk is used to communicate with the chaincode. It would be great if you can explain me the source directory structure. Also not sure if all the fabric applications will have the same structure.

Jayakrishna.V (Fri, 30 Nov 2018 11:36:00 GMT):
@davidkel I understand that source code for Chaincode is availabe under the directory ../artifacts/src/github.com/example_cc in 2 languages.

Jayakrishna.V (Fri, 30 Nov 2018 11:37:18 GMT):
@davidkel I am also not sure how the Ledger will be instantiated with this chaincode.

davidkel (Fri, 30 Nov 2018 11:40:40 GMT):
@Jayakrishna.V Looks like they centralise some of the interaction with the node-sdk in helper.js but all the other files will be using the node-sdk api even if they don't directly declare it as a require. For example if you look at `invoke-transaction.js` https://github.com/hyperledger/fabric-samples/blob/53ae43530468426e23e5638fce157ec42dbeaa80/balance-transfer/app/invoke-transaction.js#L49 you will see a sendTransactionProposal on a channel object. This is an example of invoking the node-sdk apis.

Jayakrishna.V (Fri, 30 Nov 2018 11:50:34 GMT):
@davidkel Yes. the client object is initialized from the helper method getClientForOrg I will go through the source again to understand it better this time. Before that can you please answer one last question. what kind of data/transactions are recorded on the ledger in this example? It is difficult to understand without Assets, participants and transactions that we usually have in a composer application.

Jayakrishna.V (Fri, 30 Nov 2018 11:50:34 GMT):
@davidkel Yes. the client object is initialized from the helper method getClientForOrg I will go through the source again to understand it better this time. Before that can you please answer one last question. what kind of data/transactions are recorded on the ledger in this example? Both State database and the Blockchain? It is difficult to understand without Assets, participants and transactions that we usually have in a composer application. This will encourage me in understanding the source code better and quickly.

davidkel (Fri, 30 Nov 2018 11:56:58 GMT):
@Jayakrishna.V I don't really know much about these samples. You would need to determine the chaincode that it uses. The state database is a current view on the data stored on the blockchain.

Jayakrishna.V (Fri, 30 Nov 2018 12:01:15 GMT):
Ok. Thanks @davidkel I will wait for @jrosmith if he can help me in this.

futrax (Fri, 30 Nov 2018 12:34:00 GMT):
Has joined the channel.

jrosmith (Fri, 30 Nov 2018 14:21:11 GMT):
@Jayakrishna.V the ledger is the complete chain of blocks containing transactions. the state database is a snapshot of all of the assets. the block contains information about identity, read/write sets, endorsements, and more. the asset in the state database, in this example, is just the balance

jrosmith (Fri, 30 Nov 2018 14:23:26 GMT):
@varunagarwal as @davidkel said, you'd want to look into [attribute based access control](https://hyperledger-fabric-ca.readthedocs.io/en/release-1.2/users-guide.html#attribute-based-access-control) for fabric. to be honest i've never used composer outside of a demo at a hackfest so i don't really have a lot of expertise in how to transition from a composer poc to a full fabric application.

Jayakrishna.V (Sat, 01 Dec 2018 04:48:36 GMT):
@jrosmith Yes I am aware of the ledger and its parts the world state database and the blockhaiin. But I would like to relate the transactions that happen in this example with the ledger parts. In this example it seems that the balance will always be transferred between 2 parties A and B.

Jayakrishna.V (Sat, 01 Dec 2018 04:48:36 GMT):
@jrosmith Yes I am aware of the ledger and its parts the world state database and the blockchain. But I would like to relate the transactions that happen in this example with the ledger parts. In this example it seems that the balance will always be transferred between 2 parties A and B. If that is correct, what is the initial state of the ledger in this example, and where is the code that initializes the ledger.

Jayakrishna.V (Sat, 01 Dec 2018 04:54:19 GMT):
Hi @varunagarwal Thanks for your response. From your comments, can I understand that Composer applications are only for POC and not for production?

louisliu2048 (Mon, 03 Dec 2018 01:21:21 GMT):
anyone know how to use the crls (certificate revocation lists) in fabric, how to config the channel msp with the crls?

doowb (Mon, 03 Dec 2018 03:13:39 GMT):
Has joined the channel.

Dpkkmr (Mon, 03 Dec 2018 05:22:47 GMT):
I am following the instructions provided in NODE-SDK page(https://fabric-sdk-node.github.io/release-1.3/tutorial-private-data.html) for using Private data using NodeSDK. I have modified Balance transfer app in 1.2 version. "fabric-ca-client": "~1.2.0", "fabric-client": "~1.2.0", When I am instantiating the chain code, I get below mentioned error: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: failed to execute transaction 7ed1ce45425f232abebe9dde3b72b8612b3f13d9506cc6e9b66a58294f4974ce: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/example_cc/go chaincode/input/src/github.com/example_cc/go/example_cc.go:303:12: stub.PutPrivateData undefined (type shim.ChaincodeStubInterface has no field or method PutPrivateData) chaincode/input/src/github.com/example_cc/go/example_cc.go:320:25: stub.GetPrivateData undefined (type shim.ChaincodeStubInterface has no field or method GetPrivateData) " at /root/BC_SI_Demo_HLCode_CombinedAPI/node_modules/fabric-client/lib/Peer.js:114:16 at /root/BC_SI_Demo_HLCode_CombinedAPI/node_modules/grpc/src/client.js:586:7 Any inputs in resolving the issue will be very helpful. Thanks

Dpkkmr (Mon, 03 Dec 2018 05:22:47 GMT):
I am following the instructions provided in NODE-SDK page(https://fabric-sdk-node.github.io/release-1.3/tutorial-private-data.html) for using Private data using NodeSDK. I have modified the chaincode in Balance transfer app in 1.2 version to test SideDB feature. "fabric-ca-client": "~1.2.0", "fabric-client": "~1.2.0", When I am instantiating the chain code, I get below mentioned error: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: failed to execute transaction 7ed1ce45425f232abebe9dde3b72b8612b3f13d9506cc6e9b66a58294f4974ce: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/example_cc/go chaincode/input/src/github.com/example_cc/go/example_cc.go:303:12: stub.PutPrivateData undefined (type shim.ChaincodeStubInterface has no field or method PutPrivateData) chaincode/input/src/github.com/example_cc/go/example_cc.go:320:25: stub.GetPrivateData undefined (type shim.ChaincodeStubInterface has no field or method GetPrivateData) " at /root/BC_SI_Demo_HLCode_CombinedAPI/node_modules/fabric-client/lib/Peer.js:114:16 at /root/BC_SI_Demo_HLCode_CombinedAPI/node_modules/grpc/src/client.js:586:7 Any inputs in resolving the issue will be very helpful. Thanks

dave.enyeart (Mon, 03 Dec 2018 05:26:04 GMT):
@Dpkkmr Sounds like your fabric-ccenv docker image may not be at level v1.2 or later.

Dpkkmr (Mon, 03 Dec 2018 05:28:02 GMT):

Clipboard - December 3, 2018 10:57 AM

Dpkkmr (Mon, 03 Dec 2018 05:28:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6yzCW4cZFj2rL8rZF) @dave.enyeart Hi Dave,

Dpkkmr (Mon, 03 Dec 2018 05:28:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6yzCW4cZFj2rL8rZF) @dave.enyeart Hi Dave, I am using the latest fabric-ccenv

dave.enyeart (Mon, 03 Dec 2018 05:29:06 GMT):
did you instantiate your chaincode on an earlier version of fabric previously?

dave.enyeart (Mon, 03 Dec 2018 05:30:20 GMT):
try the private data tutorial chaincode to see if it works on your system... https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html

dave.enyeart (Mon, 03 Dec 2018 05:30:34 GMT):
then compare results with what you are trying

Dpkkmr (Mon, 03 Dec 2018 05:31:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a2Bn5K2puegoroJos) @dave.enyeart Yes, with out Get/Put States Chaincode was instantiated and invoked but after modifying the chaincode for private data, I run into errors

sheetal-hlf (Mon, 03 Dec 2018 05:32:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jnATZforAQYA69pdF) @Dpkkmr do you have the latest go-pkg - shim?

Dpkkmr (Mon, 03 Dec 2018 05:32:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a2Bn5K2puegoroJos) @dave.enyeart I will try this and compare the results.

Ashish_ydv (Mon, 03 Dec 2018 05:45:32 GMT):
Is there any way to get all users list who got registered and enrolled using node sdk?

sheetal-hlf (Mon, 03 Dec 2018 06:49:28 GMT):
Would service discovery be able to generate the list of new endorsers depending on the key-level/state-based endorsement policy?

MuhammedHafil (Mon, 03 Dec 2018 07:53:13 GMT):
is it possible to add custom attributes while enrolling user with CA client node sad and access it chaincode?

GowriR (Mon, 03 Dec 2018 10:05:46 GMT):
Hi All, I can see that the creation and updation of anchor peers does not happen through the client SDK for nodejs. Is the feature available now and I am missing it out or planned for later? Thanks Gowri

haggis (Mon, 03 Dec 2018 10:36:51 GMT):
Does anyone know what the package "fabric-network" does? I see it at example node applications but I can't find any specific documentation for this package.

MuhammedHafil (Mon, 03 Dec 2018 10:40:18 GMT):
Can anybody tell why users are not enrolled in https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer ?

MuhammedHafil (Mon, 03 Dec 2018 10:40:18 GMT):
Can anybody tell why users are not enrolled in this example ?https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer

MuhammedHafil (Mon, 03 Dec 2018 10:40:18 GMT):
Can anybody tell why users are not enrolled in this example ?https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer ? only registered?

MuhammedHafil (Mon, 03 Dec 2018 10:40:18 GMT):
Can anybody tell why users are not enrolled in this example ?https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer ? only registered? refer `app/helper.js`

andrew-coleman (Mon, 03 Dec 2018 11:03:00 GMT):
@haggis This is the new high level api for programming fabric applications. Documentation:

andrew-coleman (Mon, 03 Dec 2018 11:03:03 GMT):
https://fabric-sdk-node.github.io/master/module-fabric-network.html

andrew-coleman (Mon, 03 Dec 2018 11:03:16 GMT):
and here: https://hyperledger-fabric.readthedocs.io/en/master/developapps/developing_applications.html

haggis (Mon, 03 Dec 2018 11:10:30 GMT):
thank you @andrew-coleman

bretharrison (Mon, 03 Dec 2018 14:24:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vtAyxJSeYBTXACG7m) @louisliu2048 NodeSDK will send config updates, the updates must be in binary form and signed. https://fabric-sdk-node.github.io/release-1.3/tutorial-channel-create.html

doowb (Mon, 03 Dec 2018 15:04:19 GMT):
@andrew-coleman I'm reading through the developing applications docs that you linked to and there are references to the code being in the fabric samples repository, but I don't see anything the documentation is referring to. Do you know where this code is?

andrew-coleman (Mon, 03 Dec 2018 15:10:34 GMT):
The commercial-paper sample is in the `master` branch of `fabric-samples`. Once v1.4.0 is released, a 1.4 branch will be created and will become the default.

andrew-coleman (Mon, 03 Dec 2018 15:10:36 GMT):
https://github.com/hyperledger/fabric-samples/tree/master/commercial-paper

doowb (Mon, 03 Dec 2018 15:12:14 GMT):
Thanks, I see it now.

jrosmith (Mon, 03 Dec 2018 15:18:50 GMT):
@Jayakrishna.V the [read/write set](https://hyperledger-fabric.readthedocs.io/en/release-1.3/readwrite.html) is stored in the block. i'm unsure what you mean by 'code that initializes the ledger.' are you asking about the `Init` function in the chaincode? or are you asking how peers start up their state dbs? or are you asking about the role of the genesis block?

SanketPanchamia (Mon, 03 Dec 2018 16:58:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XHxDxmeYSQ8nJtNAo) @MuhammedHafil Yes you can use the CID library that fabric provides to enroll users with attributes and define access control at chaincode level by reading these attributes

MuhammedHafil (Mon, 03 Dec 2018 17:00:08 GMT):
I have tried but getting attribute not found error om chaincode

MuhammedHafil (Mon, 03 Dec 2018 17:00:08 GMT):
I have tried but getting attribute not found error om chaincode

MuhammedHafil (Mon, 03 Dec 2018 17:00:59 GMT):
My client code : https://pastebin.com/BKDJeegt

MuhammedHafil (Mon, 03 Dec 2018 17:01:31 GMT):
``` err = cid.AssertAttributeValue(stub, "foo", "bar") if err != nil { return shim.Error("error foo not equal bar" + err.Error()) } ```

MuhammedHafil (Mon, 03 Dec 2018 17:01:31 GMT):
``` getUserContext(name, checkPersistence) Returns the user by the given name. This can be a synchronous call or asynchronous call, depending on whether "checkPersistent" is truthy or not. If truthy, the method is asynchronous and returns a Promise, otherwise it's synchronous. As explained above, the client instance can have an optional state store. The SDK saves enrolled users in the storage which can be accessed by authorized users of the application (*authentication is done by the application outside of the SDK)*. This function attempts to load the user by name from the local storage (via the KeyValueStore interface). The loaded user object must represent an enrolled user with a valid enrollment certificate signed by a trusted CA (such as the CA server). ```

MuhammedHafil (Mon, 03 Dec 2018 17:01:35 GMT):
Chaincode

MuhammedHafil (Mon, 03 Dec 2018 17:01:35 GMT):
Any help?anyone?

OmarShekriladze (Mon, 03 Dec 2018 19:34:20 GMT):
I have one simple question and I will be very grateful if someone could help me. So when I run fabric-ca server, what sh -c 'fabric-ca-server init -b admin:adminpw' does is that it creates self signed certificate, and this will be root certificate for fabric-ca, under this certificate admin:adminpw user will be creted. so here is my question: why the hell I need ca-cert.pem and ca-key.pem files inside etc/hyperledger/fabric-ca-server folder? when do I use it?

davidkel (Mon, 03 Dec 2018 19:41:49 GMT):
@OmarShekriladze Suggest you ask on the #fabric-ca channel, this channel is for questions specific to the node-sdk for fabric.

jbisson (Mon, 03 Dec 2018 21:54:00 GMT):
Has joined the channel.

louisliu2048 (Tue, 04 Dec 2018 01:17:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jvmQeS6T3ojmmhZfA) @bretharrison That also means we cannot use the certificate revocation lists feature now?

Randyshu2018 (Tue, 04 Dec 2018 06:31:10 GMT):
hi,anyone test fabric tps with node-sdk(fabric-1.1)?in my env (4 core 16G) ,my tps only 100tps, so ,Is there some way to improve its performance?

npc0405 (Tue, 04 Dec 2018 07:39:59 GMT):
Join-Channel - Error: Problem setting up the event hub :Error: Connect Failed Any idea? HL version is 1.1

GowriR (Tue, 04 Dec 2018 09:33:50 GMT):
The samples uses a specific method to enroll an identity to the channel. I want to understand more on this. 1. Does it use the cryptogen certs since fabric-ca containers volumes are mapped to it. But i can't see the same cert in the local state store

GowriR (Tue, 04 Dec 2018 09:34:55 GMT):
2. How to use TLS with fabric-ca? How should it be configured in the client's connectionprofile.yaml

GowriR (Tue, 04 Dec 2018 09:35:25 GMT):
3. What are the best practices

GowriR (Tue, 04 Dec 2018 09:36:33 GMT):
Is there any tutorial written by anyone in the community which explains all this? fabric-client API -> fabric-ca interaction

haggis (Tue, 04 Dec 2018 10:49:51 GMT):
Hi guys! Is there a mock available for fabic network? I'd like to test my client application without the need of resetting the whole network before each run :)

haggis (Tue, 04 Dec 2018 10:50:01 GMT):
*fabric-network

ShefaliMittal (Tue, 04 Dec 2018 10:53:10 GMT):
Is there any way to set some timers in hyperledger fabric.. Ex- I execute a transaction now. I want to execute another transaction 5 hours after my recent trasaction

davidkel (Tue, 04 Dec 2018 10:55:55 GMT):
@haggis No there is no mock and unlikely to ever be one. The recommended approach for unit testing would be to use a mocking library such as sinon and create your own mocks.

dipankar1biswas (Tue, 04 Dec 2018 10:58:37 GMT):
Has joined the channel.

dipankar1biswas (Tue, 04 Dec 2018 11:06:47 GMT):
Could you please provide sample code for Service Discovery.

haggis (Tue, 04 Dec 2018 11:15:35 GMT):
Thanks @davidkel

bretharrison (Tue, 04 Dec 2018 14:14:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JkwQMC5MhYa3Gv7Sp) @louisliu2048 No it just means that it will take a bit of work to do

bretharrison (Tue, 04 Dec 2018 14:14:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JkwQMC5MhYa3Gv7Sp) @louisliu2048 No it just means that it will take a bit of work to do, the new list will be in the ConfigUpdate binary

bretharrison (Tue, 04 Dec 2018 14:14:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JkwQMC5MhYa3Gv7Sp) @louisliu2048 No it just means that it will take a bit of work to do, the new list will be in the ConfigUpdate binary

arjitkhullar (Wed, 05 Dec 2018 00:04:25 GMT):
Has joined the channel.

ashlinSajan (Wed, 05 Dec 2018 03:50:03 GMT):
Can I specify different endorsement policy on function/method level in hyperledger-fabric when all functions/methods are in a single chaincode?

PyiTheinKyaw (Wed, 05 Dec 2018 03:58:43 GMT):
Has joined the channel.

PyiTheinKyaw (Wed, 05 Dec 2018 03:59:05 GMT):
Dear all Allow me to ask one question! Could I able to send files in transaction proposal to chaincode ? If there have ways, please figure out. Thanks guys

anjalinaik (Wed, 05 Dec 2018 04:43:35 GMT):
Hi Experts,can anyone please guide me on, how do I need to modify the transaction proposal request in fabric-java-SDK so that it gets signed by both Org1 and Org2.[AND Endorsment policy]

Jayakrishna.V (Wed, 05 Dec 2018 07:17:24 GMT):
HI All, What are the advantages of using Fabric-SDK over Hyperledger Composer style development?

Jayakrishna.V (Wed, 05 Dec 2018 07:17:24 GMT):
HI All, What are the advantages of using Fabric-SDK over Hyperledger Composer style development?

Jayakrishna.V (Wed, 05 Dec 2018 07:17:24 GMT):
HI All, What are the advantages of using Fabric-SDK over Hyperledger Composer style development? @davidkel @jrosmith @dave.enyeart

Jayakrishna.V (Wed, 05 Dec 2018 07:17:24 GMT):
HI All, What are the advantages of using Fabric-SDK over Hyperledger Composer style development? Are there any disadvantages with Hyperledger Composer? @davidkel @jrosmith @dave.enyeart

davidkel (Wed, 05 Dec 2018 08:29:19 GMT):
@Jayakrishna.V Composer doesn't exploit features introduced in hyperledger fabric 1.2 and onwards, for example composer has no support for private collections, service discovery or rich query pagination. Although Composer will continue to work with fabric 1.x releases there will be no effort made to ensure it works with fabric v2 and beyond. The new programming models starting in fabric 1.4 will provide some of the capability of Composer.

MuhammedHafil (Wed, 05 Dec 2018 09:25:26 GMT):
``` getUserContext(name, checkPersistence) Returns the user by the given name. This can be a synchronous call or asynchronous call, depending on whether "checkPersistent" is truthy or not. If truthy, the method is asynchronous and returns a Promise, otherwise it's synchronous. As explained above, the client instance can have an optional state store. The SDK saves enrolled users in the storage which can be accessed by authorized users of the application (authentication is done by the application outside of the SDK). This function attempts to load the user by name from the local storage (via the KeyValueStore interface). The loaded user object must represent an enrolled user with a valid enrollment certificate signed by a trusted CA (such as the CA server). ```

MuhammedHafil (Wed, 05 Dec 2018 09:25:41 GMT):
https://fabric-sdk-node.github.io/Client.html

MuhammedHafil (Wed, 05 Dec 2018 09:27:14 GMT):
How authentication can be performed in CA Node sdk? it does not check for password, right?

FLASHJr (Wed, 05 Dec 2018 11:44:39 GMT):
Has joined the channel.

medipal (Wed, 05 Dec 2018 12:11:03 GMT):
Has joined the channel.

hyperlearner (Wed, 05 Dec 2018 12:11:45 GMT):
Is there a way to get the same result of the function GetHistoryForKey() but latest first ? Also there is a need to not fetch the whole history,but get only limited number .(like, only last 5 latest transactions) . Is this possible in any way ?

FaizulHassan (Wed, 05 Dec 2018 13:05:28 GMT):
Hi Experts, I needs user authentication to be performed in my app. May I get some advice so that I could achieve it.. User Authentication In Normal Web Applications: * User Signs-up by giving email id, password & other information Logs in using his/her creds. _______________________________________________________________________ *User Auth in BlockChain Application: * *User SignsUp* : - Request is sent to Admin - Admin approves the user & adds him in the network. Where keys & certs are generated. *Login* : - MSP searches for the key & grants him/her the access . Does my understanding make sense ? kindly suggest me an idea if I had mistaken..

FaizulHassan (Wed, 05 Dec 2018 13:05:28 GMT):
Hi Experts, I need user authentication to be performed in my app. May I get some advice so that I could achieve it.. User Authentication In Normal Web Applications: * User Signs-up by giving email id, password & other information Logs in using his/her creds. _______________________________________________________________________ *User Auth in BlockChain Application: * *User SignsUp* : - Request is sent to Admin - Admin approves the user & adds him in the network. Where keys & certs are generated. *Login* : - MSP searches for the key & grants him/her the access . Does my understanding make sense ? kindly suggest me an idea if I had mistaken..

FaizulHassan (Wed, 05 Dec 2018 13:05:28 GMT):
Hi Experts, I need user authentication to be performed in my app. May I get some advice so that I could achieve it.. *User Authentication In Normal Web Applications: * User Signs-up by giving email id, password & other information Logs in using his/her creds. _______________________________________________________________________ *User Auth in BlockChain Application: * *User SignsUp* : - Request is sent to Admin - Admin approves the user & adds him in the network. Where keys & certs are generated. *Login* : - MSP searches for the key & grants him/her the access . Does my understanding make sense ? kindly suggest me an idea if I had mistaken..

varunagarwal (Wed, 05 Dec 2018 15:07:02 GMT):
@FaizulHassan Yes that sounds about right. What I do is store the keys on the sever against a mapping of the person's username. Then when he logs in, the username is used to decide which key to use for the transactions

varunagarwal (Wed, 05 Dec 2018 15:08:11 GMT):
for successive API calls, the session token is used to maintain the mapping.

AndreiLovin (Wed, 05 Dec 2018 15:22:20 GMT):
Hello, I'm trying to integrate a NodeJS server over my fully functional multi-host fabric network. The only issue I have is that I can't invoke using the REST calls. I'm getting the following error: asyncMiddleware Error: Failed to connect before the deadline URL:grpcs://orderer.test.com:7050 at checkState (/home/pc-01/fabric-samples/project/fabric-starter-rest/node_modules/grpc/src/client.js:720:16) This is the NodeJS server I'm using: https://github.com/olegabu/fabric-starter-rest

krabradosty (Wed, 05 Dec 2018 19:01:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hXu7vE6FFdJnGWrxR) @Purbaja We faced the similar behavior of Channel Event Hub (fabric 1.3.0). Only peer's restart can help. Any thoughts? Maybe it's problem with a peer, not with nodejs SDK.

krabradosty (Wed, 05 Dec 2018 19:34:09 GMT):
We have a permanent ChannelEventHub connection with a peer. After some time ChannelEventHub starts throwing errors: ``` Error: 14 UNAVAILABLE: Connect Failed ``` or ``` Error: 2 UNKNOWN: Stream removed ``` Reconnection of ChannelEventHub doesn't help, we get an error: ``` Error: Unable to connect to the fabric peer service ``` Only peer's restart solves the problem.

jrosmith (Wed, 05 Dec 2018 20:30:26 GMT):
@krabradosty that sounds like the issue is with the peer. can you post a description of your error along with some peer logs (via hastebin.com) to #fabric-peer-endorser-committer

jrosmith (Wed, 05 Dec 2018 20:32:09 GMT):
@hyperlearner are you asking in regards to go chaincode or node chaincode? either way #fabric-chaincode-dev would be a better spot for this question

rbailey (Wed, 05 Dec 2018 23:04:42 GMT):
Has joined the channel.

zhaochy (Thu, 06 Dec 2018 01:42:28 GMT):
@krabradosty I met the same issue as you, the peer crashed, and the eventhub lost grpc connection, so the solution is to restart peer or connect to another peer

gordon1987 (Thu, 06 Dec 2018 01:51:14 GMT):
Has joined the channel.

gordon1987 (Thu, 06 Dec 2018 01:51:50 GMT):
sing

tennenjl (Thu, 06 Dec 2018 02:03:14 GMT):
Hi Team, I'm trying to abac working `let registerAttrs = []; let registerAttribute = { name: 'appRole', value: 'auctioneer', ecert: true }; registerAttrs.push(registerAttribute); // at this point we should have the admin user // first need to register the user with the CA server return fabric_ca_client.register( { enrollmentID: "user11", affiliation: "org1", role: "client", attr: registerAttrs },` The user registers and enrolls. But when I get user attributes afterwords I don't see the appRole attribute

hyperlearner (Thu, 06 Dec 2018 04:24:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hAgzr2jJ8nc8Cs3zF) @jrosmith Thank you for the response.the question is related to go chaincode.

Rabbitbry (Thu, 06 Dec 2018 07:06:06 GMT):
Has joined the channel.

FaizulHassan (Thu, 06 Dec 2018 07:06:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=exZHxMy3Qkfo68knz) @varunagarwal thanks much for the suggestion @varunagarwal :) will try implementing this.

Rabbitbry (Thu, 06 Dec 2018 07:07:02 GMT):
hi, how to collected endorsement from multiple ProposalResponse before sending to Orderer?

Rabbitbry (Thu, 06 Dec 2018 07:07:02 GMT):
hi, how to collected endorsement from multiple ProposalResponse before sending to Orderer? (scenario is app send proposal for 2 orgs for endorsement)

gordon1987 (Thu, 06 Dec 2018 07:19:58 GMT):

Clipboard - December 6, 2018 3:19 PM

Rabbitbry (Thu, 06 Dec 2018 07:25:14 GMT):
thank @gordon1987

MuhammedHafil (Thu, 06 Dec 2018 09:25:10 GMT):
How to use couchdb as default crypto suite instead of directory

MuhammedHafil (Thu, 06 Dec 2018 09:25:10 GMT):
How to use couchdb as default crypto suite credentialStore instead of directory

MuhammedHafil (Thu, 06 Dec 2018 09:25:20 GMT):
`CouchDBKeyValueStore.js`

pujabhattad (Thu, 06 Dec 2018 11:00:08 GMT):
Has joined the channel.

FLASHJr (Thu, 06 Dec 2018 11:39:33 GMT):
I have created .bna using composer and deployed it on H-Fabric, now I want to connect it to Fabric node SDK and perform the operations on it using sdk (and can I do this without running composer-rest-server). so how to do it? and How do I create users from node sdk?

tennenjl (Thu, 06 Dec 2018 17:43:02 GMT):
Hi Team, I am trying to get ABAC working with node on a 1.2 network.``` I modified the fabcar sample registerUser.js like so``` ` //create user attr array let registerAttrs = []; let registerAttribute = { name: "appRole", value: "auctioneer", ecert: true }; registerAttrs.push(registerAttribute); return fabric_ca_client.register( { enrollmentID: "user1", affiliation: "org1.department1", role: "client", attr: registerAttrs }, admin_user ); }) .then(secret => { // next we need to enroll the user with CA server console.log("Successfully registered user1 - secret:" + secret); return fabric_ca_client.enroll({ enrollmentID: "user1", enrollmentSecret: secret, attr_reqs: [{ name: "appRole", optional: false }] }); }) .then(enrollment => {```` but the enrollment call fails ``` Failed to register: Error: Enrollment failed with errors [[{"code":0,"message":"The following required attributes are missing: [appRole]"}]]``` Thanks for any ideas on what I am doing wrong ``` ``` ``` ``` ```

tennenjl (Thu, 06 Dec 2018 17:43:02 GMT):
Hi Team, I am trying to get ABAC working with node on a 1.2 network.``` I modified the fabcar sample registerUser.js like so``` ` //create user attr array let registerAttrs = []; let registerAttribute = { name: "appRole", value: "auctioneer", ecert: true }; registerAttrs.push(registerAttribute); return fabric_ca_client.register( { enrollmentID: "user1", affiliation: "org1.department1", role: "client", attr: registerAttrs }, admin_user ); }) .then(secret => { // next we need to enroll the user with CA server console.log("Successfully registered user1 - secret:" + secret); return fabric_ca_client.enroll({ enrollmentID: "user1", enrollmentSecret: secret, attr_reqs: [{ name: "appRole", optional: false }] }); }) .then(enrollment => {```` but the enrollment call fails ``` Failed to register: Error: Enrollment failed with errors [[{"code":0,"message":"The following required attributes are missing: [appRole]"}]]``` Thanks for any ideas on what I am doing wrong ```

tennenjl (Thu, 06 Dec 2018 17:43:02 GMT):
Hi Team, I am trying to get ABAC working with node on a 1.2 network. I modified the fabcar sample registerUser.js like so ` //create user attr array let registerAttrs = []; let registerAttribute = { name: "appRole", value: "auctioneer", ecert: true }; registerAttrs.push(registerAttribute); return fabric_ca_client.register( { enrollmentID: "user1", affiliation: "org1.department1", role: "client", attr: registerAttrs }, admin_user ); }) .then(secret => { // next we need to enroll the user with CA server console.log("Successfully registered user1 - secret:" + secret); return fabric_ca_client.enroll({ enrollmentID: "user1", enrollmentSecret: secret, attr_reqs: [{ name: "appRole", optional: false }] }); }) .then(enrollment => {```` but the enrollment call fails ``` Failed to register: Error: Enrollment failed with errors [[{"code":0,"message":"The following required attributes are missing: [appRole]"}]]``` Thanks for any ideas on what I am doing wrong ```

tennenjl (Thu, 06 Dec 2018 17:43:02 GMT):
Hi Team, I am trying to get ABAC working with node on a 1.2 network. I modified the fabcar sample registerUser.js like so ` //create user attr array let registerAttrs = []; let registerAttribute = { name: "appRole", value: "auctioneer", ecert: true }; registerAttrs.push(registerAttribute); return fabric_ca_client.register( { enrollmentID: "user1", affiliation: "org1.department1", role: "client", attr: registerAttrs }, admin_user ); }) .then(secret => { // next we need to enroll the user with CA server console.log("Successfully registered user1 - secret:" + secret); return fabric_ca_client.enroll({ enrollmentID: "user1", enrollmentSecret: secret, attr_reqs: [{ name: "appRole", optional: false }] }); }) .then(enrollment => {```` but the enrollment call fails ``` Failed to register: Error: Enrollment failed with errors [[{"code":0,"message":"The following required attributes are missing: [appRole]"}]]` Thanks for any ideas on what I am doing wrong

tennenjl (Thu, 06 Dec 2018 17:43:02 GMT):
Hi Team, I am trying to get ABAC working with node on a 1.2 network. I modified the fabcar sample registerUser.js like so ` //create user attr array let registerAttrs = []; let registerAttribute = { name: "appRole", value: "auctioneer", ecert: true }; registerAttrs.push(registerAttribute); return fabric_ca_client.register( { enrollmentID: "user1", affiliation: "org1.department1", role: "client", attr: registerAttrs }, admin_user ); }) .then(secret => { // next we need to enroll the user with CA server console.log("Successfully registered user1 - secret:" + secret); return fabric_ca_client.enroll({ enrollmentID: "user1", enrollmentSecret: secret, attr_reqs: [{ name: "appRole", optional: false }] }); }) .then(enrollment => {` but the enrollment call fails Failed to register: Error: Enrollment failed with errors [[{"code":0,"message":"The following required attributes are missing: [appRole]"}]]` Thanks for any ideas on what I am doing wrong

tennenjl (Thu, 06 Dec 2018 17:43:02 GMT):
Hi Team, I am trying to get ABAC working with node on a 1.2 network. I modified the fabcar sample registerUser.js like so ``` //create user attr array let registerAttrs = []; let registerAttribute = { name: "appRole", value: "auctioneer", ecert: true }; registerAttrs.push(registerAttribute); return fabric_ca_client.register( { enrollmentID: "user1", affiliation: "org1.department1", role: "client", attr: registerAttrs }, admin_user ); }) .then(secret => { // next we need to enroll the user with CA server console.log("Successfully registered user1 - secret:" + secret); return fabric_ca_client.enroll({ enrollmentID: "user1", enrollmentSecret: secret, attr_reqs: [{ name: "appRole", optional: false }] }); }) .then(enrollment => {``` but the enrollment call fails Failed to register: Error: Enrollment failed with errors [[{"code":0,"message":"The following required attributes are missing: [appRole]"}]]` Thanks for any ideas on what I am doing wrong

tennenjl (Thu, 06 Dec 2018 17:58:30 GMT):
As a follow-up, if I test the same code, where I don't include the attr_reqs attribute as part of the fabric_ca_client.enroll call, then the register succeeds, but I don't see the attributes (appRole), associated with the user via the chaincode``` let cid = new ClientIdentity(stub); let isAuctioneer = cid.assertAttributeValue("appRole", "auctioneer"); console.info(`*****JEFF***** ${isAuctioneer ? "auctioneer" : "notFound"}`); ```

davidkel (Thu, 06 Dec 2018 18:03:29 GMT):
@tennenjl might be a problem with the registration call try changing the request to use `attrs` not `attr`

davidkel (Thu, 06 Dec 2018 18:03:56 GMT):
ie ``` { enrollmentID: "user1", affiliation: "org1.department1", role: "client", attrs: registerAttrs } ```

tennenjl (Thu, 06 Dec 2018 18:19:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=n7KWH9zCTS4dBr37Y) @davidkel Some days I'm even dumber than normal... Thanks, that was it. :-) .

bandreghetti (Thu, 06 Dec 2018 22:31:49 GMT):
Has joined the channel.

RodneySa (Thu, 06 Dec 2018 22:51:40 GMT):
Has joined the channel.

RodneySa (Thu, 06 Dec 2018 22:51:54 GMT):
Hi! Is there any function in the sdk to revoke an user certificate? I tried a combination of FabricCAServices.revoke and FabricCAServices.gengenerateCRL but it didn't work even with a success response. The certificate that sould be revoked by the revoke function was successfully used to call a chaincode function.

gordon1987 (Fri, 07 Dec 2018 03:06:29 GMT):
@Rabbitbry you are welcome,I delete the message because I mistake send u the java example instead of the node example

pujabhattad (Fri, 07 Dec 2018 05:39:27 GMT):
In Fabric Sample, Balance Transfer, We register user using node sdk and then we create channel, join, install,instantiate,invoke chaincode using the same user's token. How Every user has all these accesses? Is Every user by default admin? How can we prevent this?

GowriR (Fri, 07 Dec 2018 05:41:43 GMT):
Is the REST API for Hyperledger fabric (https://openblockchain.readthedocs.io/en/latest/API/CoreAPI/) deprecated? And what about the REST API for fabric-ca (I cant seem to access the link - (https://github.com/hyperledger/fabric-ca/blob/release/swagger/swagger-fabric-ca.json)?

GowriR (Fri, 07 Dec 2018 05:42:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=y8qPT7TbmJdTxkPnw) @pujabhattad You need to enroll for admin and using that enrollment, create another user and enroll that user

pujabhattad (Fri, 07 Dec 2018 05:44:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CyueZBvPfndYnJeFq) @GowriR I am able to create and enroll users, My Question is , how every user has the access to create channel and chaincode operation.

GowriR (Fri, 07 Dec 2018 05:52:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=F6Q2CXYodNNymM6XD) @pujabhattad That you should control using the UI and API calls

pujabhattad (Fri, 07 Dec 2018 05:53:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YmpJntkerWsoakq5q) @GowriR But the user is member/entity of the network, I should be able to handle it in network

GowriR (Fri, 07 Dec 2018 05:58:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2zdsePQqvdoTSop5r) @pujabhattad every user is not admin. But whoever has admin credentials can do what they want to do. You need to make sure that you dont give admin credentials to all

jastisriradheshyam (Fri, 07 Dec 2018 08:23:44 GMT):
how can we change identity password in ca using node sdk

Jayakrishna.V (Fri, 07 Dec 2018 10:37:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ginLABhFB42fMWwMY) @davidkel Thanks for the information. @davidkel

npc0405 (Fri, 07 Dec 2018 13:40:37 GMT):
[2018-12-07 13:27:41.489] [ERROR] Join-Channel - Problem setting up the event hub :Error: Received status message on the event stream. status:NOT_FOUND [2018-12-07 13:27:41.497] [ERROR] Join-Channel - Error: Problem setting up the event hub :Error: Received status message on the event stream. status:NOT_FOUND Any idea? I am getting while joining channel via nodeSDK

npc0405 (Fri, 07 Dec 2018 14:04:04 GMT):
Guys any idea? I am really stuck on this..

mkhraisha (Fri, 07 Dec 2018 16:30:56 GMT):
Has joined the channel.

mkhraisha (Fri, 07 Dec 2018 16:40:18 GMT):
Is there a tutorial on joining a network with tls enabled? I am trying to connect to the fabric-samples/fabric-ca example from a node sdk and am unable to

mkhraisha (Fri, 07 Dec 2018 16:40:43 GMT):
or a way to pull up a fabric-ca and connect to it from a node-sdk

lay-z (Fri, 07 Dec 2018 18:50:23 GMT):
Has joined the channel.

tennenjl (Sat, 08 Dec 2018 03:47:47 GMT):
Hi Team, for client code, where we want to work with the transaction results (write set) after a transaction has completely executed. We were looking at two possible options.

tennenjl (Sat, 08 Dec 2018 03:47:47 GMT):
Hi Team, for client code, where we want to work with the transaction results (write set) after a transaction has completely executed. We were looking at two possible options.``` 1. Working with the transaction proposal results) (results[0][0].payload and then using event_hub.registerTxEvent to determine if the transaction completed successfully or ```

tennenjl (Sat, 08 Dec 2018 03:47:47 GMT):
Hi Team, for client code, where we want to work with the transaction results (write set) after a transaction has completely executed. We were looking at two possible options.``` 1. Working with the transaction proposal results) (results[0][0].payload and then using event_hub.registerTxEvent to determine if the transaction completed successfully or ```

tennenjl (Sat, 08 Dec 2018 03:47:47 GMT):
Hi Team, for client code, where we want to work with the transaction results (write set) after a transaction has completely executed. We were looking at two possible options.``` 1. Working with the transaction proposal results) (results[0][0].payload and then using event_hub.registerTxEvent to determine if the transaction completed successfully or 2. Use the event_hub.registerTxEvent to again determine if the transaction completed successfully and then use the tx_id to retrieve the transaction and parse the transaction to access the payload and again retrieve the write set. It seems as if the first approach would be more efficient (one less call), but I wanted to see if there was a recommended approach and why we should use that approach.

tennenjl (Sat, 08 Dec 2018 03:47:47 GMT):
Hi Team, for client code, where we want to work with the transaction results (write set) after a transaction has completely executed. We were looking at two possible options. 1. Working with the transaction proposal results) (results[0][0].payload and then using event_hub.registerTxEvent to determine if the transaction completed successfully or 2. Use the event_hub.registerTxEvent to again determine if the transaction completed successfully and then use the tx_id to retrieve the transaction and parse the transaction to access the payload and again retrieve the write set. It seems as if the first approach would be more efficient (one less call), but I wanted to see if there was a recommended approach and why we should use that approach.

tennenjl (Sat, 08 Dec 2018 03:47:47 GMT):
Hi Team, for client code, where we want to work with the transaction results (write set) after a transaction has completely executed. We were looking at two possible options. 1. Working with the transaction proposal results) (results[0][0].payload and then using event_hub.registerTxEvent to determine if the transaction completed successfully or 2. Use the event_hub.registerTxEvent to again determine if the transaction completed successfully and then use the tx_id to retrieve the transaction and parse the transaction to access the payload and again retrieve the write set. It seems as if the first approach would be more efficient (one less call), but I wanted to see if there was a recommended approach and why we should use that approach. Thanks!

varunagarwal (Sat, 08 Dec 2018 11:31:00 GMT):
Hey guys, can someone tlel me what `createCompositeKey()` is used for? I am not able to understand the need for it. https://github.com/hyperledger/fabric-samples/blob/release-1.3/chaincode/marbles02/node/marbles_chaincode.js#L169

varunagarwal (Sat, 08 Dec 2018 11:32:34 GMT):
I saw the documentation for it, but still not sure :(

cppchedy (Sat, 08 Dec 2018 16:00:18 GMT):
Has joined the channel.

rsoeldner (Sat, 08 Dec 2018 19:35:23 GMT):
Has joined the channel.

rsoeldner (Sat, 08 Dec 2018 19:38:07 GMT):
Hi, I want to share a blob securely with 1 to N participants over a sidechain (private data), Is this possible over the SDK without knowing upfront all participants. Meaning I want to build a small UI selecting the "shared" people. Thank you in advance

dave.enyeart (Sat, 08 Dec 2018 19:42:03 GMT):
@rsoeldner In current releases you would have to pass an existing collection name to chaincode that you'd like to target. The collection config includes a set of org members. In the future there is intent to have a more dynamic capability such that client can just pick the target orgs directly without requiring a static collection configuration definition.

rsoeldner (Sat, 08 Dec 2018 19:49:40 GMT):
@dave.enyeart maybe I haven't understood it correctly, but SideChains should allow small "teams" 1-N secure msgs. If I use LDAP (with all in one Org), is it possible to pre-define the collection, I want to share data on user-interaction

rsoeldner (Sat, 08 Dec 2018 19:50:41 GMT):
@dave.enyeart meaning I dont know upfront who will be in a "team"

dave.enyeart (Sat, 08 Dec 2018 20:27:24 GMT):
private data is based on the organization that is running the peer. if you need more granular definition then you will need to define organizations based on that more granular definition. if you need need to dynamically choose who gets the private data per transaction, then you will need the future capability of 'local collections'.

rsoeldner (Sun, 09 Dec 2018 04:51:37 GMT):
@dave.enyeart thank you for the explanation. What is the timeline for this feature, is there already a unstable version ?

DavorKljajic (Mon, 10 Dec 2018 07:01:57 GMT):
Hello guys, so in development we can't use 2 chaincode, one is Hyperleder composer(deploy bussiness network), another is Hyperledger Fabric (Nodejs) ?

RobertDiebels (Mon, 10 Dec 2018 10:19:19 GMT):
Has joined the channel.

RobertDiebels (Mon, 10 Dec 2018 10:20:23 GMT):
Guys I've got a question. When initializing a channel using `channel.initialize()` is it possible that the initialization fails due to high loads currently on the network causing a peer to time-out?

RobertDiebels (Mon, 10 Dec 2018 10:22:15 GMT):
I looked at the code for fabric-client `1.2` and it seems that if a peer to which a discovery request is send fails to respond the initialization may fail. Is that correct?

haggis (Mon, 10 Dec 2018 10:42:20 GMT):
The fabric-network requires fabric-client and therefore should have it as a dependency in package.json, shouldn't it? My node application only utilizes fabric-network but it Errors if I don't install fabric-client separately...

haggis (Mon, 10 Dec 2018 10:47:58 GMT):
Besides that, I find it highly confusing finding the difference and specific use case of each of those two packages :thinking:

zwartesokken (Mon, 10 Dec 2018 11:00:26 GMT):
Has joined the channel.

zwartesokken (Mon, 10 Dec 2018 11:04:24 GMT):
Hi Guys, I have a question. When I have a failed proposal ( response is 500) and I run the function `compareProposalResponseResults`. I'm getting the following error message `TypeError: Cannot read property 'status' of null at _getProposalResponseResults (/mnt/c/_share/test/libs/node_modules/fabric-client/lib/Channel.js:3456:90) at Channel.compareProposalResponseResults (/mnt/c/_share/test/libs/node_modules/fabric-client/lib/Channel.js:3290:21) at ChaincodeHandler.invokeEvaluateProposal (/mnt/c/_share/test/libs/src/ChaincodeHandler.js:172:23) at initializeChannel.then.then (/mnt/c/_share/test/libs/src/ChaincodeHandler.js:79:37) at ` This looks like a bug in the sdk, right?

zwartesokken (Mon, 10 Dec 2018 11:04:24 GMT):
Hi Guys, I have a question. When I have a failed proposal ( response is 500) and I run the function `compareProposalResponseResults`. I'm getting the following error message ``` TypeError: Cannot read property 'status' of null at _getProposalResponseResults (/mnt/c/_share/test/libs/node_modules/fabric-client/lib/Channel.js:3456:90) at Channel.compareProposalResponseResults (/mnt/c/_share/test/libs/node_modules/fabric-client/lib/Channel.js:3290:21) at ChaincodeHandler.invokeEvaluateProposal (/mnt/c/_share/test/libs/src/ChaincodeHandler.js:172:23) at initializeChannel.then.then (/mnt/c/_share/test/libs/src/ChaincodeHandler.js:79:37) at ``` This looks like a bug in the sdk, right?

davidkel (Mon, 10 Dec 2018 11:44:21 GMT):
@haggis fabric-network provides certain higher level capabilities 1. submit/notify - a robust mechanism to easily submit a transaction to chaincode and provides the handling of events to let the application know when the transaction has been committed 2. evaluate (query) - a robust mechanism for invoking a non committing transaction When I say robust it's intent is to also handle seamlessly loss of some of the peers in the channel (so long as it's possible to satisfy endorsement) and still allow to submit a transaction. For a query request it will try other peers to be able to try to get an answer if your primary peer in your organisation is unavailable.

davidkel (Mon, 10 Dec 2018 11:44:21 GMT):
@haggis fabric-network provides certain higher level capabilities 1. submit/notify - a robust mechanism to easily submit a transaction to chaincode and provides the handling of events to let the application know when the transaction has been successfully committed 2. evaluate (query) - a robust mechanism for invoking a non committing transaction When I say robust it's intent is to also handle seamlessly loss of some of the peers in the channel (so long as it's possible to satisfy endorsement) and still allow to submit a transaction. For a query request it will try other peers to be able to try to get an answer if your primary peer in your organisation is unavailable.

davidkel (Mon, 10 Dec 2018 12:11:18 GMT):
@haggis might be worth raising JIRAs for both the missing dependency and lack of documentation to help determine whether fabric-network provides what you want or whether you need to drop down to the lower level api of the fabric-client. The idea of fabric network is to provide an easier to use API than the fabric-client for fabric applications but it won't cover all use cases of the fabric-client capability.

davidkel (Mon, 10 Dec 2018 12:11:18 GMT):
@haggis might be worth raising JIRA for lack of documentation to help determine whether fabric-network provides what you want or whether you need to drop down to the lower level api of the fabric-client. The idea of fabric network is to provide an easier to use API than the fabric-client for fabric applications but it won't cover all use cases of the fabric-client capability.

GowriR (Mon, 10 Dec 2018 12:16:01 GMT):
hello all what are the use cases to use roles: client, user, peer, validator, auditor, ca with fabric-ca? What should i use if i have the peer creating transactions for a client and the client responding to he peers?

GowriR (Mon, 10 Dec 2018 12:16:23 GMT):
and what are the equivalent functions in node sdk?

GowriR (Mon, 10 Dec 2018 12:18:58 GMT):
I have 3 CA's for each peer.

GowriR (Mon, 10 Dec 2018 12:18:58 GMT):
I have 3 CA's for each peer in each org

davidkel (Mon, 10 Dec 2018 13:38:54 GMT):
@haggis confirmed that a new release of fabric-network is due as part of the RC release today and that will have declared a dependency on fabric-client

haggis (Mon, 10 Dec 2018 13:58:50 GMT):
Thanks @davidkel

haggis (Mon, 10 Dec 2018 14:38:46 GMT):
Does anyone know how to get a blocks hash? I'm retrieving it via `channel.queryBlock(5)` and am receiving an object of this structure: https://fabric-sdk-node.github.io/master/global.html#Block However, when I query the next block (#6) and compare the `block.header.previous_hash` field of block #6 with the `block.header.data_hash` field of block #5, they are not equal. Any ideas?

haggis (Mon, 10 Dec 2018 14:56:42 GMT):
And if I do a `channel.queryBlockByHash(block.header.data_hash)` it fails with `Error: transaction returned with failure: proto: invalid UTF-8 string` :disappointed:

haggis (Mon, 10 Dec 2018 14:56:42 GMT):
And if I do a `channel.queryBlockByHash(Buffer.from(block.header.data_hash))` it fails with `Error: Failed to get block hash 4c58..., error Entry not found in index` :disappointed:

haggis (Mon, 10 Dec 2018 14:56:42 GMT):
And if I do a `channel.queryBlockByHash(Buffer.from(block.header.data_hash))` it fails with `Error: Failed to get block hash 4c58..., error Entry not found in index` :disappointed: When I instead try `channel.queryBlockByHash(Buffer.from(block.header.data_hash, 'hex'))` I get a `Error: transaction returned with failure: proto: invalid UTF-8 string` :question:

bretharrison (Mon, 10 Dec 2018 15:54:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=F9Z8DoqpWW6EkznNN) @zwartesokken Yes this looks like a bug, Will you be writing a JIRA

bretharrison (Mon, 10 Dec 2018 15:55:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Dyy5CH7z8GD29AASW) @RobertDiebels Yes it could fail, you may have to try again.

RobertDiebels (Mon, 10 Dec 2018 16:13:16 GMT):
Great thanks :thumbsup:

scottz (Mon, 10 Dec 2018 16:17:56 GMT):
@bretharrison Does the nodesdk request the first service-discovery layout automatically when cc instantiation happens?

scottz (Mon, 10 Dec 2018 17:41:34 GMT):
And @bretharrison : A question about expectations: When we stop a peer, and sdk figures out to avoid any layout using that peer for current endorsements and moves on to using other peers instead, then when that peer recovers, could we expect that it would be used for some endorsements again? i.e. is there anything that would lead sdk to try it after awhile again?

scottz (Mon, 10 Dec 2018 17:43:52 GMT):
Or would the client (PTE) itself need to actually request a new ServiceDiscovery layout, before the sdk would try it again? ( @suryalanka @dongming )

scottz (Mon, 10 Dec 2018 17:51:52 GMT):
I am looking for guidance in the docs to tell us how to USE the feature, i.e. if my client needs to request layouts on a regular basis, to relearn about any recovered peers (or newly joined peers). If I don't find any, I will create a doc bug - unless the code is supposed to re-recognize recovered peers, in which case it would be a code bug.

bretharrison (Mon, 10 Dec 2018 17:58:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rCGAP4RzQPFisGfWq) @scottz With 1.3, the first layout was used, with 1.4 the layouts are randomized on each call

scottz (Mon, 10 Dec 2018 17:59:27 GMT):
but what triggers the first layout request?

bretharrison (Mon, 10 Dec 2018 18:08:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XuzDRArvTL5ddRM2S) @scottz The discovery service will be required based on the `discovery-cache-life` system config setting, default is 5 minutes. The peer that is used for channel initialization (target: peer) will query the discover service when the channel first initialized. The age of the discovery results will be checked on each endorsement call, if old, query the discovery service. The peers will be sorted within each group based the parameters of the call, priority peers and organizations, block height or random, and then requests will be issued to the peers. If is peer does not respond then another will be tried. All this logic is in the plugable `EndorsementHandler` that we ship and a user may write their own handler if the logic does not meet their needs.

bretharrison (Mon, 10 Dec 2018 18:08:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XuzDRArvTL5ddRM2S) @scottz The discovery service will be requeried based on the `discovery-cache-life` system config setting, default is 5 minutes. The peer that is used for channel initialization (target: peer) will query the discover service when the channel first initialized. The age of the discovery results will be checked on each endorsement call, if old, query the discovery service. The peers will be sorted within each group based the parameters of the call, priority peers and organizations, block height or random, and then requests will be issued to the peers. If is peer does not respond then another will be tried. All this logic is in the plugable `EndorsementHandler` that we ship and a user may write their own handler if the logic does not meet their needs.

bretharrison (Mon, 10 Dec 2018 18:08:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XuzDRArvTL5ddRM2S) @scottz The discovery service will be re-queried based on the `discovery-cache-life` system config setting, default is 5 minutes. The peer that is used for channel initialization (target: peer) will be sent the discover service request when the channel first initialized. The age of the discovery results will be checked on each endorsement call, if old, query the discovery service. The peers will be sorted within each group based the parameters of the call, priority peers and organizations, block height or random, and then requests will be issued to the peers. If is peer does not respond then another will be tried. All this logic is in the plugable `EndorsementHandler` that we ship and a user may write their own handler if the logic does not meet their needs.

bretharrison (Mon, 10 Dec 2018 18:08:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XuzDRArvTL5ddRM2S) @scottz The discovery service will be re-queried based on the `discovery-cache-life` system config setting, default is 5 minutes. The peer that is used for channel initialization (target: peer) will be sent the discover service request when the channel is first initialized. The age of the discovery results will be checked on each endorsement call, if old, query the discovery service. The peers will be sorted within each group based the parameters of the call, priority peers and organizations, block height or random, and then requests will be issued to the peers. If is peer does not respond then another will be tried. All this logic is in the plugable `EndorsementHandler` that we ship and a user may write their own handler if the logic does not meet their needs.

bretharrison (Mon, 10 Dec 2018 18:08:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ab4MzmhMFBiRN5SZL) @scottz I do not understand the question

bretharrison (Mon, 10 Dec 2018 18:14:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aMCoJxDLQ7j3exLPR) @scottz An application may ask for a refresh of the discovery results at any time or adjust the discovery-cache-life setting

scottz (Mon, 10 Dec 2018 18:16:17 GMT):
ok, the sdk obtains the layouts in response to the service discovery request upon channel initialization, and every 5 mins thereafter. Is the core.yaml the correct place for discover-cache-life? We don't see it in fabric/sample-config/core.yaml.

bretharrison (Mon, 10 Dec 2018 18:16:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=b6TJE8792SoDhBvb5) @scottz The endorsement handler we ship does not remember the peer results, so it will try the peer again on the next call if needed.

bretharrison (Mon, 10 Dec 2018 18:19:35 GMT):
The `discovery-cache-life` that I discussed is not a fabric setting, it is a client side, NodeSDK setting, it does not control the discovery service running on the fabric peer. It controls how the application, the client makes request to the discovery service running on the peer.

bretharrison (Mon, 10 Dec 2018 18:19:35 GMT):
The `discovery-cache-life` that I discussed is not a fabric setting, it is a client side, NodeSDK setting, it does not control the discovery service running on the fabric peer. It controls how the application, the client makes request to the discovery service running on the peer. See https://github.com/hyperledger/fabric-sdk-node/blob/2022dc3d212905b781a2bd9523c31d47c606d087/fabric-client/config/default.json#L27

bretharrison (Mon, 10 Dec 2018 18:19:35 GMT):
The `discovery-cache-life` that I discussed is not a fabric setting, it is a client side, NodeSDK setting, it does not control the discovery service running on the fabric peer. It controls how the application, the client makes request to the discovery service running on the peer. See https://github.com/hyperledger/fabric-sdk-node/blob/2022dc3d212905b781a2bd9523c31d47c606d087/fabric-client/config/default.json#L27 Applications may modify this value by any of the configuration settings update methods they user for other settings, with the easiest being to use the `Client.setConfgSetting('discovery-cache-life', 100000);`

bretharrison (Mon, 10 Dec 2018 18:19:35 GMT):
The `discovery-cache-life` that I discussed is not a fabric setting, it is a client side, NodeSDK setting, it does not control the discovery service running on the fabric peer. It controls how the application, the client makes request to the discovery service running on the peer. See https://github.com/hyperledger/fabric-sdk-node/blob/2022dc3d212905b781a2bd9523c31d47c606d087/fabric-client/config/default.json#L27 Applications may modify this value by any of the configuration settings update methods they use for other settings, with the easiest being to use the `Client.setConfgSetting('discovery-cache-life', 100000);`

scottz (Mon, 10 Dec 2018 18:25:02 GMT):
thanks. ok. As for the other question and response, I request one clarification: `If is peer does not respond then another will be tried. ` And we are seeing that once a peer is stopped, then it is never used again. Even after restarting it and waiting 10 minutes. The scenario is such that that peer was required for ALL transactions and layouts (using sidedb configured to require a push to every other peer in the network). Even after the peer recovered, all traffic never worked again. Would you like to see some logs and debug in lab now, or should we create the bug first?

bretharrison (Mon, 10 Dec 2018 18:43:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=i5KssHs34KHXfAa7j) @scottz I did venture in to the office today due to the snow, I will be happy to look at the logs tomorrow.

scottz (Mon, 10 Dec 2018 19:33:24 GMT):
great. thanks, @bretharrison . We created a bug; we can reproduce with a couple different the scenario variations; Surya can work with you whenever you are ready. https://jira.hyperledger.org/browse/FABN-1058

qsmen (Tue, 11 Dec 2018 02:06:27 GMT):
hi experts, in release doc, there is a command" peer chaincode update..." . I want to know if there is a sdk responding to this command? Thank you.

qsmen (Tue, 11 Dec 2018 02:06:27 GMT):
hi experts, in release doc, there is a command" peer chaincode update..." . I want to know if there is a sdk corresponding to this command? Thank you.

qsmen (Tue, 11 Dec 2018 02:06:27 GMT):
hi experts, in release doc, there is a command" peer chaincode upgrade..." . I want to know if there is a sdk corresponding to this command? Thank you.

FaizulHassan (Tue, 11 Dec 2018 05:48:45 GMT):
to we have functionality to add new organization into the fabric network using node sdk ?

FaizulHassan (Tue, 11 Dec 2018 05:48:45 GMT):
Do we have functionality to add new organization into the fabric network using node sdk ?

haggis (Tue, 11 Dec 2018 07:47:56 GMT):
How can one get the hash of the latest block? It's not included in the block object, when you query it.

xuchenhao001 (Tue, 11 Dec 2018 07:50:09 GMT):
Has left the channel.

qsmen (Tue, 11 Dec 2018 07:54:07 GMT):
in command line, after I upgrade a chaincode with a specified version. but when I invoke the chaincode, no version optiion. Will the system invoke the lastest version by default?

Sarath_Kumar (Tue, 11 Dec 2018 09:46:29 GMT):
Has joined the channel.

zwartesokken (Tue, 11 Dec 2018 09:50:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QQrKfq6jG73nj5Xpx) @bretharrison done

FaizulHassan (Tue, 11 Dec 2018 11:52:21 GMT):
Hi Experts, what node modules shall we use to interact with fabric network , fabric_client sdk or fabric-network ?

FaizulHassan (Tue, 11 Dec 2018 11:52:21 GMT):
Hi Experts, what node modules shall we use to interact with fabric network, *fabric_client* sdk or *fabric-network* ?

FaizulHassan (Tue, 11 Dec 2018 11:52:21 GMT):
Hi Experts, what node modules shall we use to interact with fabric network, *fabric-client* or *fabric-network* ?

davidkel (Tue, 11 Dec 2018 12:06:44 GMT):
@FaizulHassan fabric-network provides a simpler to use api for interacting with fabric. It implements 2 main concepts 1. A submit/notify model where you can submit a transaction to be committed to the blockchain and it will notify you when the transaction has been successfully committed. 2. A query mechanism where you can invoke chaincode to retrieve some information (that won't be commit to the blockchain) In both cases it provides a fault tolerance mechanism in case of issues with connectivity to peers. fabric-client is a more low level api for interacting with a fabric network and doesn't provide the capabilities of fabric-network

FaizulHassan (Tue, 11 Dec 2018 13:05:17 GMT):
Do we have other functionalities in fabric-network module, like reading total number of available blocks, querying data using transaction id, adding channel ?

davidkel (Tue, 11 Dec 2018 13:08:59 GMT):
@FaizulHassan No, you would have to use low level fabric-client calls for that. You can get access to the Client Object and Channel object being used by the fabric-network Gateway and Network objects to do more low level stuff, for example gateway.getClient() returns the Client instance and network.getChannel() returns the channel instance being used.

davidkel (Tue, 11 Dec 2018 13:10:55 GMT):
@FaizulHassan When you say `querying data using transaction id` then fabric-network has an `evaluate` method for invoking a transaction for querying, but if you mean querying data `by` transactionid then it doesn't provide that capability

FaizulHassan (Tue, 11 Dec 2018 13:12:45 GMT):
thanks much @davidkel :)

bestbeforetoday (Tue, 11 Dec 2018 14:35:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=f4rFKdCEfEM8sg2hd) @haggis The latest docs should make the use-case for each a little clearer: - https://fabric-sdk-node.github.io/master/index.html - https://fabric-sdk-node.github.io/master/module-fabric-network.html

bestbeforetoday (Tue, 11 Dec 2018 14:45:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LnnYkywEgik3Y6uSi) @qsmen Look at https://fabric-sdk-node.github.io/release-1.3/Channel.html#sendUpgradeProposal

bestbeforetoday (Tue, 11 Dec 2018 14:49:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9kaEndmM6aTr2aXJA) @qsmen Only one version of a given named chaincode is active per channel. Client requests are sent to the currently active version. If you upgrade to a new version, that new version becomes the currently active version. Lots more detail at https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4noah.html

bestbeforetoday (Tue, 11 Dec 2018 14:52:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DqvEYE7e7s24srX6J) @FaizulHassan My simple take is, where _fabric-network_ does what you want, use that; where it doesn't, use _fabric-client_

thegauravks (Tue, 11 Dec 2018 16:25:50 GMT):
Has joined the channel.

thegauravks (Tue, 11 Dec 2018 16:26:43 GMT):
Hey everyone, The Fabric Node SDK has a CryptoSuite api. This lets you generate key pairs and use those for encryption and signing. I'll attach the link here. When i try to implement it, it throws an exception that its not implemented yet. https://fabric-sdk-node.github.io/release-1.3/module-api.CryptoSuite.html

thegauravks (Tue, 11 Dec 2018 16:27:01 GMT):
Any clue on when it will be implemented ?

bretharrison (Tue, 11 Dec 2018 17:08:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6oLYbFZykrYm4fgbb) @thegauravks What is the error message, Are you writing your own implementation ? NodeSDK has implementations, `CryptoSuite_ECDSA_AES` and `CryptoSuite_PKCS11`

qsmen (Wed, 12 Dec 2018 01:04:32 GMT):
Thank you for the useful reply. Bestbeforetoday

Taffies (Wed, 12 Dec 2018 04:11:17 GMT):
Hi, I have mutual TLS enabled on my orderer and peer, and trying to configure mutual TLS on my SDK. I currently have two questions regarding this: (1) Can the client key & cert files be written onto the common configuration profile, or do I need to set it manually? (I am looking at https://fabric-sdk-node.github.io/release-1.3/tutorial-mutual-tls.html but don't quite understand it - why do they use the same set of certs for both orderer and peer?) (2) If my invoke requires multiple endorsements from the peers, do I need to provide the mutual TLS on every single peer?

Taffies (Wed, 12 Dec 2018 04:41:16 GMT):
mutual tls

NeerajKumar (Wed, 12 Dec 2018 05:57:41 GMT):
Hi Experts, I have been using hyperledger fabric with nodejs SDK from past many months now and i haven't faced any big issues but from last week some containers of my network infrastructure kept shutting down which some how i recovered but but i am not able to start the chaincode containers which were automatically generated after installing and instantiating the chaincode. it keep on shuttiing down. and now it says "x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "serial:71333524560576167915191865139975345404" in every containers log can some body please explain why when ever i run docker restart dev-peer1.org2.example.com-bel_adhaar-v1 command containers exites immediately after trying to restart with the above error

thegauravks (Wed, 12 Dec 2018 06:09:37 GMT):
@bretharrison Thank you for your response. I am able to create an instance of CryptoSuite, using fabric-client.newCryptoSuite. Since CryptoSuite_PKCS11 just extends CrypteSuite, how would i call this ?

thegauravks (Wed, 12 Dec 2018 06:19:54 GMT):
Got it, i was not passing the opts, thus creating a CryptoSuite_ECDSA_AES instance, which is not yet implemented

thegauravks (Wed, 12 Dec 2018 06:20:13 GMT):
But can you help me with sample {opts} argument

anjalinaik (Wed, 12 Dec 2018 08:40:00 GMT):
If there is an AND endorsment policy for a 2 org[2 peer/org] , and if one of the peer couchdb is compromised, will the blockchain allow any further transactions?

krabradosty (Wed, 12 Dec 2018 09:53:22 GMT):
Hello! I'm reading "How to sign a transaction with an offline private key" tutorial and there is no any mention about how to use tls in that case. Could someone give a comment about this?

krabradosty (Wed, 12 Dec 2018 09:53:22 GMT):
Hello! I'm reading "How to sign a transaction with an offline private key" tutorial and there is no any mention about how to use mutal tls in that case. Could someone give a comment about this?

xuchenhao001 (Wed, 12 Dec 2018 12:00:37 GMT):
Has joined the channel.

xuchenhao001 (Wed, 12 Dec 2018 12:02:40 GMT):
Hi, can any one give me an example shows how to use `service discovery`? I have read [this](https://fabric-sdk-node.github.io/tutorial-discovery.html) doc but I got an error after I use `service discovery`: ``` 2018-12-12 11:51:26.413 UTC [endorser] callChaincode -> INFO 05d [mychannel][16a59ced] Entry chaincode: name:"mycc" 2018-12-12 11:51:30.138 UTC [chaincode] ProcessStream -> ERRO 05e handling chaincode support stream: rpc error: code = Canceled desc = context canceled receive failed github.com/hyperledger/fabric/core/chaincode.(*Handler).ProcessStream /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:408 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).HandleChaincodeStream /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:182 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Register /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:187 github.com/hyperledger/fabric/core/chaincode/accesscontrol.(*interceptor).Register /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/accesscontrol/interceptor.go:57 github.com/hyperledger/fabric/protos/peer._ChaincodeSupport_Register_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/chaincode_shim.pb.go:1066 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processStreamingRPC /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1160 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1253 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:680 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 ```

xuchenhao001 (Wed, 12 Dec 2018 12:04:40 GMT):
And here is my code for `service discovery`: ``` let client = await helper.getClientForOrg(orgName); let channel = client.newChannel(channelName); channel.addPeer(client.getPeer("peer0.org1.example.com")); await channel.initialize({discover:true, asLocalhost:true}); let request = { chaincodeId: chaincodeName, fcn: functionName, args: args, transientMap: transient }; logger.debug("Make query"); let response_payloads = await channel.queryByChaincode(request); ``` thanks!!

qizhang (Wed, 12 Dec 2018 22:35:16 GMT):
The Node client got the following issue when trying to connect to the orderer, any suggestion? Thanks! ``` info: [PTE 0 util]: [getTLSCert] key: orderer, subkey: orderer0 info: [PTE 0 main]: [clientNewOrderer] orderer: grpcs://zaci-43.pok.ibm.com:5005 E1212 17:27:53.080721112 44583 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E1212 17:27:54.081753813 44583 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E1212 17:27:55.391927501 44583 ssl_transport_security.cc:1227] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. ```

GuillaumeTong (Thu, 13 Dec 2018 08:44:33 GMT):
Has left the channel.

ihormudryy (Thu, 13 Dec 2018 10:02:39 GMT):
Has joined the channel.

jonathan-blood (Thu, 13 Dec 2018 15:34:55 GMT):
Hi guys. I am trying to run a multi-host network and have everything up and running. I am able to invoke transactions from the CLI (`peer chaincode invoke`) and the ledger writes are propagated around the network. When I try to use a Node app to invoke transactions, however, I get an error that it failed to connect to the peer before the deadline. I am able to both `telnet` and `curl` to the peer on port 7051 which tells me the peer is running and the port is open, but when I try and use the Node SDK it just errors.

paul.sitoh (Thu, 13 Dec 2018 15:43:49 GMT):
Anyone know where I can get example codes using `fabric-network` api?

jonathan-blood (Thu, 13 Dec 2018 15:45:25 GMT):
@paul.sitoh hey Paul! I hope you are well :) try this: https://github.com/hyperledger/fabric-samples/tree/master/commercial-paper

jonathan-blood (Thu, 13 Dec 2018 15:45:56 GMT):
@paul.sitoh https://hyperledger-fabric.readthedocs.io/en/latest/tutorial/commercial_paper.html

paul.sitoh (Thu, 13 Dec 2018 15:45:58 GMT):
@jonathan-blood hey hope you are well. thanks

paul.sitoh (Thu, 13 Dec 2018 15:46:10 GMT):
Merry Christmas to you too

paul.sitoh (Thu, 13 Dec 2018 15:46:10 GMT):
Merry Christmas to you

jonathan-blood (Thu, 13 Dec 2018 15:46:15 GMT):
And to you :)

MuhammedHafil (Thu, 13 Dec 2018 18:02:41 GMT):
``` Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054] ```

MuhammedHafil (Thu, 13 Dec 2018 18:03:25 GMT):
Getting this error with fabric-client when my web app running in docker, but it works fine if not in docker

MuhammedHafil (Thu, 13 Dec 2018 18:04:37 GMT):
What should be the endpoint when calling from inside a docker container?

MuhammedHafil (Thu, 13 Dec 2018 18:10:16 GMT):
How to change the host of CA in node sdk?

JayJong (Fri, 14 Dec 2018 07:07:20 GMT):
@davidkel hi i saw the qn by taffies on multiple orderers in fabric-client 1.2, i am currently facing an issue whereby v1.2 works with multiple orderers but v1.3 doesnt work with multiple orderers. By working with multiple orderers, i mean to say that if 1 orderer is down, the other orderer will get the transaction and invoke will succeed. When i use fabric-client 1.3, i will just get errors with finding the first orderer in the list. Any help is appreciated.

JayJong (Fri, 14 Dec 2018 07:07:20 GMT):
@davidkel hi i saw the qn by taffies on multiple orderers in fabric-client 1.2, i am currently facing an issue whereby v1.2 works with multiple orderers but v1.3 doesnt work with multiple orderers. By working with multiple orderers, i mean to say that if 1 orderer is down, the other orderer will get the transaction and invoke will succeed. When i use fabric-client 1.3, i will just get errors with the first orderer in the list. Any help is appreciated.

mallikarjunasai995 (Fri, 14 Dec 2018 07:19:25 GMT):
Has joined the channel.

Randyshu2018 (Fri, 14 Dec 2018 07:22:27 GMT):
I'm new to fabric1.2 and there are some implements for service discovery ? I found nothing with fabric-samples/balance-transfer versioned 1.2 and fabric-node-sdk versioned 1.2

davidkel (Fri, 14 Dec 2018 08:02:22 GMT):
@JayJong Can you try fabric 1.4.0-rc1 ? If you get the same problem then you should raise a JIRA and set the level to high or highest, marking affected versions as 1.4.0 and 1.3.0. You need to include all details as to what errors you get extra. The code hasn't changed between 1.3 and 1.4.0-rc1 for the basic commit handler (also it's interesting to note that only minor changes have occurred between 1.2 and 1.3 which shouldn't have caused any issue)

davidkel (Fri, 14 Dec 2018 08:02:22 GMT):
@JayJong Can you try fabric 1.4.0-rc1 ? If you get the same problem then you should raise a JIRA and set the level to highest, marking affected versions as 1.4.0 and 1.3.0. You need to include all details as to what errors you get extra. The code hasn't changed between 1.3 and 1.4.0-rc1 for the basic commit handler (also it's interesting to note that only minor changes have occurred between 1.2 and 1.3 which shouldn't have caused any issue)

JayJong (Fri, 14 Dec 2018 09:44:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=B3SbfnRPfbtdg5dhx) @davidkel ok noted, i assume u mean v1.4.0-rc2 bcos in node-sdk only has v1.4.0-beta and v1.4.0-rc2. Fabric release is v1.4.0-rc1

jonathan-blood (Fri, 14 Dec 2018 10:25:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nsQbMxWEQAn7N8Z7w) Anyone? To add some more info: I found this Jira ticket (https://jira.hyperledger.org/browse/FABN-992) and as a result tried using those exact versions of `fabric-client` and `grpc` - also tried using `latest` for both - and got the same error. I have tried increased the timeout that `grpc` waits for the client to be ready and got the same result.

jonathan-blood (Fri, 14 Dec 2018 10:28:40 GMT):
To be clear, the error is "Failed to connect before the deadline". I have tried adding some manual logging to `grpc` where that error is throw, to try and catch the root error and it is something like "The async function encountered and error"

MuhammedHafil (Fri, 14 Dec 2018 11:46:06 GMT):
can anybody tell me what is the reason behind this error? `Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] `

MuhammedHafil (Fri, 14 Dec 2018 11:46:06 GMT):
can anybody tell me what is the reason behind this error? `Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]`

andrew-coleman (Fri, 14 Dec 2018 14:44:58 GMT):
@jonathan-blood a fix went in recently in this area. It hasn't been published in a 'stable' release yet, but is available to try in `fabric-client@1.3.1-snapshot.129`

jonathan-blood (Fri, 14 Dec 2018 14:52:35 GMT):
@andrew-coleman no luck :( thanks though

andrew-coleman (Fri, 14 Dec 2018 14:57:47 GMT):
@bretharrison ^ any ideas?

bretharrison (Fri, 14 Dec 2018 15:00:47 GMT):
Is the NodeSDK client able to get to any address, could you put in an address something that exist and see if the error message changes

bretharrison (Fri, 14 Dec 2018 15:00:47 GMT):
Is the NodeSDK client able to get to any address, could you put in an address of something that exist and see if the error message changes

DJ_HC (Fri, 14 Dec 2018 15:19:07 GMT):
Has joined the channel.

mkhraisha (Fri, 14 Dec 2018 20:46:16 GMT):
When i try to connect to a fabric i get the error Hostname/IP doesn't match certificate's altnames: "$IPNAMEHERE is not in the cert's list:" and i cants eem to figure it out, i tried changing the name of the ca on init like so fabric-ca-init -b BOOTSTRAP USERPASS --csr.cn IPNAME and yet that error persists. is there a way to add a hostname/IP to the certificate?

sambhavdutt (Sat, 15 Dec 2018 03:46:52 GMT):
Good Evening tean, there have been consistent fails in Headless and Integration tests, Can you take a look, https://jira.hyperledger.org/browse/FABN-1077

sambhavdutt (Sat, 15 Dec 2018 03:46:52 GMT):
Good Evening , there have been consistent fails in Headless and Integration tests, Can you take a look, https://jira.hyperledger.org/browse/FABN-1077

sambhavdutt (Sat, 15 Dec 2018 03:47:25 GMT):
@davidkel @bretharrison

MuhammedHafil (Sat, 15 Dec 2018 16:29:36 GMT):
can anybody tell me what is the reason behind this error? `Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]`

JayJong (Sun, 16 Dec 2018 02:50:38 GMT):
u did not join ur peer to the channel

MuhammedHafil (Sun, 16 Dec 2018 06:02:42 GMT):
The issue was gone after i removed all docker images and restarted network again

MuhammedHafil (Sun, 16 Dec 2018 07:57:59 GMT):
Is it possible to change attributes of a user after registering?

dinoradulovic (Mon, 17 Dec 2018 02:51:14 GMT):
Has joined the channel.

jd232 (Mon, 17 Dec 2018 07:37:15 GMT):
Has joined the channel.

Randyshu2018 (Mon, 17 Dec 2018 09:56:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rKicgPoTxD7FqMpPE) @MuhammedHafil maybe something wrong with your network-config.yaml,serveral times ago I met the same error and the reason is 'I send join channel request without updating network-config.yaml'

MuhammedHafil (Mon, 17 Dec 2018 11:53:49 GMT):
This time i think, it was due to ,given role to user which is not configured in ca config

BarryMcLaughlin (Mon, 17 Dec 2018 11:57:26 GMT):
Has anyone managed to get the offline transaction signing working - so that the private key(s) do not have to be stored server side with the SDK - been following the example here: https://github.com/hyperledger/fabric-sdk-node/blob/release-1.3/test/integration/signTransactionOffline.js but hitting an error when sending the signed transaction proposal to the endorsing peer. error received: SimulateProposal -> ERRO 092 [mychannel][430b1431] failed to invoke chaincode name:"cscc" , error: txid: 430b1431b2a556607a5f0a444046203141bb6930829043dc4983c6649cb07d68(mychannel) exists github.com/hyperledger/fabric/core/chaincode.(*TransactionContexts).Create /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/transaction_contexts.go:59 ...

BarryMcLaughlin (Mon, 17 Dec 2018 11:58:53 GMT):
I am not passing this txId so must be generated along the way somewhere. I am just testing with a local 1.3 fabric and the fabcar sample app...am able to invoke in standard way without issue

jonathan-blood (Mon, 17 Dec 2018 16:40:17 GMT):
@bretharrison @andrew-coleman apologies, I was travelling back from Italy on Friday afternoon/evening. Thanks for the suggestions, I have passed them on to the client as I am not on site with them this week and we will see how we get on.

bretharrison (Mon, 17 Dec 2018 16:44:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qRqXDtrMQGZkSxE3Q) @MuhammedHafil yes, reenroll, and then use the new certificate https://fabric-sdk-node.github.io/master/FabricCAServices.html#reenroll

deepaks (Tue, 18 Dec 2018 14:22:17 GMT):
Has joined the channel.

deepaks (Tue, 18 Dec 2018 14:22:21 GMT):
Hello everyone Can anyone suggest why this error is coming when I am instantiating golang chaincode Error returned from build: 1 \"can't load package: cannot use path@version syntax in GOPATH mode

AVetter (Tue, 18 Dec 2018 14:53:23 GMT):
Has joined the channel.

akshay.lawange (Tue, 18 Dec 2018 15:09:34 GMT):
Hi, I am using Chaincode events and trying to get data from chaincode on application server. I am able to recieve event with transaction_id etc. but not getting the data which i am sending from chaincode. Can someone help with this?

akshay.lawange (Tue, 18 Dec 2018 15:09:34 GMT):
This is the part of nodejs script where i am receiving event -

akshay.lawange (Tue, 18 Dec 2018 15:23:08 GMT):
`let event_hubs = channel.getChannelEventHubsForOrg(); event_hubs.forEach((eh) => { let invokeEventPromise = new Promise((resolve, reject) => { let payloadData = eh.registerChaincodeEvent(ChaincodeID, "sampleEvent", (payload) => { console.log("OpenDealSettlement: " + payload); console.log("OpenDealSettlement: Stringified Output" + JSON.stringify(payload)); }, (err) => { console.log("sampleEvent ERROR : " + err); }); eh.connect(Boolean(false)); }); });` And this is the chaincode event and data which i am sending from chaincode `` ``` ```

akshay.lawange (Tue, 18 Dec 2018 15:24:04 GMT):
` let event_hubs = channel.getChannelEventHubsForOrg(); event_hubs.forEach((eh) => { let invokeEventPromise = new Promise((resolve, reject) => { let payloadData = eh.registerChaincodeEvent(ChaincodeID, "sampleEvent", (payload) => { console.log("OpenDealSettlement: " + payload); console.log("OpenDealSettlement: Stringified Output" + JSON.stringify(payload)); }, (err) => { console.log("sampleEvent ERROR : " + err); }); eh.connect(Boolean(false)); }); }); `

akshay.lawange (Tue, 18 Dec 2018 15:24:43 GMT):
``` let event_hubs = channel.getChannelEventHubsForOrg(); event_hubs.forEach((eh) => { let invokeEventPromise = new Promise((resolve, reject) => { let payloadData = eh.registerChaincodeEvent(ChaincodeID, "sampleEvent", (payload) => { console.log("OpenDealSettlement: " + payload); console.log("OpenDealSettlement: Stringified Output" + JSON.stringify(payload)); }, (err) => { console.log("sampleEvent ERROR : " + err); }); eh.connect(Boolean(false)); }); }); ```

akshay.lawange (Tue, 18 Dec 2018 15:25:51 GMT):
And this is chaincode event which sends data - ``` err = stub.SetEvent("sampleEvent", []byte(dataString)) if err != nil { fmt.Println("SetEvent Error", err) } ```

akshay.lawange (Tue, 18 Dec 2018 15:29:53 GMT):
Hi, I am using Chaincode events and trying to get data from chaincode on application server. I am able to recieve event with transaction_id etc. but not getting the data which i am sending from chaincode. Can someone help with this? This is the part of nodejs script where i am receiving event - ``` let event_hubs = channel.getChannelEventHubsForOrg(); event_hubs.forEach((eh) => { let invokeEventPromise = new Promise((resolve, reject) => { let payloadData = eh.registerChaincodeEvent(ChaincodeID, "sampleEvent", (payload) => { console.log("OpenDealSettlement: " + payload); console.log("OpenDealSettlement: Stringified Output" + JSON.stringify(payload)); }, (err) => { console.log("sampleEvent ERROR : " + err); }); eh.connect(Boolean(false)); }); }); ``` And this is chaincode event which sends data - ``` err = stub.SetEvent("sampleEvent", []byte(dataString)) if err != nil { fmt.Println("SetEvent Error", err) } ```

mkhraisha (Tue, 18 Dec 2018 19:41:54 GMT):
Hi, Can anyone help resolve the error Hostname/IP doesn't match certificate's altnames: "IP: X.X.X.X is not in the cert's list: " I have verified that the ip is on the certificate when it is created with --csr.hosts IPNUMBER https://stackoverflow.com/questions/53786741/connecting-from-node-backend-to-fabric-results-in-hostname-ip-doesnt-match-cert

NickXie (Wed, 19 Dec 2018 07:12:04 GMT):
Has joined the channel.

DeepaMotwani (Wed, 19 Dec 2018 07:37:15 GMT):
can anyone tell me what specific changes should be done in the node chaincode to implement private data

DeepaMotwani (Wed, 19 Dec 2018 07:37:15 GMT):
can anyone tell me what specific changes should be done in the node chaincode to implement private data. I have configured collection json file and mentioned its path in instantiate-chaincode.js file. but after that i am getting error while instantiating chaincode. Kindly help me out.

UnaiUrki (Wed, 19 Dec 2018 11:11:20 GMT):
Hi, is it possible to update channel fron Node SDK ?

UnaiUrki (Wed, 19 Dec 2018 11:11:20 GMT):
Hi, is it possible to update channel from Node SDK ?

UnaiUrki (Wed, 19 Dec 2018 11:59:12 GMT):
I answer my own question, yes it is possible, with client.updateChannel

UnaiUrki (Wed, 19 Dec 2018 11:59:42 GMT):
updateChannel

akshay.lawange (Wed, 19 Dec 2018 12:49:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jxZS5ghH5JzTL4diy) Solved..we have to set boolean value to *true * instead of *false*.

WouterVanHecke (Thu, 20 Dec 2018 09:10:54 GMT):
Hello I'm having trouble creating the ClientIdentity object in my chaincode. I'm getting a JSON.parse error in the constructor. This is what the object looks like: { keyUsage: 'Digital Signature', basicConstraints: 'CA:FALSE', subjectKeyIdentifier: '8B:98:45:88:4B:61:C7:E4:72:16:5E:45:AD:C1:6D:1A:A1:2A:1E:E3', authorityKeyIdentifier: 'keyid:42:39:AA:0D:CD:76:DA:EE:B8:BA:0C:DA:70:18:51:D1:45:04:D3:1A:AD:1B:2D:DD:DB:AC:6A:57:36:5E:49:7C', '1.2.3.4.5.6.7.8.1': '\u0004��{"attrs":{"ID":"55-685f-4a70-b7db","hf.Affiliation":"org1.department1","hf.EnrollmentID":"8cd78955-685f-4a70-b7db","hf.Type":"publisher"}}' } See the weird question marks right before the start of the JSON object... I don't know what causes this, anyone any idea? ps: yesterday the questionmarks was a "q", very weird

davidkel (Thu, 20 Dec 2018 09:56:39 GMT):
@WouterVanHecke Suggest you ask on the #fabric-chaincode-dev channel as this channel is about the client side sdk

JayJong (Thu, 20 Dec 2018 12:08:33 GMT):
Hi all, lets say my endorsement policy is (OutOf (3, 'Org1MSP.member', 'Org2MSP.member', 'Org3MSP.member', 'Org4MSP.member', 'Org5MSP.member)) i have 5 orgs and each has 3 peers each and i send the tx proposal to all 15 peers. When i receive the proposal responses back, is it ok if i have a condition that says out of the 15 peers, as long as there are more than 3 peers of different orgs that send back a successful response? im aware that there is another check for endorsement policy when channel.sendTransaction(request)

Luxii (Thu, 20 Dec 2018 12:42:02 GMT):
Can we register new peer with fabric ca client sdk of node js ??

mastersingh24 (Thu, 20 Dec 2018 13:25:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=99vEawHRuvdM9Lhxj) @JayJong When you use something like "OrgXMSP.member", even if there are endorsements from 3 OrgX peers it will only count as one

mastersingh24 (Thu, 20 Dec 2018 13:27:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=r7XK9DNgzaqEBkDGd) @Luxii What exactly are you trying to do here? fabric-ca-client can register any identity you want ... but for a peer to use it you would then need to create the proper MSP folder structure and point the peer to it

Luxii (Thu, 20 Dec 2018 13:37:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Q47GgSdQqWwAG26ei) @mastersingh24 Im trying to add a new peer to existing fabric network. There are tutorials about it but they are using fabric-ca-client binary, I was just wondering if there is any way to do it through sdk

mastersingh24 (Thu, 20 Dec 2018 14:57:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SNCFuzPsJ4sXPEwAA) @Luxii Sorry ... I meant you can use the Node fabric-ca-client as well

mastersingh24 (Thu, 20 Dec 2018 14:57:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SNCFuzPsJ4sXPEwAA) @Luxii Sorry ... I meant you can use the Node fabric-ca-client as well

httran88 (Thu, 20 Dec 2018 15:52:03 GMT):
How do u do Mastersingh24

httran88 (Thu, 20 Dec 2018 17:22:28 GMT):
Hello friends, how can we override the config/default.json for the fabric-client?

JayJong (Fri, 21 Dec 2018 02:32:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Sibkha6k6zNY4EL2m) @mastersingh24 @mastersingh24 thanks for the reply, im sry for my poor phrasing but wad i want to ask is if it makes sense if i dont receive all 15 successful proposal responses but just 3 proposal response from 3 different orgs and then it sends these proposals to the orderer

JayJong (Fri, 21 Dec 2018 02:32:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Sibkha6k6zNY4EL2m) @mastersingh24 thanks for the reply, im sry for my poor phrasing but wad i want to ask is if it makes sense if i dont receive all 15 successful proposal responses but just 3 proposal response from 3 different orgs and then it sends these proposals to the orderer

Luxii (Fri, 21 Dec 2018 05:13:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Go9B7iMecNKNYoNZH) @mastersingh24 so can i use caClient's `register()` method to register a peer ? I'm asking because the documentation says you can register *user* with this method. If there's any other method or class that i should work with then please suggest. Thanks

httran88 (Fri, 21 Dec 2018 05:19:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=M8DS2cPXxmnCDT2oW) @Luxii if you look through the code,specifically HFCA types, you will see that there's 4 types export enum HFCAIdentityType { PEER = 'peer', ORDERER = 'orderer', CLIENT = 'client', USER = 'user' } that you can register. Forget what the documentation says, go dig through the code

httran88 (Fri, 21 Dec 2018 05:19:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=M8DS2cPXxmnCDT2oW) @Luxii if you look through the code,specifically HFCA types, you will see that there's 4 types export enum HFCAIdentityType { PEER = 'peer', ORDERER = 'orderer', CLIENT = 'client', USER = 'user' } that you can register.

wangdong (Fri, 21 Dec 2018 08:59:25 GMT):
Hi, any one knows that what does this mean when to query?>Received http2 header with status: 404

wangdong (Fri, 21 Dec 2018 08:59:25 GMT):
Hi, any one knows that what does this mean when to query?>Received http2 header with status: 404

wangdong (Fri, 21 Dec 2018 08:59:25 GMT):
Hi, any one knows that what does this mean when to query?```Received http2 header with status: 404```

wangdong (Fri, 21 Dec 2018 09:00:37 GMT):
the element is not found?

zwartesokken (Fri, 21 Dec 2018 09:28:25 GMT):
Hi all, anyone familair with the `No identity has been assigned to this client` error? I'm getting this only when I'm trying to do two invokes within a second, stacktrace: ``` Error: No identity has been assigned to this client at Client._getSigningIdentity (/mnt/c/_share/pivt/libs/node_modules/fabric-client/lib/Client.js:1173:11) at Client.newTransactionID (/mnt/c/_share/pivt/libs/node_modules/fabric-client/lib/Client.js:549:33) at initializeChannel.then (/mnt/c/_share/pivt/libs/src/ChaincodeHandler.js:70:34) at ``` It fails at `this.fabricClient.newTransactionID();`

knagware9 (Fri, 21 Dec 2018 10:43:30 GMT):
Regarding new programming model (commercial paper sample) we can only pass endorsement policy using CLI only . Do we have option to pass policy via new sdk api ?? Also we know there is some limitation in policies when we pass via CLI ,i think we cant pass complex EP...

mbwhite (Fri, 21 Dec 2018 12:53:51 GMT):
^ @andrew-coleman

andrew-coleman (Fri, 21 Dec 2018 13:38:13 GMT):
@knagware9 the new `fabric-network` package doesn't add anything to the admin apis at the moment. I'm sure that will come later though

MohammadObaid (Fri, 21 Dec 2018 14:37:03 GMT):
Hi, I have create fabric overlay network and all channel creations and invoke commands working perfectly . but when I am trying to integrate node sdk with existing network , then node sdk unable to communicate with orderer endpoint and throws an error of `Failed to invoke chaincode. cause:Error: ChannelEventHub has been shutdown` `error: [Orderer.js]: Orderer grpc://node_orderer1st:7050 has an error Error: Failed to connect before the deadline` . It seems like node sdk is unable to communicate with existing overlay network either via hostname or ip address .

KGiou (Fri, 21 Dec 2018 15:48:34 GMT):
Hi all, are any functions implemented in the node-sdk to add a new Org at an existing and running network? Smthing like the tutorial Add New Orgin hyperledger doc.

KGiou (Fri, 21 Dec 2018 15:48:34 GMT):
Hi all, are any functions implemented in the node-sdk to add a new Org at an existing and running network? Smthing like the tutorial Add New Org in hyperledger doc.

httran88 (Fri, 21 Dec 2018 17:02:32 GMT):
@KGiou the hyperledger docs uses cli tools, you can formulate same functionality with sdk

knagware9 (Sat, 22 Dec 2018 10:47:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=W8i3mMvs74YcsEtZu) @andrew-coleman Ok Thanks

Luxii (Mon, 24 Dec 2018 06:23:09 GMT):
Is there any sample enrolment request to fabric ca client with *csr* field ? How do i generate csr in a request to fabric ca ?

Luxii (Mon, 24 Dec 2018 06:23:09 GMT):
Is there any sample enrolment request to fabric ca client with *csr* field ? How do i generate csr in a request to fabric ca ? ( rsa or ecdsa)

Luxii (Mon, 24 Dec 2018 06:35:10 GMT):
Im getting following error when I am generating csr from openssl tool

Luxii (Mon, 24 Dec 2018 06:35:16 GMT):
```POST /api/v1/enroll 400 5 "Invalid request body: json: cannot unmarshal object into Go struct field EnrollmentRequestNet.certificate_request of type string; ```

DeepaMotwani (Mon, 24 Dec 2018 08:40:25 GMT):
do we have a support for private data using node chaincode? I am abe to instantiate and invoke golang chaincode for private data. But when I am trying to instantiate the nodejs chaincode, it throws me error.

davidkhala (Mon, 24 Dec 2018 09:45:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fDqke9uDGdNTxhpTi) @MohammadObaid The error message is just about program has called channelEventHub.disconnect twice

davidkhala (Mon, 24 Dec 2018 09:47:11 GMT):
@andrew-coleman hi Andrew, do you have idea about `Error: CKR_GENERAL_ERROR:5 at Error (native) C_Initialize` when running `gulp test` with softHSM2 installed on Ubuntu OS?

anjalinaik (Mon, 24 Dec 2018 11:29:25 GMT):
Hi experts.. if we need to create a invoke request, do we need to redirect the request to only endorsing peers?

tuckerg (Mon, 24 Dec 2018 13:31:27 GMT):
Has joined the channel.

dave.enyeart (Mon, 24 Dec 2018 13:46:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uuxGdNgsnWv7jQ9uu) @DeepaMotwani Yes

DeepaMotwani (Tue, 25 Dec 2018 14:45:32 GMT):
@dave.enyeart Do we need to add any import packages for private data while excuting node js chaincode?

DeepaMotwani (Tue, 25 Dec 2018 14:45:32 GMT):
@dave.enyeart Do we need to add any import packages for private data while excuting node js chaincode? Following is the error which I am getting while instantiating nodejs chainncode: response of instantiation result[0] [ { Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-12-24T12_16_15_229Z-debug.log " at self._endorserClient.processProposal (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true }, { Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-12-24T12_16_15_255Z-debug.log " at self._endorserClient.processProposal (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true } ] [2018-12-24 17:46:15.886] [INFO] instantiate-chaincode - response of instantiation result [1] { header: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 943, littleEndian: false, noAssert: false }, payload: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 231, littleEndian: false, noAssert: false }, extension: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } } [2018-12-24 17:46:15.890] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-12-24 17:46:15.890] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-12-24 17:46:15.890] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse [2018-12-24 17:46:15.890] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:10564) UnhandledPromiseRejectionWarning: Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse at Object.instantiateChaincode (/home/deepa/fabric-1.3-samples/balance-transfer/app/instantiate-chaincode.js:191:9) at (node:10564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:10564) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

mrudav.shukla (Wed, 26 Dec 2018 10:38:15 GMT):
Does nodejs sdk and nodejs chaincode support ES6?

thegauravks (Wed, 26 Dec 2018 13:07:46 GMT):
Hi, I am unable to install the node packages. When i run npm install fabric-client, i get the following issues: Failed at the pkcs11js@1.0.17 install script.

thegauravks (Wed, 26 Dec 2018 14:16:15 GMT):
Hi all, need help with fabric-client. npm install -g fabric-client works but when installing in project directory, it fails

MohammadObaid (Thu, 27 Dec 2018 05:49:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AepThPK9WK65BWpMY) @davidkhala Yes but due to this error node sdk in unable to invoke chaincode command. I am also getting `REQUEST Timeout` with local peer .

MohammadObaid (Thu, 27 Dec 2018 06:00:05 GMT):

nodesdkerror.png

anjalinaik (Thu, 27 Dec 2018 06:45:03 GMT):
Hi experts..if the endorsment policy is not satisfied then the block shouldnt be added to the chain, correct?However from below peer logs i see that the blocks are being added inspite of endorsement policy failure.Any explanation would be helpful. ``` org1peer2.1.t5ttto5ct9bp@CPU92 | 2018-12-27 06:13:57.935 UTC [committer/txvalidator] validateTx -> ERRO 019 VSCCValidateTx for transaction txId = 52e73a5c8f2d75062b6fe06e877559138a285aba5204466ca2dd40489c0088cb returned error: validation of endorsement policy for chaincode fabcarand in tx 48:0 failed: signature set did not satisfy policy org1peer2.1.t5ttto5ct9bp@CPU92 | 2018-12-27 06:14:05.253 UTC [gossip/privdata] StoreBlock -> INFO 01a [mychannel] Received block [49] from buffer ```

MohammadObaid (Thu, 27 Dec 2018 08:10:38 GMT):
@anjalinaik can you fetch record of that key ?

MohammadObaid (Thu, 27 Dec 2018 08:10:50 GMT):
or block ?

anjalinaik (Thu, 27 Dec 2018 11:44:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LeZTbjNmHqnRftMyG) @MohammadObaid yes. the record is not updated with the new values. However a new block is added with validity set to false.

mrudav.shukla (Thu, 27 Dec 2018 12:43:29 GMT):
Does nodejs sdk and nodejs chaincode support ES6?

DeepaMotwani (Thu, 27 Dec 2018 12:48:37 GMT):
@mbwhite Do we need to add any import packages for private data while excuting node js chaincode? Following is the error which I am getting while instantiating nodejs chainncode: response of instantiation result[0] [ { Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-12-24T12_16_15_229Z-debug.log " at self._endorserClient.processProposal (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true },

purandam (Thu, 27 Dec 2018 13:00:16 GMT):
We have done the following task to run the Private data. 1) Fabric -Client 1.3 version 2) Fabric-CA-Client - 1.3 3) Fabric images - 1.3 To inject the the collection.json file into the instantiate-chaincode file, we have done the modification in the "REQUEST " payload. Also we have follow the all steps that mentioned the document to run the private data. Using NODE SDK , we are unable to instantiate the chain code for Private data. We got below error. [ { Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-12-27T09_27_03_960Z-debug.log " at self._endorserClient.processProposal (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true }, { Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-12-27T09_27_04_005Z-debug.log " at self._endorserClient.processProposal (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/deepa/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/fabric-1.3-samples/balance-transfer/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true } ]

bestbeforetoday (Thu, 27 Dec 2018 14:02:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NhjhQMb69E2buEd33) @mrudav.shukla Short answer: yes. Long answer: the SDK and chaincode use Node 8 LTS, which provides the set of JavaScript capability listed at https://node.green/ and https://kangax.github.io/compat-table/es6/#node8_10

bestbeforetoday (Thu, 27 Dec 2018 14:06:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RiZQW5TAL3NamPdyd) @DeepaMotwani That looks like a DNS lookup time out trying to resolve registry.npmjs.org:443

jrosmith (Thu, 27 Dec 2018 23:22:33 GMT):
hey all, anybody know the planned release date for fabric-client 1.4.0?

mrudav.shukla (Fri, 28 Dec 2018 03:48:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NWvRECT96kCwCkj2M) @bestbeforetoday Ok. That helps.

davidkhala (Fri, 28 Dec 2018 04:39:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8RPHsmjWcGfr68eLD) @MohammadObaid Hi Moham, I guess the fundamental reason of your error is the running machine/instance of the nodesdk program is out of your existing docker overlay network, that your virtual DNS within network is not discoverable to sdk.

davidkhala (Fri, 28 Dec 2018 04:39:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8RPHsmjWcGfr68eLD) @MohammadObaid Hi Moham, I guess the fundamental reason of your error is the running machine/instance of the nodesdk program is out of your existing docker overlay network, that your virtual DNS within network is not discoverable to sdk. There are some work around for it. See if you like to keep on listening or you already fixed it.

DeepaMotwani (Fri, 28 Dec 2018 04:55:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NWvRECT96kCwCkj2M) @bestbeforetoday I am able to ping the registry.npmjs.org as well as get the response of wget.

DeepaMotwani (Fri, 28 Dec 2018 04:55:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hcbKoE6RtCKA23eWd) @bestbeforetoday I am able to ping the registry.npmjs.org as well as get the response of wget.

dexhunter (Fri, 28 Dec 2018 07:00:24 GMT):
Hi! I wonder if there is a way to get user's cert and affiliation information from CA with node sdk? Thank you!

dexhunter (Fri, 28 Dec 2018 07:03:19 GMT):
Any ideas? @davidkhala @zhaochy

zhaochy (Fri, 28 Dec 2018 07:05:55 GMT):
there exists the class 'AffiliationService' https://fabric-sdk-node.github.io/release-1.4/AffiliationService.html

davidkhala (Fri, 28 Dec 2018 07:05:59 GMT):
@dexhunter are you using `fabric-ca-client`?

dexhunter (Fri, 28 Dec 2018 07:06:24 GMT):
@davidkhala yes

zhaochy (Fri, 28 Dec 2018 07:07:00 GMT):
and `IdentityService` https://fabric-sdk-node.github.io/release-1.4/IdentityService.html

vinita1701 (Fri, 28 Dec 2018 07:41:58 GMT):
Has joined the channel.

vinita1701 (Fri, 28 Dec 2018 07:43:41 GMT):
Hi! Where can I find clear instructions on deploying node js sdk based chain code to the chaincode-dev environment. The documentation only gives a go example.

vinita1701 (Fri, 28 Dec 2018 08:03:19 GMT):
export COMPOSE_CONVERT_WINDOWS_PATHS=1

zhaochy (Fri, 28 Dec 2018 08:12:02 GMT):
@vinita1701 you can find from the Node.js integration tests

zhaochy (Fri, 28 Dec 2018 08:12:44 GMT):
instanll-chaincode https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/test/integration/e2e/install-chaincode.js

zhaochy (Fri, 28 Dec 2018 08:13:01 GMT):
instantiate-chaincode https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/test/integration/e2e/instantiate-chaincode.js

vinita1701 (Fri, 28 Dec 2018 08:49:07 GMT):
@zhaochy - can you send me the link?

vinita1701 (Fri, 28 Dec 2018 08:49:32 GMT):
@zhaochy Thanks. Did not see the urls

vinita1701 (Fri, 28 Dec 2018 08:51:01 GMT):
@zhaochy Would this be good for a development environment?

MohammadObaid (Fri, 28 Dec 2018 09:35:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jyqWcptzA4vwWvpHs) @davidkhala Hi @davidkhala I am still stuck in same issue . Yes you are right . node sdk is not in the same overlay network as of docker . Do you mean to say I need to spin up another container and deploy sdk on it ?

MohammadObaid (Fri, 28 Dec 2018 09:35:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jyqWcptzA4vwWvpHs) @davidkhala Hi I am still stuck in same issue . Yes you are right . node sdk is not in the same overlay network as of docker . Do you mean to say I need to spin up another container and deploy sdk on it ?

MohammadObaid (Fri, 28 Dec 2018 13:52:54 GMT):
@davidkhala I created docker image of node application and deploy it on same network as of other containers and then I got `context deadline error` . I use container ip in network-config.yaml file . I was able to pin those ip address from node container but still getting deadline errors

MohammadObaid (Fri, 28 Dec 2018 13:53:11 GMT):

contextdeadlineerror.png

MohammadObaid (Fri, 28 Dec 2018 13:55:33 GMT):
Isnt this issue because of grpc or fabric-client ? I am using following versions `"fabric-client": "~1.2.0"` & `"grpc": "1.9.1"`

dexhunter (Sat, 29 Dec 2018 09:10:20 GMT):
Hi, I found that lib under fabric-ca-client has been shrinked but a lot of dependecies have not been updated. I was wonder if there are already fix for this?

Luxii (Sun, 30 Dec 2018 11:53:39 GMT):
Im getting ` instantiate proposal was bad` error without any logs or error details while instantiating chaincode from node app ( balance transfer)

Luxii (Sun, 30 Dec 2018 11:53:53 GMT):
my node js vesrion - 8.12.0

Luxii (Sun, 30 Dec 2018 11:54:06 GMT):
fabric-client - 1.3.0

Luxii (Sun, 30 Dec 2018 11:54:14 GMT):
images version - 1.3.0

Luxii (Sun, 30 Dec 2018 11:55:28 GMT):
although my golang version is 1.6.2

Luxii (Sun, 30 Dec 2018 11:59:29 GMT):
is there any way i can debug this more apart from docker logs

Luxii (Sun, 30 Dec 2018 12:04:29 GMT):
However first network is working fine

Luxii (Sun, 30 Dec 2018 12:05:48 GMT):
Im trying to change my environment from 1.2.0 to 1.3.0

Luxii (Sun, 30 Dec 2018 12:06:10 GMT):
before ( at 1.2.0 ) it was all working fine

davidkhala (Mon, 31 Dec 2018 03:29:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jfXztMRoWc8i7khDQ) @MohammadObaid I remember the grpc version problem has been fixed at 1.3. but mostly your issue is not because of it. if they are all in one docker network, it is recommended to directly use domain name to connect

davidkhala (Mon, 31 Dec 2018 03:31:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JJmyTL5Myevpf3Jy3) @Luxii I was reported there is some bug in balance-transfer sample in new version. not sure it is fixed or not

Luxii (Mon, 31 Dec 2018 08:13:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rz77YkYTZrqfxBSFp) @davidkhala I am using 1.3.0 version of balance transfer, How do i debug my chaincode at instantiation node sdk is giving me no logs

davidkhala (Mon, 31 Dec 2018 08:35:28 GMT):
has node sdk throw an exception?

davidkhala (Mon, 31 Dec 2018 08:35:28 GMT):
@Luxii has node sdk throw an exception?

davidkhala (Mon, 31 Dec 2018 08:36:16 GMT):
are you able to analyse the proposal resonse of your instantitate try?

MohammadObaid (Mon, 31 Dec 2018 09:38:28 GMT):
@davidkhala Yeah fixed it by dockerizing node application in the same network as of other peers . Also change fabric client version to `1.3` and grpc version to `1.17`

MohammadObaid (Mon, 31 Dec 2018 09:38:32 GMT):
Thanks :)

davidkhala (Mon, 31 Dec 2018 09:39:39 GMT):
@MohammadObaid :woo:Cloud Natvie is the future

ashlinSajan (Mon, 31 Dec 2018 09:41:15 GMT):
Receiving timeout error after editing configtx.yaml [2018-12-27 11:15:50.096] [ERROR] instantiate-chaincode - REQUEST_TIMEOUT:localhost:7051 [2018-12-27 11:15:50.096] [ERROR] instantiate-chaincode - Error: ChannelEventHub has been shutdown Can anyone help me on this?

MohammadObaid (Mon, 31 Dec 2018 09:44:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=E2Cdmwo2tvAoMx7a8) @davidkhala But there is one thing I didnt understand . I port forwarded peer container to 9051 like `9051 :7051` but sdk works only when I do port 7051 not with 9051 in network-config.yaml file

davidkhala (Mon, 31 Dec 2018 09:47:43 GMT):
when you could test the 9051 port with `nmap`

davidkhala (Mon, 31 Dec 2018 09:47:43 GMT):
@MohammadObaid well you could test the 9051 port with `nmap`

davidkhala (Mon, 31 Dec 2018 09:47:56 GMT):
installed via `apt install nmap` for debian

davidkhala (Mon, 31 Dec 2018 09:48:23 GMT):
This is also my knife to test port statsu

davidkhala (Mon, 31 Dec 2018 09:48:23 GMT):
This is also my knife to test port status

MohammadObaid (Mon, 31 Dec 2018 10:04:24 GMT):
Alright . That's great .:) Thanks

Luxii (Mon, 31 Dec 2018 10:35:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oECS3HJpsPxTydmQc) @davidkhala No

Luxii (Mon, 31 Dec 2018 10:38:35 GMT):
Node sdk did throw an exception, but the error details are missing like they were in 1.1

Ashish_ydv (Mon, 31 Dec 2018 10:47:34 GMT):
How to get user name from enrollment secret , using node sdk?

Luxii (Mon, 31 Dec 2018 11:12:41 GMT):
Why don i get error details returned in shim.Error ?

mastersingh24 (Tue, 01 Jan 2019 11:45:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fbyAHziDxFgrbnk3H) @Ashish_ydv You cannot derive the enrollment id from the enrollment secret. When someone registers a new user with the CA, they will need to provide both the enroll id and secret to the client which will then enroll (in this case with the Node SDK)

Ishee (Tue, 01 Jan 2019 12:20:17 GMT):
Has joined the channel.

Ishee (Tue, 01 Jan 2019 12:21:08 GMT):
can anyone tell me where to start learning fabric-node-sdk and make contract?

nageshbandaru (Tue, 01 Jan 2019 20:01:43 GMT):
Has joined the channel.

davidkhala (Wed, 02 Jan 2019 03:05:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TzbmnaossZdvaDk4h) @Luxii is 1.3 or 1.4? maybe the proposal response array is not taken as exception now if one of them are error, you might have to analyse each by your program.

davidkhala (Wed, 02 Jan 2019 03:06:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BQK3yaxvgmfTpsPXi) @Ishee smart contract is not compoment of node-sdk, if you want to write nodejs chaincode, please refer to https://github.com/hyperledger/fabric-chaincode-node

davidkhala (Wed, 02 Jan 2019 03:07:27 GMT):
the official docs of node-sdk is the best we, but you have to be familar with fabric workflow first

DeepaMotwani (Wed, 02 Jan 2019 06:17:23 GMT):
@davidkhala I am using fabric 1.3, and not able to instantiate balance-transfer. Getting below error while debugging instantiate result [ { Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-01-02T06_04_25_681Z-debug.log " at self._endorserClient.processProposal (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true }, { Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-01-02T06_04_25_682Z-debug.log " at self._endorserClient.processProposal (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/fabric-client/lib/Peer.js:123:36) at Object.onReceiveStatus (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/grpc/src/client_interceptors.js:1191:9) at InterceptingListener._callNext (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/node_modules/grpc/src/client_interceptors.js:841:24) status: 500, payload: , isProposalResponse: true } ] [2019-01-02 11:34:26.134] [ERROR] instantiate-chaincode - instantiate proposal was bad [2019-01-02 11:34:26.134] [ERROR] instantiate-chaincode - instantiate proposal was bad [2019-01-02 11:34:26.136] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse [2019-01-02 11:34:26.136] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:17490) UnhandledPromiseRejectionWarning: Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse at Object.instantiateChaincode (/home/deepa/fabric-1.3-samples/fabric-samples-release-1.3/balance-transfer/app/instantiate-chaincode.js:199:9) at (node:17490) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:17490) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Dpkkmr (Wed, 02 Jan 2019 07:35:21 GMT):
Hi All, I am using balance transfer application with custom chaincode, when I use endorsement policy '1-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] then every thing works fine however if I use '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] invoke transaction fails with below error: Peer Error log: 2019-01-02 07:24:40.782 UTC [vscc] Validate -> ERRO 078 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode mycc in tx 4:0 failed: signature set did not satisfy policy 2019-01-02 07:24:40.782 UTC [committer.txvalidator] validateTx -> ERRO 079 VSCCValidateTx for transaction txId = 815553b7cabb383f59d4abd3c2bdc3deda5b74169048e3b3b837f46adbd85099 returned error: validation of endorsement policy for chaincode mycc in tx 4:0 failed: signature set did not satisfy policy Node SDK error: [2019-01-02 02:24:40.826] [ERROR] invoke-chaincode - The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE [2019-01-02 02:24:40.827] [ERROR] invoke-chaincode - Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE at EventRegistration.eh.registerTxEvent [as onEvent] (/root/hl_1-3/fabric-samples/balance-transfer/app/invoke-transaction.js:99:15) at ChannelEventHub._callTransactionListener (/root/hl_1-3/fabric-samples/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1297:13) at ChannelEventHub._checkTransactionId (/root/hl_1-3/fabric-samples/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1282:9) at ChannelEventHub._processTxEvents (/root/hl_1-3/fabric-samples/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1261:11) at ClientDuplexStream._stream.on (/root/hl_1-3/fabric-samples/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:405:11) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at ClientDuplexStream.Readable.push (_stream_readable.js:208:10) [2019-01-02 02:24:40.827] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE (node:12361) UnhandledPromiseRejectionWarning: Error: Failed to invoke chaincode. cause:Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE at Object.invokeChaincode (/root/hl_1-3/fabric-samples/balance-transfer/app/invoke-transaction.js:171:9) at at process._tickCallback (internal/process/next_tick.js:189:7) (node:12361) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:12361) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Invoke Transaction: http://localhost:4000/channels/mychannel/chaincodes/mycc \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.org1.example.com","peer1.org2.example.com"], "fcn":"invoke", "operation":"commit", "args": ["commit","true","a","b","c"] }') Any help in resolving this will be very helpful

SanketPanchamia (Wed, 02 Jan 2019 09:20:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ra7ed4ha4LPfFNP2e) @Dpkkmr We have also checked the crypto-config file and for each Org, the EnableNodeOUs is set to true. Any help will be appreciated.

hjn_66 (Wed, 02 Jan 2019 10:44:59 GMT):
Has joined the channel.

hjn_66 (Wed, 02 Jan 2019 10:45:19 GMT):
How to add roles to user's certificate and use them in chaincode? I develop an application on hyperledger fabric with "IBM‌ Blockchain Platform" extension and nodejs. I use "fabric-ca-client v1.3.0" module to enroll users and admins certificate. I want to add roles to users and have access control based on user roles on my chaincode. I try to enroll multiple certificate but always this module enroll certificate with empty roles and affiliation like this: {"name":"admin","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"...","identity":{"..."}}} I found this on this on hyperledger shim documentation about use of roles on chaincode: const ClientIdentity = require('fabric-shim').ClientIdentity; let cid = new ClientIdentity(stub); object passed to Init() and Invoke() methods if (cid.assertAttributeValue('hf.role', 'auditor')) { // proceed to carry out auditing } but I didn't find any solution to how I can register and enroll user that have 'hf.role' attribute

SanketPanchamia (Wed, 02 Jan 2019 12:03:28 GMT):

Enroll-User-with-Attribute.PNG

SanketPanchamia (Wed, 02 Jan 2019 12:04:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kmRGk2qLdDDBoCpLi) @hjn_66 This is the postman script that i use to enroll users with attributes. You need to change the code in app.js and helper.js in the node sdk to reflect this. IM me and I can help you with the changes.

rbole (Wed, 02 Jan 2019 16:29:14 GMT):
Has joined the channel.

ShajiThiyarathodi (Wed, 02 Jan 2019 19:33:09 GMT):
Has joined the channel.

mbanerjee (Wed, 02 Jan 2019 19:33:49 GMT):
Has joined the channel.

SanketPanchamia (Thu, 03 Jan 2019 04:52:43 GMT):

Clipboard - January 3, 2019 10:22 AM

nileshyjadhav (Thu, 03 Jan 2019 05:26:18 GMT):
Has joined the channel.

marosoft (Thu, 03 Jan 2019 08:57:02 GMT):
Has joined the channel.

jeka_gompa (Thu, 03 Jan 2019 21:05:24 GMT):
Has joined the channel.

jeka_gompa (Thu, 03 Jan 2019 21:20:27 GMT):
Hello everybody, I'm facing a problem with the SDK. I have a channel I created with the node sdk by calling: curl -s -X POST \ http://localhost:4000/channels \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "channelName":"'$channel_mainchannel'", "channelConfigPath":"fabric-network-config/channel-artifacts/wada/channel.tx" }' I have manually added 2 other organizations to the channel each with two peers, that joined the channel by calling (with the corresponding info of the organization): curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/peers \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer1.wada.example.com"] }' Meaning there are 6 peers registered to the channel. Now I'm trying to call a function I implemented in a chaincode I installed by calling (with all 6 peer nodes as target) curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/chaincodes/doping_control_request \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer0.nada.example.com", "peer0.pwc.example.com", "peer1.nada.example.com","peer1.wada.example.com", "peer1.pwc.example.com"], "fcn":"createDopingControlRequest", "args":["DCR1", "M01","01/01/2019 - 31/01/2019","Jim", "Carter", "male", "36", "urine", "NADA", "CREATED"] }' and I'm getting following error in the SDK: [2019-01-03 22:11:10.641] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.642] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.643] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.644] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.645] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.646] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.647] [INFO] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "", metadata - "", endorsement signature: 0D "�*,���]죤N$ƥ�N� �V!R9rZL� |PiA,�2ٜ�>�šc���m�c��jkTbLr�� console.js:8 [2019-01-03 22:11:10.648] [DEBUG] invoke-chaincode - invokeEventPromise - setting up event console.js:8 [2019-01-03 22:11:10.657] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { console.js:8 r: , s: , recoveryParam: 1 } [2019-01-03 22:11:10.664] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { console.js:8 r: , s: , recoveryParam: 1 } [2019-01-03 22:11:13.646] [INFO] invoke-chaincode - The chaincode invoke chaincode transaction has been committed on peer localhost:7051 console.js:8 [2019-01-03 22:11:13.646] [INFO] invoke-chaincode - Transaction 1a912687dcc789a71817cdb5f7482e23b2e1e22c1bbeceabbde1a8828c8670b0 has status of ENDORSEMENT_POLICY_FAILURE in blocl 22 console.js:8 [2019-01-03 22:11:13.647] [ERROR] invoke-chaincode - The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE console.js:8 [2019-01-03 22:11:31.805] [ERROR] invoke-chaincode - Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE console.js:8 at EventRegistration.eh.registerTxEvent [as onEvent] (/home/jessica/dev/masterarbeit/balance-transfer/app/invoke-transaction.js:99:15) at ChannelEventHub._callTransactionListener (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1297:13) at ChannelEventHub._checkTransactionId (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1282:9) at ChannelEventHub._processTxEvents (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1261:11) at ClientDuplexStream._stream.on (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:405:11) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11)

jeka_gompa (Thu, 03 Jan 2019 21:20:27 GMT):
Hello everybody, I'm facing a problem with the SDK. I have a channel I created with the node sdk by calling: curl -s -X POST \ http://localhost:4000/channels \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "channelName":"'$channel_mainchannel'", "channelConfigPath":"fabric-network-config/channel-artifacts/wada/channel.tx" }' I have manually added 2 other organizations to the channel each with two peers, that joined the channel by calling (with the corresponding info of the organization): curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/peers \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer1.wada.example.com"] }' Meaning there are 6 peers registered to the channel. Now I'm trying to call a function I implemented in a chaincode I installed by calling (with all 6 peer nodes as target) curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/chaincodes/doping_control_request \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer0.nada.example.com", "peer0.pwc.example.com", "peer1.nada.example.com","peer1.wada.example.com", "peer1.pwc.example.com"], "fcn":"createDopingControlRequest", "args":["DCR1", "M01","01/01/2019 - 31/01/2019","Jim", "Carter", "male", "36", "urine", "NADA", "CREATED"] }' and I'm getting following error in the SDK: [2019-01-03 22:11:10.641] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.642] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.643] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.644] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.645] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.646] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.647] [INFO] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "", metadata - "", endorsement signature: 0D "�*,���]죤N$ƥ�N� �V!R9rZL� |PiA,�2ٜ�>�šc���m�c��jkTbLr�� console.js:8 [2019-01-03 22:11:10.648] [DEBUG] invoke-chaincode - invokeEventPromise - setting up event console.js:8 [2019-01-03 22:11:10.657] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { console.js:8 r: , s: , recoveryParam: 1 } [2019-01-03 22:11:10.664] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { console.js:8 r: , s: , recoveryParam: 1 } [2019-01-03 22:11:13.646] [INFO] invoke-chaincode - The chaincode invoke chaincode transaction has been committed on peer localhost:7051 console.js:8 [2019-01-03 22:11:13.646] [INFO] invoke-chaincode - Transaction 1a912687dcc789a71817cdb5f7482e23b2e1e22c1bbeceabbde1a8828c8670b0 has status of ENDORSEMENT_POLICY_FAILURE in blocl 22 console.js:8 [2019-01-03 22:11:13.647] [ERROR] invoke-chaincode - The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE console.js:8 [2019-01-03 22:11:31.805] [ERROR] invoke-chaincode - Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE console.js:8 at EventRegistration.eh.registerTxEvent [as onEvent] (/home/jessica/dev/masterarbeit/balance-transfer/app/invoke-transaction.js:99:15) at ChannelEventHub._callTransactionListener (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1297:13) at ChannelEventHub._checkTransactionId (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1282:9) at ChannelEventHub._processTxEvents (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1261:11) at ClientDuplexStream._stream.on (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:405:11) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at ClientDuplexStream.Readable.push (_stream_readable.js:208:10) [2019-01-03 22:11:31.807] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE

jeka_gompa (Thu, 03 Jan 2019 21:20:27 GMT):
Hello everybody, I'm facing a problem with the SDK. I have a channel I created with the node sdk by calling: curl -s -X POST \ http://localhost:4000/channels \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "channelName":"'$channel_mainchannel'", "channelConfigPath":"fabric-network-config/channel-artifacts/wada/channel.tx" }' I have manually added 2 other organizations to the channel each with two peers, that joined the channel by calling (with the corresponding info of the organization): curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/peers \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer1.wada.example.com"] }' Meaning there are 6 peers registered to the channel. Now I'm trying to call a function I implemented in a chaincode I installed by calling (with all 6 peer nodes as target) curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/chaincodes/doping_control_request \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer0.nada.example.com", "peer0.pwc.example.com", "peer1.nada.example.com","peer1.wada.example.com", "peer1.pwc.example.com"], "fcn":"createDopingControlRequest", "args":["DCR1", "M01","01/01/2019 - 31/01/2019","Jim", "Carter", "male", "36", "urine", "NADA", "CREATED"] }' and I'm getting following error in the SDK: [2019-01-03 22:11:31.807] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE

jeka_gompa (Thu, 03 Jan 2019 21:20:27 GMT):
Hello everybody, I'm facing a problem with the SDK. I have a channel I created with the node sdk by calling: curl -s -X POST \ http://localhost:4000/channels \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "channelName":"'$channel_mainchannel'", "channelConfigPath":"fabric-network-config/channel-artifacts/wada/channel.tx" }' I have manually added 2 other organizations to the channel each with two peers, that joined the channel by calling (with the corresponding info of the organization): curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/peers \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer1.wada.example.com"] }' Meaning there are 6 peers registered to the channel. Now I'm trying to call a function I implemented in a chaincode I installed by calling (with all 6 peer nodes as target) curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/chaincodes/doping_control_request \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer0.nada.example.com", "peer0.pwc.example.com", "peer1.nada.example.com","peer1.wada.example.com", "peer1.pwc.example.com"], "fcn":"createDopingControlRequest", "args":["DCR1", "M01","01/01/2019 - 31/01/2019","Jim", "Carter", "male", "36", "urine", "NADA", "CREATED"] }' And I'm getting following error in the SDK: [2019-01-03 22:11:31.807] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE

jeka_gompa (Thu, 03 Jan 2019 21:20:27 GMT):
Hello everybody, I'm facing a problem with the SDK. I have a channel I created with the node sdk by calling: curl -s -X POST \ http://localhost:4000/channels \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "channelName":"'$channel_mainchannel'", "channelConfigPath":"fabric-network-config/channel-artifacts/wada/channel.tx" }' I have manually added 2 other organizations to the channel each with two peers, that joined the channel by calling (with the corresponding info of the organization): curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/peers \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer1.wada.example.com"] }' Meaning there are 6 peers registered to the channel. Now I'm trying to call a function I implemented in a chaincode I installed by calling (with all 6 peer nodes as target): curl -s -X POST \ http://localhost:4000/channels/$channel_mainchannel/chaincodes/doping_control_request \ -H "authorization: Bearer $WADA_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["peer0.wada.example.com","peer0.nada.example.com", "peer0.pwc.example.com", "peer1.nada.example.com","peer1.wada.example.com", "peer1.pwc.example.com"], "fcn":"createDopingControlRequest", "args":["DCR1", "M01","01/01/2019 - 31/01/2019","Jim", "Carter", "male", "36", "urine", "NADA", "CREATED"] }' And I'm getting following error in the SDK: [2019-01-03 22:11:31.807] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE

jeka_gompa (Thu, 03 Jan 2019 21:22:15 GMT):
Here are the logs: [2019-01-03 22:11:10.641] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.642] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.643] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.644] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.645] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.646] [INFO] invoke-chaincode - invoke chaincode proposal was good console.js:8 [2019-01-03 22:11:10.647] [INFO] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "", metadata - "", endorsement signature: 0D "�*,���]죤N$ƥ�N� �V!R9rZL� |PiA,�2ٜ�>�šc���m�c��jkTbLr�� console.js:8 [2019-01-03 22:11:10.648] [DEBUG] invoke-chaincode - invokeEventPromise - setting up event console.js:8 [2019-01-03 22:11:10.657] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { console.js:8 r: , s: , recoveryParam: 1 } [2019-01-03 22:11:10.664] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { console.js:8 r: , s: , recoveryParam: 1 } [2019-01-03 22:11:13.646] [INFO] invoke-chaincode - The chaincode invoke chaincode transaction has been committed on peer localhost:7051 console.js:8 [2019-01-03 22:11:13.646] [INFO] invoke-chaincode - Transaction 1a912687dcc789a71817cdb5f7482e23b2e1e22c1bbeceabbde1a8828c8670b0 has status of ENDORSEMENT_POLICY_FAILURE in blocl 22 console.js:8 [2019-01-03 22:11:13.647] [ERROR] invoke-chaincode - The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE console.js:8 [2019-01-03 22:11:31.805] [ERROR] invoke-chaincode - Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE console.js:8 at EventRegistration.eh.registerTxEvent [as onEvent] (/home/jessica/dev/masterarbeit/balance-transfer/app/invoke-transaction.js:99:15) at ChannelEventHub._callTransactionListener (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1297:13) at ChannelEventHub._checkTransactionId (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1282:9) at ChannelEventHub._processTxEvents (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:1261:11) at ClientDuplexStream._stream.on (/home/jessica/dev/masterarbeit/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:405:11) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at ClientDuplexStream.Readable.push (_stream_readable.js:208:10) [2019-01-03 22:11:31.807] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: The invoke chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE

jeka_gompa (Thu, 03 Jan 2019 21:24:33 GMT):
Please, any help would be very welcome. Thanks in advance

jeka_gompa (Thu, 03 Jan 2019 21:32:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RrzGwdZePDzva9Tor) @SanketPanchamia @Dpkkmr Seems like I have the same problem a you with the invalid transaction. Have you find any solution to this. I just send the transaction to all peers in the channel for endorsement and it still doesn't work

jeka_gompa (Thu, 03 Jan 2019 21:32:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RrzGwdZePDzva9Tor) @SanketPanchamia @Dpkkmr Seems like I have the same problem as you have with the invalid transaction. Have you find any solution to this. I just send the transaction to all peers in the channel for endorsement and it still doesn't work

ShajiThiyarathodi (Thu, 03 Jan 2019 23:02:59 GMT):
Is there a plan to add sdk support for Node v9.0+ ?

cm_liu (Fri, 04 Jan 2019 03:10:41 GMT):
Has joined the channel.

nileshyjadhav (Fri, 04 Jan 2019 04:56:25 GMT):
Is there a priority in terms of feature implementation between Node SDK and Java SDK? Some of the new features are available only in Java SDK? Should we choose Java SDK or Node SDK?

SanketPanchamia (Fri, 04 Jan 2019 06:37:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=69hTe5AXwtthzapaa) @jeka_gompa So far no luck. Trying different things

jeka_gompa (Fri, 04 Jan 2019 13:43:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HFQSNQLup7jsBhcMv) @SanketPanchamia @SanketPanchamia Do you have any idea why is this happening . I debugged the whole process and I see the payload with all the signatures in there and everything. Please keep me updated if you find anything that works, I'll do it too

bretharrison (Fri, 04 Jan 2019 14:22:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=35xC9Qw5q3XhbkSuS) @ShajiThiyarathodi Not for v9, we will start to look at v10

jeka_gompa (Fri, 04 Jan 2019 17:53:54 GMT):
@SanketPanchamia @Dpkkmr I think I found the problem. At instantiation time the balance-transfer app is setting the policies as follows: // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, // Use this to demonstrate the following policy: // The policy can be fulfilled when members from both orgs signed. 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } } }; Look in the instantiate-chaincode.js file :dizzy_face:

jeka_gompa (Fri, 04 Jan 2019 17:53:54 GMT):
@SanketPanchamia @Dpkkmr I think I found the problem. At instantiation time the balance-transfer app is setting the policies to be validated by ORG1 and ORG2 as follows: // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, // Use this to demonstrate the following policy: // The policy can be fulfilled when members from both orgs signed. 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } } }; Look in the instantiate-chaincode.js file :dizzy_face:

jeka_gompa (Fri, 04 Jan 2019 17:53:54 GMT):
@SanketPanchamia @Dpkkmr I think I found the problem. At channel instantiation time the balance-transfer app is setting the policies to be validated by ORG1 and ORG2 as follows: // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, // Use this to demonstrate the following policy: // The policy can be fulfilled when members from both orgs signed. 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } } }; Look in the instantiate-chaincode.js file :dizzy_face:

jeka_gompa (Fri, 04 Jan 2019 17:53:54 GMT):
@SanketPanchamia @Dpkkmr I think I found the problem. At chaincode instantiation time the balance-transfer app is setting the policies to be validated by ORG1 and ORG2 as follows: // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, // Use this to demonstrate the following policy: // The policy can be fulfilled when members from both orgs signed. 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } } }; Look in the instantiate-chaincode.js file :dizzy_face:

jeka_gompa (Sun, 06 Jan 2019 13:29:47 GMT):
Hi everybody, is there any way to get all registered users from an organization using the Node SDK?

rsoeldner (Sun, 06 Jan 2019 18:12:26 GMT):
@jeka_gompa it's possible with the fabric-ca sdk

jeka_gompa (Sun, 06 Jan 2019 18:18:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=T3rwp7sQHgNqMPxHJ) @rsoeldner Hi , thanks but can you give me some hint how. None of the methods there suggest me something like that

rsoeldner (Sun, 06 Jan 2019 18:28:40 GMT):
@jeka_gompa check pm

deepaks (Sun, 06 Jan 2019 19:01:56 GMT):
Hello All Can anyone please tell that why the channel event hub goes down when we do chaincode instantiation using fabric sdk?

Veerc (Mon, 07 Jan 2019 07:40:38 GMT):
Has joined the channel.

knagware9 (Mon, 07 Jan 2019 09:22:04 GMT):
Anyone tried to use blockevent listner ( registerBlockEvent) instead of registerTxEvent event ,, actually due to registerTxEvent ,my code showing event for every transaction and thats why it is taking time to process next transaction...

knagware9 (Mon, 07 Jan 2019 09:22:55 GMT):
every transaction taking 3 sec to be processed , and 3 sec taken by registerTxEvent function..

vikimeng (Mon, 07 Jan 2019 15:03:16 GMT):
@deepaks I think you are using await/async and promise/then code, this will cause event hub close before success

vikimeng (Mon, 07 Jan 2019 15:03:30 GMT):
Is anyone know how to get this user certificates are revoked or not from SDK?

jd232 (Tue, 08 Jan 2019 04:52:24 GMT):
@rsoeldner Could you pm me the same (getting registered users from the fabric-ca sdk) ?

SunilHirole (Tue, 08 Jan 2019 06:48:14 GMT):
Hi All, Is it possible to install chaincode on peers of other organizations?

knagware9 (Tue, 08 Jan 2019 08:19:10 GMT):
anybody have tried to send multiple transaction and all stored in one block using node sdk ? I think current balance transfer example only process one transaction at a time and create the block for that transaction...even if we change block creation batch time out and size ..no effect

knagware9 (Tue, 08 Jan 2019 09:52:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WLBcwK2B4WT9LtDtF) Any one please ,,tried this

jeka_gompa (Tue, 08 Jan 2019 10:04:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Y5mD2JaAoxBbw6REa) @knagware9 Have you tried changing the 'BatchTimeout: 2s' in the configtx.yaml file?

sstone1 (Tue, 08 Jan 2019 10:09:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PDcPNsemPgwWgR3Ti) @SunilHirole @SunilHirole why would you want to do this?

sstone1 (Tue, 08 Jan 2019 10:09:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PDcPNsemPgwWgR3Ti) @SunilHirole why would you want to do this?

knagware9 (Tue, 08 Jan 2019 10:09:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=b7JihbtoR6jaEQWdJ) @jeka_gompa yes ...tried but effect still block created for evry transactions

sstone1 (Tue, 08 Jan 2019 10:10:44 GMT):
@knagware9 if you don't send multiple *simultaneous* transactions into the ordering service then you will only ever get one transaction per block. the app you are using probably waits for the transaction to be committed into a block before it will submit the next transaction.

knagware9 (Tue, 08 Jan 2019 10:14:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KWNG8bEsdHwshwvQw) @sstone1 May be I am using balance transfer sample...do you have any sample which send mulitple simultaneous transactions into the ordering service

sstone1 (Tue, 08 Jan 2019 10:15:36 GMT):
@knagware9 an HTTP POST to `/channels/:channelName/chaincodes/:chaincodeName` will not complete until the transaction has been committed into a block

sstone1 (Tue, 08 Jan 2019 10:16:05 GMT):
if you just make sequential calls to that URL, you will end up with one transaction per block

sstone1 (Tue, 08 Jan 2019 10:16:10 GMT):
if you hammer that URL with multiple concurrent requests you should see blocks fill up with multiple transactions

knagware9 (Tue, 08 Jan 2019 10:16:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yeBBXPv6ktZq7rP87) @sstone1 Got it Thank you very much

sstone1 (Tue, 08 Jan 2019 10:17:10 GMT):
np

vikimeng (Tue, 08 Jan 2019 12:01:13 GMT):
Hi All, is anyone know how to create a CA user to create CRL? when i call from sdk, i get `POST /api/v1/gencrl 401 35 “The identity ‘fnzadmin’ does not have authority to generate a CRL”`

vikimeng (Tue, 08 Jan 2019 12:01:13 GMT):
Hi All, is anyone know how to create a CA user to create CRL? when i call from sdk, i get `POST /api/v1/gencrl 401 35 “The identity ‘admin’ does not have authority to generate a CRL”`

greg2git (Tue, 08 Jan 2019 13:03:20 GMT):
Has left the channel.

natesmith (Tue, 08 Jan 2019 16:59:34 GMT):
Has joined the channel.

SanketPanchamia (Wed, 09 Jan 2019 04:07:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XKGXTPtiiSj5XG9rZ) @jeka_gompa Tried absolutely everything. Still getting the endorsement failure

SunilHirole (Wed, 09 Jan 2019 06:12:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nsr6YLkW6wwDmsNCh) @sstone1 I am creating ERC20 based chaincode for tokens in hyperledger. So to have the participation of other orgs i need to install token chaincode on peers of all.

knagware9 (Wed, 09 Jan 2019 07:27:03 GMT):
Is Block created before sending transactions to Orderer ,, logs seems confusing

knagware9 (Wed, 09 Jan 2019 07:27:04 GMT):
[2019-01-08 15:12:20.564] [INFO] invoke-chaincode - invoke chaincode proposal was good [2019-01-08 15:12:20.564] [INFO] invoke-chaincode - invoke chaincode proposal was good [2019-01-08 15:12:20.564] [INFO] invoke-chaincode - invoke chaincode proposal was good [2019-01-08 15:12:20.564] [INFO] invoke-chaincode - invoke chaincode proposal was good [2019-01-08 15:12:20.564] [INFO] invoke-chaincode - Successfully sent Proposal and received ProposalResponse: Status - 200, message - "", metadata - "", endorsement signature: 0D c����VL��&�M.i���a������ R��~��Q�b�~ht���Ǒ�c]�sZ� [2019-01-08 15:12:20.565] [DEBUG] invoke-chaincode - invokeEventPromise - setting up event [2019-01-08 15:12:20.567] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2019-01-08 15:12:20.569] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } [2019-01-08 15:12:51.097] [INFO] update-anchor-peers - The config update has been committed on peer localhost:7051 [2019-01-08 15:12:51.097] [INFO] invoke-chaincode - The chaincode invoke chaincode transaction has been committed on peer localhost:7051 [2019-01-08 15:12:51.097] [INFO] invoke-chaincode - Transaction 28b714f6a12fd43b2efd9cc85dee7a2c84bf9e0e4421e4a5353d784698c37540 has status of VALID in blocl 7 [2019-01-08 15:12:51.097] [INFO] invoke-chaincode - The invoke chaincode transaction was valid. [2019-01-08 15:12:51.098] [DEBUG] invoke-chaincode - ------->>> R E S P O N S E : ["The invoke chaincode transaction was valid.",{"status":"SUCCESS","info":""}] [2019-01-08 15:12:51.098] [INFO] invoke-chaincode - Successfully sent transaction to the orderer. [2019-01-08 15:12:51.098] [DEBUG] invoke-chaincode - Event results for event hub :localhost:7051 [2019-01-08 15:12:51.098] [DEBUG] invoke-chaincode - The invoke chaincode transaction was valid. [2019-01-08 15:12:51.098] [INFO] invoke-chaincode - Successfully invoked the chaincode Org1 to the channel 'mychannel' for transaction ID: 28b714f6a12fd43b2efd9cc85dee7a2c84bf9e0e4421e4a5353d784698c37540

knagware9 (Wed, 09 Jan 2019 07:28:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yzFLCANH3o9Lndchi) If we see logs block number decided before transaction send out to orderer...

knagware9 (Wed, 09 Jan 2019 07:33:17 GMT):

Screenshot from 2019-01-09 13-02-33.png

sstone1 (Wed, 09 Jan 2019 08:50:43 GMT):
@SunilHirole in that case, the other organisations would have to trust you by giving you admin rights to their peers and trust you to install the correct (and not malicious) chaincode. if there's that much trust, you probably could just have a centralized service ;-)

knagware9 (Wed, 09 Jan 2019 09:24:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=NEAAyLudeP5wznwQq) Simone , I tried to find out the code to make multiple concurrent requests to URL (HTTP POST to `/channels/:channelName/chaincodes/:chaincodeName) , do you have any sample code to do that...how can we do that ?

knagware9 (Wed, 09 Jan 2019 09:25:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zkY3h9th4rjcpTivH) @sstone1

sstone1 (Wed, 09 Jan 2019 09:32:13 GMT):
@knagware9 how are you making the HTTP call at the moment?

knagware9 (Wed, 09 Jan 2019 09:33:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DFDuHpPza5rHjRKd8) @sstone1 for testing purpose I am using curl and with UI I am using Angular or React.js

knagware9 (Wed, 09 Jan 2019 09:34:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RmYY9B46AQRfBdPwk) I mean to ask there is no additional changes require in invoke.js or app.js code to process multiple transaction in one block

sstone1 (Wed, 09 Jan 2019 09:34:51 GMT):
no, no changes needed to the app code

sstone1 (Wed, 09 Jan 2019 09:34:59 GMT):
if you hit the URL with lots of simulatenous curl calls

sstone1 (Wed, 09 Jan 2019 09:35:05 GMT):
or use something like apache jmeter

sstone1 (Wed, 09 Jan 2019 09:35:14 GMT):
then you should see multiple transactions in one block

knagware9 (Wed, 09 Jan 2019 09:36:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nqp4fCj2YaGvkxYcE) @sstone1 you mean if I hit the CURL from 5 different Unix terminal ,,it will work ?

sstone1 (Wed, 09 Jan 2019 09:38:27 GMT):
yeah, should do - as long as those curl commands are all submitting valid transactions that do not conflict with each other (e.g. cause MVCC errors)

knagware9 (Wed, 09 Jan 2019 09:40:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HPcFGHzN8nPoJozYf) @sstone1 ok let me try and also I will try Apache jmeter

knagware9 (Wed, 09 Jan 2019 10:00:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jm2zNTkxWDwfqBiFt) Thanks its worked --2019-01-09 09:56:25.953 UTC [msp.identity] Sign -> DEBU a17 Sign: digest: CC4ACDE1BF67F3FCD9642533F8AC08B8C025980F45001A1423DD62B2D7570C75 2019-01-09 09:56:26.259 UTC [fsblkstorage] indexBlock -> DEBU a18 Indexing block [blockNum=5, blockHash=[]byte{0x90, 0xec, 0x80, 0x8e, 0xa7, 0xdb, 0xea, 0xd4, 0x36, 0xe2, 0x7a, 0xf4, 0x7b, 0x8c, 0xd6, 0x1d, 0xfd, 0x2a, 0x38, 0xf3, 0x90, 0xdd, 0xeb, 0x9c, 0x3c, 0x56, 0xb4, 0xed, 0xec, 0x6b, 0x93, 0x7c} txOffsets= txId=09657c0416d824d2021681c592eab6c25b3d26c40d9b80dd2c683f8ca0fd2e18 locPointer=offset=70, bytesLength=4092 txId=9e0ffbc3e7b2a283cb3a100d4d790fd44e50c2ff98477892fdcad5c54e4dd168 locPointer=offset=4162, bytesLength=4093 txId=3176b565ca26b92c5b3f6966b7bb3ede5fa6d8f7cca9394e2871fa8d66170ee3 locPointer=offset=8255, bytesLength=4092 ] 2019-01-09 09:56:26.300 UTC [fsblkstorage] updateCheckpoint -> DEBU a19 Broadcasting about update checkpointInfo: latestFileChunkSuffixNum=[0], latestFileChunksize=[66264], isChainEmpty=[false], lastBlockNumber=[5] 2019-01-09 09:56:26.300 UTC [orderer.commmon.multichannel] commitBlock -> DEBU a1a [channel: mychannel] Wrote block 5

sstone1 (Wed, 09 Jan 2019 10:08:31 GMT):
great! :+1:

vikimeng (Wed, 09 Jan 2019 17:02:46 GMT):
User register and only allow enroll once. But the use lost the credential and crypto, how to regenerate them?

SanketPanchamia (Thu, 10 Jan 2019 05:11:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XKGXTPtiiSj5XG9rZ) @jeka_gompa @mastersingh24 The code that I am using is uploaded to my github https://github.com/psanket/balance-transfer-modified Please let me know what is the solution to this endorsement failure problem. Thanks in advance.

SanketPanchamia (Thu, 10 Jan 2019 05:11:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XKGXTPtiiSj5XG9rZ) @jeka_gompa @mastersingh24 The code that I am using is uploaded to my github https://github.com/psanket/balance-transfer-modified It has my customized chaincode. Please let me know what is the solution to this endorsement failure problem. Thanks in advance.

knagware9 (Thu, 10 Jan 2019 10:48:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PHp5gFAWanTdbwroJ) @SanketPanchamia I checked your setup and it seems your keystore folder is missing (private key of admin user) ..please check how you generated the artifacts

knagware9 (Thu, 10 Jan 2019 11:10:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Xnk4t5naLGcQYFCLS) 2019-01-10 10:59:47.779 UTC [cauthdsl] func2 -> DEBU 888 0xc000a708e0 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected OrdererMSP, got Org2MSP)

knagware9 (Thu, 10 Jan 2019 11:26:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eBMRCKKQJ9Zp4dor4) you can have a look this https://stackoverflow.com/questions/46640618/hyperledger-fabric-identity-0-does-not-satisfy-principal-the-identity-is-a-me

knagware9 (Thu, 10 Jan 2019 12:05:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=s8iHmd82yqhYf2NKj) Finally I got the issue with incomplete private data implementation ,, please refer https://github.com/hyperledger/fabric-samples/tree/master/chaincode/marbles02_private & https://fabric-sdk-node.github.io/tutorial-private-data.html

vikimeng (Thu, 10 Jan 2019 17:03:50 GMT):
I am using the User, `fromString` method, it need `enrollment.identity.certificate` and `enrollment.signingIdentity`, i can get the certificate from CA server, but how can i get the `enrollment.signingIdentity`? Because when lost all the credential store and crypto store files, need enroll or reenroll to again to make this user can work again.

vikimeng (Thu, 10 Jan 2019 17:03:50 GMT):
I am using the User.js, `fromString` method, it need `enrollment.identity.certificate` and `enrollment.signingIdentity`, i can get the certificate from CA server, but how can i get the `enrollment.signingIdentity`? Because when lost all the credential store and crypto store files, need enroll or reenroll to again to make this user can work again.

jrosmith (Thu, 10 Jan 2019 18:39:49 GMT):
hey all, i'm looking at the new [fabric-samples](https://github.com/hyperledger/fabric-samples) and i'm noticing that the [commercial paper](https://github.com/hyperledger/fabric-samples/tree/release-1.4/commercial-paper) example makes use of the new `fabric-network` package, particularly the use of `getContract`. is this method compatible with only node.js chaincode? or can i use this with existing chaincode written in go?

aashishshrestah (Thu, 10 Jan 2019 18:40:29 GMT):
Has joined the channel.

davidkel (Thu, 10 Jan 2019 18:48:34 GMT):
@jrosmith It will work with any chaincode

venu.vemula (Thu, 10 Jan 2019 18:49:45 GMT):
Has joined the channel.

jeka_gompa (Thu, 10 Jan 2019 19:46:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Xnk4t5naLGcQYFCLS) @knagware9 Thanks for the reply. I have another question regarding the node SDK. My network deployment includes 5 organizations (and we are expecting more in the future), each with 2 peers, 2 couchdbs, an orderer and its own CA-server. There is only one application accessing the blockchain through the Node SDK to which all organizations have access: - Do you always need to have the certificates of all network components stored locally in the server where the Node SDK is being used? - What happends when new organizations join the network, do they have to pass the certificates to the organization hosting the application? - How good is it to have all this inforamation stored in one server? Is it risky?

jeka_gompa (Thu, 10 Jan 2019 19:46:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Xnk4t5naLGcQYFCLS) @knagware9 Thanks for the reply. I have another question regarding the node SDK. My network deployment includes 5 organizations (and we are expecting more in the future), each with 2 peers, 2 couchdbs, an orderer and its own CA-server. There is only one application accessing the blockchain through the Node SDK to which all organizations have access: - Do you always need to have the certificates of all network components stored locally in the server where the Node SDK is being used? - What happens when new organizations join the network, do they have to pass the certificates to the organization hosting the application? - How good is it to have all this information stored in one server? Is it risky?

jeka_gompa (Thu, 10 Jan 2019 19:46:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Xnk4t5naLGcQYFCLS) @knagware9 Thanks for the reply. I have another question regarding the node SDK. My network deployment includes 5 organizations (and we are expecting more in the future), each with 2 peers, 2 couchdbs, an orderer and its own CA-server. There is only one application accessing the blockchain through the Node SDK to which all organizations have access: - Do you always need to have the certificates of all network components stored locally in the server where the Node SDK is being used? - What happens when new organizations join the network, do they have to pass the certificates to the organization hosting the application? - How good is it to have all this information (certificates, keys, etc...) stored in one server? Is it risky?

sstone1 (Thu, 10 Jan 2019 20:23:38 GMT):
@jeka_gompa having all the certificates and keys on one server defeats the purpose of blockchain - if you compromise that server, you can sign transactions on behalf of any of those organizations. really each organization should host an instance of the application, and each organization should have just their certificates and keys.

sstone1 (Thu, 10 Jan 2019 20:24:42 GMT):
an application using the Node SDK only needs a certificate and key to sign transactions (enrollment/user certificate), and any TLS material required to connect to the peer(s). it doesn't need all of the crypto material you use to start the peer(s) themselves.

PradeepJaligama (Thu, 10 Jan 2019 21:07:09 GMT):
Has joined the channel.

jeka_gompa (Thu, 10 Jan 2019 22:05:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3MfKiMJpSxkXYiHX6) @sstone1 Thank you very, very much. Yes, I totally agree with you and that was my concern. Now, if every organization is hosting a copy of the application how do the signatures gathering process work in order to generate the transactions. I'm following the balance transfer example and there the network_config file allows to communicate with the peers because it has the certificates information. If I get rid of the certificates, tls data, etc ... of the other components of the network how do I send proposals to the other endorsing peers?

akoita (Fri, 11 Jan 2019 03:33:28 GMT):
Has joined the channel.

sstone1 (Fri, 11 Jan 2019 09:08:18 GMT):
@jeka_gompa the node SDK will send the transactions to all endorsing peers for all the organizations. this means that the node SDK needs: 1) network access to all endorsing peers 2) public TLS material for all endorsing peers

sstone1 (Fri, 11 Jan 2019 09:09:10 GMT):
the node SDK only needs the key from one org to sign the transaction proposal; the endorsing peers from the other orgs will recognize that the transaction has been signed by that org (because they are members of the same channel)

AVetter (Fri, 11 Jan 2019 13:32:36 GMT):
Is it somehow possible to get a list of all network/channel identities? Maybe even including their public key?

paul.sitoh (Fri, 11 Jan 2019 13:34:27 GMT):
Is this the new API for version 1.4? https://github.com/hyperledger/fabric-sdk-node/tree/release-1.4/fabric-network

sstone1 (Fri, 11 Jan 2019 13:35:28 GMT):
@paul.sitoh yep

sstone1 (Fri, 11 Jan 2019 13:35:42 GMT):
docs are here: https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.html

paul.sitoh (Fri, 11 Jan 2019 13:37:28 GMT):
@sstone1 thanks Happy New Year

paul.sitoh (Fri, 11 Jan 2019 13:45:08 GMT):
@sstone1 if TLS is set, do we need to include this the connection profile: grpcOptions: ssl-target-name-override: orderer.example.com tlsCACerts: path: artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt

paul.sitoh (Fri, 11 Jan 2019 13:45:08 GMT):
@sstone1 if TLS is set for peers and orderers, do we need to include this the connection profile: grpcOptions: ssl-target-name-override: orderer.example.com tlsCACerts: path: artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt

paul.sitoh (Fri, 11 Jan 2019 13:46:57 GMT):
What about Organisation's admin Key? to enable operations such as installing Chaincodes?

paul.sitoh (Fri, 11 Jan 2019 13:46:57 GMT):
What about Organisation's admin Key? to enable operations such as installing and/or instantiation of Chaincodes?

sstone1 (Fri, 11 Jan 2019 13:50:33 GMT):
happy new year! you can import an admin cert/key into a wallet to perform install/instantiate

sstone1 (Fri, 11 Jan 2019 13:50:48 GMT):
note that the fabric-network package doesn't contain any operational APIs yet

sstone1 (Fri, 11 Jan 2019 13:50:57 GMT):
so you'll still need to use fabric-client for those

paul.sitoh (Fri, 11 Jan 2019 13:51:08 GMT):
Ah ok. Thanks

chinmsay213211 (Fri, 11 Jan 2019 22:21:21 GMT):
Has joined the channel.

Luxii (Sun, 13 Jan 2019 12:48:51 GMT):
Im getting "mycc: chaincode already exists" while upgrading chaincode with different version

Legiit (Mon, 14 Jan 2019 13:57:58 GMT):
Im getting this error rather frequent - does anyone know what this error means: `error: [Channel.js]: sendTransaction - no valid endorsements found`

SuperSeiyan (Mon, 14 Jan 2019 18:03:36 GMT):
Hi, I would like to know about high level hfc1.4 on fabric-network part now support all feature like low level hfc? and if i want to create custom endorsement policy validation on API is fabric-network support or i need to use fabric-client to do this action after send proposal?

mattmaru (Tue, 15 Jan 2019 13:05:54 GMT):
Has joined the channel.

mattmaru (Tue, 15 Jan 2019 13:09:27 GMT):
I guys. I've a little problem. I'm building a server to query and invoke my chaincode. I would to know how set my app.post to invoke. Do you have any example ?

mattmaru (Tue, 15 Jan 2019 13:27:16 GMT):
it's made throught express js

jrosmith (Tue, 15 Jan 2019 13:29:07 GMT):
@mattmaru a lot of fabric samples can be found [here](https://github.com/hyperledger/fabric-samples). the [balance-transfer](https://github.com/hyperledger/fabric-samples/tree/release-1.4/balance-transfer/app) application is probably closest suited to your needs

mattmaru (Tue, 15 Jan 2019 14:12:54 GMT):
@jrosmith Thanks but I'm not able to adapt invoke post to my server. I've not any idea how it works

mattmaru (Tue, 15 Jan 2019 14:13:52 GMT):
The response from server is ever "CANNOT GET PATH" ...I hate it

jrosmith (Tue, 15 Jan 2019 14:32:15 GMT):
@mattmaru can you post a hastebin.com link to a snippet of your invoke handler on your server?

mattmaru (Tue, 15 Jan 2019 14:38:08 GMT):
@jrosmith https://pastebin.com/BYCvj654 ...query works but invoke no

mattmaru (Tue, 15 Jan 2019 14:39:38 GMT):
@jrosmith second file : https://pastebin.com/uHYim5bK

mattmaru (Tue, 15 Jan 2019 14:42:50 GMT):
How can I call my invoke.js under express post method? Is it possible?

jrosmith (Tue, 15 Jan 2019 14:46:20 GMT):
@mattmaru it is definitely possible, the logic should be similar to your query except you will need to go through the process of sending a transaction proposal then sending the transaction for ordering. i don't see anything jumping out at me that would cause an error message of `CANNOT GET PATH`, you may find it helpful to add some debug log statements to help isolate when the error is occurring.

mattmaru (Tue, 15 Jan 2019 14:47:45 GMT):
with "path" I mean "api/sell"

mattmaru (Tue, 15 Jan 2019 14:48:30 GMT):
do you know any guide to call invoke.js under my first file?

jrosmith (Tue, 15 Jan 2019 14:48:45 GMT):
oh, thats because its not a GET endpoint

jrosmith (Tue, 15 Jan 2019 14:48:48 GMT):
its a post endpoint

mattmaru (Tue, 15 Jan 2019 14:49:18 GMT):
but i've defined a post method ! I'm confused.

jrosmith (Tue, 15 Jan 2019 14:50:00 GMT):
right but you can't set a GET request to the POST endpoint. if the server is responding with `cannot GET api/sell` its because the request coming it is specifying the method as GET and not POST

mattmaru (Tue, 15 Jan 2019 14:52:59 GMT):
@jrosmith I'm trying to extends fabcar network but I don't have any idea how setup POST method in my server

mattmaru (Tue, 15 Jan 2019 14:53:25 GMT):
naturally i have changed default chaincode with mine

mattmaru (Tue, 15 Jan 2019 14:57:57 GMT):
@jrosmith can you show me something about?

jrosmith (Tue, 15 Jan 2019 15:35:45 GMT):
@mattmaru you have the POST method set up in your express backend. the issue is not with your server code, its the code youre executing to make a request. your http_method needs to be POST. right now your request has the http_method set to GET. you cannot GET a POST endpoint.

mattmaru (Tue, 15 Jan 2019 15:57:02 GMT):
@jrosmith What i need to change ?

mattmaru (Tue, 15 Jan 2019 15:57:20 GMT):
if my code is corrected

jrosmith (Tue, 15 Jan 2019 16:04:18 GMT):
@mattmaru your http_request to the `api/sell` needs to have an http_method of POST

deenario (Wed, 16 Jan 2019 07:24:55 GMT):
I mostly write blogs realted to Hyperledger Farbic and general Blockchain. Can you guys give some of them a view and give me pointers. https://www.devprovider.com/author/danyal-ahmaddevprovider-com/

JonathanC (Wed, 16 Jan 2019 17:21:51 GMT):
Has joined the channel.

JonathanC (Wed, 16 Jan 2019 17:21:54 GMT):
Hello guys, are any of you being sucsessfull returning error throwed by chaincode from the function queryByChaincode in node SDK ? It seems to always return an empty Buffer even

JonathanC (Wed, 16 Jan 2019 17:21:54 GMT):
Hello guys, are any of you being successfull returning error throwed by chaincode from the function queryByChaincode in node SDK ? It seems to always return an empty Buffer even when there is an error throw in chaincodew

JonathanC (Wed, 16 Jan 2019 17:21:54 GMT):
Hello guys, are any of you being successfull returning error throwed by chaincode from the function queryByChaincode in node SDK ? It seems to always return an empty Buffer even when there is an error throw in chaincode

bricakeld (Thu, 17 Jan 2019 04:21:30 GMT):
Has joined the channel.

abityildiz (Thu, 17 Jan 2019 09:02:20 GMT):

Clipboard - January 17, 2019 12:01 PM

sstone1 (Thu, 17 Jan 2019 09:20:11 GMT):
@abityildiz if you use `createTransaction` you can get the transaction ID

sstone1 (Thu, 17 Jan 2019 09:22:01 GMT):
``` const tx = contract.createTransaction('createCar'); const result = await tx.submit('arg1', 'arg2', ...); const txID = tx.getTransactionID(); ```

sstone1 (Thu, 17 Jan 2019 09:22:13 GMT):
https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Transaction.html

abityildiz (Thu, 17 Jan 2019 10:17:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=v27Xst62s9FsXA86y) @sstone1 thanks.i have got the transaction id:thumbsup:

lesleyannj (Thu, 17 Jan 2019 13:20:15 GMT):
Has joined the channel.

sstone1 (Thu, 17 Jan 2019 13:28:16 GMT):
np :+1: glad to hear you got it working

abityildiz (Thu, 17 Jan 2019 13:44:58 GMT):

Clipboard - January 17, 2019 4:44 PM

dan13 (Thu, 17 Jan 2019 17:31:39 GMT):
Has joined the channel.

Randyshu2018 (Fri, 18 Jan 2019 03:33:00 GMT):
hi,Is there some way to remove a peer from exist channel?

mrudav.shukla (Fri, 18 Jan 2019 03:43:31 GMT):
I am using classes in the node smart contract. Following the conventions, the instance variables starts with "_". However, it seems couchdb has reserved usage of "_". Did anyone of you come across this kind of situation? If yes, how did you resolve it?

abityildiz (Fri, 18 Jan 2019 11:30:36 GMT):

Clipboard - January 18, 2019 2:29 PM

PMoura (Fri, 18 Jan 2019 11:35:02 GMT):
Has joined the channel.

akshay.sood (Fri, 18 Jan 2019 12:01:55 GMT):
Hi guys

akshay.sood (Fri, 18 Jan 2019 12:02:04 GMT):
does anyone encontered this error

akshay.sood (Fri, 18 Jan 2019 12:02:06 GMT):
```Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Failed to discover ::Error: Channel:secc.public Discovery error:access denied```

rthatcher (Fri, 18 Jan 2019 12:03:16 GMT):
@abityildiz - have you 'upgraded' the chaincode (smart contract) after installing it? Have you 'invoked' the initLedger function after the upgrade?

abityildiz (Fri, 18 Jan 2019 12:10:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=S2eKccGWPhD5w3g4L) @rthatcher yes i did it.i did like this: 1-i have changed smart contract.(added new field) 2-peer chaincode install -n fabcar -v 1.0.2 -p /opt/gopath/src/github.com/fabcar/javascript/lib -l node 3-node invoke.js (call the initLedger)

akshay.sood (Fri, 18 Jan 2019 12:11:04 GMT):
if I execute the following command from cli it says: ```discover --configFile conf.yaml peers --channel secc.public --server $CORE_PEER_ADDRESS access denied```

rthatcher (Fri, 18 Jan 2019 12:13:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7orS25xLBaw4RYbFw) @abityildiz You need an extra step - 1b: `peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n fabcar -l "$CC_RUNTIME_LANGUAGE" -v 1.0 -c '{"Args":[]}'`

rthatcher (Fri, 18 Jan 2019 12:13:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7orS25xLBaw4RYbFw) @abityildiz You need an extra step - 1b: `peer chaincode upgradee -o orderer.example.com:7050 -C mychannel -n fabcar -l node -v 1.0 -c '{"Args":[]}'`

rthatcher (Fri, 18 Jan 2019 12:13:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7orS25xLBaw4RYbFw) @abityildiz You need an extra step - 1b: `peer chaincode upgradee -o orderer.example.com:7050 -C mychannel -n fabcar -l node -v 2.0 -c '{"Args":[]}'` (you may need to check the exact syntax)

rthatcher (Fri, 18 Jan 2019 12:13:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7orS25xLBaw4RYbFw) @abityildiz You need an extra step - 1b: `peer chaincode upgrade -o orderer.example.com:7050 -C mychannel -n fabcar -l node -v 2.0 -c '{"Args":[]}'` (you may need to check the exact syntax)

abityildiz (Fri, 18 Jan 2019 12:21:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rauBMXrwNszeJK2Y8) @rthatcher i'm doing it.Does it take a long time?

abityildiz (Fri, 18 Jan 2019 12:23:10 GMT):

Clipboard - January 18, 2019 3:22 PM

bricakeld (Fri, 18 Jan 2019 12:23:52 GMT):
Hi, I am trying to install chaincode using the fabric node sdk v1.3. I created a user which was able to invoke and query chaincodes, but when I try to install chaincode with the same user, I always get back status code 500 `{"status":500,"payload":{"type":"Buffer","data":[]},"isProposalResponse":true}` and am unable to install chaincode using the sdk. When I checked the logs of my peer containers, this is what I got: `[endorser] ProcessProposal -> ERRO be09 [][fbe617a9] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: ` Is there anything I might have missed that is causing this problem whenever I try to install chaincode through the sdK? I can install chaincodes through the peer CLI and also made sure the chaincodeID I sent in the request via the sdk is correct. Thanks for your help!

rthatcher (Fri, 18 Jan 2019 13:11:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WX2SfQnDhgpjnrYH4) @akshay.sood - looks like you are using a certificate/key that is not the administrator of the peer you are connecting to

bretharrison (Fri, 18 Jan 2019 13:22:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zTWaipT3dKaT7vHHk) @JonathanC Which version of the fabric-client code and fabric network are you using ?

bretharrison (Fri, 18 Jan 2019 13:35:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oatPPhH6JTocc8NSi) @Legiit This error is thrown when attempting to send endorsed proposals to the orderer to be committed. The fabric-client will scan thru them to be sure they have a status of 200. It would seem that none of your endorsements are good. You may wish to check the endorsements from your peers.

JigneshVasoya (Sat, 19 Jan 2019 04:32:20 GMT):
Jignesh Vasoya via Lists.Hyperledger.Org Fri, Jan 18, 10:24 PM (11 hours ago) to hyperledger-fabric, fabric : I have a Hyperledger network deployed across different machines on GCP. I'm using Node SDK to connect/communicate with my network. Randomly, SDK fails to connect to Orderer and throws SERVICE_UNAVAILABLE error. This issue is intermittent and happens obly after idle time (no activity through SDK) of approx 10-15 mins. here are the logs. error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: TCP Read failed\n at createStatusError (/usr/src/app/node_modules/grpc/src/client.js:64:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/client.js:270:19)\n at ClientDuplexStream._receiveStatus (/usr/src/app/node_modules/grpc/src/client.js:248:8)\n at /usr/src/app/node_modules/grpc/src/client.js:804:12" Request failed: POST /channels/stanfinandcredth/chaincodes/sc1547746253: SERVICE_UNAVAILABLE Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:136:21) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/client.js:271:12) at ClientDuplexStream._receiveStatus (/usr/src/app/node_modules/grpc/src/client.js:248:8) at /usr/src/app/node_modules/grpc/src/client.js:804:12 Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/usr/src/app/node_modules/fabric-client/lib/Orderer.js:136:21) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/client.js:271:12) at ClientDuplexStream._receiveStatus (/usr/src/app/node_modules/grpc/src/client.js:248:8) at /usr/src/app/node_modules/grpc/src/client.js:804:12 has anyone faced this issue on any cloud deployment? It works fine if I run all components on a single machine.

wangrangli (Sun, 20 Jan 2019 14:15:23 GMT):
@bretharrison hello, Is there any tools could create a wallet and indentity for fabric-sdk-node, like the composer card create and import? Thank you.

wangrangli (Sun, 20 Jan 2019 14:43:27 GMT):
@bretharrison Sorry, I find the addToWallet.js in commercialpaper, thank you.

varuntejay (Sun, 20 Jan 2019 18:34:05 GMT):
Has joined the channel.

varuntejay (Sun, 20 Jan 2019 18:35:43 GMT):
Hi, I've enrolled admin and user using fabric-sdk by giving my own secret(password). I've seen that when I use getUserContext('user1',true) function it is returning me user with out asking secret that I set, during enrollment. Can someone please let me know, how do I set the password check for this.

varuntejay (Sun, 20 Jan 2019 18:39:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GC8gQik5rPtbFkhA7) @abityildiz Yes it is, first it will run npm install to install the packages mentioned in your package.json file you can check the logs docker

VadimInshakov (Mon, 21 Jan 2019 08:31:12 GMT):
Do I need sessions for multiuser client application usage?

abityildiz (Mon, 21 Jan 2019 09:11:12 GMT):
hi ,how can i get block number from fabric?

14gracel (Mon, 21 Jan 2019 09:30:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QQMQQhXe4JbkB9YRj) @abityildiz You can use `channel.queryInfo` to get a `BlockchainInfo` object. This contains the block height. https://fabric-sdk-node.github.io/Channel.html#queryInfo__anchor

sureshtedla (Mon, 21 Jan 2019 12:32:48 GMT):
Any sample application for hyperledger fabric using node sdk

sureshtedla (Mon, 21 Jan 2019 12:32:48 GMT):
Any sample application for hyperledger fabric using node sdk @14gracel

WouterVanHecke (Mon, 21 Jan 2019 12:35:16 GMT):
balance transfer

14gracel (Mon, 21 Jan 2019 12:41:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SfRPuLkD9qsvtt3QZ) @sureshtedla https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html walks through a sample using fabric 1.4

sureshtedla (Mon, 21 Jan 2019 12:42:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bD5ihH26geKkH3wZ3) @14gracel Thanks @14gracel

sureshtedla (Mon, 21 Jan 2019 12:42:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8RxP3gLrYNEcLoAqw) @WouterVanHecke @WouterVanHecke Thanks

VadimInshakov (Mon, 21 Jan 2019 13:49:06 GMT):
Why when I try to register a user I get an error `Failed to register: Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]]`? I use this admin for registering: ``` {"name":"admin","mspid":"13Org","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"3aa6f85cfd1d5c80b0c6437461096ee682ae485d11dd22610f76a83fbff12ec8","identity":{"certificate":"-----BEGIN CERTIFICATE-----\nMIICYTCCAhCgAwIBAgIUVt3S8Jb8jCLXvdQif47hczBJJhwwCAYGKoUDAgIDMF8x\nCzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Ob3J0aCBDYXJvbGluYTEUMBIGA1UEChML\nSHlwZXJsZWRnZXIxDzANBgNVBAsTBkZhYnJpYzEQMA4GA1UEAxMHbWFpbi1jYTAe\nFw0xOTAxMjExMzQxMDBaFw0yMDAxMjExMzQ2MDBaMDUxIDANBgNVBAsTBmNsaWVu\ndDAPBgNVBAsTCE9yZyBOYW1lMREwDwYDVQQDEwhPcmdBZG1pbjBZMBMGByqGSM49\nAgEGCCqGSM49AwEHA0IABJbj9u/DFSLn22NiaW8frwtBiLfdv8XmHlcutqquSKrw\ndIRETUCR9EdhEm6RuidBOS1iq6AWfrxYJDGMdC1fqRCjgdUwgdIwDgYDVR0PAQH/\nBAQDAgeAMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFDyjaWtq0+MHSl1sBAuAjgXO\n/3z0MB8GA1UdIwQYMBaAFG2/in4cHYdFfIoQCl82oEDKTqXiMHIGCCoDBAUGBwgB\nBGZ7ImF0dHJzIjp7ImFkbWluIjoidHJ1ZSIsImhmLkFmZmlsaWF0aW9uIjoiT3Jn\nIE5hbWUiLCJoZi5FbnJvbGxtZW50SUQiOiJPcmdBZG1pbiIsImhmLlR5cGUiOiJj\nbGllbnQifX0wCAYGKoUDAgIDA0EAbk1PDKzQi4aIwXkDkFI9zxm6SxvvVzbMVMqt\n5xyOh51PkwJoAe3u1CLnWKJVEssC0yhlpm9Vsui1blSMQ7E8Gw==\n-----END CERTIFICATE-----\n"}}} ```

abityildiz (Mon, 21 Jan 2019 13:58:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jqBKhB7nFLzoZAovc) @14gracel thanks.i have get the block info.

bretharrison (Mon, 21 Jan 2019 14:03:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ApdTe9yJuLpfcaH3Y) @varuntejay The fabric-client user state store is not meant to be a user login validation system, it is used to store the fabric network credentials (keys and certs) for the application once the application has determined that the user is a valid user.

VadimInshakov (Mon, 21 Jan 2019 14:34:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bQLgEJJNvLtHP5YnF) please note that admin's user object doesn't have role: `"roles":null`. Is that the reason? Is it necessary to set role on the enroll step? Why it's `null`?

VadimInshakov (Mon, 21 Jan 2019 14:35:31 GMT):
need help, friends

jeka_gompa (Mon, 21 Jan 2019 22:20:07 GMT):
Hi everybody, I found this on this page () " "

jeka_gompa (Mon, 21 Jan 2019 22:26:04 GMT):
Hi everybody, I found the following text on this page (https://openblockchain.readthedocs.io/en/latest/biz/usecases/), as part of key components of the definition of the B2B Contract use case: "Multi-sig contract execution - Some contracts will require one of many signatures to execute. For example, in trade finance, a payment instruction can only be executed if either the recipient or an authorized third party (e.g. UPS) confirms the shipment of the good." - I was wondering if this means that you can implement multi-signature transactions in Hyperledger fabric like is the case of Hyperledger Iroha where peers can distribute half-signed transactions? - If yes where how can this be done? Thanks in advance

ycarmel (Tue, 22 Jan 2019 09:04:36 GMT):
Has joined the channel.

abityildiz (Tue, 22 Jan 2019 09:12:56 GMT):
hi all , i have changed asset status.i want to log for asset's old status.how can i save log records for old status?(Event example)?

deepaks (Tue, 22 Jan 2019 10:39:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CSE8fWqakK85rYY5F) @VadimInshakov Hello, You should delete the already generated certificates folder locally. Then again try to run. Because this generally happens when you register the admin first and then restart the network so what happens when we process any request it reads the certificates of previously generated admin, hence the Authorization failure

mfaisaltariq (Tue, 22 Jan 2019 12:25:26 GMT):
Has joined the channel.

AVetter (Tue, 22 Jan 2019 14:11:26 GMT):
ByteBuffer

alokkv (Tue, 22 Jan 2019 17:29:20 GMT):
Has joined the channel.

incarose (Wed, 23 Jan 2019 00:26:44 GMT):
Has joined the channel.

davidkhala (Wed, 23 Jan 2019 02:32:03 GMT):
@bretharrison Hi bret, is there any schedule of release a 1.4.1 tagged version. ?

ShefaliMittal (Wed, 23 Jan 2019 06:54:45 GMT):
Hi, I am facing issues in setting endorsement policy to "AND" instead of "OR". It gives me endorsement policy failure error. While it works fine with OR(ORG1MSP.member, Org2MSP.member) please help

davidkhala (Wed, 23 Jan 2019 08:27:28 GMT):
@ShefaliMittal are you sdk user or command line user?

schadokar (Wed, 23 Jan 2019 08:44:23 GMT):
Has joined the channel.

ShefaliMittal (Wed, 23 Jan 2019 09:04:43 GMT):
I am using node sdk

ShefaliMittal (Wed, 23 Jan 2019 09:04:43 GMT):
@davidkhala I am using node sdk

davidkhala (Wed, 23 Jan 2019 09:26:10 GMT):
node sdk policy syntax based on 'n-of'

davidkhala (Wed, 23 Jan 2019 09:27:02 GMT):
or are you setting endorsement policy in command line, but use node-sdk to query/invoke?

WouterVanHecke (Wed, 23 Jan 2019 10:34:26 GMT):
Hi, is there any way of checking which peers are online at the moment?

ShefaliMittal (Wed, 23 Jan 2019 11:07:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jhfgLWx3psNHthSDh) @davidkhala Yeh .. correct. instantiating via command line and query/invoke via sdk

knagware9 (Wed, 23 Jan 2019 13:01:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Nk7SF4MrRGPLQCQTm) @WouterVanHecke you can use service discovery feature

WouterVanHecke (Wed, 23 Jan 2019 13:01:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3shzEqgMQz9taiJND) @knagware9 Yeah I'm reading about it right now, thanks! :)

bretharrison (Wed, 23 Jan 2019 13:20:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=eAQddGFTNL9mwpkSe) @davidkhala We have not scheduled one yet, is there something you need

Ammu (Wed, 23 Jan 2019 13:22:24 GMT):
wnat is the use of shim and stub in hyperledger fabric? while writing chaincode i got this error

JonathanC (Wed, 23 Jan 2019 15:42:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yTrotoaoD5bzbbFZW) @bretharrison I am using "fabric-client": "^1.1.2" on my backend and "fabric-shim": "1.2.0" for my chaincode

Yetta (Thu, 24 Jan 2019 09:50:23 GMT):
Has joined the channel.

VadimInshakov (Thu, 24 Jan 2019 14:13:13 GMT):
I try to install and instantiate nodejs chaincode on `basic-network` from fabric-samples, but I get error: ``` root@5beff41fca16:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n chain -l "node" -v 1.0 -c '{"Args":[]}' 2019-01-24 14:06:01.941 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2019-01-24 14:06:01.941 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [Org1MSP] ``` Anyone knows why I get this error? Help me please

VadimInshakov (Thu, 24 Jan 2019 14:13:13 GMT):
I try to install and instantiate nodejs chaincode on `basic-network` from fabric-samples, but I get error: ``` root@5beff41fca16:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n chain -l "node" -v 1.0 -c '{"Args":[]}' 2019-01-24 14:59:41.557 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2019-01-24 14:59:41.558 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg cannot get package for chaincode (sampleee:1.0) ``` Anyone knows why I get this error? Help me please

VadimInshakov (Thu, 24 Jan 2019 14:35:34 GMT):
chaincode installed ok, but I can't instantiate it

Legiit (Thu, 24 Jan 2019 15:28:30 GMT):
Hello - when I execute `const network = this.gateway.getNetwork(channel);` I get the following error: `Error: PEM encoded certificate is required.` Anyone a clue why this happens? It's an abstraction of the fabric-client, so I assume it's something inside the SDK which is going south

Rajatsharma (Thu, 24 Jan 2019 16:26:24 GMT):
Has joined the channel.

Rajatsharma (Thu, 24 Jan 2019 16:27:50 GMT):
[HIGH-PRIORITY] I'm facing a issue with node chaincode. I've set corporate proxy and all the npm packages are installing from there. But some packages like x509 which require packages with nodejs.org. They are not going to proxy and throwing me error. Can anyone help me out with this ??

Rajatsharma (Thu, 24 Jan 2019 16:59:33 GMT):
and if I'll put --ignore-scripts then it'll ignore index.js too

mbwhite (Thu, 24 Jan 2019 17:09:18 GMT):
Have you added a `.npmrc` file to the root of the chaincode ?

mbwhite (Thu, 24 Jan 2019 17:09:18 GMT):
Have you added a `.npmrc` file to the root of the chaincode ? Have a look at this SO answer; https://stackoverflow.com/questions/34652563/using-myproject-npmrc-with-registry For the basic concepts

bajwa (Thu, 24 Jan 2019 18:59:09 GMT):
Has joined the channel.

redegade (Thu, 24 Jan 2019 19:09:19 GMT):
Has joined the channel.

antoniovassell (Thu, 24 Jan 2019 21:20:41 GMT):
Tests are failing for me on release-1.4 branch. Is it failing for anyone else?

silliman (Thu, 24 Jan 2019 22:32:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BmaR3xQuuF9evKGMF) @Rajatsharma The problem is that packages like x509 (and grpc and pkcs11, at least for s390x architecture) require native binaries to be compiled by node-gyp and this process seems to want to go to nodejs.org to check for something, I never nailed down exactly what it was going there for, but I found a workaround by: 1) downloading the Node.js installation tarball and extracting it to a directory 2) copying that directory into a custom build of the ccenv image 3) setting the node_config_envdir environment variable within the ccenv image to point to this directory 4) setting the CORE_CHAINCODE_BUILDER environment variable for the peer to custom ccenv image created in step 2 This is a sample Dockerfile that I used for step 2: ``` FROM hyperledger/fabric-ccenv:s390x-1.1.1 COPY node-v8.9.4-linux-s390x /tmp/node-v8.9.4-linux-s390x ENV npm_config_nodedir /tmp/node-v8.9.4-linux-s390x ``` There may be more elegant solutions but this worked for me.

HoneyShah (Fri, 25 Jan 2019 03:13:15 GMT):
Has joined the channel.

HoneyShah (Fri, 25 Jan 2019 03:14:51 GMT):
Hello, I am trying to setup dev mode for node sdk with couchdb. While instantiating chaincode I am getting following error: ``` ``` node:19) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead 2019-01-24T09:39:28.354Z ERROR [lib/handler.js] Chat stream with peer - on error: "Error: 14 UNAVAILABLE: Name resolution failure\n at Object.exports.createStatusError (/usr/local/src/node_modules/grpc/src/common.js:91:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:233:26)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:211:8)\n at Object.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:1306:15)\n at InterceptingListener._callNext (/usr/local/src/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:618:8)\n at /usr/local/src/node_modules/grpc/src/client_interceptors.js:1123:18" ``` ```

HoneyShah (Fri, 25 Jan 2019 03:14:51 GMT):
Hello, I am trying to setup dev mode for node sdk with couchdb. While instantiating chaincode I am getting following error: ``` ``` node:19) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead 2019-01-24T09:39:28.354Z ERROR [lib/handler.js] Chat stream with peer - on error: "Error: 14 UNAVAILABLE: Name resolution failure\n at Object.exports.createStatusError (/usr/local/src/node_modules/grpc/src/common.js:91:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:233:26)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:211:8)\n at Object.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:1306:15)\n at InterceptingListener._callNext (/usr/local/src/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:618:8)\n at /usr/local/src/node_modules/grpc/src/client_interceptors.js:1123:18" ``` ```

HoneyShah (Fri, 25 Jan 2019 03:14:51 GMT):
Hello, I am trying to setup dev mode for node sdk with couchdb. While instantiating chaincode I am getting following error: ``` node:19) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead 2019-01-24T09:39:28.354Z ERROR [lib/handler.js] Chat stream with peer - on error: "Error: 14 UNAVAILABLE: Name resolution failure\n at Object.exports.createStatusError (/usr/local/src/node_modules/grpc/src/common.js:91:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:233:26)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:211:8)\n at Object.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:1306:15)\n at InterceptingListener._callNext (/usr/local/src/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:618:8)\n at /usr/local/src/node_modules/grpc/src/client_interceptors.js:1123:18" ```

lancelot96 (Fri, 25 Jan 2019 07:18:14 GMT):
Has joined the channel.

lancelot96 (Fri, 25 Jan 2019 07:27:30 GMT):
Hi, I find that I can not get the return value from chaincode instantiate. Is there a way to get that?

Rajatsharma (Fri, 25 Jan 2019 07:42:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ReWDkyTjsE5yWS6qX) @mbwhite Thanks a lot I had actually changed the fabric-baseimage with the required npm configs I needed. Because I was not aware about `.npmrc` at that time. Still @silliman https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BY7qfysHa99LT8BMs solution was really good. I also found a workaround but this one was a bit better.

Rajatsharma (Fri, 25 Jan 2019 07:44:44 GMT):
I had placed my node-modules in `fabric-ccenv` images `/chaincode/output` and only that made it work fine. This network was just to deploy a single chaincode, so this works fine for me. But yes should find a elegant solution for the same.

Rajatsharma (Fri, 25 Jan 2019 07:44:44 GMT):
I had placed my `node-modules` in `fabric-ccenv` images `/chaincode/output` and only that made it work fine. This network was just to deploy a single chaincode, so this works fine for me. But yes should find a elegant solution for the same.

Rajatsharma (Fri, 25 Jan 2019 07:46:33 GMT):
@silliman Thanks a lot. But if you find any better workaround, please let me know.

KameshPalani (Fri, 25 Jan 2019 07:50:56 GMT):
Has joined the channel.

KameshPalani (Fri, 25 Jan 2019 07:54:12 GMT):
Hi all, I see *Insufficient Entropy vulnerability* in *cryptiles *package under *Fabric-client@1.4.0* Node Package. can someone help me resolve the same ?

Legiit (Fri, 25 Jan 2019 08:28:47 GMT):
Using this snippet: ``` this.channel = client.newChannel("mychannel"); const peer = client.newPeer("grpcs://localhost:7051"); this.channel.addPeer(peer, "Org1MSP"); await this.channel.initialize({ discover: true, asLocalhost: true }); ``` I get the following error: `PEM encoded certificate is required.` Where should I find and assign this PEM? Also, when I remove the S from grpcs I get this error: `No identity has been assigned to this client`

Rajatsharma (Fri, 25 Jan 2019 08:33:03 GMT):
Has anyone checked how many entries we can putState in a single transaction ??

Rajatsharma (Fri, 25 Jan 2019 08:33:28 GMT):
Does fabric support bulk putstate usually above 1000 ?

dave.enyeart (Fri, 25 Jan 2019 09:49:00 GMT):
@Rajatsharma There is no strict limit, but you may eventually hit a grpc size threshold depending on the size of your data, I believe some of the interactions still have a 100MB limit.

dave.enyeart (Fri, 25 Jan 2019 09:49:00 GMT):
@Rajatsharma There is no strict count limit, but you may eventually hit a grpc size threshold depending on the size of your data, I believe some of the interactions still have a 100MB limit.

Rajatsharma (Fri, 25 Jan 2019 09:51:24 GMT):
Okay Thanks. I

Rajatsharma (Fri, 25 Jan 2019 09:51:24 GMT):
Okay Thanks. I'll duplicate that for my case and see how it works.

Rajatsharma (Fri, 25 Jan 2019 10:10:10 GMT):
Has anyone used `GetQueryResultWithPagination()` ?

Rajatsharma (Fri, 25 Jan 2019 10:10:33 GMT):
or anyone could help me with a example or a sample code for the same.

silliman (Fri, 25 Jan 2019 13:27:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Z8FmBZ3G7RHgm8ZMd) @Rajatsharma I'm glad this helped but I am not currently looking further into this but I am keeping an eye on this JIRA: https://jira.hyperledger.org/browse/FAB-9287

davidkel (Fri, 25 Jan 2019 14:10:12 GMT):
@silliman Given your experiences with node-gyp requiring internet access, it would be worth putting information into the JIRA as it help in looking into how to address native modules

davidkel (Fri, 25 Jan 2019 14:10:12 GMT):
@silliman Given your experiences with node-gyp requiring internet access, it would be worth putting some information into the JIRA as it would help in looking into how to address native modules

davidkel (Fri, 25 Jan 2019 14:10:12 GMT):
@silliman Given your experiences with node-gyp requiring internet access, I think it would be really helpful putting your information into the JIRA as it would help in looking into how to address native modules

silliman (Fri, 25 Jan 2019 14:24:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gXCcuRhFPkqv6y6nW) @davidkel Done.

davidkel (Fri, 25 Jan 2019 14:25:27 GMT):
@silliman :thumbsup: thanks

lancelot96 (Sat, 26 Jan 2019 04:01:30 GMT):
After using `sendInstantiateProposal`, how can I get the return value of chaincode instantiate?

nagaraju123 (Sun, 27 Jan 2019 17:07:52 GMT):
Has joined the channel.

lip-inagora (Mon, 28 Jan 2019 00:23:07 GMT):
Has joined the channel.

davidkhala (Mon, 28 Jan 2019 06:50:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=j8TFdgH6b8Tsuf7Kt) @ShefaliMittal And you have to set mutiple target peer in a query/invoke. And they should belongs to different orgs as you set in endorsement policy.

davidkhala (Mon, 28 Jan 2019 06:51:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BgCiqbK6CaSWn8AcE) @bretharrison Yes, FABN-1096 NodeSDK add member_only_read and member_only_write. it is missing and expected to be at 1.4

davidkhala (Mon, 28 Jan 2019 06:52:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=roi4iuYyiL8twcwPP) @lancelot96 +1 I also have that question for a long time. Is it not supported? @bretharrison

tzejan (Mon, 28 Jan 2019 07:45:25 GMT):
Has joined the channel.

tzejan (Mon, 28 Jan 2019 07:46:41 GMT):
Hi all, is there a way for me to find out the version of fabric that the peer is running on via the SDK?

tzejan (Mon, 28 Jan 2019 07:49:06 GMT):
Also, may I know where can i find the Node SDK 1.2 documentation? I can locate SDK version 1.3 and 1.4, but is this 1.2? https://fabric-sdk-node.github.io/Channel.html

abityildiz (Mon, 28 Jan 2019 12:49:40 GMT):
hi all,how can i calculate current hash?current hash = bloc number + data hash + Previous Hash ? it is correct?

edisinovcic (Mon, 28 Jan 2019 13:15:21 GMT):
Has joined the channel.

DavorKljajic (Mon, 28 Jan 2019 13:15:46 GMT):
query object

VadimInshakov (Mon, 28 Jan 2019 13:25:18 GMT):
Can't instantiate chaincode: https://chat.hyperledger.org/channel/fabric-sdk-node?msg=L9gpgFSqufom7x5YN Peer logs on the image below

VadimInshakov (Mon, 28 Jan 2019 13:25:37 GMT):

instantiate.png

rthatcher (Mon, 28 Jan 2019 14:58:31 GMT):
@VadimInshakov - the error says that the chaincode with that specific name and version cannot be found on that peer - you can check the success of the 'install' command by connecting to the peer and checking the folder: ```docker exec -it mypeer1.myorg.sample.com /bin/bash ls /var/hyperledger/production/chaincodes exit ``` Do you have more than one peer in your network/org? Are you installing to all peers? Are the environment variables for CORE_PEER_ADDRESS, CORE_PEER_LOCALMSPID, and CORE_PEER_MSPCONFIGPATH correctly set before you run the 'instantiate' command

nfrunza (Mon, 28 Jan 2019 15:11:23 GMT):
@dave.enyeart , Hi David, Can some one work on https://jira.hyperledger.org/browse/FABN-965

dave.enyeart (Mon, 28 Jan 2019 16:33:12 GMT):
@nfrunza I commented in the Jira

sgaddam (Mon, 28 Jan 2019 17:20:55 GMT):
Has joined the channel.

sgaddam (Mon, 28 Jan 2019 17:24:48 GMT):
I am getting the error below while trying to register the user using the node client NO_REGISTRARCONFIG: Registrar config missing from connection profile

nfrunza (Mon, 28 Jan 2019 17:42:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=TYzvnML4YkLu67PTB) @dave.enyeart thank you

bretharrison (Mon, 28 Jan 2019 18:10:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=s42pEfjfEvh4NseYs) @davidkhala member_only_read will be in NodeSDK 1.4.1, member_only_read and member_only_write will be in NodeSDK 2.0.0

bretharrison (Mon, 28 Jan 2019 19:26:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=K2HtZMw9PJC9rGdXb) @davidkhala fabric currently does not return the return value from the `Init` func, for example if your chaincode did something like the following in the initial code, it would not be accessable from the client NodeSDK `return shim.Success(value) //value is lost`

bretharrison (Mon, 28 Jan 2019 19:33:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LFxHceTnFtyktq5eK) @tzejan we did not start publishing with the version numbers until 1.3 to get the 1.2, pull down from git hub, run npm install in the top level directory, then run `gulp doc`, you will see a populated `docs` directory with all the htmls as you would see on the online docs. https://github.com/hyperledger/fabric-sdk-node/tree/release-1.2

tzejan (Tue, 29 Jan 2019 00:41:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qzy8jRy7JrpBuKhRj) @bretharrison Thank you!

VadimInshakov (Tue, 29 Jan 2019 06:42:37 GMT):
Authorization failure

VadimInshakov (Tue, 29 Jan 2019 07:19:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=p8EKZMyTN5hGfBrRm) @deepaks I deleted all crypto material from `/root/test/hfc-key-store`, put in directory cert and keys of org admin user, then enrolled admin, then I try to register user and get this error: ``` Failed to register: Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]] Authorization failures may be caused by having admin credentials from a previous CA instance. Try again after deleting the contents of the store directory /root/test/hfc-key-store ``` What's wrong?

VadimInshakov (Tue, 29 Jan 2019 07:19:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=p8EKZMyTN5hGfBrRm) @deepaks I deleted all crypto material from `/root/test/hfc-key-store`, then enrolled admin (now in `/root/test/hfc-key-store` I have admin crypto again), then I try to register user and get this error: ``` Failed to register: Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]] Authorization failures may be caused by having admin credentials from a previous CA instance. Try again after deleting the contents of the store directory /root/test/hfc-key-store ``` What's wrong?

AsifJaved (Tue, 29 Jan 2019 07:44:06 GMT):
hi,everyone How login and signup is done using fabric API in node.js ???????

VadimInshakov (Tue, 29 Jan 2019 07:49:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xRdhLMMoWWKjSeB8X) @AsifJaved the only authorization required by default in fabric is CA server authorization. see `fabcar` example in fabric samples.

schadokar (Tue, 29 Jan 2019 14:01:28 GMT):
Hi everyone, I am getting this error while starting node chaincode in network. *"DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead"* Do anyone know about this? link: https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4ade.html#terminal-2-build-start-the-chaincode

GuillaumeCisco (Wed, 30 Jan 2019 10:18:54 GMT):
Has joined the channel.

GuillaumeCisco (Wed, 30 Jan 2019 10:21:08 GMT):
Hey there, Just fetched the project and ran `npm install`, I got errors with: ``` make: Leaving directory '/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:188:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12) gyp ERR! System Linux 4.15.0-43-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc" "--napi_version=3" "--node_abi_napi=napi" gyp ERR! cwd /home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc gyp ERR! node -v v11.6.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc --napi_version=3 --node_abi_napi=napi' (1) node-pre-gyp ERR! stack at ChildProcess. (/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:188:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5) node-pre-gyp ERR! System Linux 4.15.0-43-generic node-pre-gyp ERR! command "/usr/local/bin/node" "/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library" node-pre-gyp ERR! cwd /home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc node-pre-gyp ERR! node -v v11.6.0 node-pre-gyp ERR! node-pre-gyp -v v0.10.3 node-pre-gyp ERR! not ok Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc --napi_version=3 --node_abi_napi=napi' (1) ../deps/grpc/src/core/lib/channel/channelz_registry.cc:60:1: fatal error: opening dependency file ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channelz_registry.o.d.raw: No such file or directory compilation terminated. grpc.target.mk:464: recipe for target 'Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channelz_registry.o' failed make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channelz_registry.o] Error 1 make: Leaving directory '/home/guillaume/Projects/fabric/fabric-sdk-node/node_modules/grpc/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:188:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12) gyp ERR! System Linux 4.15.0-43-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/guillaume/Projects/fabric/fabric-sdk- ``` Any ideas?

GuillaumeCisco (Wed, 30 Jan 2019 10:26:47 GMT):
By the way I've just made a PR for fixing an issue with identity update: https://gerrit.hyperledger.org/r/#/c/29023/

knagware9 (Wed, 30 Jan 2019 11:07:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cnFRS2y64RTdvYLoi) @schadokar This is just GRPC warning ,, your application will run perfectly

vieiramanoel (Wed, 30 Jan 2019 16:31:03 GMT):
https://gerrit.hyperledger.org/r/#/c/29043/ please reviw

vieiramanoel (Wed, 30 Jan 2019 16:31:03 GMT):
https://gerrit.hyperledger.org/r/#/c/29043/ please review

HLFPOC (Wed, 30 Jan 2019 18:19:45 GMT):
Has joined the channel.

HLFPOC (Wed, 30 Jan 2019 18:22:29 GMT):
Is there any tutorial on generating crypto material for the organizations present in the network using fabric-sdk ? I used to do this using cryptogen , but now wanted to use fabric-ca for this purpose. can anyone of you kindly guide me oon this ?

nfrunza (Wed, 30 Jan 2019 19:20:34 GMT):
Wllet

ShrutiHK (Thu, 31 Jan 2019 02:55:37 GMT):
Has joined the channel.

ShrutiHK (Thu, 31 Jan 2019 03:13:16 GMT):
Hi,

ShrutiHK (Thu, 31 Jan 2019 03:20:51 GMT):
Hi, I am trying to setup a fabric network with 2 Orgs with 2 peers each. I am following the BYFN tutorial for fabric1.4. It says, that to work with node-sdk, we have to use the docker-compose-e2e.yaml file to bring the network up. I have replaced the keys in the docker-compose-e2e.yaml file with the generated ca keys for the orgs. Have enabled the TLS connection. Once the network is up, I am trying to create a channel, but channel creation fails with the following error - 'Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded' I would like to know what I am doing wrong, and how to setup a multi-org dockerized network on fabric from scratch for node-sdk? Any help is appreciated.

DavorKljajic (Thu, 31 Jan 2019 08:06:34 GMT):
I have question can we use features private data and encryption in the same NodeJs chaincode ?

kYem 1 (Thu, 31 Jan 2019 11:26:57 GMT):
Has joined the channel.

ShrutiHK (Thu, 31 Jan 2019 11:55:16 GMT):
endorsement policy while instantiation

dave.enyeart (Thu, 31 Jan 2019 12:41:26 GMT):
@DavorKljajic Yes you can... the data contract is entirely up to your chaincode. You'd have to import your own libraries for encryption. Go chaincode shim has some convenience methods for encryption but node.js shim does not.

dave.enyeart (Thu, 31 Jan 2019 12:41:47 GMT):
That being said, most people do one or the other.

dave.enyeart (Thu, 31 Jan 2019 12:43:18 GMT):
Some more info at https://hyperledger-fabric.readthedocs.io/en/latest/Fabric-FAQ.html#security-access-control

vieiramanoel (Thu, 31 Jan 2019 12:47:18 GMT):
@GuillaumeCisco the problem is your node version

vieiramanoel (Thu, 31 Jan 2019 12:47:25 GMT):
please downgrade to carbon

vieiramanoel (Thu, 31 Jan 2019 12:48:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ikyQQWGSMqnTHBc5q) this PR is quite simple, any dev can check it pleas

vieiramanoel (Thu, 31 Jan 2019 12:48:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ikyQQWGSMqnTHBc5q) this PR is quite simple, any dev can check it please

vieiramanoel (Thu, 31 Jan 2019 12:48:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ikyQQWGSMqnTHBc5q) this PR is quite simple, some dev can check it please

GuillaumeCisco (Thu, 31 Jan 2019 12:51:15 GMT):
Thansk you @vieiramanoel , what is carbon?

GuillaumeCisco (Thu, 31 Jan 2019 12:51:15 GMT):
Thanks you @vieiramanoel , what is carbon?

vieiramanoel (Thu, 31 Jan 2019 13:43:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QK6NpWYrPwh9pxoqf) @GuillaumeCisco is the name for node version 8, you are using node 11

GuillaumeCisco (Thu, 31 Jan 2019 13:48:40 GMT):
Thanks

akshay.sood (Thu, 31 Jan 2019 16:24:15 GMT):
a csr

akshay.sood (Thu, 31 Jan 2019 16:29:26 GMT):
Hi guys

akshay.sood (Thu, 31 Jan 2019 16:29:40 GMT):
anyone know how to enroll user with csr?

akshay.sood (Thu, 31 Jan 2019 16:29:44 GMT):
in fabric node sdk?

akshay.sood (Thu, 31 Jan 2019 16:30:27 GMT):
I am using this code ```const enrollment = await ca.enroll({ enrollmentID: 'akshay', enrollmentSecret: 'password', csr: "----BEGIN CERTIFICATE REQUEST----- MIIC9DCCAdwCAQAwga4xCzAJBgNVBAYTAkdCMREwDwYDVQQIDAhTb21lcnNldDEU MBIGA1UEBwwLR2xhc3RvbmJ1cnkxHzAdBgNVBAoMFlRoZSBCcmFpbiBSb29tIExp bWl0ZWQxHzAdBgNVBAsMFlBIUCBEb2N1bWVudGF0aW9uIFRlYW0xFDASBgNVBAMM C1dleiBGdXJsb25nMR4wHAYJKoZIhvcNAQkBFg93ZXpAZXhhbXBsZS5jb20wggEi MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2RaaZer2NQEKlbLGgwVUs28iE xP91E1PREwp2ejOepOOAysUEov+d54EGQGlY0cwwNE+/MRGvzS5nRpE6+Fdd/9Dy /eT9mNG1fNJo+nAGcuGXhw39s7jwg5D8SVRmhnnvp+enxhfkPN8B4q4MKuz8cOOj M3E1mvxcjcTMfWgUBJXRJ135VyFKylZrTKdOTmWAi7Wab0xEmZnYINe2GBC6jLnm b/KAsJf15eLyEoRJ/jreXAtUlnlzUvwLBueAPNpInCdlV/cpbCX7D/qcume6nBbg r7oTockFxD0ovNTSdG3gmd8f+HnRsZmNXugAE7N2AANkThh3L6EWe3qrNAupAgMB AAGgADANBgkqhkiG9w0BAQUFAAOCAQEAdQgo8wlZqqyDCRnn5eMgrIuba/3u2e1g sPSQCnLgK3VfjMEEDeiZXMEXNdoRlPa5X2FEfysdnnzgjFYWcUMHH8yl79x8x9hi jB6ZGAJ0YBqfau+N8ekpaACnCCy958vz5w/3QjL0EGs+lbU8dJRW4Ba1xBHq4cZl f/54+yKNkT/lFN+I41mSy7dk7f6UHcrmBQrUNT1+4vtBlnTqiFLFqKbnJZI0mLt6 FlOT1nz03KlSNWZIpEgLbBb7JC3HfOUDl73J5KOa/fOUYI3eo/gd+2/aftrybAX5 FcDzxM2XRGXJAwwa3/cLoGodLaaBuSPaAYMGxV7qeFkNoC4X4T5HjQ== -----END CERTIFICATE REQUEST-----"})```

akshay.sood (Thu, 31 Jan 2019 16:30:40 GMT):
The user 'akshay' is not registered

akshay.sood (Thu, 31 Jan 2019 16:30:51 GMT):
Do I need t register it first even if I provide a csr?

GuillaumeCisco (Thu, 31 Jan 2019 16:45:16 GMT):
yes

tzejan (Fri, 01 Feb 2019 00:15:26 GMT):
Hi, I am loading my network config via connection profiles, if my connection profile is outdated, and the `client.queryChannels()` is returning me new channel names which are different from `client.getChannel()` How can I get a channel object this new channel?

tzejan (Fri, 01 Feb 2019 00:15:26 GMT):
Hi, I am loading my network config via connection profiles, if my connection profile is outdated, and the `client.queryChannels()` is returning me new channel names which are different from `client.getChannel()` How can I get a channel object about the new channel?

akshay.sood (Fri, 01 Feb 2019 03:54:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KYWKWfRCDJmssFKPg) @skarim

vieiramanoel (Fri, 01 Feb 2019 17:33:03 GMT):
@akshay.sood https://fabric-sdk-node.github.io/release-1.4/FabricCAClient.html#enroll

Antimttr (Fri, 01 Feb 2019 22:19:43 GMT):
Has joined the channel.

Antimttr (Fri, 01 Feb 2019 22:20:27 GMT):
anyone in here familiar with the balance-transfer and comercial paper examples?

Antimttr (Fri, 01 Feb 2019 22:21:20 GMT):
i'm attempting to use the fabric-client api in the comercial paper example. but unable to get the Client object to be valid

Antimttr (Fri, 01 Feb 2019 22:22:34 GMT):
is the "user" in the context of fabric-client the same as an 'identity' in the context of the fabric-network ?

Antimttr (Fri, 01 Feb 2019 22:25:33 GMT):
specifically, would a username in the context of comercial paper, calling client.getUserContext(username, true); for the org magnetocorpMSP, be User1@org1.example.com or would it be isabella?

pasimoes (Sat, 02 Feb 2019 01:01:02 GMT):
Has joined the channel.

HLFPOC (Sat, 02 Feb 2019 05:22:02 GMT):
Hello Everyone, I have done the network setup and have generated crypto material (of peers,orderer) using fabric-ca. My question is , how to enroll the peer users which will do the transactions (read/write the ledger). I want to do this using fabric-ca node sdk. I followed "balance-transfer" app, but in that, they have mentioned the key store path and credentials get saved into project directory. How can i store all my user credentials also inside the docker containers of respective peers? Any idea/reference about this ?

akshay.sood (Sat, 02 Feb 2019 13:49:03 GMT):
Hi guys.. I am getting the following error when enrolling a user: ```2019-02-02T13:47:50.803Z - error: [FabricCAClientService.js]: Failed to enroll akshay2, error:%o message=Enrollment failed with errors [[{"code":0,"message":"{\"code\":9002,\"message\":\"CSR Decode failed\"}"}]], stack=Error: Enrollment failed with errors [[{"code":0,"message":"{\"code\":9002,\"message\":\"CSR Decode failed\"}"}]] at IncomingMessage.response.on (/Users/akshaysood/Blockchain/public-private-hyperledger/public/sdk/node_modules/fabric-ca-client/lib/FabricCAClient.js:470:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) Error: Enrollment failed with errors [[{"code":0,"message":"{\"code\":9002,\"message\":\"CSR Decode failed\"}"}]] at IncomingMessage.response.on (/Users/akshaysood/Blockchain/public-private-hyperledger/public/sdk/node_modules/fabric-ca-client/lib/FabricCAClient.js:470:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)``` I am running the following function: ```const enrollment = await ca.enroll({ enrollmentID: username, enrollmentSecret: password, csr: "-----BEGIN CERTIFICATE REQUEST----- MIICpzCCAY8CAQAwYjELMAkGA1UEBhMCSU4xFDASBgNVBAMMC2V4YW1wbGUuY29t MQ8wDQYDVQQHDAZNb2hhbGkxDjAMBgNVBAoMBURlYnV0MQ8wDQYDVQQIDAZQdWJq YWIxCzAJBgNVBAsMAklUMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA wuLapsnAWQsFfE0gv5f7MH3ofF1Nrj+Wq0LLHxYeJmVzW00hGiV3KmzO5GnIsXEQ U97cI4ZglerMnGUCO0cGyu3QK1h1rh0/rmF2pKMzP0K3njRllM6Agskoz4Alx692 u9oC0tots8wQSZeYuBA88LDjB9Wdlp+H7mWm96g3kbjWkadUqGYa+HX69eKXMxLy K+Et+q6iH1ytUTMjNUajZ6MMQ4rYlGidkhsaxcM0Frhcfl62aj+MoPCwNrWnGhM1 /YrwqttZQkXXJcJyRMR6BwUIse4odBvG5/WdcyTN83Z/YGUi5nns89WisXooJvK4 C5gTBAqCBiN7v6jxxw8NDwIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAI1/QyU3 5i8W2D+xNpqInVhwphT8OhjO9lPMPLgpgT5EdP62Rcawe1NoVkXEBdF2Twq5cqvH W+ZILxIQ/ABRSU0njocadb2O2lSufj9Jqy0aHPyo285YWzk7gP7YZqX9I9VHXDVs Mq2k27goBpEVfqS2MngOVoPYyKCu4VtL7Jy5rUUCGHkVEWf7C2L6ChRn52m49U1F 3rUrYLH+kciwyo6MWflWvVyoK08cWFEA7FGQKtRj+2NThxgwIRfW9yWPvTK213ev 5FVkObhzKdKo57bXTiW1Ja2MGExLH8pJqomEWMy7dbOGChDHUYvQggBcfasSeKVF Npw6dg+YAocWtxg= -----END CERTIFICATE REQUEST-----" })```

Legiit (Mon, 04 Feb 2019 07:43:10 GMT):
Hey guys! How can we prevent the need for the crypto-config folder to be present for the fabric-client SDK and instead go through the fabric-ca for these certs? I can assume we don't want all certificates in 1 place on the server

Legiit (Mon, 04 Feb 2019 13:21:41 GMT):
If we wait for the eventhub, it takes 25 minutes to do 500 transactions - are there any optimizations there could be done? Ofc we'd need to know wether if failed or not from the eventHub

mahoney1 (Mon, 04 Feb 2019 15:24:16 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

vieiramanoel (Mon, 04 Feb 2019 15:40:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ikyQQWGSMqnTHBc5q) up

Antimttr (Mon, 04 Feb 2019 16:50:12 GMT):
are there any examples of using both the fabric-client and fabric-network apis in the same app?

Antimttr (Mon, 04 Feb 2019 16:50:26 GMT):
i couldnt find anything in the main repo examples

Antimttr (Mon, 04 Feb 2019 16:58:30 GMT):
it seems like with balance-transfer the entire api is setup for configuring hyperledger fabric stuff, like channels and adding users and such

Antimttr (Mon, 04 Feb 2019 16:58:53 GMT):
but there's nothing there for actualy performing balance transfers, or like checking your balance

Antimttr (Mon, 04 Feb 2019 16:58:56 GMT):
maybe im wrong

Antimttr (Mon, 04 Feb 2019 17:02:02 GMT):
like they have a way "Query Transaction by TransactionID" to query transactions

Antimttr (Mon, 04 Feb 2019 17:02:17 GMT):
but there's no way to actually create a transaction

Antimttr (Mon, 04 Feb 2019 17:07:05 GMT):
ok i think i found it

Antimttr (Mon, 04 Feb 2019 17:07:10 GMT):
transaction invoker

HLFPOC (Mon, 04 Feb 2019 19:23:42 GMT):
Hi Team, I am trying to enroll user (using fabric-ca node sdk) and want to save in my cloudant db, however I am getting the below error on returning FabricCAServices object, once the connection is established between the cloudant db: Error: Invalid connection options. Protocol must be set to 'http' or 'https'. My ca is running at : https://localhost:7054. Any idea ablout this error ?

HLFPOC (Mon, 04 Feb 2019 19:23:42 GMT):
Hi Team, I am trying to enroll user (using fabric-ca node sdk) and want to save in my cloudant db, however I am getting the below error on returning FabricCAClient object, once the connection is established between the cloudant db: Error: Invalid connection options. Protocol must be set to 'http' or 'https'. My ca is running at : https://localhost:7054. Any idea ablout this error ?

HLFPOC (Mon, 04 Feb 2019 19:23:42 GMT):
Hi Team, I am trying to enroll user (using fabric-ca node sdk) and want to save in my cloudant db, however I am getting the below error on returning FabricCAClient object, once the connection is established between the cloudant db: Error: Invalid connection options. Protocol must be set to 'http' or 'https'. My ca is running at : https://localhost:7054. Any idea about this error ?

vieiramanoel (Mon, 04 Feb 2019 21:23:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=N5DNnwZbvNTMgKb8L) @HLFPOC you need to configure fabric-ca properly, please search for help in #fabric-ca

Antimttr (Mon, 04 Feb 2019 21:41:32 GMT):
do you know @vieiramanoel if the chaincode and contract interfaces of the node Contract and Shim sdk can be used simultaneously

Antimttr (Mon, 04 Feb 2019 21:41:39 GMT):
or are you just supposed to use one or the other?

Antimttr (Mon, 04 Feb 2019 21:41:59 GMT):
seems like balance-transfer uses just the Chaincode interface and not the contract interface since it doesnt actualy use any smartcontracts

Antimttr (Mon, 04 Feb 2019 21:42:07 GMT):
or am i incorrect?

Antimttr (Mon, 04 Feb 2019 21:53:29 GMT):
`The fabric-contract-api provides the contract interface. a high level API for application developers to implement Smart Contracts. Within Hyperledger Fabric, Smart Contracts are also known as Chaincode. Working with this API provides a high level entry point to writing business logic. The fabric-shim provides the chaincode interface, a lower level API for implementing "Smart Contracts". It also provides the implementation to support communication with Hyperledger Fabric peers for Smart Contracts written using the fabric-contract-api together with the fabric-chaincode-node cli to launch Chaincode or Smart Contracts.`

Antimttr (Mon, 04 Feb 2019 21:53:41 GMT):
ok so it sounds like one is just the extension of the other

Antimttr (Mon, 04 Feb 2019 21:53:50 GMT):
so i pick one or the other

Antimttr (Mon, 04 Feb 2019 22:28:52 GMT):
do any examples exist of implementing a full contract with the fabric-shim interface?

Antimttr (Mon, 04 Feb 2019 22:35:11 GMT):
i think i found one here: https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/marbles02/node/marbles_chaincode.js

Antimttr (Mon, 04 Feb 2019 22:48:24 GMT):
this marble example is great! :upside_down:

HLFPOC (Tue, 05 Feb 2019 04:38:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dm8NnCcygLnZ4ww4y) @vieiramanoel I guess fabric-ca server is configured properly as it successfully enrolls and register new user whenever I use default file system based key store.

Legiit (Tue, 05 Feb 2019 09:27:08 GMT):
how do we generate the `certPem --> ` for the offline signing example? Can we generate this outside of the fabric-sdk-node?

rthatcher (Tue, 05 Feb 2019 10:06:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bJr9EiQfRbSxrcSWX) @Antimttr Answered similar thread in the #fabric-chaincode-dev channel

bestbeforetoday (Tue, 05 Feb 2019 10:32:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zYtsJtG8KhvoBoXRQ) @Antimttr I'm not aware of any (although they might exist). The two APIs are interchangeable: _fabric-network_ is a layer on top of the lower level _fabric-client_ API. _fabric-network_ requires you to write a lot less code and should be suitable for most scenarios involving transaction invocation or evaluation (query). _fabric-client_ lets you get into the nuts and bolts if you need a lot of control of what is going on. You can mix-and-match within your application code by creating a _fabric-network_ *Gateway* object from an existing _fabric-client_ *Client* object, or drop down from a *Gateway* object to the *Client* with `Gateway.getClient()`

bestbeforetoday (Tue, 05 Feb 2019 10:42:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xzgqe2nkA7KwJ8dTt) @Legiit If your transactions don't touch the same data then sending multiple in parallel might get you a good improvement. If you do need to send them serially then you could change which (or how many) peers you wait to get a transaction commit event from. If you're using the _fabric-network_ API then picking a different `eventHandlerOptions.strategy` value when connecting the Gateway might help. The extreme end of this might be to not wait for commit events after sending the transaction to the orderer (a `null` strategy), and do the waiting for commit events (and recovery from any errors) separately from calls to `Contract.sendTransaction()` / `Contract.evaluateTransaction()`

Legiit (Tue, 05 Feb 2019 10:59:45 GMT):
Thanks! - btw, https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-ca-client/lib/FabricCAClient.js#L17 This file does note exist

Legiit (Tue, 05 Feb 2019 10:59:45 GMT):
Thanks! - btw, random side note https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-ca-client/lib/FabricCAClient.js#L17 This file does note exist

Legiit (Tue, 05 Feb 2019 11:05:48 GMT):
Anyways, coming back to my 2nd question how can we generate the PEM for offline signing without use of the fabric-sdk-node We're trying to have the creation of certs/keys and the signing part in the frontend, while handling the creation of the unsignedTx and sending it off in the backend

Legiit (Tue, 05 Feb 2019 11:06:23 GMT):
It doesn't seem possible to enroll an user and get the PEM certs in the frontend

schadokar (Tue, 05 Feb 2019 14:38:11 GMT):
how to connect identity with fabric-client instance?

Antimttr (Tue, 05 Feb 2019 15:51:23 GMT):
@bestbeforetoday thanks for the response! basically im looking for CRUD abilities right now for my POC, fabric-network seems great for creating contracts. But i wasnt able to find good examples of listing/querying transactions through it. Atleast in the smart paper contract. I've been advised to check out the fabcar old vs new examples so i'll take a look at those next.

Antimttr (Tue, 05 Feb 2019 15:51:53 GMT):
really the best example ive seen so far is the marble one, has everything (and pagination!)

Antimttr (Tue, 05 Feb 2019 15:52:25 GMT):
although thats just the chaincode not the full thing, but i think i've got enough of an understanding to integrate it with an REST example like balalnce-transfer

httran88 (Wed, 06 Feb 2019 05:20:18 GMT):
Hello, i need to fill a position for a hyperledger developer please dm me if your interested, in the states must relocate to NC

abityildiz (Wed, 06 Feb 2019 08:54:01 GMT):

Clipboard - February 6, 2019 11:52 AM

vieiramanoel (Wed, 06 Feb 2019 12:13:54 GMT):
https://gerrit.hyperledger.org/r/#/c/29043/ please review last time i'll up this PR. There are some changes that I would submit but I feel completly disencouraged to contribute if any of you guys don't give a feedback even to ridiculous simple commits like this

vieiramanoel (Wed, 06 Feb 2019 12:14:20 GMT):
I other channels I'd mention devs, but in this one I don't even know who they are

vieiramanoel (Wed, 06 Feb 2019 12:14:20 GMT):
In other channels I'd mention devs, but in this one I don't even know who they are

bestbeforetoday (Wed, 06 Feb 2019 13:17:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ewnTZc5HkwAKM5BNZ) @vieiramanoel Not sure if it's completely up-to-date but... https://github.com/hyperledger/fabric-sdk-node/blob/master/MAINTAINERS.rst

vieiramanoel (Wed, 06 Feb 2019 13:17:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xfj9m3gbv2fAN5QW2) @bestbeforetoday glad smith is on the list, thank u

vieiramanoel (Wed, 06 Feb 2019 13:18:15 GMT):
@smithbk, take a look at this please

bestbeforetoday (Wed, 06 Feb 2019 13:27:37 GMT):
@vieiramanoel You could make the accompanying change to the _ConnectionOpts_ JSDoc in Client.js too. That still reads string as the type.

vieiramanoel (Wed, 06 Feb 2019 13:29:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gXk47hroHk24dQqBj) @bestbeforetoday okok, i'll change this

nasht00 (Wed, 06 Feb 2019 13:53:01 GMT):
Has joined the channel.

Legiit (Wed, 06 Feb 2019 13:53:32 GMT):
Hey guys Using the code ``` secret = await fabricCaClient .register( { role: user.role, enrollmentID: user.username, affiliation: user.affiliation, attrs: [ { name: "ID", value: user.id, ecert: true } ] }, app.getAdminUser() ) .catch(err => Promise.reject(new Error(`Failed to register: ${err}`))); ``` This piece of code crashes with the following error message: {"title":"Failed to register: Error: Calling register endpoint failed, CONNECTION Timeout"} when we are testing performance and throwing in 200+ requests to register/enroll an user and invoke chaincode with the newly created user Does anyone have a suggestion to resolve this issue?

Legiit (Wed, 06 Feb 2019 13:53:32 GMT):
Hey guys Using the code ``` secret = await fabricCaClient .register( { role: user.role, enrollmentID: user.username, affiliation: user.affiliation, attrs: [ { name: "ID", value: user.id, ecert: true } ] }, app.getAdminUser() ) .catch(err => Promise.reject(new Error(`Failed to register: ${err}`))); ``` This piece of code crashes with the following error message: {"title":"Failed to register: Error: Calling register endpoint failed, CONNECTION Timeout"} when we are testing performance and throwing in 200+ requests to register/enroll an user and invoke chaincode with the newly created user Does anyone have a suggestion to resolve this issue? The problem is that we're doing it async and thus the connection requests build up, up until the point it takes too long and we get a timeout

nasht00 (Wed, 06 Feb 2019 13:54:06 GMT):
In the Fabric docs, pre-requesites: > If you will be developing applications for Hyperledger Fabric leveraging the Hyperledger Fabric SDK for Node.js, you will need to have version 8.9.x of Node.js installed. I get confused between the nodejs chaincode, and the nodejs client. Does this apply to one, the other, both? I want to use Node 11 in the client side...

WouterVanHecke (Wed, 06 Feb 2019 14:19:02 GMT):
I'm trying to generate an unsigned transaction. But there is something wrong with my buffer I'm getting the following error: ```Unhandled rejection TypeError: chaincodeProposal.getHeader is not a function``` ``` { proposalResponses: [ { version: 1, timestamp: null, response: [Object], payload: , endorsement: [Object], peer: [Object] } ], proposal: { header: { buffer: [Object], offset: 0, markedOffset: -1, limit: 1159, littleEndian: false, noAssert: false }, payload: { buffer: [Object], offset: 0, markedOffset: -1, limit: 97, littleEndian: false, noAssert: false }, extension: { buffer: [Object], offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } } } ```

WouterVanHecke (Wed, 06 Feb 2019 14:19:02 GMT):
I'm trying to generate an unsigned transaction. But there is something wrong with my buffer I'm getting the following error: ``` Unhandled rejection TypeError: chaincodeProposal.getHeader is not a function ``` ``` { proposalResponses: [ { version: 1, timestamp: null, response: [Object], payload: , endorsement: [Object], peer: [Object] } ], proposal: { header: { buffer: [Object], offset: 0, markedOffset: -1, limit: 1159, littleEndian: false, noAssert: false }, payload: { buffer: [Object], offset: 0, markedOffset: -1, limit: 97, littleEndian: false, noAssert: false }, extension: { buffer: [Object], offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } } } ```

vieiramanoel (Wed, 06 Feb 2019 14:25:38 GMT):
@smithbk @bestbeforetoday I've made suggested changes

vieiramanoel (Wed, 06 Feb 2019 14:25:49 GMT):
https://gerrit.hyperledger.org/r/#/c/29043/

vieiramanoel (Wed, 06 Feb 2019 14:34:04 GMT):
I do think (and hope) that types is generated automatically

vieiramanoel (Wed, 06 Feb 2019 14:34:17 GMT):
so, I've changed only Client;js

vieiramanoel (Wed, 06 Feb 2019 14:34:17 GMT):
so, I've changed only Client.js JSDoc

bestbeforetoday (Wed, 06 Feb 2019 14:34:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dQxhx6bFv38M2aCAQ) @nasht00 I think it applies to both. There certainly was a compatability problem with Node 11 -- possibly the library used for x509 certificates; I forget. I'm not sure a fix for that has made it to a release version of Fabric, so Node 8.x may be the only option for Fabric 1.4 right now

smithbk (Wed, 06 Feb 2019 14:35:21 GMT):
@vieiramanoel I am not sure if index.d.ts is automatically generated or not by tsc. I was asking the question. I see that @zhaochy created the index.d.ts file, so we should get an answer from him/her

bestbeforetoday (Wed, 06 Feb 2019 14:35:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3gmwzKzHFGm8uCfDK) @vieiramanoel I wish that was true. Unfortunately the TypeScript definitions are hand-crafted so you'll need to change both the JSDoc and the TS definitions :(

vieiramanoel (Wed, 06 Feb 2019 14:37:05 GMT):
Ok! After lunch I'll do this

bretharrison (Wed, 06 Feb 2019 14:56:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Xa4btmbpBohnyZfuR) @tzejan ``` const channel = client.newChannel('new name'); await channel.initialize({discovery: true, target: peer}); ```

vieiramanoel (Wed, 06 Feb 2019 15:35:21 GMT):
done, @bestbeforetoday @smithbk. Just waitin for jobbuilder finish build

vieiramanoel (Wed, 06 Feb 2019 15:35:21 GMT):
done, @bestbeforetoday @smithbk. Just waitin for jobbuilder to finish build

vieiramanoel (Wed, 06 Feb 2019 15:35:21 GMT):
done, @bestbeforetoday @smithbk Just waitin for jobbuilder to finish build

vieiramanoel (Wed, 06 Feb 2019 16:29:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qaKEm6bjj4eKdk3AT) @bestbeforetoday jekins is failing with error ```Trace: Error: Command "buld" not found. Did you mean "build"? at new MessageError (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:186:110) at /Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:87307:17 at Generator.next () at step (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:98:30) at /Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:116:14 at new Promise () at new F (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:23451:28) at /Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:95:12 at runCommand (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:87312:22) at Object. (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:87412:14)```

vieiramanoel (Wed, 06 Feb 2019 16:30:05 GMT):
this is not a problem caused by my commit

vieiramanoel (Wed, 06 Feb 2019 16:30:10 GMT):
can anyone check this?

bestbeforetoday (Wed, 06 Feb 2019 16:51:19 GMT):
The Z build really doesn't look happy. I'm not sure why. Perhaps a maintainer will be happy to merge regardless since your change is building on x86 OK. I see this unit test failure in the Z build log: ```/w/workspace/fabric-sdk-node-verify-s390x/gopath/src/github.com/hyperledger/fabric-sdk-node/fabric-common/test/Identity.js:5 */const{CryptoSuite,Identity,Key}=(cov_3l5v5kdc7.s[0]++,require('..'));const fabprotos=(cov_3l5v5kdc7.s[1]++,require('fabric-protos'));const fs=(cov_3l5v5kdc7.s[2]++,require('fs'));const path=(cov_3l5v5kdc7.s[3]++,require('path'));const chai=(cov_3l5v5kdc7.s[4]++,require('chai'));const chaiAsPromised=(cov_3l5v5kdc7.s[5]++,require('chai-as-promised'));const sinonChai=(cov_3l5v5kdc7.s[6]++,require('sinon-chai'));cov_3l5v5kdc7.s[7]++;chai.should();cov_3l5v5kdc7.s[8]++;chai.use(chaiAsPromised);cov_3l5v5kdc7.s[9]++;chai.use(sinonChai);const sinon=(cov_3l5v5kdc7.s[10]++,require('sinon'));const certificateAsPEM=(cov_3l5v5kdc7.s[11]++,fs.readFileSync(path.join(__dirname,'data','cert.pem')));const certificateAsBuffer=(cov_3l5v5kdc7.s[12]++,Buffer.from(certificateAsPEM));const certificateAsHex=(cov_3l5v5kdc7.s[13]++,certificateAsBuffer.toString('hex'));const mspId=(cov_3l5v5kdc7.s[14]++,'Org1M SyntaxError: Unexpected token ( at exports.runInThisContext (vm.js:76:16) ```

plato (Wed, 06 Feb 2019 18:28:01 GMT):
@dave.enyeart I tried to get all channel peers which they already joint to the channel by this command (channel.getPeers() ) in nodeJs app but unfortunately it returned only 4 peers of 12 peers (all of them joined properly ) , do you have any idea why? btw, I have manually added them to the channel (channel.addPeer(client.getPeer("peer0.org4")), ... ) then called sendTransactionProposal and it return singed proposal for all 12 peers just wondering why that method did not work perfectly

plato (Wed, 06 Feb 2019 18:28:01 GMT):
I tried to get all channel peers which they already joint to the channel by this command (channel.getPeers() ) in nodeJs app but unfortunately it returned only 4 peers of 12 peers (all of them joined properly ) , do you have any idea why? btw, I have manually added them to the channel (channel.addPeer(client.getPeer("peer0.org4")), ... ) then called sendTransactionProposal and it return singed proposal for all 12 peers just wondering why that method did not work perfectly

plato (Wed, 06 Feb 2019 18:28:01 GMT):
@dave.enyeart I tried to get all channel peers which they already joint to the channel by this command (channel.getPeers() ) in nodeJs app but unfortunately it returned only 4 peers of 12 peers (all of them joined properly ) , do you have any idea why? btw, I have manually added them to the channel (channel.addPeer(client.getPeer("peer0.org4")), ... ) then called sendTransactionProposal and it return singed proposal for all 12 peers just wondering why that method did not work perfectly

HLFPOC (Wed, 06 Feb 2019 18:31:05 GMT):
Is there any way/solution to avoid phantom reads on query result ? I am facing this issue while adding a txn into the ledger. But before adding, I am reading some value from query result of another asset and there can be chances that 2nd asset can get updated/modified in case of concurrent transactions. Can anyone help to avoid this issue ?

dave.enyeart (Wed, 06 Feb 2019 20:02:52 GMT):
@HLFPOC I assume you would want the transaction invalidated if the data the transaction is based on has changed, otherwise you could have data integrity issues. If you don't care about that, then you could split the query and update into two different transactions. Or use a range query in the first transaction and a keyed query in the second transaction. Another common pattern is to use separate key/values for different parts of the data, such that one part of the data can update frequently while another part of the data can be read frequently without collisions.

MHBauer (Wed, 06 Feb 2019 22:36:07 GMT):
Has joined the channel.

tzejan (Thu, 07 Feb 2019 02:00:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2bdcjHMKY3ZWYXgJaN) @vieiramanoel Thank you!

tzejan (Thu, 07 Feb 2019 02:01:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WXfipabM4YxperNKf) @bretharrison Thank you!

NavaL3 (Thu, 07 Feb 2019 05:05:03 GMT):
Has joined the channel.

NavaL3 (Thu, 07 Feb 2019 05:05:34 GMT):
Hello team, I am implementing the blockchain-middleware nodejs SDK on ubuntu 18.04 I am getting the problem while joining the channel with peer... please find out the screenshot for more detail..... Seeking for the help......

NavaL3 (Thu, 07 Feb 2019 05:05:55 GMT):

ApplicationLog.png

NavaL3 (Thu, 07 Feb 2019 05:06:58 GMT):

PeerLog.png

knagware9 (Thu, 07 Feb 2019 10:30:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DDXCnxvi2Pd8FbwYf) @NavaL3 can you check all peer container are running fine ?

NavaL3 (Thu, 07 Feb 2019 10:58:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CC46JHwLkQAH7BERk) @knagware9 ya.... peer container is working.....

knagware9 (Thu, 07 Feb 2019 11:10:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LCb29EjQHBgr7QFeX) @NavaL3 but your logs says container not reachble

NavaL3 (Thu, 07 Feb 2019 12:04:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mLtcKo6hWH9DtxKb2) @knagware9 Thanks for the your valuable time..... Please check my dockerfile for peer

NavaL3 (Thu, 07 Feb 2019 12:04:51 GMT):

PeerContainerFile.png

knagware9 (Thu, 07 Feb 2019 12:06:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AeoxFXTA4yCLxyzBC) @NavaL3 ok so you using multi machine hosting using docker swarm ,right ?

NavaL3 (Thu, 07 Feb 2019 12:06:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cyFQ4uj8nbyauc5kh) @knagware9 No.... we are not using swarm...

NavaL3 (Thu, 07 Feb 2019 12:06:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GFyZ9QvYCr77KhmEs) [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cyFQ4uj8nbyauc5kh) @knagware9 No.... we are not using swarm... Also check my peer-base.yaml file.......

knagware9 (Thu, 07 Feb 2019 12:08:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GFyZ9QvYCr77KhmEs) @NavaL3 issue with port number 10051 ..always use 7051 there

NavaL3 (Thu, 07 Feb 2019 12:08:39 GMT):

Screenshot from 2019-02-07 17-38-04.png

knagware9 (Thu, 07 Feb 2019 12:09:15 GMT):
peer0.org1.example.com: container_name: peer0.org1.example.com extends: file: base.yaml service: peer-base environment: - CORE_PEER_ID=peer0.org1.example.com - CORE_PEER_LOCALMSPID=Org1MSP - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 ports: - 7051:7051 - 7053:7053 volumes: - ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/crypto/peer depends_on: - orderer.example.com

knagware9 (Thu, 07 Feb 2019 12:09:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nTFB9LdnJXPMTqyma) @NavaL3 where you chacking the files in your local machine or peer container...docker compose need to be checked from your local mahcine

NavaL3 (Thu, 07 Feb 2019 12:13:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PrrwGfokhX5ugeut8) @knagware9 Thanks @knagware9 .... We will try with the 7051 port....will get back to you....

mahoney1 (Thu, 07 Feb 2019 12:41:35 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)

bstri (Thu, 07 Feb 2019 15:55:05 GMT):
Has joined the channel.

SethiSaab (Thu, 07 Feb 2019 17:31:18 GMT):
@rameshthoomu Hi Ramesh

SethiSaab (Thu, 07 Feb 2019 17:31:31 GMT):

Screenshot from 2019-02-07 22-48-08.png

SethiSaab (Thu, 07 Feb 2019 17:31:33 GMT):
facing this issue while querying chaincode

SethiSaab (Thu, 07 Feb 2019 17:31:47 GMT):
i have 2 orgs ADMIN1 and USER1 for org1 and ADMIN2 USER2 for ORG2 i deployed chaincode using admin1 and admin2 .... but when i am trying to publish something i am getting this error I have tried using both (ADMIN and USER)

xiven (Thu, 07 Feb 2019 18:13:07 GMT):
I'm running haproxy with 2 fabric ca instances on docker. I'm able to register users but after registering its throwing this error in my main console: `Error: Calling register endpoint failed, CONNECTION Timeout` when i check the logs of haproxy and fabric ca containers there are no errors. Any idea what could be causing this?

JoshFodale (Thu, 07 Feb 2019 21:21:01 GMT):
Has joined the channel.

JoshFodale (Thu, 07 Feb 2019 21:23:50 GMT):
hello! I'm following along in the Node SDK documentation here: https://fabric-sdk-node.github.io/release-1.4/tutorial-network-config.html At the portion where it does the client.loadFromConfig(), the yaml file references locations where crypto material can be found (/tmp/hfc-kvs/org1). How does the crypto material get deposited there? Does that material have to be generated and put there ahead of time by some process?

nfrunza (Fri, 08 Feb 2019 02:38:51 GMT):
Hello, can GatewayAPI used with no fabric-ca server?

nfrunza (Fri, 08 Feb 2019 02:38:51 GMT):
Hello, can Gateway API from fabric-network used with no fabric-ca server?

ShefaliMittal (Fri, 08 Feb 2019 08:26:03 GMT):
Can anyone please tell me how do I listen to chaincode events using new fabric sdk ? Below is my chaincode invokation code - // Create a new gateway for connecting to our peer node. const gateway = new Gateway(); //get the contract const contract = await createContract(gateway, userName, request); // Submit the specified transaction. const data = await contract.submitTransaction(request.fcn, ...request.args); console.log('Transaction has been submitted'); // Disconnect from the gateway. await gateway.disconnect();

rthatcher (Fri, 08 Feb 2019 09:23:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zNPzSRugYzWeezjAv) @JoshFodale For testing and development, the Crypto Material is usually generated with the Cryptogen tool: https://hyperledger-fabric.readthedocs.io/en/latest/commands/cryptogen.html The sample Fabric Networks use cryptogen with material in standard folder structures.

rthatcher (Fri, 08 Feb 2019 09:30:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SYpWQ5gvQ2gsbhSR7) @nfrunza To use the gateway.connect an ID with Credentials is required. Often they originate from the fabric-ca server, but if you have the credentials the fabric-ca server does not have to be running.

rthatcher (Fri, 08 Feb 2019 09:30:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SYpWQ5gvQ2gsbhSR7) @nfrunza To use the gateway.connect an ID with Credentials is required. Often they originate from the fabric-ca server, but if you have the credentials the fabric-ca server does not have to be running. The Fabric CA is the default certification authority, but is not mandatory.

shiftby (Fri, 08 Feb 2019 10:39:06 GMT):
Has joined the channel.

bestbeforetoday (Fri, 08 Feb 2019 11:30:00 GMT):
@ShefaliMittal Right now you need to use EventHubs in the lower level fabric-client API to listen for events emited by chaincode: https://fabric-sdk-node.github.io/release-1.4/tutorial-channel-events.html

hyperlearner (Fri, 08 Feb 2019 11:52:54 GMT):
In fabric v1.2,I'm trying to create peer and join the channel.But i'm getting the following error.I'm passing the address and {pem:'...'} to the newPeer().What is the change that i have to do ? this.$channel = new grpc.Channel(address, credentials, channel_options); ^ TypeError: Channel's second argument must be a ChannelCredentials #fabric-sdk-node #general #fabric-sdk

nfrunza (Fri, 08 Feb 2019 13:04:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4SpefvogNExRB2upT) @rthatcher thank you for the clarification

vieiramanoel (Fri, 08 Feb 2019 20:29:33 GMT):
@bestbeforetoday do you have any idea about how can I modify config block through sdk, without needing configtxlator?

vieiramanoel (Fri, 08 Feb 2019 20:30:39 GMT):
I want to use Channel.getChannelConfigFromOrderer(block => {edit block here for submitt channel update later})

vieiramanoel (Fri, 08 Feb 2019 20:30:39 GMT):
I want to use `Channel.getChannelConfigFromOrderer(block => {edit block here for submitt channel update later})`

yacovm (Fri, 08 Feb 2019 20:31:10 GMT):
what are you trying to do, @vieiramanoel ?

vieiramanoel (Fri, 08 Feb 2019 20:31:34 GMT):
@yacovm add a new org to channel

vieiramanoel (Fri, 08 Feb 2019 20:32:01 GMT):
having json for the new org generated by configtxgen

vieiramanoel (Fri, 08 Feb 2019 20:32:28 GMT):
I'm following the doc for channel creation, which is kinda similar

vieiramanoel (Fri, 08 Feb 2019 20:32:29 GMT):
https://fabric-sdk-node.github.io/tutorial-channel-create.html

vieiramanoel (Fri, 08 Feb 2019 20:32:44 GMT):
but it says to use configtxlator

vieiramanoel (Fri, 08 Feb 2019 20:33:16 GMT):
I really don't want to depend on another process in computer or a server be online to decode this block

vieiramanoel (Fri, 08 Feb 2019 20:33:16 GMT):
I really don't want to depend on another process in computer or a server to be online to decode this block

vieiramanoel (Fri, 08 Feb 2019 20:33:50 GMT):
I tried to modify this block manually, but I can't add a JSON to a protobuf

vieiramanoel (Fri, 08 Feb 2019 20:34:02 GMT):
I got type error Illegal Buffer

yacovm (Fri, 08 Feb 2019 20:34:52 GMT):
right, you need to import the protobufs into the code of the SDK

yacovm (Fri, 08 Feb 2019 20:35:24 GMT):
https://github.com/hyperledger/fabric-sdk-node/tree/0d24cec10f7a3e0153fcf3f0158a89c5eaa0cfab/fabric-client/lib/protos

vieiramanoel (Fri, 08 Feb 2019 20:37:27 GMT):
Ok, I'll try to do some progress with this in hands. Thank you

vieiramanoel (Fri, 08 Feb 2019 21:07:49 GMT):
@yacovm do I need to generate js importable code from .protos?? The class BlockDecoder shouldn't do this?

vieiramanoel (Fri, 08 Feb 2019 21:09:32 GMT):
If anyone knows how this sdk's part is designed I'd appreciate help. For change I compromise to write documentation about this for repo

yacovm (Fri, 08 Feb 2019 22:35:40 GMT):
yeah you do, if you mean what i think you mean

yacovm (Fri, 08 Feb 2019 22:35:49 GMT):
sorry but i can't help you much, not a node SDK developer

yacovm (Fri, 08 Feb 2019 22:36:00 GMT):
or else I'd code this thing myself long ago

vieiramanoel (Fri, 08 Feb 2019 22:55:53 GMT):
Sure! I'm thinking seriously about writing this and submit a pr, this is a very important thing in sdk. To depend on external tools to be able to decode a block is a awful design for sdk

vieiramanoel (Fri, 08 Feb 2019 22:56:34 GMT):
But first, I'll check jira for issues about this and see if is someone working on this

ygnr (Sat, 09 Feb 2019 12:46:50 GMT):
Has joined the channel.

SethiSaab (Sat, 09 Feb 2019 17:27:04 GMT):
@nfrunza nfrunza hi

Asif1996 (Sat, 09 Feb 2019 20:56:28 GMT):
Has joined the channel.

nfrunza (Sun, 10 Feb 2019 03:26:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=c9hKhFpmByzo3gc6g) @SethiSaab Hi

circlespainter (Sun, 10 Feb 2019 14:56:57 GMT):
Has joined the channel.

DeepaMotwani (Mon, 11 Feb 2019 07:05:53 GMT):
can we add channel dynamically to the existing fabric network?

Legiit (Mon, 11 Feb 2019 10:53:44 GMT):
If you use the fabric-ca, the network-config-yaml, loaded by the SDK won't contain the admin pem key etc... how do you instaniate the fabric-client when working with the CA?

Legiit (Mon, 11 Feb 2019 10:53:44 GMT):
If you use the fabric-ca, the network-config-yaml, loaded by the SDK won't contain the admin pem key etc... how do you instaniate the fabric-client when working with the CA instead?

mahoney1 (Mon, 11 Feb 2019 11:44:10 GMT):
FYI everyone - edited recording (zip containing MP4, transcripts) of the Fabric Developer Community call (Feb 7) is out on the Hyperledger Fabric wiki -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings

Legiit (Mon, 11 Feb 2019 13:35:09 GMT):
If have run 50 users to register to the CA, I get a timeout error from the fabric-ca. Is there anything so we can resolve this issue? We have a flow where we generate the user if he doesn't exist while invoking, and when we throw 50 docs at it, we get a timeout and everythng fails

Legiit (Mon, 11 Feb 2019 13:35:09 GMT):
If we run 50 users to register to the CA, I get a timeout error from the fabric-ca. Is there anything so we can resolve this issue? We have a flow where we generate the user if he doesn't exist while invoking, and when we throw 50 docs at it, we get a timeout and everythng fails

Legiit (Mon, 11 Feb 2019 13:35:09 GMT):
If we throw 50 users to register to the CA, I get a timeout error from the fabric-ca. Is there anything so we can resolve this issue? We have a flow where we generate the user if he doesn't exist while invoking, and when we throw 50 docs at it, we get a timeout and everythng fails

Legiit (Mon, 11 Feb 2019 13:35:09 GMT):
If we request 50 users to register to the CA, I get a timeout error from the fabric-ca. Is there anything so we can resolve this issue? We have a flow where we generate the user if he doesn't exist while invoking, and when we throw 50 docs at it, we get a timeout and everythng fails

Legiit (Mon, 11 Feb 2019 13:35:09 GMT):
If we request 50 users to register to the CA, I get a timeout error from the fabric-ca. Is there anything so we can resolve this issue? We have a flow where we generate the user if he doesn't exist while invoking, and when we throw 50 docs at it, we get a timeout and it fails

Switch2Logic (Mon, 11 Feb 2019 19:39:55 GMT):
Has joined the channel.

vieiramanoel (Mon, 11 Feb 2019 20:38:58 GMT):
is anyone familiar with protobufjsw

vieiramanoel (Mon, 11 Feb 2019 20:38:58 GMT):
is anyone familiar with protobufjs?

vieiramanoel (Mon, 11 Feb 2019 20:39:06 GMT):
@smithbk?

vieiramanoel (Mon, 11 Feb 2019 20:39:39 GMT):
I'm still trying to decode received block from `Channel.getChannelConfigFromOrderer()`

vieiramanoel (Mon, 11 Feb 2019 20:40:51 GMT):
Until now what I've is

vieiramanoel (Mon, 11 Feb 2019 20:40:57 GMT):
``` .getChannelConfigFromOrderer() .then(block => { const protoFile = path.resolve("fabprotos/common/configtx.proto"); const protobuf = ProtoBuf.load(protoFile) .then(root => { // const configtx = root.lookupType("common.ConfigEnvelope"); const configGroup = root.lookupType("common.ConfigGroup") const channelGroup = configGroup.fromObject(block.config.channel_group); console.log(channelGroup) }) .catch(err => console.error(err)); })```

vieiramanoel (Mon, 11 Feb 2019 20:41:13 GMT):
which gets me ```ConfigGroup { groups: { field: ConfigGroup { groups: {}, values: {}, policies: {} }, keyElem: ConfigGroup { groups: {}, values: {}, policies: {} }, valueElem: ConfigGroup { groups: {}, values: {}, policies: {} }, map: ConfigGroup { groups: {}, values: {}, policies: {} } }, values: { field: ConfigValue {}, keyElem: ConfigValue {}, valueElem: ConfigValue {}, map: ConfigValue {} }, policies: { field: ConfigPolicy {}, keyElem: ConfigPolicy {}, valueElem: ConfigPolicy {}, map: ConfigPolicy {} }, version: Long { low: 0, high: 0, unsigned: true } } ```

vieiramanoel (Mon, 11 Feb 2019 20:41:29 GMT):
cuz well, they are maps and this is totally acceptable

vieiramanoel (Mon, 11 Feb 2019 20:41:52 GMT):
but I dont know how to convert it to a readable structure

vieiramanoel (Mon, 11 Feb 2019 20:42:29 GMT):
in fact if I just ```const configtx = root.lookupType("common.ConfigEnvelope"); const channelGroup = configGroup.fromObject(block.config.channel_group);console.log(channelGroup) ```

vieiramanoel (Mon, 11 Feb 2019 20:42:29 GMT):
in fact if I just ```const configtx = root.lookupType("common.ConfigEnvelope"); const config = configGroup.fromObject(block.config.channel_group); console.log(channelGroup) ```

vieiramanoel (Mon, 11 Feb 2019 20:42:29 GMT):
in fact if I just ```const configtx = root.lookupType("common.ConfigEnvelope"); const config = configGroup.fromObject(block); console.log(channelGroup) ```

vieiramanoel (Mon, 11 Feb 2019 20:43:30 GMT):
it doesn't unmarshall Config field from this struct ```message ConfigEnvelope { Config config = 1; // A marshaled Config structure Envelope last_update = 2; // The last CONFIG_UPDATE message which generated this current configuration // Note that CONFIG_UPDATE has a Payload.Data of a Marshaled ConfigUpdate }```

vieiramanoel (Mon, 11 Feb 2019 20:44:01 GMT):
And I'm absolutely lost about this

Legiit (Tue, 12 Feb 2019 07:14:44 GMT):
If we request 50 users to register to the CA, I get a timeout error from the fabric-ca. Is there anything so we can resolve this issue? We have a flow where we generate the user if he doesn't exist while invoking, and when we throw 50 docs at it, we get a timeout and it fails

Legiit (Tue, 12 Feb 2019 07:20:12 GMT):
@vieiramanoel you are able to use configtxlator to start an API, which does the encoding/decoding for you.

vieiramanoel (Tue, 12 Feb 2019 10:51:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zpdH58uHHiYoKZDsx) @Legiit well, I can't depend on a external api

Legiit (Tue, 12 Feb 2019 11:34:51 GMT):
That's our exact same thought, but so far we haven't been able to find another way @vieiramanoel

ChinmayIngle (Tue, 12 Feb 2019 14:19:00 GMT):
Has joined the channel.

VadimInshakov (Tue, 12 Feb 2019 18:26:54 GMT):
https://fabric-sdk-node.github.io/release-1.4/Channel.html#queryBlock__anchor What is skidDecode? How and for what are the blocks encoded?

varunagarwal (Wed, 13 Feb 2019 07:18:04 GMT):
Hi, can someone please explain what is `compositeKey`, I have read the docs and seen how to create one, but havn't understood the use case for it, I know it is for querying and the getStateList api but why is it needed?

yacovm (Wed, 13 Feb 2019 07:47:51 GMT):
[]

rthatcher (Wed, 13 Feb 2019 09:46:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uYFHrgwv8qwg7ebMb) @varunagarwal The State Database for Fabric is document-orientated (noSQL) so does not have Tables. Composite keys are used to make keys that are unique across the database so that Student 01 (S01) doesn't get overwritten by Supplier 01 (S01) for example. You don't have to use Composite Keys, but they offer an easy way to manage uniqueness and then run efficient queries by Partial Composite key. There is a better example in the Fabric Tutorials - https://hyperledger-fabric.readthedocs.io/en/latest/developapps/architecture.html?highlight=composite%20key

zicozico (Wed, 13 Feb 2019 13:50:59 GMT):
Has joined the channel.

zicozico (Wed, 13 Feb 2019 13:51:03 GMT):
Hi guys, anyone knows if there is a way of grabbing a generated CRL and updating the MSP folder or configuration block in a network using hyperledger node sdk? I am trying to revoke a certificate, generate a CRL and then updating the configuration blocks, and is this last part that I am unsure on how to proceed. Any help would be appreciated.

HLFPOC (Wed, 13 Feb 2019 18:27:22 GMT):
Hello Team, Any idea on how to listen blocks in a sequential manner ? In my app, I have implemented block listener which is continuously receiving blocks . Based on the received block, I again want to invoke/query chaincode depending upon business logic and block data but in a sequential way. Any idea how this can be achieved because, as per my observation, default block listener implementation process received blocks in asynchronous way.

HLFPOC (Wed, 13 Feb 2019 18:27:22 GMT):
Hello Team, Any idea on how to listen blocks in a sequential manner ? In my app, I have implemented block listener which is continuously receiving blocks . Based on the received block, I again want to invoke/query chaincode depending upon business logic and block data, but in a sequential way. Any idea how this can be achieved because, as per my observation, default block listener implementation process received blocks in asynchronous way.

ygnr (Wed, 13 Feb 2019 22:45:23 GMT):
Hi Team, getting this error when I try to instantiate chaincode. I can get all the proposals and they are all good but sending a transaction to orderer fails with this. ``` Error: Failed to send transaction successfully to the orderer status:FORBIDDEN at BasicCommitHandler._commit (/project/node_modules/fabric-client/lib/impl/BasicCommitHandler.js:120:23) at at process._tickDomainCallback (internal/process/next_tick.js:229:7) ``` I have looked at the logs in orderer, it show the following ``` 2019-02-13 22:27:11.126 UTC [policies] Evaluate -> DEBU 977 Signature set did not satisfy policy /Channel/Orderer/Orderer/Writers 2019-02-13 22:27:11.126 UTC [policies] Evaluate -> DEBU 978 == Done Evaluating *cauthdsl.policy Policy /Channel/Orderer/Orderer/Writers 2019-02-13 22:27:11.126 UTC [policies] func1 -> DEBU 979 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Orderer.Writers ] 2019-02-13 22:27:11.126 UTC [policies] Evaluate -> DEBU 97a Signature set did not satisfy policy /Channel/Orderer/Writers 2019-02-13 22:27:11.126 UTC [policies] Evaluate -> DEBU 97b == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers 2019-02-13 22:27:11.126 UTC [policies] func1 -> DEBU 97c Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Application.Writers Orderer.Writers ] 2019-02-13 22:27:11.126 UTC [policies] Evaluate -> DEBU 97d Signature set did not satisfy policy /Channel/Writers 2019-02-13 22:27:11.126 UTC [policies] Evaluate -> DEBU 97e == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers 2019-02-13 22:27:11.126 UTC [orderer.common.broadcast] ProcessMessage -> WARN 97f [channel: kpmgorigins-channel] Rejecting broadcast of normal message from 172.26.0.1:38908 because of error: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied 2019-02-13 22:27:11.126 UTC [orderer.common.server] func1 -> DEBU 980 Closing Broadcast stream 2019-02-13 22:27:11.126 UTC [comm.grpc.server] 1 -> INFO 981 streaming call completed {"grpc.start_time": "2019-02-13T22:27:11.08Z", "grpc.service": "orderer.AtomicBroadcast", "grpc.method": "Broadcast", "grpc.peer_address": "172.26.0.1:38908", "grpc.code": "OK", "grpc.call_duration": "46.368ms"} 2019-02-13 22:27:11.159 UTC [grpc] infof -> DEBU 982 transport: loopyWriter.run returning. connection error: desc = "transport is closing" ```

nfrunza (Thu, 14 Feb 2019 04:19:33 GMT):
Hi, is there an API in SDK for Node to get the peer status?, thank you

mahoney1 (Thu, 14 Feb 2019 09:53:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MRtCEX7Qa2TjbiQ45) @nfrunza suggest to read healthcheck or metrics on this page https://hyperledger-fabric.readthedocs.io/en/release-1.4/operations_service.html - other suggestions: your strategy might want to invoke a 'healthcheck' query to see it responds (as opposed to just being 'alive') or could also suggest to check out the equivalent `getchannels` from the client, as described in the answer [here](https://stackoverflow.com/questions/46449327/how-to-get-all-existing-channels-in-hyperledger-1-0-node-sdk)

mahoney1 (Thu, 14 Feb 2019 09:53:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MRtCEX7Qa2TjbiQ45) @nfrunza suggest to read more on healthcheck and metrics on this page https://hyperledger-fabric.readthedocs.io/en/release-1.4/operations_service.html - other suggestions: your strategy might want to invoke a 'healthcheck' query to see it responds (as opposed to just being 'alive') or could also suggest to check out the equivalent `getchannels` from the client, as described in the answer [here](https://stackoverflow.com/questions/46449327/how-to-get-all-existing-channels-in-hyperledger-1-0-node-sdk)

VadimInshakov (Thu, 14 Feb 2019 12:32:20 GMT):
https://fabric-sdk-node.github.io/release-1.4/Channel.html#queryBlock__anchor What is skipDecode? How and for what are the blocks encoded?

nfrunza (Thu, 14 Feb 2019 13:35:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tr6HLCqHzjK9wGXrR) @mahoney1 thank you

Legiit (Thu, 14 Feb 2019 13:46:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tr6HLCqHzjK9wGXrR) Do you need to setup any config for the health checks to expose? Or should I be able to access it always by entering localhost:7051/healthz in the browser with a 1.4 network?

mahoney1 (Thu, 14 Feb 2019 14:07:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d2JjeMnGpdd56Y4WL) @Legiit yes, it describes it in the very first line of the docs -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/operations_service.html , then below what's required to configure the operations service

mahoney1 (Thu, 14 Feb 2019 14:07:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d2JjeMnGpdd56Y4WL) @Legiit yes, it describes it in the very first line of the docs -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/operations_service.html , then below it, what's required to configure the operations service

nfrunza (Thu, 14 Feb 2019 15:33:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HuyZbdvkvukNJNGMy) @mahoney1 Thank you very much for your response, is any fabric-samples configured with health check operations? I'm supporting HLExplorer and i think this could add a value to explorer.

vieiramanoel (Thu, 14 Feb 2019 18:49:41 GMT):
@bestbeforetoday @smithbk can you guys help me out with something really strange happening here?

vieiramanoel (Thu, 14 Feb 2019 18:50:32 GMT):
I refused to use configtxlator to modify my block and instead of that I've modified it using protobufjs and everything has worked

vieiramanoel (Thu, 14 Feb 2019 18:50:49 GMT):
except that, I can't encode block to buffer again

vieiramanoel (Thu, 14 Feb 2019 18:50:49 GMT):
except that I can't encode block to buffer again

vieiramanoel (Thu, 14 Feb 2019 18:52:10 GMT):
Although I can access its members and so on, when I encode the block the nested structures are missing

vieiramanoel (Thu, 14 Feb 2019 18:52:37 GMT):
And because of that Orderer can't validate the config update block

vieiramanoel (Thu, 14 Feb 2019 18:53:01 GMT):
I'm working on this all the week long

vieiramanoel (Thu, 14 Feb 2019 18:53:20 GMT):
have you made some progress about it, @legg

vieiramanoel (Thu, 14 Feb 2019 18:53:20 GMT):
have you made some progress about it, @Legiit?

vieiramanoel (Thu, 14 Feb 2019 18:56:19 GMT):
I just wanna encode blocks back to proto :(

pchochu (Thu, 14 Feb 2019 20:58:20 GMT):
Has joined the channel.

vieiramanoel (Thu, 14 Feb 2019 21:19:42 GMT):
https://gerrit.hyperledger.org/r/#/c/29314/ pls take a look at this

ygnr (Fri, 15 Feb 2019 04:32:50 GMT):
Is there an API to get list of anchor peers on the channel?

krabradosty (Fri, 15 Feb 2019 09:14:44 GMT):
Hello folks! I can't find in nodejs SDK methods like "create signable chaincode package", "sign chaincode package". Are they implemented?

varunagarwal (Fri, 15 Feb 2019 10:55:15 GMT):
What is the difference between `fabric-shim` and `fabric-contract-api` ? The nodejs code in `fabric-samples` uses both of them. Commercial paper chaincode is using `fabcric-contract-api` while the `fabcar` only uses `fabric-shim`

varunagarwal (Fri, 15 Feb 2019 10:57:41 GMT):
It says fabric-shim is a low level API while fabric-contract-api is higher level, but is still experimental and unlikely to change according to https://www.npmjs.com/package/fabric-contract-api

bestbeforetoday (Fri, 15 Feb 2019 11:51:56 GMT):
Kinda what it says I think. _fabric-contract-api_ is built on top of _fabric_shim_ removes the need to write boiler-plate routing logic in `Invoke()` to choose what code to run and get arguments for a given transaction function name. Instead you just write transaction functions. It also allows you to define metadata that describes available functions, parameters and validation that should be done on arguments. #fabric-chaincode-dev might be a better channel for questions on the chaincode though

bestbeforetoday (Fri, 15 Feb 2019 11:51:56 GMT):
Kinda what it says I think. _fabric-contract-api_ is built on top of _fabric-shim_ removes the need to write boiler-plate routing logic in `Invoke()` to choose what code to run and get arguments for a given transaction function name. Instead you just write transaction functions. It also allows you to define metadata that describes available functions, parameters and validation that should be done on arguments. #fabric-chaincode-dev might be a better channel for questions on the chaincode though

ShefaliMittal (Fri, 15 Feb 2019 12:32:29 GMT):
Hi, I am having issue with the endorsement policies. I have set my chancode endorsement policy as OR( ORG1Msp.admin, Org2Msp.admin)

ShefaliMittal (Fri, 15 Feb 2019 12:32:48 GMT):
But it fails even when I am invoking chaincode via admin

ShefaliMittal (Fri, 15 Feb 2019 12:33:17 GMT):
Please tell what I am missing here

vieiramanoel (Fri, 15 Feb 2019 14:32:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ee3n6cufonYrwDPQm) this failed to build again 'orderer.example.com' not found...

vieiramanoel (Fri, 15 Feb 2019 14:32:46 GMT):
has nothing to do with me

rangak (Fri, 15 Feb 2019 16:08:44 GMT):
ChannelEventHub

varunagarwal (Fri, 15 Feb 2019 17:33:40 GMT):
@bestbeforetoday True, but on the npm repo it says it is *experimental and will remain that way*, so not sure if I should use it

redegade (Fri, 15 Feb 2019 19:24:09 GMT):
Is there a tutorial/resource that shows how to create a channel dynamically?

nfrunza (Fri, 15 Feb 2019 19:29:04 GMT):
Hello, can someone suggest how to connect from local workstation to remote fabric network, when i use remote url grpcs://xx-xx-xxx-xxx-xx.compute-1.amazonaws.com:7050 fabric returns from discover service grpcs://localhost:7051, is there a way how to configure it?

vieiramanoel (Fri, 15 Feb 2019 20:13:01 GMT):
@yacov

vieiramanoel (Fri, 15 Feb 2019 20:13:01 GMT):
@yacovm

vieiramanoel (Fri, 15 Feb 2019 20:13:02 GMT):
error authorizing update: error validating DeltaSet: attempt to set key [Group] /Channel/Application to version 0, but key is at version 1

vieiramanoel (Fri, 15 Feb 2019 20:14:19 GMT):
what does this message means: my configupdate is at version 1 and should be at version 0 or the other way around?

vieiramanoel (Fri, 15 Feb 2019 20:15:03 GMT):
@yacovm @smithbk can you guys help me with that?

vieiramanoel (Fri, 15 Feb 2019 20:15:13 GMT):
Still on manual channel modification

vieiramanoel (Fri, 15 Feb 2019 20:42:52 GMT):
Note: I did implemented configtxlator's update function to call it before send orderer request

yacovm (Fri, 15 Feb 2019 20:43:16 GMT):
the channel already exists

vieiramanoel (Fri, 15 Feb 2019 20:46:25 GMT):
Oh gosh hahaha

krabradosty (Sat, 16 Feb 2019 14:37:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CW2fBmAoYC49YKFyS) Anyone?

vieiramanoel (Sat, 16 Feb 2019 17:57:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WP2NKHGgxBpX87hME) @yacovm changed method from createChannel to updateChannel and same error goes

vieiramanoel (Sat, 16 Feb 2019 17:57:50 GMT):
I've seen in code implementation and both create and update uses same function on lib's backend, so I'm not sure if changing one to another would make any difference

mastersingh24 (Sun, 17 Feb 2019 15:34:08 GMT):
@krabradosty - it's actually meaningless to perform those operations anyway ... they are not enforced anywhere. I assume you found https://fabric-sdk-node.github.io/release-1.4/Package.html for creating a standard chaincode package?

pujabhattad (Mon, 18 Feb 2019 05:15:35 GMT):
Hi, I am trying to update channel config through Node SDK, Is there any way we can collect signatures by sending the update proposal through SDK?

nekia (Mon, 18 Feb 2019 06:08:56 GMT):
https://github.com/hyperledger/fabric-sdk-node/commit/65a8da992bed9fa151f2039bdd309dcdf9c6322e

nekia (Mon, 18 Feb 2019 06:11:43 GMT):
Hi, Is this ‘asLocalhost’ option configurable with environment variable as this comment saying? It doesn't work in my local environment by defining DISCOVERY_AS_LOCALHOST=false in docker-compose.yaml.

knagware9 (Mon, 18 Feb 2019 07:42:40 GMT):
Hi , Anybody tried to use node sdk in multihost network in docker swarm mode, I am facing error while I tried to instantiate chaincode via node sdk in multi host setup

ShefaliMittal (Mon, 18 Feb 2019 08:10:06 GMT):
Hi Can someone please help me with endorsement policy. I have set it as OR(ORG1Msp.admin, Org2MSP.admin)

ShefaliMittal (Mon, 18 Feb 2019 08:10:53 GMT):
when I invoke chaincode, it fails with endorsement policy failure error. and peer log shows identity is not an admin

krabradosty (Mon, 18 Feb 2019 08:11:23 GMT):
@mastersingh24 I've read about these features in "Chaincode for Operators" unit of the documentation. It is implemented in peer CLI. Why do you say that it is meaningless? How should organizations agree on a new version of a chaincode and instantiate it in a channel?

MuhammedHafil (Mon, 18 Feb 2019 10:34:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HJwt4CWXNJeLW7XZM) @ShefaliMittal Probably you are trying to execute the transaction as user registered with ca , are you able to post transactions from cli with admin creds?

MuhammedHafil (Mon, 18 Feb 2019 10:35:02 GMT):
any examples for using `CouchDBWallet`?

mastersingh24 (Mon, 18 Feb 2019 10:42:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HTtRgYT2erQDFrjDC) @krabradosty Admins need to install chaincode on their respective peers in the first place ... that means they have already implicitly agreed to host./run the chaincode. Instantiate is separate from the actual signed package. I assumed you were talking about signed chaincode packages ... these are actually meaningless as we don't enforce or check signed packages in Fabric

krabradosty (Mon, 18 Feb 2019 11:02:34 GMT):
@mastersingh24 I got your point. But the question remains: how are organizations supposed to agree in the endorsement policy of chaincode?

pujabhattad (Mon, 18 Feb 2019 11:26:39 GMT):
Hi, I am trying to update channel config through Node SDK, Is there any way we can collect signatures by sending the update proposal through SDK? Currently we sign per ORG at one place, But in real life scenario , Org1 will not have credentials for Org2. So how can we collect signatures of all Orgs through SDK for updating channel configuration?

Vanitha (Mon, 18 Feb 2019 12:40:38 GMT):
Hey I want to start, chaincode implementation with Node and wanted to define multiple-orgs in that

Vanitha (Mon, 18 Feb 2019 12:41:18 GMT):
Could you please suggest me some links where I can start working

Vanitha (Mon, 18 Feb 2019 12:41:18 GMT):
Could anyone please suggest me some links where I can start working

VadimInshakov (Mon, 18 Feb 2019 12:47:59 GMT):
No one answers me in any channel here. Let me ask here please. I'm triyng to create channel in `first-network` (I modified configtx.yaml for 3 orgs) and get this error: ``` root@d41215:/var/seeds/hlf/1.2.1/fabric-samples/first-network# docker exec -e "CHANNEL_NAME=mychannel" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" -e "CORE_PEER_ADDRESS=peer0.org1.example.com:7051" -e "CORE_PEER_LOCALMSPID='Org1MSP'" -e "CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" cli peer channel create -o orderer.example.com:7050 -c channel2 -f /channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem 2019-02-14 16:20:37.940 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized Error: got unexpected status: BAD_REQUEST -- Attempted to include a member which is not in the consortium ``` `configtx.yaml`: https://gist.github.com/VadimInshakov/897aaef92cdf1dcd38aab16cecfc82b0

knagware9 (Mon, 18 Feb 2019 13:18:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SXE6skGiqqqM6aBYG) @VadimInshakov give the $CHANNEL_NAME instead of channel2 ,,check if this correct

VadimInshakov (Mon, 18 Feb 2019 13:35:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nwpZYFiuMC9Anyui9) @knagware9 the error remains the same :( I generated new genesis block, channel.tx, anchor tx with env variable CHANNEL_NAME

nasht00 (Mon, 18 Feb 2019 14:14:07 GMT):
Hello, I am looking at FabricCAClient.register (https://fabric-sdk-node.github.io/release-1.4/FabricCAClient.html#register__anchor). Does the `role` argument have special meaning? Or is it a free string to be used as I please in my chaincode? Is there a predefined list of supported roles?

mastersingh24 (Mon, 18 Feb 2019 14:49:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cwLnQ65TnFbBgjEB9) @nasht00 https://chat.hyperledger.org/channel/fabric-ca?msg=WtKxH2su6p5cnCwkE

GuillaumeCisco (Mon, 18 Feb 2019 16:59:46 GMT):
Hello, I can see in the fabric-sdk-node a file named `NetworkConfig_1.0.js` which define the network config API for interacting with a fabric network. Is there any documentation about this? Or is this specific to the fabric-sdk-node? Thank you

mahoney1 (Mon, 18 Feb 2019 17:29:35 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)

ChinmayIngle (Mon, 18 Feb 2019 18:33:26 GMT):
[2019-02-18 21:35:14.226] [ERROR] Helper - Failed to get registered user: jim with error: TypeError: Cannot read property 'curve' of undefined

ChinmayIngle (Mon, 18 Feb 2019 18:33:26 GMT):
[2019-02-18 21:35:14.226] [ERROR] Helper - Failed to get registered user: jim with error: TypeError: Cannot read property 'curve' of undefined I am setting up client using nodejs sdk but getting this error for line

ChinmayIngle (Mon, 18 Feb 2019 18:33:26 GMT):
[2019-02-18 21:35:14.226] [ERROR] Helper - Failed to get registered user: jim with error: TypeError: Cannot read property 'curve' of undefined I am setting up client using nodejs sdk but getting this error for line "let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret}); "

ChinmayIngle (Mon, 18 Feb 2019 18:33:26 GMT):
[2019-02-18 21:35:14.226] [ERROR] Helper - Failed to get registered user: jim with error: TypeError: Cannot read property 'curve' of undefined I am setting up client using nodejs sdk but getting this error for line "let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret}); "How can i resolve this error ?Any kind of help will be appreciated .

ChinmayIngle (Mon, 18 Feb 2019 18:33:26 GMT):
[2019-02-18 21:35:14.226] [ERROR] Helper - Failed to get registered user: jim with error: TypeError: Cannot read property 'curve' of undefined I am setting up client using nodejs sdk but getting this error for line "let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret}); "How can i resolve this error ?Any kind of help will be appreciated

nekia (Tue, 19 Feb 2019 04:01:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JytrTRKAHmDmLkQHL) @bretharrison @andrew-coleman Do you have any information about this topic ? I just referred [git commit comment](https://github.com/hyperledger/fabric-sdk-node/commit/65a8da992bed9fa151f2039bdd309dcdf9c6322e).

gauravgiri (Tue, 19 Feb 2019 04:09:33 GMT):
Is it OK to use npm library https://www.npmjs.com/package/fabric-network, with Hyperledger Network for Fabric version 1.2? The earliest version of this library is 1.3.0-snapshot, hence this question. Does the version of this library have any correlation with Fabric version?

gauravgiri (Tue, 19 Feb 2019 04:09:33 GMT):
Is it OK to use npm library https://www.npmjs.com/package/fabric-network, with Hyperledger Network for Fabric version 1.2? The earliest version of this library is 1.3.0, hence this question. Does the version of this library have any correlation with Fabric version?

DeepaMotwani (Tue, 19 Feb 2019 07:40:45 GMT):
I am trying to add an organization dynamically through nodesdk. I have gone through the link https://jira.hyperledger.org/browse/FABN-406?workflowName=FAB%3A+Bug+Workflow&stepId=6 in which it states that the issue is closed. Can anyone help me out where can I find the sample for its solution?

knagware9 (Tue, 19 Feb 2019 09:43:07 GMT):
Anyone tried multihost network integration with node sdk ..urgently need help

mahoney1 (Tue, 19 Feb 2019 10:04:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dyvovZyqQLRtrDTEH) @ChinmayIngle have you checked you're not using a mismatch of versions between fabric client and fabric as described in the [answer here](https://stackoverflow.com/questions/52703269/hyperledger-fabric-node-sdk-curve-property-error)

mtng (Tue, 19 Feb 2019 10:06:44 GMT):
Has joined the channel.

bestbeforetoday (Tue, 19 Feb 2019 10:49:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WPiSuy97iqGqneC2P) @varunagarwal The wording I see is: > this contract interface is experimental, and feedback is actively requested; whilst there are no plans to change this api it might be latered as a result of feedback I think those words are historic from around the Fabric 1.3 timeframe. The _fabric-contract-api_ package was offically part of the Fabric 1.4 release so I think it should be as safe to use as any other Fabric APIs.

knagware9 (Tue, 19 Feb 2019 11:08:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3aN3PFeLpANKnBThn) can i have some help here

jlcs (Tue, 19 Feb 2019 11:12:46 GMT):
Has joined the channel.

mastersingh24 (Tue, 19 Feb 2019 12:05:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vwgj2u8e9d3RW9sEE) @knagware9 What's your actual question? There is nothing special about multi-host versus single host ... it all comes down to the basics of networking ... you must be able to access your nodes across the network if you are using multiple hosts and if you are using TLS the requested hostname must match one of the SANs in the TLS certificate used by each node (peer, orderer, CA)

poojaKamat (Tue, 19 Feb 2019 12:22:22 GMT):
Has joined the channel.

knagware9 (Tue, 19 Feb 2019 12:25:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=subHQrrfY3scrYQFt) @mastersingh24 Thanks but actually I am trying to struggle to connect my multihost setup...so seeking for help :(

mastersingh24 (Tue, 19 Feb 2019 12:25:50 GMT):
What have you tried and what error(s) are you seeing?

knagware9 (Tue, 19 Feb 2019 12:40:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EDF3G3iCrZxoNsg8F) @mastersingh24 I tried basic network , getting error while invoke chaincode , getting error like ,,attached orderer log , chaincode conatiner log

knagware9 (Tue, 19 Feb 2019 12:40:58 GMT):

f2400036-e69b-48f7-8be0-fbc5c18ec23d.jpg

knagware9 (Tue, 19 Feb 2019 12:41:00 GMT):

e6b54acd-e87f-4ee3-9052-817de9056542.jpg

ChinmayIngle (Tue, 19 Feb 2019 16:57:24 GMT):
@mahoney1 Yes i checked them in the package.json file " "dependencies": { "body-parser": "^1.17.1", "cookie-parser": "^1.4.3", "cors": "^2.8.3", "express": "^4.15.2", "express-bearer-token": "^2.1.0", "express-jwt": "^5.1.0", "express-session": "^1.15.2", "fabric-ca-client": "~1.4.0", "fabric-client": "~1.4.0", "fs-extra": "^2.0.0", "jsonwebtoken": "^8.4.0", "log4js": "^0.6.38" } }" here both the client version and ca-client version are same. Do i need to check anything else ?

mahoney1 (Tue, 19 Feb 2019 17:45:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iaGPHqYTspq5ckczi) @ChinmayIngle probably best to check your CA logs for more info / details ?

bretharrison (Tue, 19 Feb 2019 18:11:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mS7MdwxTohkKgqLD7) @nekia The `DISCOVERY_AS_LOCALHOST ` is a client side setting, set the environment setting in the node process or use the `Client.setConfigSetting('discovery-as-localhost', true);` or use pass the `asLocalHost` to the request object on the `channel.initialize()` call.

varunagarwal (Tue, 19 Feb 2019 18:37:03 GMT):
Hi, can somone please explain the need for `compositeKey` . I have seen the example usage in `fabcar` chaincode in `fabric-samples` but cant think of an actual example where it is needed. I feel lot of the examples i have seen can just be replaced by a rich query on couchDb

DtmCarlson (Tue, 19 Feb 2019 18:37:06 GMT):
Has joined the channel.

dave.enyeart (Tue, 19 Feb 2019 19:26:06 GMT):
@varunagarwal You are for the most part correct. Composite key is more often used to add some basic queryability in scenarios where CouchDB is not used. But even when using CouchDB, there are some times when you may want to use composite keys, for example 1) If you want to split a large object into multiple parts, for example to improve performance or reduce the number of transaction collisions 2) If you want to do read/write transactions that use queries and have validation detect 'phantom' records, you must use either a range query or a composite key query rather than a JSON query (with range queries and composite key queries it is possible for the infrastructure to detect colliding transactions, for example if another transaction had added a 'phantom' record that would now show up in the query result set)

nekia (Tue, 19 Feb 2019 23:33:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=e2c5ZxsdwjaksTtrY) @bretharrison Thanks. I've tried it on my client side, but it didn't work except using setConfigSetting directly. When I configure the setting through the environment variable, it's handled as a strings data, so it seems to be always regarded as **true**.

DtmCarlson (Wed, 20 Feb 2019 02:06:58 GMT):
Hi - has anyone seen this error from Contract.submitTransaction ? "No successful events received"

DtmCarlson (Wed, 20 Feb 2019 02:08:44 GMT):
strange thing is that the transaction did succeed - at least as far as i can tell by watching the logs on the contracts docker container - i have a bunch of console debug statements and all looks good - im able to put and get but every time i get the same error result from the sdk

DtmCarlson (Wed, 20 Feb 2019 02:14:49 GMT):
here is the create stack trace

DtmCarlson (Wed, 20 Feb 2019 02:14:52 GMT):
Attempting to contract.submitTransaction to createBatch ... 2019-02-20T02:02:06.225Z - info: [TransactionEventHandler]: _onError: received error from peer localhost:7051: Error: Received status message on the block stream. status:BAD_REQUEST 2019-02-20T02:02:06.227Z - warn: [TransactionEventHandler]: _strategyFail: strategy fail for transaction "4a7a7f99c8f6aefe2d6939dab5c4e815ad3b840d040b340067a467daa3ac97a9": Error: No successful events received (node:14168) UnhandledPromiseRejectionWarning: Error: No successful events received at AllForTxStrategy.checkCompletion (C:\Users\dtmca\source\repos\yave-platform\api\node_modules\fabric-network\lib\impl\event\allfortxstrategy.js:34:12) at AllForTxStrategy.errorReceived (C:\Users\dtmca\source\repos\yave-platform\api\node_modules\fabric-network\lib\impl\event\abstracteventstrategy.js:67:8) at TransactionEventHandler._onError (C:\Users\dtmca\source\repos\yave-platform\api\node_modules\fabric-network\lib\impl\event\transactioneventhandler.js:126:17) at EventRegistration.eventHub.registerTxEvent [as _onErrorFn] (C:\Users\dtmca\source\repos\yave-platform\api\node_modules\fabric-network\lib\impl\event\transactioneventhandler.js:90:20) at EventRegistration.onError (C:\Users\dtmca\source\repos\yave-platform\api\node_modules\fabric-client\lib\ChannelEventHub.js:1570:9) at ChannelEventHub._closeAllCallbacks (C:\Users\dtmca\source\repos\yave-platform\api\node_modules\fabric-client\lib\ChannelEventHub.js:773:15) at ChannelEventHub._disconnect (C:\Users\dtmca\source\repos\yave-platform\api\node_modules\fabric-client\lib\ChannelEventHub.js:541:8) at ClientDuplexStream._stream.on (C:\Users\dtmca\source\repos\yave-platform\api\node_modules\fabric-client\lib\ChannelEventHub.js:454:11) at ClientDuplexStream.emit (events.js:182:13) at addChunk (_stream_readable.js:283:12) (node:14168) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:14168) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Error executing chaincode: Error: No successful events received

DtmCarlson (Wed, 20 Feb 2019 02:16:24 GMT):
and here is the get

DtmCarlson (Wed, 20 Feb 2019 02:16:25 GMT):
Attempting contract.submitTransaction getBatch ... 2019-02-20T02:03:39.278Z - info: [TransactionEventHandler]: _onError: received error from peer localhost:7051: Error: Received status message on the block stream. status:BAD_REQUEST 2019-02-20T02:03:39.278Z - warn: [TransactionEventHandler]: _strategyFail: strategy fail for transaction "577fed0db64f8b86a10ba1a17727f35185de60ff3d834056294a25ac51e47f80": Error: No successful events received Error executing chaincode: Error: No successful events received

DtmCarlson (Wed, 20 Feb 2019 02:21:33 GMT):
for context i am just running locally using fabric-samples basic-network - but i also got the same errors when using the IBM Blockchain Platform VSCode extension local_fabric instance

poojaKamat (Wed, 20 Feb 2019 04:13:14 GMT):
Hi All, I have a application where I need to scale channels,say 50 channels , since hyperledger fabric v1.3 the event hub has become channel based ,that is I get ledger updates only from a particular channel to which I have subscribed. I wanted to know if its possible to get ledger updates from all channels in a single listener ,eg : by sending an array of channels

VadimInshakov (Wed, 20 Feb 2019 07:44:59 GMT):
**Node chaincode instantiation error** I'm trying to instantiate the chaincode with this command: ``` docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" peer1.org1.example.com peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n sample -l "node" -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member', 'Org3MSP.member')" ``` And I see in output: ``` 2019-02-18 16:34:12.211 UTC [msp/identity] Sign -> DEBU 070 Sign: plaintext: 0ABE070A6608031A0B08E5BCABE30510...DB6278D2CE46F7D22B2392499F03682E 2019-02-18 16:34:12.211 UTC [msp/identity] Sign -> DEBU 071 Sign: digest: 7754565D6C693816BAD9CB6A2D69F41A135D488648ECF7A818FEED260E22AE5E Error: could not send: EOF ``` *BUT!* But chaincode container actually started without any errors. What is it!??

VadimInshakov (Wed, 20 Feb 2019 09:45:40 GMT):
And when I try to call any a chaincode method, I get EOF errors: ``` error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF at new createStatusError (/var/seeds/hlf/1.2.1/fabric-samples/first-network/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15) at /var/seeds/hlf/1.2.1/fabric-samples/first-network/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15 proposalResponses Error: 14 UNAVAILABLE: EOF Transaction proposal was bad Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... Failed to invoke successfully :: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... ```

bestbeforetoday (Wed, 20 Feb 2019 12:00:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8CJDvjTaWwfuJZbPM) @DtmCarlson Seems that an unsuccessful transaction commit event from the peer, and that causes the submitTransaction() to report an error since it is expecting all transaction commit events to come back with status of SUCCESS. Why you're getting an event with status BAD_REQUEST, I don't know. I guess the peer and/or orderer logs are the place to look to figure out what happened. The version of fabric-network ties up with the version of Fabric running at the peer/orderer/chaincode, right?

bestbeforetoday (Wed, 20 Feb 2019 12:00:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8CJDvjTaWwfuJZbPM) @DtmCarlson Seems that an unsuccessful transaction commit event is received from the peer, and that causes the submitTransaction() to report an error since it is expecting all transaction commit events to come back with status of SUCCESS. Why you're getting an event with status BAD_REQUEST, I don't know. I guess the peer and/or orderer logs are the place to look to figure out what happened. The version of fabric-network ties up with the version of Fabric running at the peer/orderer/chaincode, right?

DeepaMotwani (Wed, 20 Feb 2019 13:38:24 GMT):
I am trying to add organization dynamically to the channel through NodeSDK. I have followed the below steps: - Extract channel configuration which returns in the protobuffer

DeepaMotwani (Wed, 20 Feb 2019 13:38:24 GMT):
I am trying to add organization dynamically to the channel through NodeSDK. I have followed the below steps: - Extract channel configuration which returns in the protobuffer - Convert it into json so as to read it - Modify the json - Encode it into proto buffer - Calling the updateChannel method of library All the steps are executed successfully but while calling the updateChannel method, it gives me policy error. Please find below the logs of orderer: 2019-02-20 13:28:28.470 UTC [policies] Evaluate -> DEBU a2f == Evaluating *cauthdsl.policy Policy /Channel/Application/Org1MSP/Admins == 2019-02-20 13:28:28.470 UTC [cauthdsl] func1 -> DEBU a30 0xc0002afd50 gate 1550669308470922609 evaluation starts 2019-02-20 13:28:28.470 UTC [cauthdsl] func2 -> DEBU a31 0xc0002afd50 signed by 0 principal evaluation starts (used [false]) 2019-02-20 13:28:28.470 UTC [cauthdsl] func2 -> DEBU a32 0xc0002afd50 processing identity 0 with bytes of a0af20 2019-02-20 13:28:28.470 UTC [msp] satisfiesPrincipalInternalPreV13 -> DEBU a33 Checking if identity satisfies ADMIN role for Org1MSP 2019-02-20 13:28:28.470 UTC [cauthdsl] func2 -> DEBU a34 0xc0002afd50 principal matched by identity 0 2019-02-20 13:28:28.471 UTC [msp.identity] Verify -> DEBU a35 Verify: digest = 00000000 b7 4c c6 c7 b4 e4 45 34 00 61 4b 80 51 3d 96 07 |.L....E4.aK.Q=..| 00000010 3f 6f 28 73 99 44 01 d4 44 8a 84 70 27 06 e5 08 |?o(s.D..D..p'...| 2019-02-20 13:28:28.471 UTC [msp.identity] Verify -> DEBU a36 Verify: sig = 00000000 30 44 02 20 24 a7 07 ba c9 d7 4b 0d 60 95 eb c1 |0D. $.....K.`...| 00000010 96 d5 43 eb 3c fa 95 4f ce 44 2e 24 cd 2b d6 9b |..C.<..O.D.$.+..| 00000020 51 81 a6 cd 02 20 1f aa 81 d9 d7 d5 64 b4 36 54 |Q.... ......d.6T| 00000030 cf 6b 4b d7 eb 42 51 b3 43 cf 07 99 18 3d 97 6d |.kK..BQ.C....=.m| 00000040 31 97 94 07 70 c0 |1...p.| 2019-02-20 13:28:28.471 UTC [cauthdsl] func2 -> DEBU a37 0xc0002afd50 principal evaluation succeeds for identity 0 2019-02-20 13:28:28.471 UTC [cauthdsl] func1 -> DEBU a38 0xc0002afd50 gate 1550669308470922609 evaluation succeeds 2019-02-20 13:28:28.471 UTC [policies] Evaluate -> DEBU a39 Signature set satisfies policy /Channel/Application/Org1MSP/Admins 2019-02-20 13:28:28.471 UTC [policies] Evaluate -> DEBU a3a == Done Evaluating *cauthdsl.policy Policy /Channel/Application/Org1MSP/Admins 2019-02-20 13:28:28.471 UTC [policies] Evaluate -> DEBU a3b == Evaluating *cauthdsl.policy Policy /Channel/Application/Org2MSP/Admins == 2019-02-20 13:28:28.471 UTC [cauthdsl] func1 -> DEBU a3c 0xc00047c690 gate 1550669308471165309 evaluation starts 2019-02-20 13:28:28.471 UTC [cauthdsl] func2 -> DEBU a3d 0xc00047c690 signed by 0 principal evaluation starts (used [false]) 2019-02-20 13:28:28.471 UTC [cauthdsl] func2 -> DEBU a3e 0xc00047c690 processing identity 0 with bytes of a0af20 2019-02-20 13:28:28.471 UTC [cauthdsl] func2 -> DEBU a3f 0xc00047c690 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected Org2MSP, got Org1MSP) 2019-02-20 13:28:28.471 UTC [cauthdsl] func2 -> DEBU a40 0xc00047c690 principal evaluation fails 2019-02-20 13:28:28.471 UTC [cauthdsl] func1 -> DEBU a41 0xc00047c690 gate 1550669308471165309 evaluation fails 2019-02-20 13:28:28.471 UTC [policies] Evaluate -> DEBU a42 Signature set did not satisfy policy /Channel/Application/Org2MSP/Admins 2019-02-20 13:28:28.471 UTC [policies] Evaluate -> DEBU a43 == Done Evaluating *cauthdsl.policy Policy /Channel/Application/Org2MSP/Admins 2019-02-20 13:28:28.471 UTC [policies] func1 -> DEBU a44 Evaluation Failed: Only 1 policies were satisfied, but needed 2 of [ Org1MSP.Admins Org2MSP.Admins ] 2019-02-20 13:28:28.471 UTC [policies] Evaluate -> DEBU a45 Signature set did not satisfy policy /Channel/Application/Admins 2019-02-20 13:28:28.471 UTC [policies] Evaluate -> DEBU a46 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/Admins 2019-02-20 13:28:28.471 UTC [orderer.common.broadcast] ProcessMessage -> WARN a47 [channel: mychannel] Rejecting broadcast of config message from 192.168.64.1:47666 because of error: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 2 sub-policies, required 1 remaining 2019-02-20 13:28:28.471 UTC [orderer.common.server] func1 -> DEBU a48 Closing Broadcast stream 2019-02-20 13:28:28.471 UTC [comm.grpc.server] 1 -> INFO a49 streaming call completed {"grpc.start_time": "2019-02-20T13:28:28.469Z", "grpc.service": "orderer.AtomicBroadcast", "grpc.method": "Broadcast", "grpc.peer_address": "192.168.64.1:47666", "grpc.code": "OK", "grpc.call_duration": "2.221942ms"} 2019-02-20 13:28:30.655 UTC [grpc] infof -> DEBU a4a transport: loopyWriter.run returning. connection error: desc = "transport is closing" Kindly help me out what is missing in my configuration..........

florianc (Wed, 20 Feb 2019 16:02:29 GMT):
Has joined the channel.

BlahBlah (Wed, 20 Feb 2019 16:03:20 GMT):
Has joined the channel.

BlahBlah (Wed, 20 Feb 2019 16:04:06 GMT):
hi guys, is it possible to speed up `peer node install` ? it tars a load of node_module files everytime

BlahBlah (Wed, 20 Feb 2019 16:04:06 GMT):
hi guys, is it possible to speed up `peer node install` ? it tars a load of node_module files everytime. i'm in devmode

klkumar369 (Wed, 20 Feb 2019 18:09:40 GMT):
Has joined the channel.

klkumar369 (Wed, 20 Feb 2019 18:11:33 GMT):
Hello there! I did my network up and executed a node js script to do a transaction. I get the following error which I have no clue about it. Can someone help me on this please? ``` $ node startTransaction.js Store path:/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: ef9f17556b6c6077a091f305e5bcb68dde13c17f6a648c5e3a87e1c256c7c21a [ [ { Error: 2 UNKNOWN: Stream removed at Object.exports.createStatusError (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/common.js:87:15) at Object.onReceiveStatus (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1188:28) at InterceptingListener._callNext (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:841:24) code: 2, metadata: [Object], details: 'Stream removed' } ], { header: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 1136, littleEndian: false, noAssert: false }, payload: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 103, littleEndian: false, noAssert: false }, extension: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } } ] [ { Error: 2 UNKNOWN: Stream removed at Object.exports.createStatusError (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/common.js:87:15) at Object.onReceiveStatus (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1188:28) at InterceptingListener._callNext (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:841:24) code: 2, metadata: Metadata { _internal_repr: {} }, details: 'Stream removed' } ] Transaction proposal was bad Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... Failed to invoke successfully :: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... ```

klkumar369 (Wed, 20 Feb 2019 18:11:33 GMT):
Hello there! I did my network up and executed a node js script to do a transaction. I get the following error which I have no clue about it. Can someone help me on this please? @bestbeforetoday ``` $ node startTransaction.js Store path:/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: ef9f17556b6c6077a091f305e5bcb68dde13c17f6a648c5e3a87e1c256c7c21a [ [ { Error: 2 UNKNOWN: Stream removed at Object.exports.createStatusError (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/common.js:87:15) at Object.onReceiveStatus (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1188:28) at InterceptingListener._callNext (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:841:24) code: 2, metadata: [Object], details: 'Stream removed' } ], { header: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 1136, littleEndian: false, noAssert: false }, payload: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 103, littleEndian: false, noAssert: false }, extension: ByteBuffer { buffer: , offset: 0, markedOffset: -1, limit: 0, littleEndian: false, noAssert: false } } ] [ { Error: 2 UNKNOWN: Stream removed at Object.exports.createStatusError (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/common.js:87:15) at Object.onReceiveStatus (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1188:28) at InterceptingListener._callNext (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/home/kumar/demo/Pradeep/GoodChar/GoodChar/GoodCharMW/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:841:24) code: 2, metadata: Metadata { _internal_repr: {} }, details: 'Stream removed' } ] Transaction proposal was bad Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... Failed to invoke successfully :: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... ```

DtmCarlson (Wed, 20 Feb 2019 19:23:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=u44KBmQJKt5pZAJXe) @bestbeforetoday @bestbeforetoday Thanks - yes same version 1.4 - its just the basic-network from the fabric_samples repo - i did check the logs, nothing on the orderer but on the peer there is message about the envelop timestamp being off here is the snipit 2019-02-19 14:38:16.799 UTC [endorser] callChaincode -> INFO 06d [mychannel][873ca529] Exit chaincode: name:"batchcontract" (20ms) 2019-02-19 14:38:16.799 UTC [comm.grpc.server] 1 -> INFO 06e unary call completed {"grpc.start_time": "2019-02-19T14:38:16.777Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "172.20.0.1:42286", "grpc.code": "OK", "grpc.call_duration": "21.9319ms"} 2019-02-19 14:38:16.832 UTC [common.deliver] deliverBlocks -> WARN 06f Rejecting deliver for 172.20.0.1:42290 due to envelope validation error: envelope timestamp 2019-02-20 19:15:25.597 +0000 UTC is more than 15m0s apart from current server time 2019-02-19 14:38:16.8329401 +0000 UTC m=+63027.202762801 2019-02-19 14:38:16.833 UTC [comm.grpc.server] 1 -> INFO 070 streaming call completed {"grpc.start_time": "2019-02-19T14:38:16.832Z", "grpc.service": "protos.Deliver", "grpc.method": "DeliverFiltered", "grpc.peer_address": "172.20.0.1:42290", "grpc.code": "OK", "grpc.call_duration": "458.8µs"} 2019-02-19 14:38:18.855 UTC [gossip.privdata] StoreBlock -> INFO 071 [mychannel] Received block [4] from buffer 2019-02-19 14:38:18.856 UTC [committer.txvalidator] Validate -> INFO 072 [mychannel] Validated block [4] in 0ms 2019-02-19 14:38:18.980 UTC [kvledger] CommitWithPvtData -> INFO 073 [mychannel] Committed block [4] with 1 transaction(s) in 123ms (state_validation=46ms block_commit=34ms state_commit=35ms)

DtmCarlson (Wed, 20 Feb 2019 19:24:49 GMT):
but it looks like the call did succeed dispite the warning only my client just gets the error - on the logs of the chaincode i see the success message from my console debug - so im not sure what is going on

DtmCarlson (Wed, 20 Feb 2019 19:25:45 GMT):
ive done several teardown / recreate of the network still no luck

nfrunza (Wed, 20 Feb 2019 20:05:03 GMT):
Hi All, need help on configuring fabric network with metrics, anyone has an example or can guide?

DtmCarlson (Wed, 20 Feb 2019 21:32:40 GMT):
@bestbeforetoday thanks for your help - turns out the issues was the warning - my docker env time was off from my windows system time somehow and so simply bouncing Docker fixed my issue

caveman7 (Thu, 21 Feb 2019 06:22:07 GMT):
hello all, there's an issue in the delete() function of couchdbwallet: https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-network/lib/impl/wallet/couchdbwallet.js#L74. the doc _rev number is required to perform deletion. The function should be ``` async delete(key) { const self = this; return new Promise((resolve) => { self._database.get(key, (err, res) => { if (err) { return resolve(false); } if (!res._rev) { return resolve(false); } const rev = res._rev; self._database.destroy(key, rev, (err) => { if (err) { return resolve(false); } return resolve(true); }); }); }); } ```

gauravgiri (Thu, 21 Feb 2019 10:47:57 GMT):
We use fabric-sdk-node, and the Client(fabric-client) is initialised from network-config.json. Later we get the channel using client.getChannel(channelName). If we now get the peers for this channel retrieved from the network, we get the output which is something like below: Question I have is that the *_roles* param for the Peer is coming as empty, as in snapshot below. Do you know how does these *_roles* get populated, for example if we expecting the *endorsingPeer* flag to be set inside *_roles*? this.channel.getPeers(): [ ChannelPeer { _mspid: 'org1', _channel: Channel { _name: 'defaultchannel', _channel_peers: [Object], _anchor_peers: [], _orderers: [Object], _kafka_brokers: [], _clientContext: [Object], _msp_manager: [Object], _chaincodes: Map {}, _discovery_results: null, _last_discover_timestamp: null, _discovery_peer: null, _use_discovery: false, _endorsement_handler: [Object], _commit_handler: [Object] }, _name: 'org1-peer1', _chaincodes: Map {}, _peer: Peer { _options: [Object], clientCert: '-----BEGIN CERTIFICATE-----\r\n\r\n-----END CERTIFICATE-----\r\n', _url: 'grpcs://some:31002', _endpoint: [Object], _name: 'org1-peer1', _request_timeout: 300000, _grpc_wait_for_ready_timeout: 3000, _endorserClient: [Object], _discoveryClient: [Object] }, *_roles: {}* } ]

gauravgiri (Thu, 21 Feb 2019 10:47:57 GMT):
We use fabric-sdk-node, and the Client(fabric-client) is initialised from network-config.json. Later we get the channel using client.getChannel(channelName). If we now get the peers for this channel retrieved from the network, we get the output which is something like below: Question I have is that the *_roles* param for the Peer is coming as empty, as in snapshot below. Do you know how does these *_roles* get populated, for example if we expecting the *endorsingPeer* flag to be set inside *_roles*? this.channel.getPeers(): [ ChannelPeer { _mspid: 'org1', _channel: Channel { _name: 'defaultchannel', _channel_peers: [Object], _peer: Peer { _options: [Object], clientCert: '-----BEGIN CERTIFICATE-----\r\n\r\n-----END CERTIFICATE-----\r\n', _url: 'grpcs://some:31002', _endpoint: [Object], _name: 'org1-peer1', _request_timeout: 300000, _grpc_wait_for_ready_timeout: 3000, _endorserClient: [Object], _discoveryClient: [Object] }, *_roles: {}* } ]

mahoney1 (Thu, 21 Feb 2019 12:22:20 GMT):
reminder that the Fabric Developer Community call is today at 5pm 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+Community+Call - be great to hear from you later ! :-) regards Paul

mahoney1 (Thu, 21 Feb 2019 12:22:20 GMT):
reminder that the Fabric Developer Community call is today at 5pm 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+Community+Call - past Recordings & Slides (PDF) here: https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings - be great to hear from you later ! :-) regards Paul

Legiit (Thu, 21 Feb 2019 12:30:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8gNe8XvfSjAW7ZXpx) I've once saw an issue regarding this, the command utilizes the .npmignore file - if you add node_modules to it, it skips the node modules - I didn't test it personally so I cannot confirm it 100% if its true. But it's worth the try

florianc (Thu, 21 Feb 2019 12:52:34 GMT):
Hello. Could someone explain how to get the wallet from, my bluemix blockchain network, that this documentation (https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/application.html#wallet) talks about? Thank you?

florianc (Thu, 21 Feb 2019 12:52:34 GMT):
Hello. Could someone explain how to get the wallet from, my bluemix blockchain network, that this documentation (https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/application.html#wallet) talks about? Thank you.

florianc (Thu, 21 Feb 2019 15:30:28 GMT):
Question regarding the creation of users and certificate authorities: Curently I have a very basic network with one CA and one MSP per org. Lets say I one two MSPs for my org. I assume my profile.json will have both MSPs referenced, is that true? If true, to create a user with the specific MSP, I will just have to change the mspID in the createUser() function?

florianc (Thu, 21 Feb 2019 15:30:28 GMT):
Question regarding the creation of users and certificate authorities: Curently I have a very basic network with one CA and one MSP per org. Lets say I have two MSPs for my org. I assume my profile.json will have both MSPs referenced, is that true? If true, to create a user with the specific MSP, I will just have to change the mspID in the createUser() function?

mahoney1 (Thu, 21 Feb 2019 16:45:02 GMT):
@florianc 1. yes 2. yes see example using Fabric 1.4 new programming model - you can change the msp manually, or derive from your connection json profile too (see `ccp` below which is the file read into a JS object) like shown in this node js example eg. ```// Register the user, enroll the user, import to wallet (predefined) const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: 'user1', role: 'client' }, adminIdentity); const enrollment = await ca.enroll({ enrollmentID: 'user1', enrollmentSecret: secret }); const userIdentity = X509WalletMixin.createIdentity(ccp.organizations[orgName].mspid, enrollment.certificate, enrollment.key.toBytes()); wallet.import('user1', userIdentity); ```

mahoney1 (Thu, 21 Feb 2019 16:45:02 GMT):
@florianc 1. yes 2. yes see simple [example](https://github.com/hyperledger/fabric-samples/blob/release-1.4/fabcar/javascript/registerUser.js) using Fabric 1.4 new programming model - you can change the msp manually, or derive from your connection json profile too (see `ccp` below which is the file read into a JS object) like shown in this node js example eg. ```// Register the user, enroll the user, import to wallet (predefined) const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: 'user1', role: 'client' }, adminIdentity); const enrollment = await ca.enroll({ enrollmentID: 'user1', enrollmentSecret: secret }); const userIdentity = X509WalletMixin.createIdentity(ccp.organizations[orgName].mspid, enrollment.certificate, enrollment.key.toBytes()); wallet.import('user1', userIdentity); ```

mahoney1 (Thu, 21 Feb 2019 16:45:02 GMT):
@florianc 1. yes 2. yes see simple [example](https://github.com/hyperledger/fabric-samples/blob/release-1.4/fabcar/javascript/registerUser.js) using Fabric 1.4 new programming model - you can change the msp manually, or derive from your connection json profile too (see `ccp` below which is the file read into a JS object) like shown in this node js example eg. ```// Register the user, enroll the user, import to wallet (defined earlier) const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: 'user1', role: 'client' }, adminIdentity); const enrollment = await ca.enroll({ enrollmentID: 'user1', enrollmentSecret: secret }); const userIdentity = X509WalletMixin.createIdentity(ccp.organizations[orgName].mspid, enrollment.certificate, enrollment.key.toBytes()); wallet.import('user1', userIdentity); ```

annalisa.chiacchiaretta (Thu, 21 Feb 2019 16:45:17 GMT):
Has joined the channel.

jmason900 (Thu, 21 Feb 2019 17:47:43 GMT):
Has joined the channel.

caveman7 (Fri, 22 Feb 2019 05:26:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=djAuexALxXmywAjNe) created a pull request for this: https://github.com/hyperledger/fabric-sdk-node/pull/16

varunagarwal (Fri, 22 Feb 2019 07:19:52 GMT):
Is there any specific reason why a single organization would want multiple MSPs? Can't think of a solid real world case

florianc (Fri, 22 Feb 2019 07:42:33 GMT):
@mahoney1 Thank you!

florianc (Fri, 22 Feb 2019 07:43:29 GMT):
@varunagarwal It can be useful if you want to design your network according to the different services of your company. Like "IT guys" have special rights (so special MSP) and "Accountant guys" have other rights

varunagarwal (Fri, 22 Feb 2019 07:46:23 GMT):
ohk understood, even though the same acl can be achieved using 1 MSP with different roles and direct ACL in the chaincode. Though this will still ensure unique MSP IDs per person right?

florianc (Fri, 22 Feb 2019 07:48:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gWQwfKXQDZJNKnWeF) @varunagarwal Sorry. I don't understand what you mean by "the same acl". Which acl are you talking about?

varunagarwal (Fri, 22 Feb 2019 07:53:25 GMT):
I mean't same level of access control, ie separate IT guys and Account guys.

florianc (Fri, 22 Feb 2019 07:55:08 GMT):
Well, i'm not very familiar with this yet, but your statement seams right

Legiit (Fri, 22 Feb 2019 09:40:26 GMT):
Hey guys, I get the following error when trying to instantiate my chaincode: `Error: Cannot find module '/usr/local/src/dist/MyChainCode.js'` The weird thing is that the exact same thing works locally, but fails on the AWS server. I am using the node-sdk to install/instantiate the chaincode. But it somehow doesn't return me this error ONLY on the server..

Legiit (Fri, 22 Feb 2019 09:42:24 GMT):
Locally I can enter the container and see that the dist folder exists. On the server I have like 10 seconds to see the logs of the container and it shows me that error. I really don't have any clue why the exact same thing works locally, but not remote. it's all inside docker containers and both a fresh pull from github, with nothing more than a docker-compose up

mahoney1 (Fri, 22 Feb 2019 09:48:32 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

knagware9 (Fri, 22 Feb 2019 11:39:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ytnptYzQ2jN93CPkJ) @mahoney1 can I find yesterday's maintainer meeting recording somewhere ?

mahoney1 (Fri, 22 Feb 2019 13:01:47 GMT):
@knagware9 is this what you're looking for (see recordings) ? https://wiki.hyperledger.org/display/HYP/2019+02+21+TSC+Minutes

knagware9 (Fri, 22 Feb 2019 13:25:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jbAzisQu9EQmvoihD) @mahoney1 no, Just Dave confirmed , He missed the recording

knagware9 (Fri, 22 Feb 2019 13:25:59 GMT):
anyway I will check community recording , its nice

venzi (Fri, 22 Feb 2019 16:57:12 GMT):
Has joined the channel.

varunagarwal (Sat, 23 Feb 2019 11:36:36 GMT):
Hi is any admin here?

varunagarwal (Sat, 23 Feb 2019 11:38:43 GMT):
Is Ijbennet or raheelzubairy here? Had a PR https://github.com/IBM/decentralized-energy-fabric-on-IBP20/pull/8 that wanted some feedback on @mahoney1 Could you help me out a bit. The IBM repos and the ones in fabric-samples do not have any code to show usage of multiple wallets. I made a PR to add that feature and wanted to know what to change so it can be merged. I also opened an issue https://github.com/IBM/decentralized-energy-fabric-on-IBP20/issues/7 to discuss before starting

varunagarwal (Sat, 23 Feb 2019 11:40:16 GMT):
I am keen on adding more features/ demoing the APIs in the IBM repositories

DanielHruby (Sat, 23 Feb 2019 14:55:57 GMT):
Has joined the channel.

DanielHruby (Sat, 23 Feb 2019 14:57:13 GMT):
Hi, can I ask please which event listener I should use for long term monitoring? Now I'm using fabric sdk node - chaincode event listener. But after some time grpc failed without any error and I stop getting events and in peer log I found this error from comm.grpc.server: error="context finished before block retrieved: context canceled" grpc.code=Unknown

liaoruohuai (Sat, 23 Feb 2019 15:10:48 GMT):
Has joined the channel.

Amjadnz (Sat, 23 Feb 2019 19:49:54 GMT):
Hello there. Can anyone help me out with the following issue with NODESDK download 1.4 (latest) ```$ node test/integration/e2e.js module.js:550 throw err; ^ Error: Cannot find module './utils.js' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (/tts/official/src/github.com/hyperledger/fabric-sdk-node_v2/fabric-sdk-node/fabric-ca-client/lib/FabricCAServices.js:10:15) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) ```

Amjadnz (Sat, 23 Feb 2019 19:53:58 GMT):
Ok if `npm test` is run then the above issue is going away. In the docs it is not mentioned to run the `npm test` is mandatory. Or am I missing something in the middle?

Amjadnz (Sun, 24 Feb 2019 16:39:25 GMT):
Hi - Can someone guide me to this process of V1.4 (NodeJS SDK) ```019-02-24 16:36:59.207 UTC [peer.gossip.mcs] VerifyByChannel -> DEBU 7205 Got policy manager for channel [bbn-test-ch-01] with flag [true] 2019-02-24 16:36:59.207 UTC [peer.gossip.mcs] VerifyByChannel -> DEBU 7206 Got reader policy for channel [bbn-test-ch-01] with flag [true] 2019-02-24 16:36:59.344 UTC [core.comm] ServerHandshake -> ERRO 7207 TLS handshake failed with error tls: failed to verify client's certificate: x509: certificate signed by unknown authority {"server": "PeerServer", "remote address": "172.19.0.1:38450"} 2019-02-24 16:36:59.344 UTC [grpc] handleRawConn -> DEBU 7208 grpc: Server.Serve failed to complete security handshake from "172.19.0.1:38450": tls: failed to verify client's certificate: x509: certificate signed by unknown authority 2019-02-24 16:36:59.349 UTC [core.comm] ServerHandshake -> ERRO 7209 TLS handshake failed with error tls: failed to verify client's certificate: x509: certificate signed by unknown authority {"server": "PeerServer", "remote address": "172.19.0.1:38452"} 2019-02-24 16:36:59.349 UTC [grpc] handleRawConn -> DEBU 720a grpc: Server.Serve failed to complete security handshake from "172.19.0.1:38452": tls: failed to verify client's certificate: x509: certificate signed by unknown authority```

Amjadnz (Sun, 24 Feb 2019 16:42:54 GMT):
These are my config settings in the config.json ```"u1": { "name": "peerU1", "mspid": U1Org", "ca": { "url": "https://localhost:7054", "name": "ca-u1" }, "peer1": { "requests": "grpcs://localhost:7051", "server-hostname": "peer0.u1.ACB.org", "tls_cacerts": "../../fixtures/channel/crypto-config/peerOrganizations/u1.ACB.org/peers/peer0.u1.ACB.org/msp/tlscacerts/tlsca.u1.ACB.org-cert.pem" } }, "k1": { "name": "peerK1", "mspid": "K1Org", "ca": { "url": "https://localhost:7054", "name": "ca-k1" }, "peer1": { "requests": "grpcs://localhost:7051", "server-hostname": "peer0.k1.worldbbn.org", "tls_cacerts": "../../fixtures/channel/crypto-config/peerOrganizations/k1.ACB.org/peers/peer0.k1.ACB.org/msp/tlscacerts/tlsca.k1.ACB.org-cert.pem" } }```

Amjadnz (Sun, 24 Feb 2019 16:42:54 GMT):
These are my config settings in the config.json ```"u1": { "name": "peerU1", "mspid": "U1Org", "ca": { "url": "https://localhost:7054", "name": "ca-u1" }, "peer1": { "requests": "grpcs://localhost:7051", "server-hostname": "peer0.u1.ACB.org", "tls_cacerts": "../../fixtures/channel/crypto-config/peerOrganizations/u1.ACB.org/peers/peer0.u1.ACB.org/msp/tlscacerts/tlsca.u1.ACB.org-cert.pem" } }, "k1": { "name": "peerK1", "mspid": "K1Org", "ca": { "url": "https://localhost:7054", "name": "ca-k1" }, "peer1": { "requests": "grpcs://localhost:7051", "server-hostname": "peer0.k1.worldbbn.org", "tls_cacerts": "../../fixtures/channel/crypto-config/peerOrganizations/k1.ACB.org/peers/peer0.k1.ACB.org/msp/tlscacerts/tlsca.k1.ACB.org-cert.pem" } }```

Amjadnz (Sun, 24 Feb 2019 17:12:57 GMT):
It seems like my certs are not getting signed by `tlsca` but by `ca` - this is causing the issue I believe.

Amjadnz (Sun, 24 Feb 2019 17:12:57 GMT):
It seems like my certs are not getting signed by `tlsca` but by `ca` instead - this is causing the issue I believe.

Amjadnz (Sun, 24 Feb 2019 18:21:29 GMT):
at PEER Level if I declare ` - CORE_PEER_TLS_CLIENTAUTHREQUIRED=false` - then this issue is not getting reports.

Amjadnz (Sun, 24 Feb 2019 18:21:29 GMT):
at PEER Level if I declare ` - CORE_PEER_TLS_CLIENTAUTHREQUIRED=false` - then this issue is not getting reported

mastersingh24 (Sun, 24 Feb 2019 19:02:44 GMT):
@Amjadnz - Is your goal to use client certificates? In most cases, they are really unnecesssary

mastersingh24 (Sun, 24 Feb 2019 19:13:44 GMT):
If you are, you'll need to obtain the client cert pair and use https://fabric-sdk-node.github.io/release-1.4/Client.html#setTlsClientCertAndKey__anchor to explictly set it

dexhunter (Mon, 25 Feb 2019 02:30:36 GMT):
Hi, I was wondering is cli equivalent to the sdk? Thanks

davidkhala (Mon, 25 Feb 2019 09:05:28 GMT):
Hi, I have a question that why TxID is required in join channel request.

davidkhala (Mon, 25 Feb 2019 09:05:48 GMT):
Since I guess no new transaction will be created in this process.

rsoeldner (Mon, 25 Feb 2019 09:08:16 GMT):
Hi, is there a way to query the ca over the node sdk, requesting the public key of a specific id ?

rsoeldner (Mon, 25 Feb 2019 09:08:16 GMT):
Hi, is there a way to query the ca over the node sdk, requesting the public key of a specific id ?

rsoeldner (Mon, 25 Feb 2019 09:08:16 GMT):
Hi, is there a way to query the ca (fabric-ca) over the node sdk, requesting the public key of a specific id ?

rsoeldner (Mon, 25 Feb 2019 09:08:16 GMT):
Hi, is there a way to query the ca (fabric-ca) over the node sdk, requesting the public key of a specific id ?

Amjadnz (Mon, 25 Feb 2019 11:59:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uEXK5do2zqct3rDxb) @mastersingh24 Thanks @mastersingh24 - would be moving ahead without it. My requirement is to get the user context to confirm if the invoking context has been issued from a specific domain or not. Without `CORE_PEER_TLS_CLIENTAUTHREQUIRED` I am getting the context domain - so no need for me to use it as of now. would try your link in case my use case develops to have that requirement.

Amjadnz (Mon, 25 Feb 2019 11:59:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uEXK5do2zqct3rDxb) @mastersingh24 Thanks - would be moving ahead without it. My requirement is to get the user context to confirm if the invoking context has been issued from a specific domain or not. Without `CORE_PEER_TLS_CLIENTAUTHREQUIRED` I am getting the context domain - so no need for me to use it as of now. would try your link in case my use case develops to have that requirement.

Amjadnz (Mon, 25 Feb 2019 13:12:56 GMT):
Ok another error I'm receiving while instantiating chaincode ```[bbn-test-ch-01][73c60e10] failed to invoke chaincode name:"lscc" , error: API error (404): network bbfn not found``` I've defined a network `bbfn` as part of docker-compose.yaml and thats how the entire network is started and all parties can talk to each other. When the SDK is instantiating the chaincode - it is not finding my bbfn network. any help?

Amjadnz (Mon, 25 Feb 2019 13:41:24 GMT):
Resolved now - docker was creating the network with the directory name in the form "fixtures_bbfn" - once changed the NETWORKMODE to that same name - seems to instantiate

Amjadnz (Mon, 25 Feb 2019 13:42:06 GMT):
https://github.com/hyperledger/caliper/issues/198 - reference link

DanielHruby (Mon, 25 Feb 2019 15:11:53 GMT):
Hi, can I ask please which event listener I should use for long term monitoring? Now I'm using fabric sdk node - chaincode event listener. But after some time I stop getting events without any error.

bretharrison (Mon, 25 Feb 2019 15:16:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZBSrrvPuE7BkgStJd) @DanielHruby You should be using the `ChannelEventHub`, which you could register block, transaction, and chaincode listeners.

DanielHruby (Mon, 25 Feb 2019 15:20:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=PmoE3cpHfG9b8fLak) @bretharrison Yes I am using ChannelEventHub and I'm using registerChaincodeEvent function for listening specific chaincode. But after some time I stop getting events and I don't get any error. And if I try to call method checkConnection on ChannelEventHub everything looks fine

bretharrison (Mon, 25 Feb 2019 15:21:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=d5iisDc3nKh4BS589) @davidkhala There is a transaction proposal to the system chaincode, so a transaction id is required.

bretharrison (Mon, 25 Feb 2019 15:25:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Xnng6bbbN2PuXFc9m) @Amjadnz Your right, we should mention that is step is required to setup the shared files between packages.

DanielHruby (Mon, 25 Feb 2019 15:27:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=R2n49qBaEkgyX3v3j) In documentation is written this: If a chaincode event listener is needed for long term monitoring, follow the block listener example above. So it is little confusing to me. I understand that whit block listener I can event read payloads from block which been saved before I register listener. But I want run my chaincode listener for long term. Is there any limitation with timeout or something like that?

DanielHruby (Mon, 25 Feb 2019 15:27:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=R2n49qBaEkgyX3v3j) In documentation is written this: If a chaincode event listener is needed for long term monitoring, follow the block listener example above. So it is little confusing to me. I understand that whit block listener I can even read payloads from block which been saved before I register listener. But I want run my chaincode listener for long term. Is there any limitation with timeout or something like that?

bretharrison (Mon, 25 Feb 2019 15:35:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=R2n49qBaEkgyX3v3j) @DanielHruby With 1.4.1 we will have a `reconnect` that will pick create a new connection to the Peer's event service and have it start sending at the last block the channel event hub instance as seen. All your application event listeners will remain registered. These are the the keep alive settings that we ship with ``` "grpc.keepalive_time_ms": 120000, "grpc.http2.min_time_between_pings_ms": 120000, "grpc.keepalive_timeout_ms": 20000, "grpc.http2.max_pings_without_data": 0, "grpc.keepalive_permit_without_calls": 1 ```

bretharrison (Mon, 25 Feb 2019 15:35:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=R2n49qBaEkgyX3v3j) @DanielHruby With 1.4.1 we will have a `reconnect` that will pick create a new connection to the Peer's event service and have it start sending at the last block the channel event hub instance as seen. All your application event listeners will remain registered. You could try setting the GRPC keep alive setting connection options. These are the the keep alive settings that we ship with ``` "grpc.keepalive_time_ms": 120000, "grpc.http2.min_time_between_pings_ms": 120000, "grpc.keepalive_timeout_ms": 20000, "grpc.http2.max_pings_without_data": 0, "grpc.keepalive_permit_without_calls": 1 ```

bretharrison (Mon, 25 Feb 2019 15:45:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fLsd7A9YcjTXnD5X9) @DanielHruby There are no limitations on the listeners. Once the NodeSDK connects with the Fabric Peer's event service it will start to receive blocks. The NodeSDK will check each registered event listener to see if the block contains a match and call the listeners callback if there is a match. There are no timeouts. The event listers may choose to unregister themselves or disconnect the NodeSDK after a match, these are registration options of the event listener.

deepaks (Mon, 25 Feb 2019 15:45:23 GMT):
Hello, Has anybody encountered following error while joining channel to peer? error: [Orderer.js]: sendDeliver - rejecting - status:SERVICE_UNAVAILABLE

bretharrison (Mon, 25 Feb 2019 15:46:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5nEwrx8CwzPTjcchJ) @deepaks Check the orderer logs

deepaks (Mon, 25 Feb 2019 15:50:14 GMT):
I checked the logs, but as such I did not find any error. This is happening when I'm calling join channel instantly after creating the channel. However if I call separately then whole thing works fine.

deepaks (Mon, 25 Feb 2019 15:50:14 GMT):
@bretharrison I checked the logs, but as such I did not find any error. This is happening when I'm calling join channel instantly after creating the channel. However if I call separately then whole thing works fine.

deepaks (Mon, 25 Feb 2019 15:51:11 GMT):
Rejecting deliver request because of consenter error. I'm geeting this in orderer logs

deepaks (Mon, 25 Feb 2019 15:53:38 GMT):
Is it because of connection problem with the Kafka cluster?

bretharrison (Mon, 25 Feb 2019 21:18:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MJcoAnWurhFLvrThT) @deepaks I always wait about 5 seconds after creating a channel to be sure it is ready before attempting to join

johnfilippone (Mon, 25 Feb 2019 21:50:52 GMT):
when we update hyperledger v1.1 to v1.4 do we also have to update our fabric-sdk-node?

johnfilippone (Mon, 25 Feb 2019 21:50:52 GMT):
when we update hyperledger v1.1 to v1.4 do we also have to update our fabric-sdk-node version?

richzhao (Tue, 26 Feb 2019 01:36:30 GMT):
Has joined the channel.

davidkhala (Tue, 26 Feb 2019 02:58:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JNhDxDqNJn7Xh6azD) @bretharrison Looking forward to the release of 1.4.1

davidkhala (Tue, 26 Feb 2019 02:59:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=txAqbQ6ScDfLcpZWu) @johnfilippone it is recommended

davidkhala (Tue, 26 Feb 2019 03:01:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MJcoAnWurhFLvrThT) @deepaks I see this frequently, and I guess the reason is consensus of this channel creation event is under processing among orderers(sure, with help of kafka)

wangdong (Tue, 26 Feb 2019 03:14:20 GMT):
@bretharrison did the node sdk verson < 1.2 will strip out the .s files?

wangdong (Tue, 26 Feb 2019 03:14:35 GMT):
Just want to confirm this. We get some issue on this.

deepaks (Tue, 26 Feb 2019 07:15:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ns3szqPkcPNJoHPjp) @bretharrison Thanks @bretharrison .I did the same and it's working now.

MuhammedHafil (Tue, 26 Feb 2019 07:25:39 GMT):
How to enroll admin for TLS enabled networks with latest wallet sample. while using TLS we need to provide `tlsOptions,CA name and crypto_store` right? is latest `wallet` and old `crypto_store` are same?

Rajatsharma (Tue, 26 Feb 2019 07:28:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ns3szqPkcPNJoHPjp) @bretharrison Is waiting for some time more efficient or repeatedly querying the block and seeing if that gets committed is better ? I personally query the block and I think that might always save me some time.

DanielHruby (Tue, 26 Feb 2019 07:34:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=N2hfkiWszW2KtKKaX) @davidkhala When I had "grpc.http2.max_pings_without_data": 0, so after one ping without data connection was lost without any error. And than if peer wanted to send block to channeleventhub so it gets error: error="context finished before block retrieved: context canceled" grpc.code=Unknown. But client (channeleventhub) dosn't know about this error and still looks ok. Even if I call function checkConnection on ChannelEventHub it returns everything ok. So I set grpc.http2.max_pings_without_data: 1000 it works and every day I restart ChannelEventHub. I know this is not good solution, but for now this is only one what works for me.

davidkhala (Tue, 26 Feb 2019 07:41:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ev5EMg7wiE6GgN79m) @DanielHruby and the document looks has a bug, is it? I see: ` * `grpc.http2.max_pings_without_data` - Minimum allowed time between a server receiving successive ping frames without sending any data frame. Int valued, milliseconds. `

davidkhala (Tue, 26 Feb 2019 07:41:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ev5EMg7wiE6GgN79m) @DanielHruby and the document looks has a bug, is it? I see: ``` * `grpc.http2.max_pings_without_data` - Minimum allowed time between a server receiving successive ping frames without sending any data frame. Int valued, milliseconds. ``` should it be `Maximum`

DanielHruby (Tue, 26 Feb 2019 07:44:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6tdvGo3ZSC39QX6rz) @davidkhala Yes, it should not be time but how many pings can be send before needing to send a data frame right?

DanielHruby (Tue, 26 Feb 2019 07:44:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZR5i6g6vq9yKTgiNT) And 0 should be infinity?

davidkhala (Tue, 26 Feb 2019 07:46:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xMuh4PdmsyyQwC6b2) @DanielHruby might be, like "zero means no limit here", we have to go for bret's explanation of this confusion.

DanielHruby (Tue, 26 Feb 2019 07:48:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8v5QBJmdmFikkQtyF) @davidkhala This is in grpc documentation: How many pings can we send before needing to send a data frame or header frame? (0 indicates that an infinite number of pings can be sent without sending a data frame or header frame)

DanielHruby (Tue, 26 Feb 2019 07:52:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=y8SSwvszMMtEjQPDJ) @bretharrison Yes, I'm getting events but problem is that after some time I stopped getting events withou any error. These are my connection options {unregister: false, disconnect: false}. I was checking timeouts on grpc and if I had "grpc.http2.max_pings_without_data": 0, so after one ping without data connection was lost without any error. And than if peer wanted to send block to channeleventhub so it gets error: error="context finished before block retrieved: context canceled" grpc.code=Unknown. But client (channeleventhub) dosn't know about this error and still looks ok. Even if I call function checkConnection on ChannelEventHub it returns everything ok. So I set grpc.http2.max_pings_without_data: 1000 it works and every day I restart ChannelEventHub. I know this is not good solution, but for now this is only one what works for me.

MuhammedHafil (Tue, 26 Feb 2019 08:57:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CFjGNRJoM5MPGCrNw) any help with this? @bretharrison

kjroger94 (Tue, 26 Feb 2019 08:59:49 GMT):
trying to do private transaction,

kjroger94 (Tue, 26 Feb 2019 08:59:54 GMT):
`var invokecc = async function (channel) { // logger.debug(util.format('\n============ invoke transaction on channel %s ============\n', channel)); const client= channel._clientContext; const transient_data = { 'name': Buffer.from('marble4'), // string <-> byte[] 'color': Buffer.from('blue'), // string <-> byte[] 'owner': Buffer.from('Jo'), // string <-> byte[] 'size': Buffer.from('8'), // string <-> byte[] 'price': Buffer.from('80') // string <-> byte[] }; const tx_id = client.newTransactionID(); tx_id_string = tx_id.getTransactionID(); var request = { targets: ["org1-peer1"], chaincodeId : 'marble12', txId: tx_id, fcn: 'initMarble', args: [], // all data is transient data // transientMap: transient_data, // private data }; try { let results = await channel.sendTransactionProposal(request);`

kjroger94 (Tue, 26 Feb 2019 09:00:21 GMT):
` 2019-02-26 08:56:19.381 UTC [couchdb] handleRequest -> DEBU 164ed Exiting handleRequest() 2019-02-26 08:56:19.381 UTC [couchdb] ReadDoc -> DEBU 164ee part header=map[Content-Type:[application/json]] 2019-02-26 08:56:19.381 UTC [couchdb] ReadDoc -> DEBU 164ef part header=map[Content-Length:[259] Content-Encoding:[gzip] Content-Disposition:[attachment; filename="valueBytes"] Content-Type:[application/octet-stream]] 2019-02-26 08:56:19.381 UTC [couchdb] ReadDoc -> DEBU 164f0 Retrieved attachment data 2019-02-26 08:56:19.381 UTC [chaincode] HandleTransaction -> DEBU 164f1 [226a69eb] Completed GET_STATE. Sending RESPONSE 2019-02-26 08:56:19.381 UTC [shim] func1 -> DEBU 164f2 [226a69eb]Received message RESPONSE from peer 2019-02-26 08:56:19.381 UTC [shim] handleMessage -> DEBU 164f3 [226a69eb] Handling ChaincodeMessage of type: RESPONSE(state:ready) 2019-02-26 08:56:19.381 UTC [shim] sendChannel -> DEBU 164f4 [226a69eb] before send 2019-02-26 08:56:19.381 UTC [shim] sendChannel -> DEBU 164f5 [226a69eb] after send 2019-02-26 08:56:19.381 UTC [shim] handleReady -> DEBU 164f6 [226a69eb] Received RESPONSE, communicated (state:ready) 2019-02-26 08:56:19.381 UTC [shim] handleGetState -> DEBU 164f7 [226a69eb] GetState received payload RESPONSE 2019-02-26 08:56:19.381 UTC [shim] func1 -> DEBU 164f8 [226a69eb] Transaction completed. Sending COMPLETED 2019-02-26 08:56:19.381 UTC [shim] triggerNextState -> DEBU 164f9 [226a69eb] send state message COMPLETED 2019-02-26 08:56:19.381 UTC [chaincode] handleMessage -> DEBU 164fa [226a69eb] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready 2019-02-26 08:56:19.381 UTC [chaincode] Notify -> DEBU 164fb [226a69eb] notifying Txid:226a69eb7e8e5159d316d4dce678b4bb2b1302619a9ac5105a6f8a011333bfb3, channelID:mychannel 2019-02-26 08:56:19.381 UTC [chaincode] Execute -> DEBU 164fc Exit 2019-02-26 08:56:19.381 UTC [ccprovider] GetChaincodeData -> DEBU 164fd Getting chaincode data for from cache 2019-02-26 08:56:19.382 UTC [endorser] callChaincode -> DEBU 164fe [mychannel][226a69eb7e8e5159d316d4dce678b4bb2b1302619a9ac5105a6f8a011333bfb3] Entry chaincode: name:"marble12" version: 1.0 2019-02-26 08:56:19.382 UTC [ccprovider] NewCCContext -> DEBU 164ff NewCCCC(chain=mychannel,chaincode=marble12,version=1.0,txid=226a69eb7e8e5159d316d4dce678b4bb2b1302619a9ac5105a6f8a011333bfb3,syscc=false,proposal=0xc4274fa320,canname=marble12:1.0) 2019-02-26 08:56:19.382 UTC [chaincode] execute -> DEBU 16500 canonical name: marble12:1.0 2019-02-26 08:56:19.382 UTC [chaincode] Execute -> DEBU 16501 Entry 2019-02-26 08:56:19.382 UTC [chaincode] handleMessage -> DEBU 16502 [226a69eb] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready 2019-02-26 08:56:19.382 UTC [chaincode] Notify -> DEBU 16503 [226a69eb] notifying Txid:226a69eb7e8e5159d316d4dce678b4bb2b1302619a9ac5105a6f8a011333bfb3, channelID:mychannel 2019-02-26 08:56:19.382 UTC [chaincode] Execute -> DEBU 16504 Exit 2019-02-26 08:56:19.382 UTC [endorser] callChaincode -> DEBU 16505 [mychannel][226a69eb7e8e5159d316d4dce678b4bb2b1302619a9ac5105a6f8a011333bfb3] Exit 2019-02-26 08:56:19.382 UTC [lockbasedtxmgr] GetTxSimulationResults -> DEBU 16506 Simulation completed, getting simulation results 2019-02-26 08:56:19.382 UTC [lockbasedtxmgr] Done -> DEBU 16507 Done with transaction simulation / query execution [226a69eb7e8e5159d316d4dce678b4bb2b1302619a9ac5105a6f8a011333bfb3] 2019-02-26 08:56:19.382 UTC [endorser] SimulateProposal -> DEBU 16508 [mychannel][226a69eb] Exit 2019-02-26 08:56:19.382 UTC [endorser] ProcessProposal -> ERRO 16509 [mychannel][226a69eb] simulateProposal() resulted in chaincode name:"marble12" response status 500 for txid: 226a69eb7e8e5159d316d4dce678b4bb2b1302619a9ac5105a6f8a011333bfb3 2019-02-26 08:56:19.382 UTC [lockbasedtxmgr] Done -> DEBU 1650a Done with transaction simulation / query execution [226a69eb7e8e5159d316d4dce678b4bb2b1302619a9ac5105a6f8a011333bfb3]`

kjroger94 (Tue, 26 Feb 2019 09:00:39 GMT):
it is giving status 500 on proposal

Amjadnz (Tue, 26 Feb 2019 09:49:51 GMT):
Another error - if someone can help: ```2019-02-26 09:49:08.375 UTC [core.comm] ServerHandshake -> ERRO 08a TLS handshake failed with error tls: client didn't provide a certificate {"server": "ChaincodeServer", "remote address": "172.19.0.13:39270"} 2019-02-26 09:49:08.376 UTC [grpc] handleRawConn -> DEBU 08b grpc: Server.Serve failed to complete security handshake from "172.19.0.13:39270": tls: client didn't provide a certificate 2019-02-26 09:49:08.377 UTC [peer.chaincode.dev-peer0.ksa.worldbbn.org-kyc_bbnlist-v0] func2 -> INFO 08c 2019-02-26 09:49:08.375 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: remote error: tls: bad certificate``` The example chaincode (example_cc) deploys fine on my network, now installing my custom chaincode ("vendored") - is having this issue.

Amjadnz (Tue, 26 Feb 2019 09:49:51 GMT):
Another error - if someone can help: ```2019-02-26 09:49:08.375 UTC [core.comm] ServerHandshake -> ERRO 08a TLS handshake failed with error tls: client didn't provide a certificate {"server": "ChaincodeServer", "remote address": "172.19.0.13:39270"} 2019-02-26 09:49:08.376 UTC [grpc] handleRawConn -> DEBU 08b grpc: Server.Serve failed to complete security handshake from "172.19.0.13:39270": tls: client didn't provide a certificate 2019-02-26 09:49:08.377 UTC [peer.chaincode.dev-peer0.ksa.worldbbn.org-kyc_bbnlist-v0] func2 -> INFO 08c 2019-02-26 09:49:08.375 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: remote error: tls: bad certificate``` The example chaincode (example_cc) deploys fine on my network, now instantiating my custom chaincode ("vendored") - is having this issue.

Amjadnz (Tue, 26 Feb 2019 09:49:51 GMT):
Another error - if someone can help: ```2019-02-26 09:49:08.375 UTC [core.comm] ServerHandshake -> ERRO 08a TLS handshake failed with error tls: client didn't provide a certificate {"server": "ChaincodeServer", "remote address": "172.19.0.13:39270"} 2019-02-26 09:49:08.376 UTC [grpc] handleRawConn -> DEBU 08b grpc: Server.Serve failed to complete security handshake from "172.19.0.13:39270": tls: client didn't provide a certificate 2019-02-26 09:49:08.377 UTC [peer.chaincode.dev-peer0.k1.w1.org-kyc_bbnlist-v0] func2 -> INFO 08c 2019-02-26 09:49:08.375 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: remote error: tls: bad certificate``` The example chaincode (example_cc) deploys fine on my network, now instantiating my custom chaincode ("vendored") - is having this issue.

Amjadnz (Tue, 26 Feb 2019 09:50:36 GMT):
The above is a peer0 log - where the example_cc went fine but instantiation my custom chaincode is giving the error

florianc (Tue, 26 Feb 2019 09:55:03 GMT):
Hello. ` enroll(req) Enroll the member and return an opaque member object. ` What does opaque mean?

florianc (Tue, 26 Feb 2019 09:55:16 GMT):
(in this context)

florianc (Tue, 26 Feb 2019 10:14:59 GMT):
Hello. I have a question concerning certificates and the SDk. Lets say I create a new identity, for Bob, through code with new Fabric_CA_Client('https:URL', null ,'org1CA', crypto_suite); and createUser(). The certificate is returned to me and saved on my local server. But what if Bob needs to access the blockchain from another server, that obviously does not have this certificate? Do I have to manually put it in the server's file system? Is there a way to retrieve it from fabric itself? (I guess not, but, hey, who knows:)

MuhammedHafil (Tue, 26 Feb 2019 10:57:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CFjGNRJoM5MPGCrNw) How to create affiliations if I enrolled admin user as given here? https://github.com/hyperledger/fabric-samples/tree/release-1.4/fabcar/javascript WHat is the corresponding of fabrc_client .getUserContext if using latest wallet and gatway?

Aniket.1 (Tue, 26 Feb 2019 12:38:08 GMT):
Has joined the channel.

rohitsethi (Tue, 26 Feb 2019 12:38:36 GMT):
Has joined the channel.

Ikdem (Tue, 26 Feb 2019 12:58:02 GMT):
Has joined the channel.

johnfilippone (Tue, 26 Feb 2019 14:18:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HSmXdceFx2qaHhSAp) @davidkhala Is there a recommended version of the sdk for HL v1.4

bretharrison (Tue, 26 Feb 2019 14:21:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KQDSZXgrZnp8uowkD) @Rajatsharma creating channels is a rare operation so either is fine

SanketPanchamia (Tue, 26 Feb 2019 14:25:55 GMT):

Clipboard - February 26, 2019 7:55 PM

SanketPanchamia (Tue, 26 Feb 2019 14:26:06 GMT):
Hi I am trying to run the fabric network in a swarm environment and it fails in the instantiate chaincode part where i get the error as below i have added 2 environment variables as below -CORE_PEER_ADDRESSAUTODETECT=true - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 But still it gives the same error

SanketPanchamia (Tue, 26 Feb 2019 14:26:06 GMT):
Hi I am trying to run the fabric network in a swarm environment and it fails in the instantiate chaincode part where i get the error as above i have added 2 environment variables as below -CORE_PEER_ADDRESSAUTODETECT=true - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 But still it gives the same error

SanketPanchamia (Tue, 26 Feb 2019 14:26:06 GMT):
Hi I am trying to run the fabric network in a swarm environment and it fails in the instantiate chaincode part where i get the error as above. This is the log of the dev container that gets generated when the chaincode is instantiated. i have added 2 environment variables as below -CORE_PEER_ADDRESSAUTODETECT=true - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 But still it gives the same error Any help will be appreciated

Amjadnz (Tue, 26 Feb 2019 14:54:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gtrKzrWrSzz9nNSBi) My issue is now resolved - it was govendor stuffs - was packaging a different version of SHIM than that 1.4 version. This wonderful video of @muralisr helped me. https://www.youtube.com/watch?v=-mlUaJbFHcM&t=182s

mahoney1 (Tue, 26 Feb 2019 16:34:10 GMT):
@johnfilippone 1.4 -> https://fabric-sdk-node.github.io/release-1.4/index.html

rsoeldner (Tue, 26 Feb 2019 19:23:38 GMT):
Hi, is there a way to query the ca (fabric-ca) over the node sdk, requesting the public key of a specific id ?

DtmCarlson (Tue, 26 Feb 2019 20:13:02 GMT):
Hi - has anyone used the channel.queryTransaction ? i'm trying to get details on a specific transaction id that i pass in const result = await channel.queryTransaction(tx_id); but im getting back the literal string "[object Object]" and i cant see anything durning debugging. peer logs dont show any errors - not sure what i am doing wrong

DtmCarlson (Tue, 26 Feb 2019 20:13:57 GMT):
https://fabric-sdk-node.github.io/master/Channel.html#queryTransaction__anchor

davidkhala (Wed, 27 Feb 2019 04:27:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GDoaDK9SyqEJvu6is) @johnfilippone tag `1.4.0` and it is the latest

ShefaliMittal (Wed, 27 Feb 2019 07:50:13 GMT):
Hi, While using fabric-ca-client I can create and customize values in fabric-ca-client configuration file. Do I have the similar option while using sdk for interacting with fabric ca server.

VadimInshakov (Wed, 27 Feb 2019 08:13:51 GMT):
What is `role` in enroll request? I see it in fabcar sample: ``` // need to enroll it with CA server return fabric_ca_client.enroll({ enrollmentID: 'OrgAdmin', enrollmentSecret: 'OrgAdminPass', role: 'admin' }).then((enrollment) => { ``` There is no such field in the node sdk documentation. What does it mean?

VadimInshakov (Wed, 27 Feb 2019 08:22:18 GMT):
and here: ``` fabric_ca_client.register({enrollmentID: 'user1', affiliation: '13Org.department1',role: 'client'}, admin_user); ``` (I changed only `affiliation` section, but `role` property is from fabcar example)

VadimInshakov (Wed, 27 Feb 2019 08:31:38 GMT):

ca.png

Aniket.1 (Wed, 27 Feb 2019 08:40:28 GMT):
I am following this tutorial : https://fabric-sdk-node.github.io/release-1.4/tutorial-channel-events.html to register the chaincode event listener. I got the listner called but not getting 'payload' data in it. Please help

rthatcher (Wed, 27 Feb 2019 09:57:04 GMT):
@VadimInshakov - the EnrollmentRequest object does not have the role property. The RegisterRequest object does have the Role property, and it is documented here: https://fabric-sdk-node.github.io/master/global.html#RegisterRequest

VadimInshakov (Wed, 27 Feb 2019 11:48:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=66s9NSGr3RWNbXpSk) @rthatcher Where I can find description of these roles? What does `admin`, `client`, `peer` and `member` means?

mahoney1 (Wed, 27 Feb 2019 12:03:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CtFAA5eEXctJzQqMD) @DtmCarlson that's correct - you get back a ProcessedTransaction object as per https://fabric-sdk-node.github.io/master/global.html#ProcessedTransaction - you need to traverse to `data` and check the `actions` array (to check the proposal response payload for example) of the Transaction returned https://fabric-sdk-node.github.io/master/global.html#Transaction eg something like ```let trxn = await channel.queryTransaction(trxnID, peer); /// trxnID = b395f48d2763dc4e320f52303fb832e9bc5dcf294eefb4f12a9df3ebf5b0c867 console.log('creator MSP id ' + trxn.transactionEnvelope.payload.data.actions[0].header.creator.Mspid); console.log('transaction payload rw set read key is ' + trxn.transactionEnvelope.payload.data.actions[0].payload.action.proposal_response_payload.extension.results.ns_rwset[0].rwset.reads[0].key); console.log('transaction payload rw set writes key is ' + trxn.transactionEnvelope.payload.data.actions[0].payload.action.proposal_response_payload.extension.results.ns_rwset[0].rwset.writes[0].key); ```

mahoney1 (Wed, 27 Feb 2019 12:03:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CtFAA5eEXctJzQqMD) @DtmCarlson that's correct - you get back a ProcessedTransaction object as per https://fabric-sdk-node.github.io/master/global.html#ProcessedTransaction - you need to traverse to `data` and check the `actions` array (to check the proposal response payload for example) of the Transaction returned https://fabric-sdk-node.github.io/master/global.html#Transaction eg something like ```let trxn = await channel.queryTransaction(trxnID, peer); /// trxnID = b395f48d2763dc4e320f52303fb832e9bc5dcf294eefb4f12a9df3ebf5b0c867 and a peer variable console.log('creator MSP id ' + trxn.transactionEnvelope.payload.data.actions[0].header.creator.Mspid); console.log('transaction payload rw set read key is ' + trxn.transactionEnvelope.payload.data.actions[0].payload.action.proposal_response_payload.extension.results.ns_rwset[0].rwset.reads[0].key); console.log('transaction payload rw set writes key is ' + trxn.transactionEnvelope.payload.data.actions[0].payload.action.proposal_response_payload.extension.results.ns_rwset[0].rwset.writes[0].key); ```

mahoney1 (Wed, 27 Feb 2019 12:03:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CtFAA5eEXctJzQqMD) @DtmCarlson that's correct - you get back a ProcessedTransaction object as per https://fabric-sdk-node.github.io/master/global.html#ProcessedTransaction - you need to traverse to `data` and check the `actions` array (to check the proposal response payload for example) of the Transaction returned https://fabric-sdk-node.github.io/master/global.html#Transaction eg something like ```let trxn = await channel.queryTransaction(trxnID, peer); /// trxnID = b395f48d2763dc4e320f52303fb832e9bc5dcf294eefb4f12a9df3ebf5b0c867 and a peer variable console.log('creator MSP id ' + trxn.transactionEnvelope.payload.data.actions[0].header.creator.Mspid); console.log('transaction payload rw set 1st read key is ' + trxn.transactionEnvelope.payload.data.actions[0].payload.action.proposal_response_payload.extension.results.ns_rwset[0].rwset.reads[0].key); console.log('transaction payload rw set 1st writes key is ' + trxn.transactionEnvelope.payload.data.actions[0].payload.action.proposal_response_payload.extension.results.ns_rwset[0].rwset.writes[0].key); ```

florianc (Wed, 27 Feb 2019 12:48:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kswNJj3NBzbuvyPQR) @VadimInshakov Optional arbitrary string representing a role value for the user Source: the link provided

VadimInshakov (Wed, 27 Feb 2019 13:26:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iozcJx532Zsd2FDRo) @florianc It can be not only the `admin`, `client`, `peer` and `member`? But what is the `admin`, `client`, `peer` and `member` roles that we specify in endorsment policy?

Legiit (Wed, 27 Feb 2019 13:53:51 GMT):
can you get the `privateKeyPEM` and `signedCertPEM` from the `getUserContext` function? I'd need these

VadimInshakov (Wed, 27 Feb 2019 13:59:57 GMT):
Can I send tx proposal on endorser peer from another organization? How, in this case, will the certificate be checked if it is issued in another organization?

dave.enyeart (Wed, 27 Feb 2019 14:56:23 GMT):
Yes, getting endorsements from multiple organizations is required in many use cases. Each endorsing peer uses the root certs in the latest channel config transaction to authenticate that the requestor has credentials to make proposals to the channel.

VadimInshakov (Wed, 27 Feb 2019 15:04:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RpixPvqYopZgeFZtr) @dave.enyeart Very thanks for your response. What `root certs` did you mean? Root CA? What if I have two independent CA without root and intermediate?

VadimInshakov (Wed, 27 Feb 2019 15:46:15 GMT):
Does `query` requests is needed to be sent to endorsing peers or it can be sent to any peer?

dave.enyeart (Wed, 27 Feb 2019 16:02:09 GMT):
@VadimInshakov If you have two orgs each with their own CA, then both root certs will be included in the channel configuration so that all members of the channel can authenticate incoming messages from the other organizations. Some more discussion of this is at: https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#id2

dave.enyeart (Wed, 27 Feb 2019 16:03:54 GMT):
A query is just a regular invoke that doesn't do any PutState(). It can be sent to any peer that is a member of the channel. Often times people will want to query two peers to ensure the results are the same, for example query your own peer and somebody else's peer (sometimes this may be an auditor or regulator peer).

dave.enyeart (Wed, 27 Feb 2019 16:03:54 GMT):
A query is just a regular invoke that doesn't do any PutState(). It can be sent to any peer that is a member of the channel and that has the chaincode installed (there's no such thing as an 'endorsing peer'...it's just a regular peer that is a member of the channel and that has the chaincode installed). Often times people will want to query two peers to ensure the results are the same, for example query your own peer and somebody else's peer (sometimes this may be an auditor or regulator peer).

DtmCarlson (Wed, 27 Feb 2019 19:15:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=z9dWpnkqtjYyT6CRL) @mahoney1 Thanks @mahoney1

VadimInshakov (Wed, 27 Feb 2019 22:21:17 GMT):
@dave.enyeart Thanks! :relaxed:

Antimttr (Wed, 27 Feb 2019 23:06:24 GMT):
is there any corresponding SDK library call for this command? `fabric-ca-client identity list`

kjroger94 (Thu, 28 Feb 2019 07:00:25 GMT):
` const marble = { 'marblename': Buffer.from('marble4'), // string <-> byte[] 'color': Buffer.from('blu'), // string <-> byte[] 'size': Buffer.from('8'), // string <-> byte[] 'owner': Buffer.from('Jo'), // string <-> byte[] 'price': Buffer.from('80') // string <-> byte[] }; //var marble = {"marble": transient_data} const tx_id = client.newTransactionID(); tx_id_string = tx_id.getTransactionID(); var request = { //targets: ["service-peer1"], chaincodeId : 'marble', // chainId: 'mychannel', txId: tx_id, fcn: 'initMarble', args: [], // all data is transient data transientMap: marble, // private data };```` ```

kjroger94 (Thu, 28 Feb 2019 07:00:44 GMT):
I am getting an error on proposal

kjroger94 (Thu, 28 Feb 2019 07:00:57 GMT):
any ideas? has anyone tried this?

Legiit (Thu, 28 Feb 2019 07:04:32 GMT):
can you get the `privateKeyPEM` and `signedCertPEM` from the `getUserContext` function? I'd need these

xuchenhao001 (Thu, 28 Feb 2019 07:41:21 GMT):
Has left the channel.

florianc (Thu, 28 Feb 2019 08:00:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SaYwPAGJG2FMmmCqi) @Legiit Not sure, and don't think so. But you could try ;)

Legiit (Thu, 28 Feb 2019 08:01:19 GMT):
I only see the signedCertPEM

Legiit (Thu, 28 Feb 2019 08:01:33 GMT):
not sure how to derive the privateKeyPEM from it though @florianc

Legiit (Thu, 28 Feb 2019 08:01:39 GMT):
the object seems rather larger hehe

davidkel (Thu, 28 Feb 2019 08:15:16 GMT):
@Legiit see https://github.com/hyperledger/fabric-sdk-node/blob/3bc8b6c7bfc7e7ad9accfc14be14b1eb24fd14a7/fabric-network/lib/impl/wallet/x509walletmixin.js#L48

Antimttr (Thu, 28 Feb 2019 18:46:03 GMT):
for the balance transfer demo, does anyone know what the difference is between the JS and TS implementations of the api?

Antimttr (Thu, 28 Feb 2019 18:46:21 GMT):
like why do they both exist in the same demo, are they used in conjunction or are they completely seperate?

Antimttr (Thu, 28 Feb 2019 22:39:17 GMT):
anyone know for this object: https://fabric-sdk-node.github.io/release-1.4/FabricCAServices.html the url parameter, if i have a ca server as a docker on port 7054 would the url parameter be: 'http://localhost:7054" ?

Antimttr (Thu, 28 Feb 2019 22:39:24 GMT):
im getting timeout when i put that

Antimttr (Thu, 28 Feb 2019 22:45:39 GMT):
nm not getting timeout

Antimttr (Thu, 28 Feb 2019 22:45:54 GMT):
getting this: Error: fabric-ca request identities?ca=undefined failed with errors [[{"code":19,"message":"CA 'undefined' does not exist"}]]

Antimttr (Fri, 01 Mar 2019 02:19:18 GMT):
getConfigSetting(string) should get a configuration setting from the docker-compose.yaml file, correct?

Antimttr (Fri, 01 Mar 2019 02:19:27 GMT):
or network-config.yaml?

Antimttr (Fri, 01 Mar 2019 02:19:41 GMT):
I'm attempting to retrieve a CA url progmattically

Antimttr (Fri, 01 Mar 2019 02:22:14 GMT):
so basically i treid to call: `getConfigSetting('certificateauthorities-ca-org2-url') `

Antimttr (Fri, 01 Mar 2019 02:22:27 GMT):
because that's the structure i see in the network-config.yaml file

sstone1 (Fri, 01 Mar 2019 08:21:13 GMT):
@Antimttr getConfigSetting gets a config setting from this file (or from your version of this file) - https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/config/default.json

rthatcher (Fri, 01 Mar 2019 10:15:08 GMT):
@Antimttr - The Fabcar sample has an example of Registering and Enrolling a user from a CA which I assume is what you ultimately want to do. The Javascript variant of the sample uses the new Fabric 1.4 Gateway class/object , with a Connection Profile in JSON format and extracts the CA url. (The commercial paper sample also uses the 1.4 Gateway class/object with a Connection profile in YAML format - but it does not use the CA to register a user)

ChinmayIngle (Fri, 01 Mar 2019 10:30:47 GMT):
While trying to get the Certificate Authority using admin(using Node SDK) i am getting this error "[ERROR] Helper - [FabricCAClientService.js]: Failed to enroll admin, error:Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054] " When i googled this error it suggeted to "point the secretKey in docker-composer-yaml file for ca-fabric" I needed to confirm whether this secretkey is present in the crypto-config or at some other location. Can someone guide me Thank you!

rthatcher (Fri, 01 Mar 2019 11:00:41 GMT):
@ChinmayIngle - are you referring to this Stack Overflow post? https://stackoverflow.com/questions/48416805/calling-enrollment-endpoint-failed-with-error-error-connect-econnrefused What Fabric are you running? - a local version of the sample "basic-network"? First thing is to check the Fabric CA and see if it is running OK - you can do this by looking at the logs of the docker container for your CA, or perhaps just hitting this url for a local fabric: http://localhost:7054/api/v1/cainfo If you have run the cryptogen tool to generate crypto material, then your docker-compose.yaml file will need updating as per that Stack Overflow post - the long private key name will need to be replaced with the newly generated one which can be seen at this location for example `basic-network/crypto-config/peerOrganizations/org1.example.com/ca/`

gade (Fri, 01 Mar 2019 13:03:25 GMT):
Has joined the channel.

gade (Fri, 01 Mar 2019 13:04:13 GMT):
Hello, I am having an issue while working with Fabric SDK for NodeJS to enroll an identity. The issue is with the TLSOptions:https://fabric-sdk-node.github.io/release-1.4/global.html#TLSOptions in FabricCAServices. The trustedRoots asks for an array of PEM-encoded. What exactly will I be providing here. The path to certificate or the whole file as a string or buffer. Either way it is not working, throwing this error: [Error: unsupported certificate purpose]. But when I try the same thing using bash tool fabric-ca-client enroll returns successfully. Need help.

bestbeforetoday (Fri, 01 Mar 2019 16:26:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GM3zmuDpEobgfM5Na) @gade I believe the `trustedRoots` option maps to the `ca` option documented here: https://nodejs.org/docs/latest-v10.x/api/tls.html#tls_tls_createsecurecontext_options So it should be an array of strings (or Buffers) containing PEM-encoded CA certificates, only if you are using certificates for your TLS connection that are not chained to well-known CA root certificates

ChinmayIngle (Fri, 01 Mar 2019 17:39:26 GMT):
@rthatcher Yes i did refer to that post and i have created my network from scratch locally and my ca folder has two files so wanted to make sure m refering to the same key as required. Thanks for the answer i will try changing the path !

ChinmayIngle (Fri, 01 Mar 2019 17:39:26 GMT):
@rthatcher Yes i did refer to that post and i have created my network from scratch locally and my ca folder has two _sk files so wanted to make sure m refering to the same key as required. Thanks for the answer i will try changing the path !

rsoeldner (Fri, 01 Mar 2019 19:47:44 GMT):
I receiving back a `ServiceResponse` - how can i convert / print it ? Im using the https://fabric-sdk-node.github.io/release-1.4/IdentityService.html#getAll__anchor function

rsoeldner (Sun, 03 Mar 2019 08:25:32 GMT):
Hey, is there a way to request the public key from the ca for a corresponding enrollment id ?

rsoeldner (Sun, 03 Mar 2019 08:25:32 GMT):
Hey, is there a way to request the public key from the ca for a corresponding enrollment id ? I want to encrypt data for a specific enrollment id and store it.

ChinmayIngle (Sun, 03 Mar 2019 08:43:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CrzaMJd9u7JMk9Rky) - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt, /etc/hyperledger/crypto/peerOrg1/tls/ca.crt, /etc/hyperledger/crypto/peerOrg2/tls/ca.crt, /etc/hyperledger/crypto/peerOrg3/tls/ca.crt]

ChinmayIngle (Sun, 03 Mar 2019 08:43:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CrzaMJd9u7JMk9Rky) - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt, /etc/hyperledger/crypto/peerOrg1/tls/ca.crt, /etc/hyperledger/crypto/peerOrg2/tls/ca.crt, /etc/hyperledger/crypto/peerOrg3/tls/ca.crt] i have ca.crt files for each peer in an org and also for a user of an org, which one to use for this field in docker-compose file

ChinmayIngle (Sun, 03 Mar 2019 08:43:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CrzaMJd9u7JMk9Rky) - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt, /etc/hyperledger/crypto/peerOrg1/tls/ca.crt, /etc/hyperledger/crypto/peerOrg2/tls/ca.crt, /etc/hyperledger/crypto/peerOrg3/tls/ca.crt] i have ca.crt files for each peer in an org and also for a users like admin and normal user of an org, which one to use for this field in docker-compose file

cccc (Sun, 03 Mar 2019 11:23:24 GMT):
Has joined the channel.

sgdev (Mon, 04 Mar 2019 04:21:38 GMT):
Has joined the channel.

sgdev (Mon, 04 Mar 2019 04:27:48 GMT):
Hi. I cloned fabric node sdk. And I am trying to run tests. Tests keep on failing with error: E0303 23:26:12.557527813 11884 ssl_transport_security.cc:1229] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed I see the below on fabric n/w logs: peer0.org1.example.com | 2019-03-04 04:26:12.560 UTC [core.comm] ServerHandshake -> ERRO 021 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.1:41724"} peer0.org1.example.com | 2019-03-04 04:26:13.544 UTC [core.comm] ServerHandshake -> ERRO 022 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.1:41730"} peer0.org1.example.com | 2019-03-04 04:26:15.232 UTC [core.comm] ServerHandshake -> ERRO 023 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.1:41736"}

ygnr (Mon, 04 Mar 2019 05:45:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4TQ3QGjsmkw6HEDzF) @VadimInshakov Were you able to get an answer for this? If we define arbitrary string, How does Hyperledger know that a certificate belongs to organization admin? For example can I define role as `ADMIN` or `ORG_ADMIN`?

SanketPanchamia (Mon, 04 Mar 2019 09:06:59 GMT):

Clipboard - March 4, 2019 2:36 PM

SanketPanchamia (Mon, 04 Mar 2019 09:07:02 GMT):
Hi I am trying to run the fabric network in a swarm environment and it fails in the instantiate chaincode part where i get the error as above. This is the log of the dev container that gets generated when the chaincode is instantiated. - CORE_PEER_ADDRESSAUTODETECT=true - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 But still it gives the same error Any help will be appreciated

rthatcher (Mon, 04 Mar 2019 09:31:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a9EFA8t5NT2ztf2cZ) @sgdev I think the tests are failing because the certificates used for the tests have expired. There is a Change Request in progress that should fix the problem in the next day or two.

ahmadraza (Mon, 04 Mar 2019 10:14:07 GMT):
Has joined the channel.

mahoney1 (Mon, 04 Mar 2019 10:15:30 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)

MuhammedHafil (Mon, 04 Mar 2019 10:53:43 GMT):
Is it possible to pass arguments to constructor method of my chaincode contract , while getting contract like this? ``` const contract = await network.getContract('papercontract', 'org.papernet.commercialpaper'); ```

sstone1 (Mon, 04 Mar 2019 11:09:09 GMT):
@MuhammedHafil no - what are you trying to achieve?

ygnr (Mon, 04 Mar 2019 11:54:05 GMT):
How to create an admin user from node SDK? Where should I specify that role is admin. I have followed `enrollAdmin.js` file on `fabric-samples`. I see that `enrollAdmin.js` adds a user from bootstrapped user on fabric ca clinet. I am looking to add more admins.

MuhammedHafil (Mon, 04 Mar 2019 13:28:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LR5fAhrXK6YcMKSaM) @sstone1 Nothing, just a doubt. is there anyway to get the namespace (`org.papernet.commercialpaper`) we passed to the Contract class from chaincode class? ``` constructor() { // Unique namespace when multiple contracts per chaincode file super('org.papernet.commercialpaper'); } ```

MuhammedHafil (Mon, 04 Mar 2019 13:28:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LR5fAhrXK6YcMKSaM) @sstone1 Nothing, just a doubt. is there anyway to get the namespace (`org.papernet.commercialpaper`) we passed to the Contract class from chaincode class? ``` constructor() { Unique namespace when multiple contracts per chaincode file super('org.papernet.commercialpaper'); } ```

sstone1 (Mon, 04 Mar 2019 13:39:50 GMT):
from your client application, are you trying to discover what smart contract namespaces and transaction functions available for any instantiated smart contract?

rthatcher (Mon, 04 Mar 2019 13:43:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=W6RwS5ntLbgHFPHFT) @ygnr Are you looking to add a new administrator for the CA to enable you to register new IDs, or are you looking to create a new administrator of a Peer?

MuhammedHafil (Mon, 04 Mar 2019 14:00:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jYz3bYxad966uA5dr) @sstone1 1. trying to access namespace of chaincode from chaincode itself 2. trying to get namespace from client

MuhammedHafil (Mon, 04 Mar 2019 14:06:24 GMT):
Also , it it possible to communicate with other smart contracts of same chaincode just by importing them?

MuhammedHafil (Mon, 04 Mar 2019 14:08:27 GMT):
like this ``` const { Contract } = require('fabric-contract-api'); const Vehicle = require("./vehicle"); class FabCar extends Contract { constructor() { super("org.finlead.Car") } async fabcarMethod(){} } ```

MuhammedHafil (Mon, 04 Mar 2019 14:08:27 GMT):
like this ``` const { Contract } = require('fabric-contract-api'); const Vehicle = require("./vehicle"); class FabCar extends Contract { constructor() { super("org.finlead.Car") } async fabcarMethod(){ var test = Vehicle.somemethod() } } ```

MuhammedHafil (Mon, 04 Mar 2019 14:08:27 GMT):
like this ``` const { Contract } = require('fabric-contract-api'); const Vehicle = require("./vehicle"); class FabCar extends Contract { constructor() { super("org.finlead.Car") } async fabcarMethod() { var test = Vehicle.somemethod() } } ```

MuhammedHafil (Mon, 04 Mar 2019 14:08:27 GMT):
like this ``` const { Contract } = require('fabric-contract-api'); const Vehicle = require("./vehicle"); class FabCar extends Contract { constructor() { super("org.finlead.Car") } async fabcarMethod() { var test = Vehicle.somemethod() } } ```

MuhammedHafil (Mon, 04 Mar 2019 14:08:27 GMT):
like this ``` const { Contract } = require('fabric-contract-api'); const Vehicle = require("./vehicle"); class FabCar extends Contract { constructor() { super("org.finlead.Car") } async fabcarMethod() { var test = Vehicle.somemethod() } } ```

florianc (Mon, 04 Mar 2019 16:18:37 GMT):
Hello. I would like to know what is the number of the last block of the channel, but I am not able to find a function in the SDK that does this. Anyone could guide me? Thanks.

14gracel (Mon, 04 Mar 2019 16:32:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=85cKocYDJYddJe9cY) @florianc https://fabric-sdk-node.github.io/release-1.4/Channel.html#queryInfo__anchor will return an object containing the current block height, meaning the current block number is 1 - block height

florianc (Mon, 04 Mar 2019 16:32:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7zyGApDAEJAQYPHdc) @14gracel Checking this out, thank you!

rthatcher (Mon, 04 Mar 2019 16:36:32 GMT):
@MuhammedHafil - 1) From a chaincode you can find the name of the function called including the namespace by using the method `ctx.stub.getFunctionAndParameters()` - https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html#getFunctionAndParameters__anchor 2) from your client application you can call the System Transaction to get metadata including the namespace of the contract by calling the T`org.hyperledger.fabric:GetMetadata`

rthatcher (Mon, 04 Mar 2019 16:36:32 GMT):
@MuhammedHafil - 1) From a chaincode you can find the name of the function called including the namespace by using the method `ctx.stub.getFunctionAndParameters()` - https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html#getFunctionAndParameters__anchor 2) from your client application you use the System Transaction to get metadata including the namespace of the contract by submitting the transaction `org.hyperledger.fabric:GetMetadata`

ygnr (Mon, 04 Mar 2019 23:08:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=uKGAkQphB8DZ7WiTJ) @rthatcher I am looking to create a administrator of a peer

ajmeraharsh (Tue, 05 Mar 2019 06:18:11 GMT):
Has joined the channel.

ajmeraharsh (Tue, 05 Mar 2019 06:19:53 GMT):
Does the lastest sdk-node allows `transient` field for passing Private Data?

Aniket.1 (Tue, 05 Mar 2019 06:42:52 GMT):
node sdk allows @ajmeraharsh

ajmeraharsh (Tue, 05 Mar 2019 06:44:02 GMT):
thanks Aniket, can you please help me with a sample piece of code? I know it was there in v1.2.0 but couldn't find it in latest v1.4.0

ajmeraharsh (Tue, 05 Mar 2019 06:44:02 GMT):
thanks @Aniket.1 , can you please help me with a sample piece of code? I know it was there in v1.2.0 but couldn't find it in latest v1.4.0

florianc (Tue, 05 Mar 2019 08:05:25 GMT):

Clipboard - March 5, 2019 9:05 AM

florianc (Tue, 05 Mar 2019 08:05:32 GMT):
Hello. There is something I don't understand with the block events. The documentation says that the structure of a block object would be the following (https://fabric-sdk-node.github.io/release-1.4/global.html#Block) but when I query my ledger, I get something like: (see above)

florianc (Tue, 05 Mar 2019 08:06:00 GMT):
So I get something completely different. Can someone explain me why?

florianc (Tue, 05 Mar 2019 09:06:38 GMT):
Same question for the chaincode object retrieved from chaincode event listenner.

florianc (Tue, 05 Mar 2019 09:06:49 GMT):
On my side, no payload is returned

florianc (Tue, 05 Mar 2019 09:07:52 GMT):

That isClipboard - March 5, 2019 10:07 AM

florianc (Tue, 05 Mar 2019 09:16:09 GMT):
OOOH! Ok I got it. It is because I did not pass the true param to the connect function, so i received filtered informations.

florianc (Tue, 05 Mar 2019 09:16:09 GMT):
OOOH! Ok I got it. It is because I did not pass the true param to the connect function, so i received filtered information.

florianc (Tue, 05 Mar 2019 09:16:09 GMT):
OOOH! Ok I got it. It is because I did not pass the true param to the connect function, so i received filtered information. (In case anyone has the problem)

ashlinSajan (Tue, 05 Mar 2019 09:22:09 GMT):
@dave.enyeart Can idemix be done using node sdk?

MuhammedHafil (Tue, 05 Mar 2019 09:33:10 GMT):
I have multiple smarcontracts in a chaincode file. But not able to call them via cli, says method does exist

MuhammedHafil (Tue, 05 Mar 2019 09:53:02 GMT):
like this?

MuhammedHafil (Tue, 05 Mar 2019 09:53:27 GMT):

Screenshot from 2019-03-05 14-39-50.png

MuhammedHafil (Tue, 05 Mar 2019 09:54:01 GMT):
As you can see each customer.js,vendor.js and platform.js are different contracts

mahoney1 (Tue, 05 Mar 2019 10:30:31 GMT):
@MuhammedHafil check out and compare with the Commercial Paper example (contract and calling client in the magnetocorp dir) for examples of Contract and calling transaction methods (I assume this is what you refer) and ensure the module us exported at the end.. https://github.com/hyperledger/fabric-samples/blob/release-1.4/commercial-paper/organization/magnetocorp/contract/lib/papercontract.js#L31

mahoney1 (Tue, 05 Mar 2019 10:30:31 GMT):
@MuhammedHafil check out and compare with the Commercial Paper example (contract and calling client in the magnetocorp dir) for examples of Contract and calling transaction methods (I assume this is what you refer) and ensure the module us exported at the end.. https://github.com/hyperledger/fabric-samples/blob/release-1.4/commercial-paper/organization/magnetocorp/contract/lib/papercontract.js#L31 or CLI example `peer chaincode invoke -o orderer1.magnetocorp.example.com:7050 -C papernet -c '{"Args":["org.papernet.commercialpaper:issue", "MagnetoCorp", "02", "2020-05-31", "2020-11-30", "500"]}' -n papercontract`

MuhammedHafil (Tue, 05 Mar 2019 10:38:57 GMT):
Yes, but in that example only one Contract class is using right, name `CommercialPaperContract`? is it possible to have multiple contracts per chaincode? in the example , in `index.js` you can see only `cpcontract` being exported Can this be multiple contracts? i hope so, since it `module.exports.contracts` is an array https://github.com/hyperledger/fabric-samples/blob/release-1.4/commercial-paper/organization/magnetocorp/contract/index.js#L8

MuhammedHafil (Tue, 05 Mar 2019 10:38:57 GMT):
Yes, but in that example only one Contract class is using right, named `CommercialPaperContract`? is it possible to have multiple contracts per chaincode? in the example , in `index.js` you can see only `cpcontract` being exported Can this be multiple contracts? i hope so, since it `module.exports.contracts` is an array https://github.com/hyperledger/fabric-samples/blob/release-1.4/commercial-paper/organization/magnetocorp/contract/index.js#L8

MuhammedHafil (Tue, 05 Mar 2019 10:38:57 GMT):
Yes, but in that example only one Contract class is using right, named `CommercialPaperContract`? is it possible to have multiple contracts per chaincode? in the example , in `index.js` you can see only `cpcontract` being exported Can this be multiple contracts? i hope so, since i`module.exports.contracts` is an array https://github.com/hyperledger/fabric-samples/blob/release-1.4/commercial-paper/organization/magnetocorp/contract/index.js#L8

MuhammedHafil (Tue, 05 Mar 2019 10:38:57 GMT):
Yes, but in that example only one Contract class is using right, named `CommercialPaperContract`? is it possible to have multiple contracts per chaincode? in the example , in `index.js` you can see only `cpcontract` being exported Can this be multiple contracts? i hope so, since `module.exports.contracts` is an array https://github.com/hyperledger/fabric-samples/blob/release-1.4/commercial-paper/organization/magnetocorp/contract/index.js#L8

MuhammedHafil (Tue, 05 Mar 2019 10:40:50 GMT):
anyway it was not working, got below error. modules was exporting properly ``` Error: endorsement failure during invoke. response: status:500 message:"transaction returned with failure: Error: You've asked to invoke a function that does not exist ```

MuhammedHafil (Tue, 05 Mar 2019 10:41:53 GMT):
@mahoney1 : Thanks any way

mahoney1 (Tue, 05 Mar 2019 10:52:56 GMT):
@yes its possible - are you using namespaces, correct addressability to your contracts maybe? see https://github.com/hyperledger/fabric-samples/blob/release-1.4/commercial-paper/organization/magnetocorp/application/issue.js#L63

MuhammedHafil (Tue, 05 Mar 2019 11:02:19 GMT):
Yes. only difference im trying to invoke via cli, not js app, im not there yet

MuhammedHafil (Tue, 05 Mar 2019 11:02:19 GMT):
Yes. only difference is im trying to invoke via cli, not js app, im not there yet

dave.enyeart (Tue, 05 Mar 2019 11:33:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qq5HNMWcLQyToERG6) @ashlinSajan No, the required crypto library is only available in Java.

MuhammedHafil (Tue, 05 Mar 2019 14:08:09 GMT):
@mahoney1 : I can confirm that, If we are using multiple smart contracts with different namespaces in same chaincode , only the first smart contract class exported to contracts array can be accessed through cli, but works fine with node sdk

Antimttr (Tue, 05 Mar 2019 16:17:21 GMT):
@dave.enyeart is there any chance of that changing in the future? idemix is such a great thing but its a bummer that its only java, no go either?

dave.enyeart (Tue, 05 Mar 2019 16:24:37 GMT):
We'd love an idemix port to node.js and go, if you know of any good crypto engineers.

rthatcher (Tue, 05 Mar 2019 17:27:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iHfzQYnNEgCcrc7qy) @ygnr OK to administer a Peer you need to add the certificate of the administrator to this folder on the peer: `/etc/hyperledger/peer/msp/admincerts/` . That should give the new ID the ability to Install chaincode. In order to Instantiate chaincode I think you will need to modify the configuration of the Channel to include the Certificate of the Administrator. This tutorial doc shows how to add an organisation to the channel, so it will be a similar process for adding an administrator.

Antimttr (Tue, 05 Mar 2019 18:44:49 GMT):
is there a good example of a Java api like the nodejs api in balance-transfer?

Antimttr (Tue, 05 Mar 2019 18:45:13 GMT):
im preferably looking for a java sdk implementation into an api like balance transfer does

VadimInshakov (Tue, 05 Mar 2019 19:57:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=S2XDiwDNL4csqLM38) @ygnr I have the same questions

ygnr (Wed, 06 Mar 2019 04:09:16 GMT):
@VadimInshakov @rthatcher This is what I think from my research. Correct me If I am wrong. There is no difference in X.509 certificates between admin and normal user. Certificate gets admin privileges if that certificate is in `admincerts` in `msp`

ygnr (Wed, 06 Mar 2019 04:09:16 GMT):
@VadimInshakov This is what I think from my research. Correct me If I am wrong. There is no difference in X.509 certificates between admin and normal user. Certificate gets admin privileges if that certificate is in `admincerts` in `msp`

ygnr (Wed, 06 Mar 2019 04:09:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ctNgwLeZqmPWvCjXv) @rthatcher Thanks, thought the same

dheerajsuvarna (Wed, 06 Mar 2019 08:56:05 GMT):
Has joined the channel.

nasht00 (Wed, 06 Mar 2019 09:54:30 GMT):
Hello, Using `this.stub.getCreator()` I get ``` {"mspid":"org1msp","id_bytes":{"buffer":{"0":10,"1":142,"2":7,"3":10,"4":107,"5":8,"6":3,"7":16,"8":1,"9":26,"10":11,"11":8,"12":225,"13":176,"14":254,"15":227,"16":5"41":97,"42":99,"43":55,"44":52,"45":98,"46":97,"47":54,"48":54,"49":50,"50":56,"51":54,"52":101,"53":56,"54":55,"55":99,"56":54,"57":50,"58":52,"59":100,":104,"368":104,"369":98,"3},"offset":130,"markedOffset":-1,"limit":887,"littleEndian":true,"noAssert":false}} ``` What am I supposed to do with this buffer? I need to know the enrollmentID and CA Name...

VadimInshakov (Wed, 06 Mar 2019 09:54:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rxkroHJdSmCFypDSy) @ygnr There is no difference, where cert placed. Really cert role should be marked in cert attributes or in CA registry - I don't know this exatly

bestbeforetoday (Wed, 06 Mar 2019 09:55:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7Pbz79e4yy2dby57K) @ajmeraharsh It is implemented in the high-level API from 1.4 onwards: - https://fabric-sdk-node.github.io/release-1.4/tutorial-private-data.html - https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Transaction.html#setTransient__anchor You want something like: ```const transientData = { price: Buffer.from('42'); }; const result = contract.createTransaction('myTransaction') .setTransient(transientData) .evaluate(...);```

bestbeforetoday (Wed, 06 Mar 2019 09:55:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7Pbz79e4yy2dby57K) @ajmeraharsh It is implemented in the high-level API from 1.4 onwards: - https://fabric-sdk-node.github.io/release-1.4/tutorial-private-data.html - https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Transaction.html#setTransient__anchor You want something like: const transientData = { price: Buffer.from('42'); }; const result = contract.createTransaction('myTransaction') .setTransient(transientData) .evaluate(...);

bestbeforetoday (Wed, 06 Mar 2019 09:57:04 GMT):
Not sure if it was you asking in the related Jira the other day :)

ajmeraharsh (Wed, 06 Mar 2019 09:57:25 GMT):
Thanks a lot @bestbeforetoday , that's pretty helpful. I got the answer from sdk-py channel :) Done with putting and retrieving Private Data

ajmeraharsh (Wed, 06 Mar 2019 09:57:45 GMT):
Ohh yes, you got that right about Jira as well

florianc (Wed, 06 Mar 2019 10:01:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xb7GNHJFQaBYoo8kA) @nasht00 In javascript, parse it using toString("utf-8")

florianc (Wed, 06 Mar 2019 10:01:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=xb7GNHJFQaBYoo8kA) @nasht00 In javascript, parse it using buffer.toString("utf-8")

nguansak (Wed, 06 Mar 2019 10:21:48 GMT):
Has joined the channel.

nasht00 (Wed, 06 Mar 2019 11:10:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=b8qkPGb94A3Q4dbBz) @florianc Thanks however this only converts it to string. What am I mean is, does Fabric provide APIs to get relevant information (enrollmentID and CA Name), or do I have to build my own x509 certificate parser etc... Doesn't fabric already parse this information somewhere ?

nasht00 (Wed, 06 Mar 2019 11:11:59 GMT):
I see there is a class called ClientIdentity ... that's probable a better approach. I don't understand the use of "getCreator"

nasht00 (Wed, 06 Mar 2019 11:23:26 GMT):
If anyone else is interested, this is what I have now: ``` let identity = new Shim.ClientIdentity(this.stub); let id = identity.getID(); logger.info("!!!!!!!!!! beforeTransaction CREATOR"); logger.info(id); let certificate = identity.getX509Certificate(); logger.info(certificate); logger.info("subject: " + certificate.subject.commonName); logger.info("issuer: " + certificate.issuer.commonName); ``` `getID` gives me `x509::/OU=client/CN=admin::/C=US/ST=California/L=San Francisco/O=org1.example.com/CN=ca.org1.example.com` While using the`getX509Certificate` API I can look at the subject and issuer common names directly.

mahoney1 (Wed, 06 Mar 2019 11:33:25 GMT):
@nasht00 nice one - again FYI - the same can be done (using 1.4 prog model you have access to the clientIdentity instance from the `ctx` transaction context ) eg as follows: ```let cid = ctx.clientIdentity; let id = cid.getID(); // X509 Certificate invoker is in CN form let CN = id.substring(id.indexOf("CN=") + 3, id.lastIndexOf("::")); return CN; // john etc``` hth

mahoney1 (Wed, 06 Mar 2019 11:33:25 GMT):
@nasht00 nice one - again FYI - the same can be accessed (using 1.4 prog model you have access to the clientIdentity instance from the `ctx` transaction context ) eg as follows: ```let cid = ctx.clientIdentity; let id = cid.getID(); // X509 Certificate invoker is in CN form let CN = id.substring(id.indexOf("CN=") + 3, id.lastIndexOf("::")); return CN; // john etc from a fcn ``` hth

mahoney1 (Wed, 06 Mar 2019 11:33:25 GMT):
@nasht00 nice one - again FYI - the same can be accessed (using 1.4 prog model you have access to the clientIdentity instance from the `ctx` transaction context ) eg as follows: ```let cid = ctx.clientIdentity; let id = cid.getID(); // X509 Certificate invoker is in CN form let CN = id.substring(id.indexOf("CN=") + 3, id.lastIndexOf("::")); return CN; // john etc rtn to a fcn ``` hth

nasht00 (Wed, 06 Mar 2019 11:34:12 GMT):
Another question, in the new 1.4 design pattern with "Contract". How do run some initialization code the first time chaincode is deployed? For example I want to put some starting data in the ledger. I assume I also need to make a difference between first time and updating chaincode, etc...

nasht00 (Wed, 06 Mar 2019 11:35:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GHpG5D3Cos8aNPcpt) @mahoney1 Yes I noticed that. Do you think one of the techniques will go away? Or both are valid?

mahoney1 (Wed, 06 Mar 2019 11:38:43 GMT):
@nasht00 it all depends on one's situation - would recommend to use 1.4 (if in a situ where they can use 1.4 but some may not be). On question of initialization - you could have a function that's called as a transaction (the upgrade 'instantiate' etc is independent if you need to do something else there etc) that initializes the ledger (once its there, its there :-)

mahoney1 (Wed, 06 Mar 2019 11:38:43 GMT):
@nasht00 it all depends on one's situation - would recommend to use 1.4 (if in a situ where they can use 1.4 but some may not be yet). On question of initialization - you could have a function that's called as a transaction (the upgrade 'instantiate' etc is independent if you need to do something else there etc) that initializes the ledger (once its there, its there :-)

mahoney1 (Wed, 06 Mar 2019 11:38:43 GMT):
@nasht00 it all depends on one's situation - would recommend to use 1.4 (if in a situ where they can use 1.4 but some may not be yet). On question of initialization - you could have a function that's called as a one-off transaction (the upgrade 'instantiate' etc is independent if you need to do something else there etc) that initializes the ledger (once its there, its there :-)

nasht00 (Wed, 06 Mar 2019 11:51:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=v9tpu9vYPz8n4KGxC) @mahoney1 Wasn't there some code that runs automatically the first time or something? The problem with a regular transaction, is that "anyone" can call this transaction and this will be a sensitive transaction, as it defines who the initial user (admin) is.

nasht00 (Wed, 06 Mar 2019 11:52:52 GMT):
I'd have to hardcode some data about the certificate that is authorized to run this transaction

florianc (Wed, 06 Mar 2019 12:04:58 GMT):
@nasht00 from carauction chaincode

florianc (Wed, 06 Mar 2019 12:04:58 GMT):
** * The Init method is called when the Smart Contract 'carauction' is instantiated by the * blockchain network. Best practice is to have any Ledger initialization in separate * function -- see initLedger() */ async Init(stub) { console.info('=========== Instantiated fabcar chaincode ==========='); return shim.success(); }

florianc (Wed, 06 Mar 2019 12:05:43 GMT):
/** * The initLedger method is called as a result of instantiating chaincode. * It can be thought of as a constructor for the network. For this network * we will create 3 members, a vehicle, and a vehicle listing. */ async initLedger(stub, args) { console.info('============= START : Initialize Ledger ===========');

florianc (Wed, 06 Mar 2019 12:06:01 GMT):
@nasht00 from the carauction chaincode sample

nasht00 (Wed, 06 Mar 2019 12:07:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=h9CB7FSvTtTFHLcKf) @florianc This does not seem to use the new "Contract" class. I'm using the new 1.4 programming model.

florianc (Wed, 06 Mar 2019 12:09:28 GMT):
What about this then:

florianc (Wed, 06 Mar 2019 12:09:30 GMT):
class UpdateValuesContract extends Contract constructor(){ super('UpdateValuesContract'); } async transactionA(ctx, newValue) { // retrieve existing chaincode states let oldValue = await ctx.stub.getState(key); await ctx.stub.putState(key, Buffer.from(newValue)); return Buffer.from(newValue.toString()); } async transactionB(ctx) { // ..... } }; module.exports = UpdateValuesContract

florianc (Wed, 06 Mar 2019 12:09:30 GMT):
`class UpdateValuesContract extends Contract constructor(){ super('UpdateValuesContract'); } async transactionA(ctx, newValue) { // retrieve existing chaincode states let oldValue = await ctx.stub.getState(key); await ctx.stub.putState(key, Buffer.from(newValue)); return Buffer.from(newValue.toString()); } async transactionB(ctx) { // ..... } }; module.exports = UpdateValuesContract`

florianc (Wed, 06 Mar 2019 12:09:30 GMT):
`class UpdateValuesContract extends Contract constructor(){ super('UpdateValuesContract'); } async transactionA(ctx, newValue) { // retrieve existing chaincode states let oldValue = await ctx.stub.getState(key); await ctx.stub.putState(key, Buffer.from(newValue)); return Buffer.from(newValue.toString()); } async transactionB(ctx) { // ..... } }; module.exports = UpdateValuesContract`

florianc (Wed, 06 Mar 2019 12:10:14 GMT):
Source: https://fabric-shim.github.io/release-1.4/index.html

florianc (Wed, 06 Mar 2019 12:11:06 GMT):
In particular, check this: https://fabric-shim.github.io/release-1.4/index.html#toc7__anchor

nasht00 (Wed, 06 Mar 2019 12:13:26 GMT):
- Yes the snippet is from the new programming model, however I don't see the answer to my question in there. - The link at the end is about Init(), but in the old programming model

florianc (Wed, 06 Mar 2019 12:14:50 GMT):
You said you wanted to initialize stuff at the beginning. A constructor is actually used for that.

florianc (Wed, 06 Mar 2019 12:15:35 GMT):
Plus the model seems right. No information telling "this is not the new one".

nasht00 (Wed, 06 Mar 2019 12:16:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oB95Zo4DRpSmvfMMe) @florianc Well 2 potential issues for using the constructor: - There may be many instances of the chaincode, but only 1 ledger. We want this init step to happen once. - A constructor as far as I know cannot be async, while ledger code is async.

nasht00 (Wed, 06 Mar 2019 12:16:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nYLL7D2GfRbh7g3B9) @florianc There are 2 different models in 1.4 The "old" one and the "new" one which extends the Contract class. Their APIs are very different

florianc (Wed, 06 Mar 2019 12:17:43 GMT):
Why would you have the same chaincode twice on a unique ledger?

mahoney1 (Wed, 06 Mar 2019 12:18:50 GMT):
@nasht00 why couldn't you use an `instantiate` function and check a simple state on the ledger to see that the initialisation has already been performed ?

florianc (Wed, 06 Mar 2019 12:19:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZCambTPL2ZHcKgK6p) @nasht00 I did not find anything about that. Can you give me a link about that. I'll do my chaincode soon and don't want to fail because of that ^^

nasht00 (Wed, 06 Mar 2019 12:19:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qqmaCJgjcjwX6GC5f) @mahoney1 Sounds like I'll do something like this yes. I'll get back to the whiteboard

nasht00 (Wed, 06 Mar 2019 12:22:51 GMT):
@florianc If you plan to start from scratch using 1.4, I recommend the new model, which is explained here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/smartcontract.html The API is documented here: https://fabric-shim.github.io/release-1.4/fabric-contract-api.Contract.html

vsadriano (Wed, 06 Mar 2019 12:41:19 GMT):
Hi! I'm trying to construct a new chaincode and I'm getting the error bellow when I run the instantiate command: `Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode ccia:1.0 for transaction`. Anyone could help me?

rthatcher (Wed, 06 Mar 2019 13:46:34 GMT):
@vsadriano - what errors are you seeing in the Log of the Peer container or the Orderer container? What version of Fabric are you running?

vsadriano (Wed, 06 Mar 2019 13:58:22 GMT):
@rthatcher I'm using HFv1.4. Peer logs: ```shell 2019-03-06 13:55:55.134 UTC [endorser] SimulateProposal -> ERRO 040 [mychannel][71e39e83] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode ccia:1.0 for transaction github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:71 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).LaunchInit /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:129 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).ExecuteLegacyInit /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:221 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).ExecuteLegacyInit /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:131 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:179 github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:237 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:456 github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61 github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler.func1 /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:169 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:31 github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1 /opt/gopath/src/github.com/hyperledger/fabric/common/grpclogging/server.go:91 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34 github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1 /opt/gopath/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:30 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:39 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:171 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:982 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1208 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:686 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 ``` Orderer logs: ```shell 2019-03-06 13:55:55.139 UTC [orderer.common.broadcast] Handle -> WARN 00b Error reading from 172.31.0.2:35688: rpc error: code = Canceled desc = context canceled ```

rthatcher (Wed, 06 Mar 2019 14:43:17 GMT):
Assuming this is a genuine timeout - have you tried increasing the the following timeout in your fabric `CORE_CHAINCODE_STARTUPTIMEOUT=n` - the default for n should be 300s - but you could try increasing this in your docker compose file. (I think you will need to restart the peer or even just re-create the fabric to activate the new setting.) How quickly (or slowly!) does it take for you to see the timeout error? What Fabric are you running? (sample/dev Fabric ? Custom? Multiorg?) Have you succeeded with a simple sample chaincode on the same Fabric ?

vsadriano (Wed, 06 Mar 2019 15:49:13 GMT):
I'm running the basic-network sample for install and test my chaincode. I succeeded with `fabcar` chaincode sample.

vsadriano (Wed, 06 Mar 2019 16:08:26 GMT):
@rthatcher I get the error from my chaincode container: ```shell $ docker logs dev-peer0.org1.example.com-ccia-1.0 /bin/sh: 1: npm: not found ```

vsadriano (Wed, 06 Mar 2019 16:12:58 GMT):
I'm trying invoke with: ```shell $ docker exec cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n ccia -l "node" -v 1.0 -c '{"Args":[]}' -P "OR ('Org1MSP.member','Org2MSP.member')" ```

vsadriano (Wed, 06 Mar 2019 16:12:58 GMT):
I'm trying to instantiate with: ```shell $ docker exec cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n ccia -l "node" -v 1.0 -c '{"Args":[]}' -P "OR ('Org1MSP.member','Org2MSP.member')" ```

rthatcher (Wed, 06 Mar 2019 16:48:56 GMT):
@vsadriano - your node specific chaincode container should have npm installed in it (afaik). By default your chaincode container for Node should be built from the docker image "fabric-baseimage" (I'm assuming you do NOT have an environment variable specified in the docker yaml file for CORE_CHAINCODE_NODE ?) For your instantiate command - it looks fine, but I don't put "quotes" around the word node for the install or instantiate commands - but I would not think it makes a difference. Also for the basic-network there is only one Org so you don't need to specify an endorsement policy with "-P"

rthatcher (Wed, 06 Mar 2019 16:48:56 GMT):
@vsadriano - your node specific chaincode container should have npm installed in it (afaik). By default your chaincode container for Node should be built from the docker image "fabric-baseimage" (I'm assuming you do NOT have an environment variable specified in the docker yaml file for CORE_CHAINCODE_NODE ?) For your instantiate command - it looks fine, but I don't put "quotes" around the word node for the install or instantiate commands - but I would not think it makes a difference. Also for the basic-network there is only one Org so you don't need to specify an endorsement policy with "-P" Other things to check would be `docker images` and make sure you have Fabric 1.4 images. Check your package.json file for your contract with the one used by Fabcar.

vsadriano (Wed, 06 Mar 2019 17:38:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qJQHYZ2RHGTaKXKPk) @rthatcher I didn't need to specify `CORE_CHAINCODE_NODE` variable in `hlf-1.3`. I don't have this in my yaml. I cut quotes and endorsement policy parameters from instantiate command but I'm getting the same result. I specified the tag for all images.

Jaline (Thu, 07 Mar 2019 03:15:54 GMT):
Has joined the channel.

Jaline (Thu, 07 Mar 2019 03:17:44 GMT):
I want to know how to get the tls certificate from the fabric-ca server through the SDK.

Dpkkmr (Thu, 07 Mar 2019 06:36:33 GMT):
Hi Experts, I am working on developing one application using Kafka/ZK based ordering system. Applications works fine in Solo Ordering system but which I switch to Kafka based ordering system I get following error in orderer log: 2019-03-07 06:02:21.621 UTC [orderer/common/broadcast] Handle -> WARN 15b [channel: mychannel] Rejecting broadcast of config message from 172.23.0.1:47586 because of error: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied 2019-03-07 06:02:21.621 UTC [orderer/common/server] func1 -> DEBU 15c Closing Broadcast stream Complete code for the applciation is available in this link: https://github.com/Dpkkmr/HL_Fabric_Kafka.git NOTE: I am using generateArtifacts.sh file to generate the certificates. Any help in resolving this issue will be really helpful.

Dpkkmr (Thu, 07 Mar 2019 06:36:33 GMT):
Hi Experts, I am working on developing one application using Kafka/ZK based ordering system. Applications works fine in Solo Ordering system but which I switch to Kafka based ordering system I get following error in orderer log: 2019-03-07 06:02:21.621 UTC [orderer/common/broadcast] Handle -> WARN 15b [channel: mychannel] Rejecting broadcast of config message from 172.24.0.10:47586 because of error: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied 2019-03-07 06:02:21.621 UTC [orderer/common/server] func1 -> DEBU 15c Closing Broadcast stream Complete code for the applciation is available in this link: https://github.com/Dpkkmr/HL_Fabric_Kafka.git NOTE: I am using generateArtifacts.sh file to generate the certificates. Any help in resolving this issue will be really helpful.

MuhammedHafil (Thu, 07 Mar 2019 07:31:49 GMT):
Is it possible to check if a given enrollment id exists from withing chaincode?

dayubian (Thu, 07 Mar 2019 07:41:26 GMT):
Has joined the channel.

nasht00 (Thu, 07 Mar 2019 08:03:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=H76JmMeZ5XD4JPCfv) @MuhammedHafil I'm not a team member, just my opinion. I think that Fabric (through MSP) only knows which Certificate Authorities are allowed access. I don't think it knows the list of individual certificates since it's the CA's job.

sayan.hlf (Thu, 07 Mar 2019 08:30:11 GMT):
In balance transfer example, when we fetch the channel information using the function *query.getChainInfo*, it returns the value of currentBlockHash and previousBlockHash as byte array. How can we get that value in proper readable format?

sayan.hlf (Thu, 07 Mar 2019 08:30:11 GMT):
In balance transfer example, when we fetch the channel information using the function *getChainInfo (defined in app/query.js)*, it returns the value of currentBlockHash and previousBlockHash as byte array. How can we get that value in proper readable format?

florianc (Thu, 07 Mar 2019 09:27:30 GMT):
I have a question about queryByChaincode. It goes into a function written in the chaincode. But is it creating a transaction? (Is the query invokation commited to the ledger?)

florianc (Thu, 07 Mar 2019 09:35:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=akctm3kJX3XNmrbp9) Answer here, for those interesed: https://stackoverflow.com/a/46255691/6213883

rthatcher (Thu, 07 Mar 2019 09:39:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=akctm3kJX3XNmrbp9) @florianc There are 2 ways to call (invoke) a chaincode function: 1. Using the cli `peer chaincode invoke` always creates an endorsed transaction that writes to the Ledger, even if the data is only read. The equivalent in the 1.4 Programming model is `submitTransaction` 2. Using the cli `peer chaincode query` does not create an endorsed transaction and does not write to the ledger. The equivalent in the 1.4 Programming Model is `evaluateTransaction` So it depends *how* you call/invoke the transaction.

florianc (Thu, 07 Mar 2019 09:50:10 GMT):
Is there somewhere the "old" programming model and the new one are really separated? It seems that here (https://fabric-shim.github.io/release-1.4/index.html) it is mixed up.

rthatcher (Thu, 07 Mar 2019 10:17:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=H76JmMeZ5XD4JPCfv) @MuhammedHafil From a *Smart Contract* (chaincode) function you can access the details of the Identity invoking the function by using the ClientIdentity object https://fabric-shim.github.io/release-1.4/fabric-shim.ClientIdentity.html From the *Node SDK Application* you can check the Identities that exist in your local Wallet From the Node SDK you can also access the FabricCAClient class, which might help you: https://fabric-sdk-node.github.io/master/FabricCAClient.html

rthatcher (Thu, 07 Mar 2019 10:23:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=E5wrb6yWW7g3fkdve) @florianc The new programming model builds on and depends on the old programming model, rather than replacing it. But rather than new and old, it is easier to think of it as "The Programming Model" with an optional "Low Level Programming Model". Moving forward, most developers will not have to work with the Low Level model, but can work with the higher level programming model, and importantly focus more on the business logic of the Smart Contract and Client Application.

mahoney1 (Thu, 07 Mar 2019 11:24:31 GMT):
reminder that the Fabric Developer Community call is today at 5pm 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 - past Recordings & Slides (PDF) here: https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings - be great to hear from you later ! 🙂 regards Paul

antitoine (Thu, 07 Mar 2019 14:29:20 GMT):
Has joined the channel.

florianc (Thu, 07 Mar 2019 15:06:04 GMT):

Clipboard - March 7, 2019 4:06 PM

florianc (Thu, 07 Mar 2019 15:06:06 GMT):
Hello. Using the nodeSDK, when I invoke a transaction, how can I retrieve the return of the transaction function. For example, I have the following invoke function in the chaincode:

florianc (Thu, 07 Mar 2019 15:06:06 GMT):
Hello. Using the nodeSDK, when I invoke a transaction, how can I retrieve the return of the transaction function. For example, I have the following invoke function in the chaincode: (check on top)

florianc (Thu, 07 Mar 2019 15:06:45 GMT):
Unfortunately, I cannot find it in the proposal response

florianc (Thu, 07 Mar 2019 15:17:58 GMT):
Found it, was just not checking the correct array ><

VadimInshakov (Thu, 07 Mar 2019 15:31:14 GMT):
**Import dependencies to chaincode** Why when I include `axios` in chaincode, it instantiate sucessfully, but when I include `uniqid`, it hangs on instantiate stage?

mahoney1 (Thu, 07 Mar 2019 15:33:10 GMT):
FYI - reminder that Fabric Developer Community call is today (in 90mins) at 5pm UTC (5pm UK, 12pm ET, 9am PT) https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

mahoney1 (Thu, 07 Mar 2019 18:22:55 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

ygnr (Thu, 07 Mar 2019 23:34:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pRGGGiTPLzvLPunAW) @VadimInshakov Yes, I was under same impression but came across this https://stackoverflow.com/a/48273889/7476365. Can someone from Hyperledger clarify?

tzejan (Fri, 08 Mar 2019 03:18:44 GMT):
Hi, I'm receiving this error during service discovery `Channel:mychannel received discovery error:failed constructing descriptor for chaincodes:` In the peer `ERRO 40e Failed constructing descriptor for chaincode chaincodes: ,: cannot satisfy any principal combination` The Fabric network is on IBP2, channel is created. However, only 1 peer in the channel has the installed/instantiated chaincode. Could that be the reason why service discovery failed?

Luxii (Fri, 08 Mar 2019 09:13:09 GMT):
is there any way to use old keys after i stopped docker containers

Luxii (Fri, 08 Mar 2019 09:14:04 GMT):
Im getting this `TypeError: Cannot read property 'curve' of undefined` even after I recreated the keys

Luxii (Fri, 08 Mar 2019 09:14:04 GMT):
Im getting this `TypeError: Cannot read property 'curve' of undefined` even after I recreated the admin certificate.

knagware9 (Fri, 08 Mar 2019 09:20:50 GMT):
your public certificate & private key are mismatched

Luxii (Fri, 08 Mar 2019 10:04:16 GMT):
It says `Enrollment failed with errors [[{"code":20,"message":"Authentication failure"}]]` when Im enrolling the user whose certificate i dont have

Luxii (Fri, 08 Mar 2019 10:04:16 GMT):
It says `Enrollment failed with errors [[{"code":20,"message":"Authentication failure"}]]` when Im re-enrolling the user to generate certs and keys

GaneshGhag (Fri, 08 Mar 2019 10:46:02 GMT):
Has joined the channel.

GaneshGhag (Fri, 08 Mar 2019 10:56:01 GMT):
I have installed all docker VMs, required for network up, on a single azure VM I am able to connect and invoke from same azure VM, using node SDK But when I go to another azure VM and connect using node SDK, the query transactions are working fine but the invoke transactions from a remote VM are giving error like below 2019-03-08T09:41:19.487Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051 2019-03-08T09:41:19.488Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://localhost:7051 I am not at all using localhost in any part of connection.json URLs Could this be a bug? Maybe some hard coding to localhost, in the code? At least the error message should be better, at giving root cause, instead of just saying "failed to connect before deadline URL:grpcs://localhost:7051" The query api are working fine: contract.evaluateTransaction is working fine but contract.submitTransaction is giving this error (i know the invoke uses larger part of network, as compared to query)

GaneshGhag (Fri, 08 Mar 2019 11:00:22 GMT):
to paraphrase: all node code for query and invoke works fine when on same VM, but when I use node code from remote VM, only the query is working, not the invoke, though my connection json is impeccable (I use sameone on local VM)

dheerajsuvarna (Fri, 08 Mar 2019 11:27:45 GMT):
Hello, I want to how can I verify and test the registerChaincodeEvent() using the Node SDK. I am currently emitting an event from my chaincode when adding an asset. I have a server setup and is listening. In the server i have instantiated the channelEventHub and have given my chaincode code ID and the event name. But When I add the asset, the event is not caputred. I dont know what is going wrong. Can someone guide me with this?

dheerajsuvarna (Fri, 08 Mar 2019 11:27:45 GMT):
Hello, I want to know how can I verify and test the registerChaincodeEvent() using the Node SDK. I am currently emitting an event from my chaincode when adding an asset. I have a server setup and is listening. In the server i have instantiated the channelEventHub and have given my chaincode code ID and the event name. But When I add the asset, the event is not caputred. I dont know what is going wrong. Can someone guide me with this?

dheerajsuvarna (Fri, 08 Mar 2019 11:27:45 GMT):
Hello, I want to know how can I verify and test the registerChaincodeEvent() using the Node SDK. I am currently emitting an event from my chaincode when adding an asset. I have a server setup and is listening. In the server i have instantiated the channelEventHub and have given my chaincode code ID and the event name. But When I add the asset, the event is not caputred. I dont know what is going wrong. Can someone guide me with this?

dheerajsuvarna (Fri, 08 Mar 2019 11:27:45 GMT):
Hello , I want to know how can I verify and test the registerChaincodeEvent() using the Node SDK. I am currently emitting an event from my chaincode when adding an asset. I have a server setup and is listening. In the server i have instantiated the channelEventHub and have given my chaincode code ID and the event name. But When I add the asset, the event is not caputred. I dont know what is going wrong. Can someone guide me with this?

rthatcher (Fri, 08 Mar 2019 11:38:22 GMT):
@GaneshGhag - are you using gateway.connect ? : https://fabric-sdk-node.github.io/master/Gateway.html#connect__anchor For testing with "local" fabric, many samples/examples use the option `discovery: {asLocalHost: true}` which translates all addresses to localhost - I wonder if you have this in your NodeJS code?

Luxii (Fri, 08 Mar 2019 11:40:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pG8jF7h8RRJSk5C9A) can anyone help me with this thing ??

rthatcher (Fri, 08 Mar 2019 12:02:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=JxmhHajdYyeoyRnGT) @Luxii What errors do you see in the CA Container log ?

Luxii (Fri, 08 Mar 2019 12:36:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4WAXXSZHGGcn8fbPv) @rthatcher `"Login failure: The identity oem@sofo has already enrolled 1 times, it has reached its maximum enrollment allowance"`

Luxii (Fri, 08 Mar 2019 12:36:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4WAXXSZHGGcn8fbPv) @rthatcher `"Login failure: The identity user@abc has already enrolled 1 times, it has reached its maximum enrollment allowance"`

Luxii (Fri, 08 Mar 2019 12:37:29 GMT):
How do i increase max enrolment ?

mahoney1 (Fri, 08 Mar 2019 13:26:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=A62RGBdsgga39djj6) @Luxii its described in the CA User guide - `maxenrollments` setting ref client side https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/clientconfig.html and the CA user guide `https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#initialize

mahoney1 (Fri, 08 Mar 2019 13:26:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=A62RGBdsgga39djj6) @Luxii its described in the CA User guide `https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#initialize` - `maxenrollments` setting ref also see info on the client side https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/clientconfig.html

mahoney1 (Fri, 08 Mar 2019 13:26:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=A62RGBdsgga39djj6) @Luxii its described in the CA User guide `https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#initialize` - `maxenrollments` setting - also see info on the client side https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/clientconfig.html

dheerajsuvarna (Fri, 08 Mar 2019 13:36:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pybBaLgzNZvAioXuK) can anyone help me out with this?

jeka_gompa (Fri, 08 Mar 2019 13:46:14 GMT):
Hello everybody, I'm traying to create unit test for my chaincodes. My problem is that some of my chaincode perform cross chaincode operations and I do not know how to simulate that within the tests. Have anyone done that? Do you know about any documentation that address this scenario?

rthatcher (Fri, 08 Mar 2019 14:10:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pybBaLgzNZvAioXuK) @dheerajsuvarna - Can't help you directly with this, but there is an example here that might help: https://github.com/davidkel/bnaport/blob/master/trade-network/native/client-new-js/chaincodeeventemitter.js - and there is a Jira for an enhancement to make event handling easier going forward. The Jira is targeted for Fabric 2.0 but I think it will also be in Fabric 1.4.1 : https://jira.hyperledger.org/browse/FABN-1100

dheerajsuvarna (Fri, 08 Mar 2019 14:32:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fHrHrBybQbP7fZ7ni) @rthatcher @rthatcher First of all, Thank you for the reply. I have been referring this already, but it's not very clear since its in typescript. I'm looking for a way to test my listner function, but I am not able to do it. I have given more details in this stackoverflow question https://stackoverflow.com/questions/55062756/hyperledger-fabric-1-4-how-to-test-and-verify-registerchaincodeevent-function

mahoney1 (Fri, 08 Mar 2019 15:34:05 GMT):
@dheerajsuvarna just seen your Stack Overflow - you've got `connected(true)` in your code, but I believe you need `connect(true)` to see the full block event unfiltered. Its possible you saw `connected` from a code comment in https://fabric-sdk-node.github.io/tutorial-channel-events.html but try `connect`

mahoney1 (Fri, 08 Mar 2019 15:34:05 GMT):
@dheerajsuvarna just seen your Stack Overflow - you've got `connected(true)` in your code, but I believe you need `connect(true)` to see the full chaincode event unfiltered. Its possible you saw `connected` from a code comment in https://fabric-sdk-node.github.io/tutorial-channel-events.html but try `connect`

dheerajsuvarna (Fri, 08 Mar 2019 15:45:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cLPZYJJyp22GHAMa6) @mahoney1 I tried the following one `await channelEventHub.connect(true);` but I get this error *Failed to submit transaction: TypeError: Cannot read property '_userContext' of undefined_*. Any Idea what is this and How I can solve this?

dheerajsuvarna (Fri, 08 Mar 2019 15:45:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cLPZYJJyp22GHAMa6) @mahoney1 I tried the following one `channelEventHub.connect(true);` but I get this error *Failed to submit transaction: TypeError: Cannot read property '_userContext' of undefined_*. Any Idea what is this and How I can solve this?

dheerajsuvarna (Fri, 08 Mar 2019 15:45:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cLPZYJJyp22GHAMa6) @mahoney1 That was a typo while deleting the comments. But I did try with the following code `channelEventHub.connect(true);` but I get this error *Failed to submit transaction: TypeError: Cannot read property '_userContext' of undefined_*. Any Idea what is this and How I can solve this?

mahoney1 (Fri, 08 Mar 2019 16:33:31 GMT):
@dheerajsuvarna your S/Overflow (given your changes) has been answered FYI -> https://stackoverflow.com/questions/55062756/hyperledger-fabric-1-4-how-to-test-and-verify-registerchaincodeevent-function

jeka_gompa (Fri, 08 Mar 2019 19:59:38 GMT):
Hello everybody, I'm traying to create unit test for my chaincodes. My problem is that some of my chaincode perform cross chaincode operations and I do not know how to simulate that within the tests. Have anyone done that? Do you know about any documentation that address this scenario?

gstylianou (Sat, 09 Mar 2019 09:07:03 GMT):
Has joined the channel.

Luxii (Sat, 09 Mar 2019 11:20:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FWCkHMPM8egC4f5SJ) @mahoney1 It says `dial tcp conn failed no such host as ca.abc.example.com` when i request for enrollment Im using fabric-ca-client. However when I request the same in ca.org1.example container it works.

mfaisaltariq (Sun, 10 Mar 2019 07:58:48 GMT):
On Query Following Error Presented.

mfaisaltariq (Sun, 10 Mar 2019 07:58:52 GMT):
``

mfaisaltariq (Sun, 10 Mar 2019 07:59:00 GMT):
``` TLS handshake failed with error tls: first record does not look like a TLS handshake {"server": "PeerServer", "remote address": "192.168.144.1:53760"} ```

mastersingh24 (Sun, 10 Mar 2019 22:35:24 GMT):
You likely do not have TLS enabled for the client ... are you using `grpcs://` for your endpoint(s)

dheerajsuvarna (Mon, 11 Mar 2019 10:44:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Enuf3WDn99inTBXAa) @mahoney1 @mahoney1 I tried the solution, but ran into one more problem. When I try to initialize channel.getEventHub(peer), it says that the peer in not assigned to this channel. I double checked my connection profile json and it is there. More info on this over here https://stackoverflow.com/questions/55099489/hyperledger-fabric-1-4-getting-an-error-while-initializing-channel-getchannelev.

dheerajsuvarna (Mon, 11 Mar 2019 10:44:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Enuf3WDn99inTBXAa) @mahoney1 I tried the solution, but ran into one more problem. When I try to initialize channel.getEventHub(peer), it says that the peer in not assigned to this channel. I double checked my connection profile json and it is there. More info on this over here https://stackoverflow.com/questions/55099489/hyperledger-fabric-1-4-getting-an-error-while-initializing-channel-getchannelev.

MuhammedHafil (Mon, 11 Mar 2019 12:21:57 GMT):
How to add affiliation if using wallet?

zwartesokken (Mon, 11 Mar 2019 12:27:15 GMT):
Anyone and good link to explain how to add attributes and roles to user when registering

rohitkhatri (Mon, 11 Mar 2019 12:59:21 GMT):
Has joined the channel.

rohitkhatri (Mon, 11 Mar 2019 13:00:47 GMT):
How can store wallet identity in mongodb or any other database using the sdk?

rohitkhatri (Mon, 11 Mar 2019 13:00:47 GMT):
How can I store wallet identity in mongodb or any other database using the sdk?

rohitkhatri (Mon, 11 Mar 2019 13:00:47 GMT):
How can I store wallet identity in mongodb or any other database using the sdk? Right now, I'm using file storage.

florianc (Mon, 11 Mar 2019 13:06:04 GMT):
I think you might be able to stringify the wallet object and put it in mongo, no?

rohitkhatri (Mon, 11 Mar 2019 13:11:54 GMT):
That's what I'm asking, how do I stringify that and also include private and public key in that?

MuhammedHafil (Mon, 11 Mar 2019 13:21:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8keiNxmvQqJyJrS9K) @zwartesokken ``` const secret = await ca.register({ affiliation: 'examplemsp.department1', enrollmentID: "enrollment_id", role: 'client', attrs: [ { name: 'attribute_name', value: "attribute value", ecert: true }] }, adminIdentity) ```

MuhammedHafil (Mon, 11 Mar 2019 13:22:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BcWKS4Dcybi9wfg5x) @rohitkhatri https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.CouchDBWallet.html

zwartesokken (Mon, 11 Mar 2019 13:22:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=n9AL26xwLNDFcquHY) @MuhammedHafil I tried that but it does't work. Do I need to enable this in the config somewhere? I'm running hyperledger fabric 1.4

MuhammedHafil (Mon, 11 Mar 2019 13:23:55 GMT):
No. may be sharing your code will help

MuhammedHafil (Mon, 11 Mar 2019 13:23:55 GMT):
No. may be sharing your code will help to find the issue, what error you are getting?

zwartesokken (Mon, 11 Mar 2019 13:26:49 GMT):
``` const clientIdentity = new shim.ClientIdentity(stub); console.log(clientIdentity.getID()) console.log(clientIdentity.getMSPID()) console.log(clientIdentity.getAttributeValue('test')) ```

zwartesokken (Mon, 11 Mar 2019 13:27:07 GMT):
im trying to get it like this in the chaincode and I have the exact same code to set the attribute that you send

rohitkhatri (Mon, 11 Mar 2019 15:14:09 GMT):
How can I set identity from mongodb to node's highlevel sdk? right now, I'm using file system and have managed to store it in the mongodb, now I would like to retrieve the identity from mongodb and pass it to the node sdk in order to transact with the network, does anybody know how to achieve that?

sgdev (Mon, 11 Mar 2019 19:52:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=XFg8MzMfYt8xN9aF9) @rthatcher @rthatcher I tried again today, same results. Is the issue fixed yet?

KyunghoKim (Tue, 12 Mar 2019 03:12:15 GMT):
Has joined the channel.

rohitkhatri (Tue, 12 Mar 2019 05:51:22 GMT):
Can anyone answer my question please?

rohitkhatri (Tue, 12 Mar 2019 06:52:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aBAaaCpZrz427c9at) @rthatcher @bestbeforetoday guys can you please help!

florianc (Tue, 12 Mar 2019 08:09:29 GMT):
Hello. I am trying to write a script that will install and instantiate chaincode for me. However, the installChaincode function returns me the following: (image 1). Moreover, when I do not give the targets property, the code returns an error telling me the target(s) have not been set, even if the doc says it is not required.

florianc (Tue, 12 Mar 2019 08:09:44 GMT):

error.png

florianc (Tue, 12 Mar 2019 08:09:54 GMT):

code.png

florianc (Tue, 12 Mar 2019 08:11:00 GMT):
Note: It is the only time that I have this problem with the peer. For the other scripts (invoke, query), the setup peer is recognized.

florianc (Tue, 12 Mar 2019 09:12:39 GMT):
Well, fixed it (even though documentation says "no need of targets", got to pass it). But now I get the "Path must be a string" problem for chaincodePath, and last user that asked for it did not get any answer

florianc (Tue, 12 Mar 2019 09:12:41 GMT):
Any idea?

mahoney1 (Tue, 12 Mar 2019 09:15:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pAKYYFnfBDM25unmc) @rohitkhatri suggest to raise a stack overflow -whether you mean to set a [User Context](https://fabric-sdk-node.github.io/Client.html) at a client level or how to a simple example of importing/consuming identity from a wallet is shown in Fabric samples (Commercial paper) -> https://github.com/hyperledger/fabric-samples/tree/release-1.4/commercial-paper/organization/magnetocorp/application

mahoney1 (Tue, 12 Mar 2019 09:21:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GQh5fgh5JuRBsffjM) @florianc examples in samples/client docs ? -> https://github.com/hyperledger/fabric-samples/blob/release-1.4/balance-transfer/app/instantiate-chaincode.js or https://fabric-sdk-node.github.io/tutorial-metadata-chaincode.html

mahoney1 (Tue, 12 Mar 2019 09:21:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GQh5fgh5JuRBsffjM) @florianc examples in samples/client docs ? -> hhttps://github.com/hyperledger/fabric-samples/blob/release-1.4/balance-transfer/app/install-chaincode.js or https://fabric-sdk-node.github.io/tutorial-metadata-chaincode.html

florianc (Tue, 12 Mar 2019 09:25:28 GMT):
grmbl, did not even think of checking this. Thank you, will have a look!

florianc (Tue, 12 Mar 2019 09:27:40 GMT):
Wait a minute. Does that mean the error "path must be a string" refers the the metadata path and not the chaincode path? The documentation says the meta data are optionnal The error message is not specific enough.

florianc (Tue, 12 Mar 2019 09:33:43 GMT):
Ok, I finally got it. I did not specify the chaincodeType, which by default is go (my cc is in node). However, the error returned is "path must be a string". How are we supposed to understand the problem with this? ^^

dheerajsuvarna (Tue, 12 Mar 2019 09:39:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Enuf3WDn99inTBXAa) @mahoney1 Can you have a look now, since I still have the problem while trying to connect using the channelEventHub. I updated the Question. I tried setting the userContext and did a bunch of other stuff which is explained in this new question. https://stackoverflow.com/questions/55099489/hyperledger-fabric-1-4-getting-an-error-while-initializing-channel-getchannelev

rohitkhatri (Tue, 12 Mar 2019 09:41:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=KkZnwDjN5FgiKJwwB) @mahoney1 Thanks, that's what I was looking for.

kristina96 (Tue, 12 Mar 2019 11:34:19 GMT):
Has joined the channel.

kristina96 (Tue, 12 Mar 2019 11:36:59 GMT):
Hello guys, this is some educational material about Hyperledger from scratch, we will write articles for 21 day, so here is day 1, in this series, we will use Raspberry Pi for our IoT environment to show how to implement an embedded solution which can serve as a guide and concept for further development in Industry 4.0 or any other vertical. Read if you think it is useful for you :) https://bit.ly/2UwNqth

Pradeep_Pentakota (Tue, 12 Mar 2019 12:44:45 GMT):
Has joined the channel.

VigneshkumarChinnachamy (Tue, 12 Mar 2019 17:44:01 GMT):
Hi, I'm trying to query channel info with node sdk (channel.queryInfo()). I have two networks setup (Network setup not done by me. So, I don't know what are the differences). In one network, I'm able to query successfully. In the other one, I'm getting this error: Error: access denied for [GetChainInfo][ ]: [failed evaluating policy on signed data during check policy [/Channel/Application/Readers]: [Failed to reach implicit threshold of 1 sub-policies, required 1 remaining]] But, when I call with useAdmin=true, i.e., channel.queryInfo(undefined, true) it works. I'm wondering what could cause such error in one network and not in the other. Is there any params that is passed while creating the channel to allow/disallow non admins from querying?

VigneshkumarChinnachamy (Tue, 12 Mar 2019 17:44:01 GMT):
Hi, I'm trying to query channel info with node sdk (channel.queryInfo()). I have two networks setup (Network setup not done by me. So, I don't know what are the differences). In one network, I'm able to query successfully. In the other one, I'm getting this error: Error: access denied for [GetChainInfo][ ]: [failed evaluating policy on signed data during check policy [/Channel/Application/Readers]: [Failed to reach implicit threshold of 1 sub-policies, required 1 remaining]] But, when I call with useAdmin=true, i.e., channel.queryInfo(undefined, true) it works. I'm wondering what could cause such error in one network and not in the other. Is there any params that is passed while creating the channel to allow/disallow non admins from querying? Thanks in advance for your time and efforts!

Antimttr (Tue, 12 Mar 2019 21:57:55 GMT):
@dave.enyeart hey there, just checking back with you about idemix for node sdk. I might be able to get a cryptographer interested in filling in the missing peices to bring idemix to nodejs sdk. What i need are more details about what exactly needs to be done, what cryptography is currently supported in the java sdk that is not avaliable in the node sdk?

Antimttr (Tue, 12 Mar 2019 21:58:33 GMT):
@dave.enyeart are there any open issues in jira about this?

Antimttr (Tue, 12 Mar 2019 22:01:25 GMT):
looks like i found one: https://jira.hyperledger.org/projects/FABN/issues/FABN-689?filter=allopenissues

Antimttr (Tue, 12 Mar 2019 22:04:52 GMT):
so it looks like you need a portage over to nodejs. that's straight forward

dave.enyeart (Wed, 13 Mar 2019 04:07:33 GMT):
@adc Can you help @Antimttr understand the high level items that need to be ported to node.js in order to support idemix in node.js sdk? Or even better, could you enumerate in the Jira https://jira.hyperledger.org/browse/FABN-689

SuperSeiyan (Wed, 13 Mar 2019 08:09:20 GMT):
Hello,

VigneshkumarChinnachamy (Wed, 13 Mar 2019 08:19:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=p9N9GdAxvBcKzGqkf) In case anyone has the same question, I got the answers here: https://stackoverflow.com/a/55136621/4619485.

mahoney1 (Wed, 13 Mar 2019 10:12:37 GMT):
@VigneshkumarChinnachamy its been answered on Stack Overflow https://stackoverflow.com/questions/55136440/hyperledger-fabric-channel-queryinfo-throws-access-denied-error

DavorKljajic (Wed, 13 Mar 2019 13:40:04 GMT):
@vikimeng hello i have the same problem as you with endorsement_policy_failure can you explain more further.

mastersingh24 (Wed, 13 Mar 2019 14:27:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=SK5gya4JbNM6qPDNY) @Antimttr All of the cyrpto should be available here: https://github.com/apache/incubator-milagro-crypto/tree/master/version3/js We use the Go version of this code in Fabric for idemix

Antimttr (Wed, 13 Mar 2019 14:46:04 GMT):
@mastersingh24 i was checking out the java idemix code yesterday in the java sdk, are there other locations for idemix code besides that?

mastersingh24 (Wed, 13 Mar 2019 14:51:13 GMT):
It's probably easiest to look at the Java stuff as it's a client; you could try looking through some of the Go test cases we have on the peer side, but I suspect that following the Java client approach is your best bet at this point

Antimttr (Wed, 13 Mar 2019 14:51:54 GMT):
basically what is needed, if im not mistaken, is the java client to be ported to nodejs sdk

migrenaa (Wed, 13 Mar 2019 15:41:20 GMT):
Hey! After I upgraded to fabric-client 1.4 ```sendTransactonProposal``` started hanging, it never returns response. Do you have any idea what causes the problem and how to fix it ?

migrenaa (Wed, 13 Mar 2019 15:41:20 GMT):
Hey! After I upgraded to fabric-client 1.4 `sendTransactonProposal` started hanging, it never returns response. Do you have any idea what causes the problem and how to fix it ?

migrenaa (Wed, 13 Mar 2019 15:41:20 GMT):
Hey! After I upgraded to fabric-client 1.4 `sendTransactonProposal` started hanging, it never returns response. Do you have any idea what causes the problem and how to fix it ?

DavorKljajic (Wed, 13 Mar 2019 15:59:26 GMT):
Hello guys i try to invoke chaincode and have endorsement_policy_failure , i have chaincode that are installed on on 4 org, one peer in one org, end i specify endorsement policy that need two orgs that endorse transaction. 2-of .

wangdong (Thu, 14 Mar 2019 05:05:54 GMT):
@migrenaa you need provide more debug log or info.

migrenaa (Thu, 14 Mar 2019 07:55:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fpXcGWQmJCktvQXv3) @wangdong When I was debugging I figured that `const responses = await this._endorsement_handler.endorse(params);` never returns result. I can't find any meaningful logs in the peer and orderer containers..

wangdong (Thu, 14 Mar 2019 08:14:53 GMT):
no timeout?

migrenaa (Thu, 14 Mar 2019 08:50:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CJ2GAaRgCmcnKaZod) @wangdong When I set timeout to sendTransactionProposal it timeouts. If I don't pass timeout it just hangs.

wangdong (Thu, 14 Mar 2019 09:17:54 GMT):
there is a defaut timeout setting for this.

wangdong (Thu, 14 Mar 2019 09:19:43 GMT):
you can change the log level to debug for more info.

mrudav.shukla (Thu, 14 Mar 2019 10:15:49 GMT):
How do I retrieve fabric user/username based on the public key?

mrudav.shukla (Thu, 14 Mar 2019 11:58:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ePEfjhBguN9cJ3P5L) Figured out an npm package that helps us to read pem contents and using that. However, if there are other ways, please let me know.

kristina96 (Thu, 14 Mar 2019 15:32:15 GMT):
Hi everyone, here is a day 2 article from 21 day series about IoT and Hyperledger development. In this article we explained in the basic terms, and after will connect technical with the examples for the better way of understanding the key concepts of Hyperledger Fabric. I invite you to read it and feel free to leave feedback :) https://medium.com/beyondi/key-concepts-in-hyperledger-fabric-b1de43d4d6f0

VadimInshakov (Thu, 14 Mar 2019 16:49:00 GMT):
**Query all ledger data** I have simple chaincode for ledger query: ``` let result = [], iterator = await stub.getStateByRange('a', 'z'); for (let item = await iterator.next(); item.done === false;) { let key = item.key, value = item.value.value.toString(); result.push({key: value}); console.log(value); item = iterator.next(); } ``` But item.value.value.toString() don't parse stub response. I see in logs this: ``` ByteBufferNB(offset=16,markedOffset=-1,limit=19,capacity=76) [{"key":"ByteBufferNB(offset=16,markedOffset=-1,limit=19,capacity=76)"}] ``` What is it? How to parse it?

mahoney1 (Fri, 15 Mar 2019 09:51:16 GMT):
@VadimInshakov typically you would do it something like this - snippet below) ```const iterator = await ctx.stub.getStateByRange(startKey, endKey); const allResults = []; while (true) { const res = await iterator.next(); if (res.value && res.value.value.toString()) { console.log(res.value.value.toString('utf8')); const Key = res.value.key; let Record; try { Record = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); Record = res.value.value.toString('utf8'); } allResults.push({ Key, Record }); } if (res.done) { console.log('end of data'); await iterator.close(); console.info(allResults); return JSON.stringify(allResults); } } ```

mahoney1 (Fri, 15 Mar 2019 09:51:16 GMT):
@VadimInshakov would need more info, and what other results were obtained in the query interator - typically you would do it something like this - snippet below) ```const iterator = await ctx.stub.getStateByRange(startKey, endKey); const allResults = []; while (true) { const res = await iterator.next(); if (res.value && res.value.value.toString()) { console.log(res.value.value.toString('utf8')); const Key = res.value.key; let Record; try { Record = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); Record = res.value.value.toString('utf8'); } allResults.push({ Key, Record }); } if (res.done) { console.log('end of data'); await iterator.close(); console.info(allResults); return JSON.stringify(allResults); } } ```

GuillaumeCisco (Fri, 15 Mar 2019 15:26:24 GMT):
Hello there. I think code described in the tutorial https://fabric-sdk-node.github.io/release-1.4/tutorial-channel-events.html is wrong

GuillaumeCisco (Fri, 15 Mar 2019 15:26:58 GMT):
especially this part: ``` let event_monitor = new Promise((resolve, reject) => { let handle = setTimeout(() => { // do the housekeeping when there is a problem channel_event_hub.unregisterTxEvent(tx_id); console.log('Timeout - Failed to receive the transaction event'); reject(new Error('Timed out waiting for block event')); }, 20000); channel_event_hub.registerTxEvent((event_tx_id, status, block_num) => { clearTimeout(handle); //channel_event_hub.unregisterTxEvent(event_tx_id); let the default do this console.log('Successfully received the transaction event'); storeBlockNumForLater(block_num); resolve(status); }, (error)=> { clearTimeout(handle); console.log('Failed to receive the transaction event ::'+error); reject(error); }, // when this `startBlock` is null (the normal case) transaction // checking will start with the latest block {startBlock:start_block} // notice that `unregister` is not specified, so it will default to true // `disconnect` is also not specified and will default to false ); channel_event_hub.connect(); }); ```

GuillaumeCisco (Fri, 15 Mar 2019 15:27:47 GMT):
You should not `clearTimeout(handle);` if `event_tx_id !== tx_id`

PaddyBN (Fri, 15 Mar 2019 16:44:24 GMT):
Has joined the channel.

bestbeforetoday (Fri, 15 Mar 2019 19:43:09 GMT):
I think you might be right about that sample code being wrong. The first argument to ChannelEventHub.registerTxEvent() should be a transaction ID, not the on-event callback function. The callback will only be invoked when the correct transaction ID is received so it should be OK to call `clearTimeout(handle)` without checking the transaction ID

GuillaumeCisco (Sat, 16 Mar 2019 08:52:37 GMT):
Right @bestbeforetoday , we need to refer to the original tx_id somewhere

GuillaumeCisco (Sat, 16 Mar 2019 08:53:45 GMT):
This is the same issue in the fabcar JavaScript low level code in fabric-samples

rohitkhatri (Mon, 18 Mar 2019 15:38:49 GMT):
How can I listen to chaincode events in high level node sdk(`fabric-network`)?

rohitkhatri (Mon, 18 Mar 2019 15:38:49 GMT):
How can I listen to chaincode events in high level node sdk( `fabric-network` )?

rohitkhatri (Mon, 18 Mar 2019 15:38:49 GMT):
How can I listen to chaincode events in high level node sdk `fabric-network` ?

osmola (Mon, 18 Mar 2019 16:12:55 GMT):
Has joined the channel.

osmola (Mon, 18 Mar 2019 16:13:20 GMT):
Hello, did anyone tried to solve Wallet for users private keys for fabric?

mahoney1 (Mon, 18 Mar 2019 19:36:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ypoRNCPt3s4yHXoR7) @rohitkhatri for example of high-level SDK version 1.4.0 being used with support for chaincode events - see the last answer at https://stackoverflow.com/questions/55099489/hyperledger-fabric-1-4-getting-an-error-while-trying-to-connect-channeleventhub (in a future release, there is plan to provide integrated support for handling chaincode events)

mahoney1 (Mon, 18 Mar 2019 19:47:59 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

Estebanrestrepo (Mon, 18 Mar 2019 19:48:39 GMT):
Has joined the channel.

PMHF (Tue, 19 Mar 2019 02:28:55 GMT):
Has joined the channel.

rohitkhatri (Tue, 19 Mar 2019 10:05:11 GMT):
@mahoney1 Thanks for the help, I have one more quick question, how can I listen for all chaincode events, right now, I have to pass particular event name, but then It only listens for that event, I also tried using regex `(.*)`, but that didn't work.

mahoney1 (Tue, 19 Mar 2019 10:47:12 GMT):
@rohitkhatri I see an example in the docs tutorial eg -> https://fabric-sdk-node.github.io/tutorial-channel-events.html ```regid = channel_event_hub.registerChaincodeEvent(chaincode_id.toString(), '^evtsender*', (event, block_num, txnid, status) => {``` and also another in this test script (albeit Go - but same principle applies etc) -> https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/events/client/client_test.go#L563

mahoney1 (Tue, 19 Mar 2019 10:47:12 GMT):
@rohitkhatri I see an example in the docs tutorial eg -> https://fabric-sdk-node.github.io/tutorial-channel-events.html ```regid = channel_event_hub.registerChaincodeEvent(chaincode_id.toString(), '^evtsender*', (event, block_num, txnid, status) => {``` and also another in this test script (albeit Go - but same principle applies ie just a regex etc) -> https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/events/client/client_test.go#L563

rohitkhatri (Tue, 19 Mar 2019 10:48:39 GMT):
@mahoney1 Thanks man, the regex solved my problem, I wasn't passing that as string, not It's working.

migrenaa (Tue, 19 Mar 2019 15:29:54 GMT):
Hello guys :) I am doing stress testing and I am making around 5 invoke requests per second. Few of the tests always fail with error : ```Failed to send transaction successfully to the orderer status:FORBIDDEN``` It comes from the sdk commit function : ```async _commit(envelope, timeout)``` Do you have any idea what causes the problem? I don't think it is batch size. I am assuming orderer connectivity issues.

migrenaa (Tue, 19 Mar 2019 15:29:54 GMT):
Hello guys :) I am doing stress testing and I am making around 5 invoke requests per second. Few of the tests always fail with error : ``` Failed to send transaction successfully to the orderer status:FORBIDDEN ``` It comes from the sdk commit function : ```async _commit(envelope, timeout)``` Do you have any idea what causes the problem? I don't think it is batch size. I am assuming orderer connectivity issues.

migrenaa (Tue, 19 Mar 2019 15:29:54 GMT):
Hello guys :) I am doing stress testing and I am making around 5 invoke requests per second. Few of the tests always fail with error : `Failed to send transaction successfully to the orderer status:FORBIDDEN ` It comes from the sdk commit function : ``` async _commit(envelope, timeout) ``` Do you have any idea what causes the problem? I don't think it is batch size. I am assuming orderer connectivity issues.

migrenaa (Tue, 19 Mar 2019 15:29:54 GMT):
Hello guys :) I am doing stress testing and I am making around 5 invoke requests per second. Few of the tests always fail with error : `Failed to send transaction successfully to the orderer status:FORBIDDEN ` It comes from the sdk commit function : ``` async _commit(envelope, timeout) ``` Do you have any idea what causes the problem? I don't think it is batch size. I assume it is caused by orderer connectivity issues.

krabradosty (Tue, 19 Mar 2019 16:34:35 GMT):
Hello. Why there is no "instantiation policy" for a chaincode in Node.js SDK? It seems that it is the only way how organizations can agree on endorsement policy of a chaincode in a channel.

raphaelbenoit (Tue, 19 Mar 2019 16:35:52 GMT):
Has joined the channel.

mahoney1 (Tue, 19 Mar 2019 17:32:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QmqaCiPKi4hgkaFMC) @krabradosty suggest to read the docs : instantiation policy -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4noah.html and endorsement policy: -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/endorsement-policies.html Chaincode-level endorsement policies can be specified at instantiate time using either the SDK or the CLI

krabradosty (Tue, 19 Mar 2019 17:43:02 GMT):
@mahoney1 > Chaincode-level endorsement policies can be specified at instantiate time using either the SDK or the CLI Yes, and by default any organization from a channel can do this. So, any organization can specify endorsement policy which other organizations are not agreed. That is my problem.

krabradosty (Tue, 19 Mar 2019 17:43:02 GMT):
@mahoney1 > Chaincode-level endorsement policies can be specified at instantiate time using either the SDK or the CLI Yes, and by default any organization from a channel can do this. So, any organization can specify endorsement policy (for new or updated chaincode) which other organizations are not agreed. That is my problem.

mahoney1 (Tue, 19 Mar 2019 18:23:52 GMT):
@krabradosty An instantiation policy of that chaincode is expressed in the same way chaincode endorsement policies are expressed; eg. an out-of-band communication between the owners of the chaincode is needed (e.g., to provide proper MSP principals for their part in the chain). In some form, it represents a contract/trust between the parties, ie that implement the contract, agree to the final form and sign it. The endorsements indicate the ownership and the attestation to the agreed contract in the form of packaged chaincode. This also allows the installer to verify the authenticity of 'the contract' prior to installing it on his peers. As for signatures I refer you to the answer in this [Stack Overflow thread](https://stackoverflow.com/questions/53425198/how-can-i-ensure-that-all-organizations-have-signed-the-chaincode-to-install) and code links thereof - hope this helps.

sunlidong (Wed, 20 Mar 2019 10:27:22 GMT):
Has joined the channel.

krabradosty (Wed, 20 Mar 2019 11:00:48 GMT):
@mahoney1 I think you didn't get me right. I can't use instantiation policy for a chaincode because nodejs SDK doesn't support it. Or I just can't it in [documentation](https://fabric-sdk-node.github.io/release-1.4/index.html).

krabradosty (Wed, 20 Mar 2019 11:00:48 GMT):
@mahoney1 I think you didn't get me right. I can't use instantiation policy for a chaincode because nodejs SDK doesn't support it. Or I just can't find it in [documentation](https://fabric-sdk-node.github.io/release-1.4/index.html).

davidkel (Wed, 20 Mar 2019 11:19:09 GMT):
@krabradosty If you let the node sdk do the packaging of the chaincode then you cannot specify an instantiation policy as it doesn't support this capability. You could package the chaincode into a file using the `peer chaincode package` command specifying an instantiation policy and pass that to the node-sdk to install it.

krabradosty (Wed, 20 Mar 2019 13:05:51 GMT):
@davidkel @mahoney1 Got it, thanks.

krabradosty (Wed, 20 Mar 2019 13:05:51 GMT):
@davidkel @mahoney1 Got it, thanks. P.S. I wonder why this feature is not implemented in SDK and why there is no task in Jira.

mfaisaltariq (Wed, 20 Mar 2019 13:07:57 GMT):
Hi everyone, I would like to know how can we install and instantiate the chaincode on a server where we don't have internet access?

mfaisaltariq (Wed, 20 Mar 2019 13:07:57 GMT):
Hi everyone, can we install and instantiate the chaincode on a server where we don't have internet access?

mfaisaltariq (Wed, 20 Mar 2019 13:08:19 GMT):
Does anyone have had this problem previously.

mfaisaltariq (Wed, 20 Mar 2019 13:08:28 GMT):
Thank you for the help in advance.

mfaisaltariq (Wed, 20 Mar 2019 13:52:19 GMT):

Chaincode Instantiation Error

davidkel (Wed, 20 Mar 2019 14:00:58 GMT):
@mfaisaltariq see https://jira.hyperledger.org/browse/FAB-9287

mfaisaltariq (Wed, 20 Mar 2019 14:08:24 GMT):
@davidkel thanks I'll try it.

awattez (Wed, 20 Mar 2019 14:30:26 GMT):
Hi all, is it possible to know what is the difference between test/integration/e2e and test/integration/network-e2e in fabric-sdk-node test directory ?

bestbeforetoday (Wed, 20 Mar 2019 17:30:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mhY9kd8aRYCqXftb6) @awattez _test/integration/e2e_ tests the lower-level APIs (e.g. fabric-client), while _test/integration/network-e2e_ tests the higher-level (fabric-network) API

RonaldReagan (Thu, 21 Mar 2019 08:43:02 GMT):
Has joined the channel.

RonaldReagan (Thu, 21 Mar 2019 08:54:42 GMT):
Hi, developer! I am currently using hyperledger fabric v1.1 . I am also using a client app built using nodesdk. When I bring up the network the client connects normally to the network. But after some time 10~20mins, when I run the up to invoke transactions, I get a timeout on the client side, but looking at the orderer logs, I can see that transaction was committed normally. I tried changing the request_timeout settings and grpcs settings; can't seem to figure out why the client can't get response from the orderer or peers after some period time(inactivity). Any experience with these issue? Or suggestions?

rohitkhatri (Thu, 21 Mar 2019 09:22:09 GMT):
How can I fetch list of transactions using node sdk?

rohitkhatri (Thu, 21 Mar 2019 09:22:09 GMT):
How can I fetch list of transactions using node sdk? @mahoney1

Patriq (Thu, 21 Mar 2019 12:33:29 GMT):
Has joined the channel.

mahoney1 (Thu, 21 Mar 2019 13:08:23 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:23 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

rohitkhatri (Thu, 21 Mar 2019 13:16:53 GMT):
Hey @mahoney1 can you please provide me any reference for fetching transactions using node sdk?

mahoney1 (Thu, 21 Mar 2019 14:13:33 GMT):
@rohitkhatri see https://fabric-sdk-node.github.io/release-1.3/Channel.html#queryBlock - and the block info (with the tx_ids inside the data array) is described here -> https://fabric-sdk-node.github.io/release-1.3/global.html#Block

mahoney1 (Thu, 21 Mar 2019 14:13:33 GMT):
@rohitkhatri see https://fabric-sdk-node.github.io/release-1.4/Channel.html#queryBlock - and the block info (with the tx_ids inside the data array) is described here -> https://fabric-sdk-node.github.io/release-1.4/global.html#Block

mahoney1 (Thu, 21 Mar 2019 17:00:52 GMT):
https://zoom.us/my/hyperledger.community

mahoney1 (Thu, 21 Mar 2019 17:00:52 GMT):
Community call starting shortly https://zoom.us/my/hyperledger.community

mnobilio (Thu, 21 Mar 2019 18:19:28 GMT):
Has joined the channel.

mahoney1 (Thu, 21 Mar 2019 18:29:34 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:34 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)

BellaAdams (Fri, 22 Mar 2019 05:43:27 GMT):
How to set custom csr info when I enroll a cert using fabric nodejs SDK

davidkhala (Fri, 22 Mar 2019 06:24:14 GMT):
Hi @bretharrison, is there a conference call for our node-sdk?

davidkhala (Fri, 22 Mar 2019 07:16:28 GMT):
Dear maintainers, I created an Epic for refactoring endpoint desing for 2.0 https://jira.hyperledger.org/browse/FABN-1185

davidkhala (Fri, 22 Mar 2019 07:17:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=aES6d9AaSARXS4Edc) @mahoney1 well the community call is 1:00 AM at +8 timezone +:joy:

mfaisaltariq (Fri, 22 Mar 2019 10:03:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BY7qfysHa99LT8BMs) @silliman @silliman I followed the approach you have posted here for fabric 1.4 and following are the steps I did. 1- Downloaded the tarball for node8.9.4.

mfaisaltariq (Fri, 22 Mar 2019 10:03:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BY7qfysHa99LT8BMs) @silliman @silliman I followed the approach you have posted here for fabric 1.4 and following are the steps I did. 1- Downloaded the tarball for node8.9.4. 2- Created the docker file 3- Created the image from the docker file ``` FROM hyperledger/fabric-ccenv:latest COPY node-v8.9.4 /tmp/node-v8.9.4 ENV npm_config_nodedir /tmp/node-v8.9.4 ``` 4- Added the below Line in the peer-base.yaml file `CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv-custom:latest` restarted the network and again tried instantiating the chaincode but failed with the same error.

mfaisaltariq (Fri, 22 Mar 2019 10:03:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BY7qfysHa99LT8BMs) @silliman @davidkel I followed the approach you have posted here for fabric 1.4 and following are the steps I did. 1- Downloaded the tarball for node8.9.4. 2- Created the docker file 3- Created the image from the docker file ``` FROM hyperledger/fabric-ccenv:latest COPY node-v8.9.4 /tmp/node-v8.9.4 ENV npm_config_nodedir /tmp/node-v8.9.4 ``` 4- Added the below Line in the peer-base.yaml file `CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv-custom:latest` restarted the network and again tried instantiating the chaincode but failed with the same error.

VadimInshakov (Fri, 22 Mar 2019 10:04:06 GMT):
**returning errors** I'm trying to return error fron chaincode: ``` return shim.error('Invalid data')} ``` But I see in chaincode container this message: ``` (node:19) UnhandledPromiseRejectionWarning: TypeError: Illegal buffer at Function.module.exports.ByteBuffer.wrap (/usr/local/src/node_modules/bytebuffer/dist/bytebuffer-node.js:378:23) at Element.ProtoBuf.Reflect.ElementPrototype.verifyValue (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:1886:39) at Field.ProtoBuf.Reflect.FieldPrototype.verifyValue (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:3499:33) at Message.ProtoBuf.Reflect.MessagePrototype.encode (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:3139:57) at MessagePrototype.encode (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:2675:27) at MessagePrototype.encodeNB (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:2770:37) at handleMessage (/usr/local/src/node_modules/fabric-shim/lib/handler.js:651:35) at at process._tickCallback (internal/process/next_tick.js:188:7) ```

VadimInshakov (Fri, 22 Mar 2019 10:04:06 GMT):
**returning errors** I'm trying to return error fron chaincode: ``` return shim.error('Invalid data') ``` But I see in chaincode container this message: ``` (node:19) UnhandledPromiseRejectionWarning: TypeError: Illegal buffer at Function.module.exports.ByteBuffer.wrap (/usr/local/src/node_modules/bytebuffer/dist/bytebuffer-node.js:378:23) at Element.ProtoBuf.Reflect.ElementPrototype.verifyValue (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:1886:39) at Field.ProtoBuf.Reflect.FieldPrototype.verifyValue (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:3499:33) at Message.ProtoBuf.Reflect.MessagePrototype.encode (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:3139:57) at MessagePrototype.encode (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:2675:27) at MessagePrototype.encodeNB (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:2770:37) at handleMessage (/usr/local/src/node_modules/fabric-shim/lib/handler.js:651:35) at at process._tickCallback (internal/process/next_tick.js:188:7) ```

VadimInshakov (Fri, 22 Mar 2019 10:04:06 GMT):
**returning errors** I'm trying to return error fron chaincode: ``` return shim.error('Invalid data') ``` But I see in chaincode container this message: ``` (node:19) UnhandledPromiseRejectionWarning: TypeError: Illegal buffer at Function.module.exports.ByteBuffer.wrap (/usr/local/src/node_modules/bytebuffer/dist/bytebuffer-node.js:378:23) at Element.ProtoBuf.Reflect.ElementPrototype.verifyValue (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:1886:39) at Field.ProtoBuf.Reflect.FieldPrototype.verifyValue (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:3499:33) at Message.ProtoBuf.Reflect.MessagePrototype.encode (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:3139:57) at MessagePrototype.encode (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:2675:27) at MessagePrototype.encodeNB (/usr/local/src/node_modules/protobufjs/dist/protobuf.js:2770:37) at handleMessage (/usr/local/src/node_modules/fabric-shim/lib/handler.js:651:35) at at process._tickCallback (internal/process/next_tick.js:188:7) ```

mfaisaltariq (Fri, 22 Mar 2019 10:15:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BY7qfysHa99LT8BMs) @silliman @davidkel I followed the approach you have posted here for fabric 1.4 and following are the steps I did. 1- Downloaded the tarball for node8.9.4. 2- Created the docker file 3- Created the image from the docker file ``` FROM hyperledger/fabric-ccenv:latest COPY node-v8.9.4 /tmp/node-v8.9.4 ENV npm_config_nodedir /tmp/node-v8.9.4 ``` 4- Added the below Line in the peer-base.yaml file `CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv-custom:latest` restarted the network and again tried instantiating the chaincode but failed with the same error.

VadimInshakov (Fri, 22 Mar 2019 14:44:05 GMT):
What does mean `is_delete` in proposal response payload? ``` { value: { tx_id: 'dbea4be90c362e9a260c69b2c5fb8351da659a9447e5b23029c2ac7d60be3bac', value: ByteBuffer { buffer: , offset: 1999, markedOffset: -1, limit: 3835, littleEndian: true, noAssert: false }, timestamp: { seconds: [Object], nanos: 71000000 }, is_delete: false }, done: false } ```

mnobilio (Fri, 22 Mar 2019 20:18:41 GMT):
``` ``` bbb`

mnobilio (Fri, 22 Mar 2019 20:36:42 GMT):
Hi, we're working to enable *Mutual TLS* for NodeJS calls to the Fabric network. The network used to test these changes is the "balance-transfer" sample network provided by Hyperledger. In the `balance-transfer.json` config file we have one orderer defined, one peer, one certificate authority, and one organization. Below is a NodeJS test class created to verify that Mutual TLS is working, as well as the error output from the console. Not sure if my configuration is off, or the test code itself. Any suggestions or advice are greatly appreciated! ``` /////////////////////////////////////////////////////////////////////////////// // BEGIN FILE: TestMutualTLS.js // /////////////////////////////////////////////////////////////////////////////// const FabricClient = require('fabric-client'); class TestMutualTLS { verifyTLS() { console.log( "TestMutualTLS - verifyTLS() - Running..." ); const BAL_TRANSFER_CONFIG_PATH = "/blockchain-explorer/app/platform/fabric/connection-profile/balance-transfer.json"; console.log( "TestMutualTLS - verifyTLS() - Loading fabClient from config..." ); const fabClient = FabricClient.loadFromConfig( BAL_TRANSFER_CONFIG_PATH ); console.log( "TestMutualTLS - verifyTLS() - Have fabClient: " + fabClient.getMspid() ); console.log( "TestMutualTLS - verifyTLS() - Get CA from fabClient..." ); const fabClientCA = fabClient.getCertificateAuthority( "ca-org1" ); console.log( "TestMutualTLS - verifyTLS() - Have CA: " + fabClientCA.getCaName() ); const caRequest = { enrollmentID: "admin", enrollmentSecret: "adminpw", profile: "tls" }; console.log( "TestMutualTLS - verifyTLS() - Calling fabClientCA.enroll() to build keys and retrieve the certificate..." ); fabClientCA.enroll(caRequest) .then( function(enrollment) { console.log( "TestMutualTLS - verifyTLS() - Successfully called CA to obtain the TLS material" ); const key = enrollment.key.toBytes(); console.log( "TestMutualTLS - verifyTLS() - Obtained key" ); const cert = enrollment.certificate; console.log( "TestMutualTLS - verifyTLS() - Obtained cert" ); console.log( "TestMutualTLS - verifyTLS() - Calling fabClient.setTlsClientCertAndKey(cert,key)..." ); fabClient.setTlsClientCertAndKey( cert, key ); console.log( "TestMutualTLS - verifyTLS() - fabClient.setTlsClientCertAndKey(cert,key) done." ); console.log( "TestMutualTLS - verifyTLS() - Calling fabClient.getPeer()..." ); const peer = fabClient.getPeer( "peer0.org1.example.com" ); console.log( "TestMutualTLS - verifyTLS() - Found peer: " + peer.getName() ); }); } } //end TestMutualTLS new TestMutualTLS().verifyTLS(); /////////////////////////////////////////////////////////////////////////////// // END FILE: TestMutualTLS.js // /////////////////////////////////////////////////////////////////////////////// ``` *And below is the NodeJS error sent to the console:* ``` user@ubuntu:~/git/blockchain-explorer/app/platform/fabric$ node TestMutualTLS.js TestMutualTLS - verifyTLS() - Running... TestMutualTLS - verifyTLS() - Loading fabClient from config... TestMutualTLS - verifyTLS() - Have fabClient: Org1MSP TestMutualTLS - verifyTLS() - Get CA from fabClient... /git/blockchain-explorer/node_modules/fabric-client/lib/Client.js:500 throw new Error('A crypto suite has not been assigned to this client'); ^ Error: A crypto suite has not been assigned to this client at Client.getCertificateAuthority (/git/blockchain-explorer/node_modules/fabric-client/lib/Client.js:500:10) at TestMutualTLS.verifyTLS (/git/blockchain-explorer/app/platform/fabric/TestMutualTLS.js:29:39) at Object. (/git/blockchain-explorer/app/platform/fabric/TestMutualTLS.js:65:21) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) ```

davidkhala (Sat, 23 Mar 2019 05:18:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9pwe62FCPKgmc7Eoe) @VadimInshakov are you trying to get the history of specific key? if it is the `is_delete` show whether the key has been modified via `DelState`

zacpl (Mon, 25 Mar 2019 09:22:46 GMT):
Has joined the channel.

zacpl (Mon, 25 Mar 2019 09:23:45 GMT):
I am trying to work out how to submit a channel configuration update using the Node.js SDK for Fabric. The documentation under the Channel class is fairly clear about creating a new channel - but I'm not 100% confident about which methods to use to submit a channel configuration update transaction. Any help would be great

ChinmayIngle (Mon, 25 Mar 2019 09:37:32 GMT):
how to create connection.json file for node sdk after setting up th network?

bretharrison (Mon, 25 Mar 2019 12:06:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=bfMWBzcs8ZSbJCKR2) @zacpl https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/test/integration/configtxlator.js

bretharrison (Mon, 25 Mar 2019 12:09:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=k7PbztZ7fNmT8dzJA) @ChinmayIngle If you mean that you would like the `Client` instance or `Channel` instance to create a JSON file after manually building the network, fabric-client does not have that function, only takes input.

ChinmayIngle (Mon, 25 Mar 2019 12:49:37 GMT):
@bretharrison Thanks for the response ! SO i would have to create it manually, or through the connection.yaml file ?

ChinmayIngle (Mon, 25 Mar 2019 13:09:12 GMT):
"error: [FabricCAClientService.js]: Failed to enroll admin, error:%o message=Calling enrollment endpoint failed with error [Error: Parse Error], stack=Error: Calling enrollment endpoint failed with error [Error: Parse Error]" i am getting this error while enrolling the admin or running the enrollAdmin.js

BHosper (Mon, 25 Mar 2019 13:33:40 GMT):
Has joined the channel.

BHosper (Mon, 25 Mar 2019 13:34:14 GMT):
Hi all, We are currently working on a project with Hyperledger Fabric 1.2.1 and we are using chaincode events to notify only one of multiple micro-services of a new asset (of a certain type) being created on the blockchain. We are sending out the chaincode event by using .setEvent(eventType, BufferPayload) after the putState. And on the micro-service we have set up the eventListener to listen to that eventType and do something with the BufferPayload. This all works fine, but here comes where we find some undesired behavior: When we restart the micro-service, it again registers to the chaincodeEvent, which is ofcourse intended, but then it also retrieves/gets the last event that has been sent. This event has already been handled by a previous instance of the micro-service, and thus desired behavior would be that this event would not be picked up again (since it is an old event). Is there any way we can attain this behavior?

florianc (Mon, 25 Mar 2019 13:42:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=M7mhvsixP9onZK3CA) @BHosper You need to implement your own solution. Weh nyou register for an event, you can specify from which block. So when your service crashes/restarts, you need to store at which block you stopped listenning.

davidkel (Mon, 25 Mar 2019 13:43:23 GMT):
@BHosper What happens is that the connect request on a channel event hub returns the last block committed. So if you connect then register an event listener that event listener will be fired as part of the completion of the connect request. One way to solve it is to only register an event listener once the connect has been completed. 1.4 introduced a callback to make this easy. As you are using 1.2 one way to do it is to register a block listener before you connect and use that to flag the connection completion once the block has been received (and then disconnect the block listener). An alternative is to keep track of the block number for chaincode events you have processed. When you microservice restarts it can register a chaincode event listener and get it to replay any blocks it might have missed

davidkel (Mon, 25 Mar 2019 13:43:23 GMT):
@BHosper What happens is that the connect request on a channel event hub returns the last block committed. So if you connect then register an event listener that event listener will be fired as part of the completion of the connect request. One way to solve it is to only register an event listener once the connect has been completed. 1.4 introduced a callback to make this easy. As you are using 1.2 one way to do it is to register a block listener before you connect and use that to flag the connection completion once the block has been received (and then disconnect the block listener). An alternative is to keep track of the block number for chaincode events you have processed. When you microservice restarts it can register a chaincode event listener and get it to replay any blocks it might have missed. When you register the chaincode event listener you can specify where to start blocks from

davidkel (Mon, 25 Mar 2019 13:43:23 GMT):
@BHosper What happens is that the connect request on a channel event hub returns the last block committed. So if you connect then register an event listener that event listener will be fired as part of the completion of the connect request. One way to solve it is to only register an event listener once the connect has been completed. 1.4 introduced a callback to make this easy. As you are using 1.2 one way to do it is to register a block listener before you connect and use that to flag the connection completion once the block has been received (and then disconnect the block listener). An alternative is to keep track of the block number for chaincode events you have processed. When you microservice restarts it can register a chaincode event listener and get it to replay any blocks it might have missed. When you register the chaincode event listener you can specify where to start blocks from. This has to be done before performing the connect request.

BHosper (Mon, 25 Mar 2019 14:09:22 GMT):
@florianc and @davidkel Thank you for your replies! What @davidkel is suggesting seems to be working. When I connect first and then wait before I perform registerChaincodeEvent, I do not get the old event again. Thank you very much :)

davidkel (Mon, 25 Mar 2019 14:12:26 GMT):
@BHosper Unless you don't care, you should look to how to handle missing chaincode events

davidkel (Mon, 25 Mar 2019 14:12:26 GMT):
@BHosper Unless you don't care, you should look to how to handle missing chaincode events ie ones generated while your microservice was down

florianc (Mon, 25 Mar 2019 14:18:23 GMT):
@davidkel If I understand well, you first solution allows to listen again for events once the sdk reached the current latest block?

caroline-church (Mon, 25 Mar 2019 14:20:29 GMT):
Has joined the channel.

BHosper (Mon, 25 Mar 2019 14:58:28 GMT):
@davidkel Our plan is to have multiple horizontal instances of the same micro-service. Feedback about missed chaincodeEvent is handled in a different way.

zacpl (Mon, 25 Mar 2019 15:23:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QzgAfLsEkPy3NbT57) @bretharrison great - thanks

thakkarparth007 (Mon, 25 Mar 2019 15:25:25 GMT):
Hi, I'm trying to use discovery service with fabric-network library (by setting discovery.enabled to true in connectionOptions), however I get an error stating `error: [Network]: _initializeInternalChannel: no suitable peers available to initialize from`

thakkarparth007 (Mon, 25 Mar 2019 15:25:25 GMT):
Hi, I'm trying to use discovery service with fabric-network library (by setting discovery.enabled to true in connectionOptions), however I get an error stating `error: [Network]: _initializeInternalChannel: no suitable peers available to initialize from` (Fabric v1.4)

thakkarparth007 (Mon, 25 Mar 2019 15:26:13 GMT):
On digging through the code, I suspect that the connectionProfile might require a `client` section, however that doesn't seem to have been documented, unless I'm grossly mistaken

thakkarparth007 (Mon, 25 Mar 2019 15:26:35 GMT):
Can anyone familiar with this issue help me?

bretharrison (Mon, 25 Mar 2019 16:37:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QpnmMF5fEEyJBNTQL) @ChinmayIngle Yes you would have to create the connection profile yaml or json manually

thgoutham (Tue, 26 Mar 2019 05:11:01 GMT):
Has joined the channel.

thgoutham (Tue, 26 Mar 2019 05:40:49 GMT):
Background: TLS has been enabled for all peers and CAs on the docker file. Orderer TLS is disabled. The 'grpc' in the urls of the connection profile was changed to 'grpcs'. The 'http' for CA url was replaced with 'https'. Everything works fine when TLS is disabled. Error Throwing Code: `fabric-client.queryChannels(peerName, true);` Error Message: ``` error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051 (node:81386) UnhandledPromiseRejectionWarning: Error: Failed to connect before the deadline URL:grpcs://localhost:7051 at checkState (/Users/user/dev/project/node_modules/grpc/src/client.js:720:16) ``` Docker Logs: ``` ... 2019-03-26 04:43:09.150 UTC [nodeCmd] func8 -> INFO 026 Starting profiling server with listenAddress = 0.0.0.0:6060 2019-03-26 04:43:34.663 UTC [grpc] newHTTP2Transport -> DEBU 027 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-26 04:43:34.668 UTC [grpc] newHTTP2Transport -> DEBU 028 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-26 04:43:37.544 UTC [grpc] newHTTP2Transport -> DEBU 02c grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" ``` Connection Profile (Peer section): ``` "A.nodes.A.com": { "url": "grpcs://localhost:7051", "eventUrl": "grpcs://localhost:7053", "grpcOptions": { "ssl-target-name-override": "A.nodes.A.com", "request-timeout": 600000 }, "tlsCACerts": { "path": "network/config/crypto-config/peerOrganizations/A.nodes.A.com/peers/peer0.A.nodes.A.com/tls/ca.crt" } }, ``` Objective: Enabling Fabric Node SDK to communicate with the peers when TLS is enabled.

rishabh1102 (Tue, 26 Mar 2019 07:44:30 GMT):
Hey all, I had a doubt, is it possible to update the channel config block using only the node sdk?

rishabh1102 (Tue, 26 Mar 2019 07:45:21 GMT):
https://medium.com/coinmonks/hyperledger-fabric-updating-channel-configs-45082a5dc9b2 -> The steps are mentioned in this. Is it possible to execute this using only node sdk?

wangdong (Tue, 26 Mar 2019 08:40:09 GMT):
The quick answer is yes.

rishabh1102 (Tue, 26 Mar 2019 09:25:32 GMT):
I mean yes, I can see the functions int he sdk

rishabh1102 (Tue, 26 Mar 2019 09:25:32 GMT):
I mean yes, I can see the functions int he sdkY

rishabh1102 (Tue, 26 Mar 2019 09:25:32 GMT):
Yes, I can see the functions int the sdk

rishabh1102 (Tue, 26 Mar 2019 09:25:32 GMT):
Yes, I can see the functions in the sdk

rishabh1102 (Tue, 26 Mar 2019 09:25:32 GMT):
But suppose I getChannelConfig once, how do I update the block?

rishabh1102 (Tue, 26 Mar 2019 09:25:32 GMT):
But suppose I getChannelConfig once, how do I update the block? Is there an example available for the same?

rishabh1102 (Tue, 26 Mar 2019 11:31:39 GMT):
Or rather, what is the long answer?

VadimInshakov (Tue, 26 Mar 2019 11:35:20 GMT):
**high/low timestamp** How to convert high/low timestamp in tx value block to normal unix time?

rthatcher (Tue, 26 Mar 2019 12:48:41 GMT):
@thgoutham - you don't say what version of Fabric or Node SDK you are using. I have seen "similar" errors using Fabric 1.4 and with NodeSDK v1.4 when specifying the wrong certificate in the Connection Profile.

NishaM.R (Tue, 26 Mar 2019 12:49:52 GMT):
Has joined the channel.

ajmeraharsh (Tue, 26 Mar 2019 12:59:32 GMT):
`Considering my network with 4 Orgs` Now when I create connection profile for any Org(let's say org1), do I need to mention all Orgs of the network? If yes, why? and also what would be implications if I add another Org (say org5)

ajmeraharsh (Tue, 26 Mar 2019 12:59:32 GMT):
`Considering my network with 4 Orgs and I am using node SDK` Now when I create connection profile for any Org(let's say org1), do I need to mention all Orgs of the network? If yes, why? and also what would be implications if I add another Org (say org5)

sambhavdutt (Tue, 26 Mar 2019 13:42:21 GMT):
Hello, The gulp tests have been failing for some time with the timeout error, can you take a look https://jira.hyperledger.org/browse/FABN-1191

bretharrison (Tue, 26 Mar 2019 15:50:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3Yq9RJDQNH7tC9ikz) @ajmeraharsh Other orgs do not need to be in the connection profile that is currently loaded on a NodeSDK client, the org that is pointed to by the client section. Adding orgs to your network means changes to the channel and to the endorsement policy of chaincode.

bretharrison (Tue, 26 Mar 2019 15:59:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=avf27kf7vDNEdwtpH) @rishabh1102 No, the NodeSDK does not help build the `ConfigUpdate` object needed by the fabric network to change the channel configuration. The NodeSDK will help sign and send the update. The https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/test/integration/configtxlator.js shows how to use the fabric tool `Configtxlator` to help build the necessary objects. Here is the tutorial about create and update of a channel. https://fabric-sdk-node.github.io/release-1.4/tutorial-channel-create.html

rishabh1102 (Tue, 26 Mar 2019 17:39:57 GMT):
Thanks @bretharrison!

rtroostibm (Tue, 26 Mar 2019 20:13:51 GMT):
Has joined the channel.

thgoutham (Wed, 27 Mar 2019 04:17:17 GMT):
@rthatcher Thanks for the reply. To confirm, we are using Fabric 1.4 and with NodeSDK v1.4. In regards to the connection profile, when I provide the incorrect path the error logs that I receive are slightly different as compared to the right path. Incorrect path to certs: ``` 2019-03-26 04:48:16.224 UTC [core.comm] ServerHandshake -> ERRO 02d TLS handshake failed with error read tcp 172.20.0.15:7051->172.20.0.1:36516: i/o timeout {"server": "PeerServer", "remote address": "172.20.0.1:36516"} 2019-03-26 04:48:16.226 UTC [grpc] handleRawConn -> DEBU 02e grpc: Server.Serve failed to complete security handshake from "172.20.0.1:36516": read tcp 172.20.0.15:7051->172.20.0.1:36516: i/o timeout 2019-03-26 04:51:18.183 UTC [core.comm] ServerHandshake -> ERRO 02f TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.1:36856"} 2019-03-26 04:51:18.183 UTC [grpc] handleRawConn -> DEBU 030 grpc: Server.Serve failed to complete security handshake from "172.20.0.1:36856": EOF 2019-03-26 04:52:07.455 UTC [core.comm] ServerHandshake -> ERRO 031 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.1:36948"} 2019-03-26 04:52:07.455 UTC [grpc] handleRawConn -> DEBU 032 grpc: Server.Serve failed to complete security handshake from "172.20.0.1:36948": EOF 2019-03-26 05:16:46.280 UTC [core.comm] ServerHandshake -> ERRO 033 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.1:39614"} 2019-03-26 05:16:46.280 UTC [grpc] handleRawConn -> DEBU 034 grpc: Server.Serve failed to complete security handshake from "172.20.0.1:39614": EOF 2019-03-26 05:17:10.674 UTC [core.comm] ServerHandshake -> ERRO 035 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.1:39660"} 2019-03-26 05:17:10.674 UTC [grpc] handleRawConn -> DEBU 036 grpc: Server.Serve failed to complete security handshake from "172.20.0.1:39660": EOF 2019-03-27 03:54:50.842 UTC [grpc] newHTTP2Transport -> DEBU 038 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 03:54:50.844 UTC [grpc] newHTTP2Transport -> DEBU 037 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 03:54:51.821 UTC [grpc] newHTTP2Transport -> DEBU 039 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 03:54:51.843 UTC [grpc] newHTTP2Transport -> DEBU 03a grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 03:54:53.191 UTC [grpc] newHTTP2Transport -> DEBU 03b grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" ``` Correct path to certs: ``` 2019-03-27 04:03:10.343 UTC [grpc] newHTTP2Transport -> DEBU 028 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 04:03:10.347 UTC [grpc] newHTTP2Transport -> DEBU 029 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 04:03:11.334 UTC [grpc] newHTTP2Transport -> DEBU 02a grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 04:03:11.344 UTC [grpc] newHTTP2Transport -> DEBU 02b grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 04:03:12.931 UTC [grpc] newHTTP2Transport -> DEBU 02c grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2019-03-27 04:03:12.939 UTC [grpc] newHTTP2Transport -> DEBU 02d grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" ``` As can be seen, the incorrect path also throws an extra TLS handshake fail.

rishabh1102 (Wed, 27 Mar 2019 04:23:57 GMT):
@bretharrison, is it possible to create the .json file from the data fetched by getChannelConfig? If not, can I create the .pb file using the same function?

rishabh1102 (Wed, 27 Mar 2019 04:23:57 GMT):
@bretharrison, is it possible to create the .json file from the data fetched by getChannelConfig? If not, can I create the .pb file using the data fetched the same function or another equivalent?

ajmeraharsh (Wed, 27 Mar 2019 04:41:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9PyZHQY23ay2nehs3) @bretharrison thanks a lot, that helps!

ajmeraharsh (Wed, 27 Mar 2019 04:41:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=9PyZHQY23ay2nehs3) @bretharrison thanks a lot @bretharrison , that helps!

AkshayAshok (Wed, 27 Mar 2019 05:58:57 GMT):
Has joined the channel.

AkshayAshok (Wed, 27 Mar 2019 05:59:52 GMT):
is it possible to create model with help of the sdk? i have tried to submit transaction, it works . i need to create a transaction structure?

bretharrison (Wed, 27 Mar 2019 15:43:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=a9mcL5mjH9mpLF74W) @rishabh1102 No, NodeSDK does not have anything like that, I think it is a great idea, you should open a JIRA to get it on the list of added function. And what is a .pb file ?

Antimttr (Wed, 27 Mar 2019 18:24:15 GMT):
Question about semantics in the network-config files: From balance-transfer network-config: ``` organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com - peer1.org1.example.com ```

Antimttr (Wed, 27 Mar 2019 18:24:42 GMT):
And this is from org1.yaml: ``` --- # # The network connection profile provides client applications the information about the target # blockchain network that are necessary for the applications to interact with it. These are all # knowledge that must be acquired from out-of-band sources. This file provides such a source. # name: "balance-transfer-org1" ```

Antimttr (Wed, 27 Mar 2019 18:24:55 GMT):
so which is the actual official name of the organization?

Antimttr (Wed, 27 Mar 2019 18:25:05 GMT):
is it Org1 or is it balance-transfer-org1 ?

Antimttr (Wed, 27 Mar 2019 18:25:32 GMT):
like for instance, if we were to enroll a user in the organization, would we use the organization name of Org1 or balance-transfer-org1?

nfrunza (Wed, 27 Mar 2019 21:00:59 GMT):
Hello sdk-node , are they any fabric samples with Mutual TLS enabled, aka. CORE_PEER_TLS_CLIENTAUTHREQUIRED=true ?

nfrunza (Wed, 27 Mar 2019 21:00:59 GMT):
Hello sdk-node , are there any fabric samples with Mutual TLS enabled, aka. CORE_PEER_TLS_CLIENTAUTHREQUIRED=true

ygnr (Thu, 28 Mar 2019 00:16:36 GMT):
Is there any good examples for testing node js chaincode that uses `fabric-contract-api`?

ygnr (Thu, 28 Mar 2019 00:16:36 GMT):
Is there any good examples for testing node js chaincode that uses `fabric-contract-api` and couch db?

ygnr (Thu, 28 Mar 2019 00:16:36 GMT):
Are there any good examples for testing node js chaincode that uses `fabric-contract-api` and couch db?

ygnr (Thu, 28 Mar 2019 01:03:47 GMT):
signer

MHBauer (Thu, 28 Mar 2019 03:28:08 GMT):
Has left the channel.

kheung (Thu, 28 Mar 2019 04:04:24 GMT):
Has joined the channel.

rishabh1102 (Thu, 28 Mar 2019 05:02:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sc5HRGrjpvjuWu4Cs) @bretharrison Thanks again @bretharrison! As per hyperledger documentation, the ```peer channel fetch``` command saves the binary protobuf channel configuration block to config_block.pb. That's the .pb file. Once we have this, we use configtxlator to decode it into json format. So I was wondering since we can't create the json, can we create the config_block.pb file using the information fetched by the getChannelConfig function.

rishabh1102 (Thu, 28 Mar 2019 05:02:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sc5HRGrjpvjuWu4Cs) @bretharrison Thanks again @bretharrison! As per hyperledger documentation, the _peer channel fetch_ command there saves the binary protobuf channel configuration block to config_block.pb. That's what I meant by the .pb file. Once we have this, we use _configtxlator_ to decode it into json format. So I was wondering since we can't create the json directly, can we create the config_block.pb file using the information fetched by the getChannelConfig function?

rishabh1102 (Thu, 28 Mar 2019 05:02:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sc5HRGrjpvjuWu4Cs) Thanks again @bretharrison! As per hyperledger documentation, the _peer channel fetch_ command there saves the binary protobuf channel configuration block to config_block.pb. That's what I meant by the .pb file. Once we have this, we use _configtxlator_ to decode it into json format. So I was wondering since we can't create the json directly, can we create the config_block.pb file using the information fetched by the getChannelConfig function?

rishabh1102 (Thu, 28 Mar 2019 05:02:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sc5HRGrjpvjuWu4Cs) Thanks again @bretharrison! As per hyperledger documentation, the _peer channel fetch_ command there saves the binary protobuf channel configuration block to config_block.pb (that's the file name they provide). That's what I meant by the .pb file. Once we have this, we use _configtxlator_ to decode it into json format. So I was wondering since we can't create the json directly, can we create the config_block.pb file using the information fetched by the getChannelConfig function?

VadimInshakov (Thu, 28 Mar 2019 09:31:55 GMT):
**high/low timestamp** How to convert high/low timestamp in tx value block to normal unix time?

VadimInshakov (Thu, 28 Mar 2019 09:49:18 GMT):
Why tx timestamp is `Tue Jan 27 1970 06:31:38 GMT+0000 (UTC)`? I converted high/low parts to number and added `nanos`

VadimInshakov (Thu, 28 Mar 2019 09:49:57 GMT):
high/low converted with Long.js lib

rthatcher (Thu, 28 Mar 2019 09:51:04 GMT):
@Antimttr - I can't answer your question directly, but there is a good description of Connection Profiles and an example in the Commercial Paper tuturial here: https://hyperledger-fabric.readthedocs.io/en/latest/developapps/connectionprofile.html and this doc has a commented example at the end: https://fabric-sdk-node.github.io/master/tutorial-network-config.html

VadimInshakov (Thu, 28 Mar 2019 10:03:52 GMT):
Why tx timestamp is `Tue Jan 27 1970 06:31:38 GMT+0000 (UTC)`? I converted high/low parts to number and added `nanos` high/low converted with Long.js lib ``` new Date((new Long(item.value.timestamp.seconds.low, item.value.timestamp.seconds.high)).toNumber()+item.value.timestamp.nanos); ```

VadimInshakov (Thu, 28 Mar 2019 10:03:52 GMT):
Why tx timestamp is `Tue Jan 27 1970 06:31:38 GMT+0000 (UTC)`? I converted high/low parts to number and added `nanos` high/low converted with Long.js lib ``` new Date((new Long(item.value.timestamp.seconds.low, item.value.timestamp.seconds.high)).toNumber()+item.value.timestamp.nanos); ```

VadimInshakov (Thu, 28 Mar 2019 10:03:52 GMT):
Why tx timestamp is `Tue Jan 27 1970 06:31:38 GMT+0000 (UTC)`? I converted high/low parts to number and added `nanos` high/low converted with Long.js lib ``` new Date((new Long(item.value.timestamp.seconds.low, item.value.timestamp.seconds.high)).toNumber()/1000000); ```

HoneyShah (Thu, 28 Mar 2019 11:42:52 GMT):
Hello, When I use identityService.getOne() I got following response for attribute. ``` [ { name: 'userType', value: 'supplier' }, { name: 'hf.EnrollmentID', value: '11', ecert: true }, { name: 'hf.Type', value: 'client', ecert: true }, { name: 'hf.Affiliation', value: 'org1.department1', ecert: true }, { name: 'hf.Registrar.Roles', value: '*' }, { name: 'hf.Registrar.Attributes', value: '*' } ] ``` But when I getAttribute value for `userType` it gives different value. I have updated identity once using identity.update().

HoneyShah (Thu, 28 Mar 2019 11:42:52 GMT):
Hello, When I use identityService.getOne() I got following response for attribute. ``` [ { name: 'userType', value: 'supplier' }, { name: 'hf.EnrollmentID', value: '11', ecert: true }, { name: 'hf.Type', value: 'client', ecert: true }, { name: 'hf.Affiliation', value: 'org1.department1', ecert: true }, { name: 'hf.Registrar.Roles', value: '*' }, { name: 'hf.Registrar.Attributes', value: '*' } ] ``` But when I getAttribute value for `userType` in chaincode it gives different value. I have updated identity once using identity.update().

bretharrison (Thu, 28 Mar 2019 13:12:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YaFk9Ty2SLHRQQekg) @Antimttr that `name:` is the name of the profile, this value is not used by the NodeSDK

Antimttr (Thu, 28 Mar 2019 16:04:21 GMT):
ok

Antimttr (Thu, 28 Mar 2019 16:04:27 GMT):
so then the real name is Org1

Antimttr (Thu, 28 Mar 2019 16:04:44 GMT):
and thats always defined as a key in the organizations: heading of the network-config.yaml

Antimttr (Thu, 28 Mar 2019 16:09:28 GMT):
or is the Org1, Org2, Org3, semantic?

Antimttr (Thu, 28 Mar 2019 16:09:39 GMT):
@bretharrison or can you have different names in there?

Antimttr (Thu, 28 Mar 2019 16:10:23 GMT):
like ``` organizations: MyFavoriteOrg1: mspid: MyFavoriteOrg1MSP ```

bretharrison (Thu, 28 Mar 2019 16:45:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EQGBmu8FPcjDPqSZn) @Antimttr yes, use what ever name you like, the name is a reference used by the client section of a profile to assign the NodeSDK `Client` instance an Organization, the `mspid` is the value used to signify the organization when working with the fabric network.

bretharrison (Thu, 28 Mar 2019 16:45:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EQGBmu8FPcjDPqSZn) @Antimttr yes, use what ever name you like, the name is a reference used by the client section of a profile to assign the NodeSDK `Client` instance an Organization, the `mspid` is the value used to signify the organization when working with the fabric network and must be the value that is defined by the network.

Antimttr (Thu, 28 Mar 2019 16:46:49 GMT):
by client you mean an implementation of the nodesdk by a programmer?

Antimttr (Thu, 28 Mar 2019 16:47:11 GMT):
i'm creating a client in javasdk that can manage multiple organizations

Antimttr (Thu, 28 Mar 2019 16:47:31 GMT):
although if i get idemix for nodesdk written i will be switching to nodesdk

Antimttr (Thu, 28 Mar 2019 16:48:27 GMT):
@bretharrison what is the procedure for getting assigned to an epic, specifically this one: https://jira.hyperledger.org/browse/FABN-689

Antimttr (Thu, 28 Mar 2019 16:48:40 GMT):
I have a math phd who is ready to tackle it in a week or so

bretharrison (Thu, 28 Mar 2019 16:54:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7vwH34SWazXwZnv7R) @Antimttr yes ``` const Client = require('fabric-client'); const client = Client.loadFromConfig(myprofile); ``` or ``` const Client = require('fabric-client'); const client = new Client(); client.loadFromConfig(myprofile); //note this can be done anytime to load new settings ```

Antimttr (Thu, 28 Mar 2019 16:55:27 GMT):
_nods_

bretharrison (Thu, 28 Mar 2019 16:55:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2fFXfb5TYaHvMDZBh) @Antimttr please discuss with @dave.enyeart

Antimttr (Thu, 28 Mar 2019 16:56:04 GMT):
@dave.enyeart what is the procedure for getting assigned to an epic, specifically this one: https://jira.hyperledger.org/browse/FABN-689 ? I have a math phd who is ready to tackle it in a week or so

bretharrison (Thu, 28 Mar 2019 19:10:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gxtZyRSEJd9tHsjqQ) @rishabh1102 Yes, you could try - use `const config_envelope_proto = channel.getChannelConfig(peer);`, this will return a ConfigEnvelope - get config binary from ConfigEnvelope, `const start_config_bin = config_envelope_proto.getConfig().toBuffer();`

bretharrison (Thu, 28 Mar 2019 19:10:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gxtZyRSEJd9tHsjqQ) @rishabh1102 Yes, you could try - use `const config_envelope_proto = channel.getChannelConfig(peer);`, this will return a ConfigEnvelope - get config binary from ConfigEnvelope, `const start_config_bin = config_envelope_proto.getConfig().toBuffer();` - send the config binary to the configtxlator to get the JSON - edit the JSON with your changes - send the updated JSON to the configtxlator to get updated config binary - send both start config binary and the updated config binary to the configtxlator to get the config update binary - sign and send the config update binary as usual see https://fabric-sdk-node.github.io/release-1.4/tutorial-channel-create.html

dave.enyeart (Fri, 29 Mar 2019 02:46:05 GMT):
@Antimttr I'd suggest reach out to the project Idemix lead Angelo ( @adc ) and discuss a plan. Assuming you two agree on a plan feel free to assign.

dave.enyeart (Fri, 29 Mar 2019 02:47:48 GMT):
You may want to move the discussion to #fabric-crypto

Randyshu2018 (Fri, 29 Mar 2019 08:52:04 GMT):
hi,all,if not upgrade chaincode can continues run?

NishaM.R (Fri, 29 Mar 2019 09:04:03 GMT):
Hi , I am trying to create an application on fabric 1.4 version which runs on multi org set up with hyperledger fabric node SDK. I have 2 organizations and 4 peers (2 peer for each org). I was able to start the network successfully. I was able to invoke and query the chaincode from the command line using cli. But when I am trying to invoke a transaction from UI using SDK, it throws me an error: ``` Live on port: 4000 Store path:/Users/549121/.hfc-key-store Successfully loaded user1 from persistence Query has completed, checking results error from query = { Error: 2 UNKNOWN: Stream removed at Object.exports.createStatusError (/Users/549121/Desktop/LIFE-INSURANCE-NETWORK-2-2/LifeInsurance-app/node_modules/fabric-client/node_modules/grpc/src/common.js:87:15) at Object.onReceiveStatus (/Users/549121/Desktop/LIFE-INSURANCE-NETWORK-2-2/LifeInsurance-app/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1188:28) at InterceptingListener._callNext (/Users/549121/Desktop/LIFE-INSURANCE-NETWORK-2-2/LifeInsurance-app/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/Users/549121/Desktop/LIFE-INSURANCE-NETWORK-2-2/LifeInsurance-app/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/Users/549121/Desktop/LIFE-INSURANCE-NETWORK-2-2/LifeInsurance-app/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:841:24) code: 2, metadata: Metadata { _internal_repr: {} }, details: 'Stream removed' } ``` I am using the first-network from the fabric samples 1.4 . node version is 8.15.0 and npm version is 6.4.1. "fabric-ca-client": "^1.4.0", "fabric-client": "^1.4.0", "grpc": "latest"

ChinmayIngle (Fri, 29 Mar 2019 09:17:58 GMT):

ERRORCHAIN.png

ChinmayIngle (Fri, 29 Mar 2019 09:17:58 GMT):

ERRORCHAIN.png

ChinmayIngle (Fri, 29 Mar 2019 09:17:58 GMT):

ERRORCHAIN.png

rthatcher (Fri, 29 Mar 2019 10:07:21 GMT):
@ChinmayIngle - I would think that either the channel has not been created correctly (or that the peer you are hitting for the instantiate is not joined to the channel). It could also be a problem with specifying the wrong msp/certificate. If you look at the log of the peer you should see which of these it is.

aflorom (Fri, 29 Mar 2019 10:37:18 GMT):
Hi guys! It is not available the function ` addContractListener(listenerName, callback [, options] [, eventHub])` and ` addCommitListener(callback [, options] [, eventHub])` on npm fabric-network. Somebody knows about this?

davidkel (Fri, 29 Mar 2019 10:57:25 GMT):
@aflorom That capability is coming on 1.4.1, hopefully a 1.4.1rc1 is going to be published soon

davidkel (Fri, 29 Mar 2019 10:57:25 GMT):
@aflorom That capability is coming in 1.4.1, hopefully a 1.4.1rc1 is going to be published soon

aflorom (Fri, 29 Mar 2019 11:04:22 GMT):
Thank you @davidkel !

Tom-Xu-CNXA (Sat, 30 Mar 2019 04:26:15 GMT):
Has joined the channel.

Tom-Xu-CNXA (Sat, 30 Mar 2019 04:26:43 GMT):
For https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/lib/ChannelEventHub.js#L1551 , 'delete chaincode_event.payload;' and its comments, I suggest updating document at: https://fabric-sdk-node.github.io/global.html#ChaincodeEvent, to avoid any confusion at 'payload'

phantom.assasin (Sun, 31 Mar 2019 14:44:50 GMT):
Has joined the channel.

phantom.assasin (Sun, 31 Mar 2019 14:45:24 GMT):
Hi, does any one know if its possible to add a new peer node to the existing org using node sdk?

ycarmel (Mon, 01 Apr 2019 08:10:15 GMT):
Hello, any full sample of code for the new FabToken SDK functionality?

bretharrison (Mon, 01 Apr 2019 15:07:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4srCj3Zx7hmp3oJgE) @ycarmel almost, https://gerrit.hyperledger.org/r/#/c/30309/

bretharrison (Mon, 01 Apr 2019 15:25:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vfqeQNMqA2SMdyeAY) @Tom-Xu-CNXA yes we should, https://jira.hyperledger.org/browse/FABN-1195

xiaoningdev (Mon, 01 Apr 2019 15:34:40 GMT):
Has joined the channel.

haardikkk (Mon, 01 Apr 2019 20:10:40 GMT):
Has joined the channel.

walmon (Mon, 01 Apr 2019 21:08:42 GMT):
Has joined the channel.

mbanerjee (Mon, 01 Apr 2019 21:09:25 GMT):
Is there going to be any updates to the fabric-sdk-node w.r.t Hyperledger Fabric v1.4.1-rc1?

bretharrison (Mon, 01 Apr 2019 21:48:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Qe4KGX9nbiWZEKQ2o) @mbanerjee No, there will not be a 1.4.1-rc1, if you need a pre-release of 1.4.1 then pull down the version `1.4.1-snapshot.30` or use the tag `unstable-1.4`, we will be publishing a 1.4.1 very soon.

luckforzhang (Tue, 02 Apr 2019 08:56:49 GMT):
Has joined the channel.

luckforzhang (Tue, 02 Apr 2019 08:58:43 GMT):
Hi team, when I am using node SDK to updateChannel, I have got error like this : `result: { status: 'BAD_REQUEST', info: 'error authorizing update: unexpected EOF' }`

luckforzhang (Tue, 02 Apr 2019 09:02:28 GMT):
is there anything I can refer to? I have followed the test in `fabric-samples/fabric-sdk-node/test/integration/configtxlator.js` , nearlly the same, but it won't work at the last step 'client.updateChannel(request)', I have got the data used to update, and the signatures of OrdererAdmin, Org1Admin. I am using the `fabric-samples/basic-network` to test and no TLS

luckforzhang (Tue, 02 Apr 2019 09:04:15 GMT):
``` 2019-04-02 08:48:25.787 UTC [grpc] infof -> DEBU 4cf transport: loopyWriter.run returning. connection error: desc = "transport is closing" 2019-04-02 08:50:53.282 UTC [orderer.common.server] Broadcast -> DEBU 4d0 Starting new Broadcast handler 2019-04-02 08:50:53.282 UTC [orderer.common.broadcast] Handle -> DEBU 4d1 Starting new broadcast loop for 172.18.0.1:48646 2019-04-02 08:50:53.282 UTC [orderer.common.broadcast] ProcessMessage -> DEBU 4d2 [channel: mychannel] Broadcast is processing config update message from 172.18.0.1:48646 2019-04-02 08:50:53.282 UTC [orderer.common.msgprocessor] ProcessConfigUpdateMsg -> DEBU 4d3 Processing config update message for channel mychannel 2019-04-02 08:50:53.282 UTC [policies] Evaluate -> DEBU 4d4 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers == 2019-04-02 08:50:53.282 UTC [policies] Evaluate -> DEBU 4d5 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign 2019-04-02 08:50:53.282 UTC [policies] Evaluate -> DEBU 4d6 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers == 2019-04-02 08:50:53.282 UTC [policies] Evaluate -> DEBU 4d7 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign 2019-04-02 08:50:53.282 UTC [policies] Evaluate -> DEBU 4d8 == Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererOrg/Writers == 2019-04-02 08:50:53.283 UTC [cauthdsl] func1 -> DEBU 4d9 0xc000b2e5a0 gate 1554195053283007832 evaluation starts 2019-04-02 08:50:53.283 UTC [cauthdsl] func2 -> DEBU 4da 0xc000b2e5a0 signed by 0 principal evaluation starts (used [false]) 2019-04-02 08:50:53.283 UTC [cauthdsl] func2 -> DEBU 4db 0xc000b2e5a0 processing identity 0 with bytes of a0af20 2019-04-02 08:50:53.283 UTC [cauthdsl] func2 -> DEBU 4dc 0xc000b2e5a0 principal matched by identity 0 2019-04-02 08:50:53.283 UTC [msp.identity] Verify -> DEBU 4dd Verify: digest = 00000000 55 4a 07 82 b4 63 54 ac b5 ae 1e a9 ac 3b cb 00 |UJ...cT......;..| 00000010 ca 0d cc b1 06 3c aa 8f d9 d7 f0 8f 2b 17 5e 0b |.....<......+.^.| 2019-04-02 08:50:53.283 UTC [msp.identity] Verify -> DEBU 4de Verify: sig = 00000000 30 44 02 20 70 83 ee 46 ac 0e 83 13 ef 4d bd d7 |0D. p..F.....M..| 00000010 14 5f 33 c6 52 55 39 e5 78 b7 c1 af 75 fb df a6 |._3.RU9.x...u...| 00000020 c5 72 36 06 02 20 0c 51 73 fa 9b 6c c0 5a 29 32 |.r6.. .Qs..l.Z)2| 00000030 29 ac fb ac 9d 6a 70 b7 0e 22 86 60 d1 2b 0e 3c |)....jp..".`.+.<| 00000040 50 66 ce c1 a3 78 |Pf...x| 2019-04-02 08:50:53.283 UTC [cauthdsl] func2 -> DEBU 4df 0xc000b2e5a0 principal evaluation succeeds for identity 0 2019-04-02 08:50:53.283 UTC [cauthdsl] func1 -> DEBU 4e0 0xc000b2e5a0 gate 1554195053283007832 evaluation succeeds 2019-04-02 08:50:53.283 UTC [policies] Evaluate -> DEBU 4e1 Signature set satisfies policy /Channel/Orderer/OrdererOrg/Writers 2019-04-02 08:50:53.283 UTC [policies] Evaluate -> DEBU 4e2 == Done Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererOrg/Writers 2019-04-02 08:50:53.283 UTC [policies] Evaluate -> DEBU 4e3 Signature set satisfies policy /Channel/Orderer/Writers 2019-04-02 08:50:53.283 UTC [policies] Evaluate -> DEBU 4e4 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers 2019-04-02 08:50:53.283 UTC [policies] Evaluate -> DEBU 4e5 Signature set satisfies policy /Channel/Writers 2019-04-02 08:50:53.283 UTC [policies] Evaluate -> DEBU 4e6 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers 2019-04-02 08:50:53.283 UTC [orderer.common.broadcast] ProcessMessage -> WARN 4e7 [channel: mychannel] Rejecting broadcast of config message from 172.18.0.1:48646 because of error: error authorizing update: unexpected EOF ```

luckforzhang (Tue, 02 Apr 2019 09:04:46 GMT):
And here is the debug infos from orderer

luckforzhang (Tue, 02 Apr 2019 09:05:11 GMT):
Not so sure if this infomation is too much, sorry...

ahmadraza (Tue, 02 Apr 2019 09:19:48 GMT):
hi everyone can you please guide me how to configure and use couchdb using node sdk?

ShrutiHK (Tue, 02 Apr 2019 10:01:24 GMT):
Hi! I an using Fabric 1.4 node-sdk. I keep getting this error randomly while chaincode invocation - 'ChannelEventHub has been shutdown' and the transaction fails. Can anyone please suggest what can be done to fix this issue?

dave.enyeart (Tue, 02 Apr 2019 10:56:23 GMT):
@ahmadraza There is no connection between node sdk and CouchDB. It is the chaincode that issues CouchDB queries. The fabcar tutorial and sample uses both node sdk and CouchDB: https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html. For more details on using CouchDB see the tutorial focused on CouchDB: https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html

rohitkhatri (Tue, 02 Apr 2019 11:02:27 GMT):
Has left the channel.

ahmadraza (Tue, 02 Apr 2019 11:10:19 GMT):
@dave.enyeart in fabcar tutorial where couchdb is used there is onlu two queries can you please explain little more ?

ahmadraza (Tue, 02 Apr 2019 11:10:48 GMT):
i want to query all assets based on owner other than key field?

dave.enyeart (Tue, 02 Apr 2019 11:11:16 GMT):
Fabcar doesn't use JSON queries. For JSON queries see the CouchDB tutorial.

florianc (Tue, 02 Apr 2019 13:05:36 GMT):
Is there a minimum version of nodejs for the SDK to work properly?

walmon (Tue, 02 Apr 2019 14:41:12 GMT):
8.x @florianc

walmon (Tue, 02 Apr 2019 14:42:07 GMT):
@ahmadraza the order in that example is Client App (i.e.: Node) -> Peer -> CouchDB

walmon (Tue, 02 Apr 2019 14:42:25 GMT):
You could however make something like Client App (i.e.: Node) -> CouchDB

walmon (Tue, 02 Apr 2019 14:42:35 GMT):
but that would not go through the SDK

ahmadraza (Tue, 02 Apr 2019 14:50:43 GMT):
@walmon can you give some directions how can i used couchdb ? i have to query assets based on another attribute other than key attribute?

walmon (Tue, 02 Apr 2019 14:51:44 GMT):
depends on where you want to make the call? Directly to couch or through the peer?

ahmadraza (Tue, 02 Apr 2019 14:52:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WFcipnGBDGkMXtvLN) @walmon i don't know about this?

walmon (Tue, 02 Apr 2019 14:53:56 GMT):
making the call throught the peer is the prefer way for sure. CouchDB directly is easier but you can't be sure about it's data

walmon (Tue, 02 Apr 2019 14:53:56 GMT):
making the call through the peer is the prefer way for sure. CouchDB directly is easier but you can't be sure about it's data

ahmadraza (Tue, 02 Apr 2019 14:54:24 GMT):
so how can i call through the peer

bretharrison (Tue, 02 Apr 2019 16:29:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=smeBPm7B6XkQ6nnx5) @florianc I would recommend using at least 8.14.0

bretharrison (Tue, 02 Apr 2019 16:33:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=N7CwB8iwjexemnmhi) @ahmadraza use the `channel.queryByChaincode()` https://fabric-sdk-node.github.io/release-1.4/Channel.html#queryByChaincode__anchor

bretharrison (Tue, 02 Apr 2019 16:35:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pJDZT5wuZ9atppqn8) @ShrutiHK you may wish to use logging to help see the flow `export HFC_LOGGING='{"debug":"console"}'`

bretharrison (Tue, 02 Apr 2019 16:46:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=66BgXXNL23fYavEvm) @luckforzhang you may wish to ask on the #fabric-peer-endorser-committer

rsoeldner (Tue, 02 Apr 2019 17:38:30 GMT):
Hi, when submitting a transaction with `submitTransaction` I receive `Received error response from peer: message=transaction returned with failure: ReferenceError: stub is not defined, stack=Error: transaction returned with failure: ReferenceError: stub is not defined` but the "invoke function" is named correctly - can someone help _

Antimttr (Tue, 02 Apr 2019 19:07:59 GMT):
Should enrollment of org admins be done each time an sdk client starts up? Or should the enrollment object somehow be stored and enrollment not repeated?

mastersingh24 (Tue, 02 Apr 2019 19:21:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6q3P3BidKrz9WiW9s) @Antimttr If you allow unlimited enrollments for the admin user, then you could enroll every time. But it is preferable (and arguably more secure) if you actually securely store / persist the crypto material and reuse it.

Antimttr (Tue, 02 Apr 2019 19:22:28 GMT):
@mastersingh24 thats exactly what i'd like to do, i'm a little unclear on how to do that though. Unfortunately i just realized this is the nodejs channel not hte java channel and im writing java client right now

Antimttr (Tue, 02 Apr 2019 19:22:57 GMT):
I am able to extract out of the enrollment the TLS Cert PEM and the TLS Key PEM

Antimttr (Tue, 02 Apr 2019 19:23:03 GMT):
and i store those in mongo with the admin record

Antimttr (Tue, 02 Apr 2019 19:23:19 GMT):
but how to reconstitute the Enrollment object after i load the user up from db

luckforzhang (Wed, 03 Apr 2019 01:04:42 GMT):
@bretharrison sure, thanks!

ShrutiHK (Wed, 03 Apr 2019 04:27:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=MJ7AQ964WXvwNcwiA) @bretharrison @bretharrison Thanks for your reply. Should I include this export command in some script file or should I run it directly in terminal? Also, where will I be able to see the log messages - in peer container or chaincode containers?

Randyshu2018 (Wed, 03 Apr 2019 07:07:11 GMT):
Hi,guys,how about gateway?

Randyshu2018 (Wed, 03 Apr 2019 07:11:41 GMT):
in other words,I want to develop a server to listen chaincode event ,Is geteway a good chioce?

davidkel (Wed, 03 Apr 2019 07:50:52 GMT):
@Randyshu2018 fabric-network will get support for event listening in 1.4.1 release of the node-sdk

florianc (Wed, 03 Apr 2019 07:51:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mxuKyCBzuGN5hmjLB) @walmon Thank you.

Randyshu2018 (Wed, 03 Apr 2019 08:17:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=T9EEBGEaTmqBgPQ5G) @davidkel ok,3Q

sahilgoel (Wed, 03 Apr 2019 09:05:07 GMT):
Has joined the channel.

sahilgoel (Wed, 03 Apr 2019 09:05:17 GMT):
Hi @davidkhala

davidkhala (Wed, 03 Apr 2019 09:05:19 GMT):
@sahilgoel here

sahilgoel (Wed, 03 Apr 2019 09:05:19 GMT):
I am having an issue with the Node SDK when querying the data from the peers

sahilgoel (Wed, 03 Apr 2019 09:05:34 GMT):
I had provided the list of peers in the connection.json file

sahilgoel (Wed, 03 Apr 2019 09:06:25 GMT):
there are total 3 peers with three different organisations

sahilgoel (Wed, 03 Apr 2019 09:06:42 GMT):
Now the issue is with the reading the data from an specific peer

sahilgoel (Wed, 03 Apr 2019 09:07:02 GMT):
Only one peer is able to perform the read query from the SDK

sahilgoel (Wed, 03 Apr 2019 09:07:23 GMT):
But all the three peers are able to perform the write peration

sahilgoel (Wed, 03 Apr 2019 09:07:23 GMT):
But all the three peers are able to perform the write operation

sahilgoel (Wed, 03 Apr 2019 09:07:59 GMT):
I had check this by editing the connection.json file and removing the 2 peers from it

sahilgoel (Wed, 03 Apr 2019 09:08:25 GMT):
If i query from the CLI from each peers then the read operation is working fine

sahilgoel (Wed, 03 Apr 2019 09:09:32 GMT):
So i am not able to understand what is the problem with the SDK? As it allows only one peers to read but all peers to write

sahilgoel (Wed, 03 Apr 2019 09:09:32 GMT):
So i am not able to understand what is the problem with the SDK? As it allows only one peer to read but all peers to write

sahilgoel (Wed, 03 Apr 2019 09:10:26 GMT):
The network is in production mode deployed with kubernetes (3 Different Cloud cluster)

pankajcheema (Wed, 03 Apr 2019 09:12:35 GMT):
Hi @davidkhala Me and and sahil are woorking on the same project

pankajcheema (Wed, 03 Apr 2019 09:12:35 GMT):
Hi @davidkhala Me and and sahil are working on the same project

davidkhala (Wed, 03 Apr 2019 09:15:40 GMT):
My suggestion is if you have man-power, do not rely too much on connection profile.

davidkhala (Wed, 03 Apr 2019 09:16:33 GMT):
use native `Peer`, `Orderer` Object with your specified url, cert is more clear

davidkhala (Wed, 03 Apr 2019 09:16:45 GMT):
but it is my personal idea.

sahilgoel (Wed, 03 Apr 2019 09:18:02 GMT):
I was just testing it, i have no special requirement to query a particular peer at current

sahilgoel (Wed, 03 Apr 2019 09:18:25 GMT):
suppose i have three peers peer0, peer1 and peer2.

sahilgoel (Wed, 03 Apr 2019 09:18:42 GMT):
So in my case only peer0 is able to make the query

sahilgoel (Wed, 03 Apr 2019 09:18:54 GMT):
and peer0 and peer1 and peer2 are able to invoke

sahilgoel (Wed, 03 Apr 2019 09:19:28 GMT):
if i use peer1 or peer2 or both then i got the error no peer available for queryt

sahilgoel (Wed, 03 Apr 2019 09:19:28 GMT):
if i use peer1 or peer2 or both then i got the error no peer available for query

davidkhala (Wed, 03 Apr 2019 09:21:36 GMT):
It could be a bug for connection profile, since it is a little out-of-maintain seeminly.

davidkhala (Wed, 03 Apr 2019 09:22:00 GMT):
but it could not represent other part of SDK

pankajcheema (Wed, 03 Apr 2019 09:22:30 GMT):
@davidkhala So should I open an issue over jira

pankajcheema (Wed, 03 Apr 2019 09:22:31 GMT):
?

davidkhala (Wed, 03 Apr 2019 09:22:41 GMT):
Sure, you can

pankajcheema (Wed, 03 Apr 2019 09:23:32 GMT):
Is there any variable you remember for this that we can stop any particular peer from query

pankajcheema (Wed, 03 Apr 2019 09:23:47 GMT):
@davidkhala

pankajcheema (Wed, 03 Apr 2019 09:26:37 GMT):
I am creating a test-network and will test again this case there .

pankajcheema (Wed, 03 Apr 2019 09:26:48 GMT):
I will let you know the results

pankajcheema (Wed, 03 Apr 2019 09:27:21 GMT):
thanks @davidkhala

davidkhala (Wed, 03 Apr 2019 09:30:13 GMT):
maybe, if you assigned it as committing peer only, not endorsing peer,

pankajcheema (Wed, 03 Apr 2019 09:41:34 GMT):
so a committter peer cannot query ?

amanjain (Wed, 03 Apr 2019 10:20:26 GMT):
Has joined the channel.

mallikarjunasai995 (Wed, 03 Apr 2019 10:24:07 GMT):
is there any good example or article on how to create rest server from the fabric chaincode ?

bretharrison (Wed, 03 Apr 2019 12:56:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Jrm9RobfnLXHBoeLF) @ShrutiHK where the command is run is totally up to you, this is logging for the client side, your application program that is using the NodeSDK. The Peer and chaincode logs are on the fabric server side, within the docker containers.

dave.enyeart (Wed, 03 Apr 2019 15:10:31 GMT):
@andrew-coleman @bretharrison @rickr @jyellick I've created a Jira for SDK handling of transaction submission retries: https://jira.hyperledger.org/browse/FABN-1196

dave.enyeart (Wed, 03 Apr 2019 15:10:50 GMT):
We can discuss in the Jira or here...

bretharrison (Wed, 03 Apr 2019 15:32:21 GMT):
I this something that we should be thinking about for 1.4?

dave.enyeart (Wed, 03 Apr 2019 17:03:08 GMT):
@bretharrison I wouldn't rush anything for v1.4.1, but certainly it is fair game for a v1.4.2

dave.enyeart (Wed, 03 Apr 2019 17:04:33 GMT):
@andrew-coleman @bretharrison @rickr @jyellick A few of us talked and we are not too crazy about the programming model doing automatic retries... this should likely be handled by the app. So I've highlighted in bold in the Jira what I still think is important to figure out:

dave.enyeart (Wed, 03 Apr 2019 17:04:33 GMT):
@andrew-coleman @bretharrison @rickr @jyellick A few of us talked and we are not too fond of the idea of the programming model doing automatic retries... this should likely be handled by the app. So I've highlighted in bold in the Jira what I still think is important to figure out:

dave.enyeart (Wed, 03 Apr 2019 17:04:42 GMT):
`For example is it possible for application to resubmit the same exact transaction again to the programming model, in which case they should listen for events with this txid, or must they submit a new transaction with a new txid, in which case they should listen for both txids?`

ahy (Wed, 03 Apr 2019 17:44:20 GMT):
Has joined the channel.

mahoney1 (Wed, 03 Apr 2019 17:50:42 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

luckforzhang (Thu, 04 Apr 2019 06:47:18 GMT):
hi guys, is there any quick way to switch client by using `gateway` ? Because I have found that if you get the gateway by 'admin', and then `const gateway = await getGateway(ADMIN); const client = gateway.getClient();`, the client is default to 'Org1MSP', so I was wondering if there is a way to switch the Client to other mspid ?

luckforzhang (Thu, 04 Apr 2019 06:49:06 GMT):
the `getGateway(ADMIN)` is using some wallet, and the ADMIN is from Org1MSP, that is ok, but, let's say we want a client from OrdererMSP, which we don't have that in the wallet

luckforzhang (Thu, 04 Apr 2019 06:51:20 GMT):
Hi guys, is there a way to create a gateway, which can produce a client instance from OrdererMSP? I don't have the ordererMSP identity in the wallet.

SubhodI (Thu, 04 Apr 2019 10:47:36 GMT):
Hi Team, With respect to Hyperleger Fabric v1.4, Which port should be used to listen events? Is it 7051 or 7053?

rthatcher (Thu, 04 Apr 2019 11:09:21 GMT):
@SubhodI - port 7053 was used on earlier versions of Fabric. 1.4 uses 7051.

SubhodI (Thu, 04 Apr 2019 12:17:45 GMT):
@rthatcher Thanks, Good to know that. Node SDK documentations are pointing to 7053(Sample files). So peer works completely using just 1 port

mahoney1 (Thu, 04 Apr 2019 15:31:38 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

vsadriano (Thu, 04 Apr 2019 19:05:24 GMT):
@zhaochy hi! I'm starting with `fabric-network` and getting `error TS2304: Cannot find name 'ByteBuffer'`. I installed `@types/bytebuffer` but the error continues. Any idea?

Estebanrestrepo (Thu, 04 Apr 2019 23:20:12 GMT):
How to invoke a chaincode form another chaincode?

davidkhala (Fri, 05 Apr 2019 00:43:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=5YmG3rfxXdWuFRJZy) @Estebanrestrepo #fabric-chaincode-dev

davidkhala (Fri, 05 Apr 2019 00:45:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3dcRZnCMBjjGNYDPY) @mallikarjunasai995 one good example is fabric-samples/balance-transfer

davidkhala (Fri, 05 Apr 2019 00:58:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=F3fQokMkAvJDJW6a3) @dave.enyeart I think if it is technial possible, we should use a same txid, making it as "It is not naturally a invalid transaction which make eventhub silent. The cause is from orderer"

davidkhala (Fri, 05 Apr 2019 01:00:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DG5sNFYHYaDZMhXhK) @SubhodI That will be a legacy, could you help to point it out where is it?

mallikarjunasai995 (Fri, 05 Apr 2019 02:59:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=o2ezQicAft3W9MW8j) @davidkhala yes i am going through that balance transfer app ... but the thing is when i ran that app in typescript .. am getting below error ... ./runApp.sh: line 71: ts-node: command not found have tried installing typescript and also followed top staoverlow answers to resolve this but no lucjk have

walmon (Fri, 05 Apr 2019 03:48:04 GMT):
Something that may solve it quickly is installing typescript globally @mallikarjunasai995

walmon (Fri, 05 Apr 2019 03:48:12 GMT):
`npm i -g typescript ts-node`

mallikarjunasai995 (Fri, 05 Apr 2019 04:39:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ga3yN6SQPzn3sz32a) @walmon i did it .. but with that i have restarted the system and then reinstalled npm modules it started working thatnks walmon... .but as suggested in the app i browsed at the following link : localhost:4000/ it is saying unauthorized token .. so where can i get that token ... ?

mallikarjunasai995 (Fri, 05 Apr 2019 04:55:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=4RS42Fi3WueLQ3tef) @davidkhala can you help me on this ... authorization error ...

Rajatsharma (Fri, 05 Apr 2019 07:39:58 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.

mahoney1 (Fri, 05 Apr 2019 08:37:25 GMT):
@vsadriano had you done `npm install --save @types/bytebuffer ` ? Are you missing types in your tsconfig.json in any case? See https://github.com/hyperledger/fabric-samples/blob/release-1.4/balance-transfer/typescript/tsconfig.json#L18 for an example

SubhodI (Fri, 05 Apr 2019 08:58:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8vuXP5n2ZK9GyH7vL) @davidkhala https://fabric-sdk-node.github.io/tutorial-network-config.html yml file has eventUrl property for peers

mahoney1 (Fri, 05 Apr 2019 09:17:32 GMT):
@Rajatsharma answered on #fabric-chaincode-dev

vsadriano (Fri, 05 Apr 2019 10:36:33 GMT):
@mahoney1 I had installed `ByteBuffer` as devDependency (npm install -D @types/bytebuffer). When I put `bytebuffer` in `compilerOptions`-> `types`, `tsc` ran ok. Tks!

vsadriano (Fri, 05 Apr 2019 10:36:33 GMT):
@mahoney1 I had installed `ByteBuffer` as devDependency (`npm install -D @types/bytebuffer`). When I put `bytebuffer` in `compilerOptions`-> `types`, `tsc` ran ok. Tks!

vsadriano (Fri, 05 Apr 2019 10:36:33 GMT):
@mahoney1 I had installed `ByteBuffer` as devDependency ( `npm install -D @types/bytebuffer` ). When I put `bytebuffer` in `compilerOptions`-> `types`, `tsc` ran ok. Tks!

davidkhala (Fri, 05 Apr 2019 14:07:17 GMT):
@SubhodI The document URL is deprecated, for release-1.4, use https://fabric-sdk-node.github.io/release-1.4/tutorial-network-config.html

itg1996 (Sat, 06 Apr 2019 06:30:10 GMT):
Has joined the channel.

itg1996 (Sat, 06 Apr 2019 06:37:18 GMT):
hi everyone , I am using fabric nodeJS sdk to interact with fabric and i am getting following error in peer logs: WARN 04b channel [channel1]: MSP error: MSP Org1 is unknown

itg1996 (Sat, 06 Apr 2019 06:37:43 GMT):
everything works fine when I interact using cli

itg1996 (Sat, 06 Apr 2019 06:38:47 GMT):
the console shows the error : error: [Channel.js]: Error: 2 UNKNOWN: access denied: channel [channel1] creator org [Org1]

mallikarjunasai995 (Sat, 06 Apr 2019 18:50:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=53CephTerxPxLPhJP) @itg1996 yes am also getting the same error

mallikarjunasai995 (Sat, 06 Apr 2019 18:50:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=53CephTerxPxLPhJP) @itg1996 yes am also getting the same error @mahoney1 @davidkhala could you please help me on this

mallikarjunasai995 (Sat, 06 Apr 2019 19:00:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ga3yN6SQPzn3sz32a) @walmon yes its worked ..thanks

rsoeldner (Sun, 07 Apr 2019 06:29:14 GMT):
Morning, I struggle to retrieve parse back a json from the chaincode. In my chaincode i do: ``` const item = await ctx.stub.getState(key); return item.toString(); ``` and in my calling function: ``` const item = await contract.evaluateTransaction('queryBla', param1); const obj = JSON.parse(item.toString()); console.log(typeof(obj)); // equals string, not object ``` Can someone help here ?

davidkhala (Sun, 07 Apr 2019 11:09:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=tK8HuoLnxRdp5MbL9) @mallikarjunasai995 have you joined your current peer to channel yet?

mallikarjunasai995 (Sun, 07 Apr 2019 16:35:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=y2yeH325D2BzYqm4u) @davidkhala yes becuase of this only got the error .... actually am running the balace transfer app sdk in typescirpt ... there were still so many mistakes in that typsecirpt so i left that one and now am running javascript balance transfer app with some minor changes

mallikarjunasai995 (Sun, 07 Apr 2019 16:35:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=y2yeH325D2BzYqm4u) @davidkhala yes becuase of this only got the error .... actually am running the balace transfer app sdk in typescirpt where it failed the testcase of joining the channel on org1 and org2 and moved to next testcases that is the reason why i got the rror ... there are still so many mistakes in that typsecirpt app so i left that one and now am running javascript balance transfer app with some minor changes

davidkhala (Mon, 08 Apr 2019 04:07:45 GMT):
typescript support and update is always a litttle behind native nodejs, so take care

davidkhala (Mon, 08 Apr 2019 04:07:45 GMT):
@mallikarjunasai995 typescript support and update is always a litttle behind native nodejs, so take care

luckforzhang (Mon, 08 Apr 2019 09:14:35 GMT):
Hi guys, I have a problem: now I have `the data, the signature of data, the cert of signer`, so how can I use node SDK

luckforzhang (Mon, 08 Apr 2019 09:14:35 GMT):
Hi guys, I have a problem: now I have `the data, the signature of data, the cert of signer`, so how can I use node SDK to verify the signature?

luckforzhang (Mon, 08 Apr 2019 09:14:35 GMT):
Hi guys, I have a problem: now I have `the data, the signature of data, the cert of signer`, so how can I use node SDK to verify the signature offline?

nakulgr13 (Mon, 08 Apr 2019 12:54:36 GMT):
Has joined the channel.

Dvi 19 (Mon, 08 Apr 2019 14:01:10 GMT):
Has joined the channel.

Dvi 19 (Mon, 08 Apr 2019 14:01:28 GMT):
any examples of node sdk for fabric?

mauricio (Mon, 08 Apr 2019 19:59:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=AparchDBnYrSaHgnP) @Dvi 19 https://github.com/hyperledger/fabric-samples/tree/release-1.4/fabcar/javascript

mauricio (Mon, 08 Apr 2019 20:02:31 GMT):
Hi, I'm getting this error after update to Raft (1.4.1-rc1), maybe some TLS config is missing in the sdk ? ``` 2019-04-08T19:56:40.166Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: 2 UNKNOWN: Stream removed error (fabric/query) Failed to evaluate transaction: Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: 2 UNKNOWN: Stream removed ```

mauricio (Mon, 08 Apr 2019 21:31:22 GMT):
Solved! Thanks

rishabh1102 (Mon, 08 Apr 2019 21:51:51 GMT):
Hey, had a doubt with respect to registering for block events using the sdk. Once I receive the block, how can I differentiate between chaincode events and transaction events?

davidkhala (Tue, 09 Apr 2019 01:02:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=YXQtuAeybtkrza7fd) @rishabh1102 for chaincodeEvent, please use ChannelEvent#registerChaincodeEvent

luckforzhang (Tue, 09 Apr 2019 01:12:18 GMT):
Hi, I want to verify signature offline, and now I have `the data, the signature of data, the cert of signer`, so how can I use node SDK to verify the signature offline?

davidkhala (Tue, 09 Apr 2019 01:31:07 GMT):
@luckforzhang Actually you could verify signature with typical cryptography library as you liked without help of fabric

luckforzhang (Tue, 09 Apr 2019 01:32:21 GMT):
@davidkhala yeah, good idea, thanks!

davidkhala (Tue, 09 Apr 2019 01:57:55 GMT):
@simsc @bretharrison Hi Simon and Bret and all community members, I could not make a decision while concern refactoring `fabric-client/lib/CertificateAuthority.js`, since it is designed for a helper feature released in 1.x `Connection profile`. It cross-over `fabric-ca-client` and `fabric-client`, but it is now placed under `fabric-client`. My suggestion is move it to `fabric-network` along with all its documents and tests. Sincerely want to listen to your idea about it.

davidkhala (Tue, 09 Apr 2019 02:45:49 GMT):
@bretharrison @andrew-coleman is there a way for *1.x* SDK alternative implement of `peer chaincode package`?

davidkhala (Tue, 09 Apr 2019 02:45:49 GMT):
@bretharrison @andrew-coleman is there in *1.x* SDK an alternative implement of `peer chaincode package`?

davidkel (Tue, 09 Apr 2019 07:24:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2xAkXxxCpTMjFNnuJ) I don't think fabric-network would be the place for this. The connection profile logic is purely owned by fabric-client so not sure why it would cross over to fabric-ca-client however there is a common package being built for the node-sdk so if appropriate it could go there

davidkel (Tue, 09 Apr 2019 07:24:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2xAkXxxCpTMjFNnuJ) @davidkhala I don't think fabric-network would be the place for this. The connection profile logic is purely owned by fabric-client so not sure why it would cross over to fabric-ca-client however there is a common package being built for the node-sdk so if appropriate it could go there

davidkel (Tue, 09 Apr 2019 07:29:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=c4vZuNtdZGFq572vr) @davidkhala have a look at for `fromDirectory` method on the Package class. https://fabric-sdk-node.github.io/release-1.4/Package.html

davidkhala (Tue, 09 Apr 2019 09:39:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EpiasYwyoB6W8tHrA) @davidkel is the "common package" you mentioned `fabric-common`?

davidkel (Tue, 09 Apr 2019 09:39:59 GMT):
@davidkhala sounds about right

davidkhala (Tue, 09 Apr 2019 09:45:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EpiasYwyoB6W8tHrA) @davidkel Let me explain more about "why it is cross over". Previously I have similar understanding like yours ,until I inspecting `fabric-sdk-node/test/fixtures/profiles`. This is a directory storing some connection profile samples, any one of them has a section `certificateAuthorities`, which is loaded and parsed in `fabric-client/lib/CertificateAuthority.js`. In my extreme opinion, the section should be eliminated and the file is not useful in fabric-client. But concerning compatibility, I have to go for community.

davidkhala (Tue, 09 Apr 2019 09:48:16 GMT):
And what I see in connection profile concept, it could be something *beyond* `fabric-client` and `fabric-ca-client` as wrapper. but for fabric-common, it is designed to be under both `fabric-ca-client` and `fabric-client`. so that might not be a good place.

davidkhala (Tue, 09 Apr 2019 09:48:16 GMT):
And what I see in connection profile concept, it could be something *beyond* `fabric-client` and `fabric-ca-client` as wrapper. but for fabric-common, it is designed to be *under* both `fabric-ca-client` and `fabric-client`. so that might not be a good place.

davidkel (Tue, 09 Apr 2019 09:53:46 GMT):
@davidkhala I understand where you are coming from, but I don't believe the ownership of the connection profile should be in fabric-network. The connection profile is used to describe a fabric network and it can optionally include the CAs, but it isn't mandatory. The fabric-client owns the specification and decided that in order to process the concept of a CA in it provided dynamic capability to load and create fabric-ca-client objects.

davidkel (Tue, 09 Apr 2019 09:53:46 GMT):
@davidkhala I understand where you are coming from, but I don't believe the ownership of the connection profile should be in fabric-network. The connection profile is used to describe a fabric network and it can optionally include the CAs, but it isn't mandatory. The fabric-client owns the specification and decided that in order to process the concept of a CA in it provided dynamic capability to load and create fabric-ca-client objects. It may have made more sense for fabric-ca-client to be able to parse a connection profile looking specifically for what is relevant to it.

davidkhala (Tue, 09 Apr 2019 09:54:29 GMT):
(and exactly speaking it is not a wrapper, LOL)

davidkel (Tue, 09 Apr 2019 09:56:18 GMT):
@davidkhala What could make sense in the future is for fabric-network to accept a connection profile and provide higher level interaction that includes both the fabric-client capabilities and the fabric-ca-client capabilities.

davidkel (Tue, 09 Apr 2019 09:56:18 GMT):
@davidkhala What could make sense in the future is for fabric-network to accept a connection profile and provide higher level interaction that includes both the fabric-client capabilities and the fabric-ca-client capabilities. But leave the ownership of the spec to fabric-client

davidkhala (Tue, 09 Apr 2019 09:57:05 GMT):
@davidkel Indeed, and it is what I mean

davidkel (Tue, 09 Apr 2019 09:57:52 GMT):
@davidkhala So the answer would be to leave fabric-client as the owner of the connection profile (ie make no changes to the lower level api) and extend fabric-network to provide CA capabilities

davidkhala (Tue, 09 Apr 2019 09:57:56 GMT):
I am not quite familiar with recent progress on fabric-network, so what naturally it is designed for in short?

davidkel (Tue, 09 Apr 2019 10:00:27 GMT):
@davidkhala fabric-network exists to make interacting with fabric much easier. The first steps were around submit/notify, query and basic identity management. These were the biggest pain points for node.js client apps. They invariably didn't get it quite right and had not kind of recovery/ha capabilities. So fabric-network tries to address this

davidkel (Tue, 09 Apr 2019 10:00:27 GMT):
@davidkhala fabric-network exists to make interacting with fabric much easier. The first steps were around submit/notify, query and basic identity management. These were the biggest pain points for node.js client apps. They invariably didn't get it quite right and had no kind of recovery/ha capabilities. So fabric-network tries to address this

davidkhala (Tue, 09 Apr 2019 10:05:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=q5Y2xNaJrykX4Cqfo) @davidkel correct me if my understanding is wrong: *in future*, connection profile for fabric-client would not has optional section to specify fabric-ca connection, instead, the full connection profile (compatible to current) would be accepted as config for fabric-network.

davidkel (Tue, 09 Apr 2019 10:08:41 GMT):
@davidkhala fabric-network already accepts a connection profile, specifying the certificate authorities in a connection profile will always be optional. fabric-network doesn't make use of the certificate authorities section of a connection profile yet. hopefully in the future it will and provide some nice high level apis for working with CAs and walletes

davidkel (Tue, 09 Apr 2019 10:08:41 GMT):
@davidkhala fabric-network already accepts a connection profile, specifying the certificate authorities in a connection profile will always be optional. fabric-network doesn't make use of the certificate authorities section of a connection profile yet. hopefully in the future it will and provide some nice high level apis for working with CAs and wallets

davidkhala (Tue, 09 Apr 2019 10:10:28 GMT):
"fabric-network doesn't make use of the certificate authorities section of a connection profile yet" thanks for notifying me.

bretharrison (Tue, 09 Apr 2019 15:54:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=c4vZuNtdZGFq572vr) @davidkhala sorta `Package.fromDirectory()` gets a NodeSDK object that has the ChaincodeSpec protobuf object instance with code and metadata

davidkhala (Tue, 09 Apr 2019 16:02:18 GMT):
@bretharrison but how could we customize instantiate policy (not endorsement policy, but control who can instantiate a chaincode)

davidkhala (Tue, 09 Apr 2019 16:03:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fE8w2j6uf5suovuCy) @bretharrison but how could we customize instantiate policy (not endorsement policy, but the one control who can instantiate a chaincode)

bretharrison (Tue, 09 Apr 2019 16:04:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gZdrrd2pfgdi6zATH) @davidkhala You should use the new lifecycle of v2.0.0 ... coming soon

bretharrison (Tue, 09 Apr 2019 16:43:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=2xAkXxxCpTMjFNnuJ) @davidkhala Just leave it there for now

nfrunza (Tue, 09 Apr 2019 16:46:23 GMT):
Hello, what is the max lengths of the channel name in HLFabric ?

SaphiraBjartskular (Tue, 09 Apr 2019 22:42:24 GMT):
Has joined the channel.

adityanalgework1 (Tue, 09 Apr 2019 23:24:00 GMT):
Has joined the channel.

adityanalgework1 (Tue, 09 Apr 2019 23:24:13 GMT):
Trying to follow fabric-samples tutorial

adityanalgework1 (Tue, 09 Apr 2019 23:24:50 GMT):
It errors out at " Instantiate Chaincode" step

adityanalgework1 (Tue, 09 Apr 2019 23:25:18 GMT):
The error I receive is ''' identity 0 does not satisfy principal: the identity is a member of a different MSP (expected OrdererMSP, got Org1MSP) '''

adityanalgework1 (Tue, 09 Apr 2019 23:25:18 GMT):
The error I receive is ``` identity 0 does not satisfy principal: the identity is a member of a different MSP (expected OrdererMSP, got Org1MSP) ```

adityanalgework1 (Tue, 09 Apr 2019 23:26:05 GMT):
My API request is ``` curl -s -X POST \ http://localhost:4000/channels/mychannel/chaincodes \ -H "authorization: Bearer " \ -H "content-type: application/json" \ -d '{ "chaincodeName":"mycc", "chaincodeVersion":"v0", "chaincodeType": "golang", "args":["a","100","b","200"] }' ```

adityanalgework1 (Tue, 09 Apr 2019 23:26:42 GMT):
JWT token I use is obtained from this api ``` curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=Org1' ```

davidkhala (Tue, 09 Apr 2019 23:32:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HsNfDBzyp4uhGFjxJ) @nfrunza I have tested with 200 length and OK. (not knowing the upper limit so far)

davidkhala (Tue, 09 Apr 2019 23:32:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HsNfDBzyp4uhGFjxJ) @nfrunza status=BAD_REQUEST, info=initializing configtx manager failed: bad channel ID: channel ID illegal, cannot be longer than 249

luckforzhang (Wed, 10 Apr 2019 01:06:26 GMT):
@adityanalgework1 I thought the error is pretty clear about `expected OrdererMSP, got Org1MSP`, so may you get clear of `which org is the user Jim in?`, by the way, are you sending request to Orderer? so you can still working with the RESTful api?

luckforzhang (Wed, 10 Apr 2019 01:06:26 GMT):
@adityanalgework1 are you using the ./fabric-samples/balance-transfer?

nfrunza (Wed, 10 Apr 2019 01:44:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=P43a7ATcB5FdML4zc) @davidkhala thank you

BellaAdams (Thu, 11 Apr 2019 08:12:47 GMT):

Clipboard - April 11, 2019 4:12 PM

BellaAdams (Thu, 11 Apr 2019 08:13:10 GMT):
How to use the attr_reqs?

BellaAdams (Thu, 11 Apr 2019 08:13:48 GMT):
2019-04-11T08:06:37.378Z - error: [FabricCAClientService.js]: Invalid enroll request, attr_reqs object is missing the name of the attribute (node:236140) UnhandledPromiseRejectionWarning: Error: req.att_regs is missing the attribute name at FabricCAServices.enroll (D:\workspace\nodejs\certManagement\node_modules\fabric-ca-client\lib\FabricCAServices.js:195:13) at testSDK (D:\workspace\nodejs\certManagement\test.js:24:33) at Object. (D:\workspace\nodejs\certManagement\test.js:27:1) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) (node:236140) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:236140) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. PS D:\workspace\nodejs\certManagement> node .\test.js 2019-04-11T08:07:39.902Z - error: [FabricCAClientService.js]: Invalid enroll request, attr_reqs object is missing the name of the attribute (node:235628) UnhandledPromiseRejectionWarning: Error: req.att_regs is missing the attribute name at FabricCAServices.enroll (D:\workspace\nodejs\certManagement\node_modules\fabric-ca-client\lib\FabricCAServices.js:195:13) at testSDK (D:\workspace\nodejs\certManagement\test.js:24:33) at Object. (D:\workspace\nodejs\certManagement\test.js:27:1) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) (node:235628) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:235628) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. PS D:\workspace\nodejs\certManagement> node .\test.js 2019-04-11T08:09:32.946Z - error: [FabricCAClientService.js]: Invalid enroll request, attr_reqs object is missing the name of the attribute (node:235672) UnhandledPromiseRejectionWarning: Error: req.att_regs is missing the attribute name at FabricCAServices.enroll (D:\workspace\nodejs\certManagement\node_modules\fabric-ca-client\lib\FabricCAServices.js:195:13) at testSDK (D:\workspace\nodejs\certManagement\test.js:24:33) at Object. (D:\workspace\nodejs\certManagement\test.js:27:1) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) (node:235672) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:235672) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

BellaAdams (Thu, 11 Apr 2019 08:14:10 GMT):
When I use the attr_reqs like in the picture.something wrong

davidkel (Thu, 11 Apr 2019 08:26:14 GMT):
@BellaAdams attr_reqs is of the form `[{name: 'attrName', value: 'attrValue', ecert: true/false},...]`. ecert if optional and defaults to false

BellaAdams (Thu, 11 Apr 2019 08:28:49 GMT):
thanks ?

BellaAdams (Thu, 11 Apr 2019 08:30:56 GMT):
When I enroll a cert , I find that the key is different from what I get via fabric-ca-client

BellaAdams (Thu, 11 Apr 2019 08:31:21 GMT):

Clipboard - April 11, 2019 4:31 PM

BellaAdams (Thu, 11 Apr 2019 08:31:34 GMT):
This is the key I get via fabric-node-sdk.

BellaAdams (Thu, 11 Apr 2019 08:32:02 GMT):

Clipboard - April 11, 2019 4:31 PM

BellaAdams (Thu, 11 Apr 2019 08:32:19 GMT):
This is the key I get via fabric-ca-client

BellaAdams (Thu, 11 Apr 2019 08:32:58 GMT):
How to get the same key like fabric-ca-client

BellaAdams (Thu, 11 Apr 2019 08:33:45 GMT):
const enrollment = await ca.enroll({ enrollmentID: 'admin', enrollmentSecret: 'pass',profile:'tls' }) console.log(enrollment)

BellaAdams (Thu, 11 Apr 2019 08:33:49 GMT):
This is my code

AkshayAshok (Thu, 11 Apr 2019 10:34:48 GMT):
has anyone used the fileSystemCard store api? i try to use the fileSystemCardStore.put(_idCardName, _idCardData) function but it throws an error , it says that put is not defined

AkshayAshok (Thu, 11 Apr 2019 10:35:41 GMT):
Cannot read property 'put' of undefined

AkshayAshok (Thu, 11 Apr 2019 10:56:53 GMT):
router.post('/upload',upload.single('card'),function (req, res) { let _idCardData; return IdCard.fromArchive(req.file.buffer) .then(function(idCardData) { _idCardData = idCardData; return BusinessNetworkCardStore.getDefaultCardName(idCardData) }) .then((idCardName)=>{ console.log(_idCardData) return fileSystemCardStore.put(idCardName, _idCardData) }) .then((r)=>{ console.log("success") })

davidkel (Thu, 11 Apr 2019 11:09:58 GMT):
@AkshayAshok You probably want to ask on the #composer channel as this isn't relevant to fabric sdk node

florianc (Thu, 11 Apr 2019 12:46:10 GMT):
Hi. When registering for an event with a start and a end block, without secifying `disconnect: false`, the listener returns an error after the first seen event. However, with `disconnect: false`, the listener keeps listenning. How can i stop the listener when I reached the endBlock? Current code: `async function subscribeToEvent(peer, channel, chaincodeName, eventName, startBlock, endBlock, eventCallback) { let eventHub = channel.newChannelEventHub(peer); event = eventHub.registerChaincodeEvent(chaincodeName, eventName, (event, blockNumber, txid, status) => { var eventData = { payload: event.payload.toString('utf8'), blockNumber: blockNumber, txid: txid, status: status }; eventCallback(eventData); }, (error) => { console.log(error); throw new Error(error); }, { startBlock: startBlock, endBlock: endBlock, disconnect: false }); eventHub.connect(true); }`

florianc (Thu, 11 Apr 2019 12:46:10 GMT):
Hi. When registering for an event with a start and a end block, without secifying `disconnect: false`, the listener returns an error after the first seen event. However, with `disconnect: false`, the listener keeps listenning. How can i stop the listener when I reached the endBlock? Current code: ``` async function subscribeToEvent(peer, channel, chaincodeName, eventName, startBlock, endBlock, eventCallback) { let eventHub = channel.newChannelEventHub(peer); event = eventHub.registerChaincodeEvent(chaincodeName, eventName, (event, blockNumber, txid, status) => { var eventData = { payload: event.payload.toString('utf8'), blockNumber: blockNumber, txid: txid, status: status }; eventCallback(eventData); }, (error) => { console.log(error); throw new Error(error); }, { startBlock: startBlock, endBlock: endBlock, disconnect: false }); eventHub.connect(true); } ```

davidkel (Thu, 11 Apr 2019 13:53:51 GMT):
@florianc suggest you raise a JIRA describing the problem in more detail (eg startblock, endblock values etc) as well as the error received

davidkel (Thu, 11 Apr 2019 13:53:51 GMT):
@florianc suggest you raise a JIRA describing the problem in more detail (eg startblock, endblock values etc) as well as the error received as it could be a bug

florianc (Thu, 11 Apr 2019 13:58:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jKoGSirzQKkrkXXx4) @davidkel Will do. Thanks.

SaphiraBjartskular (Thu, 11 Apr 2019 22:00:49 GMT):
stub.createCompositeKey() creates an object not a string... the documentation claims the method returns a string that is usable as in input parameter to putState() but this has not been the case for me. Anyone else seen this issue?

qizhang (Thu, 11 Apr 2019 22:27:45 GMT):
can we say the transaction has been organized into a block when the call `sendTransaction(request, timeout)` returns?

qizhang (Thu, 11 Apr 2019 22:27:45 GMT):
can we say the requested transaction has been organized into a block when the call `sendTransaction(request, timeout)` returns?

AkshayAshok (Fri, 12 Apr 2019 05:22:24 GMT):
is there any node SDK for creating ACL File? i didnt find any documentation

BellaAdams (Fri, 12 Apr 2019 07:09:23 GMT):
What's the difference between FabricCAServices and FabricCAClient?

mc (Fri, 12 Apr 2019 10:52:56 GMT):
Has joined the channel.

mc (Fri, 12 Apr 2019 10:53:51 GMT):
good morning, good afternoon, good evening

mc (Fri, 12 Apr 2019 10:53:58 GMT):
where ever you are in the world

mc (Fri, 12 Apr 2019 10:54:39 GMT):
I really want to use Node.js versus Go or Java for chaincode

bilalahmed (Fri, 12 Apr 2019 11:04:51 GMT):
Has joined the channel.

mc (Fri, 12 Apr 2019 11:25:19 GMT):
anyone have any experience with fabric-mock-stub?

rthatcher (Fri, 12 Apr 2019 11:44:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=43ep9LheuYvGJRPyM) @AkshayAshok What ACL file are you referring to?

florianc (Fri, 12 Apr 2019 14:43:42 GMT):
Hi. Could someone explain me this error? Event listeners that use startBlock or endBlock must be registered before connecting to the peer channel-based service

florianc (Fri, 12 Apr 2019 14:43:53 GMT):
(I got it with registerChaincodeEvent)

SaphiraBjartskular (Fri, 12 Apr 2019 15:26:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LK65tCnJPE3X2gPDH) Anyone seen this before?

davidkel (Fri, 12 Apr 2019 16:02:13 GMT):
@SaphiraBjartskular suggest you ask on the #fabric-chaincode-dev channel

davidkel (Fri, 12 Apr 2019 16:02:13 GMT):
@SaphiraBjartskular suggest you ask on the #fabric-chaincode-dev channel, also you might want to give an example of how you are calling it

SaphiraBjartskular (Fri, 12 Apr 2019 17:18:16 GMT):
ok thanks

mrudav.shukla (Mon, 15 Apr 2019 09:47:48 GMT):
How do we set Locality, State, Country and Organisation attributes of X509 certificates for the user identities? Using affiliation, we're able to attach OU attribute. And also Common Name(CN). But other attributes for the user remains empty. While Issuer portion of the certificate is set successfully.

mrudav.shukla (Mon, 15 Apr 2019 09:47:48 GMT):
How do we set Locality, State, Country and Organisation attributes of X509 certificates for the user identities? Using affiliation, we're able to attach OU attribute. And also Common Name(CN). But other attributes for the user remains empty. While Issuer portion of the certificate is set successfully.

mrudav.shukla (Mon, 15 Apr 2019 09:47:48 GMT):
How do we set Locality, State, Country and Organisation attributes of X509 certificates for the user identities? Using affiliation, we're able to attach OU attribute. And also Common Name(CN). But other attributes for the user remains empty. While Issuer portion of the certificate is set successfully. SO: https://stackoverflow.com/questions/55687562/setting-pem-attributes-for-user-identities-in-hyperledger-fabric

florianc (Mon, 15 Apr 2019 11:44:13 GMT):
When using "registerChaincodeEvent", setting "unregister" option to true while using a start block and an end block property makes the listener stop at the very first event found. Is it normal?

florianc (Mon, 15 Apr 2019 11:49:36 GMT):
According to the documentation: `the event listener is assumed to have seen the final event only if the end_block was set as a option and that end_block was seen by the the listener.` It does not seem to be the case.

florianc (Mon, 15 Apr 2019 11:51:07 GMT):
It seems to stop after the first event only.

florianc (Mon, 15 Apr 2019 12:01:07 GMT):
Also, in the same idea of being able to stop the listener, I don't understand the following line in the examples: ``` regid = channel_event_hub.registerChaincodeEvent(chaincode_id.toString(), '^evtsender*', (event, block_num, txnid, status) => { //do some stuff let event_payload = event.payload.toString('utf8'); if(event_payload.indexOf('CHAINCODE') > -1) { <=================== This line ``` In my test, all events return -1 (because 'CHAINCODE' does not exist)

davidkel (Mon, 15 Apr 2019 12:16:29 GMT):
@florianc did you raise a JIRA about the `unregister` option not working as expected ?

florianc (Mon, 15 Apr 2019 12:18:15 GMT):
Not yet. I already did last week because of a problem with the `disconnect ` option that I do not understand well here: https://jira.hyperledger.org/browse/FABN-1207

florianc (Mon, 15 Apr 2019 12:19:57 GMT):
Heading to jira right now.

florianc (Mon, 15 Apr 2019 12:34:17 GMT):
Well, I made a mistake and misunderstood the documentation. But still writing a ticket to propose that the event listener unregister itself after receiving all events in the block interval.

mfaisaltariq (Mon, 15 Apr 2019 13:26:56 GMT):
Does the SDK contain a function to get the total no.of transactions? I have tried finding it in the documentation but no luck. I have implemented the `Channel.queryInfo(peer, asAdmin);` function to get the block height.

bretharrison (Mon, 15 Apr 2019 16:01:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nsmL6uhQgW4czDmaZ) @florianc yes I see the bug with the register. Thanks for a detailed description.

bretharrison (Mon, 15 Apr 2019 16:01:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nsmL6uhQgW4czDmaZ) @florianc yes I see the bug with the register. Thanks for a detailed description. The listener will be disconnected by default after the first event when specifying an end block and not specifying the disconnect. The work around is to always specify the disconnect when specifying an end block.

bretharrison (Mon, 15 Apr 2019 16:11:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iJXPZYEmjdixu5jbX) @qizhang No, it must be sent to the orderer using `channel.sendTransaction()`. This will orderer it along with other transactions and then the peers will be able to commit it to the ledger. Keep in mind that there must be enough endorsements made by the peers (organizations) on the network to satisfy the endorsement policy.

florianc (Tue, 16 Apr 2019 06:44:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ASkKoQLDgEjFsAcHo) @bretharrison You are welcome. I'll use your work around. Thnk you.

GuillaumeCisco (Tue, 16 Apr 2019 07:53:16 GMT):
Hello folks, I'm working on the fabric-sdk-py for supporting channel event hub. The documentation for the node-sdk is here: https://fabric-sdk-node.github.io/tutorial-channel-events.html I have a couple of questions about the specifications? Is there any other available or the node-sdk is the one to follow? Also regarding the `connect(full_block)` method, I don't think this is the way to go. Same for the `start` and `stop` options. If we follow the logic, everything should be in `connect` or in the `register` methods. By the way, looks like `registerChaincodeEvent` only work with `connect(true)`. Thank you,

Randyshu2018 (Tue, 16 Apr 2019 09:29:25 GMT):
Hi,If use fabric-network api to develop application a good choice ? and I consider if wallet as the entrace to

Randyshu2018 (Tue, 16 Apr 2019 09:32:22 GMT):
Hi,If use fabric-network api to develop application a good choice ? and I consider if wallet as the entrance to connect to fabric, and then according to wallet permission listing functions。

Randyshu2018 (Tue, 16 Apr 2019 09:32:22 GMT):
Hi,If use fabric-network api to develop application a good choice ? and I consider using wallet as the entrance to connect to fabric, and then according to wallet permission listing functions。

ygnr (Tue, 16 Apr 2019 12:53:01 GMT):
Can anyone recommend good way to speed up instantiation of chaincode? It takes more than 10 min now fo rme.

florianc (Tue, 16 Apr 2019 12:54:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FxH6QWkiJqYnh2CD9) @ygnr Did you instal many different chaincodes or different versions of your chaincode?

ygnr (Tue, 16 Apr 2019 13:01:09 GMT):
@florianc I have previous versions of chaincode. How does that affect the time to instantiate?

florianc (Tue, 16 Apr 2019 13:04:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=knD55JqGvraC6qkSo) @ygnr I am not sure. But once I asked how fabric manages chaincode containers. When you instantiate a new chaincode (either a very new or a new version of an existing one), the peer creates a new container but does not destroy the other chaincodes container (like if you deploy V2, it does not destroy V1). From my observation, after having many chaincode containers, it takes more and more time to instantiate a new one. The only solution I found was to remove the useles container manually.

bretharrison (Tue, 16 Apr 2019 13:25:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nvEdksAWsAysamjCv) @GuillaumeCisco `ChannelEventHub.connect()` has more options see https://fabric-sdk-node.github.io/release-1.4/ChannelEventHub.html#connect__anchor The user that connects to receive full blocks must have the authority to read the full block data including the values of the chaincode events. The filtered blocks will only provide the chaincode event names that have matched the registered chaincode name (which allows for regular expression matching) and not provide the value, this may appear to be not working.

GuillaumeCisco (Tue, 16 Apr 2019 13:30:23 GMT):
Thanks @bretharrison. As I can see between https://fabric-sdk-node.github.io/release-1.4/global.html#ConnectOptions and https://fabric-sdk-node.github.io/tutorial-channel-events.html, an error occurs in the documentation. In the first one we see `connect(options, connectCallback)` and in the second one we only see `connect(full_block)`. I agree with the first one, it make more sense. Which one should we follow?

GuillaumeCisco (Tue, 16 Apr 2019 13:30:23 GMT):
Thanks @bretharrison. As I can see between https://fabric-sdk-node.github.io/release-1.4/global.html#ConnectOptions and https://fabric-sdk-node.github.io/tutorial-channel-events.html, an error occurs in the documentation. In the first one we see `connect(options, connectCallback)` and in the second one we only see `connect(full_block)`. I agree with the first one, it makes more sense. Which one should we follow?

GuillaumeCisco (Tue, 16 Apr 2019 13:30:23 GMT):
Thanks @bretharrison. As I can see between https://fabric-sdk-node.github.io/release-1.4/ChannelEventHub.html#connect__anchor and https://fabric-sdk-node.github.io/tutorial-channel-events.html, an error occurs in the documentation. In the first one we see `connect(options, connectCallback)` and in the second one we only see `connect(full_block)`. I agree with the first one, it makes more sense. Which one should we follow?

GuillaumeCisco (Tue, 16 Apr 2019 13:32:09 GMT):
Regarding `authority`, who decides about this? Where is it implemented? do we have to implement it on the SDK part? Thanks

GuillaumeCisco (Tue, 16 Apr 2019 14:04:49 GMT):
Furthermore `getChannelEventHubsForOrg` is not present in https://fabric-sdk-node.github.io/release-1.4/global.html#ConnectOptions, is it deprecated?

GuillaumeCisco (Tue, 16 Apr 2019 14:04:49 GMT):
Furthermore `getChannelEventHubsForOrg` is not present in https://fabric-sdk-node.github.io/release-1.4/ChannelEventHub.html#connect__anchor, is it deprecated?

davidkel (Tue, 16 Apr 2019 14:57:41 GMT):
@GuillaumeCisco see https://fabric-sdk-node.github.io/release-1.4/Channel.html#getChannelEventHubsForOrg__anchor

GuillaumeCisco (Tue, 16 Apr 2019 15:01:42 GMT):
thanks for this one @davidkel. I've updated my precedent message with right links. I was asking due to the presence of `new ChannelEventHub(channel, peer)` in https://fabric-sdk-node.github.io/release-1.4/ChannelEventHub.html#ChannelEventHub__anchor

GuillaumeCisco (Tue, 16 Apr 2019 15:04:46 GMT):
If I understand correctly, last and updated specifications are https://fabric-sdk-node.github.io/release-1.4/ChannelEventHub.html and not https://fabric-sdk-node.github.io/tutorial-channel-events.html

GuillaumeCisco (Wed, 17 Apr 2019 08:18:30 GMT):
By the way, I'm looking at the code of the `channel.py` file. A lot of methods are never used. And others are commented. I think a very big refacto is needed on the whole project. But it is a very big work to do...

GuillaumeCisco (Wed, 17 Apr 2019 08:45:55 GMT):
We merged the 0.8.0 version but we can see this file is still on the 0.7.0 version: https://github.com/hyperledger/fabric-sdk-py/blob/master/hfc/version.py

GuillaumeCisco (Wed, 17 Apr 2019 12:36:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wMzeKFdxSKHxmr6Qq) @bretharrison You're telling me `The filtered blocks will only provide the chaincode event names that have matched the registered chaincode name`. I do not understand this part. We can choose to parse the event.block or the event.filtered_block. And then we can test on event name. But it does not look like filtered_block have the event_name key. So it looks like we HAVE to use full_block when working with `registerChaincodeEvent`. Am I right?

GuillaumeCisco (Wed, 17 Apr 2019 12:36:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wMzeKFdxSKHxmr6Qq) @bretharrison You're telling me `The filtered blocks will only provide the chaincode event names that have matched the registered chaincode name`. I do not understand this part. We can choose to parse the event.block or the event.filtered_block. And then we can test on event name. But it does not look like filtered_block has the event_name key. So it looks like we HAVE to use full_block when working with `registerChaincodeEvent`. Am I right?

valentin994 (Wed, 17 Apr 2019 13:16:03 GMT):
Has joined the channel.

GuillaumeCisco (Wed, 17 Apr 2019 17:38:32 GMT):
Does fabric-sdk-node use FilteredBlock proto? It looks like no :/ https://github.com/hyperledger/fabric-sdk-node/search?q=FilteredBlock%28&unscoped_q=FilteredBlock%28

GuillaumeCisco (Wed, 17 Apr 2019 18:26:57 GMT):
I can only a json parsing: https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/lib/ChannelEventHub.js#L507

GuillaumeCisco (Wed, 17 Apr 2019 18:26:57 GMT):
I can only see a json parsing: https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/lib/ChannelEventHub.js#L507

SaphiraBjartskular (Wed, 17 Apr 2019 19:00:09 GMT):
It would be super great if the fabric admins could add some documentation around the QueryStateIterator object here: https://fabric-shim.github.io/release-1.4/fabric-shim.StateQueryIterator.html dealing with this object has been a nightmare and there is no documentation on how to use it

SamYuan1990 (Thu, 18 Apr 2019 03:10:46 GMT):
Has joined the channel.

mrudav.shukla (Thu, 18 Apr 2019 04:48:16 GMT):
Has anyone been able to pass custom CSR to EnrolmentRequest successfully? Facing issues with the same.

florianc (Thu, 18 Apr 2019 09:37:41 GMT):
Hi. I am trying to use regex for the registerChaincodeEvent function. I don't really like regex, but mine is simple. I passe "/mystring/i" as a parameter but it does not find anything (even though testing on websites says it works). Do you guys have any example of regex to match a string without case sensitivity?

florianc (Thu, 18 Apr 2019 09:37:41 GMT):
Hi. I am trying to use regex for the registerChaincodeEvent function. I don't really like regex, but mine is simple. I pass "/mystring/i" as a parameter but it does not find anything (even though testing on websites says it works). Do you guys have any example of regex to match a string without case sensitivity?

florianc (Thu, 18 Apr 2019 09:45:21 GMT):
I've got this working "createBadge|updateBadge|badgeActivity", but I believe there's a better way. If someone has an idea, I take it ;)

mrudav.shukla (Thu, 18 Apr 2019 10:09:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wrwpRRHdTmwHkkGqB) Solved: https://stackoverflow.com/questions/55687562/setting-pem-attributes-for-user-identities-in-hyperledger-fabric/55743781#55743781

mrudav.shukla (Thu, 18 Apr 2019 10:09:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RNobFxivjrdmaZSbq) Solved: https://stackoverflow.com/questions/55687562/setting-pem-attributes-for-user-identities-in-hyperledger-fabric/55743781#55743781

alokkv (Thu, 18 Apr 2019 12:57:11 GMT):
hi friend, i am trying fabric node SDK for the first time.i have successfully ran balance transfer without any error.i was able to make all the calls from POSTMAN.but my network is kafka based and i have three orderer. i have change the network-config.yaml file accordingly but when i try to register any user i am getting the following error. "Failed to get registered user: tom with error: Error: Invalid common connection profile due to missing configuration data"

alokkv (Thu, 18 Apr 2019 12:57:11 GMT):
hi friend, i am trying fabric node SDK for the first time.i have successfully ran balance transfer without any error.i was able to make all the calls from POSTMAN.but my network is kafka based and i have three orderer. i have change the network-config.yaml file accordingly but when i try to register any user i am getting the following error. "Failed to get registered user: tom with error: Error: Invalid common connection profile due to missing configuration data" i cant find a solution.i find out that an exception is happening while running the following line from helper.js file "client.loadFromConfig(hfc.getConfigSetting(userorg+config))" can anyone please help

alokkv (Thu, 18 Apr 2019 12:57:11 GMT):
hi friends, i am trying fabric node SDK for the first time.i have successfully ran balance transfer without any error.i was able to make all the calls from POSTMAN.but my network is kafka based and i have three orderer. i have change the network-config.yaml file accordingly but when i try to register any user i am getting the following error. "Failed to get registered user: tom with error: Error: Invalid common connection profile due to missing configuration data" i cant find a solution.i find out that an exception is happening while running the following line from helper.js file "client.loadFromConfig(hfc.getConfigSetting(userorg+config))" can anyone please help

alokkv (Thu, 18 Apr 2019 12:57:11 GMT):
hi friends, i am trying fabric node SDK for the first time.i have successfully ran balance transfer without any error.i was able to make all the calls from POSTMAN.but my network is kafka based and i have three orderer. i have change the network-config.yaml file accordingly but when i try to register any user i am getting the following error. "Failed to get registered user: tom with error: Error: Invalid common connection profile due to missing configuration data" i cant find a solution.i find out that an exception is happening while running the following line from helper.js file "client.loadFromConfig(hfc.getConfigSetting(userorg+config))" can anyone please help i am attaching my network-config.yaml file below --- name: "network-config" x-type: "hlfv1" description: "balance transfer" version: "1.0" channels: mychannel: orderers: &ref_0 - orderer0.org1.example.com - orderer1.org1.example.com - orderer2.org1.example.com peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer1.org1.example.com: endorsingPeer: false chaincodeQuery: true ledgerQuery: true eventSource: false chaincodes: [] organizations: org1: mspid: org1MSP peers: - peer0.org1.example.com - peer1.org1.example.com certificateAuthorities: - ca.org1.example.com adminPrivateKey: path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/f2eacac237dca31680a8bf24079c8efac903556c89362ab63d83e753ed704c39_sk signedCert: path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem orderers: orderer0.org1.example.com: url: grpcs://localhost:7050 grpcOptions: ssl-target-name-override: orderer0.org1.example.com tlsCACerts: path: artifacts/channel/crypto-config/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/tls/ca.crt orderer1.org1.example.com: url: grpcs://localhost:8050 grpcOptions: ssl-target-name-override: orderer1.org1.example.com tlsCACerts: path: artifacts/channel/crypto-config/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/ca.crt orderer2.org1.example.com: url: grpcs://localhost:9050 grpcOptions: ssl-target-name-override: orderer2.org1.example.com tlsCACerts: path: artifacts/channel/crypto-config/ordererOrganizations/org1.example.com/orderers/orderer2.org1.example.com/tls/ca.crt peers: peer0.org1.example.com: url: grpcs://localhost:7051 # eventUrl: grpcs://localhost:7053 grpcOptions: ssl-target-name-override: peer0.org1.example.com tlsCACerts: path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt peer1.org1.example.com: url: grpcs://localhost:7061 # eventUrl: 'grpc://localhost:7063' grpcOptions: ssl-target-name-override: peer1.org1.example.com tlsCACerts: path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt certificateAuthorities: ca.org1.example.com: url: https://localhost:7054 httpOptions: verify: false tlsCACerts: path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem registrar: - enrollId: admin enrollSecret: adminpw caName: ca.org1.example.com

Bobbijn (Thu, 18 Apr 2019 14:21:51 GMT):
Has joined the channel.

Antimttr (Thu, 18 Apr 2019 14:58:54 GMT):
@davidkhala @dave.enyeart Hey everyone. Just wanted to give you a heads up on a new design for implementation of the Idemix feature for the Nodejs sdk. The design relates to this bug on jira: https://jira.hyperledger.org/browse/FABN-689 The design can be found in google doc form here: https://docs.google.com/document/d/12iJUJ0GsSDCoMKnMalbvchFHJveWj5LxOTGrIYlk04g/edit?usp=sharing and in Wiki form here: https://wiki.hyperledger.org/x/twCL We are open to any comments and ideas for the new design. I am also avaliable throughout the day to discuss the design and implementation of the feature right here on rocketchat. Thanks and have a great day.

medikent (Thu, 18 Apr 2019 16:09:04 GMT):
Has joined the channel.

davidkhala (Fri, 19 Apr 2019 01:49:41 GMT):
@Antimttr Nice to see you here! In my memory, since it will not conflict with other parts, I think both 2.0 and 1.4 should be our push target. 1.3 is not nessesary as it is not LTS

xuchenhao001 (Fri, 19 Apr 2019 02:20:18 GMT):
Has joined the channel.

xuchenhao001 (Fri, 19 Apr 2019 02:26:47 GMT):
Hi, When I tried new lifecycle of chaincode (v2.0.0-alpha), I got an error while instantiate chaincode: `chaincode definition for 'examplecc' exists, but chaincode is not installed` from sdk. And errors from peer: `[ccprovider] ExtractStatedbArtifactsForChaincode -> INFO 099 Error while loading installation package for ccname=examplecc, ccversion=v1.0. Err=open /var/hyperledger/production/chaincodes/examplecc.v1.0: no such file or directory`. After login to the peer container, I found a file `/var/hyperledger/production/chaincodes/examplecc:v1.0:7d9d39f879b466ecfdf9e947ad410c77363dafd67b1a93ad18b3885be28ce3ef.bin`. How could this happened? What's the correct parameter in for `chaincodeId` under Step 6: Initialize? Refer here: https://fabric-sdk-node.github.io/master/tutorial-chaincode-lifecycle.html

xuchenhao001 (Fri, 19 Apr 2019 02:26:47 GMT):
Hi, When I tried new lifecycle of chaincode (v2.0.0-alpha), I got an error while instantiating my chaincode: `chaincode definition for 'examplecc' exists, but chaincode is not installed` from sdk. And errors from peer: `[ccprovider] ExtractStatedbArtifactsForChaincode -> INFO 099 Error while loading installation package for ccname=examplecc, ccversion=v1.0. Err=open /var/hyperledger/production/chaincodes/examplecc.v1.0: no such file or directory`. After login to the peer container, I found a file `/var/hyperledger/production/chaincodes/examplecc:v1.0:7d9d39f879b466ecfdf9e947ad410c77363dafd67b1a93ad18b3885be28ce3ef.bin`. How could this happened? What's the correct parameter in for `chaincodeId` under `Step 6: Initialize`? Refer here: https://fabric-sdk-node.github.io/master/tutorial-chaincode-lifecycle.html

xuchenhao001 (Fri, 19 Apr 2019 02:26:47 GMT):
Hi, When I tried new lifecycle of chaincode (v2.0.0-alpha), I got an error while instantiating my chaincode: ``` chaincode definition for 'examplecc' exists, but chaincode is not installed ``` from sdk. And errors from peer: ```[ccprovider] ExtractStatedbArtifactsForChaincode -> INFO 099 Error while loading installation package for ccname=examplecc, ccversion=v1.0. Err=open /var/hyperledger/production/chaincodes/examplecc.v1.0: no such file or directory ``` After login to the peer container, I found a file `/var/hyperledger/production/chaincodes/examplecc:v1.0:7d9d39f879b466ecfdf9e947ad410c77363dafd67b1a93ad18b3885be28ce3ef.bin`. How could this happened? What's the correct parameter in for `chaincodeId` under `Step 6: Initialize`? Refer here: https://fabric-sdk-node.github.io/master/tutorial-chaincode-lifecycle.html

xuchenhao001 (Fri, 19 Apr 2019 02:26:47 GMT):
Hi, When I tried new lifecycle of chaincode (v2.0.0-alpha), I got an error while instantiating my chaincode: ``` chaincode definition for 'examplecc' exists, but chaincode is not installed ``` from sdk. And errors from peer: ```[ccprovider] ExtractStatedbArtifactsForChaincode -> INFO 099 Error while loading installation package for ccname=examplecc, ccversion=v1.0. Err=open /var/hyperledger/production/chaincodes/examplecc.v1.0: no such file or directory ``` After login to the peer container, I found a file `/var/hyperledger/production/chaincodes/examplecc:v1.0:7d9d39f879b466ecfdf9e947ad410c77363dafd67b1a93ad18b3885be28ce3ef.bin`. How could this happened? What's the correct parameter in for `chaincodeId` under `Step 6: Initialize`? Refer here: https://fabric-sdk-node.github.io/master/tutorial-chaincode-lifecycle.html

xuchenhao001 (Fri, 19 Apr 2019 02:37:34 GMT):
How to reproduce my bug: When I install, approve, and commit chaincode, I set ``` chaincode = client.newChaincode('examplecc', 'v1.0'); ``` And I set chaincodeId as `examplecc`: ``` let request = { chaincodeId : 'examplecc', fcn: 'Init', args: args, txId: tx_id, is_init: true }; ```

alokkv (Fri, 19 Apr 2019 06:47:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=QE8Qvd9i9sAWqrjLc) Can anyone please help

Randyshu2018 (Fri, 19 Apr 2019 07:10:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=606e0da1-f09f-492b-b2b7-a610d8f1ea9a) @alokkv If u wan't to register a user,U must support orgName & username,and what's your orgName?in my opinion U can check the connection file with config.js

GuillaumeCisco (Fri, 19 Apr 2019 07:51:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=dXkSvByXH8JvrdMkz) i succeeded getting the event name with a filtered block, it was inside a `block['filtered_transactions'][idx]['transaction_actions']`

florianc (Fri, 19 Apr 2019 08:24:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DptvELNdMfx85A2t2) @GuillaumeCisco I don't really understand what is the problem with it and why you have to do so many things. I just use registerCHaincodeEvent with `connect(true)` and all the event details are filtered back to me as parameters of my callback like: ``` event = eventHub.registerChaincodeEvent(chaincodeName, eventName, (event, blockNumber, txid, status) => { var eventPayload = { payload: event.payload.toString('utf8'), blockNumber: blockNumber, txid: txid, status: status }; ```

GuillaumeCisco (Fri, 19 Apr 2019 08:33:23 GMT):
`connect(true)` is for full block, not filtered one. And I'm not using fabric-sdk-node

GuillaumeCisco (Fri, 19 Apr 2019 08:35:31 GMT):
Nervermind, I succeeded creating the port in python. fabric-sdk-node will need to update its code with the FilteredBlock proto decoding

GuillaumeCisco (Fri, 19 Apr 2019 08:35:31 GMT):
Nervermind, I succeeded creating the port in python. By the way fabric-sdk-node will need to update its code with the FilteredBlock proto decoding

florianc (Fri, 19 Apr 2019 08:37:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WAiXPyyATHafTScTM) @GuillaumeCisco Oh! My bad. Did not see that. There is not channel for the python one?

GuillaumeCisco (Fri, 19 Apr 2019 09:33:56 GMT):
Yes there is one, but I needed to understand how it works first with sdk node

florianc (Fri, 19 Apr 2019 09:35:10 GMT):
:thumbsup:

mrudav.shukla (Fri, 19 Apr 2019 11:41:52 GMT):
Is it possible to register/enroll a client with multiple affiliations in fabric-ca?

Clayton Sims (Fri, 19 Apr 2019 14:24:07 GMT):
Has joined the channel.

Clayton Sims (Fri, 19 Apr 2019 15:31:47 GMT):
@Antimttr Welcome. The team will back in full force next week and we will take a look then.

Clayton Sims (Fri, 19 Apr 2019 15:31:47 GMT):
@Antimttr Welcome. The team will back in full force next week and we will take a look then. @elli-androulaki @bretharrison @dave.enyeart

alokkv (Sat, 20 Apr 2019 07:23:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=vJycssu9trzETb82Z) @Randyshu2018 Hi thank you for the replay. My org name is org1 and it is defined in the connection file. Do i need ti mension the org name in fabric-ca-server-config. Yaml file

dselman (Sun, 21 Apr 2019 06:56:03 GMT):
Does anyone know if `beforeTransaction` is called? I can't seem to get it to work (in a test). https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/transactionhandler.html

dselman (Sun, 21 Apr 2019 06:56:28 GMT):
``` async beforeTransaction(ctx) { let txnDetails = ctx.stub.getFunctionAndParameters(); console.info(`Calling function: ${txnDetails.fcn} `); console.info(util.format(`Function arguments : %j ${ctx.stub.getArgs()}`)); } ```

dselman (Sun, 21 Apr 2019 07:15:41 GMT):
Looks like it should be called here: https://github.com/hyperledger/fabric-chaincode-node/blob/release-1.4/fabric-shim/lib/contract-spi/chaincodefromcontract.js#L360

davidkel (Sun, 21 Apr 2019 07:18:29 GMT):
@dselman I can confirm it does get called. I use it in this particular example https://github.com/davidkel/bnaport/blob/a2ec5e40a717b14fe8b65ac41c121632ed34e878/trade-network/native/fabric-new-ts/contract/src/my-contract.ts#L51

dselman (Sun, 21 Apr 2019 07:20:29 GMT):
Thanks Dave. Does it get called when you run a unit test?

dselman (Sun, 21 Apr 2019 07:22:51 GMT):
(e.g like the test that is generated by the IBP VSCode add-on)

dselman (Sun, 21 Apr 2019 07:23:48 GMT):
...actually, I don't think it *could* be. The test is just calling the contract direct.

dselman (Sun, 21 Apr 2019 07:24:39 GMT):
There doesn't appear to be a test implementation of the after/before/unknown orchestration that is performed by the the `contract-spi`. Correct?

davidkel (Sun, 21 Apr 2019 07:26:18 GMT):
I haven't looked at the latest version of the VSCode add-on but would think they don't include test cases for these by default. Worth raising a github issue about it I think.

davidkel (Sun, 21 Apr 2019 07:26:18 GMT):
I haven't looked at the latest version of the VSCode add-on but would think they don't include test cases for these. Worth raising a github issue about it I think.

dselman (Sun, 21 Apr 2019 07:29:50 GMT):
yeah, this is a mess, because `beforeTransaction` has access to the stub, arguments etc -- that's not going to be easy to unit test outside the chaincode container.

sharmavikram (Mon, 22 Apr 2019 06:48:24 GMT):
Has joined the channel.

alokkv (Mon, 22 Apr 2019 12:15:48 GMT):
hi friends, one small question how to upgrade chaincode using fabric SDK.i can install and instantiate chaincode, but i cannot find how to upgrade it.can you please help

bretharrison (Mon, 22 Apr 2019 12:45:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DKi9nrLa9eBHpqu56) @xuchenhao001 Do you have a trace log `export HFC_LOGGING='{"debug":"console"}'`

bretharrison (Mon, 22 Apr 2019 13:07:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Q3gD7kJXsWdSHvidD) @alokkv use `sendUpgradeProposal` instead of `sendInstantiateProposal`

bretharrison (Mon, 22 Apr 2019 18:27:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cn3iWgnLcHG8LKZ7D) @xuchenhao001 You may wish to try using `mychaincode.setInitRequired(false);` and then manage the initialization of the state with a normal `invoke` call as your first call to the chaincode, which is the preferred chaincode lifecycle flow with V2.

bretharrison (Mon, 22 Apr 2019 18:27:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=cn3iWgnLcHG8LKZ7D) @xuchenhao001 You may wish to try using `mychaincode.setInitRequired(false);` and then manage the initialization of the state with a normal `invoke` call as your first call to the chaincode, which is the preferred chaincode lifecycle flow with V2. The first call to your chaincode either as `is_init=true` or an invoke will start the container.

hnampk (Tue, 23 Apr 2019 03:01:13 GMT):
Has joined the channel.

abheekmaitra (Tue, 23 Apr 2019 07:04:28 GMT):
When using v1.4 from the NodeJS SDK, while sending the transaction proposal during instantiation of chaincode, the following error is thrown [2019-04-23 11:31:12.483] [ERROR] instantiate-chaincode - instantiate proposal resulted in an error :: Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc: no Go files in /chaincode/input/src/github.com/example_cc " [2019-04-23 11:31:12.484] [ERROR] instantiate-chaincode - instantiate proposal resulted in an error :: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] [2019-04-23 11:31:12.485] [ERROR] instantiate-chaincode - Failed to instantiate the chaincode. cause:instantiate proposal resulted in an error :: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] This error only occurs for the golang chaincode ... the node and java chaincodes receive a response.status = 200 for this step

abheekmaitra (Tue, 23 Apr 2019 07:04:28 GMT):
When using v1.4 from the NodeJS SDK, while sending the transaction proposal during instantiation of chaincode, the following error is thrown [2019-04-23 11:31:12.483] [ERROR] instantiate-chaincode - instantiate proposal resulted in an error :: Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc: no Go files in /chaincode/input/src/github.com/example_cc " [2019-04-23 11:31:12.484] [ERROR] instantiate-chaincode - instantiate proposal resulted in an error :: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] [2019-04-23 11:31:12.485] [ERROR] instantiate-chaincode - Failed to instantiate the chaincode. cause:instantiate proposal resulted in an error :: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] This error only occurs for the golang chaincode ... the node and java chaincodes receive a response.status = 200 for this step The code executed : let results = await channel.sendInstantiateProposal(transctionProposalReq, 60000);

abheekmaitra (Tue, 23 Apr 2019 07:04:28 GMT):
When using v1.4 from the NodeJS SDK, while sending the transaction proposal during instantiation of chaincode, the following error is thrown [2019-04-23 11:31:12.483] [ERROR] instantiate-chaincode - instantiate proposal resulted in an error :: Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc: no Go files in /chaincode/input/src/github.com/example_cc " [2019-04-23 11:31:12.484] [ERROR] instantiate-chaincode - instantiate proposal resulted in an error :: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] [2019-04-23 11:31:12.485] [ERROR] instantiate-chaincode - Failed to instantiate the chaincode. cause:instantiate proposal resulted in an error :: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] This error only occurs for the golang chaincode ... the node and java chaincodes receive a response.status = 200 for this step The code executed : let results = await channel.sendInstantiateProposal(transctionProposalReq, 60000); Is there any additional setting required for the Golang chaincode instantiation, which is not needed for the NodeJs or Java chaincodes?

colasga (Tue, 23 Apr 2019 10:05:26 GMT):
Has joined the channel.

colasga (Tue, 23 Apr 2019 10:05:48 GMT):

Screenshot from 2019-04-23 12-04-02.png

colasga (Tue, 23 Apr 2019 10:13:24 GMT):

Screenshot from 2019-04-23 12-11-17.png

httran88 (Tue, 23 Apr 2019 15:31:30 GMT):
Hello, in the node sdk documentation, for Client.getChannel(name,error) it states that ```a new channel instance will be created and populated with Orderer objects and Peer objects as defined in the common connection profile. ``` I have inside a fcn that Client calls getChannel, after I am done with the channel i close the channel using Channel.close() When I make another request, I am getting an ```Error: The channel has been closed URL:grpc:```

httran88 (Tue, 23 Apr 2019 15:31:30 GMT):
Hello, in the node sdk documentation, for Client.getChannel(name,error) it states that ```a new channel instance will be created and populated with Orderer objects and Peer objects as defined in the common connection profile. ``` I have inside a fcn that Client calls getChannel, after I am done with the channel i close the channel using Channel.close() When I make another request, I am getting an ```Error: The channel has been closed URL:grpc:``` Is this the expected behavior? I expected a new channel instance being created but it seems to be referencing the same channel instance. Thank you for your input

httran88 (Tue, 23 Apr 2019 15:31:30 GMT):
Hello, in the node sdk documentation, for Client.getChannel(name,error) it states that ```a new channel instance will be created and populated with Orderer objects and Peer objects as defined in the common connection profile. ``` I have inside a fcn that Client calls getChannel, after I am done with the channel i close the channel using Channel.close() When I make another request, I am getting an ```Error: The channel has been closed URL:grpc:``` Is this the expected behavior? I expected a new channel instance being created but it seems to be referencing the same channel instance. Thank you for your input

httran88 (Tue, 23 Apr 2019 15:31:30 GMT):
Hello, in the node sdk documentation, for Client.getChannel(name,error) it states that `a new channel instance will be created and populated with Orderer objects and Peer objects as defined in the common connection profile. ` I have inside a fcn that Client calls getChannel, after I am done with the channel i close the channel using Channel.close() When I make another request, I am getting an `Error: The channel has been closed URL:grpc:` Is this the expected behavior? I expected a new channel instance being created but it seems to be referencing the same channel instance. Thank you for your input

SaphiraBjartskular (Tue, 23 Apr 2019 15:35:28 GMT):
Hi could someone help me understand stub.invokeChaincode()? I would like to query channel1 from channel2. When the chaincode on channel2 is invoked, it does succesfully call chaincode from channel1 however a shim.error is still returned... calling chaincode Invoke() returned error response [Err: Error: INVOKE_CHAINCODE failed: transaction ID: 665167f6a938d84060ca7e7678e1d36e7e638beee1a359e1ae315f00e315364c: Failed to get policy manager for channel [channel1]]. Sending ERROR message back to peer

bestbeforetoday (Tue, 23 Apr 2019 15:54:55 GMT):
@httran88 `getChannel()` does store and return the same channel instance every time. You probably want to reuse the same channel instance subsequently and not close it after each use

httran88 (Tue, 23 Apr 2019 16:08:55 GMT):
Ok, found my issue, my client was being persisted. The reason I am running across problems when reusing the same channel, which was my first impl to keep overhead low, is that my internet connection drops frequently and somehow my requests gets timedout sporadically but my internet connection would still work. Therefore I suspected that when my internet dropped and reconnect, the channel may not have known the event so when a new request is submitted, the timeout occurs due to no response from the server(peer). I am not entirely sure of the low level mechanics of grpc but i suspected that the connection descriptor for receiving may not be valid anymore after the disconnect/reconnection of my internet. Thoughts on this anyone? Thanks

httran88 (Tue, 23 Apr 2019 16:08:55 GMT):
Ok, found my issue, my client was being persisted, which was why the same channel instance was being returned(but getChannel() states that "a new channel instance will be created" which is incorrect i believe) The reason I am running across problems when reusing the same channel, which was my first impl to keep overhead low, is that my internet connection drops frequently and somehow my requests gets timedout sporadically but my internet connection would still work. Therefore I suspected that when my internet dropped and reconnect, the channel may not have known the event so when a new request is submitted, the timeout occurs due to no response from the server(peer). I am not entirely sure of the low level mechanics of grpc but i suspected that the connection descriptor for receiving may not be valid anymore after the disconnect/reconnection of my internet. Thoughts on this anyone? Thanks

httran88 (Tue, 23 Apr 2019 16:08:55 GMT):
Ok, found my issue, my client was being persisted, which was why the same channel instance was being returned(but getChannel() states that "a new channel instance will be created" which is incorrect i believe) Thanks for reply @bestbeforetoday .The reason I am running across problems when reusing the same channel, which was my first impl to keep overhead low, is that my internet connection drops frequently and somehow my requests gets timedout sporadically but my internet connection would still work. Therefore I suspected that when my internet dropped and reconnect, the channel may not have known the event so when a new request is submitted, the timeout occurs due to no response from the server(peer). I am not entirely sure of the low level mechanics of grpc but i suspected that the connection descriptor for receiving may not be valid anymore after the disconnect/reconnection of my internet. Thoughts on this anyone? Thanks

alokkv (Wed, 24 Apr 2019 04:50:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=zeuqJuPrMoS9XQE4M) @bretharrison thank you for the reply.if possible can you share an example

Mahesh-Raj (Wed, 24 Apr 2019 11:45:21 GMT):
Has joined the channel.

Mahesh-Raj (Wed, 24 Apr 2019 11:46:28 GMT):
Is there a way to get the on-chain history of an asset? Which methods of the chaincode were called and what changes they did to the asset?

bretharrison (Wed, 24 Apr 2019 13:46:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GqsWiwSvEdxNN4CoG) @httran88 The getChannel returns an existing channel, you may wish to not close the channel if you wish to continue to use it.

bretharrison (Wed, 24 Apr 2019 13:46:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GqsWiwSvEdxNN4CoG) @httran88 The getChannel returns an existing channel, you may wish to not close the channel if you wish to continue to use it. We will fix the doc https://jira.hyperledger.org/browse/FABN-1213

bretharrison (Wed, 24 Apr 2019 13:50:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HYL5ZNSye3yGX3Psz) @alokkv https://github.com/hyperledger/fabric-sdk-node/blob/43846dfd4e1a280c8111a2e45b599fa5f40340e2/test/integration/e2e/e2eUtils.js#L310

alokkv (Wed, 24 Apr 2019 15:10:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oCprgp2upPSydQrqc) @bretharrison thank you very much

aambati (Wed, 24 Apr 2019 16:02:02 GMT):
@bretharrison how are you? Quick question: we see this error , any suggestions how to debug this further: ``` debug: [Orderer.js]: sendBroadcast - sent message debug: [Orderer.js]: sendBroadcast - on data response: {"status":"SUCCESS","info":""} debug: [Orderer.js]: sendBroadcast - response status SUCCESS debug: [BasicCommitHandler]: _commit - Successfully sent transaction to the orderer orderer:7050 debug: [Orderer.js]: sendBroadcast - on end: Error: #object[TypeError TypeError: Cannot read property 'disconnect' of null] ```

SaphiraBjartskular (Wed, 24 Apr 2019 17:58:11 GMT):
Does each client need to know every organization on the network? That seems a bit... transparent

florianc (Thu, 25 Apr 2019 06:45:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RPG6Bc6RhSht8mHq5) @aambati Hi. I obviously am not bretharisson, but the error is quite explicit. There is a null object from with you call "disconnect". And as the parent object is null, disconnect can't exist.

florianc (Thu, 25 Apr 2019 06:46:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=8NDNcr6TCCnv7mcTp) @SaphiraBjartskular No. As long as you know one peer, you can send transaction and do stuff in the channels the peer belongs. And, IMO, transparency in blockchain is not a problem ;)

aambati (Thu, 25 Apr 2019 17:47:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6mGGKE9tZhwT6Lqkx) @florianc i know that much...that some object is null and disconnect is called on the null object...this error is cryptic, not sure how to fix

aambati (Thu, 25 Apr 2019 17:50:07 GMT):
any body seen this error when sending transactions to a 2.0 network 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:50:07 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: ```

vieiramanoel (Thu, 25 Apr 2019 22:49:23 GMT):
hey, guys, something weird is happening here

vieiramanoel (Thu, 25 Apr 2019 22:57:00 GMT):
How can I set `Client.signChannelConfig()` to use admin identity from config file?

vieiramanoel (Thu, 25 Apr 2019 23:52:51 GMT):
What could cause ```2019-04-25T23:46:36.524Z - error: [Remote.js]: Error: The channel has been closed URL:grpcs://100.25.3.92:7050 2019-04-25T23:46:36.526Z - error: [Orderer.js]: Orderer grpcs://100.25.3.92:7050 has an error Error: The channel has been closed URL:grpcs://100.25.3.92:7050 (node:1) UnhandledPromiseRejectionWarning: Error: The channel has been closed URL:grpcs://100.25.3.92:7050 at Immediate.checkState [as _onImmediate] (/rest-server/node_modules/fabric-client/node_modules/grpc/src/client.js:851:18) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ``` in channelcreate request??

vieiramanoel (Thu, 25 Apr 2019 23:53:15 GMT):
this was working till some days before and now it seems like an error inside fabric-client

vieiramanoel (Thu, 25 Apr 2019 23:53:15 GMT):
this was working till some days ago and now it seems like an error inside fabric-client

Fias (Fri, 26 Apr 2019 06:55:22 GMT):
Has joined the channel.

devesh2709 (Fri, 26 Apr 2019 08:51:49 GMT):
Has joined the channel.

vieiramanoel (Fri, 26 Apr 2019 15:57:00 GMT):
Anyone?

HLFPOC (Sat, 27 Apr 2019 11:09:40 GMT):
Hello Team, Has anyone been able to create network by generating all the crypto material using fabric-ca (instead of cryptogen) and connect it with fabric-node-sdk to perform read/write operations ? I am struggling to get this done from past few days but facing some issues. It would be great if someone can guide me on this. Thanks !

bretharrison (Mon, 29 Apr 2019 04:10:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RPG6Bc6RhSht8mHq5) @aambati Maybe a trace will help `export HFC_LOGGING='{"debug":"console"}'`

bretharrison (Mon, 29 Apr 2019 04:15:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=yCTEFa5bmNKxPNfSJ3) @vieiramanoel A trace may help `export HFC_LOGGING='{"debug":"console"}'`

lorenzofang (Mon, 29 Apr 2019 05:49:34 GMT):
Has joined the channel.

lorenzofang (Mon, 29 Apr 2019 06:16:14 GMT):
Hello,I have a doubt.When I use the fabric-sdk-node develop client,The client needs to know the certificate information and user private key of all nodes.This information will be leaked, like balance-transfer project,I want to know how these configuration information is handled under the production environment.

lorenzofang (Mon, 29 Apr 2019 06:17:14 GMT):
`"certificateAuthorities": { "ca1.example.com": { "url": "http://localhost:7054", "caName": "ca1.example.com", "httpOptions": { "verify": false }, "tlsCACerts": { "path": "app/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" } }, "ca2.example.com": { "url": "http://localhost:8054", "caName": "ca2.example.com", "httpOptions": { "verify": false }, "tlsCACerts": { "path": "app/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem" } } }`

Aniket.1 (Mon, 29 Apr 2019 06:36:26 GMT):
This an be great, if anyone here can provide some precious views on this : https://stackoverflow.com/questions/55898105/approach-to-pass-key-for-crypto-operations-on-chaincode-interaction

Aniket.1 (Mon, 29 Apr 2019 06:37:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6HkuWCscvgZjit3Mp) @HLFPOC what are the issues? @HLFPOC

knagware9 (Mon, 29 Apr 2019 07:01:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FdtZHYL4Zm87a86Er) @Aniket.1 yes , I have tried it , check this artcile https://www.cnblogs.com/llongst/p/9786024.html

Aniket.1 (Mon, 29 Apr 2019 07:07:54 GMT):
@knagware9 I didn't get anything related to encyption in that link. Can you please direct me?

Aniket.1 (Mon, 29 Apr 2019 07:07:54 GMT):
@knagware9 I didn't get anything related to encryption in that link. Can you please direct me?

knagware9 (Mon, 29 Apr 2019 07:09:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=3uj3bquHo6Jinio5D) @Aniket.1 its in Chinese language, please translate page to in english

Aniket.1 (Mon, 29 Apr 2019 07:10:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DLzNiZXDTFjwBEqhq) @knagware9 Yes i did and i see it is more about CA actions. In my question, I am looking to know about the approach for encrypting data in chaincode?

Aniket.1 (Mon, 29 Apr 2019 07:10:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=DLzNiZXDTFjwBEqhq) @knagware9 Yes i did and i see it is more about CA actions. In my question, I am looking to know about the approach for encrypting data in chaincode

knagware9 (Mon, 29 Apr 2019 07:13:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ff2SXm2YjeTs3GocH) @Aniket.1 sorry That response to @HLFPOC , he asked about ca to generate certificate and use setting up fabric network

Aniket.1 (Mon, 29 Apr 2019 07:14:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=fwpfBbMfXstNcHJoe) @knagware9 ohkay. Can you provide your views to my question : https://stackoverflow.com/questions/55898105/approach-to-pass-key-for-crypto-operations-on-chaincode-interaction

knagware9 (Mon, 29 Apr 2019 07:17:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=nsidjN9YX769qFemb) @Aniket.1 Second approach looks good , you can use attribute based access control lib in chaincode to achieve this

Switch2Logic (Mon, 29 Apr 2019 12:41:18 GMT):
I am trying to revoke a user certificate and I am getting the following error...

Switch2Logic (Mon, 29 Apr 2019 12:41:18 GMT):
I am trying to revoke a user certificate and I am getting the following error... Any Ideas?

Switch2Logic (Mon, 29 Apr 2019 12:41:47 GMT):

Screenshot from 2019-04-29 14-39-24.png

ahmadraza (Mon, 29 Apr 2019 12:51:25 GMT):
TypeError: Cannot read property 'curve' of undefined Any soloutions ?

bretharrison (Mon, 29 Apr 2019 14:10:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=p9DihofGBBrBbgJBs) @lorenzofang fabric-sdk-node does need to know the private keys. Only signing of outbound request requires access to a private key of the user and that access may be indirect when using a Hardware Security Module (HSM) or not at all when the user signs the request outside of the fabric-sdk-node. The private keys of nodes is never needed.

bretharrison (Mon, 29 Apr 2019 14:10:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=p9DihofGBBrBbgJBs) @lorenzofang fabric-sdk-node does need to know the private keys. Only signing of outbound request requires access to a private key of the user and that access may be indirect when using a Hardware Security Module (HSM) or not at all when the user signs the request outside of the fabric-sdk-node. The private keys of nodes are never needed.

Antimttr (Mon, 29 Apr 2019 14:36:46 GMT):
@bretharrison Goodmorning, Xiaoning has updated the design doc to address your concerns in reguards to the Idemix for nodejs sdk implementation. Were these updates satisfactory? thanks for your input

bretharrison (Mon, 29 Apr 2019 21:29:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=oMg9J6hobc24j7ciA) @Antimttr Yes thanks, there is a fabric maintainers call this Wednesday at 9:00 AM EDT that you may wish to attend, check the #fabric-maintainers channel Usually the call is on https://zoom.us/my/hyperledger.community.3 Which release are planning to integrate this change into ?

Antimttr (Mon, 29 Apr 2019 21:36:33 GMT):
Well I was thinking one of the future 1.4.x releases would be fine, in conversation with david khala he mentioned we should target 1.4 and 2.0

Antimttr (Mon, 29 Apr 2019 21:36:53 GMT):
I will try and get on that call on wednesday as well, thanks

vieiramanoel (Tue, 30 Apr 2019 00:23:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WDKbLC9RRtEBnXgNA) @bretharrison it doesn't say that much :( ```2019-04-30T00:21:19.914Z - debug: [Client.js]: _createOrUpdateChannel - about to send envelope 2019-04-30T00:21:19.915Z - debug: [Orderer.js]: sendBroadcast - start 2019-04-30T00:21:19.917Z - debug: [Remote.js]: getUrl::grpcs://100.25.3.92:7050 2019-04-30T00:21:19.917Z - error: [Remote.js]: Error: The channel has been closed URL:grpcs://100.25.3.92:7050 2019-04-30T00:21:19.917Z - error: [Remote.js]: Error: The channel has been closed URL:grpcs://100.25.3.92:7050 2019-04-30T00:21:19.917Z - debug: [Remote.js]: getUrl::grpcs://100.25.3.92:7050 2019-04-30T00:21:19.917Z - error: [Orderer.js]: Orderer grpcs://100.25.3.92:7050 has an error Error: The channel has been closed URL:grpcs://100.25.3.92:7050 2019-04-30T00:21:19.918Z - error: [Orderer.js]: Orderer grpcs://100.25.3.92:7050 has an error Error: The channel has been closed URL:grpcs://100.25.3.92:7050 { Error: The channel has been closed URL:grpcs://100.25.3.92:7050 at Immediate.checkState [as _onImmediate] (/rest-server/node_modules/grpc/src/client.js:851:18) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) connectFailed: true } GET /api/v1/network/channel/create?channelName=mainchannel 500 63.876 ms - 46 ```

vieiramanoel (Tue, 30 Apr 2019 00:24:25 GMT):
channel creation through cli using same artifacts works

vieiramanoel (Tue, 30 Apr 2019 00:56:05 GMT):
My question is: what does it mean to have a channel closed? What would cause this? My orderer is on debug mode and don't say much too

lorenzofang (Tue, 30 Apr 2019 01:16:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mQ8ucjyabLSv3SkNZ) @bretharrison Yes, I later found that node-sdk does not require the private key of the node, just requires a tls certificate.

lorenzofang (Tue, 30 Apr 2019 01:19:00 GMT):
Is someone using docker-composer while developing?

Antimttr (Tue, 30 Apr 2019 02:46:44 GMT):
_hasn't switched over to kubernetes yet_

florianc (Tue, 30 Apr 2019 07:36:15 GMT):
Hello. I am trying to use the function contract.addContractListener() (https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Contract.html#addContractListener__anchor). However, it tells me that it is not a function. I checked this (https://fabric-sdk-node.github.io/release-1.4/tutorial-listening-to-events.html) and this (https://jira.hyperledger.org/browse/FABN-1206). It seems like I have the same code, but still have the error. Here is what I do: ``` await gateway.connect(parsedProfile, options); node.log('connected to gateway'); const network = await gateway.getNetwork(channelName); node.log('got network'); const contract = await network.getContract(contractName); node.log('got contract'); return { contract: contract, network: network }; ``` later in the code: ``` async function testEvent(contract, contractName, eventName) { contract.addContractListener(contractName, eventName, (error, event, blockNumber, txId) => { if (error) { console.log(error); } else { console.log(event); console.log(blockNumber); console.log(txId); } }); } ``` Can someone point out what I am doing wrong?

andrew-coleman (Tue, 30 Apr 2019 08:21:09 GMT):
@florianc are you using the latest 1.4.1 version of `fabric-network`?

florianc (Tue, 30 Apr 2019 08:22:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=WHscc58BhFkemdqPC) @andrew-coleman :face_palm_tone2:

lorenzofang (Tue, 30 Apr 2019 08:23:20 GMT):
@florianc what is error?

florianc (Tue, 30 Apr 2019 08:23:44 GMT):
I tell me every day: "Florian, look for easy and obvious stuff first". I forgot to check if package.json was up to date ><

florianc (Tue, 30 Apr 2019 08:32:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=qQykSwFBEH3Mdkgqs) @lorenzofang addContractListener is not a function. But I was using 1.4.0 and not 1.4.1 as andrew asked. But I've made some changes since and everything is broken :(. I'll be back later if needed

Aniket.1 (Tue, 30 Apr 2019 12:04:31 GMT):
https://fabric-sdk-node.github.io/release-1.4/tutorial-sign-transaction-offline.html ------ I have gone through this tutorial. Just want to know that if we are performing a query operation this way, so we will not need to commit the transaction as in proposal payload we will get the query response.

florianc (Tue, 30 Apr 2019 12:35:28 GMT):
For contract.addContractListener, what should the registrationOptions look like? I specified a startBlock but my listener keeps starting on last block. ``` { startBlock: 0, filtered: false } ```

florianc (Tue, 30 Apr 2019 12:36:01 GMT):
(and the documentation does not give any example, or at least I did not find it.)

florianc (Tue, 30 Apr 2019 12:49:38 GMT):
Moreover, when I use fabric-network 1.4, submitting transaction works well. when switching to 1.4.1, I have the following error: ``` Error: No endorsement plan available for {"chaincodes":[{"name":"CCNAME"}]}" ```

bretharrison (Tue, 30 Apr 2019 12:54:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=LWZQjJ5IbujtrAzy5y) @vieiramanoel The channel message is coming from GRPC, you may wish to https://github.com/grpc/grpc/blob/master/TROUBLESHOOTING.md

bretharrison (Tue, 30 Apr 2019 12:58:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=udyAhtwpBqYGHiYrr) @Aniket.1 Right, queries do not need to be committed, the query will provide the current state

vieiramanoel (Tue, 30 Apr 2019 14:10:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=mjv4ANYAkNCxg8JJ9) @bretharrison Thanks a lot

mauricio (Tue, 30 Apr 2019 21:01:19 GMT):
Hi, how can I import an identity? I was doing something like that, but now it's not working with Typescript. In the SDK docs shows that I need to pass type, mspId, certificate, privateKey but in the `wallet.import` interface show that import receives an Identity as a second parameters and I don't know what pass here Before with Javascript (fabric network 1.4) ```js await wallet.import(identity, { type: 'X509', mspId: 'BancolombiaMSP', certificate: networkAdminCert.toString(), privateKey: networkAdminPrivateKey.toString() }) ``` After (fabric network 1.4.1 with Typescript) ```await wallet.import(identity, type ????????)```

mauricio (Tue, 30 Apr 2019 21:01:19 GMT):
Hi, how can I import an identity? I was doing something like that, but now it's not working with Typescript. In the SDK docs shows that I need to pass type, mspId, certificate, privateKey but in the `wallet.import` interface show that import receives an Identity as a second parameters and I don't know what pass here ### Before with Javascript (fabric network 1.4) ```js await wallet.import(identity, { type: 'X509', mspId: 'BancolombiaMSP', certificate: networkAdminCert.toString(), privateKey: networkAdminPrivateKey.toString() }) ``` ### After (fabric network 1.4.1 with Typescript) await wallet.import(identity, type ????????)

mauricio (Tue, 30 Apr 2019 21:01:19 GMT):
Hi, how can I import an identity? I was doing something like that, but now it's not working with Typescript. In the SDK docs shows that I need to pass type, mspId, certificate, privateKey but in the `wallet.import` interface show that import receives an Identity as a second parameters and I don't know what pass here Before with Javascript (fabric network 1.4) ```js await wallet.import(identity, { type: 'X509', mspId: 'BancolombiaMSP', certificate: networkAdminCert.toString(), privateKey: networkAdminPrivateKey.toString() }) ``` After (fabric network 1.4.1 with Typescript) await wallet.import(identity, type ????????)

mauricio (Tue, 30 Apr 2019 21:12:44 GMT):
What means this `type` ? ``` export interface Identity { type: string; } ```

davidkel (Tue, 30 Apr 2019 21:28:03 GMT):
@mauricio The way you should import a X509 identity is ``` await wallet.import(idLabel, X509WalletMixin.createIdentity('BancolombiaMSP', networkAdminCert.toString(), networkAdminPrivateKey.toString())) ``` to import a X509 identity that is HSM managed you would use ``` await wallet.import(idLabel, HSMWalletMixin.createIdentity('BancolombiaMSP', networkAdminCert.toString())) ``` You should not use or declare the type field directly, it is for the use of the wallet mixins to declare how these identities are represented

mauricio (Tue, 30 Apr 2019 21:28:33 GMT):
Thanks a lot @davidkel I'll try

mauricio (Tue, 30 Apr 2019 21:35:39 GMT):
Thanks @davidkel it worked! :)

vieiramanoel (Tue, 30 Apr 2019 22:40:31 GMT):
@bretharrison the problem was very strict to my env. After hours debugging grpc and everything working locally the problem was a wrong port binding in sdk container

vieiramanoel (Tue, 30 Apr 2019 22:41:05 GMT):
As this is very very very strict to my application, no need to report anywhere. (I'm using docker sdk as well etc)

vieiramanoel (Tue, 30 Apr 2019 22:41:21 GMT):
thanks for your help, those env vars really helped

RodrigoAcosta (Wed, 01 May 2019 02:45:56 GMT):
Has joined the channel.

HLFPOC (Wed, 01 May 2019 10:22:23 GMT):
Hi Team, I am getting below error while enrolling a user from fabric-ca using fabric-node sdk Error : Enrollment failed with errors [[{"code":19,"message":"CA 'ica-org1' does not exist"}]] I have created intermediate CA for my org (ica-org1) and it is running as a container application. Any idea about this issue ?

Antimttr (Wed, 01 May 2019 13:14:49 GMT):
@bretharrison thanks for the introduction. Let me know if there's a crypto group call I could participate in in the future

Antimttr (Wed, 01 May 2019 13:14:58 GMT):
I havent seen any invites for one yet

bretharrison (Wed, 01 May 2019 14:08:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=sQps4LSsHbRY8C4Cb) @Antimttr will do

Fernando_Diaz_Luque (Wed, 01 May 2019 14:34:31 GMT):
Has joined the channel.

HyperFabrics (Wed, 01 May 2019 17:57:37 GMT):
Has joined the channel.

Pradeep_Pentakota (Thu, 02 May 2019 04:22:25 GMT):
Hi can you send the line of code which you are using to enroll user? @HLFPOC [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=HjiSuxy4LNTrf4BHj)

HLFPOC (Thu, 02 May 2019 05:21:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rtPTiSlJd6uNVhyjMz) @Pradeep_Pentakota Hello , I am following the "balance-transfer" app from fabric-samples for generating the users.

Shyam_Pratap_Singh (Thu, 02 May 2019 06:38:17 GMT):
Hi Team, I just want to know that is there any specific technical reason to choose node fabric node sdk or java node sdk in production to build fabric application.

mahoney1 (Thu, 02 May 2019 11:34:24 GMT):
eminder 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

mahoney1 (Thu, 02 May 2019 11:34:24 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

SaphiraBjartskular (Thu, 02 May 2019 16:48:00 GMT):
At what point does the size of the composite key become an issue

sstone1 (Thu, 02 May 2019 16:50:12 GMT):
@davidkhala is this something you can look at? https://jira.hyperledger.org/browse/FABN-1223

sstone1 (Thu, 02 May 2019 16:50:35 GMT):
we might need to add TypeScript type defs for fabric-common for BaseClient

florianc (Thu, 02 May 2019 18:42:20 GMT):
Hi. I would like to know why there are several features that are similar between fabric-network and fabric-client and which one (both?) will be in the future considered as the one to use.

davidkhala (Fri, 03 May 2019 03:38:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=ZcKLZKwJKZFmytG4q) @sstone1 Sure, it was in my mind, and thanks for reminds.

sstone1 (Fri, 03 May 2019 06:12:03 GMT):
thanks @davidkhala !

sstone1 (Fri, 03 May 2019 06:16:24 GMT):
@florianc fabric-network is a lot simpler & easier to use, and is the one we recommend that you use for new applications. it allows you to submit/evaluate transactions and listen for events. fabric-network builds on top of the fabric-client package and hides a lot of the low-level complexity. however, you may still need to use fabric-client if you need to perform actions against a CA (enroll/register), or operational actions (create channel/install/instantiate/etc). over time more functionality will be moved into the high-level API.

florianc (Fri, 03 May 2019 06:17:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=wcyAG8DoKnaGZHitt) @sstone1 Thank you.

HLFPOC (Fri, 03 May 2019 09:04:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rtPTiSlJd6uNVhyjMz) @Pradeep_Pentakota let caClient = client.getCertificateAuthority(); let secret = await caClient.register({ enrollmentID: username, affiliation: userOrg.toLowerCase() + '.department1' }, adminUserObj);

HLFPOC (Fri, 03 May 2019 09:04:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rtPTiSlJd6uNVhyjMz) @Pradeep_Pentakota let caClient = client.getCertificateAuthority(); let secret = await caClient.register({ enrollmentID: username, affiliation: userOrg.toLowerCase() + '.department1' }, adminUserObj); user = await client.setUserContext({username:username, password:secret});

RahulHundet (Fri, 03 May 2019 10:12:45 GMT):
Has joined the channel.

colasga (Fri, 03 May 2019 14:12:02 GMT):
Hi, for some reasons some of the peers in "peer status" are shown as "down" although their container is running, anyone seen this problem before ? My config.json has all 3 orgs as clients at the start of the file

nasht00 (Sun, 05 May 2019 08:37:05 GMT):
Hi, When writing chaincode, "npm test" runs eslint. My question is, is eslint a requirement, meaning fabric will run it as well? Or is it just included in samples as a good practice?

ahmad-raza (Mon, 06 May 2019 06:09:52 GMT):
Has joined the channel.

awattez (Mon, 06 May 2019 20:14:40 GMT):
hi all, when i try to use `@Property` with an array of my object, i can't instantiate chaincode. ``` ```

awattez (Mon, 06 May 2019 20:14:40 GMT):
hi all, I have a Typescript chaincode `fabric-shim` and `fabric-contract-api` 1.4.1 when i try to use `@Property` with an array of my object, i can't instantiate chaincode. ``` @Property('objs', 'Array') public objs: MyObject[]; ```

awattez (Mon, 06 May 2019 20:14:40 GMT):
hi all, I have a Typescript chaincode `fabric-shim` and `fabric-contract-api` 1.4.1 when i try to use `@Property` with an array of my object, i can't instantiate chaincode. ``` @Property('objs', 'Array') public objs: MyObject[]; ``` i have this following error on instantiate chaincode: ``` 2019-05-06 20:18:12.289 UTC [msp.identity] Sign -> DEBU 04d Sign: digest: 56EDD73D516352FF9C248807F6D74D737EE3676B27D8E6F5BDC1DA1D954D3D2B Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1 ``` I have my image of chaincode but not chaincode container running and i don't have any informations about this error

awattez (Mon, 06 May 2019 20:14:40 GMT):
hi all, I have a Typescript chaincode `fabric-shim` and `fabric-contract-api` 1.4.1 when i try to use `@Property` with an array of my object, i can't instantiate chaincode. ``` @Property('objs', 'Array') public objs: MyObject[]; ``` i have this following error on instantiate chaincode: ``` 2019-05-06 20:18:12.289 UTC [msp.identity] Sign -> DEBU 04d Sign: digest: 56EDD73D516352FF9C248807F6D74D737EE3676B27D8E6F5BDC1DA1D954D3D2B Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1 ``` I have my image of chaincode but not chaincode container running and i don't have any informations about this error Shoul i open an issue on Hyperledger's Jira ?

awattez (Mon, 06 May 2019 20:14:40 GMT):
hi all, I have a Typescript chaincode `fabric-shim` and `fabric-contract-api` 1.4.1 when i try to use `@Property` with an array of my object, i can't instantiate chaincode. ``` @Property('objs', 'Array') public objs: MyObject[]; ``` i have this following error on instantiate chaincode: ``` 2019-05-06 20:18:12.289 UTC [msp.identity] Sign -> DEBU 04d Sign: digest: 56EDD73D516352FF9C248807F6D74D737EE3676B27D8E6F5BDC1DA1D954D3D2B Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1 ``` I have my image of chaincode but no chaincode container running and i don't have any informations about this error Shoul i open an issue on Hyperledger's Jira ?

awattez (Mon, 06 May 2019 20:21:30 GMT):
Shoul i open an issue on Hyperledger's Jira ?

awattez (Mon, 06 May 2019 20:25:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=BumMF4nvxDpmmPohY) @nasht00 Hi, chaincode javascript will run even if you don't execute eslint, eslint is here to help you, to correct you. It's a good practice and it also helps you better understand your code.

nasht00 (Tue, 07 May 2019 08:37:36 GMT):
Thanks

nasht00 (Tue, 07 May 2019 08:39:27 GMT):
Hi, Is there a full example of subscribing to block events? In the documentation, I see snippets here and there, but it does not seem to work for me. I'm looking for an example from scratch, imagine a blank nodejs file, I just want to print the data in the console log for example. Currently neither the success nor error handlers get called.

nasht00 (Tue, 07 May 2019 08:41:01 GMT):
My code so far: ``` const FabricClient = require('fabric-client'); const path = require('path'); const ccpPath = path.resolve(__dirname, '..', '..', 'devops', 'basic-network-docker', 'connection.json'); let client = FabricClient.loadFromConfig(ccpPath); let channel = client.getChannel(); let eventHub = channel.newChannelEventHub("peer0.org1.example.com"); //TODO: Dynamically load the correct peer to sync? Try several peers? let block_reg = eventHub.registerBlockEvent((block) => { console.log('Successfully received the block event'); console.log(block); }, (error)=> { console.log('Failed to receive the block event ::'+error); }, {startBlock:0}); console.log(block_reg); ```

nasht00 (Tue, 07 May 2019 08:41:29 GMT):
All I see is `1` in the console, which is the value of `block_reg` I suppose

florianc (Tue, 07 May 2019 08:43:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RJgmDkNTBaPaSfZeB) @nasht00 you are missing at the end: `eventHub.connect()`

florianc (Tue, 07 May 2019 08:44:22 GMT):
(with true as a parameter if you don't want filtered information)

nasht00 (Tue, 07 May 2019 08:45:10 GMT):
aha, thanks let's try. By the way this is not shown in any of the code snippets here: https://fabric-sdk-node.github.io/tutorial-channel-events.html

nasht00 (Tue, 07 May 2019 08:46:51 GMT):
ok now I'm getting a failure to connect (that's better). `missing userContext or admin identity or missing signedEvent` At what stage in the code am I supposed to pass this?

nasht00 (Tue, 07 May 2019 08:48:50 GMT):
In my applicative code, I'm using the `gateway`. Which is why it's a little confusing as here it assumes we are using `client`.

bestbeforetoday (Tue, 07 May 2019 13:00:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=rpg3TLfTPv5LCorG4) @nasht00 If using release 1.4.1 then you might consider using the event listening capabilities added to the fabric-network API (i.e. the gateway and associated classes): https://fabric-sdk-node.github.io/release-1.4/tutorial-listening-to-events.html

Antimttr (Tue, 07 May 2019 19:05:52 GMT):

ChaincodeStub class

Antimttr (Tue, 07 May 2019 19:05:52 GMT):

ChaincodeStub class

Antimttr (Tue, 07 May 2019 19:06:30 GMT):
how, if the blockchain is immutable can you delete a state key from it?

Antimttr (Tue, 07 May 2019 19:06:47 GMT):
or is this talking about the private store?

biligunb (Wed, 08 May 2019 01:10:09 GMT):
Has joined the channel.

biligunb (Wed, 08 May 2019 01:10:10 GMT):
Hi guys I am having trouble with memory leak due to addCommitListener(transactionId, callback [, options] [, eventHub]) not being removed Is there any way to automatically stop the listener once it has recieved the payload?

biligunb (Wed, 08 May 2019 01:11:09 GMT):
blockchain is different (ledger IMMUTABLE) World State -> is different LIKE a database (can be deleted/updated)

c-an (Wed, 08 May 2019 01:25:00 GMT):
Has joined the channel.

davidkel (Wed, 08 May 2019 06:46:08 GMT):
Out of interest can you provide a use case as to why your application is specifically interested in a commit event given that a submitTransaction via the fabric-network is a submit/notify mechanism, ie it unblocks once the commit event has been received

nasht00 (Wed, 08 May 2019 07:12:11 GMT):
Is there more information about what it means to be "filtered"?

biligunb (Wed, 08 May 2019 07:18:01 GMT):
we are using fabric-shim -> invoke chaincode method.

nasht00 (Wed, 08 May 2019 07:19:19 GMT):
Also, in this new code (much better by the way thanks!) I don't see any reference of "startBlock", does it make any sense?

biligunb (Wed, 08 May 2019 07:19:32 GMT):
1. send Proposal -> response -> sendTX 2. after sending transaction to Ordering Service we are waiting for a Transaction to be committed (by transactionId) 3. set up a listener (addCommitListener is used in this step)

davidkel (Wed, 08 May 2019 07:48:54 GMT):
The `addCommitListener` is part of the fabric-network api and as such the submitTransaction will send the proposal, collect the responses and send them to the orderer and then will wait for the commit events for you before resolving the promise on the submit transaction. In other words it does all the complex stuff for you.

davidkel (Wed, 08 May 2019 07:48:54 GMT):
The `addCommitListener` is part of the fabric-network api and as such the submitTransaction in the fabric-network api will send the proposal, collect the responses and send them to the orderer and then will wait for the commit events for you before resolving the promise on the submit transaction. In other words it does all the complex stuff for you.

biligunb (Wed, 08 May 2019 07:53:14 GMT):
Yes I understand what fabric-network : submitTransaction does. However we have some chaincodes written with fabric-shim & sendTxProposal & sendTx. That is why we have sued `addCommitListener`

davidkel (Wed, 08 May 2019 07:55:03 GMT):
Can you explain why you think that ? fabric-network doesn't need to know what the chaincode is written in, it could be java, node (fabric-shim or contract-api), go

davidkel (Wed, 08 May 2019 08:02:58 GMT):
When you say fabric-shim do you actually mean fabric-client and you are talking about client side programming ?

bh4rtp (Wed, 08 May 2019 09:14:12 GMT):
hi, does anyone use `Chaincode.install`? the chaincode is packaged ok. but install failed and reports an error: ```peer.sendProposal is not a function```

biligunb (Wed, 08 May 2019 09:50:07 GMT):
REST API - to connect with fabric network using Node.js SDK

biligunb (Wed, 08 May 2019 09:51:38 GMT):
we are using FabricClient to send TX propsal & sendTX to ordering service Then fabricNetwork to add `addCommitListener` which listens and send tx status (transactionId, status, block number)

davidkel (Wed, 08 May 2019 09:55:14 GMT):
Would recommend that you use the fabric-network to submit the transaction rather than trying to do a mix and match approach using fabric client to submit the transaction.

davidkel (Wed, 08 May 2019 09:56:56 GMT):
Or you don't use fabric network at all and use the channelEventHub to manage listening for transaction events but given the complexity of getting this right I still suggest you use fabric-network to submit the transaction

ahmad-raza (Wed, 08 May 2019 11:16:36 GMT):
why ChannelBasedEventService Response comes so late ?

ahmad-raza (Wed, 08 May 2019 11:16:36 GMT):
why ChannelBasedEventService Response comes so late ? If we have no event attach . Response comes faster Any way to fast ChannelBasedEvent OR any other event Service?

SaphiraBjartskular (Wed, 08 May 2019 22:29:31 GMT):
I believe there is a bug in channel.sendTransactionProposal... I am sending a ChaincodeInvokeRequest object and am receiving the following error: TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object at Function.from (buffer.js:225:9)

SaphiraBjartskular (Wed, 08 May 2019 22:39:58 GMT):
https://stackoverflow.com/questions/56049949/error-invoking-chaincode-node-sdk-method-channel-sendtransactionproposal

SaphiraBjartskular (Wed, 08 May 2019 23:26:34 GMT):
nvmmmmmm

SaphiraBjartskular (Wed, 08 May 2019 23:26:47 GMT):
no bug just my own poor code

SaphiraBjartskular (Wed, 08 May 2019 23:26:47 GMT):
no bug

biligunb (Thu, 09 May 2019 00:06:56 GMT):
Thank you for your reply.

bretharrison (Thu, 09 May 2019 15:48:01 GMT):
check the peer instance that you are using

bh4rtp (Fri, 10 May 2019 00:54:53 GMT):
thanks. the peer must be an instance of Peer. i used a string.

davidkhala (Fri, 10 May 2019 09:16:04 GMT):
@bretharrison bret, gulp test is missing recently, could we revert it back? https://gerrit.hyperledger.org/r/#/c/31318/

Randyshu2018 (Fri, 10 May 2019 09:17:52 GMT):
hi,I wanna remove fabric-ca service from balance-transfer because of existing crypto-config created by ca,is there some advice?

davidkhala (Fri, 10 May 2019 09:29:54 GMT):
ca service in balance transfer is only used for dynamic user creation, are you sure you donot need it?

davidkhala (Fri, 10 May 2019 09:29:54 GMT):
ca service in balance transfer is only used for dynamic user creation, are you sure you donot need it? @Randyshu2018

davidkel (Fri, 10 May 2019 09:36:51 GMT):
@davidkhala @bretharrison It's still present in the master branch, but that makes me wonder if a change in 1.4 didn't get applied to master as well ?

davidkhala (Fri, 10 May 2019 09:52:17 GMT):
Hi all, is node 8 support will remain in release-1.4?

davidkhala (Fri, 10 May 2019 09:53:20 GMT):
Haha, it happens sometimes

davidkel (Fri, 10 May 2019 10:54:53 GMT):
Just curious, although the release 1.4 branch still only builds and tests on node 8, a change was made that fixed a compatibility issue with node 10 so wondered if you had tried node 10 and had you seen any problems ?

davidkhala (Fri, 10 May 2019 10:56:46 GMT):
So far no yet, but I think developer will always forget to cleaning the node_module which was installed in another nodejs version.

davidkel (Fri, 10 May 2019 10:57:33 GMT):
Seen that a few times, but not a lot can be done about that

davidkel (Fri, 10 May 2019 10:57:33 GMT):
Seen that a few times, but not a lot can be done about that, something the developer will soon learn :-)

davidkhala (Fri, 10 May 2019 10:58:15 GMT):
sure, we might only can add this to check list before bug report.

davidkel (Fri, 10 May 2019 10:59:41 GMT):
So I guess your question is will node-sdk 1.4 fix issues found under node 10 ?

bretharrison (Fri, 10 May 2019 13:17:55 GMT):
Sure

davidkhala (Sat, 11 May 2019 04:05:34 GMT):
Actually no, my question is eliminated, but your understanding is another question: "could we also provide a node js 10 environment in job builder for 1.4 branch"

nasht00 (Sun, 12 May 2019 11:57:04 GMT):
Does the checkpointer feature work? https://fabric-sdk-node.github.io/release-1.4/tutorial-event-checkpointer.html I'm trying a blockEventListener, with the default FILE_SYSTEM_CHECKPOINTER, all defaults. The value of my checkpointer in the filesystem is constantly: `{"transactionIds":[],"blockNumber":null}` I've put breakpoints in the code, and in blockeventlistener.js:69, the value of `blockNumber` is `NaN` ...

nasht00 (Sun, 12 May 2019 12:10:23 GMT):
I have created an issue: https://jira.hyperledger.org/browse/FABN-1235

kevinyap (Sun, 12 May 2019 12:22:13 GMT):
Has joined the channel.

GthmR (Sun, 12 May 2019 19:46:56 GMT):
Has joined the channel.

GthmR (Sun, 12 May 2019 19:54:07 GMT):
is there any sample javascript code on private data collection? Kindly help

mfaisaltariq (Sun, 12 May 2019 20:44:40 GMT):
````` ```

mfaisaltariq (Sun, 12 May 2019 20:46:13 GMT):
``` let regex = args[0]; /* Query Structure for couch DB that we need to contruct */ const query = { "selector": { "_id": { "$regex": regex } } }; //let query = "{ \"selector\":{\"_id\":{\"$regex\":\"" + regex + "\"}}}"; try { let result = await stub.getQueryResult(JSON.stringify(query)); console.log(result.toString()) return result; } catch (err) { console.log(err); return err; } ``` I have the above code to query the CouchDB using a Rich Query. But it returns a stateQueryIterator in response. Anyone knows how to iterate over that object and get to the results. I cannot find any documentation on using it in Node

davidkel (Sun, 12 May 2019 21:15:40 GMT):
@mfaisaltariq take a look at https://github.com/hyperledger/fabric-chaincode-node/blob/832d379e54417ca086f5fb7c94fbb90f9fb5b65d/test/fv/crud/chaincode.js#L5 hopefully it will help

Randyshu2018 (Mon, 13 May 2019 03:10:34 GMT):
hi,any resource to introduce KeyValueStore? I can only see three files created after a user enroll.

florianc (Mon, 13 May 2019 06:25:21 GMT):
keyValueStore is somewhere to store user during code execution. When you enrolled the user, you got all required certificates, private/pubblic keys created.

florianc (Mon, 13 May 2019 06:25:56 GMT):
Sorry, did not want to answer that, dunno what happened.

florianc (Mon, 13 May 2019 06:26:05 GMT):
keyValueStore is somewhere to store user during code execution. When you enrolled the user, you got all required certificates, private/pubblic keys created.

Randyshu2018 (Mon, 13 May 2019 06:30:25 GMT):
the core interface is client.saveUserToStateStore()?

Randyshu2018 (Mon, 13 May 2019 06:31:52 GMT):
what really i want to know is the files are created by which apis

florianc (Mon, 13 May 2019 06:33:57 GMT):
I don't know for sure. I guess it is one of the following: newCryptoKeyStore setCryptoKeyStore setCryptoSuite

florianc (Mon, 13 May 2019 06:34:27 GMT):
Documentation is not very clear, but you could try them one by one and check when are the files created

Randyshu2018 (Mon, 13 May 2019 06:35:06 GMT):
:thumbsup: ok,thanks

mfaisaltariq (Mon, 13 May 2019 07:20:43 GMT):
Thanks man :)

varunagarwal (Mon, 13 May 2019 12:06:07 GMT):
Hey so I know when add a new smart contract to a channel, only one peer needs to call `instantiate()` on it. When adding peers to a channel, do all peers need to call `initialize()` or only 1 peer can do so

muralisr (Mon, 13 May 2019 14:04:54 GMT):
@bretharrison FYI, opened https://jira.hyperledger.org/browse/FAB-15435

nfrunza (Mon, 13 May 2019 14:32:35 GMT):
dynamic code

GthmR (Mon, 13 May 2019 16:01:40 GMT):
Hi can someone provide sample private collection config file to be used in IBM Blockchain ?platform???

GthmR (Mon, 13 May 2019 16:02:25 GMT):
If I use the format give in the hyperledger fabric docs it's giving grpc payload error.

GthmR (Mon, 13 May 2019 16:02:52 GMT):
[ { "name": "collectionMarbles", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":1000000, "memberOnlyRead": true }, { "name": "collectionMarblePrivateDetails", "policy": "OR('Org1MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":3, "memberOnlyRead": true } ]

GthmR (Mon, 13 May 2019 16:03:10 GMT):
The above is the config I used

GthmR (Mon, 13 May 2019 16:03:23 GMT):
Kindly help. Thanks in advance

mc (Mon, 13 May 2019 16:11:04 GMT):
hi all -- has anyone run into an error when running an chaincode upgrade when using an external repository? The install has no problem but when running the upgrade, the docker container fails due to a connectivity issue.

nfrunza (Mon, 13 May 2019 18:43:23 GMT):
@davidkel how do you update an identity, and how to get the secret password from the wallet for the verification ?

davidkel (Mon, 13 May 2019 21:05:20 GMT):
@nfrunza WIth wallets, to update you need to delete the identity and re-import it. There is no secret. A wallet holds identities (most likely X509 cert and private key) it doesn't hold the names of users and their secrets as defined in the fabric-ca

nfrunza (Mon, 13 May 2019 21:13:32 GMT):
thank you

nfrunza (Mon, 13 May 2019 21:19:25 GMT):
The fabcar sample registerUser.js passes the secret/password, https://github.com/hyperledger/fabric-samples/blob/release-1.4/fabcar/javascript/registerUser.js

nfrunza (Mon, 13 May 2019 21:26:33 GMT):
@davidkel , What do you think of the approach that the application will ask the user to provide the private key to authorize access?, or what would be the best approach to authorize access to the client of HLFabric ?

davidkel (Mon, 13 May 2019 21:32:27 GMT):
If you want individual accountability then each user will need to be issued an identity. A private key to sign the transaction and a public cert which get's included with the transaction for operations such as chaincode being able to perform some sort of ACL activity

nfrunza (Mon, 13 May 2019 21:35:17 GMT):
I this case if i use a WEB interface the user needs to be prompted to upload the private key, validated against the wallet and then authorized for any transaction , read, submit etc

nfrunza (Mon, 13 May 2019 21:35:17 GMT):
In this case if i use a WEB interface the user needs to be prompted to upload the private key, validated against the wallet and then authorized for any transaction , read, submit etc

nfrunza (Mon, 13 May 2019 21:37:20 GMT):
And I forgot important, after the user is registered and enrolled by the ADMIN, it need to receive the identity/private key ?

nfrunza (Mon, 13 May 2019 21:39:58 GMT):
What would be the best form to deliver Identity to the user? any specific format?

davidkel (Mon, 13 May 2019 21:49:27 GMT):
If you use the fabric-ca (and you don't have to you can use another certificate authority) then a defined registrar registers a user. The user could enroll themselves, or you application could enroll them on their behalf and could even hold the credentials for them and use a different authentication mechanism (such as Oauth2) to identify a user and select their stored identity.

davidkel (Mon, 13 May 2019 21:49:27 GMT):
If you use the fabric-ca (and you don't have to you can use another certificate authority) then a defined registrar registers a user. The user could enroll themselves, or your application could enroll them on their behalf and could even hold the credentials for them and use a different authentication mechanism (such as Oauth2) to identify a user and select their stored identity.

nfrunza (Mon, 13 May 2019 22:06:45 GMT):
thank you, looks like i need to add a user model and persist in DB along with Identity

mbanerjee (Mon, 13 May 2019 23:34:03 GMT):
When is fabric-sdk-node 2.0 going to be released?

Randyshu2018 (Tue, 14 May 2019 05:50:15 GMT):
is where a way to deal with enrollment contains private key ,signcert and cachain like fabric-ca-client enroll -M do?

MatasV (Tue, 14 May 2019 11:06:18 GMT):
Has joined the channel.

mauricio (Tue, 14 May 2019 13:01:49 GMT):
I can't understand your question. If you want enroll from the fabric-sdk you can use the Gateway with the `connection.json` file and it will load all the certificates, after you can simply enroll with ``` const ca = gateway.getClient().getCertificateAuthority() const enrollment = await ca.enroll({ csr: customer.csr, enrollmentID: customer.enrollmentID, enrollmentSecret: customer.enrollmentSecret }) ```

dsanchezseco (Tue, 14 May 2019 13:27:49 GMT):
did you solve it?? i'm having the same problem! Previously on the 1.2 i had it working, but it doesn't now and I do not know is it's because of other changes i made or the upgrade, but with the downgraded version of fabric-client(1.2) it doesn't either so it does not look like it's that

rthatcher (Tue, 14 May 2019 15:12:38 GMT):
I would think that if the Path is valid, then the path is referring to the wrong tls certificate.

dsanchezseco (Tue, 14 May 2019 15:15:39 GMT):
i'm trying with both the ca.crt and the tls-ca.pem with no luck

dsanchezseco (Tue, 14 May 2019 15:28:30 GMT):
``` Certificate: Data: Version: 3 (0x2) Serial Number: 05:87:da:a7:c1:9a:da:1e:73:8c:b6:19:54:4a:85:78:fc:08:57:16 Signature Algorithm: ecdsa-with-SHA256 Issuer: C=c, ST=state, L=location, O=org0-1, OU=client, OU=org0, CN=ca-org0 Validity Not Before: May 14 15:10:00 2019 GMT Not After : May 13 15:10:00 2020 GMT Subject: C=c, ST=state, L=location, O=org0-1, OU=ca-org0-1, CN=ca-org0-1-7d5dbdd6c8-znvb6 Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:97:3c:c9:73:5a:8e:c7:63:57:7e:04:4c:5a:36: 01:9a:47:cb:72:7c:5c:30:28:a0:97:2b:27:d4:b1: 2b:ec:e8:4b:c1:71:8b:ac:9c:4b:ed:c5:63:f1:ff: cd:81:89:33:a0:45:1d:0f:63:42:da:eb:d7:99:d0: e6:23:27:f6:c1 ASN1 OID: prime256v1 NIST CURVE: P-256 X509v3 extensions: X509v3 Key Usage: critical Digital Signature, Key Encipherment, Key Agreement X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: 87:29:5D:E9:33:6C:2A:4D:BF:A4:E2:A0:2C:67:DF:E1:75:A1:1A:95 X509v3 Authority Key Identifier: keyid:AC:34:EA:59:65:C8:AF:DD:DC:E7:86:D5:4A:D8:F9:A9:10:7B:FC:97 X509v3 Subject Alternative Name: DNS:ca-org0-1 Signature Algorithm: ecdsa-with-SHA256 30:45:02:21:00:b7:8e:82:f4:b5:c4:2b:18:b8:01:7a:b5:bd: ```

dsanchezseco (Tue, 14 May 2019 15:29:24 GMT):
that one is the one i'm using on the wrapper and is the one of the correct org

bretharrison (Tue, 14 May 2019 20:28:13 GMT):
Are you using the NodeSDK ?

bretharrison (Tue, 14 May 2019 20:30:50 GMT):
The date is being worked on, is there something you need ?

davidkhala (Wed, 15 May 2019 02:27:40 GMT):
Dear community @bretharrison @davidkel during refactoring typeScript, I find a typeScript lint hints[no-namespace], I would like to hear your feedback on how we could process this. My suggestion is to remove it as suggested in linting and it will introduce some structural changes.

Randyshu2018 (Wed, 15 May 2019 03:34:58 GMT):

Clipboard - May 15, 2019 11:34 AM

Randyshu2018 (Wed, 15 May 2019 03:37:04 GMT):
I want user certificates display like msp struct.

davidkel (Wed, 15 May 2019 07:19:43 GMT):
I am guessing that will also break existing TS applications ?

bh4rtp (Wed, 15 May 2019 08:25:14 GMT):
hi, about method `Client.getChannel`, why does it allow the argument channelName to be null?

davidkel (Wed, 15 May 2019 09:08:03 GMT):
@GthmR There are 2 formats for specifying collections one is used by the peer command which is the format you have posted, the other is used by the node-sdk as described here. https://fabric-sdk-node.github.io/release-1.4/tutorial-private-data.html I would suggest trying the format described in the above link.

TharinduSandaruwan1 (Wed, 15 May 2019 09:56:25 GMT):
Has joined the channel.

TharinduSandaruwan1 (Wed, 15 May 2019 09:59:17 GMT):
What is wrong with this? sync nthUsersLands(stub, args) { if (args.length != 1) { throw new Error( "Incorrect number of arguments. Expecting NIC ex: 944999014V" ); } let nic = args[0]; let landsAsBytes = await stub.getQueryResult({ selector: { docType: "land", owner: nic } }); console.log(landsAsBytes.toString()); return landsAsBytes; } }; It leaves me a error on invoking function Error: Illegal value for queryvalue element of type string: object (not a string)

davidkhala (Wed, 15 May 2019 10:07:25 GMT):
yes, it will break those using 'namespace' or 'module'

davidkhala (Wed, 15 May 2019 10:16:23 GMT):
actually the migration to fabric-common has already break those old application so....

davidkhala (Wed, 15 May 2019 10:30:17 GMT):
Btw, it also related to a long question about ambigious Client referring to both 1. a class 2. npm fabric-client itself

davidkhala (Wed, 15 May 2019 10:30:17 GMT):
Btw, it also related to a history question about ambigious: `Client` referring to both 1. a class 2. npm fabric-client itself

davidkhala (Wed, 15 May 2019 10:38:00 GMT):
So there is some tricky code in ts, some time we have to `import {} from 'fabric-client', otherside we use `import Client = require('fabric-client')`

davidkhala (Wed, 15 May 2019 10:38:00 GMT):
So there is some tricky code in ts, some time we have to `import {} from 'fabric-client'`, sometime we use `import Client = require('fabric-client')`

bretharrison (Wed, 15 May 2019 13:35:59 GMT):
When null it will return the first channel on the list when using a common connection profile

mauricio (Wed, 15 May 2019 13:48:42 GMT):
You're passing a js object `{}` and it's expecting a type **string** at the stub.getQueryResult https://github.com/hyperledger/fabric-chaincode-node/blob/release-1.4/fabric-shim/types/index.d.ts#L93

balamcyril (Wed, 15 May 2019 14:30:44 GMT):
Has joined the channel.

balamcyril (Wed, 15 May 2019 14:30:48 GMT):
Hello, fabric sdk for node is already provide idemix credential?

mauricio (Wed, 15 May 2019 14:39:39 GMT):
I think that at this moment only java sdk supports idemix, people behind Hyperledger Fabric is working hard to release idemix on fabric-sdk https://jira.hyperledger.org/projects/FABN/issues/FABN-689?filter=allopenissues https://docs.google.com/document/d/12iJUJ0GsSDCoMKnMalbvchFHJveWj5LxOTGrIYlk04g/edit

florianc (Wed, 15 May 2019 14:44:30 GMT):
Hi. I noticed a problem with my chaincodeEvent listener. After it spent a long time listenning, it suddenly stops. there were near to 0 transactions during this duration. Here is an error I have: ``` 2019-05-15T14:40:28.439Z - error: [Channel.js]: Error: No identity has been assigned to this client 2019-05-15T14:40:28.442Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: No identity has been assigned to this client ```

florianc (Wed, 15 May 2019 14:44:30 GMT):
Hi. I noticed a problem with my chaincodeEvent listener. After it spent a long time listenning, it suddenly stops. there were near to 0 transactions during this duration. Here is an error I have: ``` 2019-05-15T14:40:28.439Z - error: [Channel.js]: Error: No identity has been assigned to this client 2019-05-15T14:40:28.442Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: No identity has been assigned to this client ``` Has anyone encountered this problem before?

balamcyril (Wed, 15 May 2019 15:00:52 GMT):
Ok, i'm a crypto engineer actually working on Idemix implementation on different blockchain. I want to help for the implementation part if is possible.

bretharrison (Wed, 15 May 2019 15:18:04 GMT):
https://jira.hyperledger.org/browse/FABN-689

mffrench (Wed, 15 May 2019 19:36:09 GMT):
Hello, I'm currently facing severals GRPC error with HLF SDK nodejs 1.3 : ``` error stack : Error: 2 UNKNOWN: Stream removed at Object.exports.createStatusError (/usr/src/app/node_modules/grpc/src/common.js:87:15) at ClientDuplexStream._emitStatusIfDone (/usr/src/app/node_modules/grpc/src/client.js:235:26) at ClientDuplexStream._receiveStatus (/usr/src/app/node_modules/grpc/src/client.js:213:8) at Object.onReceiveStatus (/usr/src/app/node_modules/grpc/src/client_interceptors.js:1290:15) at InterceptingListener._callNext (/usr/src/app/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/usr/src/app/node_modules/grpc/src/client_interceptors.js:614:8) at /usr/src/app/node_modules/grpc/src/client_interceptors.js:1110:18) ``` Currently the only way I see to handle this issue is to reinitialize my hlf client and retry operation where I got this error. I'd like to know if you see some ways : 1) to understand root cause of this issue 2) provide a better resolution Also I'm wondering if can loose event coming from the network in case I'm subscribing on some chaincode event. Do you have some advices to provide in such case ? Thank you !

MatasV (Wed, 15 May 2019 20:10:00 GMT):
Good evening, I have pretty simple question. Have anyone tried to setup fabric-starter (web application+ Node SDK REST server)? Could you redirect me into updated setting up documentation?

MatasV (Wed, 15 May 2019 20:10:00 GMT):
Good evening, I have pretty simple question. Have anyone tried to setup fabric-starter and fabric-starter-rest (web application+ Node SDK REST server)? Could you redirect me into updated set up documentation? P.s A project I am talking about (https://github.com/olegabu/fabric-starter _&_ https://github.com/olegabu/fabric-starter-rest )

MatasV (Wed, 15 May 2019 20:10:00 GMT):
Good evening, I have pretty simple question. Have anyone tried to setup_ *fabric-starter* _and _*fabric-starter-rest*__ (web application+ Node SDK REST server)_? Could you redirect me into updated set up documentation? P.s A project I am talking about (https://github.com/olegabu/fabric-starter _&_ https://github.com/olegabu/fabric-starter-rest )

MatasV (Wed, 15 May 2019 20:10:00 GMT):
Good evening, I have pretty simple question. Have anyone tried to setup _*fabric-starter*_ and _*fabric-starter-rest*_ _ (web application+ Node SDK REST server)_? Could you redirect me into updated set up documentation? P.s A project I am talking about (https://github.com/olegabu/fabric-starter _&_ https://github.com/olegabu/fabric-starter-rest )

adityanalge (Wed, 15 May 2019 20:24:18 GMT):
Has joined the channel.

adityanalge (Wed, 15 May 2019 20:24:19 GMT):
``` I competed the fabcar tutorial from Fabric-Samples. After enrolling admin and registering and enrolling user1, I have two wallets i.e. admin and user1. Why does the admin wallet have a copy of the user1's private key? ```

TharinduSandaruwan1 (Thu, 16 May 2019 02:19:09 GMT):
@mauricio how can I make this query into string? Can you help me to o so?

mauricio (Thu, 16 May 2019 03:08:34 GMT):
``` query := fmt.Sprintf(`{ "selector":{ "myKey": { "$eq": "%s" } } } `, args[0]) ResultStates, err := APIstub.GetQueryResult(query) ```

mauricio (Thu, 16 May 2019 03:08:49 GMT):
@TharinduSandaruwan1 Something like this

florianc (Thu, 16 May 2019 09:07:00 GMT):

Clipboard - May 16, 2019 11:06 AM

florianc (Thu, 16 May 2019 09:07:03 GMT):
Hi. Little problem with the documentation, could someone check for me? When I use the search system for "addContractListener", it does not return anything. However it exists:

florianc (Thu, 16 May 2019 09:07:49 GMT):
(works fine with other search like "RegistrationOptions")

florianc (Thu, 16 May 2019 09:31:58 GMT):
With sdk 1.4.1, can someone explain me how to set startBlock (if this exists) and endBlock for the options of `addContractListener`? The documentation says it is possible (https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Contract.html#addContractListener__anchor) but there is no info on the way to do it. (I don't want to use fabric-client, which I know works fine)

florianc (Thu, 16 May 2019 09:39:15 GMT):
Is it at least available already? I've been trhough the source code (I hope it is the correct one ^^ https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-network/lib/impl/event/contracteventlistener.js) and there is not end/start block reference at all.

mahoney1 (Thu, 16 May 2019 10:28:13 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

TharinduSandaruwan1 (Thu, 16 May 2019 11:17:08 GMT):
when I put this it is giving me a syntax error.can you put it to my code and send me?

TharinduSandaruwan1 (Thu, 16 May 2019 11:28:10 GMT):
This is go style no?

mauricio (Thu, 16 May 2019 11:49:26 GMT):
Yup, but Nodejs chaincode has a similar api

mauricio (Thu, 16 May 2019 11:50:30 GMT):
I sent you the link, you only have to pass the "`{ "selector":{ "myKey": { "$eq": "%s" } } } `" instead of an object

mauricio (Thu, 16 May 2019 11:50:30 GMT):
I sent you the link, you only have to pass the ``{ "selector":{ "myKey": { "$eq": "%s" } } } `` instead of an object

RameshT (Thu, 16 May 2019 12:18:54 GMT):
Has joined the channel.

caroline-church (Thu, 16 May 2019 17:34:01 GMT):
can anyone help with how to parse the result from `channel.getChannelConfig()` it returns a `ConfigEnvelope` but the interesting data is in a `byteBuffer` and i'm not sure what to do with it

davidkel (Thu, 16 May 2019 17:42:03 GMT):
@caroline-church looks like the node-sdk tests only get the Config object from the ConfigEnvelope and then use configtxlator to process it rather than attempt to do it itself. https://github.com/hyperledger/fabric-sdk-node/blob/302503e3a576d79cf0d857b9048ae6f270c9ed73/test/integration/configtxlator.js#L72 Only way would be to load the correct protobufs and decode it yourself

caroline-church (Thu, 16 May 2019 17:42:34 GMT):
how do i load the correct protobufs?

davidkel (Thu, 16 May 2019 17:45:33 GMT):
An example of how to do protobuf decoding can be seen here https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/lib/BlockDecoder.js but to work out which protobufs you need you have to look at the fabric protobuf files. You can start by looking at configtx.proto in the protos/common directory of the fabric source code

caroline-church (Thu, 16 May 2019 17:46:32 GMT):
ok cool thanx :)

davidkel (Thu, 16 May 2019 17:50:34 GMT):
Be really good to contribute it back to the node-sdk as well if you get it working as I am sure it will be useful for others

caroline-church (Thu, 16 May 2019 18:09:16 GMT):
the BlockDecoder does exactly what i want actually its just not expoerted :(

SaphiraBjartskular (Thu, 16 May 2019 20:42:44 GMT):
Is the old eventHub depreciated? Would like to be able to have an event listener which can listen to a certain event happening on any channel of the network. Is this possible?

bh4rtp (Fri, 17 May 2019 01:59:43 GMT):
hi, i am using master branch. the `Channel.queryInstantiatedChaincodes` returns an empty response: i.e. ```{"chaincodes":[]}```.

bh4rtp (Fri, 17 May 2019 01:59:43 GMT):
hi, i am using master branch. the `Channel.queryInstantiatedChaincodes` returns an empty response: i.e. ```{"chaincodes":[]}```

davidkhala (Fri, 17 May 2019 04:25:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ad3vasGtNoRnZsMYG) Oh? What kind of improvement can help you? Could you simply use like `require('fabric-client/lib/BlockDecoder')`

davidkhala (Fri, 17 May 2019 04:25:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ad3vasGtNoRnZsMYG) Oh? What kind of improvement can help you? how about direct use `require('fabric-client/lib/BlockDecoder')`

davidkhala (Fri, 17 May 2019 04:25:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Ad3vasGtNoRnZsMYG) Oh? Is there anything I can help you? how about direct use `require('fabric-client/lib/BlockDecoder')`

davidkhala (Fri, 17 May 2019 04:28:18 GMT):
the new ChannenlEventHub is a replacement of old eventhub, and exactly meets what you want.

bestbeforetoday (Fri, 17 May 2019 15:24:09 GMT):
I think you can just include `startBlock` and/or `endBlock` properties an object passed as the _option_ argument, similar the options you can pass to the event hub using the fabric-client API. Note: I've not actually tried this myself! @14gracel should be able to confirm.

bestbeforetoday (Fri, 17 May 2019 15:24:09 GMT):
I've had a quick look through the code and I think I was mistaken. You can't specify a start block when calling `Contract.addContractListener()`. It will resume from the last observed event if you re-attach to a listener that was using checkpointing, but you don't control that behaviour. I think the intention is that you add a listener before invoking the transaction whose event you are interested in, not to enable replay of arbitrary historical events. I guess you could use the low-level event hub to do that if you really need

bestbeforetoday (Fri, 17 May 2019 15:24:09 GMT):
The error message returned by the chaincode should be the `message` property of the Error object returned at the client end. Where you see the `isProposalResponse` field set to `true`, the content of the `response` property of the proposal response object has been assigned to the error object. So the error object won't have a `response` property; it _is_ the response property. I did start re-writing this behaviour a while back but got too far down a rabbit-hole of how much other code this impacted and had to bail out to work on something else

Antimttr (Fri, 17 May 2019 16:47:59 GMT):
@bretharrison Hey there, I was just following up on what you said the other day about the cryptogroup meeting. Has that happened yet? I havent seen any new comments on the design doc for idemix lately. Is there a planned meetup time for that group? Thanks for your help.

TharinduSandaruwan1 (Sun, 19 May 2019 05:39:13 GMT):
when I invoking a transaction through node sdk.It leaves me this error

TharinduSandaruwan1 (Sun, 19 May 2019 05:40:46 GMT):
2019-05-19T05:38:04.866Z - error: [Channel.js]: Channel:myc received discovery error:access denied 2019-05-19T05:38:04.868Z - error: [Channel.js]: Error: Channel:myc Discovery error:access denied 2019-05-19T05:38:04.904Z - error: [Channel.js]: Channel:myc received discovery error:access denied 2019-05-19T05:38:04.905Z - error: [Channel.js]: Error: Channel:trafficfine Discovery error:access denied 2019-05-19T05:38:04.906Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Channel:myc Discovery error:access deniedFailed to submit transaction: Error: Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Channel:myc Discovery error:access denied

TharinduSandaruwan1 (Sun, 19 May 2019 05:42:32 GMT):
this is my invoke.js file

MatasV (Sun, 19 May 2019 22:46:57 GMT):
Hey, I have pretty simple question. Have anyone tried to setup fabric-starter and fabric-starter-rest (web application+ Node SDK REST server)? Could you redirect me into updated documentation? P.s A project I am talking about (https://github.com/olegabu/fabric-starter & https://github.com/olegabu/fabric-starter-rest )

florianc (Mon, 20 May 2019 06:19:19 GMT):
Unfortunately it does not work. I tried with startBlock, endBlock, start and end.

davidkel (Mon, 20 May 2019 09:11:00 GMT):
@florianc could you raise a Jira describing the problem please. At a minimum more documentation is required

florianc (Mon, 20 May 2019 09:13:06 GMT):
@davidkel Will do. Butthis issue already points out the lack of documentation about it: https://jira.hyperledger.org/browse/FABN-1203

florianc (Mon, 20 May 2019 09:13:06 GMT):
@davidkel Will do for the function options. Butthis issue already points out the lack of documentation about it: https://jira.hyperledger.org/browse/FABN-1203

florianc (Mon, 20 May 2019 09:13:06 GMT):
@davidkel Will do for the function options. But this issue already points out the lack of documentation about it: https://jira.hyperledger.org/browse/FABN-1203

Randyshu2018 (Mon, 20 May 2019 09:20:48 GMT):
Anyone know that problem 'This key implementation only supports keys generated by jsrsasign.KEYUTIL. It must have a "pubKeyHex" property'

chlsc (Mon, 20 May 2019 12:04:08 GMT):
Has joined the channel.

chlsc (Mon, 20 May 2019 12:04:25 GMT):
Can someone here help me on how to get the error message from chaincode? I use both nodejs chaincode and sdk. And I can trace from the chaincode that it throws an error "ERROR [lib/handler.js] Calling chaincode Invoke() returned error response [Error:xxx]. Sending ERROR message back to peer". However, from node sdk, the proposal response gives me "{"status":500,"payload":{"type":"Buffer","data":[]},"isProposalResponse":true}".

chlsc (Mon, 20 May 2019 12:07:06 GMT):
The payload is empty and there is no response field.

chlsc (Mon, 20 May 2019 12:08:19 GMT):
Anyone has experience on solving this?

florianc (Mon, 20 May 2019 14:01:25 GMT):
I have kind of a "logic" question about chaincode event listening. From the documentation/my understanding, the event listener, internally, do not listen for events but for blocks. When it receives a block, it checks it content for event, right? Based on this, lets imagine I have a server listening for a type of event. The listener returns me the event I am looking for in block X. If my server crashes right at this moment, can I assume, based on the way it works, that in block X there is no more event of the type I am looking for? If so, I can restart listening from block X+1 instead of X (to avoid double event handling), isn't it? Note: I am not using checkpoint (yet). I handle the event restart myself.

HLFPOC (Mon, 20 May 2019 18:25:28 GMT):
Hi Team, I am trying to enroll user (using node sdk ) from my org's ca, but getting below error : `POST /api/v1/enroll 401 23 "Failed to get user: : scode: 404, code: 63, msg: Failed to get User: sql: no rows in result set"`. However, same enroll method is working fine for different org . Can anyone please suggest what is the issue here ?

florianc (Tue, 21 May 2019 07:29:01 GMT):
https://jira.hyperledger.org/browse/FABN-1251

balakrishna.devasani (Tue, 21 May 2019 11:28:47 GMT):
Hi Team, I have a node application where i am listening for chaincode events by registerning chaincode event listener. When my blockchain service nodes goes under maintenance, my chaincode listener getting disconnected in nodejs application and i am missing events from chaincode. I don't want to miss any events from chaincode. Is there any better way to maintain the chaincode listener connection consistently ? Thanks in advance!!

balakrishna.devasani (Tue, 21 May 2019 11:28:47 GMT):
Hi Team, I have a node application where i am listening for chaincode events by registerning chaincode event listener. When my blockchain service nodes goes under maintenance, my chaincode listener getting disconnected in nodejs application and i am missing events from chaincode. I don't want to miss any events from chaincode. Right now i am using node-sdk version V1.1.0 and i cannot update the version anytime soon. I am thinking of doing connection re-attempt in case of listener disconnection error. Is there any better way to maintain the chaincode listener connection consistently ? Thanks in advance!!

florianc (Tue, 21 May 2019 12:00:05 GMT):
Hi. You can use the checkpoint functionality: https://fabric-sdk-node.github.io/release-1.4/tutorial-event-checkpointer.html Moreover, if you do not want to use this, you can implement your own logic where you store the latest block number seen by your event listener, store it, and when restarting the listener, use the startBlock option to restart from this block number.

balakrishna.devasani (Tue, 21 May 2019 12:03:42 GMT):
@florianc Thank you so much.

balakrishna.devasani (Tue, 21 May 2019 12:18:02 GMT):
Is there anyway we can maintain connection consistently ?

balakrishna.devasani (Tue, 21 May 2019 12:20:02 GMT):
i mean auto connect in case of listener disconnection due to some errors

florianc (Tue, 21 May 2019 12:20:59 GMT):
I don't know if there is a built in mechanism for that. But I guess you could build this logic by yourself.

bestbeforetoday (Tue, 21 May 2019 12:39:04 GMT):
Grrr, somehow RocketChat tricked me into editing my previous comment in this thread instead of adding a new one! So it's not missed... I've had a quick look through the code and I think I was mistaken. You can't specify a start block when calling `Contract.addContractListener()`. It will resume from the last observed event if you re-attach to a listener that was using checkpointing, but you don't control that behaviour. I think the intention is that you add a listener before invoking the transaction whose event you are interested in, not to enable replay of arbitrary historical events. I guess you could use the low-level event hub to do that if you really need

bestbeforetoday (Tue, 21 May 2019 12:40:24 GMT):
The documentation certainly does need a bit of tweaking, which I think is in progress

florianc (Tue, 21 May 2019 12:40:53 GMT):
Hi. Thanks for the answer. But then is the documentation wrong? Because it says, and I copied/pasted it: "Optional. Options on registrations allowing start and end block numbers."

florianc (Tue, 21 May 2019 12:41:05 GMT):
Oh, ok, you were faster than me ^^

florianc (Tue, 21 May 2019 12:43:32 GMT):
Can we expect it to implemented into fabric-network package in the future? Or shall we stick to fabric-client?

bestbeforetoday (Tue, 21 May 2019 12:48:36 GMT):
I think if it's the peer from which you received the event that crashed then your logic should be OK since the client end has received the block that contained the event. If the client end crashes then I don't think you can be sure that you've processed all the transactions and associated events in the block so by resuming from the next block number you might risk missing things.

bestbeforetoday (Tue, 21 May 2019 12:51:16 GMT):
The listener capability provided at the _fabric-network_ layer should handle reconnections to (or switching between) peer event hubs on failure for you transparently

florianc (Tue, 21 May 2019 12:54:11 GMT):
Makes sense, thanks.

adityanalge (Tue, 21 May 2019 23:09:47 GMT):
Does the fabric-sdk-node have a function to return caCert?

Randyshu2018 (Wed, 22 May 2019 05:14:24 GMT):

Clipboard - May 22, 2019 1:14 PM

Dhiraj1990 (Wed, 22 May 2019 05:19:38 GMT):
Has joined the channel.

Dhiraj1990 (Wed, 22 May 2019 05:19:39 GMT):
https://stackoverflow.com/questions/56232126/issue-with-hyprledger-node-sdk-on-calling-api

Dhiraj1990 (Wed, 22 May 2019 05:19:54 GMT):
can anyone help me with above issue ?

Randyshu2018 (Wed, 22 May 2019 05:32:00 GMT):
look likes you failed to meet the endorse_policy

Dhiraj1990 (Wed, 22 May 2019 05:36:53 GMT):
If it is endorsement policy failure then how it is working correct for second time

TharinduSandaruwan1 (Wed, 22 May 2019 07:06:37 GMT):
Why when we are invoking a transaction through node sdk why it is creating another dev peer even the dev peer which is created by instantiate command already there?

florianc (Wed, 22 May 2019 07:08:43 GMT):
Could you elaborate on this? I do not understand what you are doing and what are the outcomes of your action.

TharinduSandaruwan1 (Wed, 22 May 2019 07:59:00 GMT):
I have created a Hyperledger fabric network and I install the network and instantiate the chaincode. By instantiate command which I used through cli created a de-peer0.org2.example.com

TharinduSandaruwan1 (Wed, 22 May 2019 08:00:04 GMT):
And after that I tried to invoke a transaction through node sdk It again create a dev.peer0.org2.example.com

TharinduSandaruwan1 (Wed, 22 May 2019 08:00:36 GMT):
I want to get to know what kind of thing cause to this?

mahoney1 (Wed, 22 May 2019 09:24:23 GMT):
@TharinduSandaruwan1 might suggest to capture the steps you took [to reach this point using node SDK] on Stack Overflow (tagged #hyperledger-fabric), including environment/version of Fabric you're using/ OS, etcetc. Normally, it would spin another up for a new version of the smart contract package or upgrade for example - not for a 'normal' transaction per se.

pankajcheema (Wed, 22 May 2019 09:56:42 GMT):
Hi I am experimenting the channel based event using 1.4 node js sdk

pankajcheema (Wed, 22 May 2019 09:56:50 GMT):
``` const channel = network.getChannel(); let eventhuborg = channel.newChannelEventHub('peer0.org1.example.com'); console.log(eventhuborg); let block_reg = eventhuborg.registerBlockEvent((block) => { console.log('Successfully received the block event'); console.log(block) }, (error) => { console.log('Failed to receive the block event ::' + error); }); let result = await contract.submitTransaction('addUser', JSON.stringify(data)); console.log('Transaction has been submitted'); // Disconnect from the gateway. await gateway.disconnect();```

pankajcheema (Wed, 22 May 2019 09:58:23 GMT):
I have applied ``` const channel = network.getChannel(); let eventhuborg = channel.newChannelEventHub('peer0.org1.example.com'); console.log(eventhuborg); let block_reg = eventhuborg.registerBlockEvent((block) => { console.log('Successfully received the block event'); console.log(block) }, (error) => { console.log('Failed to receive the block event ::' + error); });``` only this section . It was working fine earlier after applying these lines of code even it is working fine but not getting `console.log('Successfully received the block event');`

pankajcheema (Wed, 22 May 2019 09:58:42 GMT):
Any idea what I need to do ?

pankajcheema (Wed, 22 May 2019 10:00:43 GMT):
@balakrishna.devasani you implemented that can you help me on the same ?

pankajcheema (Wed, 22 May 2019 10:02:08 GMT):
@akshay.sood any idea ?

balakrishna.devasani (Wed, 22 May 2019 10:07:02 GMT):
eventhuborg.connect() call is missing here.

balakrishna.devasani (Wed, 22 May 2019 10:07:21 GMT):
you need to connect to eventsource

pankajcheema (Wed, 22 May 2019 10:07:34 GMT):
oh yeah let me try @balakrishna.devasani

pankajcheema (Wed, 22 May 2019 10:08:44 GMT):
thanks @balakrishna.devasani

pankajcheema (Wed, 22 May 2019 10:08:52 GMT):
it worked

balakrishna.devasani (Wed, 22 May 2019 10:08:59 GMT):
awesome!!

pankajcheema (Wed, 22 May 2019 10:23:03 GMT):
@balakrishna.devasani

pankajcheema (Wed, 22 May 2019 10:23:10 GMT):
but am not able to get data

pankajcheema (Wed, 22 May 2019 10:24:00 GMT):
```Object {channel_id: "mychannel", number: "10", filtered_transactions: Array(1)}`` getting this output . ```

pankajcheema (Wed, 22 May 2019 10:24:00 GMT):
```Object {channel_id: "mychannel", number: "10", filtered_transactions: Array(1)}``` getting this output . ```

pankajcheema (Wed, 22 May 2019 10:24:00 GMT):
```Object {channel_id: "mychannel", number: "10", filtered_transactions: Array(1)} ``` getting this output .

florianc (Wed, 22 May 2019 11:16:36 GMT):
@pankajcheema To get unfiltered event, pass "true" to "connect" `eventhuborg.connect(true)`

SashaPESIC (Wed, 22 May 2019 14:42:46 GMT):
Has joined the channel.

bretharrison (Wed, 22 May 2019 16:46:34 GMT):
Keep in mind that the `connect` has some new parameters, so you could call it with `.connect({full_block: true}, mycallback);` to not only connect with unfiltered blocks (full blocks), but also have a callback be notified if there was a problem with the connect. There are other connect options, like start and end blocks numbers, and the target peer https://fabric-sdk-node.github.io/release-1.4/ChannelEventHub.html#connect__anchor

bretharrison (Wed, 22 May 2019 19:02:11 GMT):
With 1.4.2 we will be adding a new option on Chaincode listener registration, to receive all chaincode events as an array, this way the application will be able to process all the events from a block rather than getting individual callbacks.

bretharrison (Wed, 22 May 2019 19:19:31 GMT):
What do you need

bretharrison (Wed, 22 May 2019 19:20:39 GMT):
No, you will have to set a listener up on each channel

NishaM.R (Thu, 23 May 2019 10:40:07 GMT):
Hi,

NishaM.R (Thu, 23 May 2019 10:42:51 GMT):
Hi, I was deploying chaincode in IBM cloud. I am working with hyperledger fabric Node SDK. While trying to register user I am getting below error``` `AIM00110:EVCharging-app 549121$ node registerUserOrg2.js Store path:/Users/549121/Desktop/IBM-EV/EVCharging-app/hfc-key-store Successfully loaded admin from persistence Failed to register: Error: Calling register endpoint failed, CONNECTION Timeout` ```

NishaM.R (Thu, 23 May 2019 10:44:39 GMT):
Hi, I was deploying chaincode in IBM cloud. I am working with hyperledger fabric Node SDK. While trying to register user I am getting below error ``` AIM00110:EVCharging-app 549121$ node registerUserOrg2.js Store path:/Users/549121/Desktop/IBM-EV/EVCharging-app/hfc-key-store Successfully loaded admin from persistence Failed to register: Error: Calling register endpoint failed, CONNECTION Timeout ``` Can anyone help in this?

kn3118 (Thu, 23 May 2019 16:36:24 GMT):
Has joined the channel.

florianc (Fri, 24 May 2019 06:29:46 GMT):
:thumbsup:

bh4rtp (Fri, 24 May 2019 07:43:42 GMT):
install chaincode failed when using master branch. ```[2019-05-24 15:26:39.178] [ERROR] install-chaincode - Error: failed to invoke backing implementation of 'InstallChaincode': could not parse as a chaincode install package: invalid label 'register:v1'. Label must be non-empty, can only consist of alphanumerics, '_', and '-' and can only begin with alphanumerics```

PyiTheinKyaw (Fri, 24 May 2019 11:07:51 GMT):
Dear teams, Now I try to make listen on transaction in order to make confirm that transaction was successful committed as valid or not in Fabric ledger. I refer https://fabric-sdk-node.github.io/release-1.4/tutorial-listening-to-events.html. But does not work in clall back method of all of the listener. (Please refer to my code) ' /** * @param {String} transactionId the name of the event listener * @param {Function} callback the callback function with signature (error, transactionId, status, blockNumber) * @param {Object} options **/ await transaction.addCommitListener((error, transactionId, status, blockNumber) => { logger.info("We r here" ); //console.log(`Transaction ID: ${transactionId} Status: ${status} Block number: ${blockNumber}`); }); ` So, would you please kindly provide sample flow to use the listener ? Sorry for inconveniences. Best Regards,

Buislu1111 (Fri, 24 May 2019 15:51:51 GMT):
Has joined the channel.

bestbeforetoday (Fri, 24 May 2019 16:59:07 GMT):
Contract.submitTransaction() already waits for successful commit events to be received from peers. Look at https://fabric-sdk-node.github.io/release-1.4/tutorial-transaction-commit-events.html for more details

pankajcheema (Mon, 27 May 2019 07:11:06 GMT):
hi I am getting sometime both in query response `Result` and `error both` ```{ "data": "{\"first_name\":\"pankaj\",\"last_name\":\"cheema\",\"roll\":24}", "httpstatus": 200, "message": "Transaction has been evaluated", "error": { "message": "Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://34.73.96.21:7051", "stack": "Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://34.73.96.21:7051\n at Network._initializeInternalChannel (/home/ubuntu/hlf-1.4-node-js-sdk/node_modules/fabric-network/lib/network.js:86:12)\n at \n at process._tickCallback (internal/process/next_tick.js:189:7)" } }```

pankajcheema (Mon, 27 May 2019 07:12:02 GMT):
As you can see that I am to get the query result but error is along with that . I am not getting the issue here . any suggestion ?

pankajcheema (Mon, 27 May 2019 07:12:28 GMT):
@balakrishna.devasani

pankajcheema (Mon, 27 May 2019 08:41:38 GMT):
This is only happening when I am applying 500 Transaction within a seconds using jmeter

pankajcheema (Mon, 27 May 2019 08:41:38 GMT):
This is only happening when I am applying 500 Transaction within a second using jmeter

pankajcheema (Mon, 27 May 2019 08:42:07 GMT):
I think Something is wrong with sdk.

phantom.assasin (Mon, 27 May 2019 10:51:59 GMT):
While trying to get a list of all the channels a peer is part of, i am getting this error: No identity has been assigned to this client

phantom.assasin (Mon, 27 May 2019 10:52:41 GMT):
I am not sure how to assign the identity explicitly since in balance transfer example which i am following, they don't assign any identity as well

phantom.assasin (Mon, 27 May 2019 11:09:24 GMT):
Nevermind turns out i had to provide those in crypto-config.yaml

phantom.assasin (Mon, 27 May 2019 16:30:51 GMT):
any way to get the list of all the peers part of a particular organization?

phantom.assasin (Mon, 27 May 2019 16:32:14 GMT):
maybe try changing the url to grpc://34.73.96.21:7051

florianc (Tue, 28 May 2019 05:48:11 GMT):
With your connection profile.

phantom.assasin (Tue, 28 May 2019 06:53:49 GMT):
can u please explain a bit. Do u mean the crypto-config.yaml file where i define org and peers?

phantom.assasin (Tue, 28 May 2019 06:54:08 GMT):
Is there any sdk function i can call to get the list?

florianc (Tue, 28 May 2019 06:55:19 GMT):
Yes, the file that you use to define peers/orgs. I don't think you can get the list from the blockchain itself because that may be a security issue. I am not sure though. Just check the SDK documentation

phantom.assasin (Tue, 28 May 2019 07:14:05 GMT):
Yeah i can use client.getPeersForOrg

phantom.assasin (Tue, 28 May 2019 07:14:37 GMT):
Seems like as and when i add a new org or new peer, i need to keep updating connection profile

florianc (Tue, 28 May 2019 07:15:24 GMT):
Yes. Because Fabric is a private chain and you should know at any time with who you work in the chain.

phantom.assasin (Tue, 28 May 2019 07:18:30 GMT):
thanks for ur help

PyiTheinKyaw (Tue, 28 May 2019 09:12:10 GMT):

Clipboard - May 28, 2019 3:42 PM

PyiTheinKyaw (Tue, 28 May 2019 09:13:04 GMT):
Dear Team, Let me confrim some information which related with 'Node.js SDK'. While i try to make to use service discover service by ref "https://fabric-sdk-node.github.io/tutorial-discovery.html", I used 'await channel.initialize({discover:true, asLocalhost:true})' In document, it says ' asLocalhost' defualt value is false. But I face some issues that my implementation because discover service does not work. Then, I make some trace on SDK library, I found out default value was 'true'. (Library file path :=> node_modules/fabric-client/lib/Channel.js) Would you please kindly make me correct my understanding ? May be i was wrong! Sorry for inconveniences. Best Regards. PTK

PyiTheinKyaw (Tue, 28 May 2019 09:13:10 GMT):

Clipboard - May 28, 2019 3:43 PM

PyiTheinKyaw (Tue, 28 May 2019 09:13:20 GMT):

Clipboard - May 28, 2019 3:43 PM

davidkel (Tue, 28 May 2019 09:25:13 GMT):
@PyiTheinKyaw You are correct. The default prior to 1.4 was false, it was changed in 1.4 to be true

PyiTheinKyaw (Tue, 28 May 2019 09:32:42 GMT):
@davidkel so, team need to make document correct in https://fabric-sdk-node.github.io/release-1.4/tutorial-discovery.html

davidkel (Tue, 28 May 2019 09:46:33 GMT):
Yep, guess they do :-) would suggest you raise a jira

ahmad-raza (Tue, 28 May 2019 10:09:40 GMT):
fabricCaServices.generateCRl() returns long stirng (which may include revoke identities list) now what to do with that list? where it should be copied. i have read in docs that it must be copied to msp/crls folder. My question is which msp folder ? 2. is it required to create crl.pem file and paste into crls folder?

ahmad-raza (Tue, 28 May 2019 10:10:30 GMT):
Because by simply revoking identities are still useable

bh4rtp (Tue, 28 May 2019 13:23:13 GMT):
why does `channel.queryInstantiatedChaincodes(peer, true)` return empty result? ```2019-05-28T13:06:30.054Z - debug: [Channel.js]: sendTransactionProposal(static) - start 2019-05-28T13:06:30.055Z - debug: [client-utils.js]: buildSignedProposal - start 2019-05-28T13:06:30.056Z - debug: [client-utils.js]: buildSignedProposal - adding function arg:getchaincodes 2019-05-28T13:06:30.056Z - debug: [client-utils.js]: buildSignedProposal - not adding the argument :: argbytes 2019-05-28T13:06:30.057Z - debug: [client-utils.js]: buildSignedProposal - chaincode ID:lscc 2019-05-28T13:06:30.058Z - debug: [Client.js]: getClientCertHash - start 2019-05-28T13:06:30.059Z - debug: [Client.js]: getClientCertHash - no tls client cert 2019-05-28T13:06:30.060Z - debug: [client-utils.js]: buildChannelHeader - type 3 channel_id auditch tx_id NaN epoch null chaincode_id lscc 2019-05-28T13:06:30.061Z - debug: [client-utils.js]: buildProposal - not adding a transientMap [2019-05-28 21:06:30.066] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 0 } 2019-05-28T13:06:30.069Z - debug: [Remote.js]: getUrl::grpcs://localhost:17051 2019-05-28T13:06:30.070Z - debug: [Peer.js]: sendProposal - Start ----peer0.regulatororg.energyx.com grpcs://localhost:17051 2019-05-28T13:06:30.092Z - debug: [Remote.js]: Successfully connected to remote gRPC server 2019-05-28T13:06:30.126Z - debug: [Peer.js]: sendProposal - Received proposal response from peer "grpcs://localhost:17051": status - 200 2019-05-28T13:06:30.126Z - debug: [client-utils.js]: sendPeersProposal - Promise is fulfilled: [object Object] 2019-05-28T13:06:30.126Z - debug: [Channel.js]: queryInstantiatedChaincodes - got response 2019-05-28T13:06:30.126Z - debug: [Channel.js]: queryInstantiatedChaincodes - response status :: 200 2019-05-28T13:06:30.126Z - debug: [Channel.js]: queryInstantiatedChaincodes - ProcessedTransaction.chaincodeInfo.length :: 0 [2019-05-28 21:06:30.126] [DEBUG] Query - chaincode response : {"chaincodes":[]}```

florianc (Tue, 28 May 2019 14:14:48 GMT):
Hello. I have a question regarding chaincode event listener and eventHubs (fabric-client 1.4.0). If I use `getChannelEventHubsForOrg`, it returns me an eventHub foreach peer known by the channel object right? If so, if I register a chaincode event using `eventHubs.forEach((eventHub) => { register cc event here ...` , in the case I have, say two peers (so two event hubs), will I execute the callback function twice? (once per peer/eventHub)

florianc (Tue, 28 May 2019 14:42:00 GMT):
Another question regarding this: Can we have only one chaincode listener using the startBlock option per event hub? Is there only one event hub per peer?

mahoney1 (Tue, 28 May 2019 15:21:34 GMT):
it would seem on the peers, orderers as well as MSPs in the appropriate channel configuration blocks channel as discussed here in this thread -> https://lists.hyperledger.org/g/fabric/topic/17549671

mahoney1 (Tue, 28 May 2019 15:24:14 GMT):
@bh4rtp are you querying the resolvable peer using an admin identity? I believe that's what the 'true' indicates per the docs https://fabric-sdk-node.github.io/Channel.html#queryInstantiatedChaincodes

bretharrison (Tue, 28 May 2019 15:46:58 GMT):
Yes only one listener is allowed to use the startBlock and then only one listener is allowed to register with a ChannelEventHub. You may have as many ChannelEventHub instances as you like, each one will have it's own connection to the Peer's Eventing Service.

bretharrison (Tue, 28 May 2019 15:46:58 GMT):
Yes only one listener is allowed to use the startBlock and then only one listener is allowed to register with a ChannelEventHub instance. You may have as many ChannelEventHub instances as you like, each one will have it's own connection to the Peer's Eventing Service.

bretharrison (Tue, 28 May 2019 15:56:35 GMT):
The channel will return ChannelEventHub instances that are for Peers that have the same MSPID as the NodeSDK user (the user assigned to the `Client` instance). These peers will be in the same organization as the application's user identity. Each listener's callback will be notified of the event, so if two event listeners on two different ChannelEventHubs, then two callbacks will happen. So if you are registering for the event from all the peers in your organization then you must want to know when all of them have been seen the event (in other words, the block with the information you are looking for has been written to the ledger of all peers in your organization).

bretharrison (Tue, 28 May 2019 16:05:11 GMT):
Yes the `true` does mean use the admin identity if available, You may assign an admin identity to the client instance for cases where the user does not have admin authority. The application will have to manage when and how the separate admin identity is used. If there is no admin assigned with the `client.setAdminSigningIdentity()` then the user assigned with `client.setUserContext()` will be used.

bretharrison (Tue, 28 May 2019 16:23:30 GMT):
I agree that we should change the Doc or change the default, I would prefer to change the default to false, however this does make it harder for first time users using a docker-compose environment with the Node Application running outside of the virtual environment. I have opened JIRA https://jira.hyperledger.org/browse/FABN-1256

bretharrison (Tue, 28 May 2019 16:29:34 GMT):
Yes the validation of the label has changed and a fix has gone in https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/31551

PyiTheinKyaw (Wed, 29 May 2019 02:19:48 GMT):
@bretharrison thanks, I have no experiences with Jira. :D

Dhiraj1990 (Wed, 29 May 2019 05:39:51 GMT):
How can i view the endoresement policy of a channel on cli or check if node is endorser or not ?

florianc (Wed, 29 May 2019 05:58:22 GMT):
Alright, thank you!

florianc (Wed, 29 May 2019 07:44:29 GMT):
Is there a way to get all the current event listeners of an event hub (fabric-client) directly from the event hub object itself? It would really ease the event listeners management (like if I want stop the event hub, I can unregister all listeners just by getting them form the hub itself, instead of having to manage them "manually")

florianc (Wed, 29 May 2019 07:44:29 GMT):
Is there a way to get all the current event listeners of an event hub (fabric-client) directly from the event hub object itself? It would really ease the event listeners management (like if I want stop the event hub, I can unregister all listeners just by getting them form the hub itself, instead of having to manage them "manually", and then disconnect the hub)

mahoney1 (Wed, 29 May 2019 10:57:55 GMT):
there is an option (yet to be documented it would seem in 1.4.x, I don't have any more info than here FYI) to use something like `network.listeners.forEach(listener => listener.unregister())` to unregister the listeners, after connecting to the gateway as shown in the Usage examples in the docs -> https://fabric-sdk-node.github.io/release-1.4/tutorial-listening-to-events.html

mahoney1 (Wed, 29 May 2019 10:57:55 GMT):
there is an option (yet to be documented it would seem in 1.4.x, I don't have any more info than here FYI) to use something like `network.listeners.forEach(listener => listener.unregister())` to unregister the listeners, after connecting to the network via the gateway as shown in the Usage examples in the docs -> https://fabric-sdk-node.github.io/release-1.4/tutorial-listening-to-events.html

mahoney1 (Wed, 29 May 2019 10:57:55 GMT):
there is an option (yet to be documented it would seem in 1.4.x, I don't have any more info than here FYI) to use something like ```network.listeners.forEach(listener => listener.unregister())``` to unregister the listeners, after connecting to the network via the gateway as shown in the Usage examples in the docs -> https://fabric-sdk-node.github.io/release-1.4/tutorial-listening-to-events.html

florianc (Wed, 29 May 2019 11:14:43 GMT):
Thank you. Too bad it's for the network. I can't use it now because it does not provide as many functionalities as client does.

RodrigoMedeiros (Wed, 29 May 2019 17:17:14 GMT):
Has joined the channel.

ygnr (Thu, 30 May 2019 08:49:41 GMT):
error

donjon (Thu, 30 May 2019 09:41:20 GMT):
Has joined the channel.

mahoney1 (Thu, 30 May 2019 15:52:06 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:58:45 GMT):
Has joined the channel.

bh4rtp (Fri, 31 May 2019 02:23:11 GMT):
i used `client.setAdminSigningIdentity(orgAdminPrivateKey, orgSigningcert, orgMspid)` to assign an admin identity. it did not work. need i assign orderer admin identity?

varunagarwal (Fri, 31 May 2019 08:02:38 GMT):
How do I install a nodejs chaincode using the `peer install` command inside a docker container? The documentation says for `go` we use `$GOPATH` but for node we provide the absolute path. The chaincode is outside in my root directory of my repo.

varunagarwal (Sat, 01 Jun 2019 12:34:44 GMT):
Figured it out, I modified the `Dockerfile` located in every folder for the peers and added scripts to transfer files from root folder into docker container volume

gauravgiri (Mon, 03 Jun 2019 09:11:02 GMT):
Hi All, Transient Map in Node.js Chaincode stub using stub.getTransient() is : Map While that in fabric-sdk-node, is an interface TransientMap as : export interface TransientMap { [key: string]: Buffer; } The 2 types are different, hence we retrieve the map key in chaincode we get is a ByteBuffer instance: ByteBuffer {buffer: < ... >, offset: 1694, markedOffset: -1, limit: 1710, littleEndian: true, noAssert: false } How to handle this, and retrieve the transientMap supplied from fabric-sdk-node in the Node.js chaincode?

gauravgiri (Mon, 03 Jun 2019 09:11:02 GMT):
Hi All, Transient Map in Node.js Chaincode stub using stub.getTransient() is : Map While that in fabric-sdk-node, is an interface TransientMap as : export interface TransientMap { [key: string]: Buffer; } The 2 types are different, hence we retrieve the map key in chaincode we get is a ByteBuffer instance: ByteBuffer {buffer: < ... >, offset: 1694, markedOffset: -1, limit: 1710, littleEndian: true, noAssert: false } How to handle this, and retrieve the Buffer for key supplied from fabric-sdk-node in the Node.js chaincode?

phantom.assasin (Mon, 03 Jun 2019 11:42:31 GMT):
I am able to create a channel. But the same channel is not returned when i am trying via client.getChannel function.

florianc (Mon, 03 Jun 2019 11:44:10 GMT):
Did you join your peer to the channel?

phantom.assasin (Mon, 03 Jun 2019 11:46:04 GMT):
yes

phantom.assasin (Mon, 03 Jun 2019 11:46:14 GMT):
But i want to make sure that channel exisits first

phantom.assasin (Mon, 03 Jun 2019 11:46:31 GMT):
Sorry no. I did not join any peer to the channel

phantom.assasin (Mon, 03 Jun 2019 11:46:44 GMT):
Before joining i want to make sure, channel exists

florianc (Mon, 03 Jun 2019 11:51:13 GMT):
I am not 100% sure, but a peer cannot tell you about a channel it does not belongs to (because the peer does not know the channel)

florianc (Mon, 03 Jun 2019 11:51:13 GMT):
I am not 100% sure, but a peer cannot tell you about a channel it does not belong to (because the peer does not know the channel)

phantom.assasin (Mon, 03 Jun 2019 11:54:56 GMT):
I am not trying to find via peer. I am calling the fabric-client's function getChannel

florianc (Mon, 03 Jun 2019 11:57:37 GMT):
Get a Channel instance from the client instance. This is a memory-only lookup. If the loaded common connection profile has a channel by the 'name', a new channel instance will be created and populated with Orderer objects and Peer objects as defined in the common connection profile.

florianc (Mon, 03 Jun 2019 11:57:59 GMT):
I think it is because it is not in your connection profile

phantom.assasin (Mon, 03 Jun 2019 11:58:44 GMT):
yeah. since it's not there in connection profile

phantom.assasin (Mon, 03 Jun 2019 11:59:25 GMT):
Will I have to add it each time I create a new channel? Since the channel got created can't I verify somehow from orderer

florianc (Mon, 03 Jun 2019 12:02:21 GMT):
Well, I have never faced such a scenario. But, IMO, channels are not created every days. You create it once and you go with it. Then you update your connection profile once. For the orderer, I though from the doc that you should not use the orderer to interact with the chain, only the "classic" peers, no?

phantom.assasin (Mon, 03 Jun 2019 12:11:45 GMT):
I am new with this so, i am not sure what the best practices and such are

phantom.assasin (Mon, 03 Jun 2019 12:12:23 GMT):
But yeah i think i can go with updating connection profile route once a new channel has been created successfully

florianc (Mon, 03 Jun 2019 12:14:02 GMT):
You may be able to automate this. Seems there are some function that allows you to get some info from the client like https://fabric-sdk-node.github.io/release-1.4/Client.html#getClientConfig__anchor

florianc (Mon, 03 Jun 2019 12:14:35 GMT):
Oh, no, nevermind, it comes from the connection profile

phantom.assasin (Mon, 03 Jun 2019 12:21:54 GMT):
Yeah

phantom.assasin (Mon, 03 Jun 2019 12:22:32 GMT):
Btw Can we remove a channel?

florianc (Mon, 03 Jun 2019 12:28:50 GMT):
Don't know, never tried. But from my understanding, to "delete a channel", you can juste remove all the peers from it.

phantom.assasin (Mon, 03 Jun 2019 12:48:51 GMT):
Is there any function to remove peers from channel? Just now i tried, channel.removePeer and it gave me 204 but doesn't work

phantom.assasin (Mon, 03 Jun 2019 12:49:07 GMT):
doesn't work as in peer did not get removed.

varunagarwal (Mon, 03 Jun 2019 14:34:25 GMT):
@phantom.assasin I am getting same issue but when I instantiate chaincode on a channel. It shows the channel exists and chaincode installed.

mastersingh24 (Mon, 03 Jun 2019 23:18:59 GMT):
a couple of things: 1) There is no way to get a list of channels from the orderer ... you have to know that a channel exists and attempt to access it 2) If you want to remove a channel from a peer (since a channel really does not track which peers have joined), the only way to do this currently is to delete the ledger for the channel from the peer's filesystem

phantom.assasin (Tue, 04 Jun 2019 05:27:49 GMT):
Which issue? I have had multiple issues :cold_sweat:

florianc (Tue, 04 Jun 2019 05:54:43 GMT):
@mastersingh24 Won't the peer sync again with other peers of the channel to get the ledger back?

phantom.assasin (Tue, 04 Jun 2019 06:17:39 GMT):
I don't think so since, peer wont sync channel specific data. If that were the case then concept of channel or private data won't make sense. Please correct me if i am wrong

florianc (Tue, 04 Jun 2019 06:18:21 GMT):
How would a peer sync its ledger when it joins the channel then?

florianc (Tue, 04 Jun 2019 06:18:40 GMT):
(I don't have the correct answer, that's why I'm asking ^^)

Emiel 1 (Tue, 04 Jun 2019 08:29:23 GMT):
Has joined the channel.

Emiel 1 (Tue, 04 Jun 2019 08:30:07 GMT):
Hi, I'm currently developing chaincode using the NodeJS sdk Smart contract API Im running into an issue though, i need the public key from the transaction submitter But i cannot seem to find it, does anybody know if this is possible with the NodeJS sdk? Any help is sincerely appreciated 🙂

phantom.assasin (Tue, 04 Jun 2019 08:38:43 GMT):
you might wanna look into cryptosuite.

Emiel 1 (Tue, 04 Jun 2019 08:42:43 GMT):
Is that available to be used in chaincode?

florianc (Tue, 04 Jun 2019 08:58:07 GMT):
No. You should specify nodejs chaincode interface, or stub, not sdk node. The sdk node is a nodejs sdk to interact with HLF. Also you should go ask in #fabric-chaincode-dev

florianc (Tue, 04 Jun 2019 08:58:07 GMT):
No. You should specify nodejs chaincode interface, or stub, not nodejs sdk. The nodejs sdk is a nodejs sdk to interact with HLF. Also you should go ask in #fabric-chaincode-dev

Emiel 1 (Tue, 04 Jun 2019 09:06:06 GMT):
ah i see, my bad

Emiel 1 (Tue, 04 Jun 2019 09:06:12 GMT):
thanks for the advice!

alokkv (Tue, 04 Jun 2019 09:36:05 GMT):
hi friends, i am using fabric SDK node to install node chaincode and was able to complete transactions successful i cant install go chaincode using fabric SDK .can anyone please help.is there any difference in installing go chaincode.

varunagarwal (Tue, 04 Jun 2019 11:00:47 GMT):
:( Maybe we should list out our issues and see how many are common.... for you I suggest use `docker logs orderer0` to see if any error popped while making the channel. Or try installing a chaincode on the channel and see if that cases an error.

varunagarwal (Tue, 04 Jun 2019 11:20:43 GMT):
When sending the `installChaincode` function, in node you need to add the absolute path, whereas for go lang chaincode, you need to use the relative path.

alokkv (Tue, 04 Jun 2019 12:41:13 GMT):
can you suggest and example

alokkv (Tue, 04 Jun 2019 12:41:13 GMT):
can you suggest an example

PonmudiK (Tue, 04 Jun 2019 18:19:10 GMT):
Has joined the channel.

varunagarwal (Tue, 04 Jun 2019 19:21:59 GMT):
https://fabric-sdk-node.github.io/release-1.4/tutorial-metadata-chaincode.html See how they define the chaincode path here using `path.resolve()` . This should give you an idea

SaphiraBjartskular (Tue, 04 Jun 2019 21:16:24 GMT):
how do you add anchor peers to a channel using node?

SaphiraBjartskular (Tue, 04 Jun 2019 21:16:24 GMT):
Hi everyone, how do you add anchor peers to a channel using node?

prmdmshra (Tue, 04 Jun 2019 21:22:48 GMT):
Hi Team I have updated the balance transfer sample for multiple organizations The enrollment works for all the organisations but the test.sh fails with the following error on attempting to create channel: [2019-06-05 02:50:01.635] [ERROR] Create-Channel - Error: No identity has been assigned to this client at Client._getSigningIdentity (../node_modules/fabric-client/lib/Client.js:1290:11) at Client.signChannelConfig (../node_modules/fabric-client/lib/Client.js:698:23) at Object.createChannel

SaphiraBjartskular (Tue, 04 Jun 2019 22:23:04 GMT):
https://stackoverflow.com/questions/56452066/how-to-add-anchor-peers-on-channel-using-node-sdk-hyperledger-fabric

SaphiraBjartskular (Tue, 04 Jun 2019 22:23:23 GMT):
anyone know what to answer this one ^ ?

adityanalge (Tue, 04 Jun 2019 22:56:35 GMT):
Is there a way to get TLS Cert from CA Server? A get cainfo call to the CA Server only returns the CA-CERT and not the TLS-CERT

krabradosty (Wed, 05 Jun 2019 19:16:31 GMT):
Hello. Is chaincode packaging (lifecycle 2.0) already implemented in nodejs SDK? Can't find it in documentation.

krabradosty (Wed, 05 Jun 2019 19:21:46 GMT):
You have to build and send to orderer so called "update channel configuration" transaction. You can generate update transaction using either configtxgen tool, or programmatically using SDK and configtxlator (it can be run as http server). To learn more see examples: https://github.com/hyperledger/fabric-sdk-node/tree/release-1.4/test/integration

florianc (Thu, 06 Jun 2019 07:03:31 GMT):
Hi. Using the node SDK, sending a "high" (4 per seconds eveyr second) amount of requests (contract.evaluateTransaction) often returns `Error: No identity has been assigned to this client`. I would like to know if other persons have encountered this on their own fabric (I am using IBM Blockchain Platform). No logs related to this could be found on the peer except this: `Error reading from IPADDRESS: rpc error: code = Canceled desc = context canceled`

davidkel (Thu, 06 Jun 2019 07:25:52 GMT):
The identity is associated with the client at the time you perform a gateway.connect(). Can you provide an example of your code showing what you are doing ? Just to check that you don't do something like connect/evaluate/disconnect ?

florianc (Thu, 06 Jun 2019 07:27:28 GMT):
Sure. The code is here: https://github.com/cazfletch/node-red-contrib-fabric/blob/master/nodes/fabric.js

davidkel (Thu, 06 Jun 2019 07:34:46 GMT):
Not easy to determine the execution sequence from that. Could you get a trace of the problem happening ? To get log output you can ``` export HFC_LOGGING='{"debug":"console","info":"console"}' ```

davidkel (Thu, 06 Jun 2019 07:34:46 GMT):
Not easy to determine the execution sequence from that. Could you get a trace of the problem happening ? To get log output you can ``` export HFC_LOGGING='{"debug":"console"}' ```

florianc (Thu, 06 Jun 2019 07:47:21 GMT):
Here it is: https://gist.github.com/floriancastelain/1da7f81f5d7234fe287fc66eb4362f4b I don't really know what is a relevent information or what is not. As the output is quite big, I cut it a bit. Let me know if this is not enough.

davidkel (Thu, 06 Jun 2019 08:04:18 GMT):
Thanks, hmm looks like the logging in the fabric-network module is rather lacking here so it's difficult to see why this might be happening. How does this implementation work in terms of connection/disconnection of gateways ? is the caller using a single gateway or are multiple gateways being created for each request ?

davidkel (Thu, 06 Jun 2019 08:38:54 GMT):
Ok, so here is one possibility that would cause this problem. There is a single gateway which is constantly having connect called on it, even if it's being used to evaluate a transaction at the time. If that's the case then this isn't the correct way to use a gateway.

florianc (Thu, 06 Jun 2019 08:57:40 GMT):
Sorry. Was in a meeting. With this flow yes a gateway is created every time. So yes it does not seem to be the correct way. I guess the best practice is to have only one gateway that connects only once and used it for all actions?

florianc (Thu, 06 Jun 2019 09:17:26 GMT):
Well, it indeed works better without reconnecting the gateway everytime! I currently am using a boolean do check if gateway is connected because I have not seen anything in the documentation allowing to check properly if this is the case. Is there really no way to ask the gateway if it's connected or not?

davidkel (Thu, 06 Jun 2019 09:30:14 GMT):
I would suggest raising a Jira about having a check to see if a gateway is already connected. I think it would also be worth having a check to ensure connect cannot be called more than once as well.

florianc (Thu, 06 Jun 2019 09:30:41 GMT):
True. Thank you for your help!

florianc (Thu, 06 Jun 2019 09:43:01 GMT):
https://jira.hyperledger.org/browse/FABN-1264

davidkel (Thu, 06 Jun 2019 09:48:11 GMT):
:thumbsup: Thanks @florianc

florianc (Thu, 06 Jun 2019 09:48:24 GMT):
My pleasure.

phantom.assasin (Thu, 06 Jun 2019 10:08:15 GMT):
I think ur qustion is alredy answered on stackoverflow

phantom.assasin (Thu, 06 Jun 2019 10:11:27 GMT):
You will get this error when client which you created does not have admin signing identity. You can set the admin identity in two following ways: 1st method: client.setAdminSigningIdentity(privateKey, certificate, orgMspId); 2nd method: In your connection profile for each of the profile include, mspId, adminprivatekey and singedCert. e.g. mspid: Org2MSP adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sksignedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem

phantom.assasin (Thu, 06 Jun 2019 10:11:27 GMT):
You will get this error when client which you created does not have admin signing identity. You can set the admin identity in two following ways: 1st method: `client.setAdminSigningIdentity(privateKey, certificate, orgMspId);` 2nd method: In your connection profile for each of the orgs include, mspId, adminprivatekey and singedCert. e.g. ```mspid: Org2MSP adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sk signedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem```

phantom.assasin (Thu, 06 Jun 2019 10:11:27 GMT):
You will get this error when client which you created does not have admin signing identity. You can set the admin identity in two following ways: 1st method: `client.setAdminSigningIdentity(privateKey, certificate, orgMspId);` 2nd method: In your connection profile for each of the orgs include, mspId, adminprivatekey and singedCert. e.g. `mspid: Org2MSP adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sksignedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem`

phantom.assasin (Thu, 06 Jun 2019 10:11:27 GMT):
You will get this error when client which you created does not have admin signing identity. You can set the admin identity in two following ways: 1st method: `client.setAdminSigningIdentity(privateKey, certificate, orgMspId);` 2nd method: In your connection profile for each of the orgs include, mspId, adminprivatekey and singedCert. e.g. ```mspid: Org2MSP adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sksignedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem```

phantom.assasin (Thu, 06 Jun 2019 10:11:27 GMT):
You will get this error when client which you created does not have admin signing identity. You can set the admin identity in two following ways: 1st method: ```client.setAdminSigningIdentity(privateKey, certificate, orgMspId);``` 2nd method: In your connection profile for each of the orgs include, mspId, adminprivatekey and singedCert. e.g. ```mspid: Org2MSP adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sksignedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem```

phantom.assasin (Thu, 06 Jun 2019 10:11:27 GMT):
You will get this error when client which you created does not have admin signing identity. You can set the admin identity in two following ways: 1st method: ```client.setAdminSigningIdentity(privateKey, certificate, orgMspId);``` 2nd method: In your connection profile for each of the orgs include, mspId, adminprivatekey and singedCert. e.g. ```mspid: Org2MSP adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sksignedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem```

phantom.assasin (Thu, 06 Jun 2019 10:11:27 GMT):
You will get this error when client which you created does not have admin signing identity. You can set the admin identity in two following ways: 1st method: `client.setAdminSigningIdentity(privateKey, certificate, orgMspId);` 2nd method: In your connection profile for each of the orgs include, mspId, adminprivatekey and singedCert. e.g. ```mspid: Org2MSP adminPrivateKey: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sksignedCert: path: crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem```

florianc (Thu, 06 Jun 2019 12:24:25 GMT):
Regarding the discussion above, I have a question on how to use correctly the gateway when two clients need to interact with the blockchain. Currently, I have only one gateway. It uses a connection profile that is similar for both clients.

florianc (Thu, 06 Jun 2019 12:27:14 GMT):
@davidkel Sorry for pinging you like that, but I would appreciate that you confirm something. The commentary you posted on the issue (https://jira.hyperledger.org/browse/FABN-1264?focusedCommentId=60730&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-60730) says gateway and identity have 1-1 relationship. By "identity", do you mean the connection profile or a client itself?

davidkel (Thu, 06 Jun 2019 12:31:19 GMT):
An identity is associated with a gateway. That association occurs on connect because you provide a wallet and an alias for the identity in the wallet to be used. Once associated you cannot change that identity being used by that gateway.

florianc (Thu, 06 Jun 2019 12:35:19 GMT):
So lets say I have two identities, one called admin and one called test. If they want to use the same gateway, the gateway should disconnect and reconnect with the new wallet (loaded from file system) and the new identity name, correct? (It is perharps not the best practice, but I try to understand the mechanism well before changing my code.)

davidkel (Thu, 06 Jun 2019 12:45:44 GMT):
They can't use the same gateway. You should create 2 gateways. ie a unique gateway for each unique user. I doubt there is much advantage to disconnecting and connecting a single gateway vs creating 2 gateways, not sure if that scenario is even tested. Plus the correct pattern for a multi-user application would be to cache a users gateway and then disconnect it based on a stale pattern

davidkel (Thu, 06 Jun 2019 12:45:44 GMT):
They can't use the same gateway. You should create 2 gateways. ie a unique gateway for each unique user. I doubt there is much advantage to disconnecting and connecting a single gateway vs creating 2 gateways, not sure if that scenario is even tested. Plus the correct pattern for a multi-user application would be to cache a users gateway and then disconnect it based on a stale pattern, create a new one again if they then use the application again.

florianc (Thu, 06 Jun 2019 12:57:31 GMT):
Ok. As I expected. Thank you for your time.

SaphiraBjartskular (Thu, 06 Jun 2019 15:11:54 GMT):
thanks! @krabradosty @phantom.assasin

Javi (Fri, 07 Jun 2019 07:55:51 GMT):
Has joined the channel.

varunagarwal (Fri, 07 Jun 2019 10:19:17 GMT):
So I have used `client.createUser({ }) and passed in the details needed (username, mspid and cryptocontent). Now I am getting the info back using `client.getUserContext(username)`. How do I get the privateKey back from this. The keystore is only showing me the public certificate.

varunagarwal (Fri, 07 Jun 2019 10:19:33 GMT):
I am using `fabric-client` for this.

alokkv (Fri, 07 Jun 2019 12:49:10 GMT):
hi friends, can any one help me how to upgrade chaincode using fabric sdk, if possible can anyone share postman request sample.install and instantiate works fine.please help

mahoney1 (Fri, 07 Jun 2019 14:58:45 GMT):
there's an example in this S/O -> https://stackoverflow.com/questions/51399465/cannot-invoke-chaincode-with-non-admin-identity-user-context-hyperledger-fab under 'Registering user' code section (registering, enrolling (though you may already have pre-existing crypto artifacts) using fabric-ca-client and then using createUser from fabric-client to build the Useropts object as described in the link here https://fabric-sdk-node.github.io/global.html#UserOpts

KartikChauhan (Fri, 07 Jun 2019 15:53:06 GMT):
Has joined the channel.

KartikChauhan (Fri, 07 Jun 2019 15:53:07 GMT):
I'm trying out the wallet classes introduced in Hyperledger Fabric v1.4. All the wallet classes work fine except for `HSMWalletMixin`. I couldn't understand the working of it. There's not much info available about it in the official documentation or in sdk docs. It says in the docs > currently you should use the FileSystemWallet class in combination with the HSMWalletMixin class to manage HSM wallets. There's no working example from where I could take any help. I've no idea how to use these two classes together. Plus, isn't there any option of configuring `HSMWalletMixin` class with AWS CloudHSM currently?

KartikChauhan (Fri, 07 Jun 2019 15:53:07 GMT):
I'm trying out the wallet classes introduced in Hyperledger Fabric v1.4. All the wallet classes work fine except for `HSMWalletMixin`. I couldn't understand the working of it. There's not much info available about it in the official documentation or in sdk docs. It says in the docs > currently you should use the FileSystemWallet class in combination with the HSMWalletMixin class to manage HSM wallets. There's no working example from where I could take any help. I've no idea how to use these two classes together. Plus, isn't there any option of configuring `HSMWalletMixin` class with AWS CloudHSM currently?

davidkel (Fri, 07 Jun 2019 16:29:05 GMT):
HSM support uses PKCS11 interfaces. In order to make it work you would need to construct an HSMWalletMixin with 3 Parameters, a reference to the pkcs11 library specific to the HSM you are going to use (you would obtain that from your HSM provider), the configured slot number and the pin. You then construct an appropriate wallet passing in this mixin to it. Private keys are managed by the HSM whereas public certs are managed by the wallet implementation. For example the code might look like ``` let hsmWalletMixin = new HSMWalletMixin('/usr/local/lib/softhsm/libsofthsm2.so', '0', '98765432'); hsmwallet = new FileSystemWallet('./WALLETS/hsmwallet', hsmWalletMixin); ``` You would have to configure your client side PKCS11 implementation in order for it to communicate with your HSM provider. Note that HSM support in fabric-sdk-node has only been tested with softhsm and lunahsm. There is no guarantee that it will work with any HSM provider that supports PKCS11.

HLFPOC (Sat, 08 Jun 2019 11:12:20 GMT):
Can anyone assist in adding a new organization in an existing network using node sdk ?

nitishbhardwaj19 (Mon, 10 Jun 2019 01:03:14 GMT):
Has joined the channel.

TharinduSandaruwan1 (Mon, 10 Jun 2019 03:19:35 GMT):
Can some one help me with this problem? https://stackoverflow.com/questions/56520100/illegal-buffer-with-mango-query-in-hyperledger-fabric

nasht00 (Mon, 10 Jun 2019 08:12:26 GMT):
Hi, is anyone here familiar with block event listeners?

adityanalge (Mon, 10 Jun 2019 16:51:22 GMT):
would also like to learn block event listeners if someone can explain it in brief.

florianc (Tue, 11 Jun 2019 05:53:23 GMT):
With the nodeJS SDK, you connect to a peer or several peers. You can create an event hub, that will let you create a block/transaction/event listener. A block listener will return you the information of all blocks within a range of block. By default it is from 0 to latest (so it never stops, but you can specify, with the fabric-client, a start block and an end block). If you pass true to the connect function for the event hub, you will receive all the data inside the blocks (transactions, signatures, etc.)

florianc (Tue, 11 Jun 2019 05:53:53 GMT):
https://fabric-sdk-node.github.io/release-1.4/ChannelEventHub.html#registerBlockEvent__anchor

florianc (Tue, 11 Jun 2019 05:55:31 GMT):
Note that this is for fabric client. If you want to use fabric network, this may differ in the way it works and the way it does thing, but the documentation is not clear yet.

florianc (Tue, 11 Jun 2019 05:55:31 GMT):
Note that this is for fabric client. If you want to use fabric network, this may differ in the way it works and the way it does things, but the documentation is not clear yet.

nasht00 (Tue, 11 Jun 2019 06:39:31 GMT):
Note that the fabric-network version still has some bugs as far as 1.4.1 is concerned. I eventually went back to the fabric-client version.

nasht00 (Tue, 11 Jun 2019 06:41:37 GMT):
In any case I can’t explain the inner workings for you, but I can answer questions based on my ongoing experience implementing a listener.

florianc (Tue, 11 Jun 2019 07:04:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=Lx0ymA5H4p1KGTIFPw) Agreed. You can follow documentation updates here https://jira.hyperledger.org/browse/FABN-1203 Also this issue with endBlock and startBlock: https://jira.hyperledger.org/browse/FABN-1251

brockhager (Tue, 11 Jun 2019 14:26:18 GMT):
Has joined the channel.

nasht00 (Tue, 11 Jun 2019 14:37:17 GMT):
Adding my own while we're at it: https://jira.hyperledger.org/browse/FABN-1235

nasht00 (Tue, 11 Jun 2019 14:37:31 GMT):
https://jira.hyperledger.org/browse/FABN-1269

braduf (Tue, 11 Jun 2019 14:43:44 GMT):
Has joined the channel.

braduf (Tue, 11 Jun 2019 14:43:46 GMT):
Hi, I am implementing a handler for chaincode events and in the documentation there is an `as_array` option that you can pass when you register to an event. In the version 1.4.1 this option is removed. Is there another way to obtain all events as an array now? Thanks a lot.

braduf (Tue, 11 Jun 2019 14:43:46 GMT):
Hi, I am implementing a handler for chaincode events and in the documentation there is an `as_array` option that you can pass when you register to an event. In the version 1.4.1 this option is removed. Is there another way to obtain all events as an array now? And should I use 1.4.1 already or is it better to use the release-1.4? Thanks a lot.

Unni_1994 (Tue, 11 Jun 2019 15:00:18 GMT):
Hi All, I have a multiple orderer setup with kafka, But if I invoke a transaction , it is sending to the first one mentioned in the network-config file .Also if the same orderer goes down in the network , Transactions are getting failed . Any solutions for handling this issue

davidkel (Tue, 11 Jun 2019 15:06:04 GMT):
What version of the fabric-sdk-node are you using ?

braduf (Tue, 11 Jun 2019 15:08:57 GMT):
Hi all, Which version of the Node sdk is recommended for the moment release-1.4 or v1.4.1? I have noticed there are some differences between them.

Unni_1994 (Tue, 11 Jun 2019 15:11:14 GMT):
1.4

davidkel (Tue, 11 Jun 2019 15:15:24 GMT):
The node-sdk has a default plugin implementation called the BasicCommitHandler which should try the first orderer in the list and if it fails, try the next in the list. If that isn't working then I suggest you raise a jira and provide details such as your connection profile, error messages and trace output using ``` export HFC_LOGGING='{"debug":"console"}' ``` If you want a round robin type of implementation then you would need to implement your own commit handler plugin

Unni_1994 (Tue, 11 Jun 2019 15:18:34 GMT):
Thanks

Unni_1994 (Tue, 11 Jun 2019 15:19:18 GMT):
IS BasicCommitHandler implemented in the default sdk setup?

davidkel (Tue, 11 Jun 2019 15:19:35 GMT):
Yes it is

davidkel (Tue, 11 Jun 2019 15:20:05 GMT):
``` "commit-handler": "fabric-client/lib/impl/BasicCommitHandler.js" ```

Unni_1994 (Tue, 11 Jun 2019 15:20:50 GMT):
thanks, I will try with this

mahoney1 (Tue, 11 Jun 2019 15:22:48 GMT):
the current release is 1.4.1 https://github.com/hyperledger/fabric/releases/tag/v1.4.1, which would be the one to recommend being the latest. There's no major changes in the SDK, between those two releases. You can review the release notes using the appropriate tag.

mahoney1 (Tue, 11 Jun 2019 15:22:48 GMT):
the current release is 1.4.1 https://github.com/hyperledger/fabric/releases/tag/v1.4.1, which would be the one to recommend being the latest. The release notes using the appropriate tag.

mahoney1 (Tue, 11 Jun 2019 15:22:48 GMT):
the current release is 1.4.1 https://github.com/hyperledger/fabric/releases/tag/v1.4.1, which would be the one to recommend being the latest. You can review the release notes using the appropriate tag.

smithbk (Tue, 11 Jun 2019 18:58:43 GMT):
Has left the channel.

bestbeforetoday (Wed, 12 Jun 2019 09:36:39 GMT):
If you are using the _fabric_client_ API, make sure you have initialized the channel before invoking transactions. It certainly used to be the case that if you forgot the initialise then transactions would only be sent to the first orderer. If using _fabric-gateway_ you shouldn't need to worry about this.

varunagarwal (Wed, 12 Jun 2019 09:40:50 GMT):
Could someone pleae check thi question out -> https://stackoverflow.com/questions/56556868/identity-management-on-hyperledger-fabric

Unni_1994 (Wed, 12 Jun 2019 13:31:45 GMT):

Basic-commit-handler.js.png

Unni_1994 (Wed, 12 Jun 2019 13:32:36 GMT):
bring down the first orderer and tried to invoke a trasaction

bandreghetti (Wed, 12 Jun 2019 17:44:41 GMT):
Hey guys, can anyone help me with protobuf encoding using the SDK? I'm using the channel.getChannelConfigFromOrderer() method from Node.js SDK, which according to docs gives me a fabProtos.common.ConfigEnvelope. What I don't know is how do I translate a common.ConfigEnvelope to a common.Block structure so I can use it as bootstrap block in a new orderer node I tried this: ``` const configBlock = fabProtos.common.Block.create({ data: { data: [ { payload: { header: fabProtos.common.Header.create({ channelHeader: { channelId: channel.getName(), type: "2" } }), data: updatedBlock } } ] } }); ``` but it's not working, configBlock is empty

bandreghetti (Wed, 12 Jun 2019 17:44:41 GMT):
Hey guys, can anyone help me with protobuf encoding using the SDK? I'm using the channel.getChannelConfigFromOrderer() method from Node.js SDK, which according to docs gives me a fabProtos.common.ConfigEnvelope. What I don't know is how do I translate a common.ConfigEnvelope to a common.Block structure so I can use it as bootstrap block in a new orderer node I tried this: ``` const configBlock = fabProtos.common.Block.create({ data: { data: [ { payload: { header: fabProtos.common.Header.create({ channelHeader: { channelId: channel.getName(), type: "2" } }), data: updatedBlock } } ] } }); ``` but it's not working, configBlock is empty (`updatedBlock` is a `fabProtos.common.ConfigEnvelope` instance)

bandreghetti (Wed, 12 Jun 2019 17:44:41 GMT):
Hey guys, can anyone help me with protobuf encoding using the SDK? I'm using the channel.getChannelConfigFromOrderer() method from Node.js SDK, which according to docs gives me a fabProtos.common.ConfigEnvelope. What I don't know is how do I translate a common.ConfigEnvelope to a common.Block structure so I can use it as bootstrap block in a new orderer node I tried this: ``` const configBlock = fabProtos.common.Block.create({ data: { data: [ { payload: { header: fabProtos.common.Header.create({ channelHeader: { channelId: channel.getName(), type: "2" } }), data: updatedBlock } } ] } }); ``` but it's not working, configBlock is empty `updatedBlock` is a `fabProtos.common.ConfigEnvelope` instance

MatasV (Thu, 13 Jun 2019 09:10:01 GMT):
Good afternoon, I'm trying to understand some things about Fabric-sdk-node. I'm really confused understanding workflow between ledger, backend server (which makes endpoints with ledger data) and front-end application. The question which is bothering me: How can I interract with front-end side? Do I need to create end-points in nodejs backend server or should I interract somehow else. Please forgive my lack of knowledge.

MatasV (Thu, 13 Jun 2019 09:10:01 GMT):
Good afternoon, I'm trying to understand some things about Fabric-sdk-node. I'm really confused understanding workflow between ledger, backend server (which makes endpoints with ledger data) and front-end application. The question which is bothering me: How can I interract with front-end side? Do I need to create end-points in nodejs backend server or should I interract somehow else. Please forgive my lack of knowledge. Thank you in advance for your help :)

florianc (Thu, 13 Jun 2019 09:15:09 GMT):
Hello. Here is a basic solution I use: FRONT <-> BACK (SDK here) <-> PEERS Front is a classic web interface Back is a nodejs servers that servers endpoints for the front end to requests things. Basically, it is an intermediary for communication between front and peers. Peers: Peers of your blockchain For example: My front end sends some information to a specific endpoint on the backend. With these information, the backend builds a transaction and sends it to the peers. When the back end gets transaction commitment (or error) information, it sends it back to the front end.

luckforzhang (Thu, 13 Jun 2019 09:53:01 GMT):
#fabric-sdk-go

MatasV (Thu, 13 Jun 2019 11:40:12 GMT):
Thank you @florianc . All right, could you recommend some samples for backend server? I'm using balance-transfer from 'fabric-samples' , also I've configured and started fab cars which uses NodeSDK. Are those samples of NodeSDK usage is practical of making backend server?

florianc (Thu, 13 Jun 2019 11:41:58 GMT):
I can't really answer thant. My work is based on the documentation and on some videos from Horea Porutui (https://www.youtube.com/user/horeaporutiu).

MatasV (Thu, 13 Jun 2019 11:46:17 GMT):
Anyway, appreciate for your help

bretharrison (Thu, 13 Jun 2019 13:39:56 GMT):
This configEnvelope returned is for the specific channel, this is not the bootstrap bock needed by an orderer, which is the system channel

bretharrison (Thu, 13 Jun 2019 13:50:54 GMT):
`as_array` will be in `fabric-client` 1.4.2 and only for chaincode events. This allows all the chaincode events that are in a block to be given to listener callback at one time just in case there is an interruption of processing of the event, the callback will know which block was completed. Unlike transaction events which will only have one event to be processed, there could be many chaincode events that match how the listener's was setup.

bretharrison (Thu, 13 Jun 2019 14:31:24 GMT):
By design the NodeSDK does not need direct access to the private key, the private key is only needed when signing and that is done outside of the NodeSDK, for example when using an HSM (Hardware Security Module), the key is stored within the HSM and used within the HSM. The HSM is passed the bytes to sign and the signing results are returned. This is handled by the `CryptoSuite` implementation.

venzi (Thu, 13 Jun 2019 15:40:16 GMT):
The `channel` object in `channel.getChannelConfigFromOrderer()` was instantiated with `"sys-channel"` which is how we called our system channel.

varunagarwal (Thu, 13 Jun 2019 15:54:10 GMT):
Doesn't the SDK need access to the private key to sign the transaction when calling `client.invokeChaincode()`?

Charles99 (Thu, 13 Jun 2019 16:04:46 GMT):
Has joined the channel.

Charles99 (Thu, 13 Jun 2019 16:14:17 GMT):
Good morning everyone, I'm planning on building an application for a modified version of the first network example in fabric samples. Can someone link a good starting point?

Antimttr (Thu, 13 Jun 2019 16:18:25 GMT):
Balance transfer is the example i used

Antimttr (Thu, 13 Jun 2019 16:18:36 GMT):
its a pretty good example for a node.js based implementation

Antimttr (Thu, 13 Jun 2019 16:18:46 GMT):
even has a typescript version aswell

Antimttr (Thu, 13 Jun 2019 16:19:06 GMT):
I ended up using it as a model for my java based implementation

Charles99 (Thu, 13 Jun 2019 16:22:25 GMT):
Hi @Antimttr, are you talking about the balance transfer included in the fabric samples?

Charles99 (Thu, 13 Jun 2019 16:22:33 GMT):
Thanks, I'll look into it

Antimttr (Thu, 13 Jun 2019 16:24:17 GMT):
yes, that's the one

bretharrison (Thu, 13 Jun 2019 16:26:41 GMT):
try `channel.getGenesisBlock()`

bretharrison (Thu, 13 Jun 2019 16:29:45 GMT):
indirectly by asking the cryptosuite implementation assigned to the user's signing identity to do the actual signing and returning the bytes needed for the GRPC outbound request.

bretharrison (Thu, 13 Jun 2019 16:29:45 GMT):
indirectly by asking the cryptosuite implementation assigned to the user's signing identity to do the actual signing which returns the bytes needed for the GRPC outbound request.

bandreghetti (Thu, 13 Jun 2019 17:10:16 GMT):
We do not want the genesis block, we need the current config block

bretharrison (Thu, 13 Jun 2019 17:13:36 GMT):
You may want to modify the `getChannelConfigFromOrder` to just return the block

TharinduSandaruwan1 (Fri, 14 Jun 2019 04:51:28 GMT):
I have created a chaincode .In one function of this code, I have called another function of the same chaincode. This is how that code looks like. async nthUsersLands(stub, args) { if (args.length != 1) { throw new Error( "Incorrect number of arguments. Expecting NIC ex: 942990014V" ); } let nic = args[0]; let queryString = {}; queryString.selector = {}; queryString.selector.docType = "land"; queryString.selector.user = nic; let method = thisClass["getQueryResultForQueryString"]; let queryResults = await method( stub, JSON.stringify(queryString), thisClass ); // let queryResults = await methods.getQueryResultForQueryString(stub,JSON.stringify(queryString)) console.log(queryResults.toString()); return queryResults; } async getQueryResultForQueryString(stub, queryString, thisClass) { console.info("- getQueryResultForQueryString queryString:\n" + queryString); let resultsIterator = await stub.getQueryResult(queryString); let method = thisClass["getAllResults"]; let results = await method(resultsIterator, false); // let results = await methods.getAllResults(resultsIterator,false) return Buffer.from(JSON.stringify(results)); } async getAllResults(iterator, isHistory) { let allResults = []; while (true) { let res = await iterator.next(); if (res.value && res.value.value.toString()) { let jsonRes = {}; console.log(res.value.value.toString('utf8')); if (isHistory && isHistory === true) { jsonRes.TxId = res.value.tx_id; jsonRes.Timestamp = res.value.timestamp; jsonRes.IsDelete = res.value.is_delete.toString(); try { jsonRes.Value = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); jsonRes.Value = res.value.value.toString('utf8'); } } else { jsonRes.Key = res.value.key; try { jsonRes.Record = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); jsonRes.Record = res.value.value.toString('utf8'); } } allResults.push(jsonRes); } if (res.done) { console.log('end of data'); await iterator.close(); console.info(allResults); return allResults; } } } But when I invoke this getNthUsersLands leaves to me an error like this. TypeError: Cannot read property 'getQueryResultForQueryString' of undefined I tried a lot to find a solution to this problem in stack overflow but I was unable to find a solution. Can someone help me with this problem? Thank You!

TharinduSandaruwan1 (Fri, 14 Jun 2019 04:51:28 GMT):
I have created a chaincode .In one function of this code, I have called another function of the same chaincode. This is how that code looks like. ``` async nthUsersLands(stub, args) { if (args.length != 1) { throw new Error( "Incorrect number of arguments. Expecting NIC ex: 942990014V" ); } let nic = args[0]; let queryString = {}; queryString.selector = {}; queryString.selector.docType = "land"; queryString.selector.user = nic; ``` let method = thisClass["getQueryResultForQueryString"]; let queryResults = await method( stub, JSON.stringify(queryString), thisClass ); // let queryResults = await methods.getQueryResultForQueryString(stub,JSON.stringify(queryString)) console.log(queryResults.toString()); return queryResults; } async getQueryResultForQueryString(stub, queryString, thisClass) { console.info("- getQueryResultForQueryString queryString:\n" + queryString); let resultsIterator = await stub.getQueryResult(queryString); let method = thisClass["getAllResults"]; let results = await method(resultsIterator, false); // let results = await methods.getAllResults(resultsIterator,false) return Buffer.from(JSON.stringify(results)); } async getAllResults(iterator, isHistory) { let allResults = []; while (true) { let res = await iterator.next(); if (res.value && res.value.value.toString()) { let jsonRes = {}; console.log(res.value.value.toString('utf8')); if (isHistory && isHistory === true) { jsonRes.TxId = res.value.tx_id; jsonRes.Timestamp = res.value.timestamp; jsonRes.IsDelete = res.value.is_delete.toString(); try { jsonRes.Value = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); jsonRes.Value = res.value.value.toString('utf8'); } } else { jsonRes.Key = res.value.key; try { jsonRes.Record = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); jsonRes.Record = res.value.value.toString('utf8'); } } allResults.push(jsonRes); } if (res.done) { console.log('end of data'); await iterator.close(); console.info(allResults); return allResults; } } }``` But when I invoke this getNthUsersLands leaves to me an error like this. TypeError: Cannot read property 'getQueryResultForQueryString' of undefined I tried a lot to find a solution to this problem in stack overflow but I was unable to find a solution. Can someone help me with this problem? Thank You!

TharinduSandaruwan1 (Fri, 14 Jun 2019 04:51:28 GMT):
I have created a chaincode .In one function of this code, I have called another function of the same chaincode. This is how that code looks like. ``` async nthUsersLands(stub, args) { if (args.length != 1) { throw new Error( "Incorrect number of arguments. Expecting NIC ex: 942990014V" ); } let nic = args[0]; let queryString = {}; queryString.selector = {}; queryString.selector.docType = "land"; queryString.selector.user = nic; let method = thisClass["getQueryResultForQueryString"]; let queryResults = await method( stub, JSON.stringify(queryString), thisClass ); // let queryResults = await methods.getQueryResultForQueryString(stub,JSON.stringify(queryString)) console.log(queryResults.toString()); return queryResults; } async getQueryResultForQueryString(stub, queryString, thisClass) { console.info("- getQueryResultForQueryString queryString:\n" + queryString); let resultsIterator = await stub.getQueryResult(queryString); let method = thisClass["getAllResults"]; let results = await method(resultsIterator, false); // let results = await methods.getAllResults(resultsIterator,false) return Buffer.from(JSON.stringify(results)); } async getAllResults(iterator, isHistory) { let allResults = []; while (true) { let res = await iterator.next(); if (res.value && res.value.value.toString()) { let jsonRes = {}; console.log(res.value.value.toString('utf8')); if (isHistory && isHistory === true) { jsonRes.TxId = res.value.tx_id; jsonRes.Timestamp = res.value.timestamp; jsonRes.IsDelete = res.value.is_delete.toString(); try { jsonRes.Value = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); jsonRes.Value = res.value.value.toString('utf8'); } } else { jsonRes.Key = res.value.key; try { jsonRes.Record = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); jsonRes.Record = res.value.value.toString('utf8'); } } allResults.push(jsonRes); } if (res.done) { console.log('end of data'); await iterator.close(); console.info(allResults); return allResults; } } }``` But when I invoke this getNthUsersLands leaves to me an error like this. TypeError: Cannot read property 'getQueryResultForQueryString' of undefined I tried a lot to find a solution to this problem in stack overflow but I was unable to find a solution. Can someone help me with this problem? Thank You! ```

TharinduSandaruwan1 (Fri, 14 Jun 2019 04:51:28 GMT):
I have created a chaincode .In one function of this code, I have called another function of the same chaincode. This is how that code looks like. ``` async nthUsersLands(stub, args) { if (args.length != 1) { throw new Error( "Incorrect number of arguments. Expecting NIC ex: 942990014V" ); } let nic = args[0]; let queryString = {}; queryString.selector = {}; queryString.selector.docType = "land"; queryString.selector.user = nic; let method = thisClass["getQueryResultForQueryString"]; let queryResults = await method( stub, JSON.stringify(queryString), thisClass ); // let queryResults = await methods.getQueryResultForQueryString(stub,JSON.stringify(queryString)) console.log(queryResults.toString()); return queryResults; } async getQueryResultForQueryString(stub, queryString, thisClass) { console.info("- getQueryResultForQueryString queryString:\n" + queryString); let resultsIterator = await stub.getQueryResult(queryString); let method = thisClass["getAllResults"]; let results = await method(resultsIterator, false); // let results = await methods.getAllResults(resultsIterator,false) return Buffer.from(JSON.stringify(results)); } async getAllResults(iterator, isHistory) { let allResults = []; while (true) { let res = await iterator.next(); if (res.value && res.value.value.toString()) { let jsonRes = {}; console.log(res.value.value.toString('utf8')); if (isHistory && isHistory === true) { jsonRes.TxId = res.value.tx_id; jsonRes.Timestamp = res.value.timestamp; jsonRes.IsDelete = res.value.is_delete.toString(); try { jsonRes.Value = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); jsonRes.Value = res.value.value.toString('utf8'); } } else { jsonRes.Key = res.value.key; try { jsonRes.Record = JSON.parse(res.value.value.toString('utf8')); } catch (err) { console.log(err); jsonRes.Record = res.value.value.toString('utf8'); } } allResults.push(jsonRes); } if (res.done) { console.log('end of data'); await iterator.close(); console.info(allResults); return allResults; } } }``` But when I invoke this getNthUsersLands leaves to me an error like this. TypeError: Cannot read property 'getQueryResultForQueryString' of undefined I tried a lot to find a solution to this problem in stack overflow but I was unable to find a solution. Can someone help me with this problem? Thank You!

florianc (Fri, 14 Jun 2019 06:33:10 GMT):
Please format your code. also where is this "method" thing comming from?

TharinduSandaruwan1 (Fri, 14 Jun 2019 09:52:38 GMT):
I create this chaincode using marble chaincode from fabric samples

bestbeforetoday (Fri, 14 Jun 2019 10:26:58 GMT):
It looks like `thisClass` is undefined in the `nthUsersLands` function

mrudav.shukla (Fri, 14 Jun 2019 12:29:42 GMT):
Any references for nodejs chaincode unit testing using fabric-contract-api? I want to mock Context and Stub.

mrudav.shukla (Fri, 14 Jun 2019 14:02:46 GMT):
Worked it out. If any one is stuck on this, references: https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/838

ygnr (Mon, 17 Jun 2019 06:20:27 GMT):
Are there any examples for NodeJS SDK on key-level endorsement policies?

Moolkothari (Mon, 17 Jun 2019 09:14:01 GMT):
Has joined the channel.

jaswanth (Tue, 18 Jun 2019 07:59:54 GMT):
Hi all i tried *HSMWalletMixin* in node sdk. my code is ``` let hsmWalletMixin = new HSMWalletMixin('/usr/local/lib/softhsm/libsofthsm2.so', '0', '98765432'); let hsmwallet = new FileSystemWallet('./wallet/hsmwallet', hsmWalletMixin); ```

jaswanth (Tue, 18 Jun 2019 07:59:54 GMT):
Hi all i tried *HSMWalletMixin* in node sdk. my code is ``` let hsmWalletMixin = new HSMWalletMixin('/usr/local/lib/softhsm/libsofthsm2.so', '0', '98765432'); let hsmwallet = new FileSystemWallet('./wallet/hsmwallet', hsmWalletMixin); const identity = X509WalletMixin.createIdentity('Org1MSP', enrollment.certificate, enrollment.key.toBytes()); hsmwallet.import(user, identity); ```

jaswanth (Tue, 18 Jun 2019 07:59:54 GMT):
Hi all i tried *HSMWalletMixin* in node sdk. my code is ``` let hsmWalletMixin = new HSMWalletMixin('/usr/local/lib/softhsm/libsofthsm2.so', '0', '98765432'); let hsmwallet = new FileSystemWallet('./wallet/hsmwallet', hsmWalletMixin); const identity = X509WalletMixin.createIdentity('Org1MSP', enrollment.certificate, enrollment.key.toBytes()); hsmwallet.import(user, identity); ```

jaswanth (Tue, 18 Jun 2019 07:59:54 GMT):
Hi all i tried *HSMWalletMixin* in node sdk. my code is ``` let hsmWalletMixin = new HSMWalletMixin('/usr/local/lib/softhsm/libsofthsm2.so', '0', '98765432'); let hsmwallet = new FileSystemWallet('./wallet/hsmwallet', hsmWalletMixin); const identity = X509WalletMixin.createIdentity('Org1MSP', enrollment.certificate, enrollment.key.toBytes()); hsmwallet.import(user, identity); ``` But Getting Error as: ``` (node:23666) UnhandledPromiseRejectionWarning: Error: _pkcs11SkiToHandle[534]: no key with SKI e0888b7fa89000854d77be5839be42d25fda4bc3f6393d7c593ad293badde446 found at CryptoSuite_PKCS11._pkcs11SkiToHandle (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/node_modules/fabric-client/lib/impl/bccsp_pkcs11.js:534:11) at Promise (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/node_modules/fabric-client/lib/impl/bccsp_pkcs11.js:890:25) at new Promise () at CryptoSuite_PKCS11.getKey (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/node_modules/fabric-client/lib/impl/bccsp_pkcs11.js:888:10) at HSMWalletMixin.importIdentity (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/lib/impl/wallet/hsmwalletmixin.js:69:56) at FileSystemWallet.import (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/lib/impl/wallet/basewallet.js:118:29) at (node:23666) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (node:23666) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ```

jaswanth (Tue, 18 Jun 2019 07:59:54 GMT):
Hi all i tried *HSMWalletMixin* in node sdk. my code is ``` let hsmWalletMixin = new HSMWalletMixin('/usr/local/lib/softhsm/libsofthsm2.so', '0', '98765432'); let hsmwallet = new FileSystemWallet('./wallet/hsmwallet', hsmWalletMixin); const identity = X509WalletMixin.createIdentity('Org1MSP', enrollment.certificate, enrollment.key.toBytes()); hsmwallet.import(user, identity); ``` But Getting Error as: ``` (node:23666) UnhandledPromiseRejectionWarning: Error: _pkcs11SkiToHandle[534]: no key with SKI e0888b7fa89000854d77be5839be42d25fda4bc3f6393d7c593ad293badde446 found at CryptoSuite_PKCS11._pkcs11SkiToHandle (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/node_modules/fabric-client/lib/impl/bccsp_pkcs11.js:534:11) at Promise (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/node_modules/fabric-client/lib/impl/bccsp_pkcs11.js:890:25) at new Promise () at CryptoSuite_PKCS11.getKey (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/node_modules/fabric-client/lib/impl/bccsp_pkcs11.js:888:10) at HSMWalletMixin.importIdentity (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/lib/impl/wallet/hsmwalletmixin.js:69:56) at FileSystemWallet.import (/home/healthcare/chain.backup/node-src-hsm/node_modules/fabric-network/lib/impl/wallet/basewallet.js:118:29) at (node:23666) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (node:23666) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ``` Any help i got struck with this for a long time now

davidkel (Tue, 18 Jun 2019 08:22:19 GMT):
Unfortunately that isn't how the HSM support works for the wallet system. The wallet expects the private key to already be in the HSM. All you put into the wallet is the certificate and would create the identity using HSMWalletMixin.createIdentity and import that. fabric-network doesn't provide any capability at the moment to help regarding enrolling HSM identities into a wallet. So you would have to enroll a user using either the low level fabric-client setup for HSM or use the fabric-ca-client CLI configured to use HSM to enroll the user so that it returns the certificate but the private key is created into the HSM.

jaswanth (Tue, 18 Jun 2019 08:41:43 GMT):
ok got it . thank you for the clarification , is there any other way i can secure the keys in nodejs . because i think node expects the private keys for signing a transaction _( I don't want to do offline signing)_. *low level fabric-client setup for HSM * : meaning setting up local fabric-ca to use HSM right ?

davidkel (Tue, 18 Jun 2019 08:49:34 GMT):
For HSM, however you enroll a user (either using the fabric-ca-client node apis or the fabric-ca-client Command line Tool for example) you need to configure them to use the HSM you want to use. When they enroll they private key will be created inside the HSM and a certificate returned. You don't HSM enable fabric-ca-server. I'm guessing you won't be using SoftHSM as your HSM provider as it is only an emulation of an HSM and by virtue of the acronym HSM (Hardware Security Module) SoftHSM isn't actually an HSM.

davidkel (Tue, 18 Jun 2019 08:49:34 GMT):
For HSM, however you enroll a user (either using the fabric-ca-client node apis or the fabric-ca-client Command line Tool for example) you need to configure them to use the HSM you want to use. When they enroll, the private key will be created inside the HSM and a certificate returned. You don't HSM enable fabric-ca-server. I'm guessing you won't be using SoftHSM as your HSM provider as it is only an emulation of an HSM and by virtue of the acronym HSM (Hardware Security Module) SoftHSM isn't actually an HSM.

ygnr (Wed, 19 Jun 2019 00:38:01 GMT):
Are there nay tricks to improve time to instantiate chaincode (NodeJS)? It is too slow

ygnr (Wed, 19 Jun 2019 00:38:01 GMT):
Are there any tricks to improve time to instantiate chaincode (NodeJS)? It is too slow

RodrigoAcosta (Wed, 19 Jun 2019 03:54:18 GMT):
using the same, works great

RodrigoAcosta (Wed, 19 Jun 2019 03:57:14 GMT):
hello team, I have created a nodeJS REST API and it is working great. I'm connecting to HP on IBM cloud. However, I'm registering identities on the CA with affiliations and roles specified. ``` await caClient.register({ enrollmentID: userName, enrollmentSecret: secret, role: 'client', affiliation: "MyOrg.Backend", maxEnrollments: 0, attr_reqs: [ {name: "hf.Registrar.Roles"}, {name: "hf.Registrar.Attributes"} ]}, admin); ```

RodrigoAcosta (Wed, 19 Jun 2019 03:57:14 GMT):
hello team, I have created a nodeJS REST API and it is working great. I'm connecting to HP on IBM cloud. However, I'm registering identities on the CA with affiliations and roles specified. ``` await caClient.register({ enrollmentID: userName, enrollmentSecret: secret, role: 'client', affiliation: "MyOrg.Backend", maxEnrollments: 0, attr_reqs: [ {name: "hf.Registrar.Roles"}, {name: "hf.Registrar.Attributes"} ]}, admin); ``` My problem is that when I enroll the users, role and affiliation values are not being stored at the certificate stored at my hfc store path, for example: ``` {"name":"test","mspid":"IssuerMSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"b58958bb5e98445.... ``` and on my user object, affiliation and role are unset. Does anyone have a clue of what I'm doing wrong?

florianc (Wed, 19 Jun 2019 05:56:16 GMT):
` return fabric_ca_client.register({ enrollmentID: userToRegister, affiliation: 'org1', role: 'client' }, admin_user);` Strange, I use the same and it works :thinking:

rthatcher (Wed, 19 Jun 2019 08:31:53 GMT):
I've used this code snippet for adding attributes - note that ecert = true is required to get the attribute included in the certificate: ``` //create user attr array let registerAttrs = []; let registerAttribute = { name: "firstName", value: "Mathan_sir", ecert: true }; registerAttrs.push(registerAttribute); // at this point we should have the admin user // first need to register the user with the CA server return fabric_ca_client.register( { enrollmentID: username, affiliation: "org1", role: "client", attrs: registerAttrs }, admin_user ); ```

BrajeshKumar (Wed, 19 Jun 2019 08:53:04 GMT):
Has joined the channel.

RodrigoAcosta (Wed, 19 Jun 2019 14:14:08 GMT):
yes, I'm using the same, but for some reason, it is not being stored.

ahmad-raza (Wed, 19 Jun 2019 14:37:01 GMT):
var res=await caClient.reenroll(user); var resp=await user.setEnrollment(res.key,res.certificate,'ManafaMSP',false); returns nothing. NO new user is added in credentialStore? any workarounds?

ahmad-raza (Wed, 19 Jun 2019 14:38:05 GMT):
`var res=await caClient.reenroll(user);`

ahmad-raza (Wed, 19 Jun 2019 14:38:33 GMT):
`var res=await caClient.reenroll(user); var resp=await user.setEnrollment(res.key,res.certificate,'ManafaMSP',false);`

ahmad-raza (Wed, 19 Jun 2019 14:40:16 GMT):
@florianc any idea?

RodrigoAcosta (Wed, 19 Jun 2019 16:35:22 GMT):
Why don't you use the fabric client setUserContext method instead? ``` await setUserContext(user); ```

RodrigoAcosta (Wed, 19 Jun 2019 16:35:22 GMT):
Why don't you use the fabric client setUserContext method instead? ``` await fabric_client.setUserContext(user); ```

phillipd (Thu, 20 Jun 2019 05:36:37 GMT):
Has joined the channel.

phillipd (Thu, 20 Jun 2019 05:36:38 GMT):
today, I'm getting errors running yarn install ...... its complaining about version 1.4.2 of fabric-ca-client not being able to find the package.json of fabric-ca-client

phillipd (Thu, 20 Jun 2019 05:37:43 GMT):
ive downgraded to 1.4.0-rc2 and all seem to be fine now, but wasn't expecting this error when using ^1.4.1 in dependancies

mrudav.shukla (Thu, 20 Jun 2019 09:46:59 GMT):
Yup.

nasht00 (Thu, 20 Jun 2019 13:14:22 GMT):
Hello, When using `submitTransaction()`, when is the response coming? Does it wait only until the orderer confirms? Or does it also wait for the peer to validate and commit?

bretharrison (Thu, 20 Jun 2019 14:19:50 GMT):
The response to the call only indicates that the orderer has accepted the work. If you wish to know when the peer has validated and committed the transaction to the ledger I would recommend using the `ChannelEventHub` and registering a transaction listener. The callback that you provide will be called when the peer's event service sends the block with the transaction in it to the NodeSDK (ChannelEventHub instance). The information provided to the callback will include the transaction ID, block number, and transaction status.

bretharrison (Thu, 20 Jun 2019 15:01:05 GMT):
Please manually install fabric-ca-client first `npm install fabric-ca-client` then run your regular install `npm install`

nasht00 (Thu, 20 Jun 2019 15:27:49 GMT):
Actually I studied the source code, and I see it specifically waits for the peer's commit event: ``` // Submit the endorsed transaction to the primary orderers. const response = await channel.sendTransaction({ proposalResponses: validResponses, proposal }); if (response.status !== 'SUCCESS') { const msg = util.format('Failed to send peer responses for transaction %j to orderer. Response status: %j', txId, response.status); logger.error('submit:', msg); eventHandler.cancelListening(); throw new Error(msg); } await eventHandler.waitForEvents(); return validResponses[0].response.payload || null; ```

bretharrison (Thu, 20 Jun 2019 15:29:15 GMT):
Whoops, sorry, I thought I read `sendTransaction` of the `fabric-client`

nasht00 (Thu, 20 Jun 2019 15:29:49 GMT):
ah right, different implementation I saw...

walmon (Thu, 20 Jun 2019 15:36:35 GMT):
Indeed, it's broken on our side too

bretharrison (Thu, 20 Jun 2019 23:29:15 GMT):
A fix went in, so the install should work now

Rajatsharma (Fri, 21 Jun 2019 10:04:42 GMT):
I'm trying to understand re-enroll function in fabric. It's majorly used when certificate of an entity expires and we want new certificates. But even then old certificates hold valid. I don't get the point, then what's the point of having a max_enrollment when I could actually reenroll a user multiple times and use all it's certificates. And all it's certificates will be valid.

Rajatsharma (Fri, 21 Jun 2019 10:04:58 GMT):
What I could do to mark the old certificates invalid?

bestbeforetoday (Fri, 21 Jun 2019 10:05:57 GMT):
@nasht00 By default it will wait for all of the peers in your organization to commit the transaction, but you can set other behaviours when connecting the Gateway, including not waiting for any commits, or plug in your own behaviour. See here for more details: - https://fabric-sdk-node.github.io/release-1.4/tutorial-transaction-commit-events.html - https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.html#.DefaultEventHandlerStrategies__anchor

davidkhala (Fri, 21 Jun 2019 15:18:13 GMT):
@bretharrison @simsc Dear bret and Simon, I am now part of IBM GBS in HongKong branch. And life is too busy to continue work on https://jira.hyperledger.org/browse/FABN-1223 recently. Could you help to catch it up?

davidkhala (Fri, 21 Jun 2019 15:18:13 GMT):
@bretharrison @simsc Dear bret and Simon, I am now part of IBM HongKong branch. Thus life is too busy to continue work on https://jira.hyperledger.org/browse/FABN-1223 recently. Could you help to catch it up?

mffrench (Fri, 21 Jun 2019 20:20:37 GMT):
Hello, some weeks ago I raised an issue on JIRA : https://jira.hyperledger.org/browse/FAB-15459. Still no answer :( Can someone help me troubleshoot this issue and provide some advices ? Thank you

yacovm (Fri, 21 Jun 2019 20:35:57 GMT):
are you by any chance trying to use the event hub?

mffrench (Sat, 22 Jun 2019 03:49:09 GMT):
Currently no ... It happen some time in return of `channel.sendTransactionProposal` or `channel.sendTransaction`

mffrench (Sat, 22 Jun 2019 03:49:48 GMT):
in such case I need to reinit the HLF cli and replay the call to make it work without restarting the app

mffrench (Sat, 22 Jun 2019 03:51:18 GMT):
I'm wondering if it may come from some network issue ? but as this should be on a TCP like protocol I'm not sure...

mffrench (Sat, 22 Jun 2019 04:53:05 GMT):
looking this issue : https://github.com/grpc/grpc-node/issues/130

mffrench (Sat, 22 Jun 2019 04:56:02 GMT):
I guess I also should open a ticket in grpc-node project... Meanwhile I would like to know if I can loose event coming from the network in case I'm subscribing on some chaincode event. Do you have some advices to provide in such case ? Can we imagine detect the error and get potential missing event from HLF after connection retry ?

AdityaJoshi 1 (Sat, 22 Jun 2019 10:48:08 GMT):
Has joined the channel.

AdityaJoshi 1 (Sat, 22 Jun 2019 10:48:10 GMT):
facing this error while creating channel FORBIDDEN reason:Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied

davidkhala (Sat, 22 Jun 2019 22:48:15 GMT):
to mark old certificates invalid , you might need revoke and change revoke lists inside channel config

ahmad-raza (Mon, 24 Jun 2019 06:23:56 GMT):
@davidkhala i revoked old certificates using node sdk how can i change revoke lists using node sdk or any other workaround>

ahmad-raza (Mon, 24 Jun 2019 06:23:56 GMT):
@davidkhala i revoked old certificates using node sdk how can i change revoke lists using node sdk or any other workaround?

Rajatsharma (Mon, 24 Jun 2019 08:24:35 GMT):
How do we give serial number of a specific certificate ?

bretharrison (Mon, 24 Jun 2019 14:21:30 GMT):
Yes it is possible to miss an event if the network has an issue. When processing events, the application should keep track of the blocks it has processed and use the `reconnect` with `startBlock` to replay any missed events.

mastersingh24 (Mon, 24 Jun 2019 20:05:18 GMT):
You are likely not using the admin ID for your org as defined in the Org MSP in the channel definition

Rajatsharma (Tue, 25 Jun 2019 08:33:17 GMT):
@davidkhala could you give some sample code to try this out ?

Rajatsharma (Tue, 25 Jun 2019 08:38:55 GMT):
@davidkhala any steps that I could follow, I'm not able to find a workaround.

Rajatsharma (Tue, 25 Jun 2019 08:39:12 GMT):
q

davidkhala (Wed, 26 Jun 2019 06:42:46 GMT):
actuallly it is not part of nodejs SDK yet, to change revoke list in channel

Rajatsharma (Wed, 26 Jun 2019 07:13:32 GMT):
So how would you suggest me approaching this ? I tried creating a crls directory and placing the user certificates (I wanted to prevent after revoking them) but even that's not working. That user was still able to process transactions.

PonmudiK (Wed, 26 Jun 2019 10:52:49 GMT):
Hello,

PonmudiK (Wed, 26 Jun 2019 10:53:46 GMT):
I am getting below issue while trying to run the balance-transfer application in 'node sdk 1.4 ' version in mac

PonmudiK (Wed, 26 Jun 2019 10:53:48 GMT):
2019-06-26T10:43:09.794Z - error: [Remote.js]: Error: The channel has been closed URL:grpcs://localhost:7051 [2019-06-26 16:13:09.794] [ERROR] Query - Error: The channel has been closed URL:grpcs://localhost:7051 at Immediate.checkState [as _onImmediate] (/Users/ponmudik/code_base/fabric_1.4/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:851:18) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5)

PonmudiK (Wed, 26 Jun 2019 10:54:46 GMT):
Getting the same error while using the "fabcar" sample in v1.4 in mac

PonmudiK (Wed, 26 Jun 2019 10:55:35 GMT):
I have verified the Gateway discovery options as

PonmudiK (Wed, 26 Jun 2019 10:55:38 GMT):
discovery: { enabled: true, asLocalhost: true }

PonmudiK (Wed, 26 Jun 2019 10:56:01 GMT):
please provide your suggestion to resolve the error

bretharrison (Wed, 26 Jun 2019 15:56:59 GMT):
I am not able to recreate this issue. Check your changes to be sure you are not closing the connection to the peer service. This is a GRPC messaging that means that the service connection has been closed and is not able to execute the request.

Charles99 (Wed, 26 Jun 2019 16:08:52 GMT):
Registering user2 to fabcar error

qsmen (Thu, 27 Jun 2019 06:22:40 GMT):
hi experts here, what is the default chaincode install path in peer? Thank you.

Puneeth987 (Thu, 27 Jun 2019 06:29:16 GMT):
Has joined the channel.

Puneeth987 (Thu, 27 Jun 2019 06:31:28 GMT):
how to Add new org in exciting channel using node

Puneeth987 (Thu, 27 Jun 2019 06:31:28 GMT):
how to Add new org in exciting channel using node sdk in hyperledger fabric

Puneeth987 (Thu, 27 Jun 2019 06:33:24 GMT):
add org to existing channel

nasht00 (Thu, 27 Jun 2019 06:59:08 GMT):
Has left the channel.

mahoney1 (Thu, 27 Jun 2019 09:13:07 GMT):
For these types of errors you need to look at the fabric-ca logs to see what is going on. Eg `docker logs ..... `

mahoney1 (Thu, 27 Jun 2019 10:37:50 GMT):
you can understand more on the process of adding an org to existing network/consortium [here](https://hyperledger-fabric.readthedocs.io/en/release-1.4/channel_update_tutorial.html) - as for joining its new peers using SDK, see an example [here](https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/test/integration/e2e/join-channel.js#L56) - see also the SDK docs https://fabric-sdk-node.github.io/tutorial-channel-create.html (search joinChannel)

mahoney1 (Thu, 27 Jun 2019 10:40:38 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

marinkovicvlado (Thu, 27 Jun 2019 14:30:54 GMT):
Has joined the channel.

marinkovicvlado (Thu, 27 Jun 2019 14:30:55 GMT):
Hi can anyone direct me to some good resource on enabling mutual TLS in Fabric? What interests me is connection profile, and submitting transactions via Gateway (using fabric-sdk-node)...

marinkovicvlado (Thu, 27 Jun 2019 14:35:18 GMT):
Second problem...Once I have enabled TLS I am not able to perform Channel initialize: ``` error: [Transaction]: _validatePeerResponses: No valid responses from any peers. 2 peer error responses: key USERPUBLICKEY -----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEwa8W1HEdeM4i7u2i2p4A91eiRWQN vYs72nX3CMiLnlILQl0821fj7StxSuquQw+mJ87C9izwiNP4gWZnM/eI7A== -----END PUBLIC KEY----- doesn't exist ```

mahoney1 (Thu, 27 Jun 2019 17:05:57 GMT):
recording from today's Fabric Developer community call (0627 zip) has been posted here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings

meetk (Fri, 28 Jun 2019 05:32:47 GMT):
Has joined the channel.

meetk (Fri, 28 Jun 2019 05:32:49 GMT):
Any transaction status acknowledgement events example out there?

ahmad-raza (Fri, 28 Jun 2019 06:54:47 GMT):
can we dynamically (through code) delete certificates from *credentialStore* folder? any workaround ? because when we delete identity its cert is still in credential store?

hyperlearner (Fri, 28 Jun 2019 07:10:42 GMT):
I'm trying to discover more about MSP.I've got the fabric-sdk-go to explore. But I think it would be more clear if I go with the flow of a transaction. So I was wondering If I could find those files regarding the validation, verification and signing of transaction inside the gbalance-transfer. Could anyone help me figure out the place where the code for the MSP services exists? #general #fabric-sdk-node #fabric

bretharrison (Fri, 28 Jun 2019 11:57:00 GMT):
maybe on the #fabric-questions channel ?

bretharrison (Fri, 28 Jun 2019 11:58:57 GMT):
see https://fabric-sdk-node.github.io/release-1.4/tutorial-channel-events.html and look for Transaction listener

marinkovicvlado (Fri, 28 Jun 2019 12:58:03 GMT):
Once I enabled TLS_CLIENTAUTH I receive this error: ```Handshake failed with fatal error SSL_ERROR_SSL: error:10000412:SSL routines:OPENSSL_internal:SSLV3_ALERT_BAD_CERTIFICATE.```

Patriq (Fri, 28 Jun 2019 21:30:36 GMT):
Hey guys! :) I seem to be having some problems trying to query a chaincode using `contract.evaluateTransaction` and I am getting this error: ``` 2019-06-28T21:25:45.399Z - error: [SingleQueryHandler]: evaluate: message=No peers available to query. Errors: [], stack=FabricError: No peers available to query. Errors: [] at SingleQueryHandler.evaluate (/home/andre/Masters-Thesis/code/client/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:39:17) at Transaction.evaluate (/home/andre/Masters-Thesis/code/client/node_modules/fabric-network/lib/transaction.js:246:29) at Contract.evaluateTransaction (/home/andre/Masters-Thesis/code/client/node_modules/fabric-network/lib/contract.js:172:39) at query (/home/andre/Masters-Thesis/code/client/main.js:49:39), name=FabricError Failed to evaluate transaction: FabricError: No peers available to query. Errors: [] ```

Patriq (Fri, 28 Jun 2019 23:51:34 GMT):
Any reason for the default query handler to contact peers of the organization of the client?

Patriq (Fri, 28 Jun 2019 23:51:53 GMT):
I am looking at here: https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-network/lib/impl/query/defaultqueryhandlerstrategies.js

Patriq (Sat, 29 Jun 2019 00:28:44 GMT):
Same thing with Event Hubs

Patriq (Sat, 29 Jun 2019 00:28:45 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-network/lib/impl/event/defaulteventhubselectionstrategies.js

davidkel (Sat, 29 Jun 2019 07:39:28 GMT):
The query handlers currently only query a single peer for information (they may in the future query multiple peers and compare results). some of the reasons for only going to your org peers are 1) faster response times 2) not putting load on peers you don't own 3) you trust your orgs peers. If you need something different you can always implement your own handler.

davidkel (Sat, 29 Jun 2019 07:53:08 GMT):
Probably because an org may only be interested when it commits something it has submitted rather than when everyone has committed, but you can easily change the strategy to all peers in the channel.

Patriq (Sat, 29 Jun 2019 10:34:34 GMT):
Guess I will do that! Thanks, that does indeed make sense!

mastersingh24 (Sat, 29 Jun 2019 13:34:38 GMT):
https://chat.hyperledger.org/channel/fabric-questions?msg=fiKBxFSHBx9HbExby

Paradox-AT (Sat, 29 Jun 2019 16:24:11 GMT):
Hey guys, can anyone help me out in serverless deployment? Everything works fine in local machine but when its getting deployed to lamda then sdk is not able to find the crypto materials

Paradox-AT (Sat, 29 Jun 2019 22:11:54 GMT):
So I got the issue

Paradox-AT (Sat, 29 Jun 2019 22:12:18 GMT):
the CopyWebpackPlugin is not emitting all files

Paradox-AT (Sat, 29 Jun 2019 22:12:48 GMT):
Have anyone faced the similar issues?

florianc (Mon, 01 Jul 2019 05:24:17 GMT):
Have you connected your gateway first? It may need to be connected.

soumyanayak (Mon, 01 Jul 2019 07:16:31 GMT):
Has joined the channel.

soumyanayak (Mon, 01 Jul 2019 07:17:36 GMT):
the error is coming from the line

soumyanayak (Mon, 01 Jul 2019 07:17:41 GMT):
await gateway.getNetwork(NETWORK_NAME)

soumyanayak (Mon, 01 Jul 2019 07:18:16 GMT):
Before this line await gateway.connect(connectionProfile, connectionOptions) is executed fproperly

soumyanayak (Mon, 01 Jul 2019 07:18:37 GMT):
but in .getNetwork the issue is coming as channel closed

soumyanayak (Mon, 01 Jul 2019 07:30:56 GMT):
https://chat.hyperledger.org/channel/fabric-questions?msg=fiKBxFSHBx9HbExby

soumyanayak (Mon, 01 Jul 2019 09:11:52 GMT):
hi PonmudiK..

soumyanayak (Mon, 01 Jul 2019 09:12:06 GMT):
i am also getting the same issue but not able to resolve till now

mffrench (Mon, 01 Jul 2019 11:28:18 GMT):
Hi, is there some documentation or code sample available to describe this procedure deeper ?

mffrench (Mon, 01 Jul 2019 11:28:18 GMT):
Hi, is there some documentation or code sample available to describe this procedure in deep ?

adarshaJha (Mon, 01 Jul 2019 11:29:58 GMT):
Has joined the channel.

adarshaJha (Mon, 01 Jul 2019 11:29:59 GMT):
https://stackoverflow.com/questions/56834846/hyperledger-fabric-error-failed-to-submit-transaction-error-no-event-hubs-for

mffrench (Mon, 01 Jul 2019 11:31:41 GMT):
I'm not sure to understand/see how the reconnect with startBlock on HLF NodeJS client is working...

vaibhavr2709 (Mon, 01 Jul 2019 11:52:28 GMT):
Has joined the channel.

BlueKing (Tue, 02 Jul 2019 06:03:43 GMT):
Has joined the channel.

MartinKanala (Tue, 02 Jul 2019 08:57:15 GMT):
Has joined the channel.

generak (Tue, 02 Jul 2019 10:21:03 GMT):
Has joined the channel.

AlbertCL (Tue, 02 Jul 2019 16:09:34 GMT):
Has joined the channel.

Patriq (Tue, 02 Jul 2019 23:21:27 GMT):
Found a bug in the `fabric-network` module. When adding a block listener, the `Network#addBlockListener` doesn't consider the `unregister` option.

Patriq (Tue, 02 Jul 2019 23:22:18 GMT):
Is never propagated to the `clientOptions` that is fed into the `ChannelEventHub#registerBlockEvent` in the `BlockEventListener#register` method.

Patriq (Tue, 02 Jul 2019 23:26:35 GMT):
Also the `BlockEventListener` checks the `this._registration` value for the property `unregister`. The `this._registration` is the result of the call of `ChannelEventHub#registerBlockEvent` which returns an integer and not a plain object. Resulting in undefined, and therefore never unregistering the the `BlockEventListener`.

Patriq (Tue, 02 Jul 2019 23:26:51 GMT):
If you need me to formalize such issue let me know where!

Patriq (Wed, 03 Jul 2019 01:33:58 GMT):
Decided to then give an attempt to contract listeners. When I introduce a checkpointer, it throws an exception. Here is what it throws: ``` 2019-07-03T01:28:55.609Z - error: [ChannelEventHub.js]: This ChannelEventHub has already been connected to start receiving blocks. Failed to add a commit listener: Error: Event listeners that use startBlock or endBlock must be registered before connecting to the peer channel-based service ```

Patriq (Wed, 03 Jul 2019 01:33:58 GMT):
Decided to then give an attempt to contract listeners. When I introduce a checkpointer, it throws an exception. Here is what it throws: ``` 2019-07-03T01:28:55.609Z - error: [ChannelEventHub.js]: This ChannelEventHub has already been connected to start receiving blocks. Failed to add a commit listener: Error: Event listeners that use startBlock or endBlock must be registered before connecting to the peer channel-based service ```

Patriq (Wed, 03 Jul 2019 01:35:10 GMT):
So it seems like the listener is setting up `startBlock` correctly, but it probably connected a connection with the hub beforehand, so it throws the exception!

ooojerryooo (Wed, 03 Jul 2019 01:45:47 GMT):
Has joined the channel.

Patriq (Wed, 03 Jul 2019 01:46:31 GMT):
So I looked it up, and apparently the issue lies in `contracteventlistener.js` file in the `register function`. Easily fixed using by replacing the `register` function with the following: ```js async register() { await super.register(this.contract.getChaincodeId()); if (!this.eventHub) { return await this._registerWithNewEventHub(); } this._registration = this.eventHub.registerChaincodeEvent( this.contract.getChaincodeId(), this.eventName, this._onEvent.bind(this), this._onError.bind(this), this.clientOptions ); this.eventHub.connect(!this._filtered); this._registered = true; } ```

Patriq (Wed, 03 Jul 2019 01:46:31 GMT):
So I looked it up, and apparently the issue lies in `contracteventlistener.js` file in the `register function`. Easily fixed using by replacing the `register` function with the following: ```javascript async register() { await super.register(this.contract.getChaincodeId()); if (!this.eventHub) { return await this._registerWithNewEventHub(); } this._registration = this.eventHub.registerChaincodeEvent( this.contract.getChaincodeId(), this.eventName, this._onEvent.bind(this), this._onError.bind(this), this.clientOptions ); this.eventHub.connect(!this._filtered); this._registered = true; } ```

Patriq (Wed, 03 Jul 2019 01:48:15 GMT):
This function is similar to the `BlockEventListener#register` one. And it seems to work :)

Patriq (Wed, 03 Jul 2019 01:48:15 GMT):
This function is similar to the `BlockEventListener#register` one. And it seems to work, both with and without checkpointer :)

florianc (Wed, 03 Jul 2019 05:47:23 GMT):
You may want to create an issue on Jira. Moreover, this problem may be similar: https://jira.hyperledger.org/browse/FABN-1251

davidkel (Wed, 03 Jul 2019 07:30:05 GMT):
Are using using fabric-network 1.4.2 ? Some improvements for event handling went into that version so worth checking first. If you are then please raise a jira against the node sdk at https://jira.hyperledger.org/projects/FABN/issues

davidkel (Wed, 03 Jul 2019 07:31:30 GMT):
Could you raise a separate jira issue for the checkpointing issue as well, Thanks

Patriq (Wed, 03 Jul 2019 09:29:18 GMT):
Yeah I am, will try to create the issues then!

Patriq (Wed, 03 Jul 2019 09:29:18 GMT):
Yeah I am using 1.4.2, will try to create the issues then!

davidkel (Wed, 03 Jul 2019 09:34:51 GMT):
:thumbsup:

Patriq (Wed, 03 Jul 2019 09:35:00 GMT):
Do I need a JIRA account?

davidkel (Wed, 03 Jul 2019 09:36:35 GMT):
Just use your linux foundation account that you used to sign in to rocket chat.

Patriq (Wed, 03 Jul 2019 09:37:07 GMT):
I used my google account :P

Patriq (Wed, 03 Jul 2019 09:37:07 GMT):
I used my google account :P Will create a linux foundation account

davidkel (Wed, 03 Jul 2019 09:37:51 GMT):
Wow, didn't know you could do that. Unless Jira supports that you may have to create a linux foundation account

Patriq (Wed, 03 Jul 2019 09:38:58 GMT):
Yeah take a look aha https://i.imgur.com/BHR10Fb.png

Patriq (Wed, 03 Jul 2019 10:33:10 GMT):
Done! https://jira.hyperledger.org/browse/FAB-15866 https://jira.hyperledger.org/browse/FAB-15867

davidkel (Wed, 03 Jul 2019 10:57:02 GMT):
Much appreciated

Patriq (Wed, 03 Jul 2019 10:57:47 GMT):
Do you guys take contributions?

davidkel (Wed, 03 Jul 2019 11:00:53 GMT):
contributions are always welcome

davidkel (Wed, 03 Jul 2019 11:00:53 GMT):
contributions are always welcome, although I am not a maintainer so can't speak for them as to when they might look at it though

MatasV (Wed, 03 Jul 2019 11:45:18 GMT):
Hey Guys! I'm trying to deploy separated REST server (with node sdk). Have anyone done this? What configuration files should I change and what kind of server should I use to deploy my rest on it?? Thank you in advance!

SanketPanchamia (Wed, 03 Jul 2019 12:08:08 GMT):
Hi, I have been trying to run my application using 1.4.1 and Raft Orderer and getting an error while creating a channel. "status:FORBIDDEN reason:implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied" On seeing the orderer logs, i see the following error "identity 0 does not satisfy principal: the identity is a member of a different MSP" I have checked my certificates multiple times and also the policies but still cant figure out the error. Any help will be appreciated.

theDweeb (Wed, 03 Jul 2019 19:26:23 GMT):
Has joined the channel.

DeepaMotwani (Thu, 04 Jul 2019 07:06:28 GMT):
I need to plug postgres SQL database in the hyperledger fabric. Can anyone help me how to do it?

heatherp (Fri, 05 Jul 2019 11:31:10 GMT):
Has joined the channel.

amealwithbasil (Fri, 05 Jul 2019 16:56:13 GMT):
Has joined the channel.

amealwithbasil (Fri, 05 Jul 2019 16:56:14 GMT):
Hi, does anyone know if the fabric-shim 1.2 supports emitting chaincode events? In the repo at https://github.com/hyperledger/fabric-chaincode-node it looks like 1.4 supports it. Another question, does the version of fabric-shim correspond to the same version of HLF it is compatible with?

davidkel (Fri, 05 Jul 2019 17:45:14 GMT):
Yes, fabric-shim 1.2 supports emitting events. I would recommend using the version of shim for HLF you are using. So if you are using HLF 1.2.x you should use the latest version of fabric-shim 1.2 which is 1.2.4 (ie they match by major and minor versions but can differ by micro version)

PMoura (Fri, 05 Jul 2019 19:12:59 GMT):
Hello. I'm receiving the error `{ Error: EISDIR: illegal operation on a directory, read errno: -21, code: 'EISDIR', syscall: 'read' }` when trying to issue the function `getUserContext`. Anyone can help? Thanks.

bandreghetti (Fri, 05 Jul 2019 23:05:05 GMT):
Hey guys I'm looking for a method that provides the same functionality as `peer channel fetch config config_block.pb -o orderer.example.com:7050 -c $CHANNEL_NAME --tls --cafile $ORDERER_CA` Couldn't find in the docs. `Channel.getChannelConfigFromOrderer()` only returns the `ConfigEnvelope` piece of the block. `Channel.getGenesisBlock()` returns the genesis block but I need the most recent config block. The use case is: I need to add an orderer to a system channel, but in order to start properly the new ordering node needs a proper bootstrap block containing the most recent configs (after the update adding its credentials to the config block). How can I fetch it using the Node SDK? Thanks!

Puneeth987 (Mon, 08 Jul 2019 06:34:24 GMT):
{"success":false,"message":"failed Error: fabric-ca request register failed with errors [[{\"code\":0,\"message\":\"Registration of 'Puni' failed in affiliation validation: Failed getting affiliation 'org3.department1': : scode: 404, code: 63, msg: Failed to get Affiliation: sql: no rows in result set\"}]]"} how to solve this error

MattV 5 (Mon, 08 Jul 2019 08:26:04 GMT):
Has joined the channel.

rthatcher (Mon, 08 Jul 2019 08:34:20 GMT):
This looks as if you are trying to register a new Identity with an Affiliation that does not exist. Perhaps using the affiliation service to see what exists might be helpful https://fabric-sdk-node.github.io/master/AffiliationService.html

davidkhala (Mon, 08 Jul 2019 10:14:44 GMT):
@bretharrison @simsc Dear Bret, please review https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/32205

heatherp (Mon, 08 Jul 2019 10:46:12 GMT):
Hi @davidkhala Bret is out until Wednesday, fyi

MattV 5 (Mon, 08 Jul 2019 11:53:50 GMT):
Hey people! I have done some work querying ledger block, but data is in a byte format. How could I convert this to a human readable format? ```` :{"type":"Buffer","data":[17,128,4,169,202,71,250,45,67,137,215,164,143,242,241,224,128,31,210,214,179,92,218,141]}},"payload":{"chaincode_proposal_payload":{"input":{"chaincode_spec":{"type":1,"typeString":"GOLANG","input":{"args":[{"type":"Buffer","data":[100,101,112,108,111,121]},{"type":"Buffer","data":[109,121,99,104,97,110,110,101,108]},{"type":"Buffer","data":[10,24,8,1,18,10,18,4,109,121,99,99,26,2,118,48,26,8,10,6,103,111,108,97,110,103]},{"type":"Buffer","data":[18,12,18,10,8,2,18,2,8,0,18,2,8,1,26,11,18,9,10,7,79,114,103,49,77,83,80,26,11,18,9,10,7,79,114,103,50,77,83,80]}, ``` `

KristijanGlibo (Mon, 08 Jul 2019 13:12:00 GMT):
Has joined the channel.

KristijanGlibo (Mon, 08 Jul 2019 13:12:16 GMT):
Hi all, we have a little delay on our chapters to show how to develop apps with HLF. Finally, after we managed our projects we are able to start with new articles and here is the one from last week: https://medium.com/beyondi/iot-hyperledger-development-from-scratch-within-21-days-day-5-9998db7b5ae6 we will continue with next one until Wed. Day 5 is about development environment setup with details about files.

davidkhala (Mon, 08 Jul 2019 13:23:14 GMT):
thx for your reminds

soumyanayak (Mon, 08 Jul 2019 14:22:37 GMT):
Hi All, After activating TLS on Peers and Orderers , i was trying to connect to the anchor peer using node.js through gateway.js. In the connection.yaml file -- under the orderer and peer section i have given the TLSCA certififcate path. So when i am trying to connect its giving me the below error - 2019-07-08T14:05:04.759Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://172.23.155.115:7051 2019-07-08T14:05:04.760Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://172.23.155.115:7051 2019-07-08T14:05:04.760Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://172.23.155.115:7051 Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://172.23.155.115:7051 at Network._initializeInternalChannel (/home/ranjan/LDBCApp/sdk/node_modules/fabric-network/lib/network.js:112:12) at at process._tickCallback (internal/process/next_tick.js:189:7) In the Peer logs i got the below error - 2019-07-08 18:58:48.608 IST [core.comm] ServerHandshake -> ERRO 034 TLS handshake failed with error tls: first record does not look like a TLS handshake server=PeerServer remoteaddress=172.23.155.122:37168 When i checked the TLSCA certififcate of the TLS server the SANS is empty -- is the SANS has to be filled with the machine names or ip addresses of the peer , orderer machines ? Or any other issues. Please help. Without TLS activation the same is working fine. Regards, Soumya

davidkhala (Wed, 10 Jul 2019 01:47:45 GMT):
you can try to call `.toString()` of this object

eujungkim (Wed, 10 Jul 2019 05:38:47 GMT):
Has joined the channel.

eujungkim (Wed, 10 Jul 2019 05:38:48 GMT):
@bandreghetti I meet same problem with him.

eujungkim (Wed, 10 Jul 2019 05:39:59 GMT):
I have same problem with you. I hope someone help us.

ZainabM (Wed, 10 Jul 2019 12:12:51 GMT):
Has joined the channel.

bandreghetti (Wed, 10 Jul 2019 16:29:31 GMT):
@bretharrison can you help us?

bretharrison (Wed, 10 Jul 2019 16:31:51 GMT):
You could update the NodeSDK `Channel` code `getChannelConfigFromOrderer ` to return the block.

bandreghetti (Wed, 10 Jul 2019 16:35:11 GMT):
I'm not sure how to do that

bandreghetti (Wed, 10 Jul 2019 19:47:52 GMT):
Okay I managed to fetch the full block. Was it elegant? I can assure you it was not. But it worked.

BAM_Mueller (Thu, 11 Jul 2019 10:48:16 GMT):
Has joined the channel.

mahoney1 (Thu, 11 Jul 2019 11:52:01 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

kzhry (Fri, 12 Jul 2019 06:50:43 GMT):
Has joined the channel.

MattV 5 (Fri, 12 Jul 2019 12:17:54 GMT):
hello, I'm testing my REST api server - written using balance-transfer example. The problem is I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc.

MattV 5 (Fri, 12 Jul 2019 12:17:54 GMT):
hello, I'm testing my REST api server - written using balance-transfer example. The problem is I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Mautas for organization TechSuperHeroes with::failed Error: Invalid common connection profile due to missing configuration data ```

MattV 5 (Fri, 12 Jul 2019 12:17:54 GMT):
hello, I'm testing my REST api server - written using balance-transfer example. The problem is I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Mautas for organization TechSuperHeroes with::failed Error: Invalid common connection profile due to missing configuration data ``` catch error from helper.js

MattV 5 (Fri, 12 Jul 2019 12:17:54 GMT):
hello, I'm testing my REST api server - written using balance-transfer example. The problem is I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Mautas for organization TechSuperHeroes with::failed Error: Invalid common connection profile due to missing configuration data ``` _*catch error from helper.js_

MattV 5 (Fri, 12 Jul 2019 12:17:54 GMT):
hello, I'm testing my REST api server - written using balance-transfer example. The problem is I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Mautas for organization TechSuperHeroes with::failed Error: Invalid common connection profile due to missing configuration data ``` _*catch error from helper.js_ Does anyone have any ideas?

MattV 5 (Fri, 12 Jul 2019 12:17:54 GMT):
hello, I'm testing my REST api server - written using balance-transfer example. The problem is I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. _*catch error from helper.js_ ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Mautas for organization TechSuperHeroes with::failed Error: Invalid common connection profile due to missing configuration data ``` *Does anyone have any ideas?*

MattV 5 (Fri, 12 Jul 2019 12:17:54 GMT):
hello, I'm testing my REST API server - written using a balance-transfer example. The problem is, I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from an internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. _*catch error from helper.js_ ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Mautas for organization TechSuperHeroes with::failed Error: Invalid common connection profile due to missing configuration data ``` *Does anyone have any ideas?*

MattV 5 (Fri, 12 Jul 2019 12:17:54 GMT):
hello, I'm testing my REST API server - written using a balance-transfer example. The problem is, I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from an internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. _*catch error from helper.js_ ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Test-user-1 for organization Test-org1 with::failed Error: Invalid common connection profile due to missing configuration data ``` *Does anyone have any ideas?*

meetk (Fri, 12 Jul 2019 13:40:53 GMT):
Any example for JWT auth with hyperledger user for token based auth middleware?

meetk (Fri, 12 Jul 2019 13:40:53 GMT):
Any example for JWT auth with hyperledger user for token based auth middleware in express?

PMoura (Fri, 12 Jul 2019 17:11:28 GMT):
Hello guys. Using the `fabric-contract-api`, may I have a transaction with arguments of type object? For instance, I want to have an argument based on a defined interface (at least it doesn't gives me error on the chaincode). If possible, how can I call the submit transaction on the client side, attending that they require `args `as `string`? Thanks

GayathriGanesan (Sat, 13 Jul 2019 11:40:55 GMT):
Has joined the channel.

PMoura (Sat, 13 Jul 2019 18:16:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CcTwgPzCEaLMhQLk5) Found an workaround: stringify to JSON the object on the client side (and pass it as single argument on the transactionSubmit) and parse to JSON on the chaincode side.

KristijanGlibo (Sun, 14 Jul 2019 14:21:54 GMT):
Hello guys! Another day in our series is online: https://medium.com/beyondi/iot-hyperledger-development-from-scratch-within-21-days-day-6-ef4a46b0710 Here we explained how and when to use crypto-config.yaml file. It is a help tool when you are in development mode. For production purposes you will generate your own certificates or you will use some 3rd party institution to do it for you to protect and bring trust in network you are building. Happy reading!

florianc (Mon, 15 Jul 2019 06:03:01 GMT):
Why not? It has been built for this and included in the fabric to serve this purpose.

davidkel (Mon, 15 Jul 2019 06:20:42 GMT):
@florianc actually cryptogen was originally created as a tool to help the fabric developers. It is not intended as a tool to be used for production purposes

florianc (Mon, 15 Jul 2019 06:21:50 GMT):
Oh. Good to know. Sorry for the wrong information.

PyiTheinKyaw (Mon, 15 Jul 2019 08:42:24 GMT):
Hello guys, Now I am trying to listen the block emit event from chaincode by using Nodejs SDK. I used following link as ref: "https://fabric-sdk-node.github.io/release-1.4/tutorial-listening-to-events.html" "https://fabric-sdk-node.github.io/release-1.4/tutorial-transaction-commit-events.html" Although It is okay for a few transactions, when transactions is near 1000 tns async submit, some of the transaction are missed to listen. :( How can i cover it ?

14gracel (Mon, 15 Jul 2019 08:57:07 GMT):
I suggest turning on event replay or using start/end block to play back events that you believe have been missed

florianc (Mon, 15 Jul 2019 08:58:46 GMT):
Hi! I have a problem with gateway and network discovery. All information can be found here: https://stackoverflow.com/questions/57034852/hlf-fabric-network-fails-to-connect-to-ibp2-peer-from-node-red Basically, based on the HLF logging, the SDK sets URL to localhost instead of remote peer URL. (if I compare the not working code with working code). Any help would be appreciated.

PyiTheinKyaw (Mon, 15 Jul 2019 08:59:32 GMT):
Thanks for your suggestion. In my case, in 1000 transaction, I can know 970 transactions are successfully committed but other cannot detected

florianc (Mon, 15 Jul 2019 09:01:26 GMT):
Are you sure these txs are successful?

PyiTheinKyaw (Mon, 15 Jul 2019 09:01:45 GMT):
Yes, I confirm via peer logs.

PyiTheinKyaw (Mon, 15 Jul 2019 09:02:12 GMT):
in peer side, all of the 1000 tnx are committed.

florianc (Mon, 15 Jul 2019 09:05:49 GMT):
If you are sure all txs are commited, then something might go wrong (even emissionfrom peer? SDK event listener?). Maybe a dev can check it, or you could raise an issue on jira.

davidkel (Mon, 15 Jul 2019 09:20:18 GMT):
Have answered the SO entry

florianc (Mon, 15 Jul 2019 09:23:09 GMT):
Seriously, I think my holidays won't be too much... Thank you. Hopefully I will remember to check basic elements before digging too deep for nothing.

davidkel (Mon, 15 Jul 2019 09:25:13 GMT):
Don't worry it's a common mistake, you aren't the only one :-) also I personally am not keen that asLocalhost defaults to true.

davidkel (Mon, 15 Jul 2019 09:25:13 GMT):
Don't worry it's a common mistake, you aren't the only one :-)

amealwithbasil (Mon, 15 Jul 2019 17:02:03 GMT):
x509

amealwithbasil (Mon, 15 Jul 2019 17:37:40 GMT):
I am trying to verify a caller's x509 certificate to ensure it matches the certificate I obtained when enrolling a user, but not sure how to compare these two. When I enroll a user via `fabric-ca-client.enroll`, I get an `enrollment.certificate` in the returned object. When I submit a transaction with this user, in the chain code I am retrieving the callers x509 certificate via `ClientIdentity.getx509Certificate`. What is the intended way of validating this user is who they should be?

mahoney1 (Tue, 16 Jul 2019 10:20:55 GMT):
why couldn't you compare a hash of the two, if that's what you need to do? Depending on your implementation / use case, there is an example shown (answer #2) [here](https://security.stackexchange.com/questions/73127/how-can-you-check-if-a-private-key-and-certificate-match-in-openssl-with-ecdsa)

MattV 5 (Tue, 16 Jul 2019 11:23:56 GMT):
hello, I'm testing my REST API server - written using a balance-transfer example. The problem is, I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from an internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. _*catch error from helper.js_ ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Test-user-1 for organization Test-org1 with::failed Error: Invalid common connection profile due to missing configuration data ``` *Does anyone have any ideas?*

MattV 5 (Tue, 16 Jul 2019 11:23:56 GMT):
hello, I'm testing my REST API server - written using a balance-transfer example. The problem is, I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from an internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. _*catch error from helper.js_ ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Mautas for organization TechSuperHeroes 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Test-user-1 for organization Test-org1 with::failed Error: Invalid common connection profile due to missing configuration data ``` *Does anyone have any ideas?* I'm stuck.. :(

MattV 5 (Tue, 16 Jul 2019 11:23:56 GMT):
hello, I'm testing my REST API server - written using a balance-transfer example. The problem is, I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from an internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. _*catch error from helper.js_ ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Test-user-1 for organization Test-org1 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Test-user-1 for organization Test-org1 with::failed Error: Invalid common connection profile due to missing configuration data ``` *Does anyone have any ideas?* I'm stuck.. :(t

MattV 5 (Tue, 16 Jul 2019 11:23:56 GMT):
hello, I'm testing my REST API server - written using a balance-transfer example. The problem is, I cannot enroll organisation and users calling rest server externally, but I'm able to do the same thing sending POST request from an internal server using localhost. What is even more interesting that after enrolling users to organisations I'm able to join channels, install and instantiate chaincodes etc. _*catch error from helper.js_ ``` 0|app | [2019-07-12 12:16:41.509] [ERROR] Helper - Failed to get registered user: Mautas with error: Error: Invalid common connection profile due to missing configuration data 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - -- returned from registering the username Test-user-1 for organization Test-org1 0|app | [2019-07-12 12:16:41.510] [DEBUG] Node-Server - Failed to register the username Test-user-1 for organization Test-org1 with::failed Error: Invalid common connection profile due to missing configuration data ``` *Does anyone have any ideas?* I'm stuck.. :(

florianc (Tue, 16 Jul 2019 13:21:05 GMT):
Quick question about the documentation. I think there is a mistake here :https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Gateway.html#~DiscoveryOptions__anchor It says that the default value of `enabled `is `true`. But isn't `false`?

florianc (Tue, 16 Jul 2019 13:21:05 GMT):
Quick question about the documentation. I think there is a mistake here :https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Gateway.html#~DiscoveryOptions__anchor It says that the default value of `enabled `is `true`. But isn't it `false`?

Abrara (Tue, 16 Jul 2019 15:37:19 GMT):
Has joined the channel.

Abrara (Wed, 17 Jul 2019 07:10:05 GMT):
Hi everyone, my transaction is being sent twice to the same peer, hence creating an endorsement issue, did anyone had this problem? Detailed description here: https://stackoverflow.com/questions/56954847/hyperledger-fabric-endorsement-failing-txid-exists TIA

Abrara (Wed, 17 Jul 2019 07:10:05 GMT):
Hi everyone, my transaction is being sent twice to the same peer, hence creating an endorsement issue, did anyone have this problem? Detailed description here: https://stackoverflow.com/questions/56954847/hyperledger-fabric-endorsement-failing-txid-exists TIA

Abrara (Wed, 17 Jul 2019 07:10:05 GMT):
Hi everyone, one proposal is being sent twice to the same peer, hence creating an endorsement issue, did anyone have this problem? Detailed description here: https://stackoverflow.com/questions/56954847/hyperledger-fabric-endorsement-failing-txid-exists TIA

davidkel (Wed, 17 Jul 2019 07:21:24 GMT):
The code implies true by default ``` discovery: { enabled: Client.getConfigSetting('initialize-with-discovery', true) }, ``` as the `initialize-with-discovery` config value is not defined in `config.json` of the fabric-client

davidkel (Wed, 17 Jul 2019 07:21:24 GMT):
The code implies true by default ``` discovery: { enabled: Client.getConfigSetting('initialize-with-discovery', true) }, ``` as the `initialize-with-discovery` config value is not defined in `config.json` of the fabric-client

florianc (Wed, 17 Jul 2019 07:22:05 GMT):
Oh, ok thanks.

afifield (Wed, 17 Jul 2019 16:58:20 GMT):
Has joined the channel.

theDweeb (Wed, 17 Jul 2019 23:03:33 GMT):
When I register and enroll a new user the kvs file generated does not contain the enrollment or certificate information. In order for me to query or invoke I have to use the "admin" ... can anyone help?

theDweeb (Wed, 17 Jul 2019 23:07:51 GMT):
The enrollmentResponse.key is undefined as well as the certificate

florianc (Thu, 18 Jul 2019 05:58:50 GMT):
It seems you are doing something wrong. Works perfectly on my side.

mahoney1 (Thu, 18 Jul 2019 09:08:16 GMT):
check out Fabcar sample for a working example -> https://github.com/hyperledger/fabric-samples/blob/release-1.4/fabcar/javascript/registerUser.js#L39 and used here -> https://github.com/hyperledger/fabric-samples/blob/release-1.4/fabcar/javascript/query.js#L21

theDweeb (Thu, 18 Jul 2019 12:53:42 GMT):
I had updated/modified the affiliation as I did not know the default ones were org1.department1 etc... I changed the yaml inside the container and it works. Now I need to figure out how to set the CA containers with the affiliations I want when they spin up. Thanks for the responses

theDweeb (Thu, 18 Jul 2019 15:48:54 GMT):
I am trying to build a node sdk around the sample chaincode https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4ade.html when I send the proposal I package the args into an object (for invoke) but for query it is just one value (i.e. "a") The query works but when I try to invoke and set the args: ["a","30"] the proposal response sends an error that it is expecting a key What am I missing here?

rthatcher (Fri, 19 Jul 2019 08:00:29 GMT):
Remember that there is a #fabric-ca channel too :-)

phantom.assasin (Mon, 22 Jul 2019 08:21:10 GMT):
In fabric node js sdk while installing chaincode we call this function: `client.installChaincode` and pass the *chaincodePath*. Can we pass the whole chaincode file in zip format instead similar to the way we do it in go sdk?

soumyanayak (Mon, 22 Jul 2019 09:17:08 GMT):
Hi All, I have created a fabric runtime with TLS enabled . Also using fabric-tools docker created a channel, installed , instantiated a chaincode. Now i was trying to connect the peer using Node SDK (Node SDK set up and Peer are in different VMs) - gateway.js , i am getting the below error ranjan@ubuntuVMServer5:~/LDBCApp/sdk/gateway$ node gateway.js start setupGateway begin setupGateway 1 setupGateway 2 setupGateway 3 setupGateway end getNetwork start legaldescriptionchannel _initializeInternalChannel 1 _initializeInternalChannel 2 2019-07-22T08:55:38.609Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://172.23.155.115:7051 2019-07-22T08:55:38.610Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://172.23.155.115:7051 2019-07-22T08:55:38.610Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://172.23.155.115:7051 Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://172.23.155.115:7051 at Network._initializeInternalChannel (/home/ranjan/LDBCApp/sdk/node_modules/fabric-network/lib/network.js:112:12) at at process._tickCallback (internal/process/next_tick.js:189:7) Connection.yaml File -- Mentioned the details for TLS also orderers: orderer1: url: grpcs://172.23.155.122:7050 grpcOptions: ssl-target-name-override: orderer1 tlsCACerts: path: /home/ranjan/hyperledger/org0/orderer1/tls-msp/tlscacerts/tls-172-23-155-113-7052.pem peers: peer1: url: grpcs://172.23.155.115:7051 grpcOptions: ssl-target-name-override: peer1 tlsCACerts: path: /home/ranjan/hyperledger/org1/peer1/tls-msp/tlscacerts/tls-172-23-155-113-7052.pem

rthatcher (Mon, 22 Jul 2019 10:00:47 GMT):
Assuming the containers for the Fabric are still running, then a `Failed to connect` is a likely to be network problem - addressing/routing/firewall. You can use your normal networking tools to test the connection, but this `wget` command to hit the *CA* might help prove you have connectivity: `wget --no-check-certificate https://172.23.155.???:7054/api/v1/cainfo`

soumyanayak (Mon, 22 Jul 2019 10:02:14 GMT):
hi rthatcher what is the significance of the below grpcOptions: ssl-target-name-override

soumyanayak (Mon, 22 Jul 2019 10:03:10 GMT):
I tried the connection the peer port and its success as below ranjan@ubuntuVMServer5:~$ nc -vz 172.23.155.115 7051 Connection to 172.23.155.115 7051 port [tcp/*] succeeded!

rthatcher (Mon, 22 Jul 2019 10:09:37 GMT):
That override is used if the address/hostname being used in the url in the connection profile is different to the hostrname being used by the TLS Certificate.

soumyanayak (Mon, 22 Jul 2019 10:11:09 GMT):
ohhk Now i tried giving the value as grpcOptions: ssl-target-name-override: 172.23.155.122:7050 instead of orderer1 and similarly Ip address details for peer - it worked

soumyanayak (Mon, 22 Jul 2019 10:11:40 GMT):
So if the value is same as in URL then this override is not required right?

ayusht11 (Mon, 22 Jul 2019 11:17:34 GMT):
Hi guys, I'm unable to create new channels with new orgs added to an existing fabric network using this tutorial: https://hyperledger-fabric.readthedocs.io/en/latest/channel_update_tutorial.html I have detailed my issue here: https://stackoverflow.com/questions/57144745/cannot-create-channels-with-new-orgs-in-fabric-got-error-attempted-to-include Is there an alternative way to achieve something similar using fabric-node-sdk? It would be great if you could take a look and help.

adityanalge (Mon, 22 Jul 2019 21:42:06 GMT):
The delete method does not allow redirecting the DELETE API by passing the caName. I have created a pull request to add a function that allows us to do the same. Link to pull request -> https://github.com/hyperledger/fabric-sdk-node/pull/22/commits/ffbc033ceda9f010cad40033dbf595bde280156e (Feedback & Comments Appreciated)

adityanalge (Mon, 22 Jul 2019 21:42:06 GMT):
The delete method does not allow redirecting the DELETE API call using the fabric-sdk-node by passing the caName. I have created a pull request to add a function that allows us to do the same. Link to pull request -> https://github.com/hyperledger/fabric-sdk-node/pull/22/commits/ffbc033ceda9f010cad40033dbf595bde280156e (Feedback & Comments Appreciated)

davidkel (Mon, 22 Jul 2019 21:46:04 GMT):
the github repo is a read-only repo so you can't submit PRs to it that can be actioned. I would recommend raising a jira at https://jira.hyperledger.org on the fabric-sdk-node project and then if you follow the guide here https://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html#submitting-your-fix you can submit a fix to gerrit for review.

adityanalge (Mon, 22 Jul 2019 21:46:39 GMT):
I will do the needful. Thanks.

davidkel (Mon, 22 Jul 2019 21:47:05 GMT):
:thumbsup:

huxiangdong (Tue, 23 Jul 2019 01:22:38 GMT):
any fabric-sdk-node maintainers can help to review? it's a simple syntax error fix but will block usage with HSM if not fixed...thanks! https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/32318

sumanch 2 (Tue, 23 Jul 2019 10:54:25 GMT):
Has joined the channel.

sumanch 2 (Tue, 23 Jul 2019 10:54:28 GMT):
how to get data from Wallet using fileName? using exists method i am able to check that file exists but how to see the contents of that file, is there any function for that? getStateStore is giving path and getCryptoSuite is giving crypto related information. But i want to get the data of file e.g certificate file or public/private key. Any help or comment appreciated

jtrayfield (Tue, 23 Jul 2019 21:26:14 GMT):
I have two orgs, A and B. I have no peer for B, but I'm trying to call the chaincode as a B user. I get: 2019-07-23T21:22:04.725Z - error: [Network]: _initializeInternalChannel: no suitable peers available to initialize from ERROR: Error: no suitable peers available to initialize from

jtrayfield (Tue, 23 Jul 2019 21:27:00 GMT):
I tried: await this.gateway.connect(ccp, { wallet: wallet, identity: this.user, discovery: { // asLocalhost: false, // enabled: true }, eventHandlerOptions: { strategy: EventStrategies.NETWORK_SCOPE_ANYFORTX }

jtrayfield (Tue, 23 Jul 2019 21:27:39 GMT):
but it doesn't seem to help. do I need to be running a B peer to make a call as a B CA user?

davidkhala (Wed, 24 Jul 2019 00:02:50 GMT):
@bretharrison Dear Bret, would you merge this in coming days? https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/32153 And btw, what is the rocketChat id of Mark Levis?

davidkhala (Wed, 24 Jul 2019 00:14:31 GMT):
one you have the user object after setEnrollment or something alike, you could try `(user) => user.getSigningIdentity()._certificate;` and `(user) => user.getSigningIdentity()._signer._key;`

nekia (Wed, 24 Jul 2019 04:20:04 GMT):
https://github.com/hyperledger/fabric-sdk-node/commit/65a8da992bed9fa151f2039bdd309dcdf9c6322e ``` - ‘asLocalhost’ option now defaults to ‘true’ and is overridable by an environment variable ```

nekia (Wed, 24 Jul 2019 04:23:39 GMT):
Hi, when I tried to override this option via environment variable 'DISCOVERY_AS_LOCALHOST', it's recongized as true because value is handled as a string. Because of it, the localhost mapping is always enabled.

nekia (Wed, 24 Jul 2019 04:24:27 GMT):
Is there any correct way to override this option?

phantom.assasin (Wed, 24 Jul 2019 05:41:19 GMT):
channel.removePeer returns 204 but doesn't actually removes the peer from the channel.

davidkel (Wed, 24 Jul 2019 06:25:24 GMT):
Try turning discovery off and ensuring that your network is completely described in your connection profile (ie it lists all the orderers and peers that make up your fabric network). So your code would be something like ``` await this.gateway.connect(ccp, { wallet: wallet, identity: this.user, discovery: { enabled: false }, eventHandlerOptions: { strategy: EventStrategies.NETWORK_SCOPE_ANYFORTX } ```

davidkel (Wed, 24 Jul 2019 06:27:36 GMT):
You should be able to do this, so I would suggest raising a Jira on the fabric-sdk-node project

davidkel (Wed, 24 Jul 2019 06:30:11 GMT):
The channel.removePeer just removes the Peer object from the Channel object managed by the node SDK. ie it modifies the in memory representation of the channel that is used by the node sdk. It won't modify the actual fabric network.

phantom.assasin (Wed, 24 Jul 2019 06:36:54 GMT):
So it there any other way we can remove the peer from a channel?

phantom.assasin (Wed, 24 Jul 2019 06:37:42 GMT):
Getting below error while trying to join peers to channel: ```Join Channel Response: [ undefined, [ { Error: 2 UNKNOWN: access denied: channel [] creator org [Org1MSP] at Object.exports.createStatusError (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/client_interceptors.js:1204:28) at InterceptingListener._callNext (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/client_interceptors.js:845:24) code: 2, metadata: [Object], details: 'access denied: channel [] creator org [Org1MSP]' }, { Error: 2 UNKNOWN: access denied: channel [] creator org [Org1MSP] at Object.exports.createStatusError (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/client_interceptors.js:1204:28) at InterceptingListener._callNext (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/Users/shubham.kumar/Desktop/repos/blockahead_baas/node_modules/grpc/src/client_interceptors.js:845:24) code: 2, metadata: [Object], details: 'access denied: channel [] creator org [Org1MSP]' } ] ] Failed to join peer to the channel with error:: Error: 2 UNKNOWN: access denied: channel [] creator org [Org1MSP] Failed to join peer to the channel with error:: Error: 2 UNKNOWN: access denied: channel [] creator org [Org1MSP] Failed to join all peers to channel. Failed to join peer to the channel with error:: Error: 2 UNKNOWN: access denied: channel [] creator org [Org1MSP]``` Any clues?

phantom.assasin (Wed, 24 Jul 2019 06:38:10 GMT):
Peer logs: ```2019-07-24 06:34:13.284 UTC [protoutils] ValidateProposalMessage -> WARN 0a3 channel []: MSP error: expected MSP ID Org2MSP, received Org1MSP 2019-07-24 06:34:13.284 UTC [comm.grpc.server] 1 -> INFO 0a4 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.1:46882 error="access denied: channel [] creator org [Org1MSP]" grpc.code=Unknown grpc.call_duration=834.363µs```

davidkel (Wed, 24 Jul 2019 06:49:03 GMT):
I'm not familiar with the operational capabilities of hyperledger fabric so I don't know the process to remove a peer from the channel.

nekia (Wed, 24 Jul 2019 07:12:21 GMT):
OK, Thanks, I'll do.

nekia (Wed, 24 Jul 2019 14:06:37 GMT):
https://jira.hyperledger.org/browse/FABN-1321

nekia (Wed, 24 Jul 2019 14:06:52 GMT):
Raised a JIRA.

davidkel (Wed, 24 Jul 2019 14:09:49 GMT):
:thumbsup:

jtrayfield (Wed, 24 Jul 2019 14:35:08 GMT):
@davidkel thanks for your suggestion. If I turn discovery off I get: 2019-07-24T14:31:33.447Z - error: [AbstractEventListener]: No peers available to register a listener here's my connection profile (slightly abbreviated): "channels": { "xxx": { "orderers": [ "orderer.example.com" ], "peers": { "peer0.A.com": {} } } }, "organizations": { "A": { "mspid": "AMSP", "peers": [ "peer0.A.com" ], "certificateAuthorities": [ "ca.A.com" ] }, "B": { "mspid": "BMSP", "peers": [ ], "certificateAuthorities": [ "ca.B.com" ] } }, "orderers": { "orderer.example.com": { "url": "grpcs://localhost:7050", "grpcOptions": { "ssl-target-name-override": "orderer.example.com" } } }, "peers": { "peer0.A.com": { "url": "grpcs://localhost:7051", "grpcOptions": { "ssl-target-name-override": "peer0.A.com" } } }, "certificateAuthorities": { "ca.A.com": { "url": "https://localhost:7054", "caName": "ca.A.com" }, "ca.B.com": { "url": "https://localhost:8054", "caName": "ca.B.com" } }

jtrayfield (Wed, 24 Jul 2019 14:36:01 GMT):
I have listed the peer, but it says no peers available....

rthatcher (Wed, 24 Jul 2019 14:44:59 GMT):
within the Channel section I think you need to list the roles of the peers something like: ``` "peers": { "peer0.santes.cons.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer1.santes.cons.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer0.omac.cons.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer1.omac.cons.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true } } ```

rthatcher (Wed, 24 Jul 2019 14:44:59 GMT):
within the Channel section I think you need to list the roles of the peers something like: ``` "peers": { "peer0.santes.cons.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer1.santes.cons.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer0.omac.cons.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer1.omac.cons.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true } } ``` The roles used to default to true, but it might be worth explicitly stating them

davidkel (Wed, 24 Jul 2019 14:45:22 GMT):
That sounds like a bug as you have selected the `NETWORK_SCOPE_ANYFORTX` Which I thought meant it would wait for the first peer in the network to say it has committed the tx. Suggest you raise a Jira

jtrayfield (Wed, 24 Jul 2019 14:46:15 GMT):
@rthatcher thanks, I tried that, no change

jtrayfield (Wed, 24 Jul 2019 14:46:41 GMT):
@davidkel will do, thanks

theDweeb (Wed, 24 Jul 2019 18:07:44 GMT):
Does anyone have an example of a multi-org connection profile setup? At the moment I have 4 orgs each with their own CP (Mostly identical other than the client name changed) But all of the invokes are only being issued by one of the orgs. I am using one node/express server with each org with its own endpoints

huxd (Thu, 25 Jul 2019 05:39:03 GMT):
Has joined the channel.

mahoney1 (Thu, 25 Jul 2019 14:32:37 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

davidkel (Thu, 25 Jul 2019 15:00:20 GMT):
So I believe it is a bug you have found and I have raised a jira for it https://jira.hyperledger.org/browse/FABN-1324 Only soln I can provide at the moment is to use the node-sdk 1.4.0

jtrayfield (Thu, 25 Jul 2019 15:37:58 GMT):
@davidkel thanks!

theDweeb (Thu, 25 Jul 2019 18:51:58 GMT):
Hello, I am trying to install CC through the SDK which returns a status 500 error. When I check the CLI container it shows the chaincode has been installed but when I check the peer node in question it too returns a 500 error. If the chaincode is being installed correctly why is the chaincode proposal response status == 500 instead of say 200? Also, do I need to add any admin cert file paths in the environment section for the docker-compose.yaml file for any of the peers, just like the cli container? Is the only thing I need to do for admin certs for each peer/org is to set the file path in the network-config.yaml?

HLFPOC (Fri, 26 Jul 2019 04:18:19 GMT):
hlfpoc

ShefaliMittal (Fri, 26 Jul 2019 07:56:08 GMT):
Hi Team, I have a chaincode in which I have returned some error using shim.Error("This is error from chaincode"); I am invoking chaincode via node sdk using - Contract.SubmitTransaction() Now when the error is returned from chaincode the catch error says - Error: No valid responses from any peers. 1 peer error responses: This is error from chaincode I want to capture only the error i.e "This is error from chaincode" and discard other string. Please tell me how could I do that

nwyee (Fri, 26 Jul 2019 09:36:01 GMT):
Has joined the channel.

bestbeforetoday (Fri, 26 Jul 2019 11:56:25 GMT):
There isn't a good way to do that using `Contract.submitTransaction()` right now. You could raise a story on Jira to capture it as a requirement: https://jira.hyperledger.org/projects/FABN/issues

ShefaliMittal (Mon, 29 Jul 2019 05:48:08 GMT):
Ok Thanks. I have raised it to Jira.

phantom.assasin (Mon, 29 Jul 2019 07:33:47 GMT):
The response we get from the sdk is an json object with some of the values present as Buffer instead of string. Is there any function in node js sdk to parse this response in proper string format?

deepaks (Mon, 29 Jul 2019 14:52:16 GMT):
Hi everyone, Can anyone please suggest how to change fabric config on the fly without restarting the service?

Charles99 (Mon, 29 Jul 2019 19:44:29 GMT):
Hello, does anyone know how I can get the block hash, block info, transaction timestamp, etc from a particular transaction id?

sahilgoel (Tue, 30 Jul 2019 04:07:20 GMT):
Hello guys

sahilgoel (Tue, 30 Jul 2019 04:07:27 GMT):
facing an issue in the SDK

sahilgoel (Tue, 30 Jul 2019 04:07:47 GMT):
I have setup the network of 4 organisations using the kubernetes

sahilgoel (Tue, 30 Jul 2019 04:08:08 GMT):
The network is working fine as the transactions are executed from the CLI

sahilgoel (Tue, 30 Jul 2019 04:08:26 GMT):
when i Setup the SDK and try to invoke then I get the error of context deadline exceeded

sahilgoel (Tue, 30 Jul 2019 04:08:44 GMT):
The discovery is enable and the option asLocalhost is set to false

sahilgoel (Tue, 30 Jul 2019 04:09:26 GMT):
But the hyperledger explorer is working fine with the same network / connection profile

sahilgoel (Tue, 30 Jul 2019 05:52:56 GMT):
SDK invoke transaction works when then service discovery is false

sahilgoel (Tue, 30 Jul 2019 05:53:14 GMT):
But when discovery enable then returns the error

sahilgoel (Tue, 30 Jul 2019 06:11:16 GMT):
https://stackoverflow.com/questions/57265280/hyperledger-fabric-unable-to-invoke-using-node-sdk

sahilgoel (Tue, 30 Jul 2019 06:11:38 GMT):
Please have a look at the above question

marinkovicvlado (Tue, 30 Jul 2019 10:33:36 GMT):
Yup. No run-time config as far as I know...You'll have to apply update every time...

deepaks (Tue, 30 Jul 2019 10:44:31 GMT):
I have spawned a fabric network 1.4 and currently using node sdk to interact with different containers of fabric. So i wanted to change the config of peers or orderers, like changing the name of peer etc. So if the changes would be reflected in the running service or do I have to restart the service?

deepaks (Tue, 30 Jul 2019 10:44:31 GMT):
@marinkovicvlado I have spawned a fabric network 1.4 and currently using node sdk to interact with different containers of fabric. So i wanted to change the config of peers or orderers, like changing the name of peer etc. So if the changes would be reflected in the running service or do I have to restart the service?

marinkovicvlado (Tue, 30 Jul 2019 10:49:46 GMT):
If you mean changing names of peers and orderers in Hyperledger configtx this will cause a lot of issues...because once you created genesis.block on the first setup this configuration is stored in ledger...and once you change the configtx it won't reflect the same setup as in the block... Also if you change crypto-config naming patterns you'll have to migrate previous certificates to new folders structure...

deepaks (Tue, 30 Jul 2019 10:56:35 GMT):
Here I am sharing a config of balance-transfer inside fabric samples ``` { "name": "balance-transfer", "x-type": "hlfv1", "description": "Balance Transfer Network", "version": "1.0", "channels": { "mychannel": { "orderers": [ "orderer.example.com" ], "peers": { "peer0.org1.example.com": { "endorsingPeer": true, "chaincodeQuery": true, "ledgerQuery": true, "eventSource": true }, "peer1.org1.example.com": { "endorsingPeer": false, "chaincodeQuery": true, "ledgerQuery": true, "eventSource": false }, "peer0.org2.example.com": { "endorsingPeer": true, "chaincodeQuery": true, "ledgerQuery": true, "eventSource": true }, "peer1.org2.example.com": { "endorsingPeer": false, "chaincodeQuery": true, "ledgerQuery": true, "eventSource": false } }, "chaincodes": [ "mycc:v0" ] } }, "organizations": { "Org1": { "mspid": "Org1MSP", "peers": [ "peer0.org1.example.com", "peer1.org1.example.com" ], "certificateAuthorities": [ "ca-org1" ], "adminPrivateKey": { "path": "artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8_sk" }, "signedCert": { "path": "artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem" } }, "Org2": { "mspid": "Org2MSP", "peers": [ "peer0.org2.example.com", "peer1.org2.example.com" ], "certificateAuthorities": [ "ca-org2" ], "adminPrivateKey": { "path": "artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sk" }, "signedCert": { "path": "artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem" } } }, "orderers": { "orderer.example.com": { "url": "grpcs://localhost:7050", "grpcOptions": { "ssl-target-name-override": "orderer.example.com" }, "tlsCACerts": { "path": "artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt" } } }, "peers": { "peer0.org1.example.com": { "url": "grpcs://localhost:7051", "grpcOptions": { "ssl-target-name-override": "peer0.org1.example.com" }, "tlsCACerts": { "path": "artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" } }, "peer1.org1.example.com": { "url": "grpcs://localhost:7056", "grpcOptions": { "ssl-target-name-override": "peer1.org1.example.com" }, "tlsCACerts": { "path": "artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" } }, "peer0.org2.example.com": { "url": "grpcs://localhost:8051", "grpcOptions": { "ssl-target-name-override": "peer0.org2.example.com" }, "tlsCACerts": { "path": "artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" } }, "peer1.org2.example.com": { "url": "grpcs://localhost:8056", "eventUrl": "grpcs://localhost:8058", "grpcOptions": { "ssl-target-name-override": "peer1.org2.example.com" }, "tlsCACerts": { "path": "artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" } } }, "certificateAuthorities": { "ca-org1": { "url": "https://localhost:7054", "httpOptions": { "verify": false }, "tlsCACerts": { "path": "artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" }, "registrar": [ { "enrollId": "admin", "enrollSecret": "adminpw" } ], "caName": "ca-org1" }, "ca-org2": { "url": "https://localhost:8054", "httpOptions": { "verify": false }, "tlsCACerts": { "path": "artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem" }, "registrar": [ { "enrollId": "admin", "enrollSecret": "adminpw" } ], "caName": "ca-org2" } } } ```

deepaks (Tue, 30 Jul 2019 10:57:07 GMT):
so if here we change any peer name then restrating of service would be required?

deepaks (Tue, 30 Jul 2019 11:00:16 GMT):
yes, if we change in cinfig tx then many subsequent changes would be required

deepaks (Tue, 30 Jul 2019 11:28:26 GMT):
@marinkovicvlado thanks

ibanfi (Tue, 30 Jul 2019 15:24:25 GMT):
Has joined the channel.

bestbeforetoday (Tue, 30 Jul 2019 15:51:30 GMT):
Which response are you talking about? The ProposalResponse coming back from a peer? If so, that is a protobuf and some elements are themselves protobufs encoded as byte arrays. You can use the protobuf definitions to deserialize them. If you're talking about the payload that is returned from a things like Contract.submitTransaction(), that is just whatever payload is returned by the chaincode transaction function, so decoding will depend on how the transaction function encoded it.

phantom.assasin (Tue, 30 Jul 2019 16:38:38 GMT):
The response we get as part of channel.queryInfo it is supposed to return height, currentBlockHash and prevBlockHash but when i try to convert the byte array to string all i get is bunch of weird looking non ASCII characters

bestbeforetoday (Tue, 30 Jul 2019 17:05:46 GMT):
It's just a hash so not sure there is a correct way to represent it as a string. Maybe `blockInfo.currentBlockHash.toString('hex')`?

ygnr (Wed, 31 Jul 2019 04:14:27 GMT):
Is there an API in `fabric-client-ca` to get the list of user registered with fabirc ca?

ygnr (Wed, 31 Jul 2019 07:52:56 GMT):
Looks like there is one already with IdentityService (https://fabric-sdk-node.github.io/IdentityService.html)

HritikGupta (Wed, 31 Jul 2019 17:48:09 GMT):
Has joined the channel.

HritikGupta (Wed, 31 Jul 2019 17:48:11 GMT):
How to get the reference of existing channel via channelid in Fabric SDK in node? (I'm not much familiar with the syntax)

xiven (Thu, 01 Aug 2019 15:50:56 GMT):
I'm upgrading from 1.2 to 1.3 and noticed that the fabric-client npm package now has its own node_modules within the directory. As such it installs the grpc package among other packages. If you run an application with the fabric-client running on it on one machine then in your network config you call a fabric instance on another machine it fails on invokes with an error of: error: `[Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051 warn: [UserService]: [DiscoveryEndorsementHandler]: _endorse_group_member >> G0:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://localhost:7051`. This is happening on 1.3 and 1.4 of fabric-client. If I revert back to fabric-client 1.2, the issue goes away and it works as it should. What changed to make this happen and is there anything I can do to fix this?

xiven (Thu, 01 Aug 2019 15:52:47 GMT):
Also there is no reference to `localhost:7051` in any of my config files so I don't know where that is coming from.

bretharrison (Thu, 01 Aug 2019 16:04:13 GMT):
The peer's discovery service sees the peers with the virtual address from within the container. When running the application outside of the virtual containers the application sees the peer's address as `localhost` since the containers are on the same physical system. You are using the `as_localhost` setting to have the NodeSDK map all discovered addresses to localhost.

bretharrison (Thu, 01 Aug 2019 16:04:13 GMT):
The peer's discovery service sees the peers with the virtual address from within the container. When running the application outside of the virtual containers the application sees the peer's address as `localhost` since the containers are on the same physical system. You are using the `asLocalhost` setting to have the NodeSDK map all discovered addresses to localhost.

xiven (Thu, 01 Aug 2019 16:05:14 GMT):
is that handled differently from 1.2 and 1.3?

bretharrison (Thu, 01 Aug 2019 16:19:39 GMT):
I do not see any differences between 1.2 and 1.3, you may wish to use the asLocalHost:false to turn off the mapping ``` await channel.initialize({discover:true, asLocalhost:false}) ```

xiven (Thu, 01 Aug 2019 16:27:41 GMT):
that seems to be what the issue was

xiven (Thu, 01 Aug 2019 16:27:42 GMT):
thanks

DeepaMotwani (Fri, 02 Aug 2019 06:16:22 GMT):
Can I use raft orderer in nodeSDK i.e. without using cli?

bel0335 (Fri, 02 Aug 2019 06:35:58 GMT):
Has joined the channel.

bel0335 (Fri, 02 Aug 2019 06:36:00 GMT):
I'm using Hyperledger Fabric ver.1.4.1 and Node.js SDK. I'm using a sample transaction event handler becasue I want to configure time out. https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/network-e2e/sample-transaction-event-handler.js I sent 1000 transactions from Node.js asynchronously. After that, peer log said all transactions were committed as valid transactions. But, about 150 event handler time out errors occurred. I mean that even though all transactions are committed, some event handlers show time out error because it fails to listen all commit event. Could you tell me any idea to solve this time out error issue? Thank you in advance.

bel0335 (Fri, 02 Aug 2019 06:36:00 GMT):
Hello, I'm using Hyperledger Fabric ver.1.4.1 and Node.js SDK. I'm using a sample transaction event handler becasue I want to configure time out. https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/network-e2e/sample-transaction-event-handler.js I sent 1000 transactions from Node.js asynchronously. After that, peer log said all transactions were committed as valid transactions. But, about 150 event handler time out errors occurred. I mean that even though all transactions are committed, some event handlers show time out error because it fails to listen all commit event. Could you tell me any idea to solve this time out error issue? Thank you in advance.

bel0335 (Fri, 02 Aug 2019 06:36:00 GMT):
Hello, I'm using Hyperledger Fabric ver.1.4.1 and Node.js SDK. I'm using a sample transaction event handler becasue I want to configure time out. https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/network-e2e/sample-transaction-event-handler.js I sent 1000 transactions from Node.js asynchronously. After that, peer log said all transactions were committed as valid transactions. But, about 150 event handler time out errors occurred. I mean that even though all transactions are committed, some event handlers show time out error because it fails to listen commit event. Could you tell me any idea to solve this time out error issue? Thank you in advance.

davidkel (Fri, 02 Aug 2019 06:50:30 GMT):
For the sample handler please raise a Jira about it. The built in event handler capabilities have a configurable timeout you could use as described here https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Gateway.html#~DefaultEventHandlerOptions__anchor it is the `commitTimeout`property eg ``` onst { Gateway, DefaultEventHandlerStrategies } = require('fabric-network'); const connectOptions = { eventHandlerOptions: { commitTimeout: 10, strategy: DefaultEventHandlerStrategies.MSPID_SCOPE_ALLFORTX } } const gateway = new Gateway(); await gateway.connect(connectionProfile, connectOptions); ```

davidkel (Fri, 02 Aug 2019 06:50:30 GMT):
For the sample handler please raise a Jira about it. The built in event handler capabilities have a configurable timeout you could use as described here https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Gateway.html#~DefaultEventHandlerOptions__anchor it is the `commitTimeout`property eg ``` const { Gateway, DefaultEventHandlerStrategies } = require('fabric-network'); const connectOptions = { eventHandlerOptions: { commitTimeout: 10, strategy: DefaultEventHandlerStrategies.MSPID_SCOPE_ALLFORTX } } const gateway = new Gateway(); await gateway.connect(connectionProfile, connectOptions); ```

mtng (Fri, 02 Aug 2019 11:31:09 GMT):
same problem here!

mtng (Fri, 02 Aug 2019 11:32:07 GMT):
@RodrigoAcosta Did you fix it?

bestbeforetoday (Fri, 02 Aug 2019 12:26:37 GMT):
As mentioned above, using the `commitTimeout` option should achieve what you need without having to write a custom handler. If you (or anyone else) does want to implement a custom handler, I have slightly updated the same as part of this Jira, which should deal better with high load: https://jira.hyperledger.org/browse/FABN-1332

bestbeforetoday (Fri, 02 Aug 2019 12:26:37 GMT):
As mentioned above, using the `commitTimeout` option should achieve what you need without having to write a custom handler. If you (or anyone else) does want to implement a custom handler, I have slightly updated the sample as part of this Jira, which should deal better with high load: https://jira.hyperledger.org/browse/FABN-1332

annumberhocker (Fri, 02 Aug 2019 18:38:27 GMT):
Has joined the channel.

bretharrison (Mon, 05 Aug 2019 17:37:36 GMT):
be sure to use `attrs:` not `att_regs`

JoshFodale (Tue, 06 Aug 2019 20:32:17 GMT):
Has left the channel.

dayubian (Tue, 06 Aug 2019 23:27:23 GMT):
Has left the channel.

mahoney1 (Wed, 07 Aug 2019 17:25:51 GMT):
reminder that the Fabric Developer Community call tomorrow (Thu) 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

ItaloCarrasco (Wed, 07 Aug 2019 21:34:43 GMT):
Has joined the channel.

ItaloCarrasco (Wed, 07 Aug 2019 21:34:43 GMT):
hello, does anyone know how to test tps using node sdk?

Puneeth987 (Thu, 08 Aug 2019 07:37:24 GMT):
how to unregister the node using sdk?

Puneeth987 (Thu, 08 Aug 2019 07:37:24 GMT):
how to unregister(exit from the channel) the node using sdk?

rthatcher (Thu, 08 Aug 2019 09:00:19 GMT):
Have you investigated Hyperledger Caliper? https://hyperledger.github.io/caliper/docs/1_Getting_Started.html

ItaloCarrasco (Thu, 08 Aug 2019 13:56:27 GMT):
ive already used caliper but i want to compare results between caliper and node sdk throughput

sstone1 (Thu, 08 Aug 2019 16:57:13 GMT):
@ItaloCarrasco Caliper uses the Node SDK, so there's no difference

ShrutiHK (Fri, 09 Aug 2019 01:04:05 GMT):
Hi, I have setup a fabric-ca server on a different machine. And while registering and enrolling a user, I want to store the certificates on another machine. For this, I am trying to set absolute path in the Connection profile of the sdk (network-config.yaml). But it always takes a path relative to the location of the current folder. How can I do that? Any suggestions are appreciated.

paranjan (Fri, 09 Aug 2019 09:24:54 GMT):
Has joined the channel.

adamsiena (Fri, 09 Aug 2019 09:26:51 GMT):
Has joined the channel.

adamsiena (Fri, 09 Aug 2019 09:26:52 GMT):
hey all, what is everyone's preferred way of linting?

ahmad-raza (Fri, 09 Aug 2019 10:12:17 GMT):
Which methodology is better? One that is used in Balance-transfer Sample(In which keys are kept safe in credential stores) and other used in FabCAR sample example (In which wallet is used)?

ahmad-raza (Fri, 09 Aug 2019 10:27:03 GMT):
Two ways to develop Chaincode 1. Chaincode Interface 2. Smartcontract Interface Which is better and production ready?

mastersingh24 (Fri, 09 Aug 2019 11:00:04 GMT):
The SDK repo uses eslint

akshay.sood (Fri, 09 Aug 2019 12:43:18 GMT):
Hi Experts,

akshay.sood (Fri, 09 Aug 2019 12:45:21 GMT):
Hi Experts, I am using `node-sdk` and chaincode written in go. When I return 500 in chaincode, I am receiving the below string in fabric-node-sdk ```2019-08-09T12:41:17.374Z - error: [Transaction]: _validatePeerResponses: No valid responses from any peers. 2 peer error responses: {"code":409,"msg":"Conflict because of inconsistent or duplicated info: Document ID:application-2 already exist"} {"code":409,"msg":"Conflict because of inconsistent or duplicated info: Document ID:application-2 already exist"}``` But I want `{"code":409,"msg":"Conflict because of inconsistent or duplicated info: Document ID:application-2 already exist"}`. Does anyone here knows how to get a proper response in case of an error?

akshay.sood (Fri, 09 Aug 2019 12:47:24 GMT):
This is my sdk invoke function ```public async invoke(channel: string, username: string, functionName: string, data: any, chaincode: string): Promise { let response = new ResponseModel(); const userExistenceErr = await this.checkUserExistence(username); if (userExistenceErr != null){ response.message = userExistenceErr.message response.status = 500 return response } try{ // Create a new gateway for connecting to our peer node. const gateway = new Gateway(); await gateway.connect(connectionProfile, { wallet, identity: username, discovery: { enabled: false } }); // Get the network (channel) our contract is deployed to. const network = await gateway.getNetwork(channel); // Get the contract from the network. const contract = network.getContract(chaincode); const respBuffer = await contract.submitTransaction(functionName, JSON.stringify(data)); response.message = "Success" response.status = 200 response.data = JSON.parse(respBuffer.toString()) return response }catch(err){ return new ResponseModel(err.message, 500, null) } }```

jambonrose (Fri, 09 Aug 2019 16:00:26 GMT):
Has joined the channel.

GowriR (Sat, 10 Aug 2019 06:41:34 GMT):
hello All, I am converting fabcar to expose a REST API interface. While executing the following line

GowriR (Sat, 10 Aug 2019 06:41:34 GMT):
hello All, I am converting fabcar to expose a REST API interface. While executing the following line const network = await gateway.getNetwork('mychannel'); console.log("getNetwork") - I get the error - - error: [Channel.js]: Channel:mychannel received discovery error:access denied

GowriR (Sat, 10 Aug 2019 06:41:34 GMT):
hello All, I am converting fabcar to expose a REST API interface. While executing the following line const network = await gateway.getNetwork('mychannel'); console.log("getNetwork") - I get the error - - *error: [Channel.js]: Channel:mychannel received discovery error:access denied * Would appreciate any pointers on the same

soumyanayak (Sun, 11 Aug 2019 05:24:59 GMT):
Check once if your peer is joined to the channel - mychannel?

SatheeshNehru (Mon, 12 Aug 2019 05:17:06 GMT):
Has joined the channel.

mtng (Mon, 12 Aug 2019 11:58:20 GMT):
Hi everyone, I am trying to instantiate a chaincode via the node sdk. The installation is made succesfully, but with the instantiation I have the following error: ``` Error: instantiation policy violation: signature set did not satisfy policy. ```I have tried everything, change the config of the network, try the default endorsement policy, change the target peers, etc. However the error is still happening. My code is here: https://gist.github.com/mtnieto/459b75c915ea732d52383fe14395b246 The config file is the following: https://gist.github.com/mtnieto/3442cbd5d2617fcfafcabbf13fb6953c Help pls! :sweat:

yacovm (Mon, 12 Aug 2019 12:44:53 GMT):
are you using an admin certificate, @mtng ?

yacovm (Mon, 12 Aug 2019 12:46:31 GMT):
please put the logs of the peers in debug

yacovm (Mon, 12 Aug 2019 12:46:38 GMT):
and then say what they print about the policy violation

sstone1 (Mon, 12 Aug 2019 12:52:05 GMT):
@mtng both your install and instantiate operations need a `txId` parameter, and you must specify `useAdmin` in the newTransactionID call - e.g. `const txId = client.newTransactionID(true);`

sstone1 (Mon, 12 Aug 2019 12:53:59 GMT):
the other thing that is missing is that your instantiate transaction won't get ordered or committed - you need some additional code after `sendInstantiateProposal`

sstone1 (Mon, 12 Aug 2019 12:57:15 GMT):
there's some code examples here if that's of any help: https://github.com/sstone1/fabops

medikent (Mon, 12 Aug 2019 17:57:11 GMT):
How significant are the changes to the Fabric SDK Node 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?

davidkhala (Tue, 13 Aug 2019 04:03:38 GMT):
@bretharrison Hi bret, community has a question about what does the 1.4.4 and 1.4.5 stand for. Fabric core only updated to 1.4.2.

mtng (Tue, 13 Aug 2019 05:36:18 GMT):
Hi, thanks @yacovm @sstone1 . I have fixed with this: const txId = client.newTransactionID(true);

sstone1 (Tue, 13 Aug 2019 06:38:43 GMT):
The application SDKs and the smart contract SDKs for Java and Node.js are moving to a model where they release more frequently. This means that enhancements and bug fixes make it into the hands of users much more quickly than they did before. Any 1.4.x SDK will work with any 1.4.x Fabric.

sstone1 (Tue, 13 Aug 2019 06:45:41 GMT):
The major changes are chaincode lifecycle. AFAIK, new chaincode deployment model (external builders) has no SDK impact. There’s also work that will continue to be done on top of the programming model enhancements delivered in 1.4.

sahilgoel (Tue, 13 Aug 2019 10:04:28 GMT):
Please check https://stackoverflow.com/questions/57472814/hyperledger-fabric-node-sdk-specify-target-peers-in-invoke

sahilgoel (Tue, 13 Aug 2019 10:04:42 GMT):
I am using the Hyperledger fabric 1.4.1. The network contains the following organisations: 1. Org1 2. Org2 3. Org3 4. Org4 The ordering service is Raft & each organisation contains two peers. The endorsement policy is OR(Org1.peer, Org2.peer, Org3.peer, Org4.peer). I have deployed the SDK for the Org1. The SDK connection profile contains the details of the Org1 and the service discovery is enabled. M transactions are working fine with both the endorsement policy whether it is OR or AND between organisations. Now I would like to endorse the transactions based on transaction type, say T1 will be endorsed by Org1 and Org3 & T2 will be endorsed by Org2 and Org4 but the data will be synced between all the organsiations. This thing is possible when I use the endorsement policy OR between the Organisations and invokes the chain code specifying the peer addresses of the two organisation peers. The transaction is endorsed by both the Organisations in that case. But I am having issue it doing with the SDK side. I thought this would help me to achieve the above requirement but it is not https://fabric-sdk-node.github.io/release-1.4/tutorial-discovery.html I tried to use the requiredOrgs: ['Org2MSP', 'Org3MSP'] in the transaction proposal but the transaction is endorsed by only one organisation not the both. So is there any way to achieve that the transaction is validated by both the organisations. Note: When I checked the sendTransactionProposal method its prototype is: public sendTransactionProposal(request: ChaincodeInvokeRequest, timeout?: number): Promise; And ChaincodeInvokeRequest is: export interface ChaincodeInvokeRequest { targets?: Peer[] | string[]; chaincodeId: string; endorsement_hint?: DiscoveryChaincodeInterest; txId: TransactionId; transientMap?: TransientMap; fcn?: string; args: string[]; ignore?: string[]; preferred?: string[]; } The mentioned keys in the document are not even part of this request body.

GuillaumeCisco (Tue, 13 Aug 2019 13:39:59 GMT):
Hello guys, I see in fabric node way to create smart contract that there is a `Context` class, does the equivalent exists in the GO smart contract library? THanks

GuillaumeCisco (Tue, 13 Aug 2019 13:39:59 GMT):
Hello guys, I see in fabric node way to create smart contract that there is a `Context` class, does the equivalent exist in the GO smart contract library? THanks

GuillaumeCisco (Tue, 13 Aug 2019 13:39:59 GMT):
Hello guys, I see in fabric node way to create smart contract that there is a `Context` class, does the equivalent exist in the GO smart contract library? Thanks

davidkhala (Tue, 13 Aug 2019 15:02:03 GMT):
Hello guys, I see in fabric node way to create smart contract that there is a `Context` class, does the equivalent exist in the GO smart con

davidkhala (Tue, 13 Aug 2019 15:03:08 GMT):
Context is special design in wrapper module fabric-contract-api. It dedicate to help people using fabric-chaincode-node. For golang chaincode, I think most relevant couterpart is still ChaincodeStub

bretharrison (Tue, 13 Aug 2019 16:25:26 GMT):
You may wish to try `requiredOrgs: ['Org1MSP', 'Org3MSP']`, to limit the orgs when you want the request to endorsed by just org1 and org3, and then use `requiredOrgs: ['Org2MSP', 'Org4MSP']` when you want the request to be endorsed by just org2 and org4.

bretharrison (Tue, 13 Aug 2019 16:25:26 GMT):
You may wish to try `requiredOrgs: ['Org1MSP', 'Org3MSP']`, to limit the orgs when you want the request to endorsed by just org1 and org3, and then use `requiredOrgs: ['Org2MSP', 'Org4MSP']` when you want the request to be endorsed by just org2 and org4. https://fabric-sdk-node.github.io/release-1.4/global.html#ChaincodeInvokeRequest__anchor

bretharrison (Tue, 13 Aug 2019 16:30:24 GMT):
You may wish to try `requiredOrgs: ['Org1MSP', 'Org3MSP']`, to limit the orgs when you want the request to endorsed by just org1 and org3, and then use `requiredOrgs: ['Org2MSP', 'Org4MSP']` when you want the request to be endorsed by just org2 and org4. https://fabric-sdk-node.github.io/release-1.4/global.html#ChaincodeInvokeRequest__anchor

sahilgoel (Wed, 14 Aug 2019 05:04:02 GMT):
It is not working. That is the reason I posted here

sahilgoel (Wed, 14 Aug 2019 05:05:41 GMT):
In ahe above example I meant to say like if I specify requiredOrgs: ['Org2MSP', 'Org3MSP'] then the transaction is still endoresed by only one oraganisation. not the both

sahilgoel (Wed, 14 Aug 2019 06:46:23 GMT):
Please check this https://stackoverflow.com/questions/57472814/hyperledger-fabric-node-sdk-specify-target-peers-in-invoke

sahilgoel (Wed, 14 Aug 2019 06:46:28 GMT):
I added more information there

GuillaumeCisco (Wed, 14 Aug 2019 07:46:35 GMT):
Thanks

bretharrison (Wed, 14 Aug 2019 13:11:42 GMT):
you may wish to turn on debug log to see the actual plan returned from the discovery service on the peer. The plan will return multiple layouts, which the NodeSDK will try one at a time to get a complete endorsement.

bretharrison (Wed, 14 Aug 2019 13:40:34 GMT):
I see your issue with the targets not being used when discovery is turned on. I have opened jira https://jira.hyperledger.org/browse/FABN-1348 to fix this.

Puneeth987 (Thu, 15 Aug 2019 07:19:33 GMT):
how to removes peers from the node using sdks?

bpoudel (Thu, 15 Aug 2019 16:30:42 GMT):
Has joined the channel.

bpoudel (Thu, 15 Aug 2019 16:30:42 GMT):
When I try to access the role of the user it returns me null. All I did was this: return fabric_ca_client.register({enrollmentID: username, enrollmentSecret: password, max_enrollments:-1, affiliation:'', role:'exporter', attrs:attrs}, admin_user)

bpoudel (Thu, 15 Aug 2019 16:42:22 GMT):
How do I access a role of from a fabric_client?

GowriR (Fri, 16 Aug 2019 07:24:21 GMT):
thanks soumyanayak

GowriR (Fri, 16 Aug 2019 07:24:24 GMT):
it has

adineshreddy1 (Fri, 16 Aug 2019 11:41:48 GMT):
Has joined the channel.

davidkhala (Sat, 17 Aug 2019 01:01:38 GMT):
Simply stop that peer process/docker container for now

davidkhala (Sat, 17 Aug 2019 01:02:33 GMT):
@sstone1 hi Simon, would you mind review it again? https://gerrit.hyperledger.org/r/#/c/fabric-sdk-node/+/32205/

sahilgoel (Mon, 19 Aug 2019 03:53:12 GMT):
Yeah I tried to run in the debug mode. The endorsement plans are correctly returned. But I realised later that only one peer is randomly getting selected for the endorsement.

sahilgoel (Mon, 19 Aug 2019 03:53:51 GMT):
Now I understand, I have to use the targets property to send the proposal to multiple peers.

sahilgoel (Mon, 19 Aug 2019 03:54:32 GMT):
Thanks for opening and confirming the bug.

Salaria_77 (Mon, 19 Aug 2019 04:31:40 GMT):
Has joined the channel.

ygnr (Mon, 19 Aug 2019 06:15:19 GMT):
ygnr

saurabhsingh121 (Mon, 19 Aug 2019 10:36:10 GMT):
Has joined the channel.

Puneeth987 (Mon, 19 Aug 2019 11:16:10 GMT):
any one knows how to revoke certificate using node js

mahoney1 (Mon, 19 Aug 2019 15:44:57 GMT):
use FabricCAClient https://fabric-sdk-node.github.io/release-1.4/FabricCAClient.html#revoke__anchor - something like `ca.revoke({enrollmentID: enrollmentID}, adminIdentity);` you must also update the relevant org MSP configuration with a CRL generated from the CA; see this page for more info: https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#generating-a-crl-certificate-revocation-list

galaxystar (Tue, 20 Aug 2019 01:25:14 GMT):
Has joined the channel.

Puneeth987 (Tue, 20 Aug 2019 07:38:23 GMT):
I am revoking the org. i got below output. but still i am able to query in revoking ORG Revoke was successful: {RevocationRequest:{Name:admin Serial: AKI: Reason: CAName:ca-org3 GenCRL:false}} 2019/08/20 07:30:39 [INFO] 172.31.0.1:50152 POST /api/v1/revoke 200 0 "OK"

mahoney1 (Tue, 20 Aug 2019 09:13:08 GMT):
see https://jira.hyperledger.org/browse/FABN-1144 for more info

asaningmaxchain123 (Tue, 20 Aug 2019 13:21:30 GMT):
@sstone1 can you take a look?

asaningmaxchain123 (Tue, 20 Aug 2019 13:21:31 GMT):
https://gerrit.hyperledger.org/r/#/c/fabric-sdk-node/+/33015/

Swhit210 (Tue, 20 Aug 2019 18:26:34 GMT):
Has joined the channel.

Swhit210 (Tue, 20 Aug 2019 18:26:35 GMT):
At the bottom of this page: https://fabric-sdk-node.github.io/release-1.4/tutorial-private-data.html, there are instructions to set args equal to an empty array "args: []" and then set transientMap to an object with string properties and buffer values. In all my tests, I receive a JSON error, `Error: transaction returned with failure: SyntaxError: Unexpected token u in JSON at position 0` when args is set to an empty array. I have version 1_3 application capabilities set to true.

Swhit210 (Tue, 20 Aug 2019 18:26:35 GMT):
At the bottom of this page: https://fabric-sdk-node.github.io/release-1.4/tutorial-private-data.html, there are instructions to set args equal to an empty array "args: []" and then set transientMap to an object with string properties and buffer values. In all my tests, I receive a JSON error, `Error: transaction returned with failure: SyntaxError: Unexpected token u in JSON at position 0` when args is set to an empty array. I have version 1_3 application capabilities set to true. Is there another location/another setting that allows an empty array to be passed?

Swhit210 (Tue, 20 Aug 2019 18:26:35 GMT):
I am working on implementing private data. At the bottom of this page: https://fabric-sdk-node.github.io/release-1.4/tutorial-private-data.html, there are instructions to set args equal to an empty array "args: []" and then set transientMap to an object with string properties and buffer values. In all my tests, I receive a JSON error, `Error: transaction returned with failure: SyntaxError: Unexpected token u in JSON at position 0` when args is set to an empty array. If args is set to what it normally is during transactions, everything goes through successfully. Any thoughts on why args:[] is not accepted?

narendranathreddy (Wed, 21 Aug 2019 04:43:12 GMT):
Has joined the channel.

paranjan (Wed, 21 Aug 2019 09:53:27 GMT):
Has left the channel.

Swhit210 (Wed, 21 Aug 2019 17:51:10 GMT):
Might be a silly question, but has anyone successfully converted the transientMap from getTransient() into an acceptable value for putPrivateData using the node sdk for contract and shim?

JonathanC (Wed, 21 Aug 2019 18:07:28 GMT):
You have to update the channel config @Puneeth987 .

jyellick (Thu, 22 Aug 2019 01:31:57 GMT):
FYI, the node SDK CI on master seems to be broken. When token support was removed from v2.0, looks like a lot of the tests got broken.

Puneeth987 (Thu, 22 Aug 2019 04:45:57 GMT):
What i need to update in channel.. ?

generak (Thu, 22 Aug 2019 04:52:20 GMT):
just in case anyone else has been wondering how to invoke transactions by passing in a user's certificate and private key (e.g. using some sort of DB as a wallet store other than couchdb, and passing in the returned priv key/cert, or allowing user's to store their own priv key/certs), I've written up a proof-of-concept for it. Haven't seen anything like this around the place, so thought I'd share it with you all :D https://gist.github.com/JacksonVD/b82e13fad7b3c47567fa8d0b9044c5ed

ShrutiHK (Thu, 22 Aug 2019 06:05:35 GMT):
I am getting an error while invoking and querying chaincode using node-sdk - Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] I checked the CORE_PEER_LOCALMSPID, but it seems alright. what might be the issue?

davidkel (Thu, 22 Aug 2019 06:24:24 GMT):
Thanks for the example, You might want to take a look at the InMemoryWallet capability as it exists for exactly that reason, allowing you to persist your certs/private keys as required and load them yourself via the InMemoryWallet into memory for use. You do highlight a minor issue though that a wallet is currently actually optional not mandatory because a preconfigured client instance with an associated identity can be passed into the gateway.

davidkel (Thu, 22 Aug 2019 06:24:24 GMT):
Many thanks for the example, Have you looked at the InMemoryWallet capability of fabric-network ? It exists for exactly that reason, allowing you to persist your certs/private keys as required and load them yourself via the InMemoryWallet into memory for use. You do highlight a minor issue though that a wallet is currently actually optional not mandatory because a preconfigured client instance with an associated identity can be passed into the gateway.

davidkel (Thu, 22 Aug 2019 07:55:10 GMT):
You do highlight the fact that there isn't an example showing the InMemoryWallet to show how to do your own persistence. Maybe you would like to contribute an example ?

Puneeth987 (Thu, 22 Aug 2019 10:29:25 GMT):
which part i need to update #jonathanC

sstone1 (Thu, 22 Aug 2019 12:33:24 GMT):
hmmm, not sure why it's failing - it looks like a CI problem - i've kicked off another `reverify` to see if it's fixed

sstone1 (Thu, 22 Aug 2019 12:40:19 GMT):
@asaningmaxchain123 can you hit the "rebase" button on your CR so you pick up the CI fix that resolves this?

mahoney1 (Thu, 22 Aug 2019 14:17:42 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

soumyanayak (Thu, 22 Aug 2019 14:28:50 GMT):
Hi All, While trying to fetch the records from blockchain i am getting the error as shown in the screenshot.

soumyanayak (Thu, 22 Aug 2019 14:28:53 GMT):

Clipboard - August 22, 2019 7:58 PM

mahoney1 (Thu, 22 Aug 2019 15:28:41 GMT):
@soumyanayak either using an old chaincode image or calling/catching a function that doesn't exist (per your screenshot). You could clear out old docker image / upgrade/instantiate new contract version

gdinhof (Sat, 24 Aug 2019 06:32:28 GMT):
Has joined the channel.

bis2019 (Sun, 25 Aug 2019 09:37:28 GMT):
Has joined the channel.

chainsaw (Sun, 25 Aug 2019 23:32:08 GMT):
Has joined the channel.

chainsaw (Sun, 25 Aug 2019 23:38:51 GMT):
The logging tutorial says to add "hfc-logging": "{'debug':'console', 'info':'console'}" to default.json. I added this to fabric-client's config/default.json, but don't see any debug out to my console. What else do I need to do to output to console all of the logger.debug messages in the code? I don't want a file. I want to see it printing in my WebStorm debug console where the console.log message are printing.

chainsaw (Sun, 25 Aug 2019 23:38:51 GMT):
The logging tutorial says to add "hfc-logging": "{'debug':'console', 'info':'console'}" to default.json. I added this to fabric-client's config/default.json, but don't see any debug out to my console. What else do I need to do to output to console all of the logger.debug messages in the code? I don't want a file. I want to see it printing in my WebStorm debug console where the console.log messages are printing.

chainsaw (Sun, 25 Aug 2019 23:38:51 GMT):
The logging tutorial says to add "hfc-logging": "{'debug':'console', 'info':'console'}" to default.json. I added this to fabric-client's config/default.json, but don't see any debug out to my console. What else do I need to do to output to console all of the logger.debug messages in the code? I don't want a file. I want to see it printing in my WebStorm debug console where the console.log messages are printing. Is there a log level I need to set to 'debug' to get the debug messages to output?

chainsaw (Sun, 25 Aug 2019 23:38:51 GMT):
The logging tutorial says to add "hfc-logging": "{'debug':'console', 'info':'console'}" to default.json. I added this to fabric-client's config/default.json, but don't see any debug out to my console. What else do I need to do to output to console all of the logger.debug messages in the code? I don't want a file. I want to see it printing in my WebStorm debug console or terminal where the console.log messages are printing. Is there a log level I need to set to 'debug' to get the debug messages to output?

chainsaw (Sun, 25 Aug 2019 23:38:51 GMT):
The logging tutorial says to add "hfc-logging": "{'debug':'console', 'info':'console'}" to default.json. I added this to fabric-client's config/default.json, but don't see any debug out to my console. What else do I need to do to output to console all of the logger.debug messages in the code? I don't want a file. I want to see it printing in my WebStorm debug console or terminal where the console.log messages are printing. Is there a log level I need to set to 'debug' to get the debug messages to output?

chainsaw (Sun, 25 Aug 2019 23:38:51 GMT):
The logging tutorial says to add "hfc-logging": "{'debug':'console', 'info':'console'}" to default.json. I added this to fabric-client's config/default.json, but don't see any debug out to my console. What else do I need to do to output to console all of the logger.debug messages in the code? I don't want a file. I want to see it printing in my WebStorm debug console or terminal where the console.log messages are printing. Is there a log level I need to set to 'debug' to get the debug messages to output? It is important to see these to learn the inner workings and build knowledge to support client and contribute.

chainsaw (Sun, 25 Aug 2019 23:42:22 GMT):

Clipboard - August 25, 2019 6:42 PM

chainsaw (Sun, 25 Aug 2019 23:43:53 GMT):

Clipboard - August 25, 2019 6:43 PM

ajmeraharsh (Mon, 26 Aug 2019 05:45:48 GMT):
Hi all, Is there a way to get the list of `all private collections` or to check if a `specific private collection` exists?

soumyanayak (Tue, 27 Aug 2019 08:45:11 GMT):
Hi team, can we use the latest versions of node (v10.16.0) and npm(v5.1.0) in fabric for chaincode and in node SDK ?

soumyanayak (Tue, 27 Aug 2019 08:45:32 GMT):
for Fabric - v1.4.3 and 2.0.0 alpha

rthatcher (Tue, 27 Aug 2019 09:14:43 GMT):
Node v10 is supported and npm v5.5.1. The supported versions are in this doc: https://github.com/hyperledger/fabric-sdk-node

soumyanayak (Tue, 27 Aug 2019 09:16:14 GMT):
ok thanks @rthatcher

rthatcher (Tue, 27 Aug 2019 10:42:30 GMT):
I have tried to get the debugging output using default.json but not succeeded yet, however I have debug output when using an environment variable `export HFC_LOGGING='{"debug":"console","info":"console"}'`

soumyanayak (Tue, 27 Aug 2019 12:58:28 GMT):
Hi team, I was trying to do a load test of 50 users for fetching records from blockchain concurrently. Node SDK is used. So 45 users returned the output results correctly but for 5 users it showed the below error. Can you please tell me what's this error mean? Error: No identity has been assigned to this client at Client._getSigningIdentity (/home/ldbcadmin/LDBCApp/node_modules/fabric-client/lib/Client.js:1290:11) at Client.newTransactionID (/home/ldbcadmin/LDBCApp/node_modules/fabric-client/lib/Client.js:645:33) at Contract.createTransactionID (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:79:35) at new Transaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/transaction.js:56:34) at Contract.createTransaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:129:23) at Contract.evaluateTransaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:172:15) at app.get (/home/ldbcadmin/LDBCApp/app.js:113:30) at

soumyanayak (Tue, 27 Aug 2019 12:58:28 GMT):
Hi team, *I was trying to do a load test of 50 users for fetching records from blockchain concurrently. Node SDK is used. So 45 users returned the output results correctly but for 5 users it showed the below error. Can you please tell me what's this error mean?* Error: No identity has been assigned to this client at Client._getSigningIdentity (/home/ldbcadmin/LDBCApp/node_modules/fabric-client/lib/Client.js:1290:11) at Client.newTransactionID (/home/ldbcadmin/LDBCApp/node_modules/fabric-client/lib/Client.js:645:33) at Contract.createTransactionID (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:79:35) at new Transaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/transaction.js:56:34) at Contract.createTransaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:129:23) at Contract.evaluateTransaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:172:15) at app.get (/home/ldbcadmin/LDBCApp/app.js:113:30) at

soumyanayak (Tue, 27 Aug 2019 12:58:28 GMT):
Hi team, *I was trying to do a load test of 50 users for fetching records from blockchain concurrently.* *Node SDK is used.* *So 45 users returned the output results correctly but for 5 users it showed the below error. Can you please tell me what's this error mean?* Error: No identity has been assigned to this client at Client._getSigningIdentity (/home/ldbcadmin/LDBCApp/node_modules/fabric-client/lib/Client.js:1290:11) at Client.newTransactionID (/home/ldbcadmin/LDBCApp/node_modules/fabric-client/lib/Client.js:645:33) at Contract.createTransactionID (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:79:35) at new Transaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/transaction.js:56:34) at Contract.createTransaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:129:23) at Contract.evaluateTransaction (/home/ldbcadmin/LDBCApp/node_modules/fabric-network/lib/contract.js:172:15) at app.get (/home/ldbcadmin/LDBCApp/app.js:113:30) at

jfilippone (Tue, 27 Aug 2019 18:30:02 GMT):
Has joined the channel.

jfilippone (Tue, 27 Aug 2019 18:30:03 GMT):
I am using the node sdk and registering chaincode event listeners. I see that it should be able to replay events that happen while the listener is down. I am using the addContractListener method from fabric-network.Contract. If I knock out the listening application and bring it back up, it does catch up on events but once it hits a checkpoint, it fails to bring the listener back up. It looks like in the code, it is connecting the eventHub first, then registering the chaincode event and during that registration it fails because there is a start block defined (because we have passed a checkpoint) and the event hub is already connected. I get that you're not suppose to register the event again but don't see any options for reconnecting to the event hub to get the events but not registering the event through the fabric-network interface. Can anyone help?

mahoney1 (Wed, 28 Aug 2019 09:04:06 GMT):
might be best to add your code and background (fabric version, environment etc) as a Stack Overflow question - similar issue reported and answered here https://stackoverflow.com/questions/52536257/no-identity-error-in-hyperledger-fabric/55686825#55686825

14gracel (Wed, 28 Aug 2019 09:18:15 GMT):
Which version of the node sdk are you using?

soumyanayak (Wed, 28 Aug 2019 09:54:10 GMT):
@mahoney1 i checked the stack overflow links where they have asked to include the below statement -- *await channel.initialize({ discover: true });* *My Code looks like as below . But not sure where to add the above statement* let connectionProfile = yaml.safeLoad(fs.readFileSync(CONNECTION_PROFILE_PATH, 'utf8')); // Need to setup the user credentials from wallet const wallet = new FileSystemWallet(FILESYSTEM_WALLET_PATH) // Set up the connection options let connectionOptions = { identity: USER_ID, wallet: wallet, discovery: { enabled: true, asLocalhost: true } /*** Uncomment lines below to disable commit listener on submit ****/ , eventHandlerOptions: { strategy: null } } // Connect gateway to the network await gateway.connect(connectionProfile, connectionOptions) const network = await gateway.getNetwork('legaldescriptionchannel'); // Get the contract from the network. const contract = network.getContract('ldbc'); var result = await contract.evaluateTransaction('GetLegal', req.query.propertyid.toString()); res.send(result.toString());

mahoney1 (Wed, 28 Aug 2019 10:06:24 GMT):
that won't help you (in this instance) - I would check your docker container logs first to find out more info on the 5 identities that failed assignment (given their wallet/identity combo) ?

soumyanayak (Wed, 28 Aug 2019 10:07:56 GMT):
you are asking about peer docker container logs? as the error i was getting in node SDK server output

mahoney1 (Wed, 28 Aug 2019 10:11:36 GMT):
did your output have This client instance must be assigned an user context prior to the message extract posted?

soumyanayak (Wed, 28 Aug 2019 10:14:12 GMT):
i have one user and the same user is used by all the 50 threads from the load test client to submit 50 request at the same time

soumyanayak (Wed, 28 Aug 2019 10:14:43 GMT):
only when failed this out put is coming from the code line below var result = await contract.evaluateTransaction('GetLegal', req.query.propertyid.toString());

soumyanayak (Wed, 28 Aug 2019 10:44:19 GMT):
when concurrent users going more than 40 this issue is coming

soumyanayak (Wed, 28 Aug 2019 11:29:17 GMT):
@mahoney1 before the error message below is the logger "_getSigningIdentity - admin parameter is boolean :false"

jfilippone (Wed, 28 Aug 2019 12:22:28 GMT):
1.4.1

jfilippone (Wed, 28 Aug 2019 12:22:39 GMT):
I just found this: https://jira.hyperledger.org/browse/FABN-1308

jfilippone (Wed, 28 Aug 2019 12:22:43 GMT):
looks like it is a bug

14gracel (Wed, 28 Aug 2019 12:43:20 GMT):
Id suggest updating to the latest version of the sdk. I believe that bug was fixed in a later version

jfilippone (Wed, 28 Aug 2019 12:50:30 GMT):
I'll try that out; but the issue does say it is unresolved on jira..

rodolfoleal (Thu, 29 Aug 2019 00:38:29 GMT):
Has joined the channel.

rodolfoleal (Thu, 29 Aug 2019 00:39:08 GMT):
Hi Guys, what is recomended for performance in a rest service with high troughput. Create a single gateway and contract instance from application startup or create for every request?

rodolfoleal (Thu, 29 Aug 2019 00:42:35 GMT):
For now im creating new instances every request just wondering if it could be improved.

davidkel (Thu, 29 Aug 2019 06:47:45 GMT):
this stackoverflow question should help https://stackoverflow.com/questions/56692096/hlf-1-4-multiple-user-gateway

rodolfoleal (Thu, 29 Aug 2019 11:18:48 GMT):
in the next weeks. I wil do the same test here, need to scale to 120/s on each Org, I this happen i will let you know if not I can share the ode to find out the differences.

soumyanayak (Thu, 29 Aug 2019 11:32:15 GMT):
sure thanks @rodolfoleal

davidkel (Thu, 29 Aug 2019 11:48:31 GMT):
In your code, it looks like you have a single `gateway` instance and are constantly connecting it. If that is the case then that pattern is not good and could cause unexpected errors which might explain the errors you are seeing. A gateway instance should only ever be connected once.

soumyanayak (Thu, 29 Aug 2019 12:08:47 GMT):
so @davidkel how to go about the code then in case of multiple users - any example or sample or any modification to the above would be great help

Puneeth987 (Thu, 29 Aug 2019 13:37:31 GMT):
Hi friends, I am getting when i am using orderer type= etcdraft. tls: bad certificate server=Ordererremoteaddress=172.25.0.12:52966 any idea to solve the problem

Puneeth987 (Thu, 29 Aug 2019 13:37:31 GMT):
Hi friends, I am getting tls: bad certificate server=Ordererremoteaddress=172.25.0.12:52966. when i am using orderer type= etcdraft. any idea to solve the problem

davidkel (Thu, 29 Aug 2019 13:48:50 GMT):
I've not seen any practical example sorry. This stackoverflow provides some insight https://stackoverflow.com/questions/56692096/hlf-1-4-multiple-user-gateway Also there is a Jira here https://jira.hyperledger.org/browse/FABN-1319

ItaloCarrasco (Thu, 29 Aug 2019 14:27:32 GMT):
but if you open multiple connections for each user doing a request the tps would be low, wouldnt it?

davidkel (Thu, 29 Aug 2019 14:33:30 GMT):
You have a single gateway for each user. Gateways can multiplex requests for that user

davidkel (Thu, 29 Aug 2019 14:33:30 GMT):
You have a single gateway for each user. Gateways can multiplex requests for that user, you can make simultaneous requests to different gateway instances

venzi (Thu, 29 Aug 2019 14:48:06 GMT):
Hey guys How would I get the TLS certs for an identity that is being reenrolled? When enrolling it, the `profile` field of the request provides a way to get the TLS certs, and since I don't have the `secret` it has to be a reenroll operation.

rodolfoleal (Thu, 29 Aug 2019 16:50:58 GMT):
So since I will only have one sdk user, i can create a single gateway on startup and keep that for the application lifetime to provide multiple rest requests? Would that be the recommended approach?

rodolfoleal (Thu, 29 Aug 2019 16:54:13 GMT):
In my scenario many users will do api requests with only one user/gateway connecting to fabric and performing all the transactions.

rodolfoleal (Thu, 29 Aug 2019 18:02:01 GMT):
I tooka a look ate sdk code and Looks like generate new gateway each request dont have a huge drawn back.

davidkel (Thu, 29 Aug 2019 18:03:12 GMT):
It will have a big impact. If you only have a single user then you only need a single gateway and drive all requests through networks off of that gateway

rodolfoleal (Thu, 29 Aug 2019 18:20:51 GMT):
Great, i will move to that approach and set a single gateway instance for whole application.

rodolfoleal (Thu, 29 Aug 2019 18:21:24 GMT):
Thanks

davidkel (Thu, 29 Aug 2019 18:24:51 GMT):
:thumbsup:

RuiPanNewbie (Thu, 29 Aug 2019 19:33:42 GMT):
Has joined the channel.

Utsav_Solanki (Fri, 30 Aug 2019 06:24:48 GMT):
Has joined the channel.

Utsav_Solanki (Fri, 30 Aug 2019 06:24:49 GMT):
how to create multiple wallet in skf

Utsav_Solanki (Fri, 30 Aug 2019 06:24:49 GMT):
how to create multiple wallet in sdk

mahoney1 (Fri, 30 Aug 2019 09:03:08 GMT):
this gist I've posted creates multiple wallets/identities for a given Org, provided as params (see usage in the Gist) -> https://gist.github.com/mahoney1/4667768244fee45e8f87a24fce3e9d26

mahoney1 (Fri, 30 Aug 2019 09:03:08 GMT):
this gist (code sample using the new Fabric 1.4 programming model) that I've posted creates multiple wallets/identities for a given Org, provided as params (see usage in the Gist) -> https://gist.github.com/mahoney1/4667768244fee45e8f87a24fce3e9d26

mahoney1 (Fri, 30 Aug 2019 09:03:08 GMT):
@Utsav_Solanki this gist (code sample using the new Fabric 1.4 programming model) that I've posted creates multiple wallets/identities for a given Org, provided as params (see usage in the Gist) -> https://gist.github.com/mahoney1/4667768244fee45e8f87a24fce3e9d26

mahoney1 (Fri, 30 Aug 2019 09:03:08 GMT):
@Utsav_Solanki this gist (code sample using the new Fabric 1.4 programming model) that I've posted creates multiple wallets/identities for a given Org, provided as params (see usage in the Gist) - may help you -> https://gist.github.com/mahoney1/4667768244fee45e8f87a24fce3e9d26

mahoney1 (Fri, 30 Aug 2019 09:03:08 GMT):
@Utsav_Solanki this gist (code sample using the new Fabric 1.4 programming model) that I've posted creates multiple wallets/identities for a given Org (and matched to the CA for the org in the connection.json), provided as params (see usage in the Gist) - may help you -> https://gist.github.com/mahoney1/4667768244fee45e8f87a24fce3e9d26

Utsav_Solanki (Fri, 30 Aug 2019 09:17:08 GMT):
thanks

phantom.assasin (Fri, 30 Aug 2019 10:34:21 GMT):
Repost: Any way to remove a peer from a channel? (Node-sdk)

Puneeth987 (Fri, 30 Aug 2019 12:01:28 GMT):
hi Team I am stuck in instanstian of chain code using raft orderer I am facing with below error TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.29.0.13:54814 2019-08-30 11:21:28.010 UTC [grpc] handleRawConn -> DEBU 1d7c grpc: Server.Serve failed to complete security handshake from "172.29.0.13:54814": remote error: tls: bad certificate

Puneeth987 (Fri, 30 Aug 2019 12:01:28 GMT):
hi Team I am stuck in instanstian of chain code using raft orderer I am facing with below error this is Orderer logs. TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.29.0.13:54814 2019-08-30 11:21:28.010 UTC [grpc] handleRawConn -> DEBU 1d7c grpc: Server.Serve failed to complete security handshake from "172.29.0.13:54814": remote error: tls: bad certificate in oputput i got : instantiate-chaincode - Error: ChannelEventHub has been shutdown Please help me to resolve this problem.

Hengming (Fri, 30 Aug 2019 13:20:25 GMT):
Has joined the channel.

Hengming (Fri, 30 Aug 2019 13:21:45 GMT):
Fw here: fabric-sdk-node maintainers: there are two outgoing patch sets waiting for a while for CRs - 32205 and 32704 on Gerrit. Anyone can help to review them? Thanks a million.

Alexoid83 (Mon, 02 Sep 2019 08:12:03 GMT):
Has joined the channel.

Alexoid83 (Mon, 02 Sep 2019 08:12:04 GMT):
Is the assumption correct: when you initialize a new fabric sdk and directly invoking a chaincode, chances are high to get a "certificate signed by unknown authority" error, since the sdk had no time to gather TLS information of other orgs / nodes?

rthatcher (Mon, 02 Sep 2019 08:27:33 GMT):
If you use the `fabric-network` module and use Service Discovery when connecting the Gateway - then Service Discovery will manage the TLS certificates for you. If you are using the low-level programming model (not recommended) then you should specify the TLS certificates for all the nodes you connect to in a Connection Profile document.

rthatcher (Mon, 02 Sep 2019 08:27:33 GMT):
If you use the `fabric-network` module and use Service Discovery when connecting the Gateway - then Service Discovery will manage the TLS certificates for you. If you are using the low-level programming model (not recommended) then again you can use Service Discovery, or you should specify the TLS certificates for all the nodes you connect to in a Connection Profile document. (When Fabric is starting it _might_ be possible that there is some point when the TLS is not updated - but NOT when the SDK is initializing.)

Alexoid83 (Mon, 02 Sep 2019 11:12:10 GMT):
Yes, that's what I understood, but my question was more on the "warmup" phase of the sdk. If I initialize the sdk and directly trigger an invoke, is it possible that the sdk has not yet retrieved all TLS-CA certs and runs into an "unsigned by unknown authority error"? I am asking this in regards to a root cause analysis.

HLFPOC (Mon, 02 Sep 2019 17:06:40 GMT):
Hi Team, Can we get transaction commit time from any event listner in node sdk ? I am currently using `registerTxEvent `function to get the transaction id, can this event also return the transaction commit time ? Currently using fabric node sdk version 1.3

soumyanayak (Tue, 03 Sep 2019 10:40:50 GMT):
Hi team , Any update on the JIRA https://jira.hyperledger.org/browse/FABN-1319

bretharrison (Tue, 03 Sep 2019 22:19:28 GMT):
The SDK's, clients can not remove a peer from a channel. To remove a peer, stop the peer. If you wish to remove an entire organization, then the Channel configuration will have to be updated.

bretharrison (Tue, 03 Sep 2019 22:21:27 GMT):
Please open a JIRA to add this information to the information given to the applications when the listener's callback is called.

toddinpal (Wed, 04 Sep 2019 02:08:40 GMT):
How many connections does the Node.js make to a peer to handle multiple transaction listener events?

biligunb (Wed, 04 Sep 2019 03:39:04 GMT):
Hi I am trying to use FabricNetwork module submitTransaction. ``` async submitTransaction(name, ...args) { return this.createTransaction(name).submit(...args); } ``` What happens if transaction fails (endorsement) or orderer fails? Is there any retry method implemented?

biligunb (Wed, 04 Sep 2019 08:22:02 GMT):
repolicy

phantom.assasin (Wed, 04 Sep 2019 08:47:34 GMT):
@bretharrison But that peer could be part of other channels.

phantom.assasin (Wed, 04 Sep 2019 08:49:52 GMT):
@bretharrison If i want to remove an entire org, then what do I do? Send an update proposal to the channel with the updated config?

bretharrison (Wed, 04 Sep 2019 11:06:00 GMT):
You may wish to ask this type of question on the #fabric-peer-endorser-committer

bretharrison (Wed, 04 Sep 2019 11:06:00 GMT):
You may wish to ask how to remove a channel on peer on the #fabric-peer-endorser-committer channel

bretharrison (Wed, 04 Sep 2019 11:11:00 GMT):
Yes sending an update config is how it is done, https://fabric-sdk-node.github.io/release-1.4/tutorial-channel-create.html discusses the update.

bretharrison (Wed, 04 Sep 2019 11:22:44 GMT):
The application could open a connection to the Peer's event service that will stay open. The application may then regisister and receive notifications on any number of listeners.

bestbeforetoday (Wed, 04 Sep 2019 19:07:24 GMT):
It will throw an error if endorsement fails or the send to the order fails. You could then retry the call

bestbeforetoday (Wed, 04 Sep 2019 19:07:24 GMT):
It will throw an error if endorsement fails or the send to the orderer fails. You could then retry the call

VaibhavSharma (Thu, 05 Sep 2019 07:36:59 GMT):
Has joined the channel.

VaibhavSharma (Thu, 05 Sep 2019 07:37:00 GMT):
let identity=X509WalletMixin.createIdentity("Buyer1Org","-----BEGIN CERTIFICATE-----MIICNzCCAd2gAwIBAgIRAIXy7S1GYr40HKQI356ePlcwCgYIKoZIzj0EAwIwezELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHTAbBgNVBAoTFGJ1eWVyMS5kYXRhYmxvY2suY29tMSAwHgYDVQQDExdjYS5idXllcjEuZGF0YWJsb2NrLmNvbTAeFw0xOTA4MjkxMDIwMDBaFw0yOTA4MjYxMDIwMDBaMHAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQLEwZjbGllbnQxIzAhBgNVBAMMGkFkbWluQGJ1eWVyMS5kYXRhYmxvY2suY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeKRisEwflqkx2kmCkgrqdwa4rsSsHWy2sSFdqvqyOBKnhVOp4GC3AvgQQxMeafjhsf3hb6iftCskgTVSR/Njg6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg1eWQRZ3Jrs/7MdwvVcgPltleZmPbByfzMOEHmJOuZBMwCgYIKoZIzj0EAwIDSAAwRQIhANH+sXKwE8/wmPbYQa4oL4chqlWS9AC8iPr6t6tegpYAiA5hKcb7UcpFlo5LEV68QKVI/nW3eFOwuCuW3EhhxVDpQ==-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgWg6KoO/AMKG0qeebZxO9AR+rkP51IU7Gtu56O34yvQChRANCAAR4pGKwTB+WqTHaSYKSCup3BriuxKwdbLaxIV2q+rI4EqeFU6ngYcC+BBDEx5p+OGx/eFvqJ+0KySBNVJH82OD-----END PRIVATE KEY-----") const wallet=new FileSystemWallet(WALLET_TO_USE) wallet.import(USER_ID,identity) await wallet.exists(USER_ID).then((v)=>log(v)).catch((e)=>{log(e)})

VaibhavSharma (Thu, 05 Sep 2019 07:39:03 GMT):
async function test() { let identity=X509WalletMixin.createIdentity("Buyer1Org","-----BEGIN CERTIFICATE-----MIICNzCCAd2gAwIBAgIRAIXy7S1GYr40HKQI356ePlcwCgYIKoZIzj0EAwIwezELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHTAbBgNVBAoTFGJ1eWVyMS5kYXRhYmxvY2suY29tMSAwHgYDVQQDExdjYS5idXllcjEuZGF0YWJsb2NrLmNvbTAeFw0xOTA4MjkxMDIwMDBaFw0yOTA4MjYxMDIwMDBaMHAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQLEwZjbGllbnQxIzAhBgNVBAMMGkFkbWluQGJ1eWVyMS5kYXRhYmxvY2suY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeKRisEwflqkx2kmCkgrqdwa4rsSsHWy2sSFdqvqyOBKnhVOp4GC3AvgQQxMeafjhsf3hb6iftCskgTVSR/Njg6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg1eWQRZ3Jrs/7MdwvVcgPltleZmPbByfzMOEHmJOuZBMwCgYIKoZIzj0EAwIDSAAwRQIhANH+sXKwE8/wmPbYQa4oL4chqlWS9AC8iPgr6t6tegpYAsa5hKcb7UcpFlo5LEV68QKVI/nW3eFOwuCuW3EhhxVDpQ==-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgWg6KoO/AMKG0qeebZxO9AR+rkP51IU7Gtu56O34yvQChRANCAAR4pGKwTB+WqTHaSYKSCup3BriuxKwdbLaxIV2q+rI4EqeFU6ngYLcC+BBDExas+OGx/eFvqJ+0KySBNVJH82OD-----END PRIVATE KEY-----") const wallet=new FileSystemWallet(WALLET_TO_USE) wallet.import(USER_ID,identity) await wallet.exists(USER_ID).then((v)=>log(v)).catch((e)=>{log(e)}) } can anyone tell me why my wallet.exists() returns false in my code?

VaibhavSharma (Thu, 05 Sep 2019 07:41:16 GMT):
``` async function test() { let identity=X509WalletMixin.createIdentity("Buyer1Org","-----BEGIN CERTIFICATE-----MIICNzCCAd2gAwIBAgIRAIXy7S1GYr40HKQI356ePlcwCgYIKoZIzj0EAwIwezELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHTAbBgNVBAoTFGJ1eWVyMS5kYXRhYmxvY2suY29tMSAwHgYDVQQDExdjYS5idXllcjEuZGF0YWJsb2NrLmNvbTAeFw0xOTA4MjkxMDIwMDBaFw0yOTA4MjYxMDIwMDBaMHAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQLEwZjbGllbnQxIzAhBgNVBAMMGkFkbWluQGJ1eWVyMS5kYXRhYmxvY2suY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeKRisEwflqkx2kmCkgrqdwa4rsSsHWy2sSFdqvqyOBKnhVOp4GC3AvgQQxMeafjhsf3hb6iftCskgTVSR/Njg6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg1eWQRZ3Jrs/7MdwvVcgPltleZmPbByfzMOEHmJOuZBMwCgYIKoZIzj0EAwIDSAAwRQIhANH+sXKwE8/wmPbYQa4oL4chqlWS9AC8iPgr6t6tegpYfaA5hKcb7UcpFlo5LEV68QKVI/nW3eFOwuCuW3EhhxVDpQ==-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgWg6KoO/AMKG0qeebZxO9AR+rkP51IU7Gtu56O34yvQChRANCAAR4pGKwTB+WqTHaSYKSCup3BriuxKwdbLaxIV2q+rI4EqeFU6ngYLcC+BBDEadp+OGx/eFvqJ+0KySBNVJH82OD-----END PRIVATE KEY-----") const wallet=new FileSystemWallet(WALLET_TO_USE) wallet.import(USER_ID,identity) await wallet.exists(USER_ID).then((v)=>log(v)).catch((e)=>{log(e)}) } ```

VaibhavSharma (Thu, 05 Sep 2019 07:41:57 GMT):
can anyone tell me why wallet.exists() is returning false in my code? ``` async function test() { let identity=X509WalletMixin.createIdentity("Buyer1Org","-----BEGIN CERTIFICATE-----MIICNzCCAd2gAwIBAgIRAIXy7S1GYr40HKQI356ePlcwCgYIKoZIzj0EAwIwezELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHTAbBgNVBAoTFGJ1eWVyMS5kYXRhYmxvY2suY29tMSAwHgYDVQQDExdjYS5idXllcjEuZGF0YWJsb2NrLmNvbTAeFw0xOTA4MjkxMDIwMDBaFw0yOTA4MjYxMDIwMDBaMHAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQLEwZjbGllbnQxIzAhBgNVBAMMGkFkbWluQGJ1eWVyMS5kYXRhYmxvY2suY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeKRisEwflqkx2kmCkgrqdwa4rsSsHWy2sSFdqvqyOBKnhVOp4GC3AvgQQxMeafjhsf3hb6iftCskgTVSR/Njg6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg1eWQRZ3Jrs/7MdwvVcgPltleZmPbByfzMOEHmJOuZBMwCgYIKoZIzj0EAwIDSAAwRQIhANH+sXKwE8/wmPbYQa4oL4chqlWS9AC8iPgr6t6tegpYfaA5hKcb7UcpFlo5LEV68QKVI/nW3eFOwuCuW3EhhxVDpQ==-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgWg6KoO/AMKG0qeebZxO9AR+rkP51IU7Gtu56O34yvQChRANCAAR4pGKwTB+WqTHaSYKSCup3BriuxKwdbLaxIV2q+rI4EqeFU6ngYLcC+BBDEadp+OGx/eFvqJ+0KySBNVJH82OD-----END PRIVATE KEY-----") const wallet=new FileSystemWallet(WALLET_TO_USE) wallet.import(USER_ID,identity) await wallet.exists(USER_ID).then((v)=>log(v)).catch((e)=>{log(e)}) } ```

VaibhavSharma (Thu, 05 Sep 2019 07:43:11 GMT):
can anyone tell me why wallet.exists() is returning false in my code? ``` async function test() { let identity=X509WalletMixin.createIdentity("Buyer1Org","-----BEGIN CERTIFICATE-----MIICNzCCAd2gAwIBAgIRAIXy7S1GYr40HKQI356ePlcwCgYIKoZIzj0EAwIwezELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHTAbBgNVBAoTFGJ1eWVyMS5kYXRhYmxvY2suY29tMSAwHgYDVQQDExdjYS5idXllcjEuZGF0YWJsb2NrLmNvbTAeFw0xOTA4MjkxMDIwMDBaFw0yOTA4MjYxMDIwMDBaMHAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQLEwZjbGllbnQxIzAhBgNVBAMMGkFkbWluQGJ1eWVyMS5kYXRhYmxvY2suY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeKRisEwflqkx2kmCkgrqdwa4rsSsHWy2sSFdqvqyOBKnhVOp4GC3AvgQQxMeafjhsf3hb6iftCskgTVSR/Njg6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg1eWQRZ3Jrs/7MdwvVcgPltleZmPbByfzMOEHmJOuZBMwCgYIKoZIzj0EAwIDSAAwRQIhANH+sXKwE8/wmPbYQa4oL4chqlWS9AC8iPgr6t6tegpYfaA5hKcb7UcpFlo5LEV68QKVI/nW3eFOwuCuW3EhhxVDpQ==-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgWg6KoO/AMKG0qeebZxO9AR+rkP51IU7Gtu56O34yvQChRANCAAR4pGKwTB+WqTHaSYKSCup3BriuxKwdbLaxIV2q+rI4EqeFU6ngYLcC+BBDEadp+OGx/eFvqJ+0KySBNVJH82OD-----END PRIVATE KEY-----") const wallet=new InMemoryWallet() wallet.import(USER_ID,identity) await wallet.exists(USER_ID).then((v)=>log(v)).catch((e)=>{log(e)}) } ```

davidkel (Thu, 05 Sep 2019 08:03:41 GMT):
try ``` await wallet.import(USER_ID,identity) ```

VaibhavSharma (Thu, 05 Sep 2019 08:05:16 GMT):
thank you, forgot that it returns a promise!

rthatcher (Thu, 05 Sep 2019 14:23:02 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:+Community+Call

rodolfoleal (Thu, 05 Sep 2019 21:21:39 GMT):
Hi guys quick question.

rodolfoleal (Thu, 05 Sep 2019 21:22:16 GMT):
If i set the DefaultEventHandlerOptions as null for my gateway it will not wait for commit events?

rodolfoleal (Thu, 05 Sep 2019 21:22:59 GMT):
submitTransaction will return after send the transaction to order without commit garantee?

generak (Fri, 06 Sep 2019 06:21:54 GMT):
hey guys, just wondering why discovery looks only at the current organisation's peers? https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-network/lib/network.js#L79 should it not look at all organsations on the network?

generak (Fri, 06 Sep 2019 08:40:31 GMT):
turns out you can modify this by connecting to the gateway with discover: false, then enable it by setting the config 'initialize-with-discovery' to true for the gateway client, then re-initialising the channel.

sstone1 (Fri, 06 Sep 2019 08:49:42 GMT):
@generak in what scenario does looking at the current organisation's current peers not work for you? does your current organisation not have any peers in that channel?

generak (Fri, 06 Sep 2019 09:45:05 GMT):
@sstone1 yeah, i'm just trying to see how far I can get with enrolling end users in an org that doesn't have any peers on the network

generak (Fri, 06 Sep 2019 09:51:54 GMT):
quite a niche use case I'd imagine as it's not really necessary, but I'm trying to establish a logical separation between actual organisation users that would interact with their peers in the consortium (e.g. extending upon my project's work to query/submit against their peers directly rather than through our REST API), and regular users that would utilise the network through a web front-end.

sstone1 (Fri, 06 Sep 2019 09:52:58 GMT):
actually not that niche! there are several consortia where there are different tiers of participants - some with peers that endorse transactions, and some without peers that do not endorse transactions

generak (Fri, 06 Sep 2019 09:54:31 GMT):
yep, I was thinking I could achieve it pretty easily by just chucking a dummy committing peer in the org, but I wanted to see what I could do with just a CA as part of the org's architecture

sstone1 (Fri, 06 Sep 2019 09:55:05 GMT):
we need to support it - i think we had something open for this, @bestbeforetoday is the best person to comment

sstone1 (Fri, 06 Sep 2019 09:55:14 GMT):
(i think he's on vacation today though)

generak (Fri, 06 Sep 2019 09:58:29 GMT):
in the current state, it seems to be workable by adjusting the various handlers as part of the gateway connection to use strategies that select peers from the network rather than the organisation, and reinitialising the channel after.

bestbeforetoday (Fri, 06 Sep 2019 12:19:20 GMT):
That's correct. If you set `eventHandlerOptions.strategy` to `null` then `submitTransaction()` will submit proposals to endorsing peers and then send the endorsed transaction to the order, but will not wait for any commit events to be received from the peers. So this transactions _should_ be committed at some point in the future but any queries (`evaluateTransaction()`) you run immediately after the submit may be processed by peers before the commit happens and therefore see slightly older state that you were expecting. This can be useful where subsequent processing does not rely on the state following the commit of the previous transaction

bestbeforetoday (Fri, 06 Sep 2019 12:19:46 GMT):
Documentation here:

bestbeforetoday (Fri, 06 Sep 2019 12:19:46 GMT):
Documentation here: https://fabric-sdk-node.github.io/release-1.4/tutorial-transaction-commit-events.html

rodolfoleal (Fri, 06 Sep 2019 12:21:12 GMT):
Great Man, looking to migrate my application to be assyncronous. Will use other process to listen for events.

rodolfoleal (Fri, 06 Sep 2019 12:21:13 GMT):
Thanks

bestbeforetoday (Fri, 06 Sep 2019 12:21:43 GMT):
You're welcome! :)

bestbeforetoday (Fri, 06 Sep 2019 12:27:40 GMT):
@generak Could you raise a story in Jira for us to support this scenario? https://jira.hyperledger.org/projects/FABN

generak (Fri, 06 Sep 2019 12:33:55 GMT):
Absolutely :)

generak (Sat, 07 Sep 2019 01:05:11 GMT):
https://jira.hyperledger.org/browse/FABN-1376 story created :)

tbrunain (Sun, 08 Sep 2019 18:59:22 GMT):
Has joined the channel.

ping40 (Mon, 09 Sep 2019 01:07:28 GMT):
Has joined the channel.

Puneeth987 (Mon, 09 Sep 2019 12:46:07 GMT):

Clipboard - September 9, 2019 6:15 PM

tbrunain (Mon, 09 Sep 2019 13:04:35 GMT):
Is the fabric-ca-client Node SDK equivalent in features as the fabric-ca-client binary ? I'm wondering if I can create all the certificates and keys, via the sdk node, necessary to the setup from scratch of a fabric network ?

mahoney1 (Mon, 09 Sep 2019 15:32:07 GMT):
pretty much so yes, see more here -> https://fabric-sdk-node.github.io/FabricCAClient.html - depending on what your network access is (normally you'd gen certs for your own Org identities) you could use the node SDK - eg for a dev/test env setup, you could use the high-level `fabric-network` APIs (using the new prog model available since 1.4) to access the CA via fabric client and register/enrol new users, generate the identity's cert/key combo, create wallets etc. An example gist is here -> https://gist.github.com/mahoney1/4667768244fee45e8f87a24fce3e9d26

tbrunain (Mon, 09 Sep 2019 17:35:31 GMT):
Great thx !

HoneyShah (Tue, 10 Sep 2019 11:40:43 GMT):
Hello, I am facing following error while invoke transaction: ``` Error: There was a problem with the eventhub ::Error: Received status message on the block stream. status:BAD_REQUEST ``` There is no suspicious peer/orderer logs. Can anyone tell me what could be wrong here/

HoneyShah (Tue, 10 Sep 2019 11:40:43 GMT):
Hello, I am facing following error while invoke transaction: ``` Error: There was a problem with the eventhub ::Error: Received status message on the block stream. status:BAD_REQUEST ``` There is no suspicious peer/orderer logs. Can anyone tell me what could be wrong here?

AjayKalola (Tue, 10 Sep 2019 11:50:27 GMT):
Has joined the channel.

SarvottamKumar (Tue, 10 Sep 2019 11:56:56 GMT):
Has joined the channel.

VaibhavSharma (Wed, 11 Sep 2019 09:22:18 GMT):
actually I had to access other organisation's peer when i had a endorsing policy which requires peers of other org to endorse the transaction.

sstone1 (Wed, 11 Sep 2019 09:23:46 GMT):
right - but this problem is specifically about *service discovery* and which peer you use to discover other peers in the channel. ideally, this would be a peer in your organisation, but as generak found - there are scenarios where you need to use other peers for service discovery.

bretharrison (Wed, 11 Sep 2019 11:19:33 GMT):
Be sure to use the ChannelEventHub as EventHub is not supported as of v1.3.

HoneyShah (Wed, 11 Sep 2019 11:24:49 GMT):
I am using channelEventHub only

bretharrison (Wed, 11 Sep 2019 11:28:27 GMT):
Do you have a debug log

HoneyShah (Wed, 11 Sep 2019 11:28:54 GMT):
Only this log I am getting from api side.

HoneyShah (Wed, 11 Sep 2019 11:29:12 GMT):
Orderer and peer has no logs about it.

bretharrison (Wed, 11 Sep 2019 11:40:58 GMT):
I was hoping for more logging by the NodeSDK, export HFC_LOGGING='{"debug":"console"}'

bretharrison (Wed, 11 Sep 2019 11:46:07 GMT):
console could also be a file

HoneyShah (Wed, 11 Sep 2019 11:46:46 GMT):
Where should I export this variable?

bretharrison (Wed, 11 Sep 2019 11:47:21 GMT):
Where the node.js is running

HoneyShah (Wed, 11 Sep 2019 12:53:52 GMT):
https://pastebin.com/Ay3URuFJ

HoneyShah (Wed, 11 Sep 2019 12:53:59 GMT):
There is nothing extra in log

HoneyShah (Wed, 11 Sep 2019 13:07:13 GMT):
Actually it was working before, but when I created architecture with ca for each organization which itself generating required certificates for peer, orderer and users then it stopped working. Is there something to do with policies?

HoneyShah (Wed, 11 Sep 2019 13:09:44 GMT):
Data is written to ledger it just that I am not getting respose from event hub.

bretharrison (Wed, 11 Sep 2019 13:11:02 GMT):
yes, most likely

bretharrison (Wed, 11 Sep 2019 13:11:19 GMT):
are you using filtered blocks

HoneyShah (Wed, 11 Sep 2019 13:14:05 GMT):
No, I am not.

HoneyShah (Wed, 11 Sep 2019 13:15:12 GMT):
Can you help me to figure out what issue it could be because there is no policy violation logs in orderer/peer. So, I am unable to track

bretharrison (Wed, 11 Sep 2019 13:16:54 GMT):
are you able to endorse and commit using the same user credentials ?

HoneyShah (Wed, 11 Sep 2019 13:17:28 GMT):
Yes, data is written to the db. I checked that.

bretharrison (Wed, 11 Sep 2019 13:17:56 GMT):
try filtered blocks and a transaction listener

HoneyShah (Wed, 11 Sep 2019 13:19:34 GMT):
let me try

HoneyShah (Wed, 11 Sep 2019 13:21:31 GMT):
eventhub.connect(true) or eventhub.connect(false) . What I should use for filter blocks? And I am already using transaction listner i.e => registerTxEvent().

HoneyShah (Wed, 11 Sep 2019 13:21:47 GMT):
Please guide me if I have to use something else.

HoneyShah (Wed, 11 Sep 2019 14:16:35 GMT):
Here is the dubg log, previously I meade mistake in setting env variable. https://pastebin.com/Jg9AjTjC

HoneyShah (Wed, 11 Sep 2019 14:17:29 GMT):
Can you please retrace it and help me out with the possible reason about error.

bretharrison (Wed, 11 Sep 2019 14:23:10 GMT):
try eventhub.connect(false)

HoneyShah (Wed, 11 Sep 2019 14:32:46 GMT):
I tried it and it still has the same issue. Here is the updated debug logs: https://pastebin.com/wDKRWnX4

bretharrison (Wed, 11 Sep 2019 14:39:22 GMT):
you may wish to post on the #fabric channel, I do not know why the response is bad request

HoneyShah (Wed, 11 Sep 2019 15:42:25 GMT):
Okay. Thanks

AbhishekDudhrejia (Thu, 12 Sep 2019 06:31:40 GMT):
Has joined the channel.

HLFPOC (Thu, 12 Sep 2019 09:20:31 GMT):
Hello Team, I am currently working with Node SDK version 1.3 and not able to figure out how and where to pass the version of chaincode installed in the network While calling `channel.sendTransactionProposal` function, it only takes chaincode id (name), so in case I have upgraded my network with new chaincode by keeping the name same and changing the version, will it automatically hit latest installed chaincode?

HLFPOC (Thu, 12 Sep 2019 09:20:31 GMT):
Hello Team, I am currently working with Node SDK version 1.3 and not able to figure out how and where to pass the version of chaincode which is installed in the network While calling `channel.sendTransactionProposal` function, it only takes chaincode id (name), so in case I have upgraded my network with new chaincode by keeping the name same and changing the version, will it automatically hit latest installed chaincode?

sstone1 (Thu, 12 Sep 2019 09:40:08 GMT):
yes, only one version of a chaincode can be instantiated on a channel at any one time, so you don't need to specify the version

HLFPOC (Thu, 12 Sep 2019 09:54:12 GMT):
ok ! thanks for clarification.

Purbaja (Thu, 12 Sep 2019 12:22:46 GMT):
Hi All, in hyperledger fabric 1.4 we can send events publicly through stub.setEvent() method in a channel. Can events be sent privately between two organizations within a channel?

14gracel (Thu, 12 Sep 2019 13:52:22 GMT):
Events are published to all members of the channel that are listening (assuming that the listening org has the correct privileges on the channel). This is because events are stored in the block

saj97 (Thu, 12 Sep 2019 15:13:46 GMT):
Has joined the channel.

saj97 (Thu, 12 Sep 2019 15:13:47 GMT):
Hi, there is a way to know from a chaincode, in nodejs, all the chaincode instantiated in a channel? I have been running a example and get that there is no chaincode install in the channel, but if I a run it from the cli it found the chaincode

haardikkk (Thu, 12 Sep 2019 17:38:15 GMT):
Has left the channel.

donjohnny (Thu, 12 Sep 2019 20:14:25 GMT):
Has left the channel.

bretharrison (Fri, 13 Sep 2019 01:38:10 GMT):
https://fabric-sdk-node.github.io/release-1.4/Channel.html#queryInstantiatedChaincodes__anchor

TilakNakarmi (Fri, 13 Sep 2019 10:38:03 GMT):
Has joined the channel.

TilakNakarmi (Fri, 13 Sep 2019 10:38:04 GMT):
when i connect one organization having multiple endorsing peers through sdk client, if one or any endorsing peer is down, then how it connects other active endorsing peer???

generak (Fri, 13 Sep 2019 15:43:12 GMT):
does anyone have any ideas on computing the data hash for a block with node? retrieving the data from a block is pretty easy, but the combination of strings and buffers in the json response makes it pretty unclear what the data should really look like in its bytes format for hashing

mahoney1 (Fri, 13 Sep 2019 17:03:37 GMT):
I suggest to read this page in Fabric docs and you'll find the answer :-) https://hyperledger-fabric.readthedocs.io/en/release-1.4/discovery-overview.html

mahoney1 (Fri, 13 Sep 2019 17:04:08 GMT):
the linke provided in the answer in this S/Overflow may help you? https://stackoverflow.com/questions/50595061/how-do-you-calculate-the-block-hash-for-the-current-block-in-hyperledger-fabric

mahoney1 (Fri, 13 Sep 2019 17:04:08 GMT):
the link provided in the answer in this S/Overflow may help you? https://stackoverflow.com/questions/50595061/how-do-you-calculate-the-block-hash-for-the-current-block-in-hyperledger-fabric

generak (Sat, 14 Sep 2019 04:57:30 GMT):
unfortunately not. I want to be able to provide a means for users to be able to validate block data by generating a hash from the data and comparing it to the stored data hash. That link generates a block hash from the given data hash and previous hash.

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - `` `const hash = crypto.createHash('sha256'); console.log(block.header.data_hash.toString('hex')) const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex'))

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - `` ` const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) `` `

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - `` const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ``

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - ` const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ``

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - ` ` const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ` `

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - `` ` const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) `` `

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - `const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex'))`

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - `` ` const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) `` `

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - ``` const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ```

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - ```javascript const ProtoLoader = require('./ProtoLoader'); const _commonProto = ProtoLoader.load(__dirname + '/protos/common/common.proto').common; const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ```

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - ```javascript const ProtoLoader = require('./ProtoLoader'); const _commonProto = ProtoLoader.load(__dirname + '/protos/common/common.proto').common; const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ``` Then just compare that to the decoded block's hash as given by block.header.data_hash

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block hash through the following - ```javascript const ProtoLoader = require('./ProtoLoader'); const crypto = require('crypto'); const _commonProto = ProtoLoader.load(__dirname + '/protos/common/common.proto').common; const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ``` Then just compare that to the decoded block's hash as given by block.header.data_hash

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block's data hash through the following - ```javascript const ProtoLoader = require('./ProtoLoader'); const crypto = require('crypto'); const _commonProto = ProtoLoader.load(__dirname + '/protos/common/common.proto').common; const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ``` Then just compare that to the decoded block's hash as given by block.header.data_hash

generak (Sun, 15 Sep 2019 07:49:53 GMT):
If anyone's interested, you can validate a block's data hash through the following - ```javascript const ProtoLoader = require('./ProtoLoader'); const crypto = require('crypto'); const _commonProto = ProtoLoader.load(__dirname + '/protos/common/common.proto').common; const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); hash.update(Buffer.from(proto_block.getData().data[0].toArrayBuffer())); console.log(hash.digest('hex')) ``` Where ProtoLoader and _commonProto are as given in https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/lib/BlockDecoder.js

NeelBanker (Mon, 16 Sep 2019 10:37:08 GMT):
Has joined the channel.

ping40 (Mon, 16 Sep 2019 11:39:53 GMT):
how to run npm test under fabric-ca-client directory ? Is there some precondition( for example need fabric peer, orderer running)? thanks.

bretharrison (Mon, 16 Sep 2019 13:23:30 GMT):
Keep in mind that the `setEvent` only adds information in the endorsement and another peer will will only be able see that chaincode event data of that endorsed transaction when the block containing that transaction is committed on the peer.

bretharrison (Mon, 16 Sep 2019 20:46:03 GMT):
There is likely to be more than one `data[0]` in the block. you may wish to have a look at the following code to see how the hashes are calculated https://github.com/hyperledger/fabric/blob/release-1.4/protos/common/block.go

generak (Tue, 17 Sep 2019 02:35:06 GMT):
Very true, in which case the following works - ```javascript const ProtoLoader = require('./ProtoLoader'); const crypto = require('crypto'); const _commonProto = ProtoLoader.load(__dirname + '/protos/common/common.proto').common; const byteBuffer = require('bytebuffer'); const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); if (protoBlock.getData().data.length > 1) { const bb = new byteBuffer(); for (let ii = 0; ii < protoBlock.getData().data.length; ii++) { bb.append(protoBlock.getData().data[ii]); } hash.update(Buffer.from(bb.flip(). toArrayBuffer())); console.log(hash.digest('hex')); } else { hash.update(Buffer.from(protoBlock.getData().data[0]. toArrayBuffer())); console.log(hash.digest('hex')); } ```

generak (Tue, 17 Sep 2019 02:35:06 GMT):
Very true, in which case the following works - ```javascript const ProtoLoader = require('./ProtoLoader'); const crypto = require('crypto'); const _commonProto = ProtoLoader.load(__dirname + '/protos/common/common.proto').common; const byteBuffer = require('bytebuffer'); const hash = crypto.createHash('sha256'); const proto_block = _commonProto.Block.decode(someblock); console.log(proto_block.getHeader().getDataHash().toBuffer().toString('hex')); if (protoBlock.getData().data.length > 1) { const bb = new byteBuffer(); for (let ii = 0; ii < protoBlock.getData().data.length; ii++) { bb.append(protoBlock.getData().data[ii]); } hash.update(Buffer.from(bb.flip(). toArrayBuffer())); console.log(hash.digest('hex')); } else { hash.update(Buffer.from(protoBlock.getData().data[0]. toArrayBuffer())); console.log(hash.digest('hex')); } ```

bestbeforetoday (Tue, 17 Sep 2019 15:53:43 GMT):
Run it from the top level, e.g. `npm run test:ca-client`

ping40 (Wed, 18 Sep 2019 02:22:33 GMT):
have same errors. #enroll 2019-09-18T01:59:11.414Z - error: [FabricCAClientService.js]: enroll() missing required argument "request" ✓ should throw if missing required argument "request" 2019-09-18T01:59:11.416Z - error: [FabricCAClientService.js]: Invalid enroll request, missing enrollmentID ✓ should throw if missing required argument "request.enrollmentID" 2019-09-18T01:59:11.418Z - error: [FabricCAClientService.js]: Invalid enroll request, attr_reqs must be an array of AttributeRequest objects ✓ should throw if request attributes is specified but not an array 2019-09-18T01:59:11.420Z - error: [FabricCAClientService.js]: Failed to enroll enrollmentID, error:%o message=enroll error, stack=Error: enroll error at Context.it (/gp/src/github.com/hyperledger/fabric-sdk-node/fabric-ca-client/test/FabricCAServices.js:258:30) at callFn (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runnable.js:372:21) at Test.Runnable.run (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runnable.js:364:7) at Runner.runTest (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:455:10) at /gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:573:12 at next (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:369:14) at /gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:379:7

ping40 (Wed, 18 Sep 2019 02:24:59 GMT):
Have same errors

ping40 (Wed, 18 Sep 2019 02:26:35 GMT):
Have same errors `have same errors. #enroll 2019-09-18T01:59:11.414Z - error: [FabricCAClientService.js]: enroll() missing required argument "request" ✓ should throw if missing required argument "request" 2019-09-18T01:59:11.416Z - error: [FabricCAClientService.js]: Invalid enroll request, missing enrollmentID ✓ should throw if missing required argument "request.enrollmentID" 2019-09-18T01:59:11.418Z - error: [FabricCAClientService.js]: Invalid enroll request, attr_reqs must be an array of AttributeRequest objects ✓ should throw if request attributes is specified but not an array 2019-09-18T01:59:11.420Z - error: [FabricCAClientService.js]: Failed to enroll enrollmentID, error:%o message=enroll error, stack=Error: enroll error at Context.it (/gp/src/github.com/hyperledger/fabric-sdk-node/fabric-ca-client/test/FabricCAServices.js:258:30) at callFn (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runnable.js:372:21) at Test.Runnable.run (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runnable.js:364:7) at Runner.runTest (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:455:10) at /gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:573:12 at next (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:369:14) at /gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:379:7 `

ping40 (Wed, 18 Sep 2019 02:26:35 GMT):
Have same errors ` #enroll 2019-09-18T01:59:11.414Z - error: [FabricCAClientService.js]: enroll() missing required argument "request" ✓ should throw if missing required argument "request" 2019-09-18T01:59:11.416Z - error: [FabricCAClientService.js]: Invalid enroll request, missing enrollmentID ✓ should throw if missing required argument "request.enrollmentID" 2019-09-18T01:59:11.418Z - error: [FabricCAClientService.js]: Invalid enroll request, attr_reqs must be an array of AttributeRequest objects ✓ should throw if request attributes is specified but not an array 2019-09-18T01:59:11.420Z - error: [FabricCAClientService.js]: Failed to enroll enrollmentID, error:%o message=enroll error, stack=Error: enroll error at Context.it (/gp/src/github.com/hyperledger/fabric-sdk-node/fabric-ca-client/test/FabricCAServices.js:258:30) at callFn (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runnable.js:372:21) at Test.Runnable.run (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runnable.js:364:7) at Runner.runTest (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:455:10) at /gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:573:12 at next (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:369:14) at /gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:379:7 `

ping40 (Wed, 18 Sep 2019 02:26:35 GMT):
Have same errors ``` #enroll 2019-09-18T01:59:11.414Z - error: [FabricCAClientService.js]: enroll() missing required argument "request" ✓ should throw if missing required argument "request" 2019-09-18T01:59:11.416Z - error: [FabricCAClientService.js]: Invalid enroll request, missing enrollmentID ✓ should throw if missing required argument "request.enrollmentID" 2019-09-18T01:59:11.418Z - error: [FabricCAClientService.js]: Invalid enroll request, attr_reqs must be an array of AttributeRequest objects ✓ should throw if request attributes is specified but not an array 2019-09-18T01:59:11.420Z - error: [FabricCAClientService.js]: Failed to enroll enrollmentID, error:%o message=enroll error, stack=Error: enroll error at Context.it (/gp/src/github.com/hyperledger/fabric-sdk-node/fabric-ca-client/test/FabricCAServices.js:258:30) at callFn (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runnable.js:372:21) at Test.Runnable.run (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runnable.js:364:7) at Runner.runTest (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:455:10) at /gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:573:12 at next (/gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:369:14) at /gp/src/github.com/hyperledger/fabric-sdk-node/node_modules/mocha/lib/runner.js:379:7 ```

ping40 (Wed, 18 Sep 2019 02:33:20 GMT):

fabric-node-sdk-npm-test-logs.txt

ping40 (Wed, 18 Sep 2019 02:47:55 GMT):
I used the release-1.4 source code to test.

bestbeforetoday (Wed, 18 Sep 2019 08:48:28 GMT):
Those tests are driving error scenarios and what you are seeing is logging of the generated errors. The tests are passing

bestbeforetoday (Wed, 18 Sep 2019 08:49:16 GMT):
That should be confirmed by a message similar to this near the bottom of the test output: ```188 passing (389ms) ```

razasikander (Wed, 18 Sep 2019 11:11:34 GMT):
Has joined the channel.

razasikander (Wed, 18 Sep 2019 11:11:36 GMT):
Hello guys i have a network setup of 1orderer and 3 channels with 2 peer each running in my machine. How can i get the network details like organizations name , peer names with help of node js

delao (Wed, 18 Sep 2019 13:14:08 GMT):
Has joined the channel.

delao (Wed, 18 Sep 2019 13:22:29 GMT):
Hello everyone, good morning, I am struggling a little about node.js server SDK for Fabric. I have built a fully working network and now I'd like to develop a client app for it. I've read about something called 'Connection Profile' which is needed to connect to the network through the Gateway class. Given that I already have the network, is there a way to generate this connection profile automatically? If so, how? Thanks in advance

delao (Wed, 18 Sep 2019 13:35:44 GMT):
Or at least point me to some documentation on generating those by hand :)

ahmad-raza (Wed, 18 Sep 2019 14:38:58 GMT):
you can look in fabric-samples/balance-transfer/artifacts /network-config.yaml

ahmad-raza (Wed, 18 Sep 2019 14:39:09 GMT):
and read this link https://fabric-sdk-node.github.io/release-1.4/tutorial-network-config.html

delao (Wed, 18 Sep 2019 16:04:39 GMT):
Thanks ahmad-raza, will look into it

bandreghetti (Wed, 18 Sep 2019 18:18:06 GMT):
hey guys, i'm fetching blocks by number and `header.previousHash` of block N+1 is coming different than `header.dataHash` of block N what is happening? Blocks decoded with configtxlator: Block 0: https://hastebin.com/ufovevacoy.json, header: https://hastebin.com/oqorayiyev.coffeescript Block 1: https://hastebin.com/oxulelajay.json, header: https://hastebin.com/diwumafivu.bash Block 2: https://hastebin.com/jufokixudo.json, header: https://hastebin.com/paxehebebo.bash I got block protobuf binaries like this: ``` channel .queryBlock(blockNumber, getAllPeersSDK(client)[0], true, true) .then(blockBytes => { fs.writeFileSync(`${blockNumber}.block`, blockBytes); ```

bandreghetti (Wed, 18 Sep 2019 18:18:06 GMT):
hey guys, i'm fetching blocks by number and `header.previousHash` of block N+1 is coming different than `header.dataHash` of block N what is happening? Blocks decoded with configtxlator: Block 0: https://hastebin.com/ufovevacoy.json, header: https://hastebin.com/oqorayiyev.coffeescript Block 1: https://hastebin.com/oxulelajay.json, header: https://hastebin.com/diwumafivu.bash Block 2: https://hastebin.com/jufokixudo.json, header: https://hastebin.com/paxehebebo.bash I got block protobuf binaries like this: ``` channel .queryBlock(blockNumber, getAllPeersSDK(client)[0], true, true) .then(blockBytes => { fs.writeFileSync(`${blockNumber}.block`, blockBytes); }); ```

bandreghetti (Wed, 18 Sep 2019 18:18:06 GMT):
hey guys, i'm fetching blocks by number and `header.previousHash` of block N+1 is coming different from `header.dataHash` of block N what is happening? Blocks decoded with configtxlator: Block 0: https://hastebin.com/ufovevacoy.json, header: https://hastebin.com/oqorayiyev.coffeescript Block 1: https://hastebin.com/oxulelajay.json, header: https://hastebin.com/diwumafivu.bash Block 2: https://hastebin.com/jufokixudo.json, header: https://hastebin.com/paxehebebo.bash I got block protobuf binaries like this: ``` channel .queryBlock(blockNumber, getAllPeersSDK(client)[0], true, true) .then(blockBytes => { fs.writeFileSync(`${blockNumber}.block`, blockBytes); }); ```

ping40 (Thu, 19 Sep 2019 00:59:56 GMT):
thank you very much

generak (Thu, 19 Sep 2019 02:32:29 GMT):
The previous hash is the block hash of the previous block, not the data hash. The block hash is calculated like so: https://github.com/hyperledger/blockchain-explorer/blob/master/app/platform/fabric/utils/FabricUtils.js#L185

soumyanayak (Thu, 19 Sep 2019 10:16:40 GMT):
Hi team, v1.4.3 - fabric Using a batch i am doing a bulk upload of data from a SQL server to Blockchain where 10000 rows of data from SQL server is going as a single transaction and stored in the block. Out of 21 million records , 800K records were not inserted where i observed some issues happened intermittently.

soumyanayak (Thu, 19 Sep 2019 10:17:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EtxKgcGLDBzhZW3pX)
Issue.png

patel512 (Thu, 19 Sep 2019 12:35:23 GMT):
Has joined the channel.

bis2019 (Thu, 19 Sep 2019 13:26:39 GMT):
Did you check the size of the payload, with 10k rows you can easily go over the default max_block_size.

soumyanayak (Thu, 19 Sep 2019 13:27:23 GMT):
it was around 30 MB

soumyanayak (Thu, 19 Sep 2019 13:27:34 GMT):
the block sizes

soumyanayak (Thu, 19 Sep 2019 13:28:05 GMT):
but again when i was running those remaining rows it was inserting -- probably when continuously it was running

soumyanayak (Thu, 19 Sep 2019 13:28:20 GMT):
sometimes inserting and sometimes the above error

bis2019 (Thu, 19 Sep 2019 13:28:38 GMT):
that's clearly over the default 5MB, unless you have changed it

soumyanayak (Thu, 19 Sep 2019 13:29:47 GMT):
absolute max size is 99MB right based on configtx.yaml

soumyanayak (Thu, 19 Sep 2019 13:29:49 GMT):
BatchSize: MaxMessageCount: 10 AbsoluteMaxBytes: 99 MB PreferredMaxBytes: 512 KB

soumyanayak (Thu, 19 Sep 2019 13:30:10 GMT):
but blocks were created for all the records

bis2019 (Thu, 19 Sep 2019 13:31:26 GMT):
that's ok, how often are you inserting ? how many peers ?

soumyanayak (Thu, 19 Sep 2019 13:32:00 GMT):
its only one anchor peer and one regular peer , so all the tramsactions were happening on that anchor peer

bis2019 (Thu, 19 Sep 2019 13:33:14 GMT):
Also that intermittent connection lost is something I have seen myself (you need to retry the failed transactions, it should work)

soumyanayak (Thu, 19 Sep 2019 13:35:24 GMT):
yes actually i tried all and i was able to insert all also but this issue was coming .. so wanted to know what's the cause of this issue and how it can be avoided so that the same can be implemented in Production

mahoney1 (Thu, 19 Sep 2019 15:23:03 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

bandreghetti (Thu, 19 Sep 2019 18:40:05 GMT):
Thanks!

sureshtedla (Fri, 20 Sep 2019 15:11:32 GMT):
Hi All, How to add New Organization to existing Fabric Network using Node js? and can we do all operations i.e genesis block creation,create channel , joining peer's into the channel, install and instantiating the chaincode using Node SDK?

sureshtedla (Fri, 20 Sep 2019 15:12:20 GMT):
instead of entering commands in the terminal

knagware9 (Fri, 20 Sep 2019 16:35:59 GMT):
check this https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/test/integration/configtxlator.js

ping40 (Sun, 22 Sep 2019 11:14:54 GMT):
how to run a test file ? for example fabric-ca-client/test/AffiliationService.js ./node_modules/mocha/bin/mocha fabric-ca-client/test/AffiliationService.js has many errors. the command "npm run test:ca-client" works fine.

bestbeforetoday (Sun, 22 Sep 2019 19:17:54 GMT):
From the top level you should be able to run `npm run unit-test fabric-ca-client/test/AffiliationService.js`. But it looks like somebody forgot to add `chai.should();` to that file so the Chai _should_ hooks are being set up (by one of the other test files) if you run the whole suite but not if you run only that one test file. Another reason I personally prefer Chai's _expect_ syntax

KartikChauhan (Mon, 23 Sep 2019 10:18:59 GMT):
Can anyone tell what's the difference between `fabric-contract-api` and `fabric-shim` as the documentation doesn't make a very clear distinction b/w the two. The only difference I found so far is in the implementation. We no longer need an invoke function if we're using fabric-contract-api. I'm sure there're other differences as well but can anyone state them for me. Thank you.

heatherp (Mon, 23 Sep 2019 15:22:22 GMT):
Hi @KartikChauhan, this is probably better asked in #fabric-chaincode-dev but I'll give it a go. The fabric contract-api implements the improved programming model on top of fabric-shim, which is explained here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/whatsnew.html?highlight=new%20programming%20model#improved-programming-model-for-developing-applications Particularly the "smart contract processing" link: https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/smartcontract.html provides examples that pull in contract-api

JoeAngel.tw (Tue, 24 Sep 2019 04:25:39 GMT):
Has joined the channel.

Puneeth987 (Tue, 24 Sep 2019 06:42:28 GMT):
hi team, please any one send me link for hyperldeger fabric RAFT orderer ?

Puneeth987 (Tue, 24 Sep 2019 06:42:28 GMT):
hi team, please any one send me link for devloping example hyperldeger fabric with RAFT orderer in node js?

davidkhala (Wed, 25 Sep 2019 02:22:19 GMT):
RAFT and consensus engine is not related nodejs sdk and application

ycarmel (Wed, 25 Sep 2019 09:08:14 GMT):
npm install fails with the following errors, any idea why would that happen?: npm WARN tar ENOENT: no such file or directory, open '/Users/ycarmel/dev/hyperledger/fabric-sdk-node/fabric-network/node_modules/.staging/sjcl-cdb3d347/test/sha256_huge_test.js' npm WARN tar ENOENT: no such file or directory, open '/Users/ycarmel/dev/hyperledger/fabric-sdk-node/fabric-network/node_modules/.staging/sjcl-cdb3d347/test/ecdsa_test.js' npm WARN tar ENOENT: no such file or directory, open '/Users/ycarmel/dev/hyperledger/fabric-sdk-node/fabric-network/node_modules/.staging/sjcl-cdb3d347/test/sha256_huge_test_messages.js' npm WARN tar ENOENT: no such file or directory, open '/Users/ycarmel/dev/hyperledger/fabric-sdk-node/fabric-network/node_modules/.staging/sjcl-cdb3d347/test/ecdh_test.js' npm WARN tar ENOENT: no such file or directory, open '/Users/ycarmel/dev/hyperledger/fabric-sdk-node/fabric-network/node_modules/.staging/sjcl-cdb3d347/test/sha256_test.js'

bestbeforetoday (Wed, 25 Sep 2019 09:15:49 GMT):
Not sure why that's happened but worth checking your Node version. Both 8 and 10 should be OK. I think I saw problems last time I tried 12. Perhaps wipe out all the _node_modules_ directories both at the top level and in any sub-modules (e.g. _fabric-client_ etc.) -- I sometimes find `git clean -dfx` helpful for this -- and make sure you are only doing the `npm install` at the top level

bestbeforetoday (Wed, 25 Sep 2019 09:15:49 GMT):
Not sure why that's happened but worth checking your Node version. Both 8 and 10 should be OK. I think I saw problems last time I tried 12. Perhaps wipe out all the `node_modules` directories both at the top level and in any sub-modules (e.g. _fabric-client_ etc.) -- I sometimes find `git clean -dfx` helpful for this -- and make sure you are only doing the `npm install` at the top level

ycarmel (Wed, 25 Sep 2019 09:31:07 GMT):
I'm using Node 10. I should run 'npm install' only on top level? I'm consuming fabric-network and fabric-client on another project and linking to the fabric-node-sdk on package.json with "file:..." to test changes locally

bestbeforetoday (Wed, 25 Sep 2019 09:42:28 GMT):
Things like _fabric-network_ refer to other modules using `file:...` and I only run `npm install` at the top level when working with them, so hopefully that is all that's required for you too. I guess it might depend on how your projects are structured locally though

ycarmel (Wed, 25 Sep 2019 09:48:36 GMT):
Thanks, I got it working. I'll need to require 'fabric-network' differently. locally, I must refer to the top level in my package json and require('fabric-node-sdk/fabric-network'), when I refer to the public npm module on my package json I need to require('fabric-network') as the sub modules are individually published.

ahmad-raza (Wed, 25 Sep 2019 11:01:39 GMT):
let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret}); let user = await client.getUserContext(username, true); What is the purpose of password here? because we can getUserContext() without password???

bestbeforetoday (Wed, 25 Sep 2019 13:16:25 GMT):
@ahmad-raza It's the enrollment secret for the identity, used to obtain the user's certificate from the Certificate Authority

ahmad-raza (Wed, 25 Sep 2019 13:32:54 GMT):
@bestbeforetoday can you please tell the method to obtain certificate?

delao (Wed, 25 Sep 2019 13:40:59 GMT):
Hello everyone, good morning, I am facing a little problem here: I am trying to use the Gateway method getNetwork in the process of submitting transacions to the network. However, I have the following problem with my wallet. If this wallet is created (wallet.import(...) ) using a admin certificate it works like a charm, however, if any other type of certificate is used (peer, client..) I get the following error ( in thread )

delao (Wed, 25 Sep 2019 13:41:19 GMT):
2019-09-25T12:47:38.274Z - error: [Channel.js]: Error: access denied for [GetConfigBlock][mychannel]: Failed evaluating policy on signed data during check policy on channel [mychannel] with policy [/Channel/Application/Readers]: [implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied] 2019-09-25T12:47:38.275Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: access denied for [GetConfigBlock][mychannel]: Failed evaluating policy on signed data during check policy on channel [mychannel] with policy [/Channel/Application/Readers]: [implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied]

delao (Wed, 25 Sep 2019 13:42:54 GMT):
And lastly, the policies defined on configtx.yaml states that: ` Name: Org1 ID: Org1MSP MSPDir: crypto-config/peerOrganizations/org1.com/msp Policies: Readers: Type: Signature Rule: "OR('Org1MSP.admin', 'Org1MSP.peer', 'Org1MSP.client')" Writers: Type: Signature Rule: "OR('Org1MSP.admin', 'Org1MSP.client')" Admins: Type: Signature Rule: "OR('Org1MSP.admin')"`

FernandaSartori (Wed, 25 Sep 2019 13:44:32 GMT):
Has joined the channel.

delao (Wed, 25 Sep 2019 13:45:04 GMT):
My question is: do the following commands require admin rights? (gateway.connect(), gateway.getNetwork() and .getContract() )

bestbeforetoday (Wed, 25 Sep 2019 13:47:32 GMT):
If you don't already have the user credentials (certificate and private key), the client will try to obtain them from the Fabric network's certificate authority using the enrollment name and secret you provide. Essentially this is the same as using the CA client: https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#fabric-ca-client

amealwithbasil (Wed, 25 Sep 2019 19:15:11 GMT):
Has anyone tried reconstructing enrollment credentials from a JSON string? Because the enrollment files have carriage returns, when I store them as a JSON string in my db, they are converted to '\n' characters. I read the JSON string and parse it back into a JSON object, and try passing that into `fabric_client.createUser` as the `privateKeyPEM` field, but it fails to read it. Complains of an invalid format.

davidkhala (Thu, 26 Sep 2019 08:42:35 GMT):
@bestbeforetoday @bretharrison Dear Mark and Bret, some of our community members suggest that we could create a regular weekly/bi-week community meeting(via Zoom) to synchronize latest progress and discuss roadmap. I had similar idea too. It could work like those fabric-python-sdk community. What is your opinion.

davidkhala (Thu, 26 Sep 2019 08:44:37 GMT):
I guess could `normalizeX509` static function help you?

bestbeforetoday (Thu, 26 Sep 2019 09:16:16 GMT):
There is already a regular Fabric Application Developer community call, and new programming model and implementation changes in the Node and Java SDKs have been presented there: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Fabric+Application+Developer+Community+Call

bestbeforetoday (Thu, 26 Sep 2019 09:17:48 GMT):
For more implementation level changes then Bret certainly recently presented on changes coming in the Node SDK v2.0 on the Fabric contributors call

davidkhala (Thu, 26 Sep 2019 09:20:06 GMT):
What I saw Developer community call is designed for sdk's user group instead of sdk contributors. So for SDK contributors, we reuse fabric contributors call. Is it?

bestbeforetoday (Thu, 26 Sep 2019 09:21:01 GMT):
You're absolutely correct, the Developer community call is targeted at users of the SDK rather than contributors

bestbeforetoday (Thu, 26 Sep 2019 09:38:22 GMT):
Contributors meeting might be useful. Just to update on what is currently being worked on, or is there other content that you would want to include?

bestbeforetoday (Thu, 26 Sep 2019 09:39:53 GMT):
I personally wonder if it would be useful to have a RocketChat channel for purely contributor discussion. I guess the _fabric-maintainer_ channel is a bit like that but something for focused to the SDK might be useful

bestbeforetoday (Thu, 26 Sep 2019 09:39:53 GMT):
I personally wonder if it would be useful to have a RocketChat channel for purely contributor discussion. I guess the _fabric-maintainer_ channel is a bit like that but something more focused to the SDK might be useful

davidkhala (Thu, 26 Sep 2019 09:41:22 GMT):
Yes, like what you say, fabric-maintainer channel has already multiple threads on fabric core already.

davidkhala (Thu, 26 Sep 2019 09:41:43 GMT):
Adding SDK discussion threads to it also might make it more chaos.

davidkhala (Thu, 26 Sep 2019 09:46:00 GMT):
The content I want to discuss is some technical debts in 1.4 LTS.

davidkhala (Thu, 26 Sep 2019 09:47:45 GMT):
And willing to hear maintainers' ideas towards them. Should it remains "as is", or any space to updated them in 1.4.x future

jona-sc (Thu, 26 Sep 2019 10:28:29 GMT):
Has joined the channel.

jona-sc (Thu, 26 Sep 2019 10:37:12 GMT):
Hello, currently what is the value in using the CLI over the Node SDK? What coverage does the CLI have that node does not?

sstone1 (Thu, 26 Sep 2019 12:32:12 GMT):
the CLI is for performing operational tasks (install, instantiate, create channel, etc). you could use the CLI in scripts to automate these operational tasks. there are also APIs for these tasks in the Node.js, if you wish to write applications that perform these operational tasks. you should never use the CLI for any other tasks - e.g. submitting transactions to the ledger as part of an application - always use one of the APIs for this.

davidkhala (Fri, 27 Sep 2019 01:16:44 GMT):
@bretharrison Hi bret, https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/31218 I think this PR could be abandoned since it was part of my test for internship candidates. And the owner of this PR did not get passed.

davidkhala (Fri, 27 Sep 2019 01:16:44 GMT):
@bretharrison Hi bret, https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/31218 I think this PR could be abandoned since it was part of my test for internship candidates. And the owner of this PR did not get passed. Same for https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/31438

jona-sc (Fri, 27 Sep 2019 01:32:57 GMT):
Thanks, appreciate the response

jona-sc (Fri, 27 Sep 2019 03:35:22 GMT):
I'm interested in more infrastructure-related activities, such as joining an org to a channel, etc. I assume this is all covered in the API as well, right? I will start testing soon but want to get an idea of coverage before starting

jona-sc (Fri, 27 Sep 2019 03:35:22 GMT):
I'm interested in more infrastructure-related activities, specifically joining an org/peer to a channel. Is that also possible via the API? Am starting testing today but was hoping to get a good idea of coverage before diving in.

knagware9 (Fri, 27 Sep 2019 06:25:05 GMT):
yes,CLI provides these commands

sstone1 (Fri, 27 Sep 2019 08:15:25 GMT):
joining an org/peer to a channel is an operational task, and available via the APIs and the CLIs

JonathanC (Fri, 27 Sep 2019 23:34:30 GMT):
Hi everybody, does anyone know if it possible to a grouped by queries on the Peer couchDB please ?

davidkhala (Sat, 28 Sep 2019 14:11:19 GMT):
What do you mean ? is it related to fabric-sdk-node?

davidkhala (Sat, 28 Sep 2019 14:16:00 GMT):
@bretharrison Hi Bret, I saw https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/33603 copied most of files from fabric-base (https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/31956) to fabric-common, is it determined to be that? or is it ephemeral in transition? I think fabric-base is a better home for them.

bretharrison (Sun, 29 Sep 2019 19:34:26 GMT):
I think we are going to rename fabric-common to fabric-base

davidkhala (Mon, 30 Sep 2019 04:08:27 GMT):
And then we recreate a new fabric-common to serve as fabric-ca dependencies? is it the idea?

abel23 (Mon, 30 Sep 2019 04:18:15 GMT):
Has joined the channel.

abel23 (Mon, 30 Sep 2019 04:20:07 GMT):
Hello, Is there a way to retrieve a wallet identity after one has imported it into a wallet, deleted it from the wallet. I want to reimport this wallet id, Is this possible?

abel23 (Mon, 30 Sep 2019 04:25:17 GMT):
Once the wallet id is deleted from the imported directory, is it lost forever or can it be retrieved?

abel23 (Mon, 30 Sep 2019 04:40:33 GMT):
How to re-import a wallet id?

Tom-Xu-CNXA (Mon, 30 Sep 2019 10:58:34 GMT):
Yes, it is lost, only if you backed up it before.

abel23 (Mon, 30 Sep 2019 11:04:21 GMT):
Thank you

abel23 (Mon, 30 Sep 2019 11:12:13 GMT):
Is there a way to identify if a wallet id is the admin id?

Tom-Xu-CNXA (Mon, 30 Sep 2019 11:15:26 GMT):
Admin role is defined by the MSP, you can identify that per MSP configuration.

sureshtedla (Mon, 30 Sep 2019 14:09:31 GMT):
Hi All, How can we add New Organization to existing fabric network through Node SDK and can we generate genesis block , create channel transaction, adding peer's into the channel through Node sdk instaed of using terminal ?

EltonSearcy (Mon, 30 Sep 2019 17:07:21 GMT):
Has joined the channel.

abel23 (Tue, 01 Oct 2019 04:02:33 GMT):
Is there a Node SDK api to get a hint whether a wallet id is admin. I don't understand the SDk docs other than the tutorial

adarshaJha (Tue, 01 Oct 2019 07:25:25 GMT):
i'm trying to use ldap with ca . when i try to enroll i'm getting this error [FabricCAClientService.js]: Failed to enroll alejandro, error:%o message=Enrollment failed with errors [[{"code":20,"message":"Authentication failure"}]], stack=Error: Enrollment failed with errors [[{"code":20,"message":"Authentication failure"}]] at IncomingMessage.response.on (/home/adarsha/Documents/fabric-ldap-example/fabric-sdk-with-ldap/node_modules/fabric-ca-client/lib/FabricCAClient.js:465:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at combinedTickCallback (internal/process/nexttick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) Error: Enrollment failed with errors [[{"code":20,"message":"Authentication failure"}]] at IncomingMessage.response.on (/home/adarsha/Documents/fabric-ldap-example/fabric-sdk-with-ldap/node_modules/fabric-ca-client/lib/FabricCAClient.js:465:22) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at combinedTickCallback (internal/process/nexttick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) Failed to enroll: Error: Failed to enroll alejandro

rthatcher (Tue, 01 Oct 2019 08:52:26 GMT):
There is a #fabric-ca channel that might be a better place to ask. Also you might want to show the output log of the CA you are connecting to.

bestbeforetoday (Tue, 01 Oct 2019 13:45:12 GMT):
The wallet just holds identity credentials. It doesn't have any concept of admin or user identities. The names (or labels) you give the identities stored in your wallet is entirely up to you though, so some naming scheme that helps you to identify which ones are admin and non-admin identities is probably a good idea.

davidkhala (Tue, 01 Oct 2019 14:43:08 GMT):
So far I think we still have some dependencies on binary tool `configtxlator`

sureshtedla (Wed, 02 Oct 2019 12:00:11 GMT):
ok

abel23 (Thu, 03 Oct 2019 04:00:08 GMT):
Thank you. I have found a solution to identify the admin identity.

AbhishekDudhrejia (Thu, 03 Oct 2019 06:06:36 GMT):
Hello everyone, I have implemented reenroll user certificate using node SDK. On execution, the updated certificate has been generated and added to the ca database. However, the identity in the keystore is not being updated with the newer certificate. What am I missing?

adarshaJha (Thu, 03 Oct 2019 06:41:37 GMT):
can you show the error logs that you're getting ?

AbhishekDudhrejia (Thu, 03 Oct 2019 08:21:12 GMT):
I am not getting any errors. As I said, the certification generation was successful with the reenroll functionality of node SDK. But when I check the keystore for the user certificate, it still has the old certificate instead of the recently generated one.

abel23 (Thu, 03 Oct 2019 10:39:38 GMT):
Remove the old one and try again

mahoney1 (Thu, 03 Oct 2019 10:46:31 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

abel23 (Thu, 03 Oct 2019 10:56:03 GMT):
Should application be modified if new chaicodes are added or is there an approach to create a universal app that can interact with any chaincode

abel23 (Thu, 03 Oct 2019 11:00:45 GMT):
Is there a way to get the chaincode and its assosiated functions via node sdk?

AbhishekDudhrejia (Thu, 03 Oct 2019 11:00:49 GMT):
It is not possible to remove the old identity as it is required to reenroll the user. Am I missing something?

abel23 (Thu, 03 Oct 2019 11:03:38 GMT):
What i meant was try a new path to import the new certificates. Maybe the presence of the old one maybe an issue.

AbhishekDudhrejia (Fri, 04 Oct 2019 03:24:30 GMT):
How would I import the new certificate in the existing identity? From what I understand, the certificate information is embedded in the identity file and should not be modified externally.

abel23 (Fri, 04 Oct 2019 03:58:11 GMT):
You said the new certificates are not showing up. The old ones are still in place. What kind of wallet system are you using?

AbhishekDudhrejia (Fri, 04 Oct 2019 04:04:31 GMT):
I do not have a wallet system. I have set the network up using Fabric CA architecture. On starting the API, the CA sets up a keystore to store all the identities with the default 1 year expiry for the certificates. This is the place where the CA stores the user and admin certificates generated during the API operation. The network works as expected. Now, I am trying to renewthe certificates in case they expire after the 1 year expiry using the reenroll functionality through the Node SDK. The reenroll also works and it adds the certificate containing extended expiry date to the CA database. However, when I check the keystore, the identity containing the user for which the new certificate was generated still contains the outdated certificate. What I want to know is how can I update the certificate inside the identity automatically on reenrolling any identity.

AbhishekDudhrejia (Fri, 04 Oct 2019 04:04:31 GMT):
I do not have a wallet system. I have set the network up using Fabric CA architecture. On starting the API, the CA sets up a keystore to store all the identities with the default 1 year expiry for the certificates. This is the place where the CA stores the user and admin certificates generated during the API operation. The network works as expected. Now, I am trying to renew the certificates in case they expire after the 1 year expiry using the reenroll functionality through the Node SDK. The reenroll also works and it adds the certificate containing extended expiry date to the CA database. However, when I check the keystore, the identity containing the user for which the new certificate was generated still contains the outdated certificate. What I want to know is how can I update the certificate inside the identity automatically on reenrolling any identity.

abel23 (Fri, 04 Oct 2019 04:07:33 GMT):
i do not know this method. I use wallet based method

AbhishekDudhrejia (Fri, 04 Oct 2019 05:09:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gvYjxPsTYfrpQibfr) Hello everyone, Below is the detailed scenario for the query: I have set the network up using Fabric CA architecture. On starting the API, the CA sets up a keystore to store all the identities with the default 1 year expiry for the certificates. This is the place where the CA stores the user and admin certificates generated during the API operation. The network works as expected. Now, I am trying to renew the certificates in case they expire after the 1 year expiry using the reenroll functionality through the Node SDK. The reenroll also works and it adds the certificate containing extended expiry date to the CA database. However, when I check the keystore, the identity containing the user for which the new certificate was generated still contains the outdated certificate. Am I missing some configuration or setup that is causing this scenario?

bestbeforetoday (Fri, 04 Oct 2019 08:37:31 GMT):
I think the reenroll will give you back the new certificate and private key. Maybe you can then call `User.setEnrollment()` with these values to set them on the user

bestbeforetoday (Fri, 04 Oct 2019 08:37:31 GMT):
@AbhishekDudhrejia I think the reenroll will give you back the new certificate and private key. Maybe you can then call `User.setEnrollment()` with these values to set them on the user

adarshaJha (Fri, 04 Oct 2019 09:05:27 GMT):
hi , i am working on a project for my learning and i wanted to check how to revoke certificates ( user certificates ) i have a root rca and an ica1. when i generated certificates using root rca i wasn't aware of revocation of certificates. So i far what i understood , i have to add certificates to CRL but is there any nice article or demo tutorial kind of thing for the same ?

Salaria_77 (Fri, 04 Oct 2019 12:36:25 GMT):
Hi, i am getting following error while creating channel through fabric node sdk. I am running fabric version 1.4.2 both for hyperledger images and sdk. https://stackoverflow.com/questions/58236389/hyper-ledger-fabric-channel-creation-through-node-sdk

rthatcher (Fri, 04 Oct 2019 13:58:36 GMT):
answered in StackOverflow

delao (Fri, 04 Oct 2019 20:15:15 GMT):
If anyone is having a similar issue, I advise looking at NodeOU configuration for the MSP :)

jesro (Sun, 06 Oct 2019 12:25:31 GMT):
Has joined the channel.

jesro (Sun, 06 Oct 2019 12:25:32 GMT):
Hello everyone, I'm new when it comes to gerrit and this project workflow. I proposed a small patch as a first contribution, it would be great if someone could review it: https://gerrit.hyperledger.org/r/c/fabric-sdk-node/+/33872 . Feedback on the gerrit workflow are most welcome. Thx

HoneyShah (Mon, 07 Oct 2019 05:47:40 GMT):
i tried setEnrollment() method but still the identity in the key store is not being updated with the newer certificate . what am i missing?

Salaria_77 (Mon, 07 Oct 2019 06:07:58 GMT):
Thanks for the answer my admin cert path was wrong.

pankajcheema (Mon, 07 Oct 2019 11:24:13 GMT):
not able to get chaincode version and path in chaincode spec info when using sdk . ANy suggestion or help

bretharrison (Mon, 07 Oct 2019 12:09:45 GMT):
Not sure what happened, the verify build +1 is not showing up, so I will `reverify`. Once we get a +1 from the build, then we can merge the change.

jesro (Mon, 07 Oct 2019 14:16:52 GMT):
Thank you for your intervention.

rodolfoleal (Tue, 08 Oct 2019 23:08:16 GMT):
Have someone experieced some discovery auth error while network under load?

rodolfoleal (Wed, 09 Oct 2019 00:36:02 GMT):

Clipboard - October 8, 2019 9:35 PM

rodolfoleal (Wed, 09 Oct 2019 00:36:46 GMT):

Clipboard - October 8, 2019 9:36 PM

rodolfoleal (Wed, 09 Oct 2019 00:39:24 GMT):
Works fine with little load but after increase it started received this error, if I stop the load it starts to works again.

davidkhala (Wed, 09 Oct 2019 02:48:32 GMT):
@bretharrison Bret, is there any time plan for our sdk-node migration to Github?

Hengming (Wed, 09 Oct 2019 03:07:14 GMT):
Anyone has clue about this build: https://jenkins.hyperledger.org/job/fabric-sdk-node-verify-x86_64/3076/consoleFull? The build seems to be failed with getting fabric-chaincode-java from jitpack.io.

bestbeforetoday (Wed, 09 Oct 2019 08:41:13 GMT):
My guess would be a network or other access issue with jitpack.io. Maybe just try again later

rameshyadav444 (Wed, 09 Oct 2019 09:45:23 GMT):
Has joined the channel.

rameshyadav444 (Wed, 09 Oct 2019 12:03:20 GMT):
I was trying to create a new org in balance transfer application 1.4.3 version. Started the network, I tried to run all the REST API's as per the documentation. After registering users on all 3 orgs, created a new channel with mychannel. Then I tried to join all the peers to all 3 orgs to mychannel. I was able to join peers to org1 and org2 to mychannel through REST API, but when send to join peers to org3 to join mychannel it was giving below error. curl -s -X POST http://localhost:4000/channels/mychannel/peers -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1Njk0MzgzNTIsInVzZXJuYW1lIjoiUmFtZXNoIiwib3JnTmFtZSI6Ik9yZzMiLCJpYXQiOjE1Njk0MDIzNTJ9.iyMdcz7zYgR6bQHuWBQXrgYJ8U_wXsdDEZ8rOTR4Fvs" -H "content-type: application/json" -d '{"peers": ["peer0.org3.example.com","peer1.org3.example.com"]}' [ERROR] Join-Channel - Failed to join all peers to channel. cause:Failed to join peer to the channel with error :: Error: 2 UNKNOWN: access denied: channel [] creator org [Org3MSP]

rameshyadav444 (Wed, 09 Oct 2019 12:03:33 GMT):
Any suggestion on this error?

klenik (Wed, 09 Oct 2019 13:38:08 GMT):
Has left the channel.

Randyshu2018 (Thu, 10 Oct 2019 02:53:07 GMT):
I'm so confused that why Using peer as a user to send transaction and receive a good response :joy: Is this a bug ?

davidkhala (Thu, 10 Oct 2019 03:44:46 GMT):
Fabric will not using peer as user. The confusion might come from `peer` command tool.

bestbeforetoday (Thu, 10 Oct 2019 12:58:26 GMT):
In case anyone is interested in how I've changed the wallets (used in the _fabric-network_ API) for v2.0, there is a Powerpoint (with speaker notes) attached to this Jira: https://jira.hyperledger.org/browse/FABN-1353 There is also a recording of me talking through those slides in one of Fabric Developer Community calls (starting about 1m30s in): https://wiki.hyperledger.org/download/attachments/6423554/2019-1003-fabricdevcommunitycall.zip The documentation mentioned in that call is in the current working (master branch) documentation: https://fabric-sdk-node.github.io/master/tutorial-wallet.html Any feedback or suggestions are very welcome!

vtech (Fri, 11 Oct 2019 07:02:08 GMT):
Has joined the channel.

dmalik (Fri, 11 Oct 2019 07:14:35 GMT):
Has joined the channel.

dmalik (Fri, 11 Oct 2019 07:20:07 GMT):
Hello Experts, is there any example for integrating the HSM using node-sdk ? I found node test cases in github but getting error while using tls enabled option for Fabric certificate authority during enroll api call ( can't validate first certificate) .Thanks

abel23 (Fri, 11 Oct 2019 09:25:11 GMT):
where is the rest-api doc?

sahilgoel (Fri, 11 Oct 2019 10:53:03 GMT):
Hello guys

sahilgoel (Fri, 11 Oct 2019 10:53:28 GMT):
I have an network of 27 organisations, I am trying to deploy the SDK

sahilgoel (Fri, 11 Oct 2019 10:54:09 GMT):
In the connection profile i setup one org details and try to communicate with the network but it sdk returns this error no suitable peers available to initialize from

sahilgoel (Fri, 11 Oct 2019 10:54:19 GMT):
Any suggestions, what can be wrong

sahilgoel (Fri, 11 Oct 2019 10:54:40 GMT):
I have checked the certificates, invocation of chaincode from CLI

generak (Fri, 11 Oct 2019 11:12:35 GMT):
Could you send through the connection profile? You may not have set up a peer for the org you've defined. The connection profile needs at least one peer to be defined, even if you're using service discovery.

sahilgoel (Fri, 11 Oct 2019 11:12:59 GMT):
Yes, there is one peer defined in the profile

generak (Fri, 11 Oct 2019 11:15:54 GMT):
Sorry, it's pretty difficult to debug without seeing the connection profile itself. Would you be able to upload it to pastebin or a similar service and send through the link? Feel free to retract any identifiable information if necessary.

sahilgoel (Fri, 11 Oct 2019 11:17:59 GMT):
https://pastebin.com/dl/W3N55X7f

generak (Fri, 11 Oct 2019 11:19:29 GMT):
Cheers, I'll take a look.

sahilgoel (Fri, 11 Oct 2019 11:19:55 GMT):
Yeah sure

sahilgoel (Fri, 11 Oct 2019 11:32:30 GMT):
Issue solved

generak (Fri, 11 Oct 2019 12:24:29 GMT):
Awesome, what was the issue?

RaynielRamos (Fri, 11 Oct 2019 17:37:35 GMT):
Has joined the channel.

RaynielRamos (Fri, 11 Oct 2019 17:37:38 GMT):
hi, i am a computer science sudent, i am traying install node sdk in windows 10, but i need to compile something using .net framework 2.0 sdk, but it not work in windows 10, so, another way exist to do this?????

rodolfoleal (Sun, 13 Oct 2019 20:46:52 GMT):
Great, looks like it will help a lot managing identities.

diego_ (Mon, 14 Oct 2019 17:08:20 GMT):
Has joined the channel.

Randyshu2018 (Tue, 15 Oct 2019 08:42:52 GMT):

Anyone know that problem ?

CT123 (Tue, 15 Oct 2019 15:27:16 GMT):
Has joined the channel.

biligunb (Wed, 16 Oct 2019 03:05:43 GMT):
FILE is not there ??? probably should check if it exists at all

biligunb (Wed, 16 Oct 2019 03:10:41 GMT):
1 simple question Which one is faster? 1. Java SDK 2. Node SDK

Ammu (Thu, 17 Oct 2019 07:31:46 GMT):
in fabcar chaincode how to change node language instead of go langugage?

mahoney1 (Thu, 17 Oct 2019 09:04:49 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

Ammu (Thu, 17 Oct 2019 12:02:26 GMT):
what is the command for instantiate chaincode using node

Ammu (Thu, 17 Oct 2019 12:02:40 GMT):
channel name mychannel

soumyanayak (Thu, 17 Oct 2019 13:10:26 GMT):
https://github.com/hyperledger/fabric-samples/blob/release-1.4/balance-transfer/app/instantiate-chaincode.js -- you can check this link

Ammu (Thu, 17 Oct 2019 14:47:25 GMT):

instantiate.png

redegade (Mon, 21 Oct 2019 15:23:39 GMT):
This doesn't directly answer your question, but I don't think it matters in most applications, unless you are doing some very time sensitive calculations (stock-market operations comes to mind).

biligunb (Tue, 22 Oct 2019 01:08:52 GMT):
I have heard that because of Java's thread etc... it is significantly faster than Node.js SDK. I thought someone might CONFIRM this here :)

abel23 (Wed, 23 Oct 2019 05:40:17 GMT):
How to enroll different kinds of users from a CA in an organization. Say i want to give access to a clerk who can only query the chaincode and not invoke them. How do I do this? How can i create a wallet id like this using node SDK?

soumyanayak (Wed, 23 Oct 2019 07:08:18 GMT):
Have a look at this link - https://github.com/hyperledger/fabric-chaincode-go/blob/master/pkg/cid/README.md

abel23 (Wed, 23 Oct 2019 09:37:19 GMT):
Yea. Thank you!

ahmad-raza (Thu, 24 Oct 2019 14:02:10 GMT):
HI all Error is shown while instantiating chaincode chaincode registration failed: container exited with 1 Any one can help Errors in peer logs "failed to invoke chaincode name:"lscc" , error: container exited with 1" I have seen there is docker image created for chaincode but there is no container shown in list Any suggestions hints?? I have upgraded chaincode many times before but now it is giving error . ???

rmscott (Thu, 24 Oct 2019 15:38:22 GMT):
Has joined the channel.

abel23 (Fri, 25 Oct 2019 04:13:05 GMT):
How to make a new department in hyperledger fabric? While enrolling a user, there is a field 'affiliation' which is having 'org1.department1'. How do i create an 'org1.department2' so i can enroll the user who is affiliated to department 2? Any ideas?

abel23 (Fri, 25 Oct 2019 04:16:28 GMT):
const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: 'user1', role: 'client' }, adminIdentity);

carlosalca (Fri, 25 Oct 2019 05:35:23 GMT):
Has joined the channel.

Adryx86 (Fri, 25 Oct 2019 07:07:18 GMT):
Has joined the channel.

Adryx86 (Fri, 25 Oct 2019 07:07:20 GMT):
Hi guys.. i foud what seems to be a "bug" in fabric-client node js library. I don't know where to post the details.. could someone of you help me ?

davidkel (Fri, 25 Oct 2019 07:30:34 GMT):
login in to https://jira.hyperledger.org with your linux foundation id and create an issue for the project FABN

Adryx86 (Fri, 25 Oct 2019 08:01:41 GMT):
Thanks, i did it https://jira.hyperledger.org/browse/FABN-1410

cenkozan (Fri, 25 Oct 2019 08:20:58 GMT):
Has joined the channel.

cenkozan (Fri, 25 Oct 2019 08:22:54 GMT):
Hi everyone! I want to develop my BE with TypeScript to have a better cross functional team - Is this supported or will it cause problems? Thanks in advance.

rthatcher (Fri, 25 Oct 2019 08:27:37 GMT):
You should be able to create a new affiliation with the `AffiliationService` class https://fabric-sdk-node.github.io/master/AffiliationService.html

abel23 (Fri, 25 Oct 2019 09:01:59 GMT):
Thank you my friend.

alkiimista (Fri, 25 Oct 2019 11:53:04 GMT):
Has joined the channel.

alkiimista (Fri, 25 Oct 2019 11:54:10 GMT):
Has left the channel.

bestbeforetoday (Fri, 25 Oct 2019 15:26:04 GMT):
I'm not sure exactly what you mean by _BE_ but you can certainly write client application code (using the Node SDK) and smart contract (chaincode) implementations in TypeScript. The SDK includes TypeScript definitions

cenkozan (Fri, 25 Oct 2019 15:29:37 GMT):
Thanks a lot for your answer, Mark!

Randyshu2018 (Mon, 28 Oct 2019 09:31:18 GMT):
The minimum requirement to access a fabric network are : peer tls cert ,peer address, user signcert and user keystore and the peer and user must in the same organization. my goal is to sign only with signcert and privatekey, is this can be achieved?

mastersingh24 (Mon, 28 Oct 2019 15:48:17 GMT):
not quite sure exactly what you are asking here?

Arindam (Mon, 28 Oct 2019 23:16:34 GMT):
can any one help me with this error

Arindam (Mon, 28 Oct 2019 23:16:35 GMT):
[2019-10-28 23:15:01.184] [DEBUG] Helper - [NetworkConfig101.js]: _addPeersToChannel - peer0.airline.net - grpcs://peer0.airline.net:20001 [2019-10-28 23:15:01.184] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name borderer.baggageorderer.net [2019-10-28 23:15:01.185] [ERROR] invoke-chaincode - TypeError: Channel options must be an object with string keys and integer or string values at ServiceClient.Client (/home/ubuntu/project/network/node_modules/grpc/src/client.js:485:19) at new ServiceClient (/home/ubuntu/project/network/node_modules/grpc/src/client.js:931:12) at new Orderer (/home/ubuntu/project/network/node_modules/fabric-client/lib/Orderer.js:48:25) at Client.newOrderer (/home/ubuntu/project/network/node_modules/fabric-client/lib/Client.js:369:10) at NetworkConfig_1_0.getOrderer (/home/ubuntu/project/network/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:243:36) at NetworkConfig_1_0._addOrderersToChannel (/home/ubuntu/project/network/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:351:26) at NetworkConfig_1_0.getChannel (/home/ubuntu/project/network/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:156:10) at Client.getChannel (/home/ubuntu/project/network/node_modules/fabric-client/lib/Client.js:257:37) at Object.invokeChaincode (/home/ubuntu/project/network/app/invoke-transaction.js:35:21)

Arindam (Mon, 28 Oct 2019 23:16:47 GMT):
TypeError: Channel options must be an object with string keys and integer or string values

Randyshu2018 (Tue, 29 Oct 2019 01:12:04 GMT):
sorry, I wanna login with user's signcert and privatekey

Randyshu2018 (Tue, 29 Oct 2019 01:13:50 GMT):

Clipboard - October 29, 2019 9:13 AM

Randyshu2018 (Tue, 29 Oct 2019 01:14:58 GMT):
these params is too much than what i expect.

Randyshu2018 (Tue, 29 Oct 2019 01:15:54 GMT):

Clipboard - October 29, 2019 9:15 AM

Tom-Xu-CNXA (Tue, 29 Oct 2019 07:41:19 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?

AntonyZanetti (Tue, 29 Oct 2019 14:00:17 GMT):
Has joined the channel.

Adryx86 (Tue, 29 Oct 2019 16:06:46 GMT):
Hi, i build a node rest server for my blockchain.. I'm trying it with a load test and i got that 20% of requests fails with the same error. The chaincode is written in java and the transaction on test is a query transaction. Here the error: 2019-10-29T16:06:24.676Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.pomodoro.it:7051" failed: message=cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory, stack=Error: cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory at self._endorserClient.processProposal (/tmp/build/node_modules/fabric-client/lib/Peer.js:140:36) at Object.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:1207:9) at InterceptingListener._callNext (/tmp/build/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/tmp/build/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://peer1.org1.pomodoro.it:7051, name=peer1.org1.pomodoro.it:7051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.org1.pomodoro.it:7051, grpc.ssl_target_name_override=peer1.org1.pomodoro.it, grpc.default_authority=peer1.org1.pomodoro.it, isProposalResponse=true

Adryx86 (Tue, 29 Oct 2019 16:06:46 GMT):
Hi, i build a node rest server for my blockchain.. I'm trying it with a load test and i got that 20% of requests fails with the same error. The chaincode is written in java and the transaction on test is a query transaction. Here the error: 2019-10-29T16:06:24.676Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.pomodoro.it:7051" failed: message=cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory, stack=Error: cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory at self._endorserClient.processProposal (/tmp/build/node_modules/fabric-client/lib/Peer.js:140:36) at Object.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:1207:9) at InterceptingListener._callNext (/tmp/build/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/tmp/build/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://peer1.org1.pomodoro.it:7051, name=peer1.org1.pomodoro.it:7051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.org1.pomodoro.it:7051, grpc.ssl_target_name_override=peer1.org1.pomodoro.it, grpc.default_authority=peer1.org1.pomodoro.it, isProposalResponse=true I tried multiple times with 100 concurrent requests and anaverage of 19% requests fails..

Adryx86 (Tue, 29 Oct 2019 16:06:46 GMT):
Hi, i build a node rest server for my blockchain.. I'm trying it with a load test and i got that 20% of requests fails with the same error. The chaincode is written in java and the transaction on test is a query transaction. Here the error: 2019-10-29T16:06:24.676Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.pomodoro.it:7051" failed: message=cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory, stack=Error: cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory at self._endorserClient.processProposal (/tmp/build/node_modules/fabric-client/lib/Peer.js:140:36) at Object.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:1207:9) at InterceptingListener._callNext (/tmp/build/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/tmp/build/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://peer1.org1.pomodoro.it:7051, name=peer1.org1.pomodoro.it:7051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.org1.pomodoro.it:7051, grpc.ssl_target_name_override=peer1.org1.pomodoro.it, grpc.default_authority=peer1.org1.pomodoro.it, isProposalResponse=true I tried multiple times with 100 concurrent requests and anaverage of 19% requests fails.. I think the problem is the peer1 is not an anchor peer.. the topology of the network is two peers per org, two orgs, the peer0 of each org is the anchor peer. I used the gateway to connect with the discovery.

Adryx86 (Tue, 29 Oct 2019 16:06:46 GMT):
Hi, i build a node rest server for my blockchain.. I'm trying it with a load test and i got that 20% of requests fails with the same error. The chaincode is written in java and the transaction on test is a query transaction. Here the error: 2019-10-29T16:06:24.676Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.pomodoro.it:7051" failed: message=cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory, stack=Error: cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory at self._endorserClient.processProposal (/tmp/build/node_modules/fabric-client/lib/Peer.js:140:36) at Object.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:1207:9) at InterceptingListener._callNext (/tmp/build/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/tmp/build/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://peer1.org1.pomodoro.it:7051, name=peer1.org1.pomodoro.it:7051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.org1.pomodoro.it:7051, grpc.ssl_target_name_override=peer1.org1.pomodoro.it, grpc.default_authority=peer1.org1.pomodoro.it, isProposalResponse=true I tried multiple times with 100 concurrent requests and anaverage of 19% requests fails.. I think the problem is the peer1 is not an anchor peer.. the topology of the network is two peers per org, two orgs, the peer0 of each org is the anchor peer. I used the gateway to connect with the discovery and the chaincode is installed on peer0 of each org. Could be this the problem.. i need to install the chaincode on each peer ?

Adryx86 (Tue, 29 Oct 2019 16:06:46 GMT):
Hi, i build a node rest server for my blockchain.. I'm trying it with a load test and i got that 20% of requests fails with the same error. The chaincode is written in java and the transaction on test is a query transaction. Here the error: 2019-10-29T16:06:24.676Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.pomodoro.it:7051" failed: message=cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory, stack=Error: cannot retrieve package for chaincode uni-demo/0.17, error open /var/hyperledger/production/chaincodes/uni-demo.0.17: no such file or directory at self._endorserClient.processProposal (/tmp/build/node_modules/fabric-client/lib/Peer.js:140:36) at Object.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:1207:9) at InterceptingListener._callNext (/tmp/build/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/tmp/build/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/tmp/build/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://peer1.org1.pomodoro.it:7051, name=peer1.org1.pomodoro.it:7051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.org1.pomodoro.it:7051, grpc.ssl_target_name_override=peer1.org1.pomodoro.it, grpc.default_authority=peer1.org1.pomodoro.it, isProposalResponse=true I tried multiple times with 100 concurrent requests and anaverage of 19% requests fails.. I think the problem is the peer1 is not an anchor peer.. the topology of the network is two peers per org, two orgs, the peer0 of each org is the anchor peer. I used the gateway to connect with the discovery and the chaincode is installed on peer0 of each org. Could be this the problem.. do i need to install the chaincode on each peer ?

bestbeforetoday (Wed, 30 Oct 2019 09:37:29 GMT):
I recall there being some performance issue with Java chaincode under load so it's possible you are seeing this. Apparently there is a fix in the codebase but not yet in a released version. Might be worth posting on #fabric-java-chaincode and, if practical, perhaps also trying with Node chaincode just to narrow down the issue

Adryx86 (Wed, 30 Oct 2019 09:58:58 GMT):
Hi, i solved this by installing chaincode on each peer.

Adryx86 (Wed, 30 Oct 2019 10:05:42 GMT):
Now i'm facing another issue.. i increased number of requests to 300 and then i got some errors like this one: 2019-10-30T09:38:38.662Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer1.org1.pomodoro.it:7051 2019-10-30T09:38:38.662Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.pomodoro.it:7051" failed: message=Failed to connect before the deadline URL:grpcs://peer1.org1.pomodoro.it:7051, stack=Error: Failed to connect before the deadline URL:grpcs://peer1.org1.pomodoro.it:7051 at checkState (/tmp/build/node_modules/fabric-client/node_modules/grpc/src/client.js:835:16), connectFailed=true 2019-10-30T09:38:38.666Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051 2019-10-30T09:38:38.666Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer0.org1.pomodoro.it:7051" failed: message=Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051, stack=Error: Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051 at checkState (/tmp/build/node_modules/fabric-client/node_modules/grpc/src/client.js:835:16), connectFailed=true 2019-10-30T09:38:38.669Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051 2019-10-30T09:38:38.669Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051 2019-10-30T09:38:38.673Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051 2019-10-30T09:38:38.673Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051 2019-10-30T09:38:38.676Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051 2019-10-30T09:38:38.676Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.pomodoro.it:7051

davidkel (Wed, 30 Oct 2019 10:45:39 GMT):
Are you creating gateways for each request, using it once, then disconnecting by any chance ?

Adryx86 (Wed, 30 Oct 2019 11:11:45 GMT):
Yes i do. Is that the problem ?

Adryx86 (Wed, 30 Oct 2019 11:12:56 GMT):
I'm using different identity on each request so i think i can't change this

davidkel (Wed, 30 Oct 2019 11:58:40 GMT):
A different id on each request ? how many ids do you have ? you should cache the gateway for each different id

Adryx86 (Wed, 30 Oct 2019 12:55:03 GMT):
I'm using the same id and different labels inside the wallet but the scenario i'm trying to simulate is using hundreds identities those conccurently do the same action.. I know it's somethin remote from the real world.. but i'm trying it to known the limits of the product and how to face this kind of issues if them will affect a production environment

Adryx86 (Wed, 30 Oct 2019 12:57:54 GMT):
Now i tried to configure the gateway with this option: queryHandlerOptions.strategy = MSPID_SCOPE_ROUND_ROBIN I'm retrieving a different error : Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://peer1.org1.pomodoro.it:7051","stack":"Error: Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://peer1.org1.pomodoro.it:7051\n at Network._initializeInternalChannel (/tmp/build/node_modules/fabric-network/lib/network.js:112:12)\n at process._tickCallback (internal/process/next_tick.js:68:7)

baohua (Wed, 30 Oct 2019 18:26:28 GMT):
Has joined the channel.

baohua (Wed, 30 Oct 2019 18:26:28 GMT):
Hi team, does anyone know which version of sdk-node is the best to work with fabric v1.4.3? I saw there's v1.4.0-rc1, but no official release.

baohua (Wed, 30 Oct 2019 18:26:28 GMT):
Hi team, does anyone know which version of sdk-node is the best to work with fabric v1.4.3? I saw there's v1.4.2 and v1.4.4, but no v1.4.3.

davidkel (Wed, 30 Oct 2019 18:35:03 GMT):
@baohua the sdks don't follow the fabric release schedule for micro version numbers. So in the case of node sdk, v1.4.4 being the current latest version can be used with fabric 1.4.3

baohua (Wed, 30 Oct 2019 18:36:18 GMT):
OK, thanks david!

akshay.sood (Thu, 31 Oct 2019 04:43:04 GMT):
Hi guys, Is there anyway to renew a user's certificate using fabric-node-sdk?

SamYuan1990 (Thu, 31 Oct 2019 05:29:30 GMT):
if you want to reenroll, fabric-node-sdk -> fabric-ca-node-sdk(not ensure the name, but a node sdk for ca), enroll again or reenroll?

JayJong (Thu, 31 Oct 2019 07:37:28 GMT):
Hi, does anyone knows when will node.js 12 be supported?

JayJong (Thu, 31 Oct 2019 07:37:28 GMT):
Hi, does anyone knows when will node.js 12 for fabric-client and fabric-ca-client be supported?

JayJong (Thu, 31 Oct 2019 07:37:28 GMT):
Hi, does anyone know when will node.js 12 for fabric-client and fabric-ca-client be supported?

Randyshu2018 (Thu, 31 Oct 2019 07:57:33 GMT):
how to change grpc version of fabric-client when installing ?

adarshaJha (Thu, 31 Oct 2019 09:14:56 GMT):

Screenshot from 2019-10-31 14-44-28.png

adarshaJha (Thu, 31 Oct 2019 09:17:16 GMT):
I'm getting this error when doing npm i

adarshaJha (Thu, 31 Oct 2019 09:17:37 GMT):
i'm following this https://github.com/alejandrolr/fabric-ldap-example.git

adarshaJha (Thu, 31 Oct 2019 09:18:10 GMT):
and doing npm in fabric-sdk-with-ldap directory

AllanHansen (Fri, 01 Nov 2019 00:35:35 GMT):
Has joined the channel.

VadimInshakov (Fri, 01 Nov 2019 12:50:29 GMT):
Does anyone know anything about the ACL? I also created stackoverflow question here: https://stackoverflow.com/questions/58602843/hyperledger-fabric-acl

SaphiraBjartskular (Mon, 04 Nov 2019 21:05:41 GMT):
What is the best way to get all transactions on the channel? I have tried getstatebyrange with empty params but get an error

braduf (Wed, 06 Nov 2019 20:38:44 GMT):
Hi, can anyone point me to the npm package of the release-1.4 version, I can only find the 1.4.4 version on npm, but I have noticed it is not the same...

braduf (Wed, 06 Nov 2019 21:01:33 GMT):
The problem I was having is that I want to use setEndorsingPeers from the Transaction class, in release-1.4 it is present, but in 1.4.4 Transaction doesn't have this method. Is it because 1.4.4 is not the latest version or is it because setEndorsingPeers is deprecated? Thanks in advance for your answers.

bestbeforetoday (Wed, 06 Nov 2019 21:24:52 GMT):
Looks like I added that after v1.4.4 was published. You could pick it up from snapshots published to npm with the `unstable-1.4` tag, or wait for v1.4.5 to be published

biligunb (Thu, 07 Nov 2019 00:43:14 GMT):
try setting it in the package.json (1.4.0)

braduf (Thu, 07 Nov 2019 21:44:37 GMT):
Thanks a lot, that worked! I do have a question about the use of `setEndorsingPeers` though. I would like to know when it is necessary to explicitly set the endorsing peers or is it always better to set them explicitly for performance whenever the endorsement policy is depending of a strict set of orgs? I was thinking that if I use setEndorsingPeers, that there would be a performance gain over just having the other orgs' anchor peers in the connection profile and letting the sdk figure out which endorsements the transaction needs. But i didn't really notice any performance difference, so can you tell me when it should and should not be used, please? Thank you very much!

braduf (Thu, 07 Nov 2019 21:44:53 GMT):
Thanks a lot, that worked! I do have a question about the use of setEndorsingPeers though. I would like to know when it is necessary to explicitly set the endorsing peers or is it always better to set them explicitly for performance whenever the endorsement policy is depending of a strict set of orgs? I was thinking that if I use setEndorsingPeers, that there would be a performance gain over just having the other orgs' anchor peers in the connection profile and letting the sdk figure out which endorsements the transaction needs. But i didn't really notice any performance difference, so can you tell me when it should and should not be used, please? Thank you very much!

bestbeforetoday (Fri, 08 Nov 2019 09:49:37 GMT):
I think the client will generally try to obtain endorsements from (just) enough peers to satisfy the endorsement policy, so generally you should not need to use `setEndorsingPeers`. This mechanism was added to support scenarios where you needed to do state-based endorsement. For example, the general endorsement policy might require endorsements from any two orgs, whereas for a specific transaction you might want to get endorsements from the two specific orgs relevant to that transaction (e.g. buyer and seller orgs). You can achieve this by specifying endorsing peers that belong to those two orgs, which will override the default endorsement plan

ahmad-raza (Tue, 12 Nov 2019 14:06:26 GMT):
Hi All, How can we use fabric-node-sdk to make peer identities, Order identities , user and admin identities using Fabric-CA ?? And generate .pem files and key files to start hyperledger fabric network ?? to replace cryptogen with Fabric-CA ???

biligunb (Wed, 13 Nov 2019 02:31:45 GMT):
Yes. you can

sureshtedla (Wed, 13 Nov 2019 04:07:56 GMT):
Hi All, How to Feed data from Oracle DB to fabric Network? Can any one know how to do this?

ahmad-raza (Wed, 13 Nov 2019 05:48:14 GMT):
any directions

ahmad-raza (Wed, 13 Nov 2019 05:48:34 GMT):
any directions ? example ? etc ? ?

biligunb (Wed, 13 Nov 2019 08:14:14 GMT):
You can look around fabric-samples/basic-network or first-network. and also see the documentation for fabric node sdk

biligunb (Wed, 13 Nov 2019 08:14:51 GMT):
Is Fabric Node SDK - FabricClient thread safe?

davidkel (Wed, 13 Nov 2019 08:20:55 GMT):
Yes, because node apps are single threaded.

biligunb (Wed, 13 Nov 2019 08:42:56 GMT):
If I use 1 instance of FabricClient and send conflicting transactions will it be okay?

bestbeforetoday (Wed, 13 Nov 2019 10:12:05 GMT):
Depends what you mean by "conflicting transactions". Sending multiple transactions concurrently is general should be fine. If those transactions manipulate the same data in the ledger then you will likely see transactions fail due to data consistency issues

bestbeforetoday (Wed, 13 Nov 2019 10:12:05 GMT):
Depends what you mean by "conflicting transactions". Sending multiple transactions concurrently in general should be fine. If those transactions manipulate the same data in the ledger then you will likely see transactions fail due to data consistency issues

Esegarra (Wed, 13 Nov 2019 12:02:41 GMT):
Has joined the channel.

Esegarra (Wed, 13 Nov 2019 12:13:10 GMT):
Hello! I’m testing a Fabric network over Kubernetes with 5 orderers in Raft consensus: ``` OrdererType: etcdraft Addresses: - orderer0-fabric-net-dev:7050 - orderer1-fabric-net-dev:7050 - orderer2-fabric-net-dev:7050 - orderer3-fabric-net-dev:7050 - orderer4-fabric-net-dev:7050``` I make the queries and invokes from a API written with the fabric-sdk-node. I’m loading the network config from a connection profile yaml file. When I tear down two orderers (excluding orderer0), leaving at least three orderers working, the network works as expected. However, every time I tear down orderer0, I’m not able to make invokes. I have read the following in the documentation (https://fabric-sdk-node.github.io/release-1.4/tutorial-network-config.html): “- channel.sendTransaction(): The request object parameter may use orderer name or let the fabric client find an orderer to use as defined in the connection profile configuration.” Is there a way to balance the workload between all the orderers? I do not want to be dependent on orderer0 and provide high availability. Thank you so much.

Esegarra (Wed, 13 Nov 2019 12:13:10 GMT):
Hello! I’m testing a Fabric network over Kubernetes with 5 orderers in Raft consensus: ``` OrdererType: etcdraft Addresses: - orderer0-fabric-net-dev:7050 - orderer1-fabric-net-dev:7050 - orderer2-fabric-net-dev:7050 - orderer3-fabric-net-dev:7050 - orderer4-fabric-net-dev:7050``` I make the queries and invokes from a API written with the` fabric-sdk-node`. I’m loading the network config from a connection profile yaml file. When I tear down two orderers (excluding orderer0), leaving at least three orderers working, the network works as expected. However, every time I tear down orderer0, I’m not able to make invokes. I have read the following in the documentation (https://fabric-sdk-node.github.io/release-1.4/tutorial-network-config.html): “- `channel.sendTransaction()` The request object parameter may use orderer name or let the fabric client find an orderer to use as defined in the connection profile configuration.” Is there a way to balance the workload between all the orderers? I do not want to be dependent on orderer0 and provide high availability. Thank you so much.

davidkel (Wed, 13 Nov 2019 12:48:34 GMT):
Assuming that you have all the orderers defined in your connection profile or you are using discovery and your setup ensures it will correctly discover all the orderers, you need to ensure you have called `initialize()` on the channel to enable the BasicCommitHandler plugin which should then perform basic failover. You can also write your own commit handler and some info about that can be found here https://fabric-sdk-node.github.io/release-1.4/tutorial-handlers.html

DilipManjunatha (Wed, 13 Nov 2019 13:06:39 GMT):
Has joined the channel.

Esegarra (Wed, 13 Nov 2019 15:30:01 GMT):
I will check it. Thanks for the info! I really appreciate

Esegarra (Wed, 13 Nov 2019 15:45:29 GMT):
@davidkel It works! Thank you again

laxmanmali (Thu, 14 Nov 2019 09:58:14 GMT):
Has joined the channel.

laxmanmali (Thu, 14 Nov 2019 09:58:15 GMT):
Hello Everyone Please find my problem on stackoverflow and please help me https://stackoverflow.com/questions/58763910/not-getting-correct-transaction-id-in-registertxevent-after-commit-data-in-ladge

laxmanmali (Thu, 14 Nov 2019 09:58:15 GMT):
I am using below code for submitting a transaction in fabric but not getting committing transaction Id in node js SDK let eventHub = await hlcConnection.channel.newChannelEventHub(hlcConnection.peer); // eventHub = await hlcConnection.channel.getChannelEventHubsForOrg("updevop1"); //eventHub = await hlcConnection.channel.getChannelEventHubsForOrg(); let txPromise = new Promise((resolve, reject) => { let handle = setTimeout(() => { eventHub.unregisterTxEvent(transactionIdString); eventHub.disconnect(); resolve({event_status: "TIMEOUT"}); }, 30000); eventHub.registerTxEvent(transactionIdString, (tx: any, code: any, block: any) => { clearTimeout(handle); const returnsStatus = {event_status: code, tx_id: tx}; if (code !== "VALID") { console.error("The transaction was invalid, code = " + code); resolve(returnsStatus); } else { console.log("The transaction has been committed on peer " + eventHub.getPeerAddr()); resolve(returnsStatus); } }, (err: any) => { //this is the callback if something goes wrong with the event registration or processing reject(new Error("There was a problem with the eventhub ::" + err)); }, {startBlock: null} //disconnect when complete ); eventHub.connect(); }); promises.push(txProm) I am getting txid 4826e50b51d505c31c6529a1699d51a8c78aaa6b0b360f92f44f8be7855b08cf but commiting id "transactionId": "e8622f67-9987-46c6-9094-93deb464184c" I am not able to get this committing ID at the time of event hub Please help me to resolve this issue

laxmanmali (Thu, 14 Nov 2019 09:58:15 GMT):
I am using below code for submitting a transaction in fabric but not getting committing transaction Id in node js SDK let eventHub = await channel.newChannelEventHub(hlcConnection.peer); // eventHub = await channel.getChannelEventHubsForOrg("updevop1"); //eventHub = await channel.getChannelEventHubsForOrg(); let txPromise = new Promise((resolve, reject) => { let handle = setTimeout(() => { eventHub.unregisterTxEvent(transactionIdString); eventHub.disconnect(); resolve({event_status: "TIMEOUT"}); }, 30000); eventHub.registerTxEvent(transactionIdString, (tx: any, code: any, block: any) => { clearTimeout(handle); const returnsStatus = {event_status: code, tx_id: tx}; if (code !== "VALID") { console.error("The transaction was invalid, code = " + code); resolve(returnsStatus); } else { console.log("The transaction has been committed on peer " + eventHub.getPeerAddr()); resolve(returnsStatus); } }, (err: any) => { //this is the callback if something goes wrong with the event registration or processing reject(new Error("There was a problem with the eventhub ::" + err)); }, {startBlock: null} //disconnect when complete ); eventHub.connect(); }); promises.push(txProm) I am getting txid 4826e50b51d505c31c6529a1699d51a8c78aaa6b0b360f92f44f8be7855b08cf but commiting id "transactionId": "e8622f67-9987-46c6-9094-93deb464184c" I am not able to get this committing ID at the time of event hub Please help me to resolve this issue

laxmanmali (Thu, 14 Nov 2019 12:05:12 GMT):
Hi Everyone I am using gateway code but I am facing issue please help me const walletPath = path.join(__dirname, "wallet1"); const wallet = new FileSystemWallet(walletPath); await wallet.import("newopwakandicomadmin", X509WalletMixin.createIdentity("newoMSPID", certPem, certPriv)); const gateway = new Gateway(); const connectOptions = { wallet, identity: "admin", discovery: {enabled: false} }; await gateway.connect(fabricConfiguration, connectOptions); const network = await gateway.getNetwork("channel"); // //Get the contract from the network. const contract = network.getContract("network"); let data = await contract.submitTransaction ("submitTransaction", JSON.stringify(transaction)); my data submit successfully on ledger but I am getting empty buffer

laxmanmali (Thu, 14 Nov 2019 12:05:12 GMT):
Hi Everyone I am using gateway code but I am facing the issue please help me const walletPath = path.join(__dirname, "wallet1"); const wallet = new FileSystemWallet(walletPath); await wallet.import("newopwakandicomadmin", X509WalletMixin.createIdentity("newoMSPID", certPem, certPriv)); const gateway = new Gateway(); const connectOptions = { wallet, identity: "admin", discovery: {enabled: false} }; await gateway.connect(fabricConfiguration, connectOptions); const network = await gateway.getNetwork("channel"); // //Get the contract from the network. const contract = network.getContract("network"); let data = await contract.submitTransaction ("submitTransaction", JSON.stringify(transaction)); my data submit successfully on ledger but I am getting empty buffer

laxmanmali (Thu, 14 Nov 2019 12:05:12 GMT):
Hi Everyone I am using gateway code but I am facing the issue please help me const walletPath = path.join(__dirname, "wallet1"); const wallet = new FileSystemWallet(walletPath); await wallet.import("newopwakandicomadmin", X509WalletMixin.createIdentity("newoMSPID", certPem, certPriv)); const gateway = new Gateway(); const connectOptions = { wallet, identity: "admin", discovery: {enabled: false} }; await gateway.connect(fabricConfiguration, connectOptions); const network = await gateway.getNetwork("channel"); // //Get the contract from the network. const contract = network.getContract("network"); let data = await contract.submitTransaction ("submitTransaction", JSON.stringify(transaction)); my data submited successfully on ledger but I am getting empty buffer

davidkel (Thu, 14 Nov 2019 12:19:51 GMT):
Have you considered using the fabric-network apis instead ? It takes all the hassle out of having to try to manage events yourself.

davidkel (Thu, 14 Nov 2019 12:19:51 GMT):
Have you considered using the fabric-network apis instead ? It takes all the hassle out of having to try to manage transaction committed events yourself.

laxmanmali (Thu, 14 Nov 2019 12:34:57 GMT):
I am considering fabric- network API as a last option . so can you please look into my code and let me know what can be done.

davidkel (Thu, 14 Nov 2019 12:37:44 GMT):
Impossible to say except "e8622f67-9987-46c6-9094-93deb464184c" is not a transaction id, it's a uuid so no idea where it is coming from.

laxmanmali (Thu, 14 Nov 2019 12:44:08 GMT):
without real transaction ID how can get same transaction if i want

laxmanmali (Thu, 14 Nov 2019 12:48:31 GMT):
below are the my committed data on fabric ledger { "_id": "\u0000Asset:org.hyperledger.composer.system.HistorianRecord\u0000330a9636-0ae2-4aee-a19c-ef72078e94c2\u0000", "_rev": "1-c865de341fa6bae8bd1f1df00d895986", "$class": "org.hyperledger.composer.system.HistorianRecord", "$registryId": "org.hyperledger.composer.system.HistorianRecord", "$registryType": "Asset", "eventsEmitted": [ { "$class": "ssueTokenEvent", "amount": 1000000000, "eventId": "330a9636-0ae2-4aee-a19c-ef72078e94c2#0" "timestamp": "2019-11-14T11:57:04.729Z", "toWallet": "axcmdddan@newop.wakandi.com", "token": "USD" } ], "identityUsed": "resource:org.hyperledger.composer.system.Identity#9422710cada8f937e59d884f7ab6570f0b4308dd18233190d2c89a07e3d7f411", "participantInvoking": "resource:wakandi.token.model.Admin#newop.wakandi.com", "transactionId": "330a9636-0ae2-4aee-a19c-ef72078e94c2", "transactionInvoked": "resource:wakandi.token.model.IssueToken#330a9636-0ae2-4aee-a19c-ef72078e94c2", "transactionTimestamp": "2019-11-14T11:57:04.729Z", "transactionType": "wakandi.token.model.IssueToken", "~version": "\u0000CgMBrQA=" }

laxmanmali (Thu, 14 Nov 2019 12:48:31 GMT):
below are the my committed data on fabric ledger { "_id": "\u0000Asset:org.hyperledger.composer.system.HistorianRecord\u0000330a9636-0ae2-4aee-a19c-ef72078e94c2\u0000", "_rev": "1-c865de341fa6bae8bd1f1df00d895986", "$class": "org.hyperledger.composer.system.HistorianRecord", "$registryId": "org.hyperledger.composer.system.HistorianRecord", "$registryType": "Asset", "eventsEmitted": [ { "$class": "ssueTokenEvent", "amount": 1000000000, "eventId": "330a9636-0ae2-4aee-a19c-ef72078e94c2#0" "timestamp": "2019-11-14T11:57:04.729Z", "toWallet": "axcmdddan@newop.wakandi.com", "token": "USD" } ], "identityUsed": "resource:org.hyperledger.composer.system.Identity#9422710cada8f937e59d884f7ab6570f0b4308dd18233190d2c89a07e3d7f411", "participantInvoking": ".Admin#newop.wakandi.com", "transactionId": "330a9636-0ae2-4aee-a19c-ef72078e94c2", "transactionInvoked": "#330a9636-0ae2-4aee-a19c-ef72078e94c2", "transactionTimestamp": "2019-11-14T11:57:04.729Z", "transactionType": "wakandi.token.model.IssueToken", "~version": "\u0000CgMBrQA=" }

davidkel (Thu, 14 Nov 2019 12:58:20 GMT):
You are looking at something hyperledger composer has generated and that transactionId is not the same as the fabric transaction id.

davidkel (Thu, 14 Nov 2019 12:59:45 GMT):
Seriously if you are attempting to port your composer application to a native fabric application I would highly recommend using the fabric-network implementation for your client side application.

ahmad-raza (Thu, 14 Nov 2019 14:23:11 GMT):
Is there is something wrong with https://fabric-shim.github.io/release-1.4/fabric-shim.ClientIdentity.html CLIENTIDENTITY class?? yesterday it is working perfectly (getAttributeValue()) today its giving null . I checked from Fabric-CA variable is existed but getAttributeValue() give its value null?????

laxmanmali (Fri, 15 Nov 2019 03:36:44 GMT):
got it Thanks

biligunb (Fri, 15 Nov 2019 05:12:12 GMT):
Yes. I mean tx1 updates 1 key/value and tx2 updates the SAME key/value pair. What happens if by some case tx2 tries to update the value before tx1 is committed? I am thinking : tx1 -> endorse OK, running tx2 -> endorse OK, block OK, commit OK ...

biligunb (Fri, 15 Nov 2019 05:12:12 GMT):
Yes. I mean tx1 updates 1 key/value and tx2 updates the SAME key/value pair. What happens if by some case tx2 tries to update the value before tx1 is committed? I am thinking : tx1 -> endorse OK, running tx2 -> endorse OK, block OK, commit OK ... then tx1 will fail due to MVCC, right?

Esegarra (Fri, 15 Nov 2019 08:26:35 GMT):
Hello! I’m still working in the high availability of the fabric network and now I have a question about the failover of the peers. I have two peers per org and a API Client (fabric-client) for the first org, with a connection profile yaml file. When I tear down the first peer (peer0org1) I’m not able to make invokes. The reason is the channel event hub. It needs to be connected with a peer (`let event_hub = channel.newChannelEventHub(peer)`). Is there a way to avoid connect a event hub to a peer explicitly and let it choose automatically?

prayagk (Fri, 15 Nov 2019 10:04:52 GMT):
Has joined the channel.

davidkel (Fri, 15 Nov 2019 10:23:27 GMT):
The fabric-network implementation has HA type capabilities for events. You would need to implement your own solution if you continue with the fabric-client level api's

Esegarra (Fri, 15 Nov 2019 10:38:11 GMT):
Thank you so much for your reply. I didn't know this information. I'm going to read about it. :smiley:

Ammu (Sat, 16 Nov 2019 09:58:39 GMT):
peer chaincode install -n mycc -v 1.0 -l node -p /opt/gopath/src/github.com/chaincode/chaincode_example02/node/

Ammu (Sat, 16 Nov 2019 09:58:54 GMT):
how to take path for chaincode......

Deepakbyrappa (Sun, 17 Nov 2019 04:37:44 GMT):
Has joined the channel.

pavan_2299 (Mon, 18 Nov 2019 06:19:11 GMT):
Has joined the channel.

pavan_2299 (Mon, 18 Nov 2019 06:19:12 GMT):
Hey I have working on hyper ledger fabric from last 1 and half month and I am using fabcar sample network, I want to save the wallet information in couch db instead of system storage but I am not able to find the URL for connecting couch db. Can any one suggest something, either solution or right method to do it. In which file should i make changes...Thanks in Advance.......

mattmaru (Mon, 18 Nov 2019 09:45:57 GMT):
Hello All. I would need your help. Can you share me an example of using "fabric-ca-client.revoke?" to unregister an existing user?

adriksemenove (Mon, 18 Nov 2019 13:12:52 GMT):
Has joined the channel.

rthatcher (Tue, 19 Nov 2019 14:13:24 GMT):
I haven't seen any examples of using the CouchDBWallet - but it is pretty easy to do for Fabcar. This is what you nee to do for the enrollAdmin.js code and it is the same for the other .js files: at line 8 make sure yout set up a const for CouchDBWallet (not FileSystem) `const { CouchDBWallet, X509WalletMixin } = require('fabric-network');` at line 24 replace the lines to create the new wallet: ``` // Create a new couchDB based wallet for managing identities. let options = {url : 'http://localhost:5984'}; const wallet = new CouchDBWallet(options); ``` Note that I am being lazy and just using the Couch DB provided for peer0.org1 and that it has no password.

rthatcher (Tue, 19 Nov 2019 14:15:10 GMT):
Fabric 2.0 will have a different implementation of Wallets - so when it is available and you switch to it this is one of the things you will need to watch for.

rthatcher (Tue, 19 Nov 2019 14:15:10 GMT):
Fabric 2.0 will have a different implementation of Wallets - so when it is available and you switch to it this is one of the things you will need to watch for. https://jira.hyperledger.org/browse/FABN-1353

pavan_2299 (Tue, 19 Nov 2019 17:20:12 GMT):
thanks

SaphiraBjartskular (Wed, 20 Nov 2019 18:59:52 GMT):
Hi I have a multi channel network running on a VM, when multiple requests are made in a short period a few requests will randomly fail with 'Could not connect before the deadline' Error. How do I raise timeouts on queryByChaincode and getChannels? thanks in advance

davidkhala (Thu, 21 Nov 2019 02:28:54 GMT):
@bestbeforetoday @bretharrison Is sdk-node in gerrit still accepting new patches? I find issues and want to help on offline signing docs and test case.

bestbeforetoday (Thu, 21 Nov 2019 07:51:01 GMT):
The GitHub repository is the primary repository now so raise pull requests against https://github.com/hyperledger/fabric-sdk-node

bestbeforetoday (Thu, 21 Nov 2019 07:51:36 GMT):
Change requests are no longer possible through Gerrit

sung (Thu, 21 Nov 2019 08:42:38 GMT):
Has joined the channel.

JulienTocci (Thu, 21 Nov 2019 11:38:41 GMT):
Has joined the channel.

JulienTocci (Thu, 21 Nov 2019 11:38:42 GMT):
Hello, i have setup mutual tls in my fabric network, everything is working on the blockchain side (i can use the cli with the --clientauth and the key/cert files and its working). I have tried setting the cert/key within the node client by both:

JulienTocci (Thu, 21 Nov 2019 11:38:44 GMT):
let clientKey = fs.readFileSync(path.join('resources/tls/client/server.key')); let clientCert = fs.readFileSync(path.join('resources/tls/client/server.crt')); _client.setTlsClientCertAndKey(Buffer.from(clientCert).toString(), Buffer.from(clientKey).toString());

JulienTocci (Thu, 21 Nov 2019 11:39:35 GMT):
and directly in the network.yaml

JulienTocci (Thu, 21 Nov 2019 11:39:36 GMT):
peer0.org1: url: grpcs://XXX:YYYY tlsCACerts: path: ./resources/tls/tlsca.org1-cert.pem clientCert: path: ./resources/tls/client/server.crt clientKey: path: ./resources/tls/client/server.key grpcOptions: # the following is very important to get it right in order to avoid grpcs errors ssl-target-name-override: peer0.org1 grpc.keepalive_time_ms: 600000 negotiationType: TLS trustServerCertificate: "true" clientCertFile: ./resources/tls/client/server.key clientKeyFile: ./resources/tls/client/server.key

JulienTocci (Thu, 21 Nov 2019 11:40:07 GMT):
but whatever i try, i always have this error in the peer logs:

JulienTocci (Thu, 21 Nov 2019 11:40:08 GMT):

Clipboard - November 21, 2019 12:40 PM

JulienTocci (Thu, 21 Nov 2019 11:40:49 GMT):
Its like the client isn't able to use the cert and key i gave him

deenario (Thu, 21 Nov 2019 13:26:20 GMT):
Successfully loaded user1 from persistence error from query = { Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at Object.exports.createStatusError (/home/ubuntu/whatthefake/backendServer/node_modules/fabric-client/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/home/ubuntu/whatthefake/backendServer/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1204:28) at InterceptingListener._callNext (/home/ubuntu/whatthefake/backendServer/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/home/ubuntu/whatthefake/backendServer/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/home/ubuntu/whatthefake/backendServer/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:845:24) code: 2, metadata: Metadata { _internal_repr: {} }, details: 'access denied: channel [mychannel] creator org [Org1MSP]' }

deenario (Thu, 21 Nov 2019 13:26:36 GMT):
Does someone understand why my CA is rejecting these invokes

deenario (Thu, 21 Nov 2019 13:26:56 GMT):
2019/11/21 10:14:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 10:29:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 10:44:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 10:59:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 11:14:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 11:29:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 11:44:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 11:59:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 12:14:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 12:29:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 12:44:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 12:59:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1' 2019/11/21 13:14:50 [DEBUG] Cleaning up expired nonces for CA 'ca-org1'

deenario (Thu, 21 Nov 2019 13:27:06 GMT):
These are the logs from the CA in the last 2 or 3 days

bhanukandregula (Thu, 21 Nov 2019 20:00:36 GMT):
Has joined the channel.

davidkhala (Fri, 22 Nov 2019 07:17:25 GMT):
Now after migration, where could we check build status like previously generated by Hyperledger job builder? And I see only nodejs 8.x is covered and Azure pipeline config, is it? How about 10.x

bestbeforetoday (Fri, 22 Nov 2019 09:29:17 GMT):
I have a PR in flight that both enabled documentation publishing and switches to use Node 10. We should be able to run builds against multiple Node versions in parallel quite easily in the Azure Pipelines build so, if maintainers agree, I'll probably look to do that in the near future. I think we probably want to get to Node 12 support in the master branch but this will mean re-writing all the Gulp build files to avoid using gulp@3, which doesn't work on Node 12

davidkhala (Fri, 22 Nov 2019 09:37:35 GMT):
Thanks, it is encouraging progress. Nodejs official said 2019-12-31 is end-of-life for node 8. it is close to our coming 2.0 release. In master maybe we could make 8 as deprecated ,10 as main support

bestbeforetoday (Fri, 22 Nov 2019 10:01:29 GMT):
If we can manage it, I quite like the idea of moving master straight to Node 12 now that is LTS. Other people might have different opinions though! :)

giacomo.minighin (Fri, 22 Nov 2019 10:23:47 GMT):
Has joined the channel.

giacomo.minighin (Fri, 22 Nov 2019 10:24:08 GMT):
can I use fabric node sdk with node version 12?

bestbeforetoday (Fri, 22 Nov 2019 11:00:17 GMT):
We haven't tested against Node 12, mainly because parts of the current build/test infrastructure don't work with Node 12. Whether it will actually run with Node 12, I couldn't say

giacomo.minighin (Fri, 22 Nov 2019 13:31:44 GMT):
why it doesn't work with node 12?

bestbeforetoday (Fri, 22 Nov 2019 15:26:59 GMT):
The build scripts use gulp@3.x, which has some dependencies that have their fingers in Node internals which have changed enough that they break with Node 12. So we would need to change the build scripts to use gulp@4.x, which is significantly different, or use another build tool

heatherp (Fri, 22 Nov 2019 15:42:59 GMT):
I am in the process of moving us to gulp@4.x in master, at least, as we speak :)

giacomo.minighin (Fri, 22 Nov 2019 15:56:19 GMT):
thank you for the explanation

hidura (Sun, 24 Nov 2019 01:38:39 GMT):
Has joined the channel.

RyanMathison (Mon, 25 Nov 2019 19:28:04 GMT):
Has joined the channel.

RyanMathison (Mon, 25 Nov 2019 19:28:05 GMT):
I am running into issues when trying commit a transaction when there is an "AND" policy on the channel. We have built on top of the balance transfer node app and previously we had no policy on the channel. In order to make the node app more reliable and dynamic I have started using service discovery. Everything worked fine, so I decided to see what would happen when I used a policy. Now everything still works fine when I use an OR policy or a OutOf 1 policy, but if I use an AND policy or a OutOf 2+ then I get "signature set did not satisfy policy" Thinking this was due somehow to service discovery, I went back to the previous version of the node app and it still failed. I don't believe this is an issue of missing signatures as service discovery gets signatures from each org and in our previous app we were defaulting to signatures from each org as well. I have seen a stack overflow thread, https://stackoverflow.com/questions/54033274/hyperledger-endorsement-failure-when-invoking-chaincode-failed-signature-set?rq=1, where the same issue was seen with balance transfer. I have turned debugging on at the peer and am printing out everything we are sending to the orderer and everything seems to be there. Has anyone run into something similar?

davidkhala (Tue, 26 Nov 2019 07:00:12 GMT):
Could we consider use `@microsoft/rush` to manage monorepo like our sdk-node?

hidura (Thu, 28 Nov 2019 01:35:08 GMT):
Has left the channel.

guptasndp10 (Thu, 28 Nov 2019 10:21:49 GMT):
Has joined the channel.

AjayKalola (Thu, 28 Nov 2019 11:08:08 GMT):
Hi, How can we regenerate certificate of user in case of unwanted deletion?

AjayKalola (Thu, 28 Nov 2019 11:08:08 GMT):
Hi, How can we regenerate certificate of user in case of unwanted deletion(in key store)?

BranimirMalesevic (Thu, 28 Nov 2019 15:54:06 GMT):
Has joined the channel.

davidkhala (Thu, 28 Nov 2019 15:58:57 GMT):
if the identity has set enough `maxEnrollment ` such as -1 for no limit, then enroll certificate again towards CA

Esegarra (Fri, 29 Nov 2019 13:38:47 GMT):
Hello! I’m facing a couple of errors with my API client writed with `fabric-network` module. When I’m trying to make a query (`contract.evaluateTransaction(...)`) I’m getting the following error: `error: [SingleQueryHandler]: evaluate: message=No peers available to query.` When I’m trying to submit a transaction (`contract.submitTransaction(...)`) I’m getting the following error: `error: [AbstractStrategy]: constructor: No event hubs for strategy` I’m initializing my `gateway` object with a JSON connection profile, and service discovery disabled. Could you help me please? Thank you so much!

bestbeforetoday (Fri, 29 Nov 2019 15:45:17 GMT):
My guess is that either: - your connection profile does not define any peers in the channel belonging to the same organization as the user identity you are using to connect; or - none of your peers are in the eventSource or chaincodeQuery roles. If having no peers in your user's organization is the problem... The default query and commit handlers use peers in the same organization as the user. There are default commit handlers that use all peers in the network that you can select in your Gateway connect options. There isn't (yet) an out-of-the-box query handler that uses peers outside of your organization, but you could write your own if necessary. See https://fabric-sdk-node.github.io/release-1.4/tutorial-query-peers.html and (since the doc link appears to be broken) the sample at https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/test/typescript/integration/network-e2e/sample-query-handler.ts

zzocker (Sun, 01 Dec 2019 05:40:32 GMT):
Has joined the channel.

davidkhala (Sun, 01 Dec 2019 12:27:36 GMT):
I am not sure whether I see a bug. When I use multiple contract js file with each as a subclass of fabric-contract-api#Contract `module.exports.contracts = [require('./stressContract'), require('./baseContract')];`. The instantiate process triggered by fabric-sdk-node. the chaincode instantiate proposal always response: `transaction returned with failure: Error: You've asked to invoke a function that does not exist: init`, but the function do exist in baseContract. And BTW, what is the use case when multiple contract file is required in single chaincode?

davidkhala (Sun, 01 Dec 2019 12:27:36 GMT):
I am not sure whether I see a bug. When I use multiple contract js file with each as a subclass of fabric-contract-api#Contract `module.exports.contracts = [require('./stressContract'), require('./baseContract')];`. The instantiate process triggered by fabric-sdk-node. only the first element `stressContract` take into effect And BTW, what is the use case when multiple contract file is required in single chaincode?

davidkel (Sun, 01 Dec 2019 15:29:41 GMT):
suggest you ask in #fabric-chaincode-dev as this is about node chaincode I assume

davidkhala (Mon, 02 Dec 2019 02:32:47 GMT):
Thanks dave, It is my fault. And now it is resolved

Esegarra (Mon, 02 Dec 2019 14:40:31 GMT):
Thank you so much! I finally found the error. As you told me, It was a error related with the user identity. I made a mistake with organization of the user in enrollment. Thanks for answering

adityanalge (Mon, 02 Dec 2019 21:12:13 GMT):
How do I retrieve the latest channel configuration for the orderer channel? So far I have been exec-ing into the cli and using the command peer channel fetch config sys_config_block.pb -o orderer.example.com:7050 -c $ORDERER_CHANNEL --tls --cafile $ORDERER_CA I would like to fetch this block using the fabric-sdk-node. I have been experimenting with the getChannelConfig function. Any tips?

bestbeforetoday (Tue, 03 Dec 2019 10:09:20 GMT):
You're welcome! Glad you got it sorted. :thumbsup:

laues (Tue, 03 Dec 2019 15:09:08 GMT):
Has joined the channel.

KalyaniPullela (Tue, 03 Dec 2019 19:19:54 GMT):
Has joined the channel.

KalyaniPullela (Tue, 03 Dec 2019 19:23:28 GMT):
fabric-contract-api

KalyaniPullela (Tue, 03 Dec 2019 19:25:29 GMT):
Hello everyone, Which npm package is used for the chaincodes using NodeJS, the fabric-shim or fabric-contract-api?

KalyaniPullela (Tue, 03 Dec 2019 19:25:29 GMT):
Hello everyone, Which npm package is used for the chaincodes using NodeJS, the fabric-shim or fabric-contract-api?

PremaGulp (Tue, 03 Dec 2019 20:52:39 GMT):
Has joined the channel.

AjayKalola (Wed, 04 Dec 2019 04:22:05 GMT):
Hii All, How can we get enrollment Secret in case we want to re enroll same user which is enrolled Earlier with enrollment secret?

sahilgoel (Wed, 04 Dec 2019 04:46:06 GMT):
Hi, when I am trying to use the Node SDK to fetch the list of installed chaincode on peer then it returns this error message: Target peer is not a valid peer object instance I have passed the peer like this: ` const client = gateway.getClient(); const peer = client.getPeer('peer0.example.com'); let result = await client.queryInstalledChaincodes({ peer: peer, useAdmin: true }); `

sahilgoel (Wed, 04 Dec 2019 04:46:06 GMT):
Hi, when I am trying to use the Node SDK to fetch the list of installed chaincode on peer then it returns this error message: Target peer is not a valid peer object instance I have passed the peer like this: `const client = gateway.getClient(); const peer = client.getPeer('peer0.example.com'); let result = await client.queryInstalledChaincodes({ peer: peer, useAdmin: true });`

sahilgoel (Wed, 04 Dec 2019 04:46:06 GMT):
Hi, when I am trying to use the Node SDK to fetch the list of installed chaincode on peer then it returns this error message: Target peer is not a valid peer object instance I have passed the peer like this: `const client = gateway.getClient();` `const peer = client.getPeer('peer0.example.com');` `let result = await client.queryInstalledChaincodes({` `peer: peer,` `useAdmin: true` `});`

sahilgoel (Wed, 04 Dec 2019 04:46:06 GMT):
Hi, when I am trying to use the Node SDK to fetch the list of installed chaincode on peer then it returns this error message: Target peer is not a valid peer object instance I have passed the peer like this: `const client = gateway.getClient();` `const peer = client.getPeer('peer0.example.com');` `let result = await client.queryInstalledChaincodes({` `peer: peer,` `useAdmin: true` `});`

sahilgoel (Wed, 04 Dec 2019 04:46:06 GMT):
Hi, when I am trying to use the Node SDK to fetch the list of installed chaincode on peer then it returns this error message: Target peer is not a valid peer object instance I have passed the peer like this: `const client = gateway.getClient();` `const peer = client.getPeer('peer0.example.com');` `let result = await client.queryInstalledChaincodes({peer: peer});`

sahilgoel (Wed, 04 Dec 2019 04:46:06 GMT):
Hi, when I am trying to use the Node SDK to fetch the list of installed chaincode on peer then it returns this error message: Target peer is not a valid peer object instance I have passed the peer like this: `const client = gateway.getClient();` `const peer = client.getPeer('peer0.example.com');` `let result = await client.queryInstalledChaincodes({peer: peer});` So in the result I got the message: `Target peer is not a valid peer object instance`

Esegarra (Wed, 04 Dec 2019 09:46:29 GMT):
As the documentation explains (https://fabric-sdk-node.github.io/release-1.4/Client.html#queryInstalledChaincodes__anchor) the method expects and `Peer` object. I think it should be like this: `let result = await client.queryInstalledChaincodes(peer:);`. Let me know if you can solve it :grinning:

Esegarra (Wed, 04 Dec 2019 09:46:29 GMT):
As the documentation explains (https://fabric-sdk-node.github.io/release-1.4/Client.html#queryInstalledChaincodes__anchor) the method expects and `Peer` object. I think it should be like this: `let result = await client.queryInstalledChaincodes(peer);`. Let me know if you can solve it :grinning:

Esegarra (Wed, 04 Dec 2019 09:46:29 GMT):
As the documentation explains (https://fabric-sdk-node.github.io/release-1.4/Client.html#queryInstalledChaincodes__anchor) the method expects and `Peer` object. I think it should be like this: `let result = await client.queryInstalledChaincodes(peer);`. Let me know if you could solve it :grinning:

mania06 (Wed, 04 Dec 2019 14:07:37 GMT):
Has joined the channel.

mania06 (Wed, 04 Dec 2019 14:07:39 GMT):
Hello, I've found what I think is inconsistent typings in the node typescript shim interface. (Using fabric-contract-api 1.4.2 and fabric-shim 1.4.2). ``` ctx.stub.getTxTimestamp().toDate() ``` throw an Error: ``` TypeError: ctx.stub.getTxTimestamp(...).toDate is not a function ``` By logging the `ctx.stub.getTxTimestamp()` object, it looks like it is a plain javascript object: ``` {"seconds":{"low":1575467985,"high":0,"unsigned":false},"nanos":842413402} ``` The `getTxTimestamp()` return type is supposed to be a `Timestamp` with `toDate` method on it. Is this a known issue ?

heatherp (Wed, 04 Dec 2019 14:08:45 GMT):
Hey @mania06 - try #fabric-chaincode-dev

mania06 (Wed, 04 Dec 2019 14:09:19 GMT):
Posted there, thanks

SaphiraBjartskular (Wed, 04 Dec 2019 17:46:41 GMT):
Hello- I recently update a local development network to 1.4.4- I can no longer create channels or do anything on the network because ssl verification fails. I am using the ssl-target-override options when forming the client. Does anyone have any suggestions? it works fin when I use certificates generated with 1.4.1 but not 1.4.4. Thanks!!

SaphiraBjartskular (Wed, 04 Dec 2019 17:46:41 GMT):
Hello- I recently update a local development network to 1.4.4- I can no longer create channels or do anything on the network because a sub policy is failing. I did not change anything in configtx between versions and I am now getting this error. Does anyone have any suggestions? it works fine when I use certificates generated with 1.4.1 but not 1.4.4. Thanks!!

SaphiraBjartskular (Wed, 04 Dec 2019 17:56:23 GMT):
more details https://stackoverflow.com/questions/59182124/ssl-handshake-fails-hyperledger-fabric-after-updating-network-to-1-4-4

SaphiraBjartskular (Wed, 04 Dec 2019 17:56:23 GMT):
more details https://stackoverflow.com/questions/51959107/peer-channel-create-evaluation-failed-only-0-policies-were-satisfied-hyperledg

SaphiraBjartskular (Wed, 04 Dec 2019 18:00:59 GMT):
does ssl-target-name-override option no longer work in 1.4.4?

SaphiraBjartskular (Wed, 04 Dec 2019 18:50:51 GMT):
In crypto-config the names and IDs for organizations are the same- is that causing this? thanks

SaphiraBjartskular (Wed, 04 Dec 2019 18:50:51 GMT):
In configtx.yaml the names and IDs for organizations are the same- is that causing this? thanks

sahilgoel (Thu, 05 Dec 2019 07:19:10 GMT):
Opps I missed this, I though it is expecting to be in the object. My bad :-(

vinayakkumar (Thu, 05 Dec 2019 09:15:22 GMT):
Has joined the channel.

karthiknvlr (Fri, 06 Dec 2019 05:54:28 GMT):
Has joined the channel.

Alex (Fri, 06 Dec 2019 21:15:38 GMT):
Hello, what version of grpc is Fabric 1.4 compatible with? Is there a limitation?

vanitas92 (Mon, 09 Dec 2019 15:08:48 GMT):
Has joined the channel.

mastersingh24 (Tue, 10 Dec 2019 18:42:24 GMT):
what are you trying to do?

rjones (Tue, 10 Dec 2019 19:24:15 GMT):
Has joined the channel.

laxmanmali (Wed, 11 Dec 2019 12:58:02 GMT):
#fabric-sdk-node any way to get all historic data in node fabric sdk as we are doing historical in hyperledger composer

metadata (Wed, 11 Dec 2019 14:37:48 GMT):
Has joined the channel.

tengc (Wed, 11 Dec 2019 20:35:31 GMT):
Has joined the channel.

XiaoforGeorgia (Thu, 12 Dec 2019 10:26:32 GMT):
Has joined the channel.

Hengming (Fri, 13 Dec 2019 04:08:46 GMT):
Great post for this year’s Mentorship Program. Thanks Hyperledger community! https://www.hyperledger.org/blog/2019/12/12/2019-summer-mentee-project-update-hyperledger-fabric-sdk-for-node-js-security-extension

karthiknvlr (Fri, 13 Dec 2019 07:14:48 GMT):
Hi All, Does any one installed "fabric-shim" npm module with Node 12.13.1 LTS? I am getting the compatible error.

rjones (Fri, 13 Dec 2019 16:47:06 GMT):
Has left the channel.

Samsid (Mon, 16 Dec 2019 06:38:46 GMT):
Has joined the channel.

Samsid (Mon, 16 Dec 2019 06:40:48 GMT):
I am using node SDK to invoke chaincode and i am getting this error 2019-12-16T06:39:52.561Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7050 2019-12-16T06:39:52.565Z - error: [Orderer.js]: Orderer grpcs://localhost:7050 has an error Error: Failed to connect before the deadline URL:grpcs://localhost:7050 Failed to invoke successfully :: Error: Failed to connect before the deadline URL:grpcs://localhost:7050 Here is my orderer logs :

Samsid (Mon, 16 Dec 2019 06:40:48 GMT):
I am using node SDK to invoke chaincode and i am getting this error 2019-12-16T06:39:52.561Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7050 2019-12-16T06:39:52.565Z - error: [Orderer.js]: Orderer grpcs://localhost:7050 has an error Error: Failed to connect before the deadline URL:grpcs://localhost:7050 Failed to invoke successfully :: Error: Failed to connect before the deadline URL:grpcs://localhost:7050 Here is my orderer logs : [channel: common] Rejecting broadcast of config message from 172.18.0.29:44298 because of error: error applying config update to existing channel 'common': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1

Samsid (Mon, 16 Dec 2019 06:40:48 GMT):
I am using node SDK to invoke chaincode and i am getting this error 2019-12-16T06:39:52.561Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7050 2019-12-16T06:39:52.565Z - error: [Orderer.js]: Orderer grpcs://localhost:7050 has an error Error: Failed to connect before the deadline URL:grpcs://localhost:7050 Failed to invoke successfully :: Error: Failed to connect before the deadline URL:grpcs://localhost:7050 Here is my orderer logs : [channel: common] Rejecting broadcast of config message from 172.18.0.29:44298 because of error: error applying config update to existing channel 'common': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1 Please help

heatherp (Mon, 16 Dec 2019 13:57:29 GMT):
hey @Samsid - is your chaincode already invoked? I've seen that before when I've attempted to a join a peer to a channel that was already joined

Randyshu2018 (Wed, 18 Dec 2019 07:37:24 GMT):
use fabric-network submit transaction successfully and return a txid ,but why the node process does not exit?

davidkel (Wed, 18 Dec 2019 08:46:04 GMT):
You need to disconnect the gateway or call process.exit()

Randyshu2018 (Wed, 18 Dec 2019 09:09:35 GMT):
thanks a lot .

sahilgoel (Wed, 18 Dec 2019 10:43:34 GMT):
When installing/instantiating the chaincode from the SDK, the indexes are not created in the CoucDB. But when I do the same form CLI then the indexes are created.

Esegarra (Wed, 18 Dec 2019 14:34:50 GMT):
Hello! I have a question related with the upgrade of Hyperledger Fabric to version 2.0. I’m currently working with `fabric-network@1.4.4` module. If I upgrade my network, Will my API client be still compatible? Thanks a lot.

ashish.cppdev (Wed, 18 Dec 2019 20:30:34 GMT):
Has joined the channel.

ashish.cppdev (Wed, 18 Dec 2019 20:30:35 GMT):
Hi - is it possible to add a new org to an existing channel by just using the Fabric Node SDK?

Randyshu2018 (Thu, 19 Dec 2019 02:20:00 GMT):
maybe u need this article : https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html#add-the-index-to-your-chaincode-folder

AbhijeetSamanta (Thu, 19 Dec 2019 05:07:45 GMT):
Has joined the channel.

knagware9 (Thu, 19 Dec 2019 07:57:52 GMT):
I think migration not supported 1.4.4 to 2.0 -beta ..but when 2.0 LTS will be avialble you can migrate and app things will be supported

Randyshu2018 (Thu, 19 Dec 2019 08:03:00 GMT):

Anyone know that problem?

Randyshu2018 (Thu, 19 Dec 2019 10:13:30 GMT):

any ideas to implements ec enctypt and decrypt

guptasndp10 (Fri, 20 Dec 2019 10:25:45 GMT):
I am facing some issue while doing npm install to use node sdk to interact with fabric network with node js version 12.15. However it is running fine with node js version 10.17

heatherp (Fri, 20 Dec 2019 10:27:22 GMT):
hey @guptasndp10 what version of fabric-network are you using?

guptasndp10 (Fri, 20 Dec 2019 10:29:37 GMT):
I am using fabric-client and fabric-ca-client.For this i have added below lines in my package.json

guptasndp10 (Fri, 20 Dec 2019 10:29:40 GMT):
"fabric-ca-client": "~1.4.3", "fabric-client": "~1.4.3",

heatherp (Fri, 20 Dec 2019 10:31:45 GMT):
Have you tried version 1.4.4? What issue are you seeing with node 12? We don't test against node 12 on the 1.4 stream, but we've just updated the 2.0 stream to use node 12.

guptasndp10 (Fri, 20 Dec 2019 12:17:57 GMT):
its node-gyp build error

guptasndp10 (Fri, 20 Dec 2019 12:17:57 GMT):
Its node-gyp build error

rjones (Fri, 20 Dec 2019 14:31:04 GMT):
heatherp

bestbeforetoday (Fri, 20 Dec 2019 14:36:03 GMT):
You should be able to see from the node-gyp output which module(s) it failed to build. The 1.4 release was only targeted at and tested with Node 8 and 10 so, if moving down to Node 10 is an option, that might be your easiest route

bestbeforetoday (Fri, 20 Dec 2019 14:38:22 GMT):
If developing on Fabric 2.0 (only recently released in beta) is an option then, as mentioned above, that version of the SDK is built and tested with Node 12

guptasndp10 (Fri, 20 Dec 2019 14:41:19 GMT):
pkcs

bestbeforetoday (Fri, 20 Dec 2019 14:46:32 GMT):
Out of interest, I just tied an `npm install` using Node 12.14.0 on a sample client I have here that depends on fabric-network 1.4.4, and it built OK(including the node-gyp compile of pkcs11js@1.0.19). I'm on a Mac though, so possibly it's a platform-specific issue?

guptasndp10 (Fri, 20 Dec 2019 14:49:25 GMT):
may be but did you try 12.15 version as well. Actually our patching team has updated the node js version from 10.17 to 12.15 last week and since then its not working

bestbeforetoday (Fri, 20 Dec 2019 14:49:59 GMT):
Node 12.15 is not released yet

guptasndp10 (Fri, 20 Dec 2019 14:50:47 GMT):
sorry for typo its 12.5

bestbeforetoday (Fri, 20 Dec 2019 14:53:07 GMT):
12.5 was prior to Node 12 being released as LTS, so I have no expectation that it will work smothly. 12.13.0 was the first LTS release in the 12.x stream

guptasndp10 (Fri, 20 Dec 2019 16:07:51 GMT):
I am getting the below issue with node js 12.14.0 LTS in windows 10 gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Windows_NT 10.0.17134 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\AT_MIB\src\FA.MIB\2. Services\Web Services\FA.MIB.API.Policy\node_modules\pkcs11js gyp ERR! node -v v12.14.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pkcs11js@1.0.17 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pkcs11js@1.0.17 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\sagupta-a\AppData\Roaming\npm-cache\_logs\2019-12-20T16_06_53_268Z-debug.log

guptasndp10 (Fri, 20 Dec 2019 17:30:41 GMT):
@bestbeforetoday @heatherp I have successfully build node_modules in my local system with node js version 12.14. However now I need to copy node_modules to server but server has node js version 12.13. So should it work on the server even though node engine differs in my local system and server??

tinywell (Thu, 26 Dec 2019 07:33:51 GMT):
Has joined the channel.

ashish.cppdev (Thu, 26 Dec 2019 18:04:00 GMT):
Good morning - if anyone here can help address https://stackoverflow.com/questions/59472023/adding-a-new-org-to-an-existing-hyperledger-fabric-network-using-the-fabric-node

ashish.cppdev (Thu, 26 Dec 2019 18:04:09 GMT):
I would appreciate any help

biligunb (Fri, 27 Dec 2019 09:53:50 GMT):
Yes it is possible. See the document on fabric sdk node

razasikander (Fri, 27 Dec 2019 11:37:10 GMT):
Hello Guys i am fetching channel details with node sdk by var channel = client.getChannel(channel_name); but iam not getting the peer details Channel { _name: 'pmbctchannel', _channel_peers: Map {}, _anchor_peers: [], _orderers: Map {

razasikander (Fri, 27 Dec 2019 11:37:10 GMT):
Hello Guys i am fetching channel details with node sdk by var channel = client.getChannel(channel_name); but iam not getting the peer details Channel { _name: 'pmbctchannel', _channel_peers: Map {}, _anchor_peers: [], _orderers: Map { 'orderer.example.com'=>....

razasikander (Fri, 27 Dec 2019 11:37:10 GMT):
Hello Guys i am fetching channel details with node sdk by var channel = client.getChannel(channel_name); but iam not getting the peer details Channel { _name: 'pmbctchannel', _channel_peers: Map {}, _anchor_peers: [], _orderers: Map { 'orderer.example.com'=>.... }

razasikander (Fri, 27 Dec 2019 11:37:10 GMT):
Hello Guys i am fetching channel details with node sdk by var channel = client.getChannel(channel_name); but iam not getting the peer details Channel { _name: 'pmbctchannel', _channel_peers: Map {}, _anchor_peers: [], _orderers: Map { 'orderer.example.com'=>.... } Any idea where the problem can be?

RamanM (Fri, 27 Dec 2019 11:45:47 GMT):
Has joined the channel.

ashish.cppdev (Fri, 27 Dec 2019 20:41:37 GMT):
Could you please point to an example?

ashish.cppdev (Fri, 27 Dec 2019 20:42:07 GMT):
I have checked the examples with command line options but I want to do it purely using SDK APIs (if that is possible)

Randyshu2018 (Mon, 30 Dec 2019 11:07:54 GMT):
any ideas for modifying fabric-client/grpc's version ? because of grpc@1.21 is not support for electron@6.X

ashish.cppdev (Tue, 31 Dec 2019 20:19:08 GMT):
Hi All - is the any method in Node SDK that allows you to list all the orgs in the network, or alternatively, all orderers and peers? I looked at Client.getPeersForOrg(...) but that requires an MSP ID as parm. That means I need to know all the orgs. Suppose I do not know the orgs either, is there a way to figure this out?

Rajatsharma (Wed, 01 Jan 2020 20:25:37 GMT):
Hi, I was trying to understand how does discovery service works in fabric. Can anyone share any nice link regarding the same. I had some conceptual doubts with discovery service: 1. What if the peer we had mentioned for the discovery service goes down. 2. If we have 2 organizations then does discovery service only give data for one(requesting) organizations' peers.

ashish.cppdev (Thu, 02 Jan 2020 15:45:28 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-1.4/discovery-overview.html#how-service-discovery-works-in-fabric

Rajatsharma (Thu, 02 Jan 2020 19:14:24 GMT):
I wanted to use discovery service on a multi-host network(which we're using for production). But I wanted to run the node service in such a way, that even if I don't run the service in the same docker swarm, all the request go through. So I had looked the way people normally use fabric discovery : ``` await channel.initialize({discover:true, asLocalhost:true}) ``` I can't use it this as `asLocalhost`, replaces the hostname with localhost. Moreover, even if the port for peer is not mapped at 7051 the code does not work. So ideally I was looking for a way to map the returning hostname and port, with one in configuration. I looked inside the code https://github.com/hyperledger/fabric-sdk-node/blob/v1.4.4/fabric-client/lib/Channel.js#L253, I found out that if we're using service discovery there's no flag or a way to change the url mapping. So using fabric's service discovery with multi-host network is not possible ?

AbhijeetSamanta (Sun, 05 Jan 2020 08:50:12 GMT):
HI all, I have setup the HLF with k8s cluster. now I am stuck on connection profile file which is using to connect out API's to HL network. anybody have done that?

roclee (Mon, 06 Jan 2020 03:02:32 GMT):
Has joined the channel.

ZainabM (Mon, 06 Jan 2020 05:39:59 GMT):
if you have multi-host network, then put 'asLocalhost: flase'. And set exposed ip:port of each peers and orderers configuartion in connection-file.yaml.

Rajatsharma (Mon, 06 Jan 2020 06:17:29 GMT):
Here's my connection.json https://hastebin.com/besaleyuqe.json, could you help me with where to put that configuration

ZainabM (Mon, 06 Jan 2020 06:31:44 GMT):
Where is the fabric network running? At your localhost or at a vm instance?

Rajatsharma (Mon, 06 Jan 2020 06:47:55 GMT):
So it's running on another server

ZainabM (Mon, 06 Jan 2020 06:49:19 GMT):
Then replace localhost with the sever ipaddress in the connection-file.yaml

Rajatsharma (Mon, 06 Jan 2020 06:52:42 GMT):
That is not working. If I remove localhost, it is sending request to `peer0.org1.rajat.com`. That's what I've mentioned, I've checked in the code, it only uses the url that is returned from service discovery and discards the one ew had mentioned.

ZainabM (Mon, 06 Jan 2020 06:55:50 GMT):
remove localhost means? Are you providing server ipaddress in place of localhost? For ex. in place of localhost:7080 , write :7080

Rajatsharma (Mon, 06 Jan 2020 07:43:13 GMT):
See I'm running all the containers in the same server now. Here's my output of `docker ps -a -f "network=net_rajat" https://hastebin.com/jepilecage.nginx. And I've already shared my connection profile, kindly refer to that. We have more than one fabric network running on the server, so I had to change my port mapping. Now when I have `await gateway.connect(ccp, { wallet, identity: 'user3', discovery: { enabled: true , asLocalhost:false } });` in my code. And when I do `node invoke.js`. Then I'm getting the following error: ``` Wallet path: /home/rajats/elementUserChaincodeDeploy/cidTest/working_copy/wallet 2020-01-06T07:42:30.340Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpc://peer0.org1.rajat.com:7051 2020-01-06T07:42:30.341Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpc://peer0.org1.rajat.com:7051 Failed to submit transaction: Error: Endorsement has failed ```

Rajatsharma (Mon, 06 Jan 2020 07:45:56 GMT):
I debugged the node module and foud out. The connection profile, I'm giving is only used to hit to the service discovery and then the returned output is used for further processing. As then the container name is `peer0.org1.rajat.com`, it's trying to invoke that which is not going through. I need a way to replace the URL it's invoking afterwards. And I don't want to change the node module for the same.

davidkel (Mon, 06 Jan 2020 08:32:20 GMT):
why not use /etc/hosts on the machine where you client application is running ?

davidkel (Mon, 06 Jan 2020 08:32:20 GMT):
why not use /etc/hosts on the machine where your client application is running ?

davidkel (Mon, 06 Jan 2020 08:32:20 GMT):
can you not use /etc/hosts on the machine where your client application is running ? you would have to ensure the ports directly mapped of course

Rajatsharma (Mon, 06 Jan 2020 08:46:35 GMT):
I'm not aware about this. I can run that if that could help. There's no issue.

ZainabM (Mon, 06 Jan 2020 11:06:54 GMT):
if your network is at localhost then set asLocalhost: true (gateway.connect(ccp, { wallet, identity: 'user3', discovery: { enabled: true , asLocalhost:false } })), And make sure that you have updated anchor peers and also set CORE_PEER_GOSSIP_EXTERNALENDPOINT

ZainabM (Mon, 06 Jan 2020 11:06:54 GMT):
if your network is at localhost then set asLocalhost: true (gateway.connect(ccp, { wallet, identity: 'user3', discovery: { enabled: true , asLocalhost:true } })), And make sure that you have updated anchor peers and also set CORE_PEER_GOSSIP_EXTERNALENDPOINT

pritam_01 (Tue, 07 Jan 2020 11:17:22 GMT):
Has joined the channel.

heatherp (Tue, 07 Jan 2020 18:34:59 GMT):
Have you tried it? That's only a very minor node version change, so I wouldn't expect you to find issues

guptasndp10 (Wed, 08 Jan 2020 10:59:11 GMT):
Yes it is working fine!

benjamin.verhaegen (Wed, 08 Jan 2020 11:42:25 GMT):
Has joined the channel.

benjamin.verhaegen (Wed, 08 Jan 2020 11:42:27 GMT):
Hi, i've been working with node sdk but experience some trouble with invoking on my chaincode. I need to pass a JSON object as an argument in my client, when the chaincode receives it it changes it so it can be put to state. I've tested all my functions on the chaincode and they work as expected, but when i use my client they don't work anymore. Someone who can help me please?

Flyyellow (Wed, 08 Jan 2020 14:38:07 GMT):
Has joined the channel.

Flyyellow (Wed, 08 Jan 2020 14:51:27 GMT):
there may have some matters of you request object

Flyyellow (Wed, 08 Jan 2020 14:55:08 GMT):
There may be some problems with your request object

benjamin.verhaegen (Wed, 08 Jan 2020 14:56:18 GMT):
i've fixed the problem already. thanks

Flyyellow (Wed, 08 Jan 2020 14:59:07 GMT):
ok

Flyyellow (Wed, 08 Jan 2020 15:08:34 GMT):
Hi all, how to get the size of a block?

bestbeforetoday (Wed, 08 Jan 2020 15:26:31 GMT):
Not sure I entirely understand what issue you are seeing but did you also do `await channel.initialize()`?

bestbeforetoday (Wed, 08 Jan 2020 15:30:53 GMT):
Use the Client to get the channel you are interested in with discovery enabled. Call initalize on the channel, and you should then be able to ask the channel about peers and organizations etc.

erwinvanthiel (Wed, 08 Jan 2020 15:45:16 GMT):
Has joined the channel.

erwinvanthiel (Wed, 08 Jan 2020 15:45:16 GMT):
Hi all, I am trying to run a fabric network on two host machines using docker swarm, 1 machine hosts the orderer and one organisation containing two peers and a ca. The other machine hosts another organisation consisting of two peers and a ca. When doing a chaincode invoke or a query via cli bash(on any of the 2 host machines) we dont run into any problems and the results become visible in the database(couchdb). When we are using a Node SDK script which was based on the one in fabcar (enrollAdmin, registerUser and an invoke) however, we get the error which is displayed below. The node application works fine when hosting all containers on one machine. We have tried turning both asLocalHost and discoveryEnabled on and off. The SDK appears to be unable to connect to any peer, does anybody happen to have an idea why this is not working?

erwinvanthiel (Wed, 08 Jan 2020 15:46:24 GMT):

error.png

Flyyellow (Thu, 09 Jan 2020 04:38:10 GMT):

IMG_0068.PNG

Flyyellow (Thu, 09 Jan 2020 04:41:13 GMT):
Will the second node be connected by default when the first node crashes?

bestbeforetoday (Thu, 09 Jan 2020 12:00:51 GMT):
If the first orderer goes down then the client should switch to using the second transparently when submitting transactions

Flyyellow (Fri, 10 Jan 2020 08:25:10 GMT):
I’ve got it, thanks

Rajatsharma (Fri, 10 Jan 2020 17:16:55 GMT):
Can I use the fabric-SDK and the crypto-config directory to send transactions. I don't want to send a request to ca and get user registered. I was intending to use the certificates generated by crypto-config. To start the network.

Flyyellow (Sat, 11 Jan 2020 02:27:09 GMT):
Yes, you can. But you must set TLS enable to false, and use Kafka

Flyyellow (Sat, 11 Jan 2020 02:27:41 GMT):
or solo consensus mechanism.

Flyyellow (Sat, 11 Jan 2020 02:28:42 GMT):
Raft consensus mechanism depend on TLS

rajashekarkodi (Mon, 13 Jan 2020 05:49:31 GMT):
Has joined the channel.

rajashekarkodi (Mon, 13 Jan 2020 05:49:32 GMT):
Hi All, I have HLF setup with cryptogen certificates and registered and enrolled admin and user (user1) with node SDK after doing revoke using fabric-ca-client revoke command with --genCRL for user1, it changed the certificate state in CA DB and generated CRL's but still from Node SDK I'm able to do invoke and query operation with the same user1 certificates

rajashekarkodi (Mon, 13 Jan 2020 05:51:04 GMT):
I have tried revoke function in node sdk and checked the status in CA DB, its updating certificate state as revoked but the reason is not getting updated and still I'm able to do invoke and query with the user certiticates.

erwinvanthiel (Mon, 13 Jan 2020 15:07:24 GMT):
Hi all, I run a network with raft and 5 orderers using a fabric-client api based application that works fine. When I kill my first orderer however, the invoke no longer works and I get the error: The channel has been closed URL:grpcs://localhost:7050. How could we make the application connect to another orderer that is alive?

erwinvanthiel (Mon, 13 Jan 2020 16:01:37 GMT):
What could be a cause if the client does not automatically switch to another orderer?

phantom.assasin (Mon, 13 Jan 2020 16:23:44 GMT):
Hi, is there an API to get ledger data?

mbwhite (Mon, 13 Jan 2020 16:27:45 GMT):
Today we have the 'stub' api within the chaincode libraries that can 'getState/putState' etc.. there is a proposal to improve this.. Take a look at https://github.com/hyperledger/fabric-rfcs/pull/16

mbwhite (Mon, 13 Jan 2020 16:28:32 GMT):
The APIs are within the chaincode, Java, Node or Golang - so ask in the chaincode channels for more info.

phantom.assasin (Mon, 13 Jan 2020 17:40:16 GMT):
sure thanks

phantom.assasin (Mon, 13 Jan 2020 17:40:56 GMT):
also is there any api to get channel specific logs?

phantom.assasin (Mon, 13 Jan 2020 17:41:46 GMT):
like all the transactions executed in a chanel? Since, chhaincode is instantiated on a channel?

rajashekarkodi (Mon, 13 Jan 2020 18:15:06 GMT):
in invoke file, you can check if transaction exception is "Failed to order the transaction", then you redirect the transaction to second orderer.

biligunb (Tue, 14 Jan 2020 07:14:37 GMT):
vHey guys is there any RDMS option for Hyperledger Fabric Node SDK? As far as i know there are file system, in memory and couchdb.

biligunb (Tue, 14 Jan 2020 07:14:37 GMT):
Hey guys is there any RDMS option for Hyperledger Fabric Node SDK? As far as i know there are file system, in memory and couchdb.

erwinvanthiel (Tue, 14 Jan 2020 09:20:58 GMT):
directing the invoke towards another orderer gives me the same error. Basically only the first specified orderer is functioning. All the containers are up however and their logs show that raft protocol is working.

erwinvanthiel (Tue, 14 Jan 2020 09:49:21 GMT):
could it have something to do with port configuration in the common connection profile?

YashShukla (Wed, 15 Jan 2020 02:26:02 GMT):
Has joined the channel.

knagware9 (Wed, 15 Jan 2020 12:30:34 GMT):
Yes,,,there is some issue with port. Dont remember but someone asked same in the rocket chat ...

Randyshu2018 (Thu, 16 Jan 2020 05:15:10 GMT):
Hi,experts: any ideas for fabric-sdk-node used in mobile devices?

jordy207 (Thu, 16 Jan 2020 15:09:02 GMT):
Has joined the channel.

jordy207 (Thu, 16 Jan 2020 15:09:03 GMT):
Hi. We are using the fabric client api and want to have automated tests for our node js application. However, we can not seem to mock the api calls used in our backend code. How do we unit test our code correctly?

krabradosty (Thu, 16 Jan 2020 16:51:00 GMT):
Hello. I'm using node-sdk to package golang chaincode. The problem is that indexes for coachdb is not created in that case (it works with CLI). It means that actually the problem is in metadata configuration. I unpacked the chaincode package and it has the following structure: ``` src/github.com/orgname/chaincodename/... META-INF/... ``` `META-INF/` contains all the index I want to use. Is it correct? Maybe `META-INF/` should be under `src/github.com/orgname/chaincodename/`?

krabradosty (Thu, 16 Jan 2020 16:51:00 GMT):
Hello. I'm using node-sdk to package golang chaincode. The problem is that indexes for coachdb is not created in that case (it works with CLI). It means that actually the problem is in metadata configuration. I unpacked the chaincode package and it has the following structure: ``` src/github.com/orgname/chaincodename/... META-INF/... ``` `META-INF/` contains all the indexes I want to use. Is it correct? Maybe `META-INF/` should be under `src/github.com/orgname/chaincodename/`?

krabradosty (Thu, 16 Jan 2020 16:51:00 GMT):
Hello. I'm using node-sdk to package golang chaincode. The problem is that indexes for coachdb is not created in that case after I instantiate chaincode on channel (it works with CLI). It means that actually the problem is in metadata configuration. I unpacked the chaincode package and it has the following structure: ``` src/github.com/orgname/chaincodename/... META-INF/... ``` `META-INF/` contains all the indexes I want to use. Is it correct? Maybe `META-INF/` should be under `src/github.com/orgname/chaincodename/`?

krabradosty (Thu, 16 Jan 2020 16:51:00 GMT):
Hello. I'm using node-sdk to package golang chaincode. The problem is that indexes for coachdb are not created in that case after I instantiate chaincode on a channel (but it works with CLI for the same chaincode). It means that actually the problem is in metadata configuration. I unpacked the chaincode package and it has the following structure: ``` src/github.com/orgname/chaincodename/... META-INF/... ``` `META-INF/` contains all the indexes I want to use. Is it correct? Maybe `META-INF/` should be under `src/github.com/orgname/chaincodename/` like CLI installation requires?

krabradosty (Thu, 16 Jan 2020 16:51:00 GMT):
Hello. I'm using node-sdk to package golang chaincode. The problem is that indexes for coachdb are not created in that case after I instantiate chaincode on a channel (but it works with CLI for the same chaincode). It means that actually the problem is in metadata configuration. I unpacked the chaincode package and it has the following structure: ``` /src/github.com/orgname/chaincodename/... /META-INF/... ``` `META-INF/` contains all the indexes I want to use. Is it correct? Maybe `META-INF/` should be under `src/github.com/orgname/chaincodename/` like CLI installation requires?

krabradosty (Thu, 16 Jan 2020 16:51:00 GMT):
Hello. I'm using node-sdk to package golang chaincode. The problem is that indexes for coachdb are not created in that case after I instantiate chaincode on a channel (but it works with CLI for the same chaincode). It means that actually the problem is in metadata configuration. I unpacked the chaincode package and it has the following structure: ``` /src/github.com/orgname/chaincodename/... /META-INF/... ``` `/META-INF` contains all the indexes I want to use. Is it correct? Maybe `/META-INF` should be under `/src/github.com/orgname/chaincodename` like CLI installation requires?

krabradosty (Thu, 16 Jan 2020 16:51:00 GMT):
Hello. I'm using node-sdk to package golang chaincode (Package.fromDirectory() method). The problem is that indexes for coachdb are not created in that case after I instantiate chaincode on a channel. But it works with CLI for the same chaincode. It means that actually the problem is in metadata configuration. I unpacked the chaincode package and it has the following structure: ``` /src/github.com/orgname/chaincodename/... /META-INF/... ``` `/META-INF` contains all the indexes I want to use. Is it correct? Maybe `/META-INF` should be under `/src/github.com/orgname/chaincodename` like CLI installation requires?

Nihcep (Fri, 17 Jan 2020 08:07:03 GMT):
Hi everyone

Nihcep (Fri, 17 Jan 2020 08:07:21 GMT):
I'm developing a NodeJS backend using

Nihcep (Fri, 17 Jan 2020 08:09:45 GMT):
I'm calling transaciton using either `contract.createTransaction.submit` or directly `contract.submitTransaction` but regulary I get this error `error: [AbstractStrategy]: constructor: No event hubs for strategy`

Nihcep (Fri, 17 Jan 2020 08:13:43 GMT):
And If i recall the code, it is working

Nihcep (Fri, 17 Jan 2020 08:15:35 GMT):
I find only one similar error : https://stackoverflow.com/questions/56954847/hyperledger-fabric-endorsement-failing-txid-exists but there is no answer

Nihcep (Fri, 17 Jan 2020 08:16:03 GMT):
Does someone have an idea on how I can avoid that ?

bestbeforetoday (Fri, 17 Jan 2020 09:26:53 GMT):
That error means that the client-side code could not identity any peers in the event source role from which to receive transaction commit events. It depends on the event handling strategy being used whether it is looking for peers within your organisation or any peers in the network. It seems odd that this would only fail occassionally as this suggests that the client side view of the peers that exist in the network is changing. One thing that does update the client view of the network nodes is service discovery.

bestbeforetoday (Fri, 17 Jan 2020 09:26:53 GMT):
That error means that the client-side code could not identity any peers in the event source role from which to receive transaction commit events. It depends on the event handling strategy being used whether it is looking for peers within your organisation or any peers in the network. It seems odd that this would only fail occasionally as this suggests that the client side view of the peers that exist in the network is changing. One thing that does update the client view of the network nodes is service discovery. I wonder if there could be a window during service discovery update where the old view of the nodes has been removed but the newly discovered view of nodes has not yet been stored?

bestbeforetoday (Fri, 17 Jan 2020 10:06:34 GMT):
Having a quick look through the discovery code, I don't obviously see anywhere that might be causing the issue so I'm really not sure what the cause might be. I certainly don't recall seeing this failure in any of the scenario tests that run on every code change

Nihcep (Fri, 17 Jan 2020 10:34:19 GMT):
Yes the weird point is that is arrive at random interval

Nihcep (Fri, 17 Jan 2020 10:34:27 GMT):
Thanks for your answers

Nihcep (Fri, 17 Jan 2020 10:35:14 GMT):
Like I can launch the code 10 times without problem and then have 3 times in a row the error

bestbeforetoday (Fri, 17 Jan 2020 12:00:26 GMT):
Just checking... are you connecting a Gateway, getting a Network and Contract, and then reusing this contract to submit multiple transactions; only closing the Gateway when your application is done? Or connecting up a new Gateway for every transaction request? You absolutely want to be reusing these objects and not tearing everything down between transactions if practical. I'm just wondering if you are re-connecting the Gateway each time then perhaps occasionally the service discovery does not get all the peer information. Perhaps enabling logging might give some clues on what is going wrong? Details on how to do that at https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-logging.html

mauricio (Fri, 17 Jan 2020 13:24:37 GMT):
I think that in mobile devices you always need to do a call to your api (fabric-sdk-node) there is no way to use fabric-sdk-node in React native for example, there are some libraries that parse node to pure js but this doesn't work pretty well, in conclusion I think that you always need to send a call to your api created in fabric-sdk-node

Nihcep (Fri, 17 Jan 2020 17:46:02 GMT):
Ok but how can I deal with multiple identity ? I can change the identity without destroying the gateway ?

Nihcep (Fri, 17 Jan 2020 17:46:11 GMT):
Thanks for the link, I will have a look

bestbeforetoday (Fri, 17 Jan 2020 18:11:38 GMT):
The gateway was designed to represent a single identity connecting to the network so you need a gateway instance for each identity. If you have multiple client identities using the same client application but each of those identities is going to be submitting multiple transactions over a short period of time, you might want to hang on to gateway instances for each of those identities

baohua (Fri, 17 Jan 2020 18:43:23 GMT):
Hi, anyone know which node sdk version is best with fabric v1.4.4 now? I saw there are v1.4.5 (Jan 2020) and v1.4.4 (Aug 2019) for node sdk. Thanks!

davidkel (Fri, 17 Jan 2020 19:01:47 GMT):
I would use 1.4.5. The sdks don't have to follow the micro version number of the main fabric release

baohua (Fri, 17 Jan 2020 19:09:13 GMT):
Thanks David, and what version of Node.Js is recommended? In the doc, version 10 is supported from 10.15.3 and higher.

Nihcep (Fri, 17 Jan 2020 19:11:32 GMT):
Ok thanks for your time

davidkel (Fri, 17 Jan 2020 19:18:58 GMT):
I would go for the latest node 10 version.

baohua (Fri, 17 Jan 2020 19:19:37 GMT):
OK. Besides, is it recommended to use Node.js 12 with the node sdk v1.4.5, Thanks!

davidkel (Fri, 17 Jan 2020 19:20:26 GMT):
I don't think it's tested with node 12

baohua (Fri, 17 Jan 2020 19:21:29 GMT):
Got, thanks! Do you have any idea when node sdk will make new version to support fabric v2.0 (released in this month)?

davidkel (Fri, 17 Jan 2020 19:22:58 GMT):
Looks like the master branch (from which I assume 2.0 will be based off of) is testing with node 12 https://github.com/hyperledger/fabric-sdk-node/blob/master/azure-pipelines.yml#L21

baohua (Fri, 17 Jan 2020 19:23:37 GMT):
Yes, but the sdk-node v1.4.5 still cannot work with Node 12, right?

baohua (Fri, 17 Jan 2020 19:24:12 GMT):
Node 10 will be maintained till April 2021.

davidkel (Fri, 17 Jan 2020 19:24:13 GMT):
All I can say is that there is no automated testing of that release with 1.4 branch. So it may or may not work

baohua (Fri, 17 Jan 2020 19:24:50 GMT):
OK, appreciate your comments very much!

davidkel (Fri, 17 Jan 2020 19:27:37 GMT):
:thumbsup:

krabradosty (Sat, 18 Jan 2020 09:17:48 GMT):
Nobody faced such issue?

Aniket.1 (Tue, 21 Jan 2020 08:02:12 GMT):
getting this while registering with CA: `/api/v1/register 401 25 "Invalid token in authorization header: Token signature validation failed"`

Aniket.1 (Tue, 21 Jan 2020 08:02:22 GMT):
Can someone suggest a solution?

Aniket.1 (Tue, 21 Jan 2020 08:02:52 GMT):
I have enrolled admin using fabric-ca-client and using returned certificate as registrar

Aniket.1 (Tue, 21 Jan 2020 08:03:03 GMT):
Ca server version is 2.0.0

medikent (Wed, 22 Jan 2020 01:21:11 GMT):
Did you use the enrollment secret you received from enroll as a part of the HTTP Basic Authentication header for the register call?

Aniket.1 (Wed, 22 Jan 2020 05:23:36 GMT):
No, I don't think that is required, is it?

Aniket.1 (Wed, 22 Jan 2020 05:32:31 GMT):
Also, i don't see any mention of this in any documentation

dineshthemacho1 (Wed, 22 Jan 2020 06:04:54 GMT):
Has joined the channel.

Aniket.1 (Wed, 22 Jan 2020 06:39:10 GMT):
It was fixed. I was passing the root cert for registrar in stead of admin enrollment cert

medikent (Wed, 22 Jan 2020 18:16:10 GMT):
cool, nice job

roclee (Thu, 23 Jan 2020 04:26:07 GMT):
event

Aniket.1 (Fri, 24 Jan 2020 05:40:21 GMT):
Hi all, Do you thing if it is possible to see the enrollment id of a X509 certificate by any cert parser or anyhow?

Aniket.1 (Fri, 24 Jan 2020 05:40:21 GMT):
Hi all, Do you think if it is possible to see the enrollment id of a X509 certificate by any cert parser or anyhow?

Rajatsharma (Mon, 27 Jan 2020 12:02:36 GMT):
Hi, I wanted to know What if I've lost the secret at registration. Is there anyway to retrieve that. Using the fabric-node-sdk ?

gentios (Mon, 27 Jan 2020 21:00:23 GMT):
Hi everyone can we directly call the peer nodes with grpcurl do you have any example, I need to debug the node

AbhijeetSamanta (Tue, 28 Jan 2020 06:58:57 GMT):
HI all,

AbhijeetSamanta (Tue, 28 Jan 2020 07:00:31 GMT):
Hi All, I have one query regarding the unit testing of node-sdk which is used to invoke the chaincode. is there some example how we can unit test the code if API which is used for invoke the chaincode??

lavish 1 (Tue, 28 Jan 2020 11:11:53 GMT):
Has joined the channel.

lavish 1 (Tue, 28 Jan 2020 13:12:37 GMT):
hello guys, i am lavish, and i am new in block chain and in hyperledger as well. i have read basics of hyper ledger and studied the working of hyperledger fabric samples. Can any one guide me what to do after this, how can i start making my own project ? i have cloned the fabric sdk node but don't know what to do next, so can anyone please help.

heatherp (Tue, 28 Jan 2020 15:59:40 GMT):
hey @AbhijeetSamanta do you mean unit test an application written using the fabric-client/fabric-network APIs to invite chaincode, or the unit tests of the fabric-sdk-node repository (where those packages live)?

heatherp (Tue, 28 Jan 2020 16:01:23 GMT):
Hey @lavish 1 what's your aim to learn next? Have you considered building on top of the samples from fabric-samples to achieve your goal? generator-fabric is a yeoman generator that allows you to create boilerplate smart contracts

deveshrawat (Tue, 28 Jan 2020 17:23:43 GMT):
Has joined the channel.

lavish 1 (Wed, 29 Jan 2020 07:55:27 GMT):
thanks for the reply, @heatherp. i want integrate blockchain n some of my projects, and in any future projects too. For now i have made carAuction project for test, it is same as commercial parper sample example and i can only run is by running the js files as shown in sample, now the thing i want to do next is deploy it and with an app that i have already created, can you please help me.

lavish 1 (Wed, 29 Jan 2020 07:55:27 GMT):
thanks for the reply, @heatherp. i want to integrate blockchain n some of my projects, and in any future projects too. For now i have made carAuction project for test, it is same as commercial parper sample example and i can only run is by running the js files as shown in sample, now the thing i want to do next is deploy it and with an app that i have already created, can you please help me.

lavish 1 (Wed, 29 Jan 2020 07:55:27 GMT):
thanks for the reply, @heatherp. i want to integrate blockchain with some of my projects, and in any future projects too. For now i have made carAuction project for test, it is same as commercial parper sample example and i can only run is by running the js files as shown in sample, now the thing i want to do next is deploy it and with an app that i have already created, can you please help me.

lavish 1 (Wed, 29 Jan 2020 07:55:27 GMT):
thanks for the reply, @heatherp. i want to integrate blockchain with some of my projects, and in any future projects too. For now i have made carAuction project for test, it is same as commercial paper sample example and i can only run is by running the js files as shown in sample, now the thing i want to do next is deploy it and with an app that i have already created, can you please help me.

lavish 1 (Wed, 29 Jan 2020 07:55:27 GMT):
thanks for the reply, @heatherp. i want to integrate blockchain with some of my projects, and in any future projects too. For now i have made carAuction project for test, it is same as commercial paper sample example and i can only run is by running the js files as shown in sample, now the thing i want to do next is deploy it and integrate it with an app that i have already created, can you please help me.

AbhijeetSamanta (Thu, 30 Jan 2020 09:37:24 GMT):
sorry to confuse you I am talking about application written using the fabric-client/fabric-network APIs to invite chaincode

giacomo.minighin (Thu, 30 Jan 2020 11:42:46 GMT):
Hi everyone, I have a question about node chaincode: is it possible to use multicore with cluster library?

gentios (Thu, 30 Jan 2020 12:09:26 GMT):
Hi all, I have deployed a hyperledger fabric network on kubernetes and I expose them through nginx-ingress. However when I try to connect to the peer and install the chaincode I get the following error `"Failed to connect before the deadline URL:grpcs://beta.notarised.cloud"` and in my ingress logs I do not get nothing, however if I try directly with `grpcurl -v beta.notarised.cloud:443 list` I get some logs in the ingress, what can be the issue here. PS: I am passing the tlsCacert on the network-config-profile.yaml

heatherp (Thu, 30 Jan 2020 15:42:34 GMT):
So you want to unit test your application?

heatherp (Thu, 30 Jan 2020 15:43:22 GMT):
Ok, you want to deploy it on a fabric network?

AbhijeetSamanta (Thu, 30 Jan 2020 15:43:41 GMT):
I want to test the application with blockchain like the functionality should be test

AbhijeetSamanta (Thu, 30 Jan 2020 15:44:22 GMT):
let me give some brief about it

AbhijeetSamanta (Thu, 30 Jan 2020 15:48:36 GMT):
I have node based rest API which is used to invoke the chaincode so it connect to my HLF network. Now I want to unit test my API using chai and mocha. so I have create different environment to test it so I am thing to test the API with mock hyperledger network, so its possible to do this way or we have some emulator so I can used for testing?

heatherp (Thu, 30 Jan 2020 15:56:08 GMT):
We don't have an emulator, and unfortunately no examples of unit testing application code. I'm afaid all I can suggest is to do the usual mocking of the network calls

AbhijeetSamanta (Thu, 30 Jan 2020 15:56:42 GMT):
yes I think its only solution, thanks

AbhijeetSamanta (Thu, 30 Jan 2020 15:57:08 GMT):
:slight_smile:

Ishee (Fri, 31 Jan 2020 06:20:12 GMT):
Hello ALl

Ishee (Fri, 31 Jan 2020 06:20:12 GMT):
Hello all

Ishee (Fri, 31 Jan 2020 06:20:25 GMT):
Greetings!

Ishee (Fri, 31 Jan 2020 06:21:34 GMT):
can you please tell me that from when can I learn start development of smart contract using fabric-node-SDK ?

gentios (Fri, 31 Jan 2020 09:10:32 GMT):
Hi @Ishee there is a great documentation and tutorials on how to start in the official docs: https://hyperledger-fabric.readthedocs.io/en/release-1.4/

Ishee (Fri, 31 Jan 2020 09:26:19 GMT):
Hi @gentios I had gone through with it, But I need understand a peers and organisation concept. Can you give a single demo example of it !?

gentios (Fri, 31 Jan 2020 09:44:13 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-1.4/network/network.html

vishnupradeepcm (Sun, 02 Feb 2020 16:27:16 GMT):
Has joined the channel.

lavish 1 (Mon, 03 Feb 2020 05:16:07 GMT):
yes, i want to deploy it on the network, but first i was trying to make it run on two nodes, but i am having with it , i tried to follow fabric samples but i was only able make chain code with it, i am not able to move any further, can you please provide me with a example code of a hyperledger fabric or a link for it which can be deployed on the network, that would be very helpful.

lavish 1 (Mon, 03 Feb 2020 05:16:07 GMT):
yes, i want to deploy it on the network, but first i was trying to make it run on two nodes, but i am having with it , i tried to follow fabric samples but i was only able make chain code with it, i am not able to move any further, can you please provide me with a example code of a hyperledger fabric or a link for it which can be deployed on the network, that would be very helpful @heatherp .

lavish 1 (Mon, 03 Feb 2020 05:16:07 GMT):
yes, i want to deploy it on the network, but first i was trying to make it run on two nodes, but i am having problem with it , i tried to follow fabric samples but i was only able make chain code with it, i am not able to move any further, can you please provide me with a example code of a hyperledger fabric or a link for it which can be deployed on the network, that would be very helpful @heatherp .

heatherp (Mon, 03 Feb 2020 09:51:24 GMT):
So is your network up and running? There is lots of information on the Hyperledger Fabric documentation regarding how to install and instantiate your smart contracts. Like here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html#install-instantiate-chaincode What version of Fabric is your network running? Depending on whether you are running version 1.4 or version 2.0, the commands and documentation is different between versions.

lavish 1 (Tue, 04 Feb 2020 05:53:07 GMT):
i looked at the link and it solved most of my confusion. thanks @heatherp

lavish 1 (Tue, 04 Feb 2020 10:01:29 GMT):
hello, I am getting an error "Principal deserialization failure (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.org2.example.com")) for identity 0" , i am trying to join a channel created by org1 with org 2, both of these orgs certificate have been created separately, can anyone please tell me that how can i allow with different ca certificate and sk can join channel created by another org with different ca certificate and sk ?

georgi (Tue, 04 Feb 2020 15:58:59 GMT):
Has joined the channel.

randyshu (Wed, 05 Feb 2020 01:37:53 GMT):
Has joined the channel.

randyshu (Wed, 05 Feb 2020 02:02:38 GMT):

Clipboard - February 5, 2020 10:01 AM

Paradox-AT (Thu, 06 Feb 2020 07:17:52 GMT):
Hey guys when I try to create a channel from the SDK I am getting `(node:9790) UnhandledPromiseRejectionWarning: Error: error validating channel creation transaction for new channel 'test1', 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` but when manually creating I am able to create the channel

Paradox-AT (Thu, 06 Feb 2020 07:17:52 GMT):
Hey guys, When I try to create a channel from the SDK I am getting `(node:9790) UnhandledPromiseRejectionWarning: Error: error validating channel creation transaction for new channel 'test1', 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` but when manually creating I am able to create the channel. Any clue why? I am using admin certificate issues by the ca

mffrench (Thu, 06 Feb 2020 10:18:29 GMT):
Hello, I'm currently working on our app migration from node 8 to node 10. On node 8, everything works well using HLF SDK Node 1.4.5. Unfortunately while using node10 with same libs/same config I get following error : `Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.` Is there any changes I need to add (config or lib version) to make work my e2e tests with node 10 ? Thank you

mffrench (Thu, 06 Feb 2020 10:18:29 GMT):
Hello, I'm currently working on our app migration from node 8 to node 10. On node 8, everything works well using HLF SDK Node 1.4.5. Unfortunately while using node10 with same libs/same config I get following error : `Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.` Is there any changes I need to add (config or lib version) to make work my e2e tests with node 10 ? Thank you (Note: I'm using docker image node:10 to embed my e2e test client in a container)

bestbeforetoday (Thu, 06 Feb 2020 11:27:38 GMT):
Not that I am aware of. The 1.4 Node SDK is currently built and testing with Node 10, so it certainly works with Node 10

bestbeforetoday (Thu, 06 Feb 2020 11:27:38 GMT):
Not that I am aware of. The 1.4 Node SDK is currently built and tested with Node 10, so it certainly works with Node 10

mffrench (Thu, 06 Feb 2020 11:29:46 GMT):
yeah me too ... I'm just trying to understand what environment changes I need to properly run my tests

bestbeforetoday (Thu, 06 Feb 2020 11:40:44 GMT):
I don't make any environmental changes when switching between Node versions locally. Or at least not any that spring to mind! You certainly do have to wipe out your _node_modules_ and `npm install` again though

bestbeforetoday (Thu, 06 Feb 2020 11:40:44 GMT):
I don't make any environmental changes when switching between Node versions locally. Or at least not any that spring to mind! You certainly do have to wipe out your *node_modules* and `npm install` again though

mffrench (Thu, 06 Feb 2020 12:01:12 GMT):
well, node_modules installation is coming with my app docker image build phase... Do you think we can compare the lib version with yours ?

mffrench (Thu, 06 Feb 2020 12:01:34 GMT):
(I'm using docker image node:10 as a starter)

AhimbisibweBrian (Thu, 06 Feb 2020 22:25:57 GMT):
Has joined the channel.

Aniket.1 (Fri, 07 Feb 2020 06:43:44 GMT):
Hello guys, I am getting this while joining a peer in channel: `Error opening a new empty ledger. Unsetting under construction flag. Error: error handling CouchDB request. Error:unauthorized, Status Code:401, Reason:You are not a server admin`

Aniket.1 (Fri, 07 Feb 2020 06:44:24 GMT):
my related configurations are: ``` state: # stateDatabase - options are "goleveldb", "CouchDB" # goleveldb - default state database stored in goleveldb. # CouchDB - store state database in CouchDB stateDatabase: CouchDB # Limit on the number of records to return per query totalQueryLimit: 100000 couchDBConfig: # It is recommended to run CouchDB on the same server as the peer, and # not map the CouchDB container port to a server port in docker-compose. # Otherwise proper security must be provided on the connection between # CouchDB client (on the peer) and server. couchDBAddress: 127.0.0.1:5984 # This username must have read and write authority on CouchDB username: # The password is recommended to pass as an environment variable # during start up (eg CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD). # If it is stored here, the file must be access control protected # to prevent unintended users from discovering the password. password: ```

Aniket.1 (Fri, 07 Feb 2020 09:42:46 GMT):
I am able to access couchDB UI on http://localhost:5984/_utils/#/_all_dbs . But peer join throwing this error even with same username and password on web and in core.yaml

davidkel (Fri, 07 Feb 2020 10:52:09 GMT):
You are probably asking this in the wrong channel. This for discussions around the fabric sdk for node. Maybe try #fabric-questions ?

giacomo.minighin (Fri, 07 Feb 2020 13:27:22 GMT):
I'm following this tutorial: https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-sign-transaction-offline.html but I'm getting: ``` ```

giacomo.minighin (Fri, 07 Feb 2020 13:27:22 GMT):
I'm following this tutorial: https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-sign-transaction-offline.html but I'm getting: ``` debug: [client-utils.js]: sendPeersProposal - Promise is rejected: TypeError: Illegal buffer ```

giacomo.minighin (Fri, 07 Feb 2020 13:27:22 GMT):
I'm following this tutorial: https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-sign-transaction-offline.html when I'm executing `channel.sendSignedProposal({ signedProposal, targets })` I'm getting: ``` debug: [client-utils.js]: sendPeersProposal - Promise is rejected: TypeError: Illegal buffer ```

giacomo.minighin (Fri, 07 Feb 2020 13:27:22 GMT):
I'm following this tutorial: https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-sign-transaction-offline.html when I'm executing `channel.sendSignedProposal({ signedProposal, targets })` I'm getting `debug: [client-utils.js]: sendPeersProposal - Promise is rejected: TypeError: Illegal buffer`

PauloQuerido (Fri, 07 Feb 2020 14:31:52 GMT):
Has joined the channel.

narendranathreddy (Sat, 08 Feb 2020 08:29:45 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

mauricio (Sat, 08 Feb 2020 18:28:38 GMT):
Please, verify if you're applying well the buffer to the signedProposal, put a break point with vscode or something like that before send the signed proposal.

giacomo.minighin (Mon, 10 Feb 2020 14:08:15 GMT):
you were right, it was a wrong buffer format, I resolved it doing `Buffer.from(proposal_btyes)` and `Buffer.from(signature)` does it make sense?

giacomo.minighin (Mon, 10 Feb 2020 14:08:15 GMT):
you were right, it was a wrong buffer format, I resolved it doing `Buffer.from(proposal_btyes)` and `Buffer.from(signature)`

narendranathreddy (Tue, 11 Feb 2020 14:51:58 GMT):

Mastering Hyperledger Fabric - February 11, 2020 6:51 PM

narendranathreddy (Tue, 11 Feb 2020 14:59:29 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.

PauloQuerido (Tue, 11 Feb 2020 17:16:45 GMT):
Hi guys, I'm trying to make consecutive calls to query.js on the fabcar example and i get the following error: `2020-02-11T17:02:43.945Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.example.com:8051" failed: message=cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory, stack=Error: cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory at self._endorserClient.processProposal (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/fabric-client/lib/Peer.js:140:36) at Object.onReceiveStatus (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:1207:9) at InterceptingListener._callNext (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://localhost:8051, name=peer1.org1.example.com:8051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.org1.example.com:8051, grpc.ssl_target_name_override=peer1.org1.example.com, grpc.default_authority=peer1.org1.example.com, isProposalResponse=true Failed to evaluate transaction: Error: cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory `

PauloQuerido (Tue, 11 Feb 2020 17:17:17 GMT):
Hi guys, I'm trying to make consecutive calls to query.js on the fabcar example and i get the following error: `2020-02-11T17:02:43.945Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.example.com:8051" failed: message=cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory, stack=Error: cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory` at self._endorserClient.processProposal (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/fabric-client/lib/Peer.js:140:36) at Object.onReceiveStatus (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:1207:9) at InterceptingListener._callNext (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://localhost:8051, name=peer1.org1.example.com:8051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.org1.example.com:8051, grpc.ssl_target_name_override=peer1.org1.example.com, grpc.default_authority=peer1.org1.example.com, isProposalResponse=true Failed to evaluate transaction: Error: cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory

PauloQuerido (Tue, 11 Feb 2020 17:18:43 GMT):
Hi guys, I'm trying to make consecutive calls to query.js on the fabcar example and i get the following error: `2020-02-11T17:02:43.945Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.example.com:8051" failed: message=cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory, stack=Error: cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory` `at self._endorserClient.processProposal (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/fabric-client/lib/Peer.js:140:36)` `at Object.onReceiveStatus (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:1207:9)` `at InterceptingListener._callNext (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:568:42)` `at InterceptingListener.onReceiveStatus (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:618:8)` `at callback (/home/paulo/fabric-samples/fabcar/apiserver/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://localhost:8051, name=peer1.org1.example.com:8051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.org1.example.com:8051, grpc.ssl_target_name_override=peer1.org1.example.com, grpc.default_authority=peer1.org1.example.com, isProposalResponse=true` `Failed to evaluate transaction: Error: cannot retrieve package for chaincode fabcar/1.0, error open /var/hyperledger/production/chaincodes/fabcar.1.0: no such file or directory`

LWIH (Tue, 11 Feb 2020 18:27:20 GMT):
Has joined the channel.

ZainabM (Fri, 14 Feb 2020 06:10:01 GMT):
Can we create channels dynamically? I mean we create channel.tx file using cryptogen tool first which is a manual process. Can we do it using SDK? Any other idea is also welcome.

ZainabM (Fri, 14 Feb 2020 06:10:01 GMT):
Can we create channels dynamically? I mean we create channel.tx file using configtxgen tool first which is a manual process. Can we do it using SDK? Any other idea is also welcome.

AbhijeetSamanta (Fri, 14 Feb 2020 07:05:30 GMT):
Hi All, I have one query regarding the Gateway connection with network. Can I make connection first time and used it for every call when it needs? I am using below code to connect to gateway `await gateway.connect(ccpPath, { wallet, identity: Username, discovery: { enabled: true, asLocalhost: false } });`

AbhijeetSamanta (Fri, 14 Feb 2020 07:05:30 GMT):
Hi All, I have one query regarding the Gateway connection with network. Can I make connection first time and used it for every call when it needs? I am using below code to connect to gateway``` `await gateway.connect(ccpPath, { wallet, identity: Username, discovery: { enabled: true, asLocalhost: false } });` ```

bestbeforetoday (Fri, 14 Feb 2020 14:03:55 GMT):
You should absolutely reuse the connected gateway (or the specific Network or Contract instances obtained from it) for submitting or evaluating multiple transactions. There is significant overhead in connecting the gateway so you avoid doing that more than necessary

AbhijeetSamanta (Fri, 14 Feb 2020 14:05:09 GMT):
Hi @bestbeforetoday Thanks for advise could you please help me to implement it as I am facing some issue with it

AbhijeetSamanta (Fri, 14 Feb 2020 14:06:13 GMT):
please see the stackoverlflow https://stackoverflow.com/questions/60222639/can-we-connect-the-gateway-only-once-in-hypeledger-fabric-using-node-sdk/60223995#60223995

indirajith (Fri, 14 Feb 2020 17:31:13 GMT):
Has joined the channel.

BrajeshA (Mon, 17 Feb 2020 03:25:59 GMT):
Has joined the channel.

BrajeshA (Mon, 17 Feb 2020 03:26:00 GMT):
Abhijeet is this working with beta fabric-sdk-node@beta for you?I am getting error "Error: No discovery targets found"

mholdmann (Mon, 17 Feb 2020 16:28:10 GMT):
Has joined the channel.

KartikChauhan (Wed, 19 Feb 2020 12:20:32 GMT):
Is there any use to have multiple contracts in the same chaincode instead of having single contract? Can anyone provide any use case?

ChrisSargent (Thu, 20 Feb 2020 13:46:30 GMT):
Has joined the channel.

ChrisSargent (Thu, 20 Feb 2020 13:47:35 GMT):
Hey all, does anyone know if it's possible to create custom walletStores - I see this code in the repo (and also saw it on a presentation): https://github.com/hyperledger/fabric-sdk-node/blob/7b9f25270a04f5bbe35ff897d6f1724308801b13/fabric-network/src/impl/wallet/walletstore.ts So it looks like it might be possible but I wonder if it's in the public api yet?

Antimttr (Thu, 20 Feb 2020 14:27:34 GMT):
i created my own wallet store

Antimttr (Thu, 20 Feb 2020 14:27:37 GMT):
in a nosql db

Antimttr (Thu, 20 Feb 2020 14:27:43 GMT):
lives with the client

ChrisSargent (Thu, 20 Feb 2020 16:01:09 GMT):
@Antimttr - okay, nice - do you have some steps you did or example code by any chance?

Antimttr (Thu, 20 Feb 2020 16:02:10 GMT):
well i created my client, its java based, so i made a jersey based restful api. I used the examples of the java tests you can find in the java sdk repo

Antimttr (Thu, 20 Feb 2020 16:02:39 GMT):
but those examples dont use a database they just kinda fudge it, so i actually created a set of models and wrote all the state to a mongodb

Antimttr (Thu, 20 Feb 2020 16:03:16 GMT):
right now i have 3 tables, chaincodes, channels and users

Antimttr (Thu, 20 Feb 2020 16:03:42 GMT):
and my client uses a slightly modified version of the network-config.yaml

ChrisSargent (Thu, 20 Feb 2020 16:04:07 GMT):
did you use this WalletStore class?

Antimttr (Thu, 20 Feb 2020 16:04:16 GMT):
i did not use any of the existing wallet code

Antimttr (Thu, 20 Feb 2020 16:04:38 GMT):
all a wallet is afaik is a way to store some of the certs/keys you get from sdk output

Antimttr (Thu, 20 Feb 2020 16:04:51 GMT):
so i just store them in nosql records, same difference really

Antimttr (Thu, 20 Feb 2020 16:04:53 GMT):
afaik

ChrisSargent (Thu, 20 Feb 2020 16:11:48 GMT):
okay, understood.

bestbeforetoday (Thu, 20 Feb 2020 16:55:24 GMT):
It's there in the v2.0 beta release so you can start playing with it now. There is still some rework on event listening to be done for the v2.0 SDK but a full release will hopefully happen in the fairly near future

Manish209 (Fri, 21 Feb 2020 12:17:07 GMT):
Has joined the channel.

Manish209 (Fri, 21 Feb 2020 12:17:08 GMT):
Please guide me ..Using node SDK, I am working with fabric 2.0 & I am adding new organization Org4 with new channel my3channel but getting problem... [2020-02-21 11:36:52.808] [DEBUG] Create-Channel - response ::{"status":"BAD_REQUEST","info":"Attempted to include a member which is not in the consortium"} [2020-02-21 11:36:52.808] [ERROR] Create-Channel - !!!!!!!!! Failed to create the channel 'my3channel' !!!!!!!!! [2020-02-21 11:36:52.809] [ERROR] Create-Channel - Error: Failed to create the channel 'my3channel'

davidkhala (Fri, 21 Feb 2020 14:17:26 GMT):
@heatherp in `npm fabric-ca-client` version 1.4.5 and 1.4.6, I see both having error like "Error: Cannot find module './utils.js' stack from `fabric-ca-client/lib/FabricCAServices.js:10:15` It seems a publish process problem

davidkhala (Fri, 21 Feb 2020 14:17:26 GMT):
@heatherp in `npm fabric-ca-client` version 1.4.5 and 1.4.6, I see both having error like "Error: Cannot find module './utils.js' stack from `fabric-ca-client/lib/FabricCAServices.js:10:15` It seems a publish process problem issue created here https://jira.hyperledger.org/browse/FABN-1500

heatherp (Fri, 21 Feb 2020 14:32:06 GMT):
Hey @davidkhala thanks, I think I know what the problem is, we've missed out copying the fabric-client files into fabric-ca-client in the step that publishes the code. Just double checking and then I'll raise a PR

davidkhala (Fri, 21 Feb 2020 14:34:06 GMT):
I guess so.

heatherp (Fri, 21 Feb 2020 15:25:09 GMT):
I think this should do it: https://github.com/hyperledger/fabric-sdk-node/pull/142

Manish209 (Sat, 22 Feb 2020 06:01:01 GMT):
Please guide me ..Using node SDK, I am working with fabric 2.0 & I am adding new organization Org4 with new channel my3channel but getting problem... [2020-02-21 11:36:52.808] [DEBUG] Create-Channel - response ::{"status":"BAD_REQUEST","info":"Attempted to include a member which is not in the consortium"} [2020-02-21 11:36:52.808] [ERROR] Create-Channel - !!!!!!!!! Failed to create the channel 'my3channel' !!!!!!!!! [2020-02-21 11:36:52.809] [ERROR] Create-Channel - Error: Failed to create the channel 'my3channel'

Manish209 (Mon, 24 Feb 2020 07:03:34 GMT):
Any node SDK sample is available? for install chaincode using fabric 2.0 ?

davidkel (Mon, 24 Feb 2020 09:08:39 GMT):
Updated your stackoverflow question

davidkel (Mon, 24 Feb 2020 09:08:39 GMT):
Commented on your stackoverflow question

japidei (Mon, 24 Feb 2020 11:36:23 GMT):
Has joined the channel.

Manish209 (Mon, 24 Feb 2020 11:47:21 GMT):
Ohh, thanks !

monte97 (Tue, 25 Feb 2020 22:52:49 GMT):
Has joined the channel.

monte97 (Wed, 26 Feb 2020 10:40:15 GMT):
in https://github.com/hyperledger/fabric-samples/blob/master/commercial-paper/organization/digibank/application/package.json `fabric-network` and `fabric-client` dependencies are marked as "beta", where can i the node-sdk's documentation for this version?

monte97 (Wed, 26 Feb 2020 10:40:15 GMT):
in https://github.com/hyperledger/fabric-samples/blob/master/commercial-paper/organization/digibank/application/package.json `fabric-network` and `fabric-client` dependencies are marked as "beta", where can I the node-sdk's documentation for this version?

heatherp (Wed, 26 Feb 2020 13:42:00 GMT):
Hey @monte97, we're publishing our beta modules out of the master branch of this repo: https://github.com/hyperledger/fabric-sdk-node Our API docs are here: https://hyperledger.github.io/fabric-sdk-node/master/ Please note that we've refactored fabric-client module into fabric-common in the master (2.0.0) stream, and we're reccommending you use `fabric-network`

rjones (Wed, 26 Feb 2020 17:10:51 GMT):
Has joined the channel.

rjones (Wed, 26 Feb 2020 17:10:52 GMT):
Is there a plan to make a 2.0.0 branch, or will you be publishing on master from here out?

bestbeforetoday (Wed, 26 Feb 2020 17:38:07 GMT):
Right now we're planning on sticking with _master_ for release 2.0 until we start doing any future work that shouldn't go into 2.0. Saves the overhead of having to deliver all changes into both branches.

rjones (Wed, 26 Feb 2020 17:38:58 GMT):
Cool. I asked b/c I was looking at Caliper supporting Fabric 2.0, and I wasn't sure how that would work.

rjones (Wed, 26 Feb 2020 17:39:29 GMT):
I was talking with @klenik over in #caliper-contributors

monte97 (Wed, 26 Feb 2020 21:58:59 GMT):
Thanks!

vitorduarte (Thu, 27 Feb 2020 12:28:43 GMT):
Has joined the channel.

vitorduarte (Thu, 27 Feb 2020 12:28:44 GMT):
Hi, I'm trying to add a organization to a channel (system-channel) using sdk. With the `configtxlator` I decoded the protobufs, compute the delta and tested using cli. But when I do the updateChannel call I get this error: ``` {"status":"BAD_REQUEST","info":"error applying config update to existing channel 'system-channel': error authorizing update: ConfigUpdate for channel '' but envelope for channel 'system-channel'"} ``` I'm sending using the config field of channel request, should I send as a envelope? And how to do it?

vitorduarte (Thu, 27 Feb 2020 12:28:44 GMT):
Hi, I'm trying to add a organization to a channel (system-channel) using sdk. With the `configtxlator` I decoded the protobufs, compute the delta and tested using cli. But when I do the `updateChannel` call I get this error: ``` {"status":"BAD_REQUEST","info":"error applying config update to existing channel 'system-channel': error authorizing update: ConfigUpdate for channel '' but envelope for channel 'system-channel'"} ``` I'm sending using the config field of channel request, should I send as a envelope? And how to do it?

Paradox-AT (Sat, 29 Feb 2020 11:58:29 GMT):
Hey guys, I am trying to use CA to enroll admin but I am getting this error: ``` 0|app | 2020-02-29T11:17:53.657Z - error: [FabricCAClientService.js]: Failed to enroll admin, error:%o message=Calling enrollment endpoint failed with error [Error: write EPROTO 140004976421760:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:827: 0|app | ], stack=Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140004976421760:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:827: 0|app | ] 0|app | at ClientRequest.request.on (/home/ubuntu/blockchain-microservice/node_modules/fabric-ca-client/lib/FabricCAClient.js:487:12) 0|app | at emitOne (events.js:116:13) 0|app | at ClientRequest.emit (events.js:211:7) 0|app | at TLSSocket.socketErrorListener (_http_client.js:387:9) 0|app | at emitOne (events.js:116:13) 0|app | at TLSSocket.emit (events.js:211:7) 0|app | at onwriteError (_stream_writable.js:418:12) 0|app | at onwrite (_stream_writable.js:440:5) 0|app | at _destroy (internal/streams/destroy.js:39:7) 0|app | at TLSSocket.Socket._destroy (net.js:574:3) 0|app | Cannot initialize Fabric Repository Error: Calling enrollment endpoint failed with error [Error: write EPROTO 140004976421760:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:827: (base) ubuntu@master:~/blockchain-microservice$ ``` Any clue why am I getting this error? I am able to enroll the admin from the ca container but not from the sdk

Paradox-AT (Mon, 02 Mar 2020 09:29:14 GMT):
Guys anyone?

Paradox-AT (Mon, 02 Mar 2020 09:29:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=px2EWZXT4ThZ4gXrt) Guys anything?

randyshu (Tue, 03 Mar 2020 01:13:36 GMT):
If there are good ideas to filter some endorse peers with fabric-network lib.

Aniket.1 (Wed, 04 Mar 2020 10:14:19 GMT):
I am getting this error while trying to query chaincode using node-sdk: `error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://server_ip:7051`

Aniket.1 (Wed, 04 Mar 2020 10:16:17 GMT):
can someone provide the possible scenarios for this error?

randyshu (Wed, 04 Mar 2020 10:17:23 GMT):
you can use ping or telnet command to determine the server_ip is ok.

Aniket.1 (Wed, 04 Mar 2020 10:26:05 GMT):
yes I am able to ping IP on port 7051

Aniket.1 (Wed, 04 Mar 2020 10:26:26 GMT):
I am not getting any kind of hit in peer logs

Aniket.1 (Wed, 04 Mar 2020 10:27:24 GMT):
when I hit the `server_ip:7051` from browser, then i get `TLS handshake error` in peer logs

Aniket.1 (Wed, 04 Mar 2020 10:27:34 GMT):
@randyshu

Aniket.1 (Wed, 04 Mar 2020 11:25:12 GMT):
peer debug logs shows: `2020-03-04 16:39:32.387 IST [grpc] newHTTP2Transport -> DEBU 9e6 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2020-03-04 16:39:32.389 IST [grpc] newHTTP2Transport -> DEBU 9e7 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:64103: read: connection reset by peer"`

Aniket.1 (Wed, 04 Mar 2020 11:25:12 GMT):
peer debug logs shows: ``` 2020-03-04 16:39:32.387 IST [grpc] newHTTP2Transport -> DEBU 9e6 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" 2020-03-04 16:39:32.389 IST [grpc] newHTTP2Transport -> DEBU 9e7 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:64103: read: connection reset by peer" ```

Aniket.1 (Wed, 04 Mar 2020 13:43:38 GMT):
Has anyone successfully connected to a TLS enabled peer from Node-sdk?

Aniket.1 (Wed, 04 Mar 2020 18:08:30 GMT):
Can someone help me to make grpcs connection to peer?

rjones (Wed, 04 Mar 2020 18:11:37 GMT):
Has left the channel.

Swhite215 (Wed, 04 Mar 2020 18:23:32 GMT):
Has joined the channel.

Swhite215 (Wed, 04 Mar 2020 18:23:33 GMT):
Did you change the URLs in your client config to https and grpcs?

Aniket.1 (Wed, 04 Mar 2020 18:42:46 GMT):
yes

Aniket.1 (Wed, 04 Mar 2020 18:43:12 GMT):
I got it fixed by adding the flag 'ssl-target-name-override'

davidkhala (Thu, 05 Mar 2020 08:04:22 GMT):
for 2.0, are there a new lifecycle chaincode tutorial and utils provided?

bestbeforetoday (Thu, 05 Mar 2020 10:05:00 GMT):
The CLI is the recommended mechanism for driving admin tasks, such as chaincode lifecycle. We are not currently planning to have a v2.0 of the _fabric-admin_ module that provides lifecycle commands baked into the SDK

davidkhala (Fri, 06 Mar 2020 04:37:01 GMT):
Well, then those chaincode related util function such as install, instantiate will never appears in sdk. Is it?

davidkhala (Fri, 06 Mar 2020 05:19:28 GMT):
Not sounds good for people like me use nodejs even for admin tasks. For example, modify the config json via nodejs before update channel config.

davidkhala (Fri, 06 Mar 2020 05:19:28 GMT):
Not sounds good for people like me use nodejs even for admin tasks. For example, channel creation, join and config update etc.

randyshu (Fri, 06 Mar 2020 07:16:00 GMT):
:thinking: DiscoveryEventHandler only throw an Error with "Endorsement Failed" when occured an error ,but I want more information about it ,what should I do?

bestbeforetoday (Fri, 06 Mar 2020 10:43:37 GMT):
I guess the 1.4 _fabric-admin_ should continue to work for non-Lifecycle operations. I believe the Lifecycle operations are just regular transactions (no special protobuf structure) directed at the system chaincode, so it may be possible to drive them just using the regular API for invoking transactions without any special admin component for them in the SDK

davidkhala (Fri, 06 Mar 2020 10:59:02 GMT):
Sure, they are always possible to implement for experienced developer, especially now we have fabric-protos BTW, will `Committer#deliver()` API be added back in 2.0 sdk? I see only `broadcast()` so far

bestbeforetoday (Fri, 06 Mar 2020 11:17:46 GMT):
The point is that you may not need fabric-protos to invoke the new Lifecycle transactions. You can (hopefully) just use high level constructs like Contract.submitTransaction(). Caveat: I haven't tried this myself :)

bestbeforetoday (Fri, 06 Mar 2020 11:19:55 GMT):
I don't know of any plan to add `Committer#deliver()`. @bretharrison would know better than me though

rushiraj111 (Fri, 06 Mar 2020 11:48:32 GMT):
Hi everyone, Can anyone let me know if it is possible to migrate from composer to NodeSDK without losing data?

davidkel (Fri, 06 Mar 2020 13:04:08 GMT):
When you say migrate, I assume you mean replacing the business network with a natively implemented smart contract as well as re-implement your client to use the fabric-sdk-node rather than the composer client correct ? It is doable. You may find some help here https://davidkel.github.io/docs/Porting/TOC.html

davidkhala (Fri, 06 Mar 2020 13:58:13 GMT):
Tks, you are helpful.

BrajeshA (Sat, 07 Mar 2020 06:01:28 GMT):
I am trying to use fabric-node-sdk beta3 to process chain code event and get the following response

BrajeshA (Sat, 07 Mar 2020 06:03:09 GMT):
I am trying to use fabric-node-sdk beta3 to process chain code event and get the following response [ ChaincodeEvent { chaincodeId: 'chainecodename', transactionId: '6fa4ef1f86a79529349818c40a83a4857e9ff75fc59045ae10272fd174a2c502', status: 'VALID', eventName: 'myevent', payload: } ] -- how do I parse to access payload?

BrajeshA (Sat, 07 Mar 2020 06:03:09 GMT):
I am trying to use fabric-node-sdk beta3 to process chain code event and get the following response ``` ``` [ ChaincodeEvent { chaincodeId: 'chainecodename', transactionId: '6fa4ef1f86a79529349818c40a83a4857e9ff75fc59045ae10272fd174a2c502', status: 'VALID', eventName: 'myevent', payload: } ] -- how do I parse to access payload?

BrajeshA (Sat, 07 Mar 2020 06:03:09 GMT):
I am trying to use fabric-node-sdk beta3 to process chain code event and get the following response ``` ``` [ ChaincodeEvent { chaincodeId: 'chainecodename', transactionId: '6fa4ef1f86a79529349818c40a83a4857e9ff75fc59045ae10272fd174a2c502', status: 'VALID', eventName: 'myevent', payload: } ] this does not look like valid json. How do I parse to access payload?

bestbeforetoday (Sat, 07 Mar 2020 13:55:47 GMT):
It looks like the `payload` property on the chaincode event is a Buffer. You could try Buffer.toString('utf8') on it: `event.payload.toString('utf8');`

davidkhala (Sat, 07 Mar 2020 14:25:34 GMT):
@bretharrison Hi Bret, We struggle with a nodejs compatibility problem in our network, the problem is grpcs tls handshack will failed when using node 10 but success in nodejs 8. And I recently see a magic code line in `Endpoint.js` ``` const pembuf = Buffer.concat([Buffer.from(pem), Buffer.from('\0')]); ``` I guess would this be something helpful to us?

davidkel (Sat, 07 Mar 2020 15:41:06 GMT):
@davidkhala Out of interest, what is the problem you see with tls ?

davidkel (Sat, 07 Mar 2020 15:41:06 GMT):
@davidkhala Out of interest, what is the problem you see with tls ? I've seen issues with TLS as well and wondered if it was a node version problem. Node 10 uses openssl 1.1 whereas Node 8 uses openssl 1.0.2

BrajeshA (Sat, 07 Mar 2020 22:34:34 GMT):
Thanks. Yes Its buffer but the main issues is event data is not valid JSON. [ ChaincodeEvent { chaincodeId:....

BrajeshA (Sat, 07 Mar 2020 22:34:34 GMT):
Thanks. Yes Its buffer but the main issues is event data is not valid JSON Array. [ ChaincodeEvent { chaincodeId:'chainecodename',.... -* Note "ChaincodeEvent " . right now I am manually fixing json before accessing event and its payload key. I think in fabric-sdk-node 2.0 chaincode event callback will receive all events data in a block as array --is my understanding correct ?

davidkhala (Sun, 08 Mar 2020 01:05:52 GMT):
What I see is the most common error: ``` tls_process_server_certificate:certificate verify failed.` ``` It is weird that it only happens in real domain like orderer.ibm.com but will not in docker virtual network with sslTargetName override

davidkhala (Sun, 08 Mar 2020 01:05:52 GMT):
What I see is the most common error: ``` tls_process_server_certificate:certificate verify failed.` ``` It is weird that it only happens in real domain like orderer.ibm.com but will not in docker virtual network with sslTargetName override. Both networks are of version 1.4.4

BrajeshA (Sun, 08 Mar 2020 05:40:29 GMT):
seems like channel.queryTransaction(...), channel.queryBlock(...) is not available in beta3, however it works in beta2. what is recommended way to get transaction and block details?

bestbeforetoday (Sun, 08 Mar 2020 09:51:28 GMT):
It's not JSON. It's an array of JavaScript objects. There is no need to parse it as JSON in order to turn it into a JavaScript object

obelix (Sun, 08 Mar 2020 14:53:18 GMT):
Has joined the channel.

BrajeshA (Sun, 08 Mar 2020 18:14:19 GMT):
Thanks Mark. I don't why I thought it would be JSON! Can you help with another issue: channel.queryTransaction(...), channel.queryBlock(...)- they don't exist in beta 3. How do I access these methods.

davidkhala (Tue, 10 Mar 2020 04:16:40 GMT):
[1.4] for grpc Remote endpoint like peer. orderer, it seems we could not recover grpc channel after we call `close()`, is it?

davidkhala (Tue, 10 Mar 2020 04:16:40 GMT):
[1.4] for grpc Remote endpoint like peer. orderer, it seems we could not recover grpc channel after we call `close()`, is it? I tried even with `channel.getConnectivityState(tryToConnect=true)` but still get error from callback saying `The channel has been closed`

davidkhala (Tue, 10 Mar 2020 04:33:54 GMT):
Following above, we could create similar method as peer.js, allow developer to recreate grpcClient after close()

bestbeforetoday (Tue, 10 Mar 2020 10:35:07 GMT):
@bretharrison would have the answers on that, but I don't think he's around until next week

BrajeshA (Tue, 10 Mar 2020 21:43:45 GMT):
ok. will wait for his response. Thanks

GuilhermeLionzo (Wed, 11 Mar 2020 01:51:16 GMT):
Has joined the channel.

Abhishekkishor (Wed, 11 Mar 2020 15:58:50 GMT):
Has joined the channel.

nekia (Thu, 12 Mar 2020 05:06:46 GMT):
Hi, when I installed fabric-common@1.4.7, the package directory under node_modules is almost empty. Is there anyone knows this reason?

nekia (Thu, 12 Mar 2020 05:13:54 GMT):
``` $ npm install fabric-common + fabric-common@1.4.7 updated 1 package and audited 935 packages in 3.413s 1 package is looking for funding run `npm fund` for details found 0 vulnerabilities $ find node_modules/fabric-common/ -type f node_modules/fabric-common/README.md node_modules/fabric-common/lib/.gitkeep node_modules/fabric-common/index.js node_modules/fabric-common/package.json node_modules/fabric-common/.eslintignore ```

davidkel (Thu, 12 Mar 2020 08:43:04 GMT):
fabric-common package doesn't do anything in the 1.4 version, it's basically empty. Why do you think you need it ?

nekia (Thu, 12 Mar 2020 10:27:40 GMT):
I'd like to use the following classes in v1.4.7 * [BlockDecoder](https://hyperledger.github.io/fabric-sdk-node/release-1.4/BlockDecoder.html) * [User](https://hyperledger.github.io/fabric-sdk-node/release-1.4/User.html) etc.

nekia (Thu, 12 Mar 2020 10:30:17 GMT):
When exploring 1.4.7 tagged source tree, I can see these classes in fabric-common. That's the reason why I'm trying to use fabric-common package.

nekia (Thu, 12 Mar 2020 10:30:17 GMT):
"1.4.7 tagged source tree" - do you mean the code tagged with v1.4.7 in github? That's currently pointing to the wrong branch

nekia (Thu, 12 Mar 2020 10:30:44 GMT):
@davidkel

heatherp (Thu, 12 Mar 2020 10:33:47 GMT):
@nekia The v1.4.7 tag in github is pointing to the branch, we've got an issue for it: https://jira.hyperledger.org/browse/FABN-1503

heatherp (Thu, 12 Mar 2020 10:34:33 GMT):
For the 1.4.x stream, I think you'll want to use fabric-client to access those apis

nekia (Thu, 12 Mar 2020 10:42:10 GMT):
I got it. In 1.4.x stream, do I need to keep using fabric-client from now on?

heatherp (Thu, 12 Mar 2020 10:44:26 GMT):
to access those APIs, yes

nekia (Thu, 12 Mar 2020 10:46:20 GMT):
This change as mentioned [here](https://github.com/hyperledger/fabric-sdk-node) would be available only for 2.x stream, right ?

nekia (Thu, 12 Mar 2020 10:46:33 GMT):
https://github.com/hyperledger/fabric-sdk-node

heatherp (Thu, 12 Mar 2020 10:47:19 GMT):
what changed is that? the "here" link takes me to the repo

nekia (Thu, 12 Mar 2020 10:48:53 GMT):
Sorry, that is the README, In the README, fabric-client has been removed.

heatherp (Thu, 12 Mar 2020 10:49:34 GMT):
that's right. The APIs you referenced above should be available in fabric-common in the 2.0.x strema

heatherp (Thu, 12 Mar 2020 10:49:34 GMT):
that's right. The APIs you referenced above should be available in fabric-common in the 2.0.x stream

nekia (Thu, 12 Mar 2020 10:50:44 GMT):
OK, I see. Thank you so much :slight_smile:

heatherp (Thu, 12 Mar 2020 10:50:49 GMT):
sure :)

GuilhermeLionzo (Thu, 12 Mar 2020 21:39:33 GMT):
*[DOUBT - Multiple SmartContracts]* Hi guys, I'm trying to instatiate two SmartContracts on one channel, but I could invoke only the functions of one Smart Contract. When I tried to invoke/query some method of second Smart Contract, I received this error: ```2020-03-12T20:29:52.349Z - warn: [Transaction]: _validatePeerResponses: Received error response from peer: message=14 UNAVAILABLE: failed to connect to all addresses, stack=Error: 14 UNAVAILABLE: failed to connect to all addresses at Object.exports.createStatusError (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:1204:28) at InterceptingListener._callNext (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:845:24), code=14, , flags=0, details=failed to connect to all addresses 2020-03-12T20:29:52.349Z - warn: [Transaction]: _validatePeerResponses: Received error response from peer: message=cannot retrieve package for chaincode natureinvest/1.0, error open /var/hyperledger/production/chaincodes/natureinvest.1.0: no such file or directory, stack=Error: cannot retrieve package for chaincode natureinvest/1.0, error open /var/hyperledger/production/chaincodes/natureinvest.1.0: no such file or directory at self._endorserClient.processProposal (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/fabric-client/lib/Peer.js:144:36) at Object.onReceiveStatus (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:1207:9) at InterceptingListener._callNext (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://localhost:10051, name=peer1.natureinvest.novaweb.com, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer1.natureinvest.novaweb.com, request-timeout=120001, grpc.ssl_target_name_override=peer1.natureinvest.novaweb.com, grpc.default_authority=peer1.natureinvest.novaweb.com, isProposalResponse=true ``` Probably I'm instantiating the SmartContracts in a wrong way. Could you guys help me on this issue? It follows the steps that a followed and the two smart contracts structure. PS.: If you guys prefer, I can send the code. *INSTALL STEP* `peer chaincode install -n ${CHAINCODE_NAME} -v 1.0 -l node -p /opt/gopath/src/github.com/chaincode/${CHAINCODE_NAME}/node/` *INSTANTIATE STEP* ``` peer chaincode instantiate -o orderer.${CONFIG_DOMAIN}:7050 --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -C $CHANNEL_NAME -n ${CHAINCODE_NAME} -l ${LANGUAGE} -v ${VERSION} -c '{"Args":["initLedger1"]}' -P "AND ('${CONFIG_ORG_1}MSP.peer','${CONFIG_ORG_2}MSP.peer')" >&log.txt ``` *SMART CONTRACT STRUCTURE* *Contract 1 file: lib/contract1.js* ``` class Contract1 extends Contract { ... async initLedger1(ctx) {..} async queryAll1(ctx) {..} ... } module.exports = Contract1; ``` *Contract 2 file: lib/newcontract1.js* ``` class Contract2 extends Contract { ... async initLedger2(ctx) {..} async queryAll2(ctx) {..} ... } module.exports = Contract2; ``` *Index file: index.js* ``` 'use strict'; const Contract1 = require('./lib/contract1'); const Contract2 = require('./lib/contract2'); module.exports.Contract1 = Contract1; module.exports.Contract2 = Contract2; module.exports.contracts = [ Contract2, Contract1 ]; ```

bestbeforetoday (Fri, 13 Mar 2020 09:20:13 GMT):
I would start by looking at the logs on the peer container to see what happened there. You should probably direct this question to the #fabric-chaincode-dev channel too

GuilhermeLionzo (Fri, 13 Mar 2020 20:40:56 GMT):
Thanks @bestbeforetoday , I'll do that my friend :)

GuilhermeLionzo (Fri, 13 Mar 2020 20:40:56 GMT):
Hi guys, When I invoke a smartcontract I received the following error: ``` 2020-03-20T17:37:20.059Z - warn: [Transaction]: _validatePeerResponses: Received error response from peer: message=14 UNAVAILABLE: failed to connect to all addresses, stack=Error: 14 UNAVAILABLE: failed to connect to all addresses at Object.exports.createStatusError (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:1209:28) at InterceptingListener._callNext (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:847:24), code=14, , flags=0, details=failed to connect to all addresses ``` Can anyone please help me with this issue?

BrajeshA (Sat, 14 Mar 2020 06:00:47 GMT):
@bestbeforetoday Mark , I was exploring contract events in latest fabric-network@2.0.0-snapshot.327 with contract.addContractlistne(listner, {blockType:'full"}). I do get callback but the event payload is empty? where should I specify option to get full event payload ?contract.addContractlistne(listner, {filtered:false}) does work in beta3.

hariomdebut (Sat, 14 Mar 2020 07:06:12 GMT):
Has joined the channel.

hariomdebut (Sat, 14 Mar 2020 07:06:28 GMT):
Hi, Is there any event for fetching all new blocks at SDK level. Whenever a new block is added. Right now i am using newChannelEventHub, due to which some blocks get skipped. Like block 1000 is received but 1001-1002 skipped than 1003 received. These skipped blocks don't have any useful information but they are creating issue while syncing blocks.

bestbeforetoday (Sat, 14 Mar 2020 14:19:40 GMT):
The high level event listening API has been completely rewritten in recent 2.0.0-snapshot builds. The behaviour should be much more friendly than before but the implementation is not yet complete. As of today only filtered blocks are supplied. I am hoping to get full blocks (and perhaps also full blocks with private data) into snapshot builds in the coming week

BrajeshA (Sat, 14 Mar 2020 20:26:03 GMT):
Thanks Mark. I was wondering why the default service manager doesnt use new eventservice with all options - didnt realize it is still not complete. 2.0 SDK is super easy to use. I was able to get "full" block event data with the new eventservice API. However, the blockType: "private " failed with event service. I guess things should work when you are done.

BrajeshA (Sat, 14 Mar 2020 20:26:03 GMT):
Thanks Mark. I was wondering why the default service manager doesn't use new eventservice with all options - didnt realize it is still in active development. 2.0 SDK is super easy to use. I was able to get "full" block event data with the new eventservice API. However, the blockType: "private " failed with event service. I guess things should work when you are done with development. Thanks

bestbeforetoday (Mon, 16 Mar 2020 13:51:12 GMT):
If you pick up the latest _unstable_ release of *fabric-network* (2.0.0-snapshot.328), you should find full blocks are supported and are the default. So attaching a contract event listener with default options should receive the event payload. You can still select filtered blocks in the listener options if required `{ type: 'filtered' }`

BrajeshA (Mon, 16 Mar 2020 16:19:12 GMT):
Awesome . Thanks Mark!

BrajeshA (Mon, 16 Mar 2020 16:24:05 GMT):
I am using blocklistner in Fabric-node-sdk 2.0. Couple of questins in blocklistner data: 1) How do I Identify which transactions in are valid or invalid? 2) will events be triggerd and added in block only of valid transactions ?

BrajeshA (Mon, 16 Mar 2020 16:28:59 GMT):
@bretharrison Please let me know if queryTransaction() and queryBlock() will be added back.

heatherp (Mon, 16 Mar 2020 17:43:11 GMT):
Hi everyone, I've just released *v2.0.0-beta.4*, which is our *2.0.0 release candidate*. If no breaking changes are found, we’re expecting to release v2.0.0 using this build. Major changes from v1.4: - The fabric-client package has been removed. Client applications should use the Fabric Programming Model APIs from the fabric-network package. The underlying APIs that interface with the gRPC layer have been reimplemented in the fabric-common package and should not be used directly by client applications. - Simplified wallet management, which is portable across SDK languages and with pluggable persistent storage, more information here: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html - New eventing implementation in fabric-network. Client application code can listen for block events using Network.addBlockListener(), and listen for contract events using Contract.addContractListener(). The Network object also provides capability to listen for transaction commit events, specifically to support the implementation of custom event handlers; more information here: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-transaction-commit-events.html This beta does not currently implement event checkpointing, which will be available in a later 2.0.x release We'd really appreciate people trying this out, testing it and using it in replacement of earlier 2.0.0-betas or snapshots, so we can be confident it's good for a 2.0.0 release. Thanks, let us know how you get on

heatherp (Mon, 16 Mar 2020 17:43:11 GMT):
Hi everyone, I've just released *v2.0.0-beta.4*, which is our *2.0.0 release candidate*. If no breaking changes are found, we’re expecting to release v2.0.0 using this build. Major changes from v1.4: - The fabric-client package has been removed. Client applications should use the Fabric Programming Model APIs from the fabric-network package. The underlying APIs that interface with the gRPC layer have been reimplemented in the fabric-common package and should not be used directly by client applications. - Simplified wallet management, which is portable across SDK languages and with pluggable persistent storage, more information here: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html - New eventing implementation in fabric-network. Client application code can listen for block events using Network.addBlockListener(), and listen for contract events using Contract.addContractListener(). The Network object also provides capability to listen for transaction commit events, specifically to support the implementation of custom event handlers; more information here: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-transaction-commit-events.html This beta does not currently implement event checkpointing, which will be available in a later 2.0.x release We'd really appreciate people trying this out, testing it and using it in replacement of earlier 2.0.0-betas or snapshots, so we can be confident it's good for a 2.0.0 release. Thanks, let us know how you get on

heatherp (Mon, 16 Mar 2020 17:43:11 GMT):
Hi everyone, I've just released *v2.0.0-beta.4*, which is our *2.0.0 release candidate*. If no breaking changes are found, we’re expecting to release v2.0.0 using this build. Major changes from v1.4: - The fabric-client package has been removed. Client applications should use the Fabric Programming Model APIs from the fabric-network package. The underlying APIs that interface with the gRPC layer have been reimplemented in the fabric-common package and should not be used directly by client applications. - Simplified wallet management, which is portable across SDK languages and with pluggable persistent storage, more information here: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html - New eventing implementation in fabric-network. Client application code can listen for block events using Network.addBlockListener(), and listen for contract events using Contract.addContractListener(). The Network object also provides capability to listen for transaction commit events, specifically to support the implementation of custom event handlers; more information here: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-transaction-commit-events.html This beta does not currently implement event checkpointing, which will be available in a later 2.0.x release *We'd really appreciate people trying this out, testing it and using it in replacement of earlier 2.0.0-betas or snapshots, so we can be confident it's good for a 2.0.0 release. Thanks, let us know how you get on*

HLFPOC (Mon, 16 Mar 2020 18:11:36 GMT):
Do we have any sample app available (apart from fabric-samples) which demonstrate network administration activities along with ledger operations using node sdk for fabric version 1.4 ?

HLFPOC (Mon, 16 Mar 2020 18:11:36 GMT):
@heatherp Do we have any sample app available (apart from fabric-samples) which demonstrate network administration activities along with ledger operations using node sdk for fabric version 1.4 ?

bestbeforetoday (Tue, 17 Mar 2020 09:42:14 GMT):
``` const validTransactionEvents = blockevent.getTransactionEvents().filter((transactionEvent) => transactionEvent.isValid); ``` For more details, see: https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.TransactionEvent.html

bestbeforetoday (Tue, 17 Mar 2020 09:44:29 GMT):
Blocks will contain all the transactions sent to peers by the orderer. Some may be invalid if the peer failed to commit them, for example because of an MVCC conflict

bestbeforetoday (Tue, 17 Mar 2020 09:45:48 GMT):
If you are attaching a contract event listener then you should only receive contract (chaincode) events from valid transactions

heatherp (Tue, 17 Mar 2020 09:59:19 GMT):
hey @HLFPOC can you define ledger operations?

randyshu (Tue, 17 Mar 2020 10:50:07 GMT):
hi,experts, Any ideas for Concurrency issues when using async or event-driven methods

HLFPOC (Tue, 17 Mar 2020 11:56:20 GMT):
invoke and query records

bestbeforetoday (Tue, 17 Mar 2020 13:31:30 GMT):
If you have identity information stores in a v1.4 file system wallet and want to either: - use this wallet directly with the v2.0 SDK; or - migrate the identities in the wallet to a new v2.0 format wallet you might find this npm package helpful: - https://www.npmjs.com/package/fabric-wallet-migration

nekia (Tue, 17 Mar 2020 14:32:22 GMT):
Hi, I have a question about SDK of v2.0.0. Is it still possible to do the same as queryChannels by using sdk of v2.0? https://hyperledger.github.io/fabric-sdk-node/release-1.4/Client.html#queryChannels__anchor

heatherp (Tue, 17 Mar 2020 16:25:14 GMT):
We've currently removed admin capabilities from the node-sdk, as it's not a network administration tool. Generally we advise using the cli to manage your network and invoke chaincode

heatherp (Tue, 17 Mar 2020 16:28:32 GMT):
Hi @nekia that api is not available in v2.0.0. The fabric-client package is still being published in the v1.4 branch but we recommend users use the fabric-network package to develop their applications.

HLFPOC (Tue, 17 Mar 2020 16:31:39 GMT):
thanks for the inputs

HLFPOC (Tue, 17 Mar 2020 16:32:45 GMT):
`manage your network and invoke chaincode` --> invoke or install chaincode? We can still use sdk for invoke/query operations..right ?

bestbeforetoday (Tue, 17 Mar 2020 16:52:06 GMT):
Are you able to get the information you need using a block listener? https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Network.html#addBlockListener

bestbeforetoday (Tue, 17 Mar 2020 16:53:42 GMT):
If you know which block(s) the transaction you want is in, you can navigate to transaction events easily from the block event: https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.BlockEvent.html#getTransactionEvents

bestbeforetoday (Tue, 17 Mar 2020 16:56:18 GMT):
If that doesn't satisfy your use-case, it would be really helpful to understand a bit more about what you're trying to achieve. You could add that information to the Jira you've raised: https://jira.hyperledger.org/browse/FABN-1509

heatherp (Tue, 17 Mar 2020 17:12:00 GMT):
Apologies, that's probably a poor choice of words. the fabric-network@2.0.x APIs allow users to submit smart contract transactions, just as is possible in v1.4.x. However we don't provide APIs in v2.0.x for network admin tasks, like installing/instantiating smart contracts

BrajeshA (Tue, 17 Mar 2020 18:01:43 GMT):
Thanks Mark. I have updated the JIRA ticket. I would like to get the transaction details based on transaction id (no blocknumber).

nekia (Tue, 17 Mar 2020 21:34:21 GMT):
How can I query channels that a peer is joining in v2.0?

heatherp (Wed, 18 Mar 2020 14:53:27 GMT):
You'll need to use the peer cli commands for those, such as: `peer channel list`

nekia (Thu, 19 Mar 2020 00:45:06 GMT):
OK. Thanks, I understood that the querying channels functionality has been obsoleted in SDK of v2.0.

BrajeshA (Thu, 19 Mar 2020 07:17:26 GMT):
@bestbeforetoday one more question. In addition to searching for transaction based on transactionId, can we get transaction timestamp/block timestamp as part of getTransactionevents() from BlockEvent. data is available as part of transaction - channel header.

bestbeforetoday (Thu, 19 Mar 2020 09:45:13 GMT):
Could you raise a Jira for that and let me know the number or link? If the information is in the event protobuf then I can expose it directly on the event object

mahoney1 (Thu, 19 Mar 2020 11:00:30 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:30 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

nekia (Thu, 19 Mar 2020 12:00:41 GMT):
https://jira.hyperledger.org/browse/FABN-1527

nekia (Thu, 19 Mar 2020 12:01:41 GMT):
I raised a request to add queryChannels support to SDK v2.0.0.

lepar (Thu, 19 Mar 2020 18:42:00 GMT):
Has joined the channel.

lepar (Thu, 19 Mar 2020 18:42:01 GMT):
Hey guys, has anyone been able to get the last config BLOCK of the orderer? The function getConfigFromOrderer() returns an envelope, not a block

lepar (Thu, 19 Mar 2020 18:42:55 GMT):
Using node sdk of course

BrajeshA (Thu, 19 Mar 2020 20:00:34 GMT):
jira issue https://jira.hyperledger.org/browse/FABN-1530

Rajatsharma (Thu, 19 Mar 2020 23:43:11 GMT):
I'm facing a weird issue, I have a running fabric network. I don't know what's happening but I'm getting MVCC in a transaction where there's only 1 transaction in a block. How is this even possible ?

bestbeforetoday (Fri, 20 Mar 2020 09:53:28 GMT):
I appreciate it's generally easier to grab information straight from properties on the event object so do raise issues where there are things that should really be there. Note that the protobuf is also accessible on the event (`BlockEvent.blockData`, `TransactionEvent.transactionData`) so, if you're feeling brave, you can always dig around in there to get whatever information you need

Luxii (Fri, 20 Mar 2020 16:54:03 GMT):
Hi, I am getting this error while creating channel : `response ::{"status":"FORBIDDEN","info":"Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied"}` Can anyone please lead me to some direction ? I have tried changing policy section of configtx.yaml But its still the same

heatherp (Fri, 20 Mar 2020 16:59:47 GMT):
Hi @nekia we don't have plans to add those client apis back into v2.0 of the node-sdk packages

BrajeshA (Fri, 20 Mar 2020 18:09:36 GMT):
That's where I am getting it from right now. Thanks another question - Shouldn't timestamp be at block header level, when transaction is commited and added to block

GuilhermeLionzo (Fri, 20 Mar 2020 20:05:53 GMT):
Hi guys, When I invoke a smartcontract I received the following error: ``` 2020-03-20T17:37:20.059Z - warn: [Transaction]: _validatePeerResponses: Received error response from peer: message=14 UNAVAILABLE: failed to connect to all addresses, stack=Error: 14 UNAVAILABLE: failed to connect to all addresses at Object.exports.createStatusError (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:1209:28) at InterceptingListener._callNext (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/home/guilherme/novaweb-hyperledger/novaweb-hyperledger/web-app/server/node_modules/grpc/src/client_interceptors.js:847:24), code=14, , flags=0, details=failed to connect to all addresses ``` Can anyone please help me with this issue?

lepar (Sat, 21 Mar 2020 01:44:11 GMT):
@GuilhermeLionzo check your profile settings in the yaml or json connection-profile

SanthoshThomas (Sun, 22 Mar 2020 04:52:52 GMT):
Has joined the channel.

phantom.assasin (Sun, 22 Mar 2020 17:46:36 GMT):
Is channel.sendUpgradeProposal deprecated? If yes, how do we update the chaincode?

nekia (Mon, 23 Mar 2020 00:18:51 GMT):
OK, we'll consider work around for these functionalities. Let me leave these JIRA as a feature request.

heatherp (Mon, 23 Mar 2020 12:13:11 GMT):
Hi @phantom.assasin we've removed admin capabilities in the 2.0.0 stream, please use peer cli commands as an alternative

Ishee (Tue, 24 Mar 2020 07:30:37 GMT):
Hi all, I have use a docker to run a hyperledger fabric. But sometime docker container stop automatically on server. is it any solution for this issue ?

aberwag (Tue, 24 Mar 2020 08:08:20 GMT):
Has joined the channel.

knagware9 (Tue, 24 Mar 2020 10:26:08 GMT):
you need to run multiple docker container for fault tolerant system for example you can use docker swarm or kubernetes and use replica option to run multiple replica of the container

Ishee (Tue, 24 Mar 2020 10:33:59 GMT):
Okay thnaks! will try this

Taaanos (Tue, 24 Mar 2020 13:40:34 GMT):
Has joined the channel.

Taaanos (Tue, 24 Mar 2020 13:40:40 GMT):
Hi all

Taaanos (Tue, 24 Mar 2020 13:40:50 GMT):
Can I use the node-sdk with go contracts?

heatherp (Tue, 24 Mar 2020 15:32:58 GMT):
An application written using the node-sdk shouldn't mind which language the smart contract it's interacting with, is written in. So, yes :)

Taaanos (Tue, 24 Mar 2020 15:37:06 GMT):
great, thank you :)

garyclark (Tue, 24 Mar 2020 17:58:52 GMT):
Has joined the channel.

garyclark (Tue, 24 Mar 2020 18:01:30 GMT):

Clipboard - March 24, 2020 1:01 PM

garyclark (Tue, 24 Mar 2020 18:01:41 GMT):
To avoid confusion for developers in fabric-sdk-node. Can we correct versions throughout to avoid confusion.

AbhijeetSamanta (Wed, 25 Mar 2020 10:06:55 GMT):
I have query regarding the event service of hyperledger fabric. I checked the hyperledger sdk however I get confused with it, could you please help me to understand queries which I have if possible like I want to event service let say if transaction happend in channel then other org will get notification with it who ever subscribe it.

heatherp (Wed, 25 Mar 2020 10:48:07 GMT):
Hi @garyclark where is this screenshot from?

RamanM (Wed, 25 Mar 2020 12:21:59 GMT):
hello, everybody! I have one question about architecture. In my app sometimes I create new channel with node-sdk 1.4. During this process I should create config_proto with help of fabric configtxlator tool. I have json template and use url "http://configtxlator:7059/protolator/encode/common.Config". Therefore I must keep configtxlator container in my network for this operation. I want to remove it. Has anybody tried some lib for converting json to proto like configtxlator.js(https://www.npmjs.com/package/configtxlator.js)? Is this safe to use it in production? Maybe is there official package from hyperledger? Google did not help me

AbhijeetSamanta (Wed, 25 Mar 2020 13:44:44 GMT):
I am using the node-sdk 1.4 only do you have any idea how to implement the event service

bestbeforetoday (Thu, 26 Mar 2020 09:36:51 GMT):
If you are looking to trigger application or business processes when transactions are committed, you should probably be looking at chaincode/contract events. In your smart contract transaction function, you can can emit an event. This event gets sent out only when the transaction is committed to a block. Client applications can listen for these contract events by registering a contract event listener: - Release 1.4: https://hyperledger.github.io/fabric-sdk-node/release-1.4/module-fabric-network.Contract.html#addContractListener - Release 2.0: https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Contract.html#addContractListener

weiyih (Thu, 26 Mar 2020 18:23:39 GMT):
Has joined the channel.

BrajeshA (Thu, 26 Mar 2020 19:07:25 GMT):
@heatherp I understand there is no plan to support channel.queryTransaction() in 2.0. can you suggest workaround to get transaction details with just transactionId (no blocknumber)?

icarrascol (Fri, 27 Mar 2020 20:39:37 GMT):
Has joined the channel.

icarrascol (Fri, 27 Mar 2020 20:39:38 GMT):
hello everyone, i have a question about invoking the chaincode in v2, for the method contrac.submitTransacion it accepts a repeteable string argument for chaincode arguments, why was it changed to this?, considering that the old way to invoke used an array of strings as arguments that is easier to pass to the method

icarrascol (Fri, 27 Mar 2020 20:39:38 GMT):
hello everyone, i have a question about invoking the chaincode in v2, for the method contrac.submitTransacion it accepts a repeteable string argument for chaincode arguments, why was it changed to this?, considering that the old way to invoke used an array of strings as arguments that is easier to pass to the method, can i still pass a array of strings?

icarrascol (Fri, 27 Mar 2020 22:55:13 GMT):
hello everyone, if i register an admin through ca cli, how can i access it from the sdk to register users?

icarrascol (Fri, 27 Mar 2020 22:55:13 GMT):
hello everyone, if i register an admin through ca cli, how can i access it from the sdk (v2.0) to register users?

ThomasRalee (Sun, 29 Mar 2020 04:30:45 GMT):
Has joined the channel.

ThomasRalee (Sun, 29 Mar 2020 04:30:45 GMT):
Hi am i right to suppose that the fabric-samples javascript implementation are out of date? For example: ``` console.log('Use network channel: mychannel.'); const network = await gateway.getNetwork('mychannel'); // Get addressability to commercial paper contract console.log('Use org.papernet.commercialpaper smart contract.'); const contract = await network.getContract('papercontract'); ``` The above wont work with node-sdk 2.0

qubing (Mon, 30 Mar 2020 08:33:10 GMT):
Hi Guys. For fabric 2.0 network, which version of SDK to access? I tried my old app program written with 1.4.4, got some errors. It works well on fabric 1.4.4 network.

davidkel (Mon, 30 Mar 2020 09:22:56 GMT):
What problems did you have using fabric-sdk-node 1.4 with a fabric 2.0 network ? Apart from the 1.4 node-sdk not supporting the new chaincode lifecycle for a 2.0 it should work and is supported

heatherp (Mon, 30 Mar 2020 11:28:38 GMT):
Hey @ThomasRalee yep it seems you're right. Hopefully I can address those soon

qubing (Mon, 30 Mar 2020 12:36:58 GMT):
Thanks for your answer. I tried to query data from a peer and got the error as below.

qubing (Mon, 30 Mar 2020 12:37:02 GMT):
2020-03-30T12:35:28.888Z - error: [Channel.js]: Channel:mychannel received discovery error:access denied 2020-03-30T12:35:28.889Z - error: [Channel.js]: Error: Channel:mychannel Discovery error:access denied 2020-03-30T12:35:28.890Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Channel:mychannel Discovery error:access denied Failed to query data: Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Channel:mychannel Discovery error:access denied

icarrascol (Mon, 30 Mar 2020 12:52:07 GMT):
ive used sdk v1.4.4 with my network in v2 and i had no problems with it

icarrascol (Mon, 30 Mar 2020 13:55:59 GMT):
is there a way to set cryptokeystore and statestore in sdk v2.0?

davidkel (Tue, 31 Mar 2020 07:34:37 GMT):
That looks like an identity error, did you check the logs of the peer that the sdk is trying to discover from ?

BrajeshA (Tue, 31 Mar 2020 23:23:15 GMT):
@heatherp @bestbeforetoday any suggestion?

bestbeforetoday (Wed, 01 Apr 2020 08:26:00 GMT):
I can’t think of an obvious workaround if your client needs to grab the details of a specific transaction ID without knowing the containing block number. It might be that would be useful function to include in the v2 SDK but it would be very helpful to understand the scenario that is driving this requirement. Jira is the best place to record that

BrajeshA (Thu, 02 Apr 2020 08:52:25 GMT):
Mark, I did add jira issue for this as well. https://jira.hyperledger.org/browse/FABN-1530 . I have couple use cases where I need to transaction details without blocknumber . e.g 1) to get the details of which all transactions (with details) changed key history, I can the txid from from chaincode key history but no block number.

BrajeshA (Thu, 02 Apr 2020 08:58:26 GMT):
scenario 2 - in few cases a client may submit transaction without waiting for commit confirmation or does not get the confirmation because of network or system issues. he just has the transaction id that was submitted we need some way of checking the historical transactions.

BrajeshA (Thu, 02 Apr 2020 09:00:31 GMT):
I am trying to get the transactiondetails by querying system chaincode "qscc" but BlockDecoder.decodeTransaction doent fully decodes the tx data, will appreciate any help..

BrajeshA (Thu, 02 Apr 2020 09:00:31 GMT):
I am trying to get the transaction details by querying system chaincode "qscc" but BlockDecoder.decodeTransaction doesn't fully decodes the tx data, will appreciate any help..

bestbeforetoday (Thu, 02 Apr 2020 09:39:21 GMT):
It looks like your issue requesting queryTransaction is https://jira.hyperledger.org/browse/FABN-1509. It might be worth adding the scenario information above and reopening as a request just for queryTransaction since it sounds like a block listener can give you what you need for a block. See what @heatherp and @bretharrison think

ThomasRalee (Thu, 02 Apr 2020 10:07:30 GMT):
Hi! I've tried experimenting around with contract class discoveryService on the latest sdk. ``` const network = await gateway.getNetwork('channel'); const contract = await network.getContract('mycc'); ``` when i try to execute the follow methods base on the [docs](https://hyperledger.github.io/fabric-sdk-node/master/tutorial-discovery-fabric-network.html) i get the following errors: ``` contract.resetDiscoveryInterests(); TypeError: contract.resetDiscoveryInterests is not a function contract.addDiscoveryInterest({ name: 'badchaincode' }); TypeError: contract.addDiscoveryInterest is not a function ``` I am trying to retrieve the list of methods available on the chaincode installed via the new peer lifecycle chaincode flow... If you can point me to how to go about doing it, it'll be awesome.

ThomasRalee (Thu, 02 Apr 2020 10:07:30 GMT):
Hi! I've tried experimenting around with contract class discoveryService on the latest sdk. ``` const network = await gateway.getNetwork('channel'); const contract = await network.getContract('mycc'); ``` when i try to execute the follow methods base on the [docs](https://hyperledger.github.io/fabric-sdk-node/master/tutorial-discovery-fabric-network.html) i get the following errors: ``` contract.resetDiscoveryInterests(); TypeError: contract.resetDiscoveryInterests is not a function contract.addDiscoveryInterest({ name: 'badchaincode' }); TypeError: contract.addDiscoveryInterest is not a function ``` I am trying to retrieve the list of methods available on the chaincode installed via the new [peer lifecycle chaincode](https://hyperledger-fabric.readthedocs.io/en/latest/commands/peerlifecycle.html#peer-lifecycle-chaincode) flow... If you can point me to how to go about doing it, it'll be awesome.

heatherp (Thu, 02 Apr 2020 10:23:07 GMT):
Hey @ThomasRalee what versions are you using? I can see typescript definitions in both release-1.4 and master for addDiscoveryInterest, although there appears to be a missing resetDiscoveryInterests in the release-1.4 branch. These changes went in very recently, so you'd be needing to use snapshots until we next release

ThomasRalee (Thu, 02 Apr 2020 10:24:03 GMT):
i am using `fabric-network: ^2.0.0-beta.4`

heatherp (Thu, 02 Apr 2020 10:25:36 GMT):
Yeah ok, try the latest snapshot of the 2.0.0 (master) branch and let me know if that doesn't work because it looks like the discovery interest work went in after that beta release

ThomasRalee (Thu, 02 Apr 2020 10:26:06 GMT):
ok let me try, on the side note, is is possible to retrieve list of chaincode methods via the sdk?

heatherp (Thu, 02 Apr 2020 10:26:42 GMT):
by methods, do you mean transaction defined in the smart contract/

heatherp (Thu, 02 Apr 2020 10:26:42 GMT):
by methods, do you mean transaction defined in the smart contract?

ThomasRalee (Thu, 02 Apr 2020 10:27:11 GMT):
list of functions created on the Contract

ThomasRalee (Thu, 02 Apr 2020 10:29:33 GMT):

Clipboard - April 2, 2020 6:29 PM

ThomasRalee (Thu, 02 Apr 2020 10:29:46 GMT):
For example get the 3 functions on the chaincode

ThomasRalee (Thu, 02 Apr 2020 10:29:46 GMT):
For example get the 3 functions from the contract

heatherp (Thu, 02 Apr 2020 11:00:32 GMT):
Wouldn't that mean exposing `channel` ?

bestbeforetoday (Thu, 02 Apr 2020 11:05:33 GMT):
It already is exposed to some extent (although I kinda wish it wasn't) to allow peers (endorsers) for the channel to be looked up if writing custom commit event handlers or query handlers

bestbeforetoday (Thu, 02 Apr 2020 11:07:03 GMT):
This kind of thing could be exposed on Network rather than Channel though, if it seems like something that a typical application developer might reasonably want to use

mahoney1 (Thu, 02 Apr 2020 11:11:17 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:17 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

heatherp (Thu, 02 Apr 2020 12:56:17 GMT):
Sorry @ThomasRalee on second thought I can't see what wouldn't work about the above with our latest 2.0.0 code, what issue are you using? Commercial paper application in fabric-samples is working as we'd expect: https://github.com/hyperledger/fabric-samples/blob/master/commercial-paper/organization/magnetocorp/application/issue.js

ThomasRalee (Thu, 02 Apr 2020 12:58:07 GMT):

Clipboard - April 2, 2020 8:58 PM

ThomasRalee (Thu, 02 Apr 2020 12:58:44 GMT):
Hi @heatherp, sorry i've read the docs, and i had the impression that we need to provide the packageId to have this work. My bad, the codes sample works fine!

ThomasRalee (Thu, 02 Apr 2020 12:59:51 GMT):
@heatherp would be awesome, if you let me know if this is doable through the sdk, haven have much luck figuring this out so far...

BrajeshA (Thu, 02 Apr 2020 23:13:32 GMT):
oops! sorry about wrong issue number. I have added these scenarios in https://jira.hyperledger.org/browse/FABN-1509. Yes, block listener can give all the information for ordered transaction. however I may not have block number because 1) client missed and did not get tx commit event 2) if transaction endorsement failed.

BrajeshA (Thu, 02 Apr 2020 23:18:21 GMT):
@bestbeforetoday one question is BlockDecoder.decodeTransaction() not updated for fabric 2.0? it does not fully decode data from "GetTransactionByID" function of "qscc" chaincode .

Amalendu_Palakkatil (Fri, 03 Apr 2020 05:56:37 GMT):
Has joined the channel.

Amalendu_Palakkatil (Fri, 03 Apr 2020 05:59:54 GMT):
Hi..I've tried implementing the private data in branch version 1.4,but I'm not able to find a chaincode written in node ,could you please help me wit the chaincode in node for private data??

mbwhite (Fri, 03 Apr 2020 13:59:08 GMT):
Hi @ThomasRalee ; there is a way of getting metadata about the contracts that have been deployed. (so long as they are using the Contract API)... If you evaluate the transaction `org.hyperledger.fabric:GetMetadata` you'll get back a JSON structure that defines all the functions in the contracts and the types.

mbwhite (Fri, 03 Apr 2020 13:59:30 GMT):
This is used by the VSCode extension for example to get lists of the contracts

Taaanos (Fri, 03 Apr 2020 17:02:40 GMT):
I have a question related to query the world state. In the `fabcar` a `query` function is implemented in the chaincode and it is invocable from the `peer` cli. In `commercial-paper` there is no `query` implemented, in this occasion can I use the `fabric-sdk-node` to query the world state or I need to have a query function implemented in the chaincode?

Taaanos (Fri, 03 Apr 2020 17:02:40 GMT):
I have a question related to querying the world state. In the `fabcar` a `query` function is implemented in the chaincode and it is invocable from the `peer` cli. In `commercial-paper` there is no `query` implemented, in this occasion can I use the `fabric-sdk-node` to query the world state or I need to have a query function implemented in the chaincode?

pritam_01 (Sat, 04 Apr 2020 07:08:33 GMT):
you need to have a query function implemented in the chaincode. fabriic architecture Blockchian at the bottom >> then the Chaincode it interact with blockchain >> fabric-sdk

Manish209 (Sat, 04 Apr 2020 09:19:50 GMT):
Is Node.js API sample available or released for fabric 2.0 ?

pritam_01 (Sat, 04 Apr 2020 09:38:19 GMT):
yes, checkout fabcar

Manish209 (Sat, 04 Apr 2020 09:39:18 GMT):
can you share the link?

pritam_01 (Sat, 04 Apr 2020 09:40:19 GMT):
https://github.com/hyperledger/fabric-samples/tree/master/fabcar/javascript

Manish209 (Sat, 04 Apr 2020 10:08:12 GMT):
okay, thank you

Manish209 (Sat, 04 Apr 2020 10:09:17 GMT):
& any released Node.js API to create channel fabric 2.0 ?

Manish209 (Sat, 04 Apr 2020 10:11:54 GMT):
balance transfer Node.js API will work in fabric 2.0?

pritam_01 (Sat, 04 Apr 2020 10:12:01 GMT):
fabric-client npm is DEPRECATED , so currently there no such SDK to do admin operations (like creating channel)

Manish209 (Sat, 04 Apr 2020 10:13:22 GMT):
yes, i read it deprecated, thanks

Manish209 (Sat, 04 Apr 2020 10:14:16 GMT):
possibility to be released for fabric 2.0?

Taaanos (Sat, 04 Apr 2020 10:29:41 GMT):
Thought so, thank you!

TzortzisPanagiotis (Sat, 04 Apr 2020 13:44:41 GMT):
Has joined the channel.

TzortzisPanagiotis (Sat, 04 Apr 2020 13:44:43 GMT):
hello! I have a quick question. I use fabric v 1.4.4 so I have to use node sdk fabric 1.4.4? Or can I use newer sdk versions?

davidkel (Sat, 04 Apr 2020 17:08:30 GMT):
You can use the 1.4.8 version (which is the latest version at the moment) of the node-sdk with fabric 1.4.4

garyclark (Sat, 04 Apr 2020 18:45:28 GMT):
When enabling TLS. On the orderer and a single peer what are the must have environment variables needed for fabric 1.4.4 for both a peer and an orderer.

garyclark (Sat, 04 Apr 2020 18:45:51 GMT):
Sorry just down another rabbit hole on this.

ThomasRalee (Sun, 05 Apr 2020 17:49:24 GMT):
Thanks @mbwhite and @heatherp it works! here's the code sample, for anyone looking into the same thing: ``` contract.evaluateTransaction('org.hyperledger.fabric:GetMetadata'); ```

lavish 1 (Tue, 07 Apr 2020 07:00:59 GMT):
hello guys, can you help me with query a ledger ? i know how to query world state in fabric usering couchdb, but what if i want the history of an item from the ledger, then how can i achieve that, i know some functions for query a ledger with transaction id or blocknumber , but how can i complex query in ledger , like we do in couchdb ?

benjamin.verhaegen (Tue, 07 Apr 2020 07:47:24 GMT):
Hii Guys, I'm trying to implement Hashicorp Vault to store my certificates. I'm having a hard time configuring the gateway to get my channel and chaincode. Does anybody know how to setup the wallet to connect to the gateway?

woodyjon (Tue, 07 Apr 2020 08:15:17 GMT):
Has joined the channel.

woodyjon (Tue, 07 Apr 2020 08:15:18 GMT):
so if we want to do admin (like install chaincode) on a fabric 2.0 network, we cannot do it with the node sdk? Or can we do it, but with the common package? Is there some doc or tutorial on how to do this? And if we cannot use the sdk, is the only solution to use the peer cli?

HLFPOC (Tue, 07 Apr 2020 13:31:36 GMT):
How to update anchor peers in the channel using node sdk ? Network is currently running on fabric version 1.4.4 and sdk version is also 1.4.4

Diegoescalonaro (Tue, 07 Apr 2020 16:17:20 GMT):
Has joined the channel.

Diegoescalonaro (Tue, 07 Apr 2020 16:17:21 GMT):
Hi guys, any idea of why I'm always getting UNDEFINED event payload when calling the function "registerChaincodeEvent"? I can see the event name, txid, status and related info, but no way to see the "event.payload". Thanks!

Diegoescalonaro (Tue, 07 Apr 2020 16:17:21 GMT):
Hi guys, any idea of why I'm always getting an UNDEFINED event payload when calling the function "registerChaincodeEvent"? I can see the event name, txid, status and related info, but no way to see the "event.payload". Thanks!

Diegoescalonaro (Tue, 07 Apr 2020 16:17:21 GMT):
Hi guys, any idea of why I'm always getting an UNDEFINED event payload when calling the function "registerChaincodeEvent"? I can see the event name, txid, status and related info, but no way to get the "event.payload". Thanks!

Diegoescalonaro (Wed, 08 Apr 2020 07:14:05 GMT):
Hi again, you have to "connect" before call the function "registerChaincodeEvent" in order to see the full event with the payload.

benjamin.verhaegen (Wed, 08 Apr 2020 10:09:18 GMT):
Hello, what is the new function in v2.0 for initCredentialStores()?

HLFPOC (Wed, 08 Apr 2020 11:17:04 GMT):
I an getting below exception while submitting a transaction from node sdk. Error: `Failed to submit transaction: Error: No event hubs for strategy` . Any idea about this @heatherp @bestbeforetoday ? Currently using version 1.4.4

heatherp (Wed, 08 Apr 2020 11:25:02 GMT):
Hey @HLFPOC what version of fabric are you using? I wouldn't know how to solve this at first glance, but can I recommend that you upgrade your fabric-network version to 1.4.8? That's the latest for the 1.4 stream

HLFPOC (Wed, 08 Apr 2020 11:25:36 GMT):
I am currently using v1.4.4

heatherp (Wed, 08 Apr 2020 11:26:59 GMT):
Yep ok, it might be worth upgrading to fabric v1.4.6 and fabric-network v1.4.8, to ensure you're not running into an existing issue

HLFPOC (Wed, 08 Apr 2020 11:28:02 GMT):
ok, will upgrade the network and sdk

bestbeforetoday (Wed, 08 Apr 2020 13:43:54 GMT):
That error typically means that there are no peers in your organisation. If that is the case, you will need to specify a different event handler strategy in the options passed to the Gateway.connect() call

bestbeforetoday (Wed, 08 Apr 2020 13:44:29 GMT):
The default commit handler waits for commit events from peers in your organization

HLFPOC (Wed, 08 Apr 2020 16:24:58 GMT):
but I have already defined 2 peers for the organization on which I was trying to submit a transaction, and have also updated anchor peer of that org in the channel

carlosalca (Thu, 09 Apr 2020 12:08:08 GMT):
Hi everybody! Anyone knows how to save a set of contracts into a hashtable or something like that ?

Taaanos (Thu, 09 Apr 2020 14:34:30 GMT):
I have a 2.0 network and I want to create an off-chain database. I want to use the events from `fabric-client` but I cannot see it in the sdk 2.x, can I use the `fabric-client 1.4.x` in a `2.0` network?

Nammalvar (Thu, 09 Apr 2020 16:35:06 GMT):
Has joined the channel.

Koushik (Thu, 09 Apr 2020 19:27:52 GMT):
Has joined the channel.

Koushik (Thu, 09 Apr 2020 19:27:53 GMT):
Hi all, Quick Question. I have a question regarding GRPC error when invoking a specific chaincode that queries the database (been debugging more than 2 days), one of our partners (Org2) is receiving this error, however, we (Org1) are not when triggering the same chaincode *Error* ```shell An error occurred on the chaincode stream. Shutting down the chaincode stream.io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: io.grpc.netty.NettyClientTransport$3: Frame size 4306126 exceeds maximum: 4194304 ``` *The setup is this * Chaincode is written in JAVA. We are using Node.js Fabric SDK as the middle layer to connect to the Fabric Network I looked into the error more deeply and noticed this JIRA ticket, https://jira.hyperledger.org/browse/FABCJ-187 . The solution I found out in the JIRA ticket was to override the chain code base class in the java SDK, but is there an another method instead of touching the java SDK, such as an environment variable I can configure the in the docker-compose.yamyl file or configuring GRPC configurations in the Node.js SDK?

Koushik (Thu, 09 Apr 2020 19:29:24 GMT):
any guidance would be much appreciated?

Ishee (Fri, 10 Apr 2020 08:04:13 GMT):
I'm using an IBM-Blockchain platform VS code extension for one of my POC development. I want pagination on the Query function in fabric. But How can I Jump direct on 6th page to 4th page? How canI get pervious page bookmark on chaincode result? So I can manage previous page on front-end side ?

Ishee (Fri, 10 Apr 2020 08:04:13 GMT):
Hello All, I'm using an IBM-Blockchain platform VS code extension for one of my POC development. I want pagination on the Query function in fabric. But How can I Jump direct on 6th page to 4th page? How canI get pervious page bookmark on chaincode result? So I can manage previous page on front-end side ?

Ishee (Fri, 10 Apr 2020 08:04:13 GMT):
Hello All, I'm using an IBM-Blockchain platform VS code extension for one of my POC development. I want pagination on the Query function in fabric. But How can I Jump direct on 6th page to 4th page? How canI get pervious page bookmark on chaincode result? So I can manage previous page on front-end side ? Right now I'm using getQueryResultWithPagination method.

nitishbhardwaj19 (Fri, 10 Apr 2020 14:12:26 GMT):
Is there a way to generate Genesis block using fabric-node-sdk or some other API on the fly? I need it to bootstrap orderer on demand and can't use yaml for that as I don't have any static server where I can execute cryptogen

DeepakMule (Sat, 11 Apr 2020 08:54:52 GMT):
Has joined the channel.

DeepakMule (Sat, 11 Apr 2020 08:56:31 GMT):
i have HLF2.0 network with RAFT and 2 ORG network, when I tried to execute fabric node sdk example fabcar, while invoking I am getting error

DeepakMule (Sat, 11 Apr 2020 08:56:31 GMT):
i have HLF2.0 network with RAFT and 2 ORG network, when I tried to execute fabric node sdk example fabcar, while invoking I am getting error ubuntu@ip-172-43-2-94:~/myorg/hyperledger/fabcar$ node invoke Wallet path: /home/ubuntu/myorg/hyperledger/fabcar/wallet E0411 08:46:46.099566659 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:47.099877442 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:48.526446372 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:49.098Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer1.org2.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:49.099Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer1.org2.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:49.100Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer1.org2.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer1.org2.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:49.102905487 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:50.103074700 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:50.599945349 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:51.747086264 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:52.101Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2.org2.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:52.102Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer2.org2.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:52.102Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer2.org2.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer2.org2.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:53.950215283 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:55.108Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2.org1.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:55.108Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer2.org1.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:55.108Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer2.org1.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer2.org1.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:55.123264121 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:55.153336388 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:56.123770660 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:57.655627218 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:57.954885507 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.

DeepakMule (Sat, 11 Apr 2020 08:56:31 GMT):
i have HLF2.0 network with RAFT and 2 ORG network, when I tried to execute fabric node sdk example fabcar, while invoking I am getting error following error ubuntu@ip-172-43-2-94:~/myorg/hyperledger/fabcar$ node invoke Wallet path: /home/ubuntu/myorg/hyperledger/fabcar/wallet E0411 08:46:46.099566659 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:47.099877442 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:48.526446372 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:49.098Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer1.org2.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:49.099Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer1.org2.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:49.100Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer1.org2.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer1.org2.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:49.102905487 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:50.103074700 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:50.599945349 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:51.747086264 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:52.101Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2.org2.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:52.102Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer2.org2.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:52.102Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer2.org2.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer2.org2.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:53.950215283 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:55.108Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2.org1.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:55.108Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer2.org1.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:55.108Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer2.org1.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer2.org1.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:55.123264121 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:55.153336388 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:56.123770660 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:57.655627218 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:57.954885507 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.

DeepakMule (Sat, 11 Apr 2020 08:56:31 GMT):
i have HLF2.0 network with RAFT and 2 ORG network, when I tried to execute fabric node sdk example fabcar, while invoking I am getting error following error Same network works perfectly with CLI ubuntu@ip-172-43-2-94:~/myorg/hyperledger/fabcar$ node invoke Wallet path: /home/ubuntu/myorg/hyperledger/fabcar/wallet E0411 08:46:46.099566659 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:47.099877442 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:48.526446372 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:49.098Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer1.org2.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:49.099Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer1.org2.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:49.100Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer1.org2.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer1.org2.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:49.102905487 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:50.103074700 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:50.599945349 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:51.747086264 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:52.101Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2.org2.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:52.102Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer2.org2.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:52.102Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer2.org2.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer2.org2.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:53.950215283 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-11T08:46:55.108Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2.org1.myorg.com:7051, url:grpcs://localhost:7051 2020-04-11T08:46:55.108Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer2.org1.myorg.com:7051 url:grpcs://localhost:7051 timeout:3000 2020-04-11T08:46:55.108Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer2.org1.myorg.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer2.org1.myorg.com:7051, url:grpcs://localhost:7051 E0411 08:46:55.123264121 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:55.153336388 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:56.123770660 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:57.655627218 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. E0411 08:46:57.954885507 11610 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.

AbhijeetSamanta (Sat, 11 Apr 2020 16:00:31 GMT):
I need one help as I have confusion in one condition let's user register and enroll to the network and it's secret which is generate at time of registration saved in mongodb but somehow it's wallet got deleted so we need to register the user again or we can get wallet again just enroll user again with same secret?

Paradox-AT (Sun, 12 Apr 2020 08:09:39 GMT):

load-test.png

Paradox-AT (Sun, 12 Apr 2020 08:09:39 GMT):

load-test.png

Paradox-AT (Sun, 12 Apr 2020 08:09:39 GMT):

load-test.png

garyclark (Sun, 12 Apr 2020 21:43:40 GMT):
Hello attempting to run a query.js on using the fabcar.js. I can enroll the admin.js and register the user. All good and seen on the ca_server. However when I try to query I see the following: Wallet path: /home/gclark/HeliosTLSSolo/HeliosApps/heliosdso/wallet 2020-04-12T21:42:00.603Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.heliosedge.heliosdso.com:7051 2020-04-12T21:42:00.604Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.heliosedge.heliosdso.com:7051 2020-04-12T21:42:00.604Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://peer0.heliosedge.heliosdso.com:7051 Failed to evaluate transaction: Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://peer0.heliosedge.heliosdso.com:7051

garyclark (Sun, 12 Apr 2020 21:44:02 GMT):
Can someone offer some insight into this?

aneb (Mon, 13 Apr 2020 06:30:19 GMT):
Has joined the channel.

Paradox-AT (Mon, 13 Apr 2020 10:21:53 GMT):
check the certificates, I think you have a tls error

garyclark (Mon, 13 Apr 2020 14:02:48 GMT):
Ok thanks Paradox. I will have a wee look.

HLFPOC (Mon, 13 Apr 2020 17:56:24 GMT):
i Team, Facing a strange issue with my network. I have deployed 5 org network on a server using fabric version 1.4.6 I have used Node.JS based application to interact with the network (refereed fabcar sample). It is using fabric-node-sdk version 1.4.8. Now the issue is, whenever I run the Node.JS app from the same server on which network is also deployed, everything (invoke/query) works fine. Whenever I run this Node.JS app somewhere else, and mention the peer/orderer URLs with the IP address of the network server, and perform invoke operation, it throws below error which I am not able to debug: Error: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: 14 UNAVAILABLE: failed to connect to all addresses Also got below error for a invoke operation for a different channel on the same network: `message: 'No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}', stack: 'Error: No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}` Not sure what can be the issue here. I have refereed my network connection profile from first-network sample. @heatherp @bestbeforetoday

HLFPOC (Mon, 13 Apr 2020 17:56:24 GMT):
Hi Team, Facing a strange issue with my network. I have deployed 5 org network on a server using fabric version 1.4.6 I have used Node.JS based application to interact with the network (refereed `fabcar` sample). It is using `fabric-node-sdk` version 1.4.8. Now the issue is, whenever I run the Node.JS app from the same server on which network is also deployed, everything (invoke/query) works fine. Whenever I run this Node.JS app somewhere else, and mention the peer/orderer URLs with the IP address of the network server, and perform invoke operation, it throws below error which I am not able to debug: `Error: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: 14 UNAVAILABLE: failed to connect to all addresses ` Also got below error for a invoke operation for a different channel on the same network: `message: 'No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}', stack: 'Error: No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}` Not sure what can be the issue here. I have refereed my network connection profile from `first-network` sample. @heatherp @bestbeforetoday

HLFPOC (Mon, 13 Apr 2020 17:56:24 GMT):
Hi Team, Facing a strange issue with my network. I have deployed 5 org network on a server using fabric version 1.4.6 I have used Node.JS based application to interact with the network (refereed `fabcar` sample). It is using `fabric-node-sdk` version 1.4.8. Now the issue is, whenever I run the Node.JS app from the same server on which network is also deployed, everything (invoke/query) works fine. Whenever I run this Node.JS app somewhere else, and mention the peer/orderer URLs with the IP address of the network server, and perform invoke operation, it throws below error which I am not able to debug: `Error: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: 14 UNAVAILABLE: failed to connect to all addresses ` Also got below error for a invoke operation for a different channel on the same network: `message: 'No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}',` `stack: 'Error: No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}` Not sure what can be the issue here. I have refereed my network connection profile from `first-network` sample. @heatherp @bestbeforetoday

HLFPOC (Mon, 13 Apr 2020 17:56:24 GMT):
Hi Team, Facing a strange issue with my network. I have deployed 5 org network on a server using fabric version 1.4.6 I have used Node.JS based application to interact with the network (referred `fabcar` sample). It is using `fabric-node-sdk` version 1.4.8. Now the issue is, whenever I run the Node.JS app from the same server on which network is also deployed, everything (invoke/query) works fine. Whenever I run this Node.JS app somewhere else, and mention the peer/orderer URLs with the IP address of the network server, and perform invoke operation, it throws below error which I am not able to debug: `Error: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: 14 UNAVAILABLE: failed to connect to all addresses ` Also got below error for a invoke operation for a different channel on the same network: `message: 'No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}',` `stack: 'Error: No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}` Not sure what can be the issue here. I have referred my network connection profile from `first-network` sample. @heatherp @bestbeforetoday

HLFPOC (Mon, 13 Apr 2020 17:56:24 GMT):
Hi Team, Facing a strange issue with my network. I have deployed 5 org network on a server using fabric version 1.4.6 I have used Node.JS based application to interact with the network (referred `fabcar` sample). It is using `fabric-node-sdk` version 1.4.8. Now the issue is, whenever I run the Node.JS app from the same server on which network is also deployed, everything (invoke/query) works fine. Whenever I run this Node.JS app somewhere else, and mention the peer/orderer URLs with the IP address of the network server in the connection profile, and perform invoke operation, it throws below error which I am not able to debug: `Error: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: 14 UNAVAILABLE: failed to connect to all addresses ` Also got below error for a invoke operation for a different channel on the same network: `message: 'No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}',` `stack: 'Error: No endorsement plan available for {"chaincodes":[{"name":"chaincode_name"}]}` Not sure what can be the issue here. I have referred my network connection profile from `first-network` sample. @heatherp @bestbeforetoday

garyclark (Mon, 13 Apr 2020 21:21:04 GMT):
OK I got it working. I had some mappings wrong. Usual crap.

HLFPOC (Tue, 14 Apr 2020 16:47:29 GMT):
Can anyone please assist? Not able to resolve this issue. This kind of setup used to work with earlier versions of fabric (1.2, 1.3) but facing this issue with 1.4 version

DeepakMule (Wed, 15 Apr 2020 08:03:43 GMT):
I am facing issue when I try to connect HLF2.0 network with remote client (Fabcar), It works perfectly when i run it keeping it on same (local) VM. 2020-04-14T08:40:55.080Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer1.org1.test.com, url:grpcs://172.13.12.194:7051 2020-04-14T08:40:55.081Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer1.org1.test.com url:grpcs://172.13.12.194:7051 timeout:3000 2020-04-14T08:40:55.083Z - error: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer1.org1.test.com due to Error: Failed to connect before the deadline on Endorser- name: pee r1.org1.test.com, url:grpcs://172.13.12.194:7051 at checkState (C:\test\Fabric_sample\fabcar\node_modules\grpc\src\client.js:883:16) { connectFailed: true } 2020-04-14T08:40:58.084Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2.org1.test.com, url:grpcs://172.13.12.194:7061 2020-04-14T08:40:58.084Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer2.org1.test.com url:grpcs://172.13.12.194:7061 timeout:3000 2020-04-14T08:40:58.085Z - error: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer2.org1.test.com due to Error: Failed to connect before the deadline on Endorser- name: pee r2.org1.test.com, url:grpcs://172.13.12.194:7061 at checkState (C:\test\Fabric_sample\fabcar\node_modules\grpc\src\client.js:883:16) { connectFailed: true }

DeepakMule (Wed, 15 Apr 2020 08:44:06 GMT):
Kubernetes Certified Application Developer - https://www.cncf.io/certification/ckad/ Kubernetes Certified Administrator - https://www.cncf.io/certification/cka/ Would you be interested

heatherp (Wed, 15 Apr 2020 10:44:52 GMT):
Yes you should be able to use fabric-client@1.4.x with a 2.0 network

lavish 1 (Wed, 15 Apr 2020 11:37:01 GMT):
hello guys , i am creating an webapp in reactjs , but i am confused that where should i save the user wallet containing his identity , public and private key , i want to store it locally in local device , can you please tell me it is ok to do so , or i should store it in server, if it is ok then , can you please tell me how can i achieve it , because when ever i import fabric-ca-client in react it throws an error "Unhandled Rejection (TypeError): existsSync is not a function ▶ 39 stack frames were collapsed.", can anyone please help me with this ?

lavish 1 (Wed, 15 Apr 2020 11:37:01 GMT):
hello guys , i am creating an webapp in reactjs , but i am confused that where should i save the user wallet containing his identity , public and private key , i want to store it locally in local device , can you please tell me it is ok to do so , or i should store it in server, if it is ok then , can you please tell me how can i achieve to store it locally , because when ever i import fabric-ca-client in react it throws an error "Unhandled Rejection (TypeError): existsSync is not a function ▶ 39 stack frames were collapsed.", can anyone please help me with this ?

heatherp (Wed, 15 Apr 2020 16:06:13 GMT):
Hey @lavish 1, hopefully this tutorial can help you understand wallets a bit more, for storing identities: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html. It's your choice on where you chose to store identity information, and we support file system based wallets. What version of fabric-ca-client are you using and what are you attempting to do when you see that error?

Sahar (Wed, 15 Apr 2020 16:43:10 GMT):
Has joined the channel.

Sahar (Wed, 15 Apr 2020 16:43:11 GMT):
hello everyone , i am new to hyperledger fabric. I am trying to create a channel using node sdk , and i ran the byfn script of first-network directory before , but when i run my app i get this error 2020-04-15T16:27:13.908Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7050 2020-04-15T16:27:13.910Z - error: [Orderer.js]: Orderer grpcs://localhost:7050 has an error Error: Failed to connect before the deadline URL:grpcs://localhost:7050 errooor creating channel { Error: Failed to connect before the deadline URL:grpcs://localhost:7050 at checkState (/home/ubuntu/myBNC/bnc-tools/node_modules/grpc/src/client.js:883:16) connectFailed: true } I ve been stuck on this and i dnt know where the problem comes from. here is the code for my function where i have the error: https://codeshare.io/aYX7vY If you got any idea on where this comes from i would really appreciate it Thank you,

jaraujo (Wed, 15 Apr 2020 16:55:47 GMT):
Has joined the channel.

lavish 1 (Thu, 16 Apr 2020 05:10:58 GMT):
@heatherp thanks for the reply, the thing is , i am creating a car-auction webapp in reactjs , at first i was creating and storing user wallets in a server, all in one place , using fabric-ca-client@1.4.8 and fabric-network@1.4.7, i am using filesystemwallet and X509WalletMixin from fabric-network to create and import wallet, in server side everything is working file, but now what i want to do is instead of storing all the in one place i.e. server , i want to store their wallet in their local machine , so that when ever they want query or invoke , the locally stored wallet should used,but the problem is that whenever i try to import the fabric-network or fabric-ca-client in my react code , run the project , this error showsup "Unhandled Rejection (TypeError): existsSync is not a function ▶ 39 stack frames were collapsed.", could you please tell me am i doing it right or even it is possible to this thing , if not is their an alternative for this ??

lavish 1 (Thu, 16 Apr 2020 05:10:58 GMT):
@heatherp thanks for the reply, the thing is , i am creating a car-auction webapp in reactjs , at first i was creating and storing user wallets in a server, all in one place , using fabric-ca-client@1.4.8 and fabric-network@1.4.7, i am using filesystemwallet and X509WalletMixin from fabric-network to create and import wallet, in server side everything is working fine, but now what i want to do is instead of storing all the in one place i.e. server , i want to store their wallet in their local machine , so that when ever they want query or invoke , the locally stored wallet should used, but the problem is that whenever i try to import the fabric-network or fabric-ca-client in my react code , run the project , this error showsup "Unhandled Rejection (TypeError): existsSync is not a function ▶ 39 stack frames were collapsed.", could you please tell me am i doing it right or it is even possible to this thing , if not is their an alternative for this ??

Paradox-AT (Thu, 16 Apr 2020 07:50:56 GMT):
Hey guys how do I get the certificates and key after enrolling? I mean suppose we currupted the wallet folder the again want to get it

Paradox-AT (Thu, 16 Apr 2020 07:50:56 GMT):
Hey guys how do I get the certificates and key after enrolling? I mean suppose we corrupted the wallet folder the again want to get those certificates

heatherp (Thu, 16 Apr 2020 08:44:17 GMT):
So you're running a typescript project? Sounds like a typescript problem with fabric-ca-client, have you got the stack trace anywhere? existsSync is probably referring to the fs function, have you run an npm install for your typescript project importing fabric-ca-client?

lavish 1 (Thu, 16 Apr 2020 08:45:10 GMT):
no my project is on js only @heatherp

lavish 1 (Thu, 16 Apr 2020 09:12:34 GMT):
webpackJsonp../node_modules/nconf/lib/nconf/stores/file.js.exports.File.webpackJsonp../node_modules/nconf/lib/nconf/stores/file.js.File.loadSync node_modules/nconf/lib/nconf/stores/file.js:152 webpackJsonp../node_modules/nconf/lib/nconf/provider.js.exports.Provider.webpackJsonp../node_modules/nconf/lib/nconf/provider.js.Provider.add node_modules/nconf/lib/nconf/provider.js:136 webpackJsonp../node_modules/nconf/lib/nconf/provider.js.exports.Provider.webpackJsonp../node_modules/nconf/lib/nconf/provider.js.Provider.file node_modules/nconf/lib/nconf/provider.js:63 Config.reorderFileStores node_modules/fabric-ca-client/lib/Config.js:70 (anonymous function) node_modules/fabric-ca-client/lib/FabricCAServices.js:25 ./node_modules/fabric-ca-client/lib/FabricCAServices.js http://localhost:3000/static/js/0.chunk.js:19771:30 __webpack_require__ /home/lavish/Desktop/Work/React/osi-admin-panel/webpack/bootstrap 1a9f27699cfe7f0b06be:707 fn /home/lavish/Desktop/Work/React/osi-admin-panel/webpack/bootstrap 1a9f27699cfe7f0b06be:112 ./node_modules/fabric-ca-client/index.js node_modules/fabric-ca-client/index.js:23 __webpack_require__ /home/lavish/Desktop/Work/React/osi-admin-panel/webpack/bootstrap 1a9f27699cfe7f0b06be:707 fn /home/lavish/Desktop/Work/React/osi-admin-panel/webpack/bootstrap 1a9f27699cfe7f0b06be:112 ./src/containers/UnVerifiedImagesUsers/UnVerifiedImagesUsers.js http://localhost:3000/static/js/0.chunk.js:52866:75 __webpack_require__ /home/lavish/Desktop/Work/React/osi-admin-panel/webpack/bootstrap 1a9f27699cfe7f0b06be:707 fn /home/lavish/Desktop/Work/React/osi-admin-panel/webpack/bootstrap 1a9f27699cfe7f0b06be:112 ▲ 14 stack frames were expanded. This screen is visible only in development. It will not appear if the app crashes in production. Open your browser’s developer console to further inspect this error.

lavish 1 (Thu, 16 Apr 2020 09:12:57 GMT):
@heatherp this is the stack trace

heatherp (Thu, 16 Apr 2020 09:14:35 GMT):
Right, and you've run an `npm install` recently? All the node modules required by your dependencies are there?

lavish 1 (Thu, 16 Apr 2020 09:14:48 GMT):
yes

lavish 1 (Thu, 16 Apr 2020 09:17:35 GMT):
is fabric-ca-client or fabric-network supported in react js, or they can only run in node environment ?

heatherp (Thu, 16 Apr 2020 10:07:21 GMT):
Erm, I know nothing about react. Those support npm

lavish 1 (Thu, 16 Apr 2020 10:14:00 GMT):
ok , but can you please tell me the secure way to store wallet in hyperledger, because if i store all these in server adn if that server got compromised then al the wallets will be too . @heatherp

lavish 1 (Thu, 16 Apr 2020 10:14:00 GMT):
ok , but can you please tell me the secure way to store wallet in hyperledger, because if i store all these in server and if that server got compromised then al the wallets will be too . @heatherp

lavish 1 (Thu, 16 Apr 2020 10:16:09 GMT):
or, storing them server is the only way for it, well in that case , i don't have any choice

davidkel (Thu, 16 Apr 2020 10:27:06 GMT):
The node sdks have only been tested with node and so are not likely to run in a browser javascript environment. You have lots of options though for securing your identity information. For example your server could store the information in something like vault, then use an in memory wallet to provide the wallet info and load the wallet when required with the data from vault. You could use an HSM with your server to manage the private keys. You could also look offline transaction signing so that you have the private key in you react app and sign the transaction yourself before sending it (although I'm not too familiar with how you might achieve that. 1.4 provides convenience methods for that, don't think 2.0 does).

davidkel (Thu, 16 Apr 2020 10:27:06 GMT):
The node sdks have only been tested with node and so are not likely to run a lot of the capability in a browser javascript environment. You have lots of options though for securing your identity information. For example your server could store the information in something like vault, then use an in memory wallet to provide the wallet info and load the wallet when required with the data from vault. You could use an HSM with your server to manage the private keys. You could also look offline transaction signing so that you have the private key in you react app and sign the transaction yourself before sending it (although I'm not too familiar with how you might achieve that. 1.4 provides convenience methods for that, don't think 2.0 does).

davidkel (Thu, 16 Apr 2020 10:27:06 GMT):
The node sdks have only been tested with node and so are not likely to run a lot of the capability in a browser javascript environment. You have lots of options though for securing your identity information. For example your server could store the information in something like vault, then use an in memory wallet to provide the wallet info and load the wallet when required with the data from vault. You could use an HSM with your server to manage the private keys. You could also look offline transaction signing so that you have the private key in your react app and sign the transaction yourself before sending it (although I'm not too familiar with how you might achieve that. 1.4 provides convenience methods for that, don't think 2.0 does).

lavish 1 (Thu, 16 Apr 2020 11:08:36 GMT):
oh! , ok i will try this for storing wallet. thanks for the help @davidkel @heatherp you saved my day and my job too :grin: :joy:

Paradox-AT (Thu, 16 Apr 2020 13:32:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=FZJzvW5eTGmQYRYi3) Guys anything?

lavish 1 (Thu, 16 Apr 2020 13:39:53 GMT):
you can create new one, delete the corrupted one's from the wallet and register and enroll again

Paradox-AT (Thu, 16 Apr 2020 13:44:02 GMT):
Can't register the identity is already registered

lavish 1 (Thu, 16 Apr 2020 13:44:30 GMT):
change the name from the code

lavish 1 (Thu, 16 Apr 2020 13:44:53 GMT):
it must be like "user1"

Paradox-AT (Thu, 16 Apr 2020 13:44:59 GMT):
I dont want to get the certificate for the same identity

Paradox-AT (Thu, 16 Apr 2020 13:44:59 GMT):
I want to get the certificate for the same identity

Paradox-AT (Thu, 16 Apr 2020 13:45:24 GMT):
I have ACL implemented in the chaincode

lavish 1 (Thu, 16 Apr 2020 13:47:18 GMT):
ok, then remove the entry of that identity from fabric-ca-server container, you can install sql lite, delete it using query

lavish 1 (Thu, 16 Apr 2020 13:47:52 GMT):
https://medium.com/@kctheservant/exploring-fabric-ca-registration-and-enrollment-1b9f4a1b3ace

lavish 1 (Thu, 16 Apr 2020 13:48:00 GMT):
take help from here

Paradox-AT (Thu, 16 Apr 2020 13:48:08 GMT):
that's a kind of a hack :grin:

Diegoescalonaro (Thu, 16 Apr 2020 13:48:14 GMT):
Hi guys! Does anybody know if the function ``addContractListener`` works in 1.4.0 version?

Diegoescalonaro (Thu, 16 Apr 2020 13:48:14 GMT):
Hi guys! Does anybody know if the function `addContractListener` works in 1.4.0 version?

Diegoescalonaro (Thu, 16 Apr 2020 13:48:14 GMT):
Just for listening to events from the chaincode

Paradox-AT (Thu, 16 Apr 2020 13:49:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=y3APoB9wBqNMEYP7H) Why do you want to use it? emitting events from the chaincode?

lavish 1 (Thu, 16 Apr 2020 13:51:38 GMT):
this is the only way i know right now

Paradox-AT (Thu, 16 Apr 2020 13:52:24 GMT):
Hey editing the database of CA, I don't think is a good practice for prod env.

Paradox-AT (Thu, 16 Apr 2020 13:52:46 GMT):
But thanks for the trick, didnt know that :P

heatherp (Thu, 16 Apr 2020 14:36:57 GMT):
It was added in fabric-network@v.2. Should work for interacting with a v1.4 chaincode, but it's not accessible in fabric-network@1.4.x

rthatcher (Thu, 16 Apr 2020 14:52: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/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

garyclark (Thu, 16 Apr 2020 15:45:53 GMT):
Using 1.4. Failed to register user "user1": Error: Common connection profile is missing this clients organization and certificate authority. I can enroll an admin but seeing the above on one machine. Its failing at "const ca=gateway.getClient().getCertificateAuthority"? I do not see this on another machine.. Probably something dumb I have done. Just having a wee issue understanding where.

garyclark (Thu, 16 Apr 2020 15:45:53 GMT):
Using Fabroc 1.4. Failed to register user "user1": Error: Common connection profile is missing this clients organization and certificate authority. I can enroll an admin but seeing the above on one machine when attempting to register user. Its failing at "const ca=gateway.getClient().getCertificateAuthority"? I do not see this on another machine.. Probably something dumb I have done. Just having a wee issue understanding where.

garyclark (Thu, 16 Apr 2020 15:45:53 GMT):
Using Fabric 1.4. Failed to register user "user1": Error: Common connection profile is missing this clients organization and certificate authority. I can enroll an admin but seeing the above on one machine when attempting to register user. Its failing at "const ca=gateway.getClient().getCertificateAuthority"? I do not see this on another machine.. Probably something dumb I have done. Just having a wee issue understanding where.

Diegoescalonaro (Thu, 16 Apr 2020 15:58:29 GMT):
Thanks! I will check it.

garyclark (Thu, 16 Apr 2020 21:57:33 GMT):
I am seeing "No peers available to query" when I run node query.js on fabcar network. However when I run it several times I see a successful result? Do I just have to query this multiple times to get a success or is there a better way?

heatherp (Fri, 17 Apr 2020 15:02:19 GMT):
Hmm wouldn't have thought you'd need to run it multiple times no..

garyclark (Fri, 17 Apr 2020 15:05:35 GMT):
Well yes that could be a solution. But another solution could be to extend the timer and let the sdk take care of retrying since I know I can query just not at that moment. Is that possible?

garyclark (Fri, 17 Apr 2020 15:05:35 GMT):
Well yes that could be a solution to retry. But another solution could be to extend the timer and let the sdk take care of retrying since I know I can query just not at that moment. Is that possible?

garyclark (Fri, 17 Apr 2020 15:05:35 GMT):
Yes that could be a solution to retry. But another solution could be to extend the timer and let the sdk take care of retrying since I know I can query just not at that moment. Is that possible?

garyclark (Fri, 17 Apr 2020 15:05:35 GMT):
Yes that could be a solution to retry. But another solution could be to extend the timer and let the sdk take care of retrying since I know I can query just not at that moment. Is that possible?

garyclark (Fri, 17 Apr 2020 15:05:35 GMT):
Yes that could be a solution to retry. Another possible solution could be to extend the timer and let the sdk take care of retrying since I know I can query just not at that moment. Is that possible?

garyclark (Fri, 17 Apr 2020 15:05:35 GMT):
Yes that could be a solution to retry. Another possible solution could be to extend the timer and let the sdk take care of retrying since I know I can query just not at that moment. Is that possible? GRPC_WAIT_FOR_READY_TIMEOUT is this it? Is the default 3 sec, i.e 3000ms. Not sure if this is blighter that needs to change?

garyclark (Fri, 17 Apr 2020 16:11:24 GMT):
I think I just needed to set the FABRIC_CFG_PATH to point to the core.yaml. Re-test today.

garyclark (Fri, 17 Apr 2020 16:23:30 GMT):
I need to set the FABRIC_CFG_PATH to point to my core.yaml and tune these timeouts. When using docker it has its own default /etc/hyperledger/fabric for FABRIC_CFG_PATH.

AbhijeetSamanta (Sun, 19 Apr 2020 07:04:35 GMT):
Hi, Anyone is worked on revoke functionality using node sdk in fabric?

AbhijeetSamanta (Sun, 19 Apr 2020 09:23:08 GMT):
Hi I have some confusion regarding idenetity service in node-sdk. can anybody help me https://stackoverflow.com/questions/61302060/how-to-update-the-existing-identity-into-hyperledger-ca-using-fabric-node-sdk

Koushik (Mon, 20 Apr 2020 08:15:45 GMT):
Hi all, I am having a perplexed error I am having a hard time getting my head around. I wanted to see the return of Block global function using node js sdk in my network and I noticed the txValidationCode were different from two organizations in my network. For an example when I am returning block number #54 from org1 peer it says it has txValidationCode of 11 (MVCC read conflict error) and when I am returning block #54 from Org2 peer it says it has txValidationCode of 0 (Valid Response). My question is how can the same block in Org1 be invalid while the same block number in Org2 be valid and is the function returning meta data of the block appended in the ledger?

benjamin.verhaegen (Mon, 20 Apr 2020 13:11:55 GMT):
i've been researching the new nodeSDK for Hyperledger Fabric. Coming from version 1.4 where the function initCredentialStore() was still working. Now i can't seem to find how I can init my credential stores since i'm not using the default kvs, but i'm using hashicorp vault. Do anybodyknow what functions i need to get the same result? Thanks in advance.

bretharrison (Mon, 20 Apr 2020 13:54:42 GMT):
Identity management with fabric-network v2.1 uses the wallet ----- https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html

bretharrison (Mon, 20 Apr 2020 13:54:42 GMT):
Identity management with NodeSDK `fabric-network` v2.1 uses the `wallet` ----- https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html

bestbeforetoday (Tue, 21 Apr 2020 08:38:52 GMT):
Events are also exposed in the v2 fabric-network API. This API provides easier access to and navigation of the event information. For details, see: - https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Network.html - https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Contract.html

bestbeforetoday (Tue, 21 Apr 2020 08:54:41 GMT):
I think that will depend on how many enrolments the CA is configured to allow. If it allows multiple enrollments then you can just enroll using the same secret to get the client certificate again. If not you might need to invalidate the old credentials and create new ones

adgupta011 (Thu, 23 Apr 2020 09:56:20 GMT):
Has joined the channel.

garyclark (Thu, 23 Apr 2020 18:38:51 GMT):
Got a quick question. I am seeing a problem on instantiating chaincode I am replacing the fabcar example with my own. It looks like its installed on the peer but I am seeing 'Error could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited'. Anything obvious here I should look at?

Taaanos (Thu, 23 Apr 2020 22:12:25 GMT):
sounds like endorsing issue. Double check that you approved from all orgs. You are using 2.0 I assume

garyclark (Thu, 23 Apr 2020 22:13:36 GMT):
Using 1.4. I'm thinking of creating a new channel and see if I can install on it. Not sure exactly right now.

garyclark (Thu, 23 Apr 2020 22:13:36 GMT):
Using 1.4. I'm thinking of creating a new channel and see if I can instantiate on it. Not sure exactly right now.

garyclark (Thu, 23 Apr 2020 22:15:30 GMT):
I can install on the peer just cannot instantiate with the different name chaincode.

garyclark (Thu, 23 Apr 2020 22:16:17 GMT):
Like I said if I use fabcar and modify it and increase the version it works like a champ.

icarrascol (Fri, 24 Apr 2020 18:01:22 GMT):
hello i am trying to use discovery with node sdk v2.1, i am getting error no discovery targets found, discovery works if i use the legacy fabric client way

icarrascol (Fri, 24 Apr 2020 18:01:22 GMT):
hello i am trying to use discovery with node sdk v2.1, i am getting error no discovery targets found, discovery works if i use the legacy fabric client way, can anyone help me?

icarrascol (Fri, 24 Apr 2020 19:35:11 GMT):
another question in v2.1 after chaincode invocation do we get a response object with status codes? like 200,500, considering that shim.success/error returns an object with a status code

AbhijeetSamanta (Sat, 25 Apr 2020 07:20:25 GMT):
Hi, Anyone has example how to reenroll the revoked user using node sdk??

JayJong (Mon, 27 Apr 2020 04:19:21 GMT):
Hi all, im using fabric 2.0.1 and my network is on a remote vm. When i try to invoke on my local, it returns this error. ``` E0427 11:59:26.326763000 140736286528448 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-27T03:59:26.815Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0-org1, url:grpcs://:30001 2020-04-27T03:59:26.816Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0-org1 url:grpcs://:30001 timeout:3000 2020-04-27T03:59:26.821Z - error: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0-org1 due to Error: Failed to connect before the deadline on Endorser- name: peer0-org1, url:grpcs://:30001``` Is the grpc issue related to the ssl/tls issue or are these 2 different issues?

JayJong (Mon, 27 Apr 2020 04:19:21 GMT):
Hi all, im using fabric 2.0.1 and my network is on a remote vm. When i try to invoke on my local, it returns this error. ``` E0427 11:59:26.326763000 140736286528448 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-27T03:59:26.815Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0-org1, url:grpcs://:30001 2020-04-27T03:59:26.816Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0-org1 url:grpcs://:30001 timeout:3000 2020-04-27T03:59:26.821Z - error: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0-org1 due to Error: Failed to connect before the deadline on Endorser- name: peer0-org1, url:grpcs://:30001``` Is the grpc issue related to the ssl/tls issue or are these 2 different issues? On a side note, im able to telnet to 30001

JayJong (Mon, 27 Apr 2020 04:19:21 GMT):
Hi all, im using fabric 2.0.1 and my network is on a remote vm. When i try to invoke on my local, it returns this error. ``` E0427 11:59:26.326763000 140736286528448 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-27T03:59:26.815Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0-org1, url:grpcs://:30001 2020-04-27T03:59:26.816Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0-org1 url:grpcs://:30001 timeout:3000 2020-04-27T03:59:26.821Z - error: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0-org1 due to Error: Failed to connect before the deadline on Endorser- name: peer0-org1, url:grpcs://:30001``` Is the grpc issue related to the ssl/tls issue or are these 2 different issues? On a side note, im able to telnet to 30001 from local

JayJong (Mon, 27 Apr 2020 04:19:21 GMT):
Hi all, im using fabric 2.0.1 and my network is on a remote vm. When i try to invoke on my local, it returns this error. ``` E0427 11:59:26.326763000 140736286528448 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. 2020-04-27T03:59:26.815Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0-org1, url:grpcs://:30001 2020-04-27T03:59:26.816Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0-org1 url:grpcs://:30001 timeout:3000 2020-04-27T03:59:26.821Z - error: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0-org1 due to Error: Failed to connect before the deadline on Endorser- name: peer0-org1, url:grpcs://:30001``` Btw, im using node@12.16.1, grpc@1.24.2, fabric-network@2.0.0-beta.4 Is the grpc issue related to the ssl/tls issue or are these 2 different issues? On a side note, im able to telnet to 30001 from local

Paradox-AT (Mon, 27 Apr 2020 10:02:21 GMT):
Hey Guys, I am facing issues with API connecting with multiple orderers for queries and transactions. I have three orderers for our network. All the three orderers are on the same machine so we're using port forwarding for orderer1(8050:7050) and orderer2(9050:7050) These are the orderer defaults in configtx.yml: ``` - Host: orderer0.example.com Port: 7050 ... - Host: orderer1.example.com Port: 7050 ... - Host: orderer2.example.com Port: 7050 ... ``` These are the orderer details in connection-profile.jon: ``` "orderers": { "orderer0.example.com": { "url": "grpcs://localhost:7050", ... "grpcOptions": { "hostnameOverride": "orderer0.example.com" } }, "orderer1.example.com": { "url": "grpcs://localhost:8050", ... "grpcOptions": { "hostnameOverride": "orderer1.example.com" } }, "orderer2.example.com": { "url": "grpcs://localhost:9050", ... "grpcOptions": { "hostnameOverride": "orderer2.example.com" } }, }, ``` I am using NodeJS fabric gateway to create and do transactions on channels. When the gateway configuration parameter "asLocalhost" is set to true all the queries and transactions are happening through orderer0. This becomes an issue if orderer0 goes down as the gateway doesn't automatically connect to the remaining orderers. When the gateway configuration parameter "asLocalhost" is set to false the gateway has the information for all the three orderers unlike when asLocalhost is set to true, but all the channel orderers point to 7050 port instead of their respective ports. It looks like the orderers are being retrieved from consortium. Since we need to connect to orderer1 and orderer2 at 8050 and 9050 ports respectively the API is unable to connect to them at 7050 port.

dsanchezseco (Mon, 27 Apr 2020 13:27:07 GMT):
Hi! I'm trying to create a generic REST server to interact with a network. But I'm seeing that there's no viable option to install nor instantiate the chaincodes.

dsanchezseco (Mon, 27 Apr 2020 13:27:07 GMT):
Hi! I'm trying to create a generic REST server to interact with a network. But I'm seeing that there's no viable option to install nor instantiate the chaincodes. The only mention about the topic is to use fabric-common, but I'm not seeing the functions to do so in the v2.x.x as they were in the v1.4.x. Is the new workflow intended to not allow the install of chaincodes using the sdk? I'm seeing that the Go sdk has the functions to do it.

ashish.cppdev (Mon, 27 Apr 2020 15:36:24 GMT):
Good morning - I have a question around using Fabric SDK Node 1.4.x with Fabric 2.0 components (Peer, Orderer).

ashish.cppdev (Mon, 27 Apr 2020 15:40:40 GMT):
My issue is that when calling sendInstantiateProposal, I get an error "channel has been migrated to the new lifecycle. LSCC is now read only"

ashish.cppdev (Mon, 27 Apr 2020 15:42:53 GMT):
So, is there any way we can use Fabric SDK Node 1.4.x for instantiating chaincode? The other commands seem to be working through the SDK such as chaincode install, create channel, add org to channel (updateChannel).

SpecialAgentCooper (Mon, 27 Apr 2020 15:48:15 GMT):
Has joined the channel.

SpecialAgentCooper (Mon, 27 Apr 2020 15:48:16 GMT):
@dsanchezseco Hi! I'm attempting to make a rest server of my own and came across this: "Note that the SDK no longer aims to provide administrative and management capability. The command-line interface should be used for these operations." from here https://hyperledger.github.io/fabric-sdk-node/master/tutorial-migration.html So you may be out of luck there. Even the lower level fabric-common is only supposed to query chaincode https://hyperledger.github.io/fabric-sdk-node/master/index.html

SpecialAgentCooper (Mon, 27 Apr 2020 15:50:42 GMT):
Has anyone got any good resources for learning how to use the 2.0+ node sdk? I'm struggling to migrate code from 1.4 which made heavy use of fabric-channel. Cheers!

davidkel (Mon, 27 Apr 2020 16:16:14 GMT):
The only way would be to setup a 2.0 fabric to use the old chaincode lifecycle. The 1.4 node-sdk only supports the old chaincode lifecycle, not the new one. The 2.0 node sdk doesn't support either the old or new chaincode lifecycles

ashish.cppdev (Mon, 27 Apr 2020 16:17:31 GMT):
Hi David - do you have a suggestion on how to do that? I have this posted on SO as well https://stackoverflow.com/questions/61463229/using-fabric-node-sdk-1-4-x-with-fabric-2-0

nitishbhardwaj19 (Mon, 27 Apr 2020 16:25:33 GMT):
ohh that's shocking, administrative capabilities with SDK was amazing. :(

davidkel (Mon, 27 Apr 2020 16:32:55 GMT):
Sorry I don't offhand, I've yet to start looking at Fabric 2 in any great detail.

ashish.cppdev (Mon, 27 Apr 2020 16:33:19 GMT):
ok thank you.

davidkel (Mon, 27 Apr 2020 16:34:01 GMT):
If you plan to use the new lifecycle then the CLI (peer command) provides the ability to do new lifecycle actions

SpecialAgentCooper (Mon, 27 Apr 2020 16:36:42 GMT):
Yeah it would be easier, but I think the peer chaincode commands are quite nice to be honest. I suppose if you really wanted to you could spawn them like this https://stackoverflow.com/questions/20643470/execute-a-command-line-binary-with-node-js

ashish.cppdev (Mon, 27 Apr 2020 16:38:28 GMT):
yes I understand that from reading the migration notes on the SDK. However, since my other 1.4.x SDK APIs were working (createChannel etc), I was hoping Fabric SDK Node 1.4.x could continue to work with Fabric 2.0. If not, we can use the command line interface using peer lifecycle commands. Just needed to get a definitive answer.

nitishbhardwaj19 (Mon, 27 Apr 2020 16:40:33 GMT):
If administrative capabilities won't be available for SDK, then do we really need to use the low level API? What would be the difference between fabric-gateway and fabric-sdk?

Amalendu_Palakkatil (Tue, 28 Apr 2020 03:52:56 GMT):
Hi,Is anyone who has done private data in node ,If any pls do help me ??

dsanchezseco (Tue, 28 Apr 2020 06:52:50 GMT):
Ummm by seeing this in the SDK docs I thought it was possible to do it using the fabric-common like it was in the v1.4.x ``` Note that administrative capabilities, such as installing and starting smart contracts, are not currently provided by this API. For only specific advanced usage, the lower level fabric-common API can be used. Access to related fabric-common objects is provided through the fabric-network API objects. ``` But seeing it no it does not say anything about administration, it talks about advance usage that seems to be something different tho

dsanchezseco (Tue, 28 Apr 2020 06:54:32 GMT):
yeah, I'm on the same boat with that one. I think the anwser is going to be using the CLI, either from the REST or manually

Paradox-AT (Tue, 28 Apr 2020 16:26:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=y84xsrYNtXoXyRbSS) Hey guys, anything on this?

ashish.cppdev (Tue, 28 Apr 2020 16:58:55 GMT):
yeah. I am moving our code to CLI and call that via the REST layer using shell.js

garyclark (Tue, 28 Apr 2020 17:02:00 GMT):
Hello using 1.4 fabric. I can register and enroll the admin How do you unenroll and unregister?

garyclark (Tue, 28 Apr 2020 17:02:00 GMT):
Hello using 1.4 fabric. I can register and enroll the admin How do you unenroll and unregister? using node.js

garyclark (Tue, 28 Apr 2020 17:02:00 GMT):
Hello using 1.4 fabric. I can register and enroll the admin How do you unenroll and unregister? using fabric node.js fabric.

garyclark (Tue, 28 Apr 2020 17:02:00 GMT):
Hello using 1.4 fabric. I can register and enroll the admin How do you unenroll and unregister? using fabric node.js fabric. I know I can manually remove the files for the user and admin that were used for enrollment and registration and restart the ca server. Just want to know is there an API to do this.

Rachit-gaur (Tue, 28 Apr 2020 18:12:29 GMT):
Has joined the channel.

garyclark (Tue, 28 Apr 2020 20:40:49 GMT):
Any example on how to add/remove to the Certificate Revocation List?

mbanerjee (Tue, 28 Apr 2020 20:54:42 GMT):
Is there a Fabric SDK node for 2.0 release?

nitishbhardwaj19 (Wed, 29 Apr 2020 03:36:16 GMT):
Yes, https://hyperledger.github.io/fabric-sdk-node/master/tutorial-migration.html

dsanchezseco (Wed, 29 Apr 2020 13:59:58 GMT):
check this https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Transaction.html#setTransient__anchor

dsanchezseco (Wed, 29 Apr 2020 13:59:58 GMT):
check this (https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Transaction.html#setTransient__anchor)

dsanchezseco (Wed, 29 Apr 2020 13:59:58 GMT):
check this [https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Transaction.html#setTransient__anchor]

dsanchezseco (Wed, 29 Apr 2020 13:59:58 GMT):
check this https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Transaction.html#setTransient__anchor

garyclark (Wed, 29 Apr 2020 16:15:55 GMT):
Saw an interesting problem. I have an application that enrolls and registers a client. The client creates and queries the ledger on a peer. I killed the client application. The peer exited because it could not communicate to the peer. I have to then restart everything and join the peer again. Not exactly defensive programming.

garyclark (Wed, 29 Apr 2020 16:15:55 GMT):
Saw an interesting problem. I have an application that enrolls and registers a client. The client creates and queries the ledger on a peer. I killed the client application. The peer exited because it could not communicate to the client app. I have to then restart everything and join the peer again. Not exactly defensive programming.

garyclark (Wed, 29 Apr 2020 16:15:55 GMT):
Saw an interesting problem. I have an application that enrolls and registers a client. The client creates and queries the ledger on a peer. I killed the client application. The peer exited because it could not communicate to the client app. I have to then restart everything and join the peer again. Not exactly defensive programming. 1.4 Node Sdk.

garyclark (Wed, 29 Apr 2020 16:15:55 GMT):
Saw an interesting problem. I have an application that enrolls and registers a client. The application creates and queries the ledger on a peer. I manually killed the application. The peer exited because it could not communicate to the client application. I have to then restart everything and join the peer again. Not exactly defensive programming. 1.4 Node Sdk. Do not know why the peer would die because it lost comms.

garyclark (Wed, 29 Apr 2020 16:15:55 GMT):
Saw an interesting problem. I have an application that enrolls and registers a client. The application creates and queries the ledger on a peer. I manually killed the application. The peer exited because it could not communicate to the client application. I have to then restart everything and join the peer again. Not exactly defensive programming. 1.4 Node Sdk. Do not know why the peer would die because it lost comms. I do not think it should.

garyclark (Wed, 29 Apr 2020 16:15:55 GMT):
Saw an interesting problem. I have an application that enrolls and registers a client. The application creates and queries the ledger on a peer. I manually killed the application. The peer exited because it could not communicate to the client application. I have to then restart everything and join the peer again. Not exactly defensive programming. 1.4 Node Sdk. Do not know why the peer would die because it lost comms. I do not think it should that.

akegaviar (Thu, 30 Apr 2020 03:56:00 GMT):
Has joined the channel.

akegaviar (Thu, 30 Apr 2020 03:56:02 GMT):
goog tutorial on fabric v2 and node sdk: Deploy a Hyperledger Fabric v2 Web App Using the Node.js SDK https://chainstack.com/deploy-a-hyperledger-fabric-v2-web-app-using-sdk-for-node-js/

mahoney1 (Thu, 30 Apr 2020 12:23:34 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

icarrascol (Thu, 30 Apr 2020 16:46:33 GMT):
are there past recordings of the 2020 meetings?

mahoney1 (Fri, 01 May 2020 07:37:35 GMT):
@icarrascol yes - the past Recordings page is here -> https://wiki.hyperledger.org/pages/viewpage.action?pageId=6423554

nitishbhardwaj19 (Fri, 01 May 2020 08:21:27 GMT):
Has anyone used fabric-ca-client with angular app?

garyclark (Fri, 01 May 2020 16:55:04 GMT):
I need to start digging into this sdk there is some fishy stuff going on.

garyclark (Fri, 01 May 2020 16:55:04 GMT):
I need to start digging into this node.js sdk there is some fishy stuff going on.

JayJong (Sat, 02 May 2020 10:11:01 GMT):
tls

FilipeSilva (Mon, 04 May 2020 15:49:10 GMT):
Has joined the channel.

FilipeSilva (Mon, 04 May 2020 15:49:11 GMT):
Hi, I am trying to connect to a network through node sdk

FilipeSilva (Mon, 04 May 2020 15:51:34 GMT):
But at the end of the process and after successfully discovered all peers in te network I am getting the following error message

FilipeSilva (Mon, 04 May 2020 15:51:34 GMT):
But at the end of the process and after successfully discovered all peers in te network I am getting the following error message:

FilipeSilva (Mon, 04 May 2020 15:52:01 GMT):
`Endorser must be connected`

FilipeSilva (Mon, 04 May 2020 15:52:12 GMT):
After digging the logs I found this entry

FilipeSilva (Mon, 04 May 2020 15:52:12 GMT):
After digging the logs I found this entry:

FilipeSilva (Mon, 04 May 2020 15:54:27 GMT):
`debug: [client]: getEndorser: gateway client start name: *0*`

FilipeSilva (Mon, 04 May 2020 15:54:27 GMT):
`debug: [client]: getEndorser: gateway client start name: 0`

FilipeSilva (Mon, 04 May 2020 15:55:33 GMT):
Apparently, the system is trying to add the endorser whose name is *0*

FilipeSilva (Mon, 04 May 2020 15:55:54 GMT):
Any clue?

FilipeSilva (Mon, 04 May 2020 16:35:24 GMT):
Well, it looks like a bug

FilipeSilva (Mon, 04 May 2020 16:35:33 GMT):
how can I submit a bug report^?

FilipeSilva (Mon, 04 May 2020 16:35:33 GMT):
how can I submit a bug report?

FilipeSilva (Mon, 04 May 2020 16:35:33 GMT):
How can I submit a bug report?

davidkel (Mon, 04 May 2020 16:57:58 GMT):
https://jira.hyperledger.org and the project is FABN

FilipeSilva (Mon, 04 May 2020 17:33:40 GMT):
ty ;)

FilipeSilva (Mon, 04 May 2020 17:33:46 GMT):
ty ;)

bestbeforetoday (Tue, 05 May 2020 08:45:29 GMT):
That isn't something I have observed before, although also not something I have tried either. It certainly doesn't sound like correct behaviour so perhaps worth raising a Jira against the code Fabric project: https://jira.hyperledger.org/projects/FAB Any steps or sample code that can be used to reliably reproduce the problem would be very useful to include in the Jira

bestbeforetoday (Tue, 05 May 2020 08:49:10 GMT):
Any logs produced at the failing peer end might also give some clues about the cause

bestbeforetoday (Tue, 05 May 2020 09:24:27 GMT):
it might be helpful to include the connection profile in the Jira. Also just to check that you are passing in the connection profile as an object (loaded and JSON parsed as in the code example here: https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Gateway.html#connect) and not passing a filename string

FilipeSilva (Tue, 05 May 2020 10:00:07 GMT):
okey! ty ;)

davidkhala (Tue, 05 May 2020 10:55:49 GMT):
[sdk-node master branch ] it seems fabric-common/lib/BaseClient is not used anywhere, could we remove it?

bestbeforetoday (Tue, 05 May 2020 12:50:50 GMT):
I think it's used by FabricCAServices. I guess if FabricCAServices is the only thing that uses it, maybe the bits of BaseClient that gets used there could live in fabric-ca-client and not in fabric-common. @bretharrison would have a better view on the right thing to do

psacchit (Tue, 05 May 2020 14:10:15 GMT):
Has joined the channel.

psacchit (Tue, 05 May 2020 14:10:17 GMT):
Hello, I am getting the following error: TypeError: Illegal buffer Here is the request:`{ "chaincodeId": "chaincode-name", "fcn": "doSomthing", "args": [ "Lots", "of", "args" ], "chainId": "chainID", "txId": { "_nonce": { "type": "Buffer", "data": [ 24, 50, 19, 222, 219, 180, 46, 32, 69, 71, 78, 77, 72, 131, 65, 10, 5, 38, 127, 6, 187, 18, 57, 114 ] }, "_transaction_id": "txID", "_admin": false }, "transientMap": { "id": "QXBwQWRtaW5PTVI=" } }` From this: channel = client2.getChannel(channelName,false); let results = await channel.sendTransactionProposal(request); Any idea would be appreciated. I didn't write this I am just trying to get it to work. :)

FilipeSilva (Tue, 05 May 2020 15:17:35 GMT):
hi, why in the marbles chaincode example we update the state with a composite key and a null value as follows:

FilipeSilva (Tue, 05 May 2020 15:17:35 GMT):
Hi, why in the marbles chaincode example we update the state with a composite key and a null value as follows:

FilipeSilva (Tue, 05 May 2020 15:17:41 GMT):
`await stub.putState(colorNameIndexKey, Buffer.from('\u0000'));`

FilipeSilva (Tue, 05 May 2020 15:19:07 GMT):
Couldn't we instead add the composite key when submitting the actual value as shown below:

FilipeSilva (Tue, 05 May 2020 15:19:36 GMT):
`await stub.putState(colorNameIndexKey, Buffer.from(JSON.stringify(marble)));`

FilipeSilva (Tue, 05 May 2020 15:20:26 GMT):
What is the point of doing it separately?

divyasekaran (Wed, 06 May 2020 05:05:27 GMT):
Has joined the channel.

divyasekaran (Wed, 06 May 2020 05:05:29 GMT):
I have modified fabcar example to store my own data. I have to save json data into the blocks. Previously I was working with hyperledger fabric version 1.4 and all works fine. And now I am using version 2.0.1, and i am having problems with my submitTransaction function. `const result = await contract.submitTransaction('insertData',params);` This is how I used to save the params and while calling the function I am receiving error like `error inside await Error: No discovery results found at DiscoveryService.getDiscoveryResults (fabric-samples/fabcar/javascript/node_modules/fabric-common/lib/DiscoveryService.js:359:10) at DiscoveryHandler.endorse (fabric-samples/fabcar/javascript/node_modules/fabric-common/lib/DiscoveryHandler.js:156:40) at Endorsement.send (fabric-samples/fabcar/javascript/node_modules/fabric-common/lib/Proposal.js:341:29) at Transaction.submit (fabric-samples/fabcar/javascript/node_modules/fabric-network/lib/transaction.js:205:52) at at process._tickCallback (internal/process/next_tick.js:189:7) ` How to resolve this?

bestbeforetoday (Wed, 06 May 2020 10:05:36 GMT):
Is your network definitely set up to enable discovery with anchor peers etc? If so, are there any logs produced at the client end that indicate an error retrieving discovery results? Details here on how you can change the default logging setting if required: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-logging.html

divyasekaran (Wed, 06 May 2020 10:38:45 GMT):
Also while querying with 'getQueryResult' before inserting, I am getting result like below as the first record {"Key":"\u0000􏿿initialized","Record":1} What it means? What i am doing wrong?

nkalichynskyi (Fri, 08 May 2020 07:27:04 GMT):
Has joined the channel.

SpecialAgentCooper (Fri, 08 May 2020 15:47:21 GMT):

fabcar containers

SpecialAgentCooper (Fri, 08 May 2020 15:49:47 GMT):
I'm trying to decipher what each of my containers are when running the fabcar demo. I understand that peer0.org1 and peer0.org2 are my peer nodes and orderer is the orderer (so far so obvious). The Certificate Authorities for each org and the ordering service are there also, as well as some couchdb containers (not sure why there are two but I can live with that). What on earth are dev-peer0.org 1 and 2? Can anyone help me with this?

icarrascol (Fri, 08 May 2020 17:39:51 GMT):
fabric sdk v2 requires the docker containers internal and external ports to be equal but this config isnt compatible with v1.4 as it makes discovery service to not work properly, why was this changed for v2?

KungFooPanda (Sat, 09 May 2020 19:16:56 GMT):
Has joined the channel.

bestbeforetoday (Mon, 11 May 2020 11:35:51 GMT):
They are chaincode containers running the Fabcar smart contract for each of the peers

madiazp (Mon, 11 May 2020 16:27:35 GMT):
Has joined the channel.

nkalichynskyi (Tue, 12 May 2020 06:48:07 GMT):
Hi everyone, I've been looking towards migration to fabric-sdk-node v2 but the lack of administrative capabilities is a bit of a deal breaker. Does anybody know if this is a final decision or is there still a chance that administrative capabilities will be added in the future?

davidkhala (Tue, 12 May 2020 08:25:36 GMT):
Yes, I found it required only by fabric-ca-client

davidkhala (Tue, 12 May 2020 08:28:05 GMT):
Now that it is in stable status, I think it is final decision

davidkhala (Tue, 12 May 2020 08:31:38 GMT):
@bretharrison Hi bret, I noticed that sendDeliver is removed from Committer so I has been trying to rebuild our own sendDeliver method. Then I got grpc error `UNIMPLEMENTED: unknown service protos.Deliver` Does it mean even grpc interface is closed for orderer instead of only sdk-node did not provide the capability?

JayJong (Tue, 12 May 2020 13:11:59 GMT):
@heatherp Hi, im using v2.0.0-beta.4 currently, im also having this error with the grpc whereby i have set up a remote network and using local to invoke. Is this an issue of our configuration or a bug in node sdk? Thank you in advance.

JayJong (Tue, 12 May 2020 13:11:59 GMT):
~@heatherp Hi, im using v2.0.0-beta.4 currently, im also having this error with the grpc whereby i have set up a remote network and using local to invoke. Is this an issue of our configuration or a bug in node sdk? Thank you in advance.~

JayJong (Tue, 12 May 2020 13:11:59 GMT):
~@heatherp Hi, im using v2.0.0-beta.4 currently, im also having this error with the grpc whereby i have set up a remote network and using local to invoke. Is this an issue of our configuration or a bug in node sdk? Thank you in advance.~ i managed to solve this by turn the discovery service off `discovery: { enabled: false,`

JayJong (Tue, 12 May 2020 13:11:59 GMT):
~@heatherp Hi, im using v2.0.0-beta.4 currently, im also having this error with the grpc whereby i have set up a remote network and using local to invoke. Is this an issue of our configuration or a bug in node sdk? Thank you in advance.~ i managed to solve this by turning the discovery service off `discovery: { enabled: false,`

davidkhala (Tue, 12 May 2020 15:16:26 GMT):
@bestbeforetoday Hi Mark, during these days I am confused by the problem "When should we use SeekOldest instead of SeekSpecified with number==0" :joy:

JayJong (Tue, 12 May 2020 17:16:11 GMT):
for others who are facing this issue also, i have solved the handshake error by implementing the TLSCA. this guide is helpful, https://github.com/pamandrejko/fabric-ca/tree/FAB-17438/docs/source/deployguide

JayJong (Wed, 13 May 2020 08:15:11 GMT):
k

bestbeforetoday (Wed, 13 May 2020 09:37:16 GMT):
Which specific admin capabilities are you needing to drive from JavaScript code? And what is the blocker to using CLI commands (either in scripts or driven from within JavaScript code)? We drive CLI commands from code in the SDK automated tests (for example: https://github.com/hyperledger/fabric-sdk-node/blob/b8cc3a8f6ccca55589c60efd98b011a71eab0ea0/test/ts-scenario/steps/lib/contract.ts#L272). I'd really like to better understand any pain points and blockers people are hitting

davidkhala (Wed, 13 May 2020 09:43:28 GMT):
I think one of them is not all CLI command support pipeline back to nodejs, while most of them ouput to file instead of js runtime. For example, channel create will output a genesis file, And we deliver it to peer that let them join. But in old sdk we could have getGenesisBlock anytime if client is permitted.

davidkhala (Wed, 13 May 2020 09:43:28 GMT):
I think one of them is not all CLI command support pipeline back to nodejs, while most of them ouput to file instead of pipe to stdout. For example, channel create will output a genesis file, And we deliver it to peer that let them join. But in old sdk we could have getGenesisBlock anytime if client is permitted, then we do not have to keep the output of channel creation.

davidkhala (Wed, 13 May 2020 09:58:53 GMT):
Finally, it is about we lost the function to easily fetch block from orderer. (But I am playing some trick to s build eventer out-of committer. And it works.)

davidkhala (Wed, 13 May 2020 09:58:53 GMT):
Finally, it is about we lost the function to easily fetch block from orderer. (But I am playing some trick to build an eventer out-of committer. And it works. LOL)

ycarmel (Wed, 13 May 2020 11:33:26 GMT):
Hello, I'm getting the following error on the client side when using submitTransaction (using the node sdk) once the connected peer is restarted. It seems that the completion strategy marks this peer as failing, though the peer is back up normally. Is this a known issue? `No successful events received\n at AllForTxStrategy.checkCompletion`

ycarmel (Wed, 13 May 2020 11:33:26 GMT):
Hello, I'm getting the following error on the client side when using submitTransaction (using the node sdk) once the connected peer is restarted. It seems that the completion strategy marks this peer as failing, though the peer is back up normally. Is this a known issue? (Using Fabric 2.0, Node SDK 2.0) `No successful events received\n at AllForTxStrategy.checkCompletion`

ycarmel (Wed, 13 May 2020 11:33:26 GMT):
Hello, I'm start getting the following error on the client side when using submitTransaction (using the node sdk) once the connected peer is restarted. It seems that the completion strategy marks this peer as failing, though the peer is back up normally. Is this a known issue? (Using Fabric 2.0, Node SDK 2.0) `No successful events received\n at AllForTxStrategy.checkCompletion`

ycarmel (Wed, 13 May 2020 11:33:26 GMT):
Hello, I start getting the following error on the client side when using submitTransaction (using the node sdk) once the connected peer is restarted. It seems that the completion strategy marks this peer as failing, though the peer is back up normally. Is this a known issue? (Using Fabric 2.0, Node SDK 2.0) `No successful events received\n at AllForTxStrategy.checkCompletion`

ycarmel (Wed, 13 May 2020 11:33:26 GMT):
Hi, I have an failures to Submit transactions once the peer is restarted. All subsequent transaction submits ends with this error. If I restart the client, all back to normal.

ycarmel (Wed, 13 May 2020 11:33:26 GMT):
Once the peer is restarted, all subsequent transaction submits ends with this error. If I restart the client, all back to normal.

bestbeforetoday (Wed, 13 May 2020 16:02:20 GMT):
It is not a known issue. Is this just when a peer is restarted during submit of a single transaction, so subsequent transaction submits work as expected? Or does the restart of the peer cause all subsequent transaction submits to fail in this way?

bestbeforetoday (Wed, 13 May 2020 16:03:33 GMT):
Also, in case you really are using v2.0, it would be good to try v2.1 of both Fabric and the Node SDK

ycarmel (Thu, 14 May 2020 05:49:13 GMT):
Once the peer restarts and client stops working for all subsequent transaction submits. If I restart the client, he's back to normal.

ycarmel (Thu, 14 May 2020 05:50:05 GMT):
The transaction are actually passing endorsement and sent to the orderer, but the client event listening stops working.

ycarmel (Thu, 14 May 2020 05:50:05 GMT):
The transactions are actually passing endorsement and sent to the orderer, but the client event listening stops working.

ycarmel (Thu, 14 May 2020 05:52:49 GMT):
Here is the SDK debug log at the point of failiure if that's helpful: ```{"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.251Z","msg":"[TransactionEventHandler]: constructor: transactionId = 09f1bf59eaee26278517d59eef58a1e17be485c5c73 c5eb1d3e3c18121d5917a, options = {\"commitTimeout\":300,\"endorseTimeout\":30}"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.251Z","msg":"[TransactionEventHandler]: startListening - have eventService list - start monitoring"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.251Z","msg":"[TransactionEventHandler]: setListenTimeout setTimeout(300) in seconds for transaction 09f1bf59eaee 26278517d59eef58a1e17be485c5c73c5eb1d3e3c18121d5917a"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.252Z","msg":"[TransactionEventHandler]: setListenTimeout - end"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.253Z","msg":"[EventService]: isStarted[hlf-peer--karga--peer0] - #1 - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.254Z","msg":"[EventService]: buildRequest[hlf-peer--karga--peer0] - #1 - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.254Z","msg":"[IdentityContext]: calculateTransactionId - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.254Z","msg":"[IdentityContext]: serializeIdentity - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.256Z","msg":"[IdentityContext]: calculateTransactionId - d2c616692f1019d3e7a2bb8f5ae6ffb06cfd4072f193fdb064a5236 9f83b1027"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.256Z","msg":"[Channel]: buildChannelHeader[identities] - start - type 5 chaincode_id tx_id d2c616692f1019d3e7a2bb8f5ae6ffb06cfd4072f193fdb064a52369f83b1027"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.256Z","msg":"[Client]: getClientCertHash: gateway client - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.257Z","msg":"[IdentityContext]: serializeIdentity - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.259Z","msg":"[ServiceAction]: sign[EventService:hlf-peer--karga--peer0] - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.259Z","msg":"[IdentityContext]: sign - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.264Z","msg":"[crypto_ecdsa_aes]: ecdsa signature: Signature {\n r:\n ,\n s:\n ,\n recoveryParam: 0 }"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.264Z","msg":"[EventService]: send[hlf-peer--karga--peer0] - #1 - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.264Z","msg":"[EventService]: send[hlf-peer--karga--peer0] - #1 - using preassigned targets"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.264Z","msg":"[ServiceAction]: getSignedEnvelope[EventService:hlf-peer--karga--peer0] - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.264Z","msg":"[ServiceEndpoint]: isConnectable[Eventer-hlf-peer--karga--peer0] - start "} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.264Z","msg":"[Eventer]: checkConnection[hlf-peer--karga--peer0] - start"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.265Z","msg":"[Eventer]: checkConnection[hlf-peer--karga--peer0] - end"} {"level":"debug","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.265Z","msg":"[AllForTxStrategy]: checkCompletion:{\"success\":0,\"fail\":1,\"expected\":1}"} {"level":"warn","fabric_node_sdk":true,"time":"2020-05-13T12:25:11.266Z","msg":"[TransactionEventHandler]: strategyFail: commit failure for transaction \"09f1bf59eaee26278517d59eef58a1e17be485c5c73c5eb1d3e3c18121d5917a\": Error: No successful events received"} ```

ycarmel (Thu, 14 May 2020 05:54:58 GMT):
I am using 2.0.beta4 version of the SDK.

nkalichynskyi (Thu, 14 May 2020 06:13:59 GMT):
@bestbeforetoday for us it was huge advantage of node-sdk to be able to specify private keys in ccp and not storing those anywhere in the file system. For actions like chaincode installation/instantiation or channel create/update CLI will require having admin private key in file system.

mahoney1 (Thu, 14 May 2020 08:31:19 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

ycarmel (Thu, 14 May 2020 11:12:04 GMT):
Upgraded to v2.1, still same issue

ycarmel (Thu, 14 May 2020 11:16:07 GMT):
Upgraded to v2.1, still same issue

nkalichynskyi (Thu, 14 May 2020 12:43:41 GMT):
@bestbeforetoday our main concern is that using CLI requires having admin private keys in the file system for administrative operations. Node sdk allowed us to avoid this.

SharedMocha (Thu, 14 May 2020 17:01:09 GMT):
Here you have two orgs which are org1 and org2 with one node each. Nodes are using cocuchdb for storing channel data. Org 1 Nodes/Peers - peer0.org1.example.com using couchdb0 Org 2 Nodes/Peers - peer0.org2.example.com using couchdb1 ca_org1 - Is org1 certificate authority to issue certs ca_org2 - Is org2 certificate authority to issue certs ca_orderer - Is the ordering service that is managing the network Others are channels where you create transactions between orgs

SharedMocha (Thu, 14 May 2020 17:01:09 GMT):
Here you have two orgs which are org1 and org2 with one node each. Nodes are using couchdb for storing channel data. Org 1 Nodes/Peers - peer0.org1.example.com using couchdb0 Org 2 Nodes/Peers - peer0.org2.example.com using couchdb1 ca_org1 - Is org1 certificate authority to issue certs ca_org2 - Is org2 certificate authority to issue certs ca_orderer - Is the ordering service that is managing the network Others are channels where you create transactions between orgs

SharedMocha (Thu, 14 May 2020 17:01:09 GMT):
Here you have two orgs which are org1 and org2 with one node each. Nodes are using couchdb for storing channel data. Org 1 Nodes/Peers - peer0.org1.example.com using couchdb0 Org 2 Nodes/Peers - peer0.org2.example.com using couchdb1 ca_org1 - Is org1 certificate authority to issue certs ca_org2 - Is org2 certificate authority to issue certs ca_orderer - Is the ordering service that is managing the network Others containers are smart contract execution containers working in sync with nodes/peers

SharedMocha (Thu, 14 May 2020 17:01:09 GMT):
Here you have two orgs which are org1 and org2 with one node each. Nodes are using couchdb for storing data. Org 1 Nodes/Peers - peer0.org1.example.com using couchdb0 Org 2 Nodes/Peers - peer0.org2.example.com using couchdb1 ca_org1 - Is org1 certificate authority to issue certs ca_org2 - Is org2 certificate authority to issue certs ca_orderer - Is the ordering service that is managing the network Others containers are smart contract execution containers working in sync with nodes/peers

SharedMocha (Thu, 14 May 2020 17:01:09 GMT):
Here you have two orgs which are org1 and org2 with one node each. Nodes are using couchdb for storing data. *Org 1 Nodes/Peers - peer0.org1.example.com using couchdb0 *Org 2 Nodes/Peers - peer0.org2.example.com using couchdb1 *ca_org1 - Is org1 certificate authority to issue certs *ca_org2 - Is org2 certificate authority to issue certs *ca_orderer - Is the ordering service that is managing the network *Others containers are smart contract execution containers working in sync with nodes/peers

bestbeforetoday (Thu, 14 May 2020 19:41:10 GMT):
Look further along the container name and you'll see _fabcar_. They are the chaincode containers running the _fabcar_ smart contract

bestbeforetoday (Thu, 14 May 2020 19:41:47 GMT):
Oops, beat me to it!

Rachit-gaur (Thu, 14 May 2020 22:12:49 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?

davidkhala (Fri, 15 May 2020 02:58:27 GMT):
@nkalichynskyi Are you sure? Node sdk still need private key from file system for admin operation. It is no matter what is your development tools

nkalichynskyi (Fri, 15 May 2020 05:28:05 GMT):
@davidkhala it has an option to store those in memory

bestbeforetoday (Fri, 15 May 2020 08:12:00 GMT):
I seem to have lost your original post from RocketChat. If you still see issues with Fabric v2.1 and Node SDK v2.1, please raise a Jira with as much detail as practical: https://jira.hyperledger.org/browse/FABN

ycarmel (Fri, 15 May 2020 08:46:35 GMT):
Thanks, Here: https://jira.hyperledger.org/browse/FABN-1557 @bestbeforetoday [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GQE7nSEy4xrPGSsGc)

rbole (Fri, 15 May 2020 14:11:15 GMT):
Can anybody provide an example how to reenroll a user with fabric-ca or what is the best way to handle the situation if you have lost the user credentials in the local wallet?

davidkel (Sat, 16 May 2020 08:25:36 GMT):
So long as you still have the secret and not set the max maximum number of times you can enroll a registered user, then just enroll again using that secret. You can only use the re-enroll capability using the enrolled identity (ie private key, public certificate) which is what you say you have lost. If you don't have either then you cannot enroll/reenroll that user.

rbole (Sat, 16 May 2020 14:43:04 GMT):
Ok thanks, per default if I use the register.js script the maxenrollments property is set to 1, after I update this value with the fabric-ca-client command to two, I can enroll the identity as well, as you mentioned. Do you know some example for the reenrollmet ? I can not find one, not even in the test cases.

davidkel (Sat, 16 May 2020 15:06:28 GMT):
I see one use of reenroll fabric-ca-services.tests.js. Looks like it takes a user object as input

rbole (Sat, 16 May 2020 15:07:26 GMT):
Ok, I will look into this tomorrow, thanks

davidkhala (Sun, 17 May 2020 06:16:04 GMT):
But if the process exit it will die out. And will not be available in next runtime. We should never expect a process will keep on running.

davidkhala (Sun, 17 May 2020 06:18:23 GMT):
I guess the sdk-node capability of package chaincode is now removed. I ask this for a confirmation because fabric document still saying we could use sdk-node to do that. https://hyperledger-fabric.readthedocs.io/en/release-2.0/chaincode_lifecycle.html#install-and-define-a-chaincode

davidkhala (Sun, 17 May 2020 06:18:23 GMT):
I guess the sdk-node capability of package chaincode is now removed. I ask this for a confirmation because fabric document still saying we could use sdk-node to do that. https://hyperledger-fabric.readthedocs.io/en/release-2.0/chaincode_lifecycle.html#step-one-packaging-the-smart-contract

davidkel (Sun, 17 May 2020 07:11:02 GMT):
That depends how you load it memory. You could obtain the private key from a secure location which isn't the file system

davidkhala (Sun, 17 May 2020 07:13:36 GMT):
@davidkel More precise than my expression. :thumbsup:

davidkhala (Sun, 17 May 2020 07:15:59 GMT):
No matter how, fabric does not prohibit you to build own version of sdk based on nodejs to support admin level operations. It is a time and effort problem.

Diegoescalonaro (Tue, 19 May 2020 12:00:51 GMT):
Hi guys! Does anyone know about the Node SDK browser compatible? I've found this issue in Jira but it's in the backlog (https://jira.hyperledger.org/browse/FABN-653). Maybe a light version of the SDK could make sense...

davidkhala (Tue, 19 May 2020 12:51:18 GMT):
Basically, Node SDK is not designed to be package as Browser environment. But you could try to play with 'fabric-proto' to establish grpc connect from website to network. (I have not experimented although)

SpecialAgentCooper (Tue, 19 May 2020 16:20:30 GMT):
Hi everyone, I have a workflow that I'm attempting to implement in HF using the node sdks and I'm trying to figure out the best way to restrict my chaincode so that certain functions are only permitted for use by certain organisations. - This seems to be the way to do it https://hyperledger.github.io/fabric-chaincode-node/release-2.1/api/fabric-shim.ClientIdentity.html - does anyone have any examples of chaincode where the ClientIdentity features have been implemented? - Is installing different chaincode on different organisations' nodes a good solution? If not, why? Those are my main concerns at this point, but I'm also figuring out network deployment and customisation. To demonstrate my POC, I'll probably use the test net with orgs 1 & 2 but it would be nice to configure my own network. The docs on this are helpful but a worked example would be great - could anyone point me to resources like this? I appreciate I'm asking a lot, so any help you can offer is greatly appreciated, thanks!

randyshu (Wed, 20 May 2020 08:22:59 GMT):
Hi,when call invokeChaincode in the same context, I got an error : `error: transaction returned with failure: Error: INVOKE_CHAINCODE failed: transaction ID: 2e270d3e30b7718b112092fb5bd02d16bbdd44cb057a6228ccb1af0f870b7025: execute failed: error sending: txid: 2e270d3e30b7718b112092fb5bd02d16bbdd44cb057a6228ccb1af0f870b7025(ch1) exists`

randyshu (Wed, 20 May 2020 08:23:11 GMT):
any ideas for that

bestbeforetoday (Wed, 20 May 2020 08:28:58 GMT):
It sounds like you are trying to submit two different transactions with the same transaction ID. Each transaction must have a unique transaction ID

randyshu (Wed, 20 May 2020 08:29:34 GMT):
yeah , you are right!

randyshu (Wed, 20 May 2020 08:29:56 GMT):

Clipboard - May 20, 2020 4:29 PM

randyshu (Wed, 20 May 2020 08:30:36 GMT):
but I call this method , use the same channel & same txId ,is it Ok?

bestbeforetoday (Wed, 20 May 2020 08:54:58 GMT):
Ah, I see. You're invoking from within a smart contract. It would be worth asking on the #fabric-chaincode-dev channel for chaincode questions

randyshu (Wed, 20 May 2020 09:37:54 GMT):
ok,thank you。

lovisharora (Wed, 20 May 2020 11:49:52 GMT):
Has joined the channel.

lovisharora (Wed, 20 May 2020 11:51:53 GMT):
hello guys , can anyone tell me about vault storing system for private key, which module or npm package to use for it and is it a secure way to secure keys ?

bestbeforetoday (Wed, 20 May 2020 16:38:51 GMT):
You can use a Hardware Security Module (HSM) if you don't want the client application to ever have access to the private keys. See the bottom of this page for details of how to use an HSM with the Node SDK: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html

icarrascol (Wed, 20 May 2020 21:51:57 GMT):
hello everyone does the sdk support node v12?

randyshu (Thu, 21 May 2020 11:07:11 GMT):
no one reply me...

randyshu (Thu, 21 May 2020 11:09:04 GMT):
and I found the truth is I defined many contract instance in one chaincode and when I call invokechaincode i got an error。

randyshu (Thu, 21 May 2020 11:10:34 GMT):
so base on above , can sub-contracts call each other?

lovisharora (Thu, 21 May 2020 11:38:22 GMT):
ok thanks, this is a good option, but is there a way to store private key locally on the users machine like meta mask do, see , i am really confused , that where should i store private key of users, and i don't wanna store it in server, so can you help me with this please ?

bestbeforetoday (Thu, 21 May 2020 12:29:38 GMT):
Smart contracts within the same chaincode are all running in the same Node process (and are effectively just sub-components of the same chaincode) so you could just call the required code directly as a JavaScript function call. All the work that gets done will happen as part of the same transaction

randyshu (Thu, 21 May 2020 12:59:52 GMT):

Clipboard - May 21, 2020 8:59 PM

randyshu (Thu, 21 May 2020 13:01:08 GMT):
it seems to can not new directly...:thinking:

bestbeforetoday (Thu, 21 May 2020 15:03:18 GMT):
You might need to move the code you want to invoke from multiple smart contracts out into a helper class/function, and have them both call that shared code. I think one of the motivations for hosting multiple smart contracts within a chaincode is so that they can share library and utility code. If you want strict separation of the code then you might want them in separate chaincode

Shinsuke (Thu, 21 May 2020 16:57:55 GMT):
Has joined the channel.

randyshu (Fri, 22 May 2020 02:03:06 GMT):
Thank you for your kind reply

lovisharora (Fri, 22 May 2020 04:59:54 GMT):
@bestbeforetoday ?

bestbeforetoday (Fri, 22 May 2020 06:51:18 GMT):
The only way I have used Vault is to inject secrets into either environment variables or files in a Kubernetes hosted container. So the application within the container just accessed secrets through those environment variables or files with no knowledge of Vault. I am certainly no expert in this area so other people might have better information on other ways it can be used

lovisharora (Fri, 22 May 2020 12:00:15 GMT):
ok thanks for the help.

AaronWilmoth (Sat, 23 May 2020 17:06:40 GMT):
Has joined the channel.

BrajeshA (Mon, 25 May 2020 04:22:46 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

BrajeshA (Mon, 25 May 2020 04:22:46 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 organization, country , state etc during enrollment with nodejs client- seems like I can add affiliation, which is added in OU . All these work with fabric-ca-client command line but I would like to use it in nodejs

Matrixik (Mon, 25 May 2020 08:26:22 GMT):
Has joined the channel.

phutchins (Mon, 25 May 2020 14:18:27 GMT):
Has joined the channel.

phutchins (Mon, 25 May 2020 14:18:31 GMT):
Anyone seen errors with contract.addContractListener where you get `Error notifying contract listener message=this.listener is not a function` ``` 2020-05-25T14:00:02.593Z - warn: [ContractListenerSession]: Error notifying contract listener message=this.listener is not a function, stack=TypeError: this.listener is not a function at ContractListenerSession.notifyListener (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/contractlistenersession.js:39:24) at ContractListenerSession.onContractEvent (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/contractlistenersession.js:31:24) at /Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/listeners.js:38:19 at blockEvent.getTransactionEvents.filter.map (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/listeners.js:55:40) at Array.map () at /Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/listeners.js:55:14 at Array.from.map (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/blockeventsource.js:115:71) at Array.map () at BlockEventSource.notifyListeners (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/blockeventsource.js:115:53) at AsyncNotifier.run (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/asyncnotifier.js:22:24) ```

phutchins (Mon, 25 May 2020 14:18:31 GMT):
Anyone seen errors in V2.1 with contract.addContractListener where you get `Error notifying contract listener message=this.listener is not a function` ``` 2020-05-25T14:00:02.593Z - warn: [ContractListenerSession]: Error notifying contract listener message=this.listener is not a function, stack=TypeError: this.listener is not a function at ContractListenerSession.notifyListener (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/contractlistenersession.js:39:24) at ContractListenerSession.onContractEvent (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/contractlistenersession.js:31:24) at /Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/listeners.js:38:19 at blockEvent.getTransactionEvents.filter.map (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/listeners.js:55:40) at Array.map () at /Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/listeners.js:55:14 at Array.from.map (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/blockeventsource.js:115:71) at Array.map () at BlockEventSource.notifyListeners (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/blockeventsource.js:115:53) at AsyncNotifier.run (/Users/philip/github/dfm-suite/blockchain-node/dfmd/javascript/node_modules/fabric-network/lib/impl/event/asyncnotifier.js:22:24) ```

HLFPOC (Mon, 25 May 2020 19:07:27 GMT):
Hi Team, Has anyone used `Network.addCommitListener()` function of sdk version `2.1` ? I am not able to listen transaction commit events after submitting a transaction using this function. I think I am missing something while implementing the `listener` callback function but not able to figure out what is the exact issue. Can anyone please share some inputs/reference implementations ?

davidkhala (Mon, 25 May 2020 22:20:35 GMT):
For point 1: you could pass PEM style CSR in enroll and reenroll; For point 2: it is not implemented yet

BrajeshA (Mon, 25 May 2020 22:40:06 GMT):
thanks

BrajeshA (Mon, 25 May 2020 22:40:06 GMT):
thanks. Tt does not look like renroll takes new PEM CSR. it uses jsut current commonName and generates new certificate. am I missing something? enroll does take PEM CSR. what is difference between these two ?

BrajeshA (Mon, 25 May 2020 22:54:40 GMT):
one more Question -- is there any way to unregister an Id if I have not enrolled.

BrajeshA (Mon, 25 May 2020 22:55:14 GMT):
One more question -- is there any way to unregister an Id if I have not enrolled.

BrajeshA (Mon, 25 May 2020 22:55:14 GMT):
One more question - Is there any way to unregister an Id if I have not enrolled?

BrajeshA (Tue, 26 May 2020 06:11:01 GMT):
@bestbeforetoday wondering if you can help with above questions ?

byron1st (Tue, 26 May 2020 08:17:22 GMT):
Has joined the channel.

byron1st (Tue, 26 May 2020 08:17:22 GMT):
Hello, I just found that the brand new SDK `fabric-network` and `fabric-common` don't have administration APIs such as creating channels, installing chaincodes, upgrading chaincodes, etc. Is this intended or are these APIs developing in progress? If it is intended, then should operators use `peer` CLI to upgrade chaincodes? In v1.4.x I built an admin server to do these jobs, but it seems impossible in v2.1 Fabric.

bestbeforetoday (Tue, 26 May 2020 15:37:43 GMT):
That sounds to me like whatever you have passed in as the contract listener is not a function. Have a look at the example code at the bottom of the documentation section for `addContractListener()`: https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Contract.html#addContractListener

bestbeforetoday (Tue, 26 May 2020 15:44:40 GMT):
I added a fairly detailed reply to your Stack Overflow question, with links to some sample code: https://stackoverflow.com/questions/61876515/implement-transaction-commit-listener-using-fabric-sdk-node-v2-1 Here is a link to the line in the sample code where the commit listener is added: https://github.com/hyperledger/fabric-sdk-node/blob/ba1197999fd32122546e9b1ab6844a26f095fce7/test/ts-scenario/config/handlers/sample-transaction-event-handler.ts#L63

phutchins (Tue, 26 May 2020 18:46:36 GMT):
I ended up finding that it was an issue with syntax between 1.4 and 2.1. The example code was helpful and also the examples in fabric-samples was helpful. Thanks!

cryptopatrick (Tue, 26 May 2020 20:07:10 GMT):
Has joined the channel.

lepar (Wed, 27 May 2020 03:37:57 GMT):
Just sent a message in the fabric list asking that.

lepar (Wed, 27 May 2020 03:41:45 GMT):
This might have something to do with it. https://techcrunch.com/2020/05/22/ibm-confirms-layoffs-are-happening-but-wont-provide-details/ We all know blockchain is about to takeoff in services and removing the admin functions, those who use it, would most likely turn to them for consultancy. And this is most likely because IBM is the one to mostly contribute to fabric, even though it's open source, they have the majority control of development.

divyasekaran (Wed, 27 May 2020 04:27:51 GMT):
Hello, I have modified fabcar example to save the data from an API. It works fine, now I need to create a UI with login and dashboard manage pages. I have used node SDK for the process of saving the data. Is there any sample documentation or sample apps available to develop a UI using HTML and Express JS on the basis of hyperledger fabric

BrettLogan (Wed, 27 May 2020 06:25:58 GMT):
Has joined the channel.

BrettLogan (Wed, 27 May 2020 06:25:59 GMT):
That makes little sense. Our decision for not including admin features in the SDK came a long time ago.

byron1st (Wed, 27 May 2020 06:31:30 GMT):
@lepar That goes too far, I think. Maybe there are some good reasons for not including admin features in SDK and I think it is related to some complexity of the distributed governance of chaincodes. Anyway, as @BrettLogan said, if removing admin features from SDK is the "decision" already confirmed, I will find other options to do that such as using CLI. No problem. :)

BrettLogan (Wed, 27 May 2020 06:33:02 GMT):
Maintaining API's for every single option in fabric is no easy task. Java and Node SDK development is done by only a few devs, ~5, we have to balance providing new features and maintaining code. Given that the management tasks (like adding new orgs and channels) are performed infrequently in production, it makes sense that if we had to exclude something, to exclude these, having to perform this functionality on the CLI is a small compromise to us maintaining a feature rich API elsewhere. It also allows us to dedicate resources to improving the existing chaincode experience, 3 of the SDK devs have been working on bringing the modern Contract API to all of the SDK's, including trying to get a GA release of the Go SDK. Another developer has been working on a major new chaincode feature we haven't announced yet that will change the chaincode development experience for everyone in an incredibly positive way. Removing the admin api's purely allows us to maintain needed features you can't live without (invoking) while allowing you to perform other actions that occur less frequently (config updates) via existing means. And it allows us to bring new features to the market

BrettLogan (Wed, 27 May 2020 06:34:34 GMT):
I am one of the biggest opponents of removing the API's from the SDK, I lead the fabric test teams, and it's not fun to have to script those actions for automated test suites. But I also recognize that things have to move forward, and somethings have to be left behind.

cryptopatrick (Wed, 27 May 2020 06:34:49 GMT):
IBM has some 350,000 employees. I'm pretty sure blockchain is less than a dot on IBM's map of where to make cuts.

BrettLogan (Wed, 27 May 2020 06:35:42 GMT):
That being said, fabric is an open source project, anyone is welcome to contribute or extend our existing codebase to include the admin API's if they so wish.

davidkhala (Wed, 27 May 2020 06:39:40 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/ba1197999fd32122546e9b1ab6844a26f095fce7/fabric-ca-client/lib/FabricCAClient.js#L191 I guess you did not see this? I remember delete Identity is supported via identityService

davidkhala (Wed, 27 May 2020 06:50:56 GMT):
People who get interested with use nodejs implement admin operation could have a look at my sample. https://github.com/davidkhala/fabric-common/tree/master/nodejs/admin This directory and npm module is part of a higher level project. For people interested in e2e test and usage sample, https://github.com/davidkhala/delphi-fabric Frankly, thanks to new design of fabric-sdk-node, it is more easy for developer to build their own admin API.

davidkhala (Wed, 27 May 2020 06:52:53 GMT):
a sample of make your own admin API https://github.com/davidkhala/fabric-common/tree/master/nodejs/admin test case and integrated sample at https://github.com/davidkhala/delphi-fabric

BrettLogan (Wed, 27 May 2020 06:56:48 GMT):
Thanks as always David!

byron1st (Wed, 27 May 2020 06:57:49 GMT):
@davidkhala Great works! Thanks!

davidkhala (Wed, 27 May 2020 06:59:03 GMT):
@BrettLogan I have a proposal that is it possible for fabric decision team to let community to do the admin work And in official document we could simply saying: Hey all , these are those active and recommended third-party implementation

davidkhala (Wed, 27 May 2020 07:00:54 GMT):
My project document is not fully clear due to it is in quick iteration. But at least a short e2e from channel creation to invoke transaction is done.

davidkhala (Wed, 27 May 2020 07:05:57 GMT):
I am not IBM employee. But also I have to thanks and support their decision. Remove admin level sdk is kind of short-pain. During my rewriting admin API. I get to know how clumsy the old API designed. If we all rely on it as we always lazy. We will never know these in detail. Furthermore, one of greatest invention of 2.x sdk-node is the integrated exported `fabric-protos` It is the basis of exploring all fabric power

davidkhala (Wed, 27 May 2020 07:05:57 GMT):
I am not IBM employee. But also I have to thanks and support their decision. Remove admin level sdk is kind of short-pain. During my rewriting admin API. I get to know how clumsy the old API designed. If we all rely on it as lazy all the time. we will never know these in detail. Furthermore, one of greatest invention of 2.x sdk-node is the integrated exported `fabric-protos` It is the basis of exploring all fabric power

BrettLogan (Wed, 27 May 2020 07:18:05 GMT):
I swear I will try to remember to reply to this in the morning, it's 3AM and I'm heading out for for the night

bestbeforetoday (Wed, 27 May 2020 08:43:52 GMT):
Yes, there were changes there (hopefully for the better!). This doc page should highlight all the key changes to consider when migrating to v2.1: https://hyperledger.github.io/fabric-sdk-node/master/tutorial-migration.html

lepar (Wed, 27 May 2020 13:31:47 GMT):
Hey, I see all the valid points. What I don't understand was why it was removed from 1.4 to 2.x not just chaincode operations, but others such as creating channels. It was working fine on 1.4, why not just leave it there?

davidkhala (Wed, 27 May 2020 13:39:41 GMT):
I would say: This is not the IBM way to leave something "as-is" without give a out of maintain warning. You can see channel operation is almost unchanged from 1.4. So at least now you could still use some 1.4 API to operate 2.x channel. 2.x sdk have been massively refactored, especially on design of client, channel, peer and orderer endpoint. Leave it there will conflict with current design unless someone going to rewrite it.

davidkhala (Wed, 27 May 2020 13:39:41 GMT):
I would say: This is not the IBM way to leave something "as-is" without give a out of maintain warning. You can see channel operation is almost unchanged from 1.4. So at least now you could still use some 1.4 API to operate 2.x channel. 2.x sdk have been massively refactored, especially on design of client, channel, peer and orderer endpoint. Leaving it there will conflict with current design before rewrite.

HLFPOC (Wed, 27 May 2020 18:45:24 GMT):

DefaultEventHandlerStrategies for fabric-sdk-node

HLFPOC (Wed, 27 May 2020 18:45:24 GMT):

DefaultEventHandlerStrategies for fabric-sdk-node

BrajeshA (Wed, 27 May 2020 20:09:21 GMT):
however the top level fabricCAservice.reenroll ignores the CSR fields. https://github.com/hyperledger/fabric-sdk-node/blob/ba1197999fd32122546e9b1ab6844a26f095fce7/fabric-ca-client/lib/FabricCAServices.js#L253

BrajeshA (Wed, 27 May 2020 20:09:21 GMT):
however the top level fabricCAservice.reenroll ignores the CSR fields. https://github.com/hyperledger/fabric-sdk-node/blob/ba1197999fd32122546e9b1ab6844a26f095fce7/fabric-ca-client/lib/FabricCAServices.js#L253

BrajeshA (Wed, 27 May 2020 20:09:21 GMT):
However, the top level fabricCAservice.reenroll ignores the CSR fields- https://github.com/hyperledger/fabric-sdk-node/blob/ba1197999fd32122546e9b1ab6844a26f095fce7/fabric-ca-client/lib/FabricCAServices.js#L253 Thanks David for pointing to idenity delete . let me check that.

BrajeshA (Wed, 27 May 2020 20:09:21 GMT):
However, the top level fabricCAservice.reenroll ignores the CSR fields- https://github.com/hyperledger/fabric-sdk-node/blob/ba1197999fd32122546e9b1ab6844a26f095fce7/fabric-ca-client/lib/FabricCAServices.js#L253 Thanks David for pointing to identity delete. Let me check that.

davidkhala (Thu, 28 May 2020 00:42:26 GMT):
if it is me I would think twice why they donot expose it before I create a pr to change it

bestbeforetoday (Thu, 28 May 2020 09:48:10 GMT):
Oh dear, that looks like a documentation bug, probably introduced by me. Did you raise a bug report in Jira (https://jira.hyperledger.org/projects/FABN)? I'll fix it anyway. Thanks for letting us know

bestbeforetoday (Thu, 28 May 2020 09:49:28 GMT):
As a stop-gap, the v1.4 documentation has the correct descriptions, and the behaviour is the same in v2.1: https://hyperledger.github.io/fabric-sdk-node/release-1.4/module-fabric-network.html#.DefaultEventHandlerStrategies

bestbeforetoday (Thu, 28 May 2020 09:53:25 GMT):
I didn't see an issue in Jira so I've raised one: https://jira.hyperledger.org/browse/FABN-1565

davidkhala (Thu, 28 May 2020 10:02:43 GMT):
But for the CSR point I agreed with your proposal A jira ticket raised at https://jira.hyperledger.org/browse/FABN-1564

bestbeforetoday (Thu, 28 May 2020 11:27:03 GMT):
It's now fixed in the published docs for v2.1

Adhavpavan (Thu, 28 May 2020 17:07:45 GMT):
Has joined the channel.

Adhavpavan (Thu, 28 May 2020 17:08:33 GMT):
transaction by id

Adhavpavan (Thu, 28 May 2020 17:09:30 GMT):
How we can get transaction by tx id using fabric node sdk in (fabric version - 2.1)?

bestbeforetoday (Thu, 28 May 2020 19:12:54 GMT):
Currently the v2.1 SDK doesn't provide that capability. There is a issue reported in Jira for it here: https://jira.hyperledger.org/browse/FABN-1509

phutchins (Thu, 28 May 2020 19:55:24 GMT):
Is it possible in v2.1 SDK to add event listeners by event name? It looks to me like there is no way to do that currently and you have to subscribe to all events of a type and then filter by event name.

davidkhala (Fri, 29 May 2020 02:07:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=iKceAuntjbKCyXhtE) you can. Further more, it support to match and filter event based on your provided regular expression. If you are sure the chaincode event mechanism work abnormally. you could help to fix it.

Adhavpavan (Fri, 29 May 2020 05:23:39 GMT):
@bestbeforetoday Is there any way to get transaction by tx id in fabric 2.0?

bestbeforetoday (Fri, 29 May 2020 09:27:29 GMT):
Right now you are correct that adding a contract event listener using `Contract.addContractListener()` you just register for all the contract (or chaincode) events emitted by that chaincode. It's very simple in your listener function to look at the event name and ignore all but the one you care about. See the code example in the documentation for addContractListener: https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Contract.html#addContractListener We certainly could add an option to addContractListener to specify either a specific event name or a regex matching event names you want to receive, similar to the _fabric-gateway-java_ SDK and v1.4 Node SDK. The main reason it's not there is that I didn't have time to get it done for the 2.x release. If it's something you think it's helpful enough to add, could you raise a story for it in Jira: https://jira.hyperledger.org/projects/FABN

bestbeforetoday (Fri, 29 May 2020 09:34:08 GMT):
At the gRPC layer, that capability is still supported by Fabric. During the reengineering of the Node SDK implementation for v2.x, that capability got left out in the SDK. The issue in Jira I mentioned above is a request to have it added back. To help inform priority of work (because we just don't have the resource to do everything), it would be really helpful to have some business/application context on what you are trying to achieve that requires this capability. You could add that as a comment on the Jira. Understanding the requirement helps ensure that any implementation best satisfies that requirement too

phutchins (Fri, 29 May 2020 14:33:00 GMT):
@bestbeforetoday awesome thanks so much for the detail. Totally makes sense. And yes, was looking for similar functionality to V1.4 Node SDK. I'll definitely add a story in Jira. I'd be happy to contribute as well. Would you mind giving a few sentences on the way that you would implement it so that I can build it in a way that meets expectations?

bestbeforetoday (Fri, 29 May 2020 14:45:57 GMT):
Sure thing. Probably best if I add that as a comment on the Jira to keep all the information in one place

phutchins (Fri, 29 May 2020 14:54:22 GMT):
@bestbeforetoday perfect. I'll add the story shortly.

BrajeshA (Fri, 29 May 2020 23:22:02 GMT):
Thanks David, It would great to have option to specify all CSR fields or encoded csr during reenroll as well - instead of using just CN during enroll. as of now we lose all information during reenroll. How are others handling this reenroll scenarios?

davidkhala (Sat, 30 May 2020 03:11:26 GMT):
@BrajeshA I guess some will directly use fabric-ca-client CLI or even use another CA vendor

bh4rtp (Sun, 31 May 2020 23:42:50 GMT):
in v2.1, the `fabric-client` is removed. how to transplant the client from `fabric-client` to `fabric-network`? is there an example?

aguel (Mon, 01 Jun 2020 02:48:56 GMT):
https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.html

bh4rtp (Mon, 01 Jun 2020 02:56:29 GMT):
the migration work is much heavy. firstly, all channel and chaincode operations shall be written in command lines. this is simple. and secondly, change to use `fabric-network` instead of `fabric-client`. is there an example using v2.1 sdk for `balance-transfer` or other? thank you for the link.

aguel (Mon, 01 Jun 2020 02:57:30 GMT):
actually the new fabric-network is much easy to use, since it provides high level API compared to the old low level fabric-network methods

aguel (Mon, 01 Jun 2020 02:57:30 GMT):
actually the new fabric-network is much easy to use, since it provides high level API compared to the old low level fabric-client API

aguel (Mon, 01 Jun 2020 02:58:53 GMT):
maybe you got confused, if you are referring to balance-transfer, which is more of a Smart Contract logic, then you are referring to the smart-contract-api. The fabric-network is for client API not for smart contract API

aguel (Mon, 01 Jun 2020 02:58:53 GMT):
maybe you got confused, if you are referring to balance-transfer, which is more of a Smart Contract logic, then you are referring to the fabric-contract-api. The fabric-network is for client API not for smart contract API

bh4rtp (Mon, 01 Jun 2020 03:17:13 GMT):
what about `fabric-contract-api`? is this another sdk?

aguel (Mon, 01 Jun 2020 03:17:39 GMT):
fabric-contract-api and fabric-shim is for Smart Contract development

aguel (Mon, 01 Jun 2020 03:17:51 GMT):
fabric-ca-client and fabric-network is for Fabric Client development

bh4rtp (Mon, 01 Jun 2020 03:19:51 GMT):
yes. i need fabric client dev, such as transaction, query.

aguel (Mon, 01 Jun 2020 03:20:24 GMT):
you can follow the link i shared

bh4rtp (Mon, 01 Jun 2020 03:27:33 GMT):
what is difference between contractapi and shim? we used to use shim to write chaincode, i.e. init, invoke.

aguel (Mon, 01 Jun 2020 03:28:07 GMT):
fabric-contract-api is the new recommended (high level API) when writing smart contract. fabric-shim is the old way

aguel (Mon, 01 Jun 2020 03:30:13 GMT):
they introduce the new fabric-contract-api to provide high level interfaces to smart contract development at the same time eliminate the boilderplate code in fabric-shim API

bh4rtp (Mon, 01 Jun 2020 03:31:38 GMT):
will shim be obsoleted in the future? or co-existed?

aguel (Mon, 01 Jun 2020 03:32:28 GMT):
i think so, it is similar to fabric-client and fabric-network, before developers are using fabric-client a lot, now it has been removed and totally replaced by the new fabric-network

aguel (Mon, 01 Jun 2020 03:33:07 GMT):
fabric-client and fabric-network also co-exist before, now fabric-client has been officially removed in 2.1

bh4rtp (Mon, 01 Jun 2020 03:33:20 GMT):
frequently refactoring. got it.

aguel (Mon, 01 Jun 2020 03:33:32 GMT):
as hyperledger fabric team officially recommend to use the high level APIs instead

bh4rtp (Mon, 01 Jun 2020 03:34:45 GMT):
yes. the old api is too powerful.

aguel (Mon, 01 Jun 2020 03:35:21 GMT):
old API has so many boilerplate and very unstructured .. thats why hyperledger fabric team introduce a much structured set of API

aguel (Mon, 01 Jun 2020 03:37:28 GMT):
my company also completed our migration to 2.1 .. many major changes like X509WalletMixin has now been removed also

bh4rtp (Mon, 01 Jun 2020 03:38:20 GMT):
frankly, the old api is not business oriented. it can do almost as one wants.

bh4rtp (Mon, 01 Jun 2020 03:38:20 GMT):
frankly, the old api is not business oriented. it can do almost as what one wants.

bh4rtp (Mon, 01 Jun 2020 03:38:20 GMT):
frankly, the old api is not business oriented. it can do almost what one wants.

aguel (Mon, 01 Jun 2020 03:40:22 GMT):
they also introduce now the new Identity ProviderRegistry

aguel (Mon, 01 Jun 2020 03:40:30 GMT):
so it is much structured

bh4rtp (Mon, 01 Jun 2020 03:42:38 GMT):
did you write any migration tips?

aguel (Mon, 01 Jun 2020 03:42:57 GMT):
its actually very straight forward and well documented in the official documentation

aguel (Mon, 01 Jun 2020 03:43:23 GMT):
i will give you one important tip

bh4rtp (Mon, 01 Jun 2020 03:43:40 GMT):
i have not used fabric for almost one year. and find so many changes...

aguel (Mon, 01 Jun 2020 03:44:27 GMT):
fabric-shim and fabric-contract-api 2.1.2 is now based on Node12 ... the old 1.4.x is still using Node8 which has also been deprecated

aguel (Mon, 01 Jun 2020 03:44:39 GMT):
Node8 dies last december 2019

bh4rtp (Mon, 01 Jun 2020 03:44:58 GMT):
:grinning:

aguel (Mon, 01 Jun 2020 03:45:52 GMT):
if you use the new 2.1.2, then you are good for Node12 already

bh4rtp (Mon, 01 Jun 2020 03:46:23 GMT):
ok. thanks.

aguel (Mon, 01 Jun 2020 03:46:57 GMT):
:thumbsup:

bh4rtp (Mon, 01 Jun 2020 03:59:37 GMT):
i find a good example for migration. that is `fabric-samples/commercial-paper`. everything i need it does have!

aguel (Mon, 01 Jun 2020 04:00:00 GMT):
:thumbsup:

aguel (Mon, 01 Jun 2020 10:03:21 GMT):
Can i ask if anyone have a link or reference for chaincode testing for fabric-api-contract 2.1.2? Most of the sample unit test codes are still based on fabric-shim. Basically the problem i have is getting an empty Context and ClientIdentity.

aguel (Mon, 01 Jun 2020 10:03:21 GMT):
Can I ask if anyone has a link or reference for chaincode testing for fabric-api-contract 2.1.2? Most of the sample unit test codes are still based on fabric-shim. Basically, the problem I have is getting an empty Context and ClientIdentity. ```class TestContext extends Context { constructor() { super() this.stub = sinon.createStubInstance(ChaincodeStub) this.clientIdentity = sinon.createStubInstance(ClientIdentity, { getIDBytes: identity }) this.logger = { getLogger: sinon.stub().returns(sinon.createStubInstance(winston.createLogger().constructor)), setLevel: sinon.stub(), }; } } ```

aguel (Mon, 01 Jun 2020 10:03:21 GMT):
Can I ask if anyone has a link or reference for chaincode testing for fabric-api-contract 2.1.2? Most of the sample unit test codes are still based on fabric-shim. Basically, the problem I have is getting an empty Context and ClientIdentity. ```class TestContext extends Context { constructor() { super() this.stub = sinon.createStubInstance(ChaincodeStub) this.clientIdentity = sinon.createStubInstance(ClientIdentity, { getIDBytes: identity }) this.logger = { getLogger: sinon.stub().returns(sinon.createStubInstance(winston.createLogger().constructor)), setLevel: sinon.stub(), }; } } ``` and then having something like ``` it('CHAINCODE: Query', async () => { const response = await contract.query(ctx) expect(response).to.equal(ChaincodeStub.RESPONSE_CODE.OK) })```

aguel (Mon, 01 Jun 2020 10:03:21 GMT):
Can I ask if anyone has a link or reference for chaincode testing for fabric-api-contract 2.1.2? Most of the sample unit test codes are still based on fabric-shim. Basically, the problem I have is getting an empty Context and ClientIdentity. ```class TestContext extends Context { constructor() { super() this.stub = sinon.createStubInstance(ChaincodeStub) this.clientIdentity = sinon.createStubInstance(ClientIdentity, { getIDBytes: identity }) this.logger = { getLogger: sinon.stub().returns(sinon.createStubInstance(winston.createLogger().constructor)), setLevel: sinon.stub(), }; } } ``` and then having something like ``` const contract = new MyChaincode() const ctx = new TestContext() it('CHAINCODE: Query', async () => { const response = await contract.query(ctx) expect(response).to.equal(ChaincodeStub.RESPONSE_CODE.OK) })```

aguel (Mon, 01 Jun 2020 10:03:21 GMT):
Can I ask if anyone has a link or reference for chaincode testing for fabric-api-contract 2.1.2? Most of the sample unit test codes are still based on fabric-shim. Basically, the problem I have is getting an empty Context and ClientIdentity. ```class TestContext extends Context { constructor() { super() this.stub = sinon.createStubInstance(ChaincodeStub) this.clientIdentity = sinon.createStubInstance(ClientIdentity, { getIDBytes: identity }) this.logger = { getLogger: sinon.stub().returns(sinon.createStubInstance(winston.createLogger().constructor)), setLevel: sinon.stub(), }; } } ``` and then having something like ``` const contract = new MyChaincode() const ctx = new TestContext() it('CHAINCODE: Query', async () => { const response = await contract.query(ctx) expect(response).to.equal(ChaincodeStub.RESPONSE_CODE.OK) })``` With the chaincode something``` export class MyChaincode extends Contract {}```

bestbeforetoday (Tue, 02 Jun 2020 07:55:35 GMT):
It might be worth posting this question on the #fabric-chaincode-dev channel

aguel (Tue, 02 Jun 2020 08:11:50 GMT):
Thank you. Posted on the appropriate channel.

adgupta011 (Tue, 02 Jun 2020 11:45:53 GMT):
Hi Team. I am using Hyperledger Fabric 1.4 to sign offline transaction from react native application. I have successfully generated csr with RSA Encryption. Also the enroll and register call of Fabric Ca is also successful. But in signing and sending the Transaction proposal step I am getting below error - 2020-05-27 15:08:49.858 UTC [protoutils] ValidateProposalMessage -> WARN 12d channel [mychannel]: creator's signature over the proposal is not valid: could not determine the validity of the signature: Failed verifing with opts []: Invalid options. It must not be nil., 2020-05-27 15:08:49.858 UTC [comm.grpc.server] 1 -> INFO 12e unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.16:52402 error="access denied: channel [mychannel] creator org [Org1MSP]" grpc.code=Unknown grpc.call_duration=2.21176ms, I am using SHA 256 to generate Hash. Is it possible to use RSA algorithm to generate csr and use the RSA key pairs for signing. Or is it that we need to use ECDSA algorithm to generate csr and signing the proposal.

adgupta011 (Tue, 02 Jun 2020 11:45:53 GMT):
Hi Team. I am using Hyperledger Fabric 1.4 to sign offline transaction from react native application. I have successfully generated csr with RSA Encryption. Also the enroll and register call of Fabric Ca is also successful. But in signing and sending the Transaction proposal step I am getting below error - 2020-05-27 15:08:49.858 UTC [protoutils] ValidateProposalMessage -> WARN 12d channel [mychannel]: creator's signature over the proposal is not valid: could not determine the validity of the signature: Failed verifing with opts []: Invalid options. It must not be nil., 2020-05-27 15:08:49.858 UTC [comm.grpc.server] 1 -> INFO 12e unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=xxxx:52402 error="access denied: channel [mychannel] creator org [Org1MSP]" grpc.code=Unknown grpc.call_duration=2.21176ms, I am using SHA 256 to generate Hash. Is it possible to use RSA algorithm to generate csr and use the RSA key pairs for signing. Or is it that we need to use ECDSA algorithm to generate csr and signing the proposal.

adgupta011 (Tue, 02 Jun 2020 11:46:38 GMT):
I am using "node-forge" library for generating csr

davidkhala (Tue, 02 Jun 2020 12:17:32 GMT):
Personally I have never seen any success RSA e2e case without changing source code.

adgupta011 (Tue, 02 Jun 2020 12:28:54 GMT):
Where we need to modify?

davidkhala (Tue, 02 Jun 2020 12:33:45 GMT):
Almost everywhere. At leaat you have to replace/add RSA root cert in channel config and then maybe peer, orderer, or even fabric source itself.

davidkhala (Tue, 02 Jun 2020 13:45:58 GMT):
@bestbeforetoday @bretharrison Hi Mark and Bret, I find there are still some legacy code depends on `fabric-client` in master branch. Is it intended to keep them?

bestbeforetoday (Tue, 02 Jun 2020 15:10:43 GMT):
There shouldn't be any runtime dependencies. I think fabric-client is just used by some of the test code. If it's practical to remove it by reworking the tests, that might be nice. The dev dependency on fabric-client actually ended up being a good test of coexistence of both fabric-client@1.4 and fabric-common@2 as dependencies, and turned up some issues with them polluting each others configuration at the last minute before the 2.x release

davidkhala (Wed, 03 Jun 2020 05:47:25 GMT):
Well, "a good test of coexistence of both fabric-client@1.4 and fabric-common@2" it is indeed a good side-effect. So is this scenario still requiring coverage test at this moment or even in future. Actually I am worrying about node_module polluting from each other. For example a test aiming to test fabric-common load some 2-depth module under fabric-client. It works in builder. The 2-depth module is not included in fabric-common dependency lists. Then any user develop with the npm-published `fabric-common` will crash due to the missing module

davidkhala (Wed, 03 Jun 2020 05:47:25 GMT):
Well, "a good test of coexistence of both fabric-client@1.4 and fabric-common@2" it is indeed a good side-effect. So is this scenario still requiring coverage test at this moment or even in future. Actually I am worrying about node_module polluting from each other. For example a test aiming to test fabric-common load some 2-depth module under fabric-client. It works in builder. The 2-depth module is not included in fabric-common dependency lists. Then any user developing with the npm-published `fabric-common` will crash due to the missing module

davidkhala (Wed, 03 Jun 2020 05:47:25 GMT):
Well, "a good test of coexistence of both fabric-client@1.4 and fabric-common@2" it is indeed a good side-effect. So is this scenario still requiring coverage test at this moment or even in future? Actually I am worrying about node_module polluting from each other. For example a test aiming to test fabric-common load some 2-depth module under fabric-client. It works in builder. The 2-depth module is not included in fabric-common dependency lists. Then any user developing with the npm-published `fabric-common` will crash due to the missing module

bestbeforetoday (Wed, 03 Jun 2020 09:50:00 GMT):
That doesn't sound good :worried:

bestbeforetoday (Wed, 03 Jun 2020 09:50:34 GMT):
Any cases like that where a test isn't accurately testing the behaviour and end user would see should probably be fixed

davidkhala (Wed, 03 Jun 2020 10:52:49 GMT):
yes, one of possible solution is instead of have a single `node_modules` in sdk root for testing, use monorepos structure (might with help of `lerna`) add a runnable script `install` in root package.json (overwriting), that install all sub-project(such as install `fabric-common`) independently. And change all the `require` or `import ` in test cases from 'fabric-common' to `./fabric-common/index`

davidkhala (Wed, 03 Jun 2020 10:54:28 GMT):
This could make node_module under independent project close to the real published project

davidkhala (Wed, 03 Jun 2020 10:54:28 GMT):
This could make node_module under independent project be more close to the real published one

Swhite215 (Wed, 03 Jun 2020 21:45:33 GMT):
Do you mean add the RSA root cert to the MSP folders for the peers and orderer?

davidkhala (Thu, 04 Jun 2020 00:54:42 GMT):
Yes,

davidkhala (Thu, 04 Jun 2020 00:54:42 GMT):
Yes and with channel config

davidkhala (Thu, 04 Jun 2020 00:54:42 GMT):
Yes and along with channel config

Swhite215 (Thu, 04 Jun 2020 01:05:21 GMT):
Interesting... What do you mean by adding to the channel config?

Swhite215 (Thu, 04 Jun 2020 01:05:21 GMT):
Interesting... What do you mean by adding to the channel config? Also I feel like this defeats the purpose of signing transactions offline if you need to send the keys somewhere outside of the device.

basilky (Thu, 04 Jun 2020 16:04:33 GMT):
Has joined the channel.

basilky (Thu, 04 Jun 2020 16:04:33 GMT):
@bretharrison Hi Bret Harrison. I found a task on Jira about reusing gRPC connection for multiple transactions and its marked as resolved. Is this feature implemented? I have gone through SDK code, and it seems like a single gRPC connection is used for single transaction only.

basilky (Thu, 04 Jun 2020 16:05:06 GMT):
https://jira.hyperledger.org/browse/FABN-80?workflowName=FAB%3A+Story+Workflow&stepId=7

mffrench (Thu, 04 Jun 2020 16:57:28 GMT):
Hello, looking to the new HLF Node SDK, I see many administration functions are gone (chaincode install, upgrade, list etc). I guess this is because of the new HLF v2 CC Lifecycle... However I would like to know if there is any plan to reintroduce such features in the future ? If no, do you have some recommendation to provide for such operations automation ? Thank you !

ajp (Thu, 04 Jun 2020 18:17:46 GMT):
I think this is on purpose by SDK devs as they want to separate interacting with a running network vs administering the network. The recommendation is to move all administrative tasks to using the CLI. If you would like to write code to administer, I think at this point your only option would be to write it in golang and import the packages in the CLI source.

ajp (Thu, 04 Jun 2020 18:17:46 GMT):
I think this is on purpose by SDK devs as they want to separate interacting with a running network vs administering the network. The recommendation is to move all administrative tasks to using the CLI. If you would like to write code to administer, I think at this point your only option would be to write it in golang and import the packages in the CLI source, or write bash scripts/nodejs that makes shell calls.

mffrench (Thu, 04 Jun 2020 18:20:28 GMT):
well, my first intent is to deploy/upgrade cc when testing my app + CC... I saw there is a nodejs admin utils developped as 3rd party so I will look on that

mffrench (Thu, 04 Jun 2020 18:21:12 GMT):
sad anyway they didn't provide a fabric-admin package instead of removing these features

mffrench (Thu, 04 Jun 2020 19:03:39 GMT):
@davidkhala : yeah thank you a lot I think it will be time saver for some of us :)

mffrench (Thu, 04 Jun 2020 19:03:57 GMT):
(fabric-common/admin)

mffrench (Thu, 04 Jun 2020 19:03:57 GMT):
(fabric-common/nodejs/admin)

ajp (Thu, 04 Jun 2020 19:27:19 GMT):
I don't quite see what the problem is? Just write a 4 line bash script that runs the chaincode package/install/instantiate instructions, and run it before your nodejs code. I highly doubt any 3rd party will solve your problem, especially if you're deploying on a 2.0 network, as the way chaincode lifecycle work has changed a lot.

ajp (Thu, 04 Jun 2020 19:28:05 GMT):
I don't quite see what the problem is? Just write a 4 line bash script that runs the chaincode package/install/instantiate instructions, and run it before your nodejs code. I highly doubt any 3rd party will solve your problem, especially if you're deploying on a 2.0 network, as the way chaincode lifecycle work has changed a lot.

BrettLogan (Thu, 04 Jun 2020 21:56:08 GMT):
David is correct, while fabric-ca can generate RSA keys and you can use them generated certs for TLS. You cannot however use RSA to generate signing certs for Fabric.

BrettLogan (Thu, 04 Jun 2020 21:56:08 GMT):
David is correct, while fabric-ca can generate RSA keys and you can only use the generated certs for TLS. You cannot however use RSA to generate signing certs for Fabric.

davidkhala (Fri, 05 Jun 2020 04:33:33 GMT):
@Swhite215 I think you misunderstand Certificate is not private key. It is about public key. My mentee went on the wrong way that he see this problem too simple. Actually offline-signing and RSA are totally two domain problem. The first one is supported in concept and fabric team open the implement variety to developers. But the variety is based on the assumption that entire cycle is using same EC crypto suite. RSA is more fundamental. Please think twice and strictly estimate the effect and time cost before start.

davidkhala (Fri, 05 Jun 2020 04:36:38 GMT):
I guess you close the grpc channel implicitly somewhere.

davidkhala (Fri, 05 Jun 2020 04:38:58 GMT):
@ajp Sorry to be opposite. But I did on 2.1 network. WIth align new chaincode life cycle chaange

davidkhala (Fri, 05 Jun 2020 04:40:32 GMT):
@mffrench Glad that it helps someone

Swhite215 (Fri, 05 Jun 2020 12:02:27 GMT):
Okay makes sense. Thank you both for your insights.

basilky (Sat, 06 Jun 2020 05:37:17 GMT):
You are right @davidkhala .I was running balance transfer in the fabric-samples. It was closing connection after each transaction invoke.

davidkhala (Sat, 06 Jun 2020 05:58:08 GMT):
each time you close the grpc channel , you have to recreate it before use.

Adhavpavan (Sat, 06 Jun 2020 19:35:03 GMT):
Hello, When I query for peers membership using discovery service cli, getting access denied error. I have already created conf.yaml file as below version: 0 tlsconfig: certpath: "" keypath: "" peercacertpath: /home/Music/UdemyCourse/BasicNetwork_2.0/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt timeout: 0s signerconfig: mspid: Org1MSP identitypath: /home/BasicNetwork_2.0/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem keypath: /home/BasicNetwork_2.0/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/priv_sk Peer Log Error: 2020-06-06 19:25:37.515 UTC [discovery] processQuery -> WARN 1e94d got query for channel mychannel from 172.18.0.1:59794 but it isn't eligible: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied 2020-06-06 19:25:37.515 UTC [discovery] Discover -> DEBU 1e94e Returning to 172.18.0.1:59794 a response containing: [error: ] Any insight on this?

rbole (Sun, 07 Jun 2020 06:05:21 GMT):
Hello, does anybody know some learning materials for the node.js SDK ?

Swhite215 (Sun, 07 Jun 2020 19:58:01 GMT):
Does anyone have any advice on how to get the proposal in the below line, from an express middleware, to a react frontend without destroying the format and fields? Each time I try to use res.send(proposal), I end up getting this Type Error: TypeError: proposal.toBuffer is not a function when calling proposal.toBuffer(). let {proposal, txId } = channel.generateUnsignedProposal(transactionProposal, mspID, cert); - generating proposal server-side. const proposalBytes = proposal.toBuffer(); - line that causes a problem on my client.

Swhite215 (Sun, 07 Jun 2020 19:58:01 GMT):
Does anyone have any advice on how to get the proposal in the below line, from an express middleware, to a react frontend without destroying the format and fields? Each time I try to use res.send(proposal), I end up getting this Type Error: TypeError: proposal.toBuffer is not a function when calling proposal.toBuffer(). `let {proposal, txId } = channel.generateUnsignedProposal(transactionProposal, mspID, cert);` - generating proposal server-side. `const proposalBytes = proposal.toBuffer();` - line that causes a problem on my client.

Swhite215 (Sun, 07 Jun 2020 19:58:01 GMT):
Does anyone have any advice on how to get the proposal in the below line, from an express middleware, to a react frontend without destroying the format, fields and methods? I am using Fabric-SDK-Node on the server-side to generate the proposal. I then send the proposal using res.send(proposal). Now when I try to run .toBuffer() on the client-side, I end up getting this Type Error: TypeError: proposal.toBuffer is not a function. `let {proposal, txId } = channel.generateUnsignedProposal(transactionProposal, mspID, cert);` - generating proposal server-side with Fabric-SDK-Node `const proposalBytes = proposal.toBuffer();` - line that causes a problem on my client.

Swhite215 (Sun, 07 Jun 2020 19:58:01 GMT):
Does anyone have any advice on how to get the proposal in the below line, from an express middleware, to a react frontend without destroying the format, fields and methods? I am using Fabric-SDK-Node v1.4 on the server-side to generate the proposal. I then send the proposal using res.send(proposal). Now when I try to run .toBuffer() on the client-side, I end up getting this Type Error: TypeError: proposal.toBuffer is not a function. `let {proposal, txId } = channel.generateUnsignedProposal(transactionProposal, mspID, cert);` - generating proposal server-side with Fabric-SDK-Node `const proposalBytes = proposal.toBuffer();` - line that causes a problem on my client.

Swhite215 (Sun, 07 Jun 2020 19:58:01 GMT):
Does anyone have any advice on how to get the proposal in the below line, from an express middleware, to a react-native frontend without destroying the format, fields and methods? I am using Fabric-SDK-Node v1.4 on the server-side to generate the proposal. I then send the proposal using res.send(proposal). Now when I try to run .toBuffer() on the client-side, I end up getting this Type Error: TypeError: proposal.toBuffer is not a function. `let {proposal, txId } = channel.generateUnsignedProposal(transactionProposal, mspID, cert);` - generating proposal server-side with Fabric-SDK-Node `const proposalBytes = proposal.toBuffer();` - line that causes a problem on my client.

Swhite215 (Sun, 07 Jun 2020 19:58:01 GMT):
Does anyone have any advice on how to get the proposal in the below line, from an express middleware, to a react-native frontend without destroying the format, fields and methods? I am using Fabric-SDK-Node v1.4 on the server-side to generate the proposal. I then send the proposal using res.send(proposal). Now when I try to run .toBuffer() on the client-side, I end up getting this Type Error: TypeError: proposal.toBuffer is not a function. `let {proposal, txId } = channel.generateUnsignedProposal(transactionProposal, mspID, cert);` - generating proposal server-side with Fabric-SDK-Node `const proposalBytes = proposal.toBuffer();` - line that causes a problem on my client. The reason I am returning the proposal to the client, instead of doing everything on the middleware, is because I am looking to sign transactions offline with a private device key.

SpecialAgentCooper (Mon, 08 Jun 2020 11:04:08 GMT):
unmarc Everything I found was for 1.4, didn't find anything particularly helpful for 2.x. I'd recommend just reading through the docs themselves. I'm just getting started with it myself, if you have any specific questions I can try to help

SpecialAgentCooper (Mon, 08 Jun 2020 11:35:39 GMT):
It looks like channel.queryBlock and channel.queryTransaction are absent from v2.x of the node sdk. These look really useful (I'm in the process of figuring out how best to query the history of assets on the blockchain directly i.e. avoiding the state database). Is there anything that can achieve this in 2.x? Do I have to replay all block events to search through them?

davidkhala (Mon, 08 Jun 2020 12:44:52 GMT):
If you look deeper you will find they are simply helper to call predefined system chaincodes. Those system chaincodes are still there in 2.x.

SpecialAgentCooper (Mon, 08 Jun 2020 13:49:05 GMT):
Fantastic, thank you for pointing this out. So if I load the query sytem chaincode like `const contract = network.getContract('qscc');` what can I invoke? Sorry if this is a basic question, I'm finding the docs quite hard to navigate for questions this specific

bestbeforetoday (Tue, 09 Jun 2020 08:41:55 GMT):
These pages might help: - https://hyperledger-fabric.readthedocs.io/en/latest/developapps/developing_applications.html - https://hyperledger-fabric.readthedocs.io/en/latest/tutorial/commercial_paper.html#application-structure - https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.html

garyclark (Tue, 09 Jun 2020 14:58:35 GMT):
Hello I have hopefully a quick questions on node.js APIs. Is there an API I can use in node.js that filters on "partial keys" and returns the iterator. For example if I have a key "PERSON_AGE_" that would return all age records, but I also want to return an iterator of keys containing "PERSON_HEIGHT_" and possibly "PERSON_". Using partials keys to filter the collect the partial matched keys. Any help would be appreciated.

bestbeforetoday (Tue, 09 Jun 2020 15:01:06 GMT):
It's worth asking this question in the #fabric-chaincode-dev channel

garyclark (Tue, 09 Jun 2020 15:03:25 GMT):
Thanks. I will ask them now.

HritikGupta (Tue, 09 Jun 2020 16:54:48 GMT):
What is the alternative for `gateway.getClient();` (in sdk 1.4) for sdk 2.0.1 ?

HritikGupta (Tue, 09 Jun 2020 16:54:48 GMT):
[Update: SOLVED] What is the alternative for `gateway.getClient();` (in sdk 1.4) for sdk 2.0.1 ?

garyclark (Tue, 09 Jun 2020 17:38:50 GMT):
cts.stub.CreateCompositeKey and GetStateByPartialCompositeKey

garyclark (Tue, 09 Jun 2020 17:38:50 GMT):
cts.stub.CreateCompositeKey and getStateByPartialCompositeKey

garyclark (Tue, 09 Jun 2020 17:38:50 GMT):
cts.stub.createCompositeKey and getStateByPartialCompositeKey

bestbeforetoday (Tue, 09 Jun 2020 17:54:46 GMT):
There isn't an equivalent. fabric-client.Client does not exist in v2.1. What are you trying to do that requires access to the low-level client implementation?

bestbeforetoday (Tue, 09 Jun 2020 17:58:08 GMT):
I couldn't find much in the way of docs either. While *qscc* gets mentioned I didn't spot good docs on what you can do with it in v2.1: https://hyperledger-fabric.readthedocs.io/en/release-2.1/smartcontract/smartcontract.html?highlight=qscc#system-chaincode

bestbeforetoday (Tue, 09 Jun 2020 17:58:50 GMT):
The GoDoc hints at what the available transaction functions might be called but you might be looking at the code for further clues: https://godoc.org/github.com/hyperledger/fabric/core/scc/qscc#pkg-constants

HritikGupta (Tue, 09 Jun 2020 18:28:56 GMT):
I'm using fabric-client instead, trying to installChaincode using the sdk; but get this `installChaincode error No identity has been assigned to this client` Not sure how to fix this

HritikGupta (Tue, 09 Jun 2020 18:28:56 GMT):
I'm using fabric-client instead, trying to installChaincode using the sdk; but get this `installChaincode error No identity has been assigned to this client` Not sure how to fix this Is there a template that could walk through chaincode instantiation via sdl?

HritikGupta (Tue, 09 Jun 2020 18:28:56 GMT):
I'm using fabric-client instead, trying to installChaincode using the sdk; but get this `installChaincode error No identity has been assigned to this client` Not sure how to fix this Is there a template that could walk through chaincode instantiation via sdk?

HritikGupta (Tue, 09 Jun 2020 18:28:56 GMT):
I'm using fabric-client instead, trying to installChaincode using the sdk

HritikGupta (Tue, 09 Jun 2020 18:28:56 GMT):
I'm using fabric-client instead, trying to installChaincode using the sdk How should the peers be passed to targets in the request payload for installChaincode ?

HritikGupta (Tue, 09 Jun 2020 18:28:56 GMT):
I'm using fabric-client instead, trying to installChaincode using the sdk How should the peers be passed in targets in the request payload for installChaincode ?

rbole (Wed, 10 Jun 2020 05:59:49 GMT):
thanks a lot for the infos

HritikGupta (Wed, 10 Jun 2020 06:30:52 GMT):
Chaincode instantiation results in the following error : `Error: Channel 'mychannel' has been migrated to the new lifecycle, LSCC is now read-only` Appreciate any help

HritikGupta (Wed, 10 Jun 2020 06:30:52 GMT):
Chaincode instantiation results in the following error : `Error: Channel 'mychannel' has been migrated to the new lifecycle, LSCC is now read-only` Its probably due to the change in lifecycle of chaincode introduced in fabric 2.0. Does node-sdk have functionalities supporting the 4 step chaincode cycle? Appreciate any help

davidkhala (Wed, 10 Jun 2020 06:47:28 GMT):
you need LSCC?

HritikGupta (Wed, 10 Jun 2020 06:52:16 GMT):
I think so, but not sure why the issue occurs

HritikGupta (Wed, 10 Jun 2020 06:52:16 GMT):
I think its due to the new lifecycle introduced in 2.0

HritikGupta (Wed, 10 Jun 2020 06:52:16 GMT):
I think its due to the new lifecycle introduced in 2.0; functions like installChaincode work, but instantiate doesnt.

FilipeSilva (Wed, 10 Jun 2020 08:33:48 GMT):
Hi, what is the best way to set a timed event? I mean, can I emit the event in the chaincode at a specific time or should I set a callback in the application?

mtng (Wed, 10 Jun 2020 11:07:27 GMT):
HI guys, are you planning to add again the deployment of the chaincode functionalities (install, aprove, commit, etc) in the version 2.0 again? it's really painful the debugging of chaincodes when you are doing integration tasks.

mtng (Wed, 10 Jun 2020 11:07:27 GMT):
Hi guys, are you planning to add again the chaincode deployment functionalities (install, approve, commit, etc) in the version 2.0 again? it's really painful the debugging of chaincodes when you are doing integration tasks.

mtng (Wed, 10 Jun 2020 11:07:27 GMT):
Hi guys, are you planning to add again the chaincode deployment functionalities (install, approve, commit, etc) in the version 2.0 again? Debugging of chaincodes it's really painful when you are doing integration tasks.

mtng (Wed, 10 Jun 2020 11:07:27 GMT):
Hi guys, are you planning to add again the chaincode deployment functionalities (install, approve, commit, etc) in the version 2.0 again? Debugging chaincodes it's really painful when you are doing integration tasks.

Diegoescalonaro (Wed, 10 Jun 2020 12:01:18 GMT):
Hi! Yes, it's also really hard to me. It was easier in the previous version

adgupta011 (Wed, 10 Jun 2020 13:26:37 GMT):
Hi Team, I am using offline Transaction in Hyperledger Fabric version 1.4. I am getting below error in sendSignedTransaction step :- error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: failed to connect to all addresses\n at Object.exports.createStatusError (/node_modules/grpc/src/common.js:91:15)\n at ClientDuplexStream._emitStatusIfDone (/node_modules/grpc/src/client.js:233:26)\n at ClientDuplexStream._receiveStatus (/node_modules/grpc/src/client.js:211:8)\n at Object.onReceiveStatus (/node_modules/grpc/src/client_interceptors.js:1311:15)\n at InterceptingListener._callNext (/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/node_modules/grpc/src/client_interceptors.js:618:8)\n at /node_modules/grpc/src/client_interceptors.js:1127:18" Blockchain Transaction Error : Error: SERVICE_UNAVAILABLE For other transactions in the same network where we are using submitTransaction API we are getting the same error But still the transaction is getting committed. But for offline transaction we are not getting any other errors apart from the above one but still it is not committed.

bestbeforetoday (Wed, 10 Jun 2020 14:17:23 GMT):
The v2.1 SDK doesn't include admin capabilities, like lifecycle chaincode deployment. The recommendation is to use the CLI for chaincode deployment. There is a `_lifecycle` system chaincode containing transaction functions that drive lifecycle, which you could invoke using the Node SDK. I've heard that this system chaincode might change in the future though so using the CLI might be a more future-proof solution

HritikGupta (Wed, 10 Jun 2020 14:37:03 GMT):
Sure, thanks for the revert @bestbeforetoday @bestbeforetoday

HritikGupta (Wed, 10 Jun 2020 14:37:03 GMT):
Sure, thanks for the revert @bestbeforetoday

davidkhala (Wed, 10 Jun 2020 15:06:31 GMT):
So what will be the ongoing change to lifecycle cc? Such as which aspect it will improve?

HritikGupta (Wed, 10 Jun 2020 15:12:41 GMT):
I'm trying to implement a private data collection in a node chaincode (in fab 2.0); is there a proper documentation for it?

SpecialAgentCooper (Wed, 10 Jun 2020 15:23:36 GMT):
Excellent finds, thank you!

bestbeforetoday (Wed, 10 Jun 2020 15:34:03 GMT):
I've just heard in conversation with Fabric maintainers that there are some potential changes in the future. If/when/what those changes will be I don't know. From the SDK point of view it makes a stronger case for having specific client APIs for key capabilities (like for example _ GetTransactionByID_) to abstract the Fabric implementation away from application code so they aren't broken by future Fabric changes. My guess is things will stay pretty much as they are for a 2.x LTS release so we're probably fairly safe for now

scmanjarrez (Wed, 10 Jun 2020 15:48:49 GMT):
Has joined the channel.

scmanjarrez (Wed, 10 Jun 2020 15:51:00 GMT):
Hi, I'm starting with hyperledger, right now I'm using the sdk to invoke an already installed chaincode, in the raw binary of hyperledger I just set some environment variables and ready to use "peer" binary. I was trying to replicate the same command with the sdk but it asks for a wallet, can I skip that? I just followed the steps in fabric tutorial (test-network), but it didn't mention any wallet at all.

scmanjarrez (Wed, 10 Jun 2020 15:51:00 GMT):
Hi, I'm starting with hyperledger, right now I'm using the sdk to invoke an already installed chaincode. Without an sdk, I just set some environment variables and ready to use "peer" binary. I was trying to replicate the same command with the sdk but it asks for a wallet, can I skip that? I just followed the steps in fabric tutorial (test-network), but it didn't mention any wallet at all.

SpecialAgentCooper (Wed, 10 Jun 2020 17:06:07 GMT):
It's not clear where BlockDecoder lives from the docs page: https://hyperledger.github.io/fabric-sdk-node/master/BlockDecoder.html Looking at the source code it's clear that it's in fabric-common https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-common/lib/BlockDecoder.js but it would be good to state where you need to import it from in the SDK documentation (unless I'm missing something)

SpecialAgentCooper (Wed, 10 Jun 2020 17:06:37 GMT):
I say this because I've just tried importing it from fabric-network and didn't get very far!

davidkhala (Thu, 11 Jun 2020 01:22:47 GMT):

Clipboard - 2020年6月11日上午9点21分

FilipeSilva (Thu, 11 Jun 2020 07:56:35 GMT):
Hi, what is the best way to set a timed event? I mean, can I emit the event in the chaincode at a specific time or should I set a callback in the application?

FilipeSilva (Thu, 11 Jun 2020 07:56:35 GMT):
Hi, what is the best way to set a timed event? I mean, can I emit the event in the chaincode at a specific time in the future or should I set a callback in the application to that same time in the future upon certain condition is met?

mahoney1 (Thu, 11 Jun 2020 08:45: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

bestbeforetoday (Thu, 11 Jun 2020 15:49:02 GMT):
I made a special effort with fabric-network to make sure all the JSDoc was scoped to a fabric-network module. Really the other packages should have their JSDoc similarly module scoped. It's just a big chunk of work to go through all the JSDoc

Abhimanyu121 (Thu, 11 Jun 2020 17:05:15 GMT):
Has joined the channel.

Abhimanyu121 (Thu, 11 Jun 2020 17:05:16 GMT):
Can i get Endorsement policies of of channel and key level endorsement polices with node js sdk? I really could not find a way, is it possible?

Abhimanyu121 (Thu, 11 Jun 2020 17:05:16 GMT):
Hello, is there a way to get endorsement policies of of channel and key level endorsement polices with node js sdk? I really could not find a way, is it possible?

Abhimanyu121 (Thu, 11 Jun 2020 17:05:16 GMT):
Hello, is there a way to get endorsement policies of channel and key level endorsement polices with node js sdk? I really could not find a way, is it possible?

davidkel (Thu, 11 Jun 2020 18:27:04 GMT):
The node sdk using discovery retrieves the endorsement policy for a channel and will then submit a transaction to an appropriate set of peers that match that endorsement policy, but it doesn't expose that endorsement policy directly to users of the node-sdk. I am pretty sure that there is no way to determine the key level endorsement policies from a client application.

davidkel (Thu, 11 Jun 2020 18:27:04 GMT):
The node sdk using discovery understands the endorsement policy for a channel and is able to submit a transaction to an appropriate set of peers that match that endorsement policy, but it doesn't expose that endorsement policy directly to users of the node-sdk. I am pretty sure that there is no way to determine the key level endorsement policies from a client application.

davidkel (Thu, 11 Jun 2020 18:27:04 GMT):
The node sdk using discovery understands the endorsement policy for a channel and is able to submit a transaction to an appropriate set of peers that match that endorsement policy, but it doesn't expose the endorsement policy directly to users of the node-sdk. I am pretty sure that there is no way to determine the key level endorsement policies from a client application.

Abhimanyu121 (Fri, 12 Jun 2020 09:15:54 GMT):
oh, thanks a lot.

davidkhala (Sat, 13 Jun 2020 02:56:23 GMT):
@bestbeforetoday Indeed, I would like to help. Is there an issue already for this?

Adhavpavan (Sat, 13 Jun 2020 06:06:25 GMT):
anyone facing the same issue?

davidkhala (Sat, 13 Jun 2020 08:31:00 GMT):
I think this type of question should be posted on StackOverFlow.

ArdianAbazi (Sat, 13 Jun 2020 16:02:00 GMT):
Has joined the channel.

ArdianAbazi (Sat, 13 Jun 2020 16:02:01 GMT):
Hello, I'm trying to implement an with offline private key transaction signing, I read though the tutorial provided in the fabric node doc. but I found far too simplified, has any of you guys some resource where I can see how this can be implemented.

ArdianAbazi (Sat, 13 Jun 2020 16:02:01 GMT):
Hello, I'm trying to implement an app with offline private key transaction signing, I read though the tutorial provided in the fabric node doc. but I found far too simplified, has any of you guys some resource where I can see how this can be implemented.

ArdianAbazi (Sat, 13 Jun 2020 16:02:44 GMT):
I'm using the latest version of fabric if that is releveant. Thanks in advance :grin: .

bestbeforetoday (Tue, 16 Jun 2020 10:01:43 GMT):
I don't spot any existing issue for it. Feel free to create one if you really want to tackle it!

randyshu (Tue, 16 Jun 2020 10:54:34 GMT):
``` No successful events received ``` anyone know that error and how to reproduce?

bestbeforetoday (Tue, 16 Jun 2020 13:31:20 GMT):
That message indicates that the client didn't receive any transaction commit events from peers in a certain period of time after the transaction was sent to the orderer. You could try enabling debug logging at the client side to see if any peer communication errors occur during the wait for commit events, although if you are having trouble communicating with peers I would expect that to cause problems getting any transactions endorsed before you get this far

davidkhala (Tue, 16 Jun 2020 15:57:00 GMT):
@bestbeforetoday Mark, I have to highlight that in this change I add back the npm callsite which is a critical fix. Without this package we could not create HSMCryptoSuite with fabric-common (at least for current published version) https://github.com/hyperledger/fabric-sdk-node/pull/239

randyshu (Wed, 17 Jun 2020 01:21:35 GMT):
thanks , but if you have any ideas for reproducing this problem?

bestbeforetoday (Wed, 17 Jun 2020 08:10:24 GMT):
Here's a way that I think might allow you to reproduce that error: 1. Network with at least one more org than required to meet endorsement policy 2. All the peers in your client identity's org non-contactable 3. Connect gateway with either MSPID_SCODE_ALL_FOR_TX (default) or MSPID_SCOPE_ANY_FOR_TX event handling strategy So you should be able to get a transaction endorsed and submitted to the orderer but the client won't be able to receive any commit events from your org's peers

davidkhala (Wed, 17 Jun 2020 08:55:22 GMT):
https://jira.hyperledger.org/browse/FABN-1579 I create an issue to discuss migration to use monoRepo manage tools in sdk-node. If we could make consensus on selecting tool, I am glad to work a PR for this.

davidkhala (Wed, 17 Jun 2020 08:55:22 GMT):
https://jira.hyperledger.org/browse/FABN-1579 I create an issue to discuss migration to use monoRepo manage tools in sdk-node. If we could make consensus on selecting tool, I am glad to work out a PR for this.

randyshu (Thu, 18 Jun 2020 05:57:51 GMT):
thanks for you kind reply. now issue is resolved and the reason is client time is wrong and when it send SEEK_DELIVERY_INFO request to peer it will get bad response.

gentios (Thu, 18 Jun 2020 14:59:20 GMT):
I keep getting this error ```[ChannelEventHub.js]: Error notification callback failed message=Error: ChannelEventHub has been shutdown, stack=TypeError: Error: ChannelEventHub has been shutdown at EventRegistration.eh.registerTxEvent [as _onErrorFn] (/usr/src/app/sr```

gentios (Thu, 18 Jun 2020 14:59:20 GMT):
I keep getting this error ```[ChannelEventHub.js]: Error notification callback failed message=Error: ChannelEventHub has been shutdown, stack=TypeError: Error: ChannelEventHub has been shutdown at EventRegistration.eh.registerTxEvent [as _onErrorFn] (/usr/src/app/sr``` When I try to create an invoke transaction. If you don't use the network it fails for the first time than the event is just initialized and it works

gentios (Thu, 18 Jun 2020 15:00:25 GMT):
Anyone any workaround for this, its a production network

davidkhala (Fri, 19 Jun 2020 05:41:01 GMT):
This is a not harmful error. It says you should always register some listener before closing channelEventHub. Take care of the sequence and it will be fine.

gentios (Fri, 19 Jun 2020 12:36:05 GMT):
@davidkhala I am already registering an tx event listener based on this code https://github.com/hyperledger/fabric-samples/blob/release-1.4/balance-transfer/app/invoke-transaction.js#L94

giuzero (Fri, 19 Jun 2020 16:38:17 GMT):
Has joined the channel.

giuzero (Fri, 19 Jun 2020 16:38:18 GMT):
hi I have a tlsCA an orderer_ca and a org1 ca similar to this https://hyperledger-fabric-ca.readthedocs.io/en/latest/operations_guide.html How should I write a connection profile for org1 client? Thanks

TalesGomes (Sat, 20 Jun 2020 03:09:24 GMT):
Has joined the channel.

davidkhala (Sun, 21 Jun 2020 00:22:57 GMT):
Sorry for my typo. It should be unregister all listeners before closing channel event hub

pouya (Sun, 21 Jun 2020 05:13:31 GMT):
Has joined the channel.

gentios (Sun, 21 Jun 2020 18:24:08 GMT):
@davidkhala can you please give me an example, thank you

davidkhala (Mon, 22 Jun 2020 07:49:17 GMT):
Most of example will introduce a lot of assumption that will get you confused. Here is mine but I am afraid you have to try by your own. https://github.com/davidkhala/fabric-common/blob/release-1.4/nodejs/builder/eventHub.js

davidkhala (Mon, 22 Jun 2020 07:51:43 GMT):
@andrew-coleman A quick fix for an error introduced by pure.js grpc message processor migration. https://github.com/hyperledger/fabric-sdk-node/pull/257.

gentios (Mon, 22 Jun 2020 10:22:28 GMT):
@davidkhala thank you very much, I will look into it

bh4rtp (Mon, 22 Jun 2020 12:08:04 GMT):
grpc is deprecated from latest sdk? i found `grpc` is installed as `@grpc`

BrettLogan (Mon, 22 Jun 2020 14:16:21 GMT):
We switched to the nodejs implementation of grpc, which means users no longer have to compile grpc from the native module

bh4rtp (Tue, 23 Jun 2020 05:51:46 GMT):
@BrettLogan has it been done for latest branch?

bh4rtp (Tue, 23 Jun 2020 06:30:46 GMT):
was lifecycle chaincode deployment api removed from `fabric-client` v1.4.9 also?

davidkhala (Tue, 23 Jun 2020 10:38:01 GMT):
lifecycle chaincode deployment api in `fabric-client`? Why there is one?

davidkhala (Tue, 23 Jun 2020 10:39:06 GMT):
If there is, it should be a leakage. fabric-client is designed only for 1.x.

gentios (Tue, 23 Jun 2020 12:06:39 GMT):
Unfortunately even after unregistering the event I am still getting the same error, I created this pastebin: https://pastebin.com/b97WpG7a

gentios (Tue, 23 Jun 2020 12:06:39 GMT):
Unfortunately even after unregistering the event I am still getting the same error, I created this pastebin: https://pastebin.com/WGmqkxfs

gentios (Tue, 23 Jun 2020 12:06:39 GMT):
@davidkhala Unfortunately even after unregistering the event I am still getting the same error, I created this pastebin: https://pastebin.com/WGmqkxfs

gentios (Tue, 23 Jun 2020 12:15:36 GMT):
From the error I can see that the problem is that the request is timing out ```at Timeout.setTimeout```

jrasm91 (Tue, 23 Jun 2020 18:55:22 GMT):
Has joined the channel.

jrasm91 (Tue, 23 Jun 2020 19:01:44 GMT):
In the 2.1 version of the node-sdk, there is no `channel.queryTransaction(txid)`. I'm trying to implement this functionality by calling the `qscc:GetTransactionByID` directly. This is what I have so far: ``` const network = await this.gateway.getNetwork(channelName); const contract = network.getContract('qscc'); const response = await contract.evaluateTransaction('GetTransactionByID', channelName, txId); ``` I am having difficulty figuring out how to convert `response` from a buffer (qscc marshaled response) to something usable. How can I decode `response`, in order to access the payload response data, signature_header, etc.?

davidkhala (Wed, 24 Jun 2020 03:22:55 GMT):
Then I guess you have bind more than one event listener. Or another case is you have not set an error callback . I remember in 1.4 they will throw it internally.

davidkhala (Wed, 24 Jun 2020 03:23:42 GMT):
@jrasm91 I am trying to fix it by https://github.com/hyperledger/fabric-sdk-node/pull/257

ArdianAbazi (Wed, 24 Jun 2020 12:03:54 GMT):
Hi, I'm trying to implement an app with offline private key signing. I managed to generate a signed proposal, but when I try to commit the proposal I get the following error: `error: [Committer]: sendBroadcast - orderer on error: "Error: 2 UNKNOWN: Stream removed`

ArdianAbazi (Wed, 24 Jun 2020 12:04:03 GMT):
any ideas on how to solve this?

ArdianAbazi (Wed, 24 Jun 2020 12:05:03 GMT):
I'm using the commercial paper network from fabric-samples.

ArdianAbazi (Wed, 24 Jun 2020 12:08:10 GMT):
Here is a gist of where I am currently at: https://gist.github.com/ardi1998/ec0ad74a80b6ac39647082c185b401bc

ArdianAbazi (Wed, 24 Jun 2020 12:12:39 GMT):
In the gist above i am using grpc instead of grpcs, when I use grpcs i get the following error: `{ status: 'FORBIDDEN',info:'implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the \'Writers\' sub-policies to be satisfied: permission denied' }`

ArdianAbazi (Wed, 24 Jun 2020 12:13:13 GMT):
I am using the latest version of fabric.

ArdianAbazi (Thu, 25 Jun 2020 07:44:45 GMT):
So appereantly i was not hashing the proposalResponse before signing it, did that and now it works like a charm.

ArdianAbazi (Thu, 25 Jun 2020 07:45:24 GMT):
One issue though, is it normal for transactions to fail sometimes?

ArdianAbazi (Thu, 25 Jun 2020 07:45:24 GMT):
One issue though, is it normal for proposals to fail sometimes?

ArdianAbazi (Thu, 25 Jun 2020 07:46:15 GMT):
On some occasions I am getting access denied, I just re-run the code and it works, is this normal?

bestbeforetoday (Thu, 25 Jun 2020 12:57:29 GMT):
Access denied doesn't sound like something I would expect to see. It might be worth digging into where that error is occurring to see if there are any more details. The peer logs are often a good place to start. If it looks like things aren't behaving properly then you could raise a bug report in Jira: https://jira.hyperledger.org/projects/FAB

mffrench (Thu, 25 Jun 2020 14:00:06 GMT):
@ajp : I'm using admin features to provide transparent chaincodes deployments for DEV/TEST env from conf - a little like SQL ORM do with SQL database. Using shell scripts for such things in DEV env where we may experiments many things and focus on our business requirement is just not user friendly...

nekia (Sun, 28 Jun 2020 13:23:10 GMT):
Hi, I got some incompatibility issues after upgrading fabric-sdk-node from 2.1.0 to 2.1.1

nekia (Sun, 28 Jun 2020 13:24:48 GMT):
e.g. [This change](https://github.com/hyperledger/fabric-sdk-node/pull/247#pullrequestreview-429836368) requires me to do some code changes

nekia (Sun, 28 Jun 2020 13:24:48 GMT):
e.g. [This change (FABN-1544 Update gRPC to pure js version by harrisob · Pull Request #247 · hyperledger/fabric-sdk-node)](https://github.com/hyperledger/fabric-sdk-node/pull/247#pullrequestreview-429836368) requires me to do some code changes

nekia (Sun, 28 Jun 2020 13:27:00 GMT):
As long as looking at release note, I can't find any information about this kind of changes. Is there any other changes which user need some work to apply 2.1.1?

nekia (Sun, 28 Jun 2020 13:27:00 GMT):
As long as looking at [release note](https://github.com/hyperledger/fabric-sdk-node/releases/tag/v2.1.1), I can't find any information about this kind of changes. Is there any other changes which user need some work to apply 2.1.1?

davidkhala (Sun, 28 Jun 2020 15:01:05 GMT):
mostly I could help you is that function `toBuffer()` is not native provided for all protobuf Object now. For same purpose, use `encode(...).finish()` instead My example here https://github.com/davidkhala/fabric-common/blob/20d31b8c042310049ba27717229be62cdbdb489b/nodejs/admin/blockEncoder.js#L20

garyclark (Sun, 28 Jun 2020 20:20:38 GMT):
Is there an example in node.js how tio set Transient data in node.js. I can do this fine in scripts and docker. I want to do this in node.js. I can query fine in node.js. I need a simple example. // private data const transientData = { 'marblename': Buffer.from('marble1'), // string <-> byte[] 'color': Buffer.from('red'), // string <-> byte[] 'owner': Buffer.from('John'), // string <-> byte[] 'size': Buffer.from('85'), // string <-> byte[] 'price': Buffer.from('99') // string <-> byte[] };

garyclark (Sun, 28 Jun 2020 20:21:30 GMT):
const result = await contract.createTransaction('setPrivateTransientDetails', "1") .setTransient(transientData) .submit();

garyclark (Sun, 28 Jun 2020 20:21:59 GMT):
Not sure if this is right. Since in the scripts I had to base64 the data content.

garyclark (Sun, 28 Jun 2020 20:25:06 GMT):
Just need a simple example.

nekia (Mon, 29 Jun 2020 00:13:35 GMT):
Thanks, I'll try that

ViokingTung (Mon, 29 Jun 2020 08:39:14 GMT):
Has joined the channel.

garyclark (Mon, 29 Jun 2020 13:28:47 GMT):
I ended up going with await ctx.stub.putPrivateData("heliosSiteDetails",key, value); to get it to work.

randyshu (Mon, 29 Jun 2020 14:54:11 GMT):
hi, anyone know that error:"Endorsement has failed:Error: 2 UNKNOWN: Stream removed"

BrettLogan (Mon, 29 Jun 2020 17:52:39 GMT):
Can you provide some context, generally this is caused by trying to connect to an https endpoint using http (so you didn't set the appropriate flags to choose https)

randyshu (Tue, 30 Jun 2020 01:23:12 GMT):
sorry,this error occured in production and all nodes connect using grpcs

randyshu (Tue, 30 Jun 2020 01:24:01 GMT):
I didn't get some information to recreate it or detailed error msg.

randyshu (Tue, 30 Jun 2020 01:25:04 GMT):
I guess if peer's grpc connection out pf limit ?

vimalViswan (Tue, 30 Jun 2020 09:53:23 GMT):
Has joined the channel.

DLTChacha (Thu, 02 Jul 2020 10:13:03 GMT):
Has joined the channel.

DLTChacha (Thu, 02 Jul 2020 10:13:04 GMT):
Hi All, Out of five node raft cluster, only one is hosted by me, rest are on different clouds. A lot of node-sdk clients connect on my orderer, which results in this issue sometime/momentarily (Although If I retry after sometime it works) ==> _2020-07-02 05:20:32.633 UTC [orderer.common.broadcast] ProcessMessage -> WARN 394835 [channel: mychannel] Rejecting broadcast of normal message from 10.255.0.32:46744 with SERVICE_UNAVAILABLE: rejected by Order: aborted_ Currently I use *channel.addOrderer* where orderer details are hardcoded. I'm planning to shift to *channel.initilaize()* . Since this uses auto discovery of orderers, will this help me in getting sevice unavailable issue resolved?

adgupta011 (Thu, 02 Jul 2020 14:18:47 GMT):
Hi Team, I am migrating fabric application from 1.4 to 2.1. I need to migrate registerChaincodeEvent method. In new version I am not finding that method instead I find registerChaincodeListener method. But I am not getting any response. Are there any method alternative to connect method from 1.4. My sample code is below - const eventService = channel.newEventService('tx'); await eventService.registerChaincodeListener( "eventname", (error, event) => { logger.debug("cought response event in eventlistener"); console.log("$$$$§inside", event); const evt = event.payload.toString('utf8'); }, (err) => { logger.error("errror receiving event"); this.emit("error", err); } );

bestbeforetoday (Fri, 03 Jul 2020 08:42:48 GMT):
Consider using the _fabric-network_ API, which allows you to receive nicely presented chaincode events by registering a contract listener callback: https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.Contract.html

adgupta011 (Fri, 03 Jul 2020 11:13:06 GMT):
With this API I am facing one problem. Every time I restart the application the event is triggered from the current last block.As I have logic inside the event trigger, so there is a possibility that the logic will execute twice if I restart the application. Is there any way to avoid this issue?

adgupta011 (Fri, 03 Jul 2020 11:13:06 GMT):
With this network API I am facing one problem. Every time I restart the application the event is triggered from the current last block.As I have logic inside the event trigger, so there is a possibility that the logic will execute twice if I restart the application. Is there any way to avoid this issue?

bestbeforetoday (Fri, 03 Jul 2020 13:34:57 GMT):
You might want to use a Checkpointer to ensure you don't get duplicate events and also don't miss any events that happened between client application restarts. You can specify a Checkpointer instance in the options when registering a listener: https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.ListenerOptions.html

divyasekaran (Sat, 04 Jul 2020 08:14:58 GMT):
Did you find any solution for this?

HritikGupta (Sun, 05 Jul 2020 08:25:16 GMT):
@bestbeforetoday is there a similar presentation like https://jira.hyperledger.org/browse/FABN-1353 explaining how to persist certs on CouchDB via sdk-2.x?

adgupta011 (Mon, 06 Jul 2020 07:36:55 GMT):
Thanks.I am checking that one. But is there any way we can use registerChaincodeListener

msteiner (Mon, 06 Jul 2020 19:34:24 GMT):
Has joined the channel.

msteiner (Tue, 07 Jul 2020 01:14:31 GMT):
Hi everybody, A Question regarding to IdentityService in fabric 2.1 (master): For getAll() i have to provide a User object which in turn seems to crucially depends on a SigngingIdentity. In a wallet i do have a X509Identity which seems to contain all information, e.g., credentials, which a SigngingIdentity should have. Alas, it seems the two types, even though both inheriting from Identity seem to be incompatible:: How am Supposed to create User (registrar) object from a user stored in a wallet?

SpecialAgentCooper (Tue, 07 Jul 2020 09:30:54 GMT):
Look at the register user scripts in fabric-samples ( https://github.com/hyperledger/fabric-samples/blob/master/fabcar/javascript/registerUser.js ) The user profiles are stored in a wallet and used to open a Gateway to the fabric network here https://github.com/hyperledger/fabric-samples/blob/master/fabcar/javascript/invoke.js Good luck!

baohua (Wed, 08 Jul 2020 01:01:50 GMT):
Hi, anyone know which version of sdk-node works best with fabric v1.4.7? I saw there's sdk-node 1.4.10 now.

tongyuhu (Thu, 09 Jul 2020 03:59:04 GMT):
Has joined the channel.

davidkhala (Thu, 09 Jul 2020 05:32:03 GMT):
@baohua Dear baohua, each time I get lost in sdk version mapping, I go to azp builder log to find `docker ps` information before regression test I find a clue [here](https://dev.azure.com/Hyperledger/Fabric-SDK-Node/_build/results?buildId=17017&view=logs&j=da18d031-6b67-55f8-19f1-868c1b4eb10a&t=799812c3-87eb-57c5-31a0-46ba535696c9&l=5181) It means 1.4.10 is tested on 1.4.7 fabric network

rthatcher (Thu, 09 Jul 2020 11:43:01 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

Vanitha (Thu, 09 Jul 2020 12:47:25 GMT):
Hello all I am getting error while invoking a transaction... invoking is working fine if I am performing that from cli.... but when I am invoking trough node sdk it is throwing error as attached... I have installed chaincode on every peer and then instantiated with endorsement policy -P "AND ('org1.member', ....) and then wrote connection profile and then performed enrollAdmin, register and invoke... PLease do suggest

Vanitha (Thu, 09 Jul 2020 12:47:37 GMT):

Clipboard - July 9, 2020 5:47 AM

braduf (Thu, 09 Jul 2020 15:59:54 GMT):
Hi all, we are using the node sdk version 2.1.0 and when using a checkpointer for a contract listener or starting the listener from the latest block, the event service times out and we can't start the listener. If we start from older blocks, the listener starts without problems, but since it repeats the newer blocks, it is not what we need. Does anyone knows why this might be happening only when starting the EventService from the latest block? This is the error log we get: ``` 2020-06-25T15:49:21.600Z - error: [EventService]: EventService[peer0.*.com.co:9051] timed out after:3000 2020-06-25T15:49:21.601Z - error: [EventService]: send[peer0.*.com.co:9051] - #1 - Starting stream to peer0.*.com.co:9051 failed 2020-06-25T15:49:21.601Z - error: [BlockEventSource]: Failed to start event service message=Event service timed out - Unable to start listening, stack=Error: Event service timed out - Unable to start listening at Timeout._onTimeout (*/node_modules/fabric-common/lib/EventService.js:40 ```

braduf (Thu, 09 Jul 2020 15:59:54 GMT):
Hi all, we are using the node sdk version 2.1.0 and when using a checkpointer for a contract listener or starting the listener from the latest block, the event service times out and we can't start the listener. If we start from older blocks, the listener starts without problems, but since it repeats the newer blocks, it is not what we need. Does anyone knows why this might be happening only when starting the EventService from the latest block? This is the error log we get: ``` 2020-06-25T15:49:21.600Z - error: [EventService]: EventService[peer0.*.com.co:9051] timed out after:3000 2020-06-25T15:49:21.601Z - error: [EventService]: send[peer0.*.com.co:9051] - #1 - Starting stream to peer0.*.com.co:9051 failed 2020-06-25T15:49:21.601Z - error: [BlockEventSource]: Failed to start event service message=Event service timed out - Unable to start listening, stack=Error: Event service timed out - Unable to start listening at Timeout._onTimeout (*/node_modules/fabric-common/lib/EventService.js:40 ``` Thanks in advance!

elBarto1325 (Thu, 09 Jul 2020 16:13:46 GMT):
Has joined the channel.

elBarto1325 (Thu, 09 Jul 2020 16:13:47 GMT):
Hello everyone, I am also having the same error

elBarto1325 (Thu, 09 Jul 2020 16:14:11 GMT):

Clipboard - 9 de julio de 2020 11:14

garyclark (Fri, 10 Jul 2020 15:16:10 GMT):
Quick question. Trying to use the the ctx.stub.getPrivateDataByPartialCompositeKey with sdk 1.4. Exactly how do you use this API? I am seeing and error iterator.next is not a function? Is there an example I can have a wee look at?

akshay.sood (Mon, 13 Jul 2020 04:01:53 GMT):
Hi Folks, Is ZKP supported in fabric-sdk-node?

davidkel (Mon, 13 Jul 2020 05:20:14 GMT):
No it isn't. Only the java sdk has that capability

davidkel (Mon, 13 Jul 2020 05:20:14 GMT):
No it isn't. The Java SDK has this capability, not sure on the Go sdk, but I've never heard that it had

SpecialAgentCooper (Mon, 13 Jul 2020 10:58:50 GMT):

Clipboard - July 13, 2020 11:58 AM

SpecialAgentCooper (Mon, 13 Jul 2020 11:00:08 GMT):
Hi everyone, any clue why my previous hashes aren't matching up? I'm using a BlockListener to explore the blockchain and am surprised to find that the data hash for the _previous block_ is not the same as the previous hash for the _current block_

SpecialAgentCooper (Mon, 13 Jul 2020 16:32:18 GMT):
I've resolved this now (copying my post from the questions channel) - the `data_hash` is the hash of the `block_data` field of the block, whereas the `previous_hash` is the hash of the previous block's `header` field i.e. the combination of number, previous hash and data hash of that block. This stack overflow answer provides a function that can generate the hash of the current block based on its header - https://stackoverflow.com/a/51674154/12175612 Are there any plans to add this feature to the node js client api? Seems like a useful feature for audit

bestbeforetoday (Tue, 14 Jul 2020 10:07:30 GMT):
_Possibly_ something like this: ``` const user = new User(name); cryptoSuite = User.newCryptoSuite(); user.setCryptoSuite(cryptoSuite); const importedKey = cryptoSuite.createKeyFromRaw(identity.credentials.privateKey); await user.setEnrollment(importedKey, identity.credentials.certificate, identity.mspId); ```

bestbeforetoday (Tue, 14 Jul 2020 10:11:46 GMT):
I would recommend using the latest 1.4.x release of the Node SDK for 1.4.x releases of Fabric. The patch versions of the SDK and Fabric are not aligned; just the major/minor numbers

bestbeforetoday (Tue, 14 Jul 2020 10:23:57 GMT):
Please could you raise a bug report in Jira with as much detail as you can provide on how to reproduce and any logs and/or stack trace you have from the error: https://jira.hyperledger.org/projects/FABN

bestbeforetoday (Tue, 14 Jul 2020 10:24:47 GMT):
It is worth asking this question on the #fabric-chaincode-dev channel

BrettLogan (Tue, 14 Jul 2020 13:34:30 GMT):
We worked through this, the tutorial was wrong in how it pulled the iterator out of the object returned by the cal to get `getPDBPCK()`

braduf (Tue, 14 Jul 2020 14:50:04 GMT):
Hi @bestbeforetoday , thanks for your answer, I will report the bug as you say. So do you think it is a bug in the SDK then?

bestbeforetoday (Tue, 14 Jul 2020 15:14:49 GMT):
:thumbsup:

bestbeforetoday (Tue, 14 Jul 2020 15:15:51 GMT):
I'm really not sure. I think we'd have to dig into it a bit deeper and try to reproduce. Having the Jira will help for that

KartikChauhan (Tue, 14 Jul 2020 16:15:28 GMT):
Hello All, Could anyone tell how can I view the secret/password of an identity in Hyperledger Fabric using node sdk? I've lost password of one of the identities. Now, I know I can issue a new password to the identity but that's not what I want to do. I found this a method `getEnrollmentSecret` [here](https://hyperledger.github.io/fabric-sdk-node/master/User.html), but I guess it belongs to an earlier version of sdk because when I tried to use it, I got the error `... getEnrollmentSecret is not a function`. I printed the user's info and got the following result: ``` User { _name: 'Admin_2cv3khdcpzg', _roles: null, _affiliation: '', _enrollmentSecret: '', _identity: Identity { _certificate: .......... ``` Why don't I see details like `_roles`, `_affiliation`, `_enrollmentSecret` of the user. User `Admin_2cv3khdcpzg` is enrolled.

KartikChauhan (Tue, 14 Jul 2020 16:15:28 GMT):
Hello All, Could anyone tell how can I view the secret/password of an identity in Hyperledger Fabric using node sdk? I've lost password of one of the identities. Now, I know I can issue a new password to the identity but that's not an option here. I found a method `getEnrollmentSecret` [here](https://hyperledger.github.io/fabric-sdk-node/master/User.html), but I guess it belongs to an earlier version of SDK because when I tried to use it, I got the error `... getEnrollmentSecret is not a function`. I printed the user's info and got the following result: ``` User { _name: 'Admin_2cv3khdcpzg', _roles: null, _affiliation: '', _enrollmentSecret: '', _identity: Identity { _certificate: .......... ``` Why don't I see details like `_roles`, `_affiliation`, `_enrollmentSecret` of the user. User `Admin_2cv3khdcpzg` is enrolled.

bestbeforetoday (Tue, 14 Jul 2020 17:32:15 GMT):
`getEnrollmentSecret` definitely is a function on a User object: https://github.com/hyperledger/fabric-sdk-node/blob/515ca942041ea2617cce5fa158f5a80bccf2cdf7/fabric-common/lib/User.js#L94

bestbeforetoday (Tue, 14 Jul 2020 17:34:58 GMT):
I'm not sure I can help with recovering your enrollment secret but it's worth being clear that this is not a password (as in user ID / password). It is a secret used to obtain a certificate from a Certificate Authority. Once you've got the certificate then the certificate is the thing you care about and need to keep. You shouldn't need the enrollment secret again

KartikChauhan (Wed, 15 Jul 2020 02:17:57 GMT):
If we've to reenroll an identity, for whatever reason, we'll require the secret, unless we're creating a new enrollment secret. And about the `getEnrollmentSecret` method, I think it available in previoud releases of SDK, but alteast 1.4 doesn't have it. To confirm, you can see the methods in https://hyperledger.github.io/fabric-sdk-node/release-1.4/User.html, and you won't find any such method. I called `getRoles`, `getIdentity` methods and they existed on the user object but `getEnrollmentSecret` didn't.

davidkhala (Wed, 15 Jul 2020 03:05:48 GMT):
SDK is not a secrte Vault. There are 2 cases: 1. Secret as a input parameter, It means you have the secret already in somewhere outside. Take care of it in external system before you want to re-enroll 2. Undefined secret during register. Here, you should take care of the random-generated secret in reponse of fabric-ca. Again, take care of it in external system in case of enroll or re-enroll.

davidkhala (Wed, 15 Jul 2020 03:05:48 GMT):
SDK is not a secret Vault. There are 2 cases: 1. Secret as a input parameter, It means you have the secret already in somewhere outside. Take care of it in external system before you want to re-enroll 2. Undefined secret during register. Here, you should take care of the random-generated secret in reponse of fabric-ca. Again, take care of it in external system in case of enroll or re-enroll.

KartikChauhan (Wed, 15 Jul 2020 03:12:17 GMT):
Neither of these cases answers my question, I'm afraid. Yes, SDK is not a secret vault, but it provides APIs to get the secret. Fabric stores the hash of the password, I know this because I got the error `Login failure: Password mismatch: crypto/bcrypt: hashedPassword is not the hash of the given password` when I supplied a wrong password. Okay, let's not talk about SDK. I'm asking is there any way with which I can get the secret?

KartikChauhan (Wed, 15 Jul 2020 03:12:17 GMT):
Neither of these cases answers my question, I'm afraid. Yes, SDK is not a secret vault, but it provides APIs to get the secret. Fabric stores the hash of the password, I know this because I got the error `Login failure: Password mismatch: crypto/bcrypt: hashedPassword is not the hash of the given password` when I supplied a wrong password. Okay, let's not talk about SDK. I'm asking, is there any way with which I can get the secret?

davidkhala (Wed, 15 Jul 2020 03:13:22 GMT):
password mismatch error is throw by Fabric-CA

davidkhala (Wed, 15 Jul 2020 03:13:38 GMT):
SDK only works are a message adapter.

davidkhala (Wed, 15 Jul 2020 03:14:44 GMT):
It is not stored in core Fabric component. Fabric-CA is designed to decouple from these.

davidkhala (Wed, 15 Jul 2020 03:14:44 GMT):
Hash is not stored in core Fabric components. Fabric-CA is designed to decouple from these.

davidkhala (Wed, 15 Jul 2020 03:16:14 GMT):
Even inside Fabric-CA linked database, you could not find your raw secret.

KartikChauhan (Wed, 15 Jul 2020 03:18:18 GMT):
Yes, I understand that. I got the error in fabric-ca container's log actually. But even fabric-ca must have stored the password somewhere, right? even if it's the hashed form. Could you please tell me where can I find that in CA container? I found a table named `credentials` in `fabric-ca-server.db` file, but there were no records there. Another question, if the SDK had the method `getEnrollmentSecret`, then the method obviously works to get the enrollment secret, right? using which I'm unable to get the secret.

davidkhala (Wed, 15 Jul 2020 03:18:29 GMT):
No

davidkhala (Wed, 15 Jul 2020 03:18:29 GMT):
Hashed password is not password. There is data lose after hash. Hash does not equals to encrypt.

davidkhala (Wed, 15 Jul 2020 03:21:29 GMT):
If you insiste on getEnrollmentSecret function on its literally meaning. Then I guess there should be a discussion about remove it from sdk-node.

davidkhala (Wed, 15 Jul 2020 03:22:19 GMT):
Such as `channel.addPeer should execute `peer join channel` action`

KartikChauhan (Wed, 15 Jul 2020 03:22:32 GMT):
It's actually removed from 1.4 sdk.

KartikChauhan (Wed, 15 Jul 2020 03:23:55 GMT):
But it still doesn't explain why we see a property named `_enrollmentSecret` when we get the user's info. ``` User { _name: 'Admin_2cv3khdcpzg', _roles: null, _affiliation: '', _enrollmentSecret: '', _identity: Identity { _certificate: .......... ```

KartikChauhan (Wed, 15 Jul 2020 03:23:55 GMT):
But it still doesn't explain why we see a property named `_enrollmentSecret` when we get the user's info. ``` User { _name: 'Admin_2cv3khdcpzg', _roles: null, _affiliation: '', _enrollmentSecret: '', _identity: Identity { _certificate: .......... ``` And this is the response I got using fabric-node-sdk version 1.4.

KartikChauhan (Wed, 15 Jul 2020 03:23:55 GMT):
But it still doesn't explain why we see a property named `_enrollmentSecret` when we get the user's info. ``` User { _name: 'Admin_2cv3khdcpzg', _roles: null, _affiliation: '', _enrollmentSecret: '', _identity: Identity { _certificate: .......... ``` And this is the response I got using fabric-node-sdk version 1.4. Maybe there're planning on removing these attributes in the future, or they already did in the latest versions.

davidkhala (Wed, 15 Jul 2020 03:24:04 GMT):
Good to hear it. The old design indeed take SDK as secret vault then introduce too much limitation.

davidkhala (Wed, 15 Jul 2020 03:26:13 GMT):
I guess the property name is used in the middle, as a cache of a input, or a cache for auto-genrated secret.

davidkhala (Wed, 15 Jul 2020 03:29:06 GMT):
Well, it seems still in master https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-common/lib/User.js

davidkhala (Wed, 15 Jul 2020 03:29:54 GMT):
@bestbeforetoday Mark, what will you think if I create a PR to remove this property?

davidkhala (Wed, 15 Jul 2020 03:30:40 GMT):
But definitely it would be API change.

KartikChauhan (Wed, 15 Jul 2020 03:54:26 GMT):
@davidkhala do you think it'd be fruitful to ask about this issue on the `fabric-maintainers` channel?

davidkhala (Wed, 15 Jul 2020 04:00:25 GMT):
No need to bother, Bret, Mark is always here. And if you looking for boarder discussion, it should be channel #fabric

KartikChauhan (Wed, 15 Jul 2020 04:01:01 GMT):
Thanks David.

davidkhala (Wed, 15 Jul 2020 04:02:54 GMT):
I am not a nice guy at code world, Hope my words did not offend you.

KartikChauhan (Wed, 15 Jul 2020 04:03:57 GMT):
Nah, it's alright:smiley:

KartikChauhan (Wed, 15 Jul 2020 05:32:19 GMT):
Hello All, Could anyone tell how can I view the secret/password of an identity in Hyperledger Fabric using node sdk? I've lost password of one of the identities. Now, I know I can issue a new password to the identity but that's not an option here. I found a method `getEnrollmentSecret` [here](https://hyperledger.github.io/fabric-sdk-node/master/User.html), but I guess it belongs to an earlier version of SDK because when I tried to use it, I got the error `... getEnrollmentSecret is not a function`. I printed the user's info and got the following result: ``` User { _name: 'Admin_2cv3khdcpzg', _roles: null, _affiliation: '', _enrollmentSecret: '', _identity: Identity { _certificate: .......... ``` Why don't I see details like `_roles`, `_affiliation`, `_enrollmentSecret` of the user. User `Admin_2cv3khdcpzg` is enrolled.

davidkel (Wed, 15 Jul 2020 06:49:50 GMT):
You cannot retrieve the secret of a user from the fabric-ca-server, if you have forgotten the secret of a user what you can do is change that secret for the user. Take a look at the IdentityService.update method. That allows you to update a user with a new secret. Obviously the user who makes this request must be a fabric-ca registrar (such as the fabric ca boot strap user)

bestbeforetoday (Wed, 15 Jul 2020 10:38:27 GMT):
@davidkhala the only place I see that property get populated with anything useful is within `User.createUser()`. I'm guessing the intention is just to allow all the information relevant to a user to be stored in one object. I don't think that enrollmentSecret property gets used anywhere other than in some test code which creates User objects and passes them to other test code to use. I would be nervous of removing it in case any client code is using it in a similar way. @bretharrison knows the intent of that code much better than me so might have an opinion

ItaloCarrasco (Wed, 15 Jul 2020 19:54:01 GMT):
hello everyone i have a network working and proved with sdk v1.4 i am trying to upgrade the sdk client to v2 but when i try to invoke the chaincode it fails with this error: failed to connect before the deadline to peer2 this doesnt happen if i use the old client

ItaloCarrasco (Wed, 15 Jul 2020 22:10:49 GMT):
i have some doubts about the discovery service, it is supposed to generate valid combinations of endorsing peers, if 1 fails it tries another one. this works in v1.4, but using sdk v2 this doesnt work, i have discovery enabled and 2 peers, endorsing rule is 1 out of 2, if i stop 1 peer the endorsing fails saying it cant connect to this stopped peer, the expected behavior should be to generate a new endorsing combination and try again.

yacovm (Thu, 16 Jul 2020 00:01:06 GMT):
open a JIRA at jira.hyperledger.org/

davidkhala (Thu, 16 Jul 2020 02:49:49 GMT):
indeed createUser is a quite old API

davidkel (Thu, 16 Jul 2020 10:06:02 GMT):
As @yacovm says please raise a jira on the FABN project providing as much detail as possible, if you can also get debug logs and attach as well that would be really useful. see https://hyperledger.github.io/fabric-sdk-node/master/tutorial-logging.html

bestbeforetoday (Thu, 16 Jul 2020 11:19:04 GMT):
What version of Fabric are your peers?

atoulme (Thu, 16 Jul 2020 16:07:06 GMT):
Has joined the channel.

atoulme (Thu, 16 Jul 2020 16:07:06 GMT):
hey everyone, I'm trying to build a gateway from a client and getting into trouble where neither seem to agree on the wallet to use. It looks like gateway.connect(client) requires a connectionOptions object with a wallet in it, and it cannot be the same as the client.

atoulme (Thu, 16 Jul 2020 16:07:30 GMT):
Alternatively, I think I could create the gateway first and call getClient on it. Is that a better move? Please advise.

deployer21 (Thu, 16 Jul 2020 17:25:12 GMT):
Has joined the channel.

bestbeforetoday (Thu, 16 Jul 2020 17:34:00 GMT):
The Client object doesn't use a wallet; only the Gateway. Unless you have a compelling reason to create a Client in advance of creating/connecting the Gateway, I would recommend just creating the Gateway. If you then need to get at the Client for some reason then get it from the Gateway. In general you shouldn't need to work with the client

MaximusGit (Thu, 16 Jul 2020 18:03:14 GMT):
Has joined the channel.

ashish.cppdev (Thu, 16 Jul 2020 18:09:29 GMT):
Hi - has anyone encountered a conflict between fabric-common User type and fabric-client User type?

ashish.cppdev (Thu, 16 Jul 2020 18:10:31 GMT):
I have encountered a scenario and have asked this question - https://lists.hyperledger.org/g/fabric/message/8681

ashish.cppdev (Thu, 16 Jul 2020 18:10:44 GMT):
Would appreciate any guidance

atoulme (Thu, 16 Jul 2020 18:18:23 GMT):
I was just following the fabric-samples balance-transfer

atoulme (Thu, 16 Jul 2020 18:18:37 GMT):
not knowing it would bit me when it came time to evaluate transactions to read state data

bestbeforetoday (Thu, 16 Jul 2020 18:19:12 GMT):
If you are using the v1.4 Node SDK then please upgrade to the v1.4.11 release, which has just been published

bestbeforetoday (Thu, 16 Jul 2020 18:23:47 GMT):
Both the v2.2.0 and v1.4.11 releases of the Node SDK have been published. v2.2 is a long-term support (LTS) release accompanying the Fabric v2.2 LTS release, and has been tagged in the NPM registry as _latest_. This breaks a package dependency between v1.4 Node SDK packages prior to v1.4.11. If you are using the v1.4 Node SDK, please upgrade to v1.4.11. Release information here: https://github.com/hyperledger/fabric-sdk-node/releases

bestbeforetoday (Thu, 16 Jul 2020 18:27:05 GMT):
I think the most up-to-date samples are fabcar and commercial-paper. They are probably the best ones to look at. Some of the other ones may be useful for particular usage patterns of scenarios but may not reflect the most current recommended API usage

atoulme (Thu, 16 Jul 2020 18:27:38 GMT):
couldn't tell that at the outset unfortunately

bestbeforetoday (Thu, 16 Jul 2020 18:31:23 GMT):
It's not perfect, for sure. The main docs are a good place to start, and give explanation and examples using the commercial-paper sample: https://hyperledger-fabric.readthedocs.io/en/latest/developapps/developing_applications.html

ashish.cppdev (Thu, 16 Jul 2020 18:33:19 GMT):
Thank you

MaximusGit (Thu, 16 Jul 2020 19:05:02 GMT):
hello team! I am using original code https://github.com/hyperledger/fabric-samples/blob/master/off_chain_data/blockEventListener.js and follow readme instruction, sdk version is latest https://github.com/hyperledger/fabric-samples/blob/master/off_chain_data/package.json, all events stuck in err section

MaximusGit (Thu, 16 Jul 2020 19:05:10 GMT):

Screenshot_2.png

MaximusGit (Thu, 16 Jul 2020 19:05:16 GMT):

Screenshot_1.png

MaximusGit (Thu, 16 Jul 2020 19:06:23 GMT):
maybe somebody had same issue, strange, everything made according off_chain_data readme instruction

BrettLogan (Thu, 16 Jul 2020 19:37:25 GMT):
These are byte buffers you need to read from the buffer

ItaloCarrasco (Thu, 16 Jul 2020 22:53:31 GMT):
my peers are using fabric v2.1

ItaloCarrasco (Thu, 16 Jul 2020 22:57:18 GMT):
yes i opened a jira issue explaining the problem, i still need to attach my config files and logs, obviously to verify that it isnt an issue on my end

bestbeforetoday (Fri, 17 Jul 2020 08:09:52 GMT):
That sample code looks to be out of date with the current SDK. The block listener is a callback function with a single argument in the 2.x SDK: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Network.html#addBlockListener

davidkhala (Fri, 17 Jul 2020 12:10:12 GMT):
Hi all, I have proposed a PR to add more intuitive information as badge. Welcome comment https://github.com/hyperledger/fabric-sdk-node/pull/273

ItaloCarrasco (Fri, 17 Jul 2020 15:38:07 GMT):
updated my peers to v2.2 and still same error

davidkhala (Fri, 17 Jul 2020 16:56:40 GMT):
@bestbeforetoday Hi Mark, in case of you might get confused, the PR above is created selectively for branch release-1.4 only.

sijo.c (Sat, 18 Jul 2020 18:27:29 GMT):
Has joined the channel.

sijo.c (Sat, 18 Jul 2020 18:27:29 GMT):
Need help to figure: why the Node client of Org1 is sending Invokes to Org2 peer: Shared the code here https://github.com/hyperledger/fabric-samples/pull/252​​​​​​​

sijo.c (Sat, 18 Jul 2020 18:27:29 GMT):
Hi, Appreciate help to figure: why the Node client of Org1 is sending Invokes to Org2 peer in test-network: Shared the code here https://github.com/hyperledger/fabric-samples/pull/252​​​​​​​

huytn.it (Mon, 20 Jul 2020 04:00:02 GMT):
Has joined the channel.

huytn.it (Mon, 20 Jul 2020 05:00:29 GMT):
Hi all, I followed https://hyperledger-fabric.readthedocs.io/en/release-2.2/write_first_app.html and faced to error: *_Failed to submit transaction: Failed to submit: CreateAndSendTransaction failed: SendTransaction failed: orderers is nil_*. How to resolve this issue?

huytn.it (Mon, 20 Jul 2020 05:00:29 GMT):
Hi all, I followed https://hyperledger-fabric.readthedocs.io/en/release-2.2/write_first_app.html and faced to error: *_Failed to submit transaction: Failed to submit: CreateAndSendTransaction failed: SendTransaction failed: orderers is nil_*. How to resolve this issue? I use fabric 2.2, fabric ca 1.4.7, amazon linux2.

huytn.it (Mon, 20 Jul 2020 09:01:26 GMT):
shit, createCar function work from command line

huytn.it (Mon, 20 Jul 2020 09:01:26 GMT):
shit, createCar function work in command line

huytn.it (Mon, 20 Jul 2020 09:01:31 GMT):
./peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile /home/fabric/v2.2/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n fabcar --peerAddresses localhost:7051 --tlsRootCertFiles /home/fabric/v2.2/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles /home/fabric/v2.2/fabric-samples/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function": "createCar","Args":["CAR10", "VW", "Polo", "Grey", "Mary"]}' 2020-07-20 08:52:45.793 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200

huytn.it (Tue, 21 Jul 2020 04:27:44 GMT):
add to connection-org1.yaml:

huytn.it (Tue, 21 Jul 2020 04:28:31 GMT):
channels: mychannel: orderers: - orderer.example.com peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true orderers: orderer.example.com: url: grpcs://localhost:7050 grpcOptions: ssl-target-name-override: orderer.example.com tlsCACerts: path: /PATH/TO/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

bh4rtp (Tue, 21 Jul 2020 06:39:06 GMT):
hi, i send transient data from node api to golang chaincode. the string value cannot be read. is it encoded by any method?

bh4rtp (Tue, 21 Jul 2020 07:04:30 GMT):
the value in node sdk is `BEGIN RSA PRIVATE KEY`, while it is read from chaincode as `[4 65 136 53 20 128 61 18 21 1 49 10 17]`.

bh4rtp (Tue, 21 Jul 2020 07:04:30 GMT):
the value in node sdk is `"BEGIN RSA PRIVATE KEY"`, while it is read from chaincode as `[4 65 136 53 20 128 61 18 21 1 49 10 17]`.

bestbeforetoday (Tue, 21 Jul 2020 10:20:11 GMT):
At the client end, the SDK is expecting the transient data to be a Buffer, so something like `Buffer.from("BEGIN RSA PRIVATE KEY")`. On the chaincode end you are getting a go []byte so I guess you want to convert it to a string, something like `value := string(transient["key"])`

bestbeforetoday (Tue, 21 Jul 2020 10:23:46 GMT):
Something is not right though, since I would expect you to see the string "BEGIN RSA PRIVATE KEY" appear as the Go []byte `[66 69 71 73 78 32 82 83 65 32 80 82 73 86 65 84 69 32 75 69 89]`

bh4rtp (Tue, 21 Jul 2020 11:04:28 GMT):
@bestbeforetoday solved. thanks. as you said, transient map should be .

Diegoescalonaro (Wed, 22 Jul 2020 12:11:07 GMT):
Hello there! I'm trying to implement a contract listener using the SDK but I'm not sure whether the documentation is correct: `* const listener: ContractListener = async (event) => { * if (event.eventName === 'newOrder') { * const details = event.payload.toString('utf8'); * // Run business process to handle orders * } * }; * contract.addContractListener(listener);` Has anyone else faced this error?

Diegoescalonaro (Wed, 22 Jul 2020 12:11:07 GMT):
Hello there! I'm trying to implement a contract listener using the SDK but I'm not sure whether the documentation is correct: ``` * const listener: ContractListener = async (event) => { * if (event.eventName === 'newOrder') { * const details = event.payload.toString('utf8'); * // Run business process to handle orders * } * }; * contract.addContractListener(listener); ``` Has anyone else faced this error?

Diegoescalonaro (Wed, 22 Jul 2020 12:11:07 GMT):
Hello there! I'm trying to implement a contract listener using the SDK but I'm not sure whether the documentation is correct: ``` * const listener: ContractListener = async (event) => { * if (event.eventName === 'newOrder') { * const details = event.payload.toString('utf8'); * // Run business process to handle orders * } * }; * contract.addContractListener(listener); ``` Has anyone else faced this error? fabric-sdk-node version 2.1

Diegoescalonaro (Wed, 22 Jul 2020 12:11:07 GMT):
Hello there! I'm trying to implement a contract listener using the SDK but I'm not sure whether the documentation is correct: ``` * const listener: ContractListener = async (event) => { * if (event.eventName === 'newOrder') { * const details = event.payload.toString('utf8'); * // Run business process to handle orders * } * }; * contract.addContractListener(listener); ``` Has anyone else faced this error? fabric-sdk-node version: v2.1 hyperledger-fabric network: v2.1

Diegoescalonaro (Wed, 22 Jul 2020 12:11:07 GMT):
Hello there! I'm trying to implement a contract listener using the SDK but I'm not sure whether the documentation is correct because there is no way to get any event from the chaincode. ``` * const listener: ContractListener = async (event) => { * if (event.eventName === 'newOrder') { * const details = event.payload.toString('utf8'); * // Run business process to handle orders * } * }; * contract.addContractListener(listener); ``` Has anyone else faced this error? fabric-sdk-node version: v2.1 hyperledger-fabric network: v2.1

bestbeforetoday (Wed, 22 Jul 2020 14:27:00 GMT):
That code definitely works if you are attaching it correctly and your chaincode transaction function is emitting events. There are scenario tests that run in every build to ensure events are delivered successfully

sijo.c (Wed, 22 Jul 2020 21:33:58 GMT):
seeing this log in 2.2 node client (not on every run, but every other run or so) but the txn **seem to go through fine**. ```2020-07-22T21:19:53.701Z - error: [DiscoveryHandler]: Error: Endorsement plan group does not contain enough peers (0) to satisfy policy (required:1)``` Note: Using `setEndorsingOrganizations(mspOrg1)` in txn. Policy used `"OR('Org1MSP.peer','Org2MSP.peer')"` From the chaincode logs it seem to have worked in committing to ledger, and subsequent reads are seeing the data written from above call. It was puzzling me, Any pointers?

sijo.c (Wed, 22 Jul 2020 21:33:58 GMT):
seeing this log in 2.2 node client (not on every run, but every other run or so) but the txn **seem to go through fine**. ```2020-07-22T21:19:53.701Z - error: [DiscoveryHandler]: Error: Endorsement plan group does not contain enough peers (0) to satisfy policy (required:1)``` Note: Using `setEndorsingOrganizations(mspOrg1)` in txn. Policy used `"OR('Org1MSP.peer','Org2MSP.peer')"` in fabric-samples/asset-transfer-private-data chaincode From the chaincode logs it seem to have worked in committing to ledger, and subsequent reads are seeing the data written from above call. My code here: https://github.com/hyperledger/fabric-samples/pull/252/ Any pointers?

sijo.c (Wed, 22 Jul 2020 21:39:39 GMT):
is the above , not an error, but a warn, saying that Org2 layout does not contain enough peers ? note that I *do want( only Org1 peers to endorse in above case.

sijo.c (Wed, 22 Jul 2020 21:39:39 GMT):
is the above , not an error, but a warn, saying that Org2 layout does not contain enough peers ? Note that I *do want* only Org1 peers to endorse in above case.

BrettLogan (Wed, 22 Jul 2020 21:59:13 GMT):
Hmm, I wonder what the threshold is for server side filtering. It possible that service discovery filters the list before its returned. Let me talk to Dave about this

mahoney1 (Thu, 23 Jul 2020 08:21:25 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

bestbeforetoday (Thu, 23 Jul 2020 08:56:49 GMT):
I suspect what has happened is that one endorsement plan group has an insufficient number of peers but the endorsement handling has gone on to gain successful endorsement using a different endorsement plan group. I'm not sure whether the problem here is that there is a genuine error in the endorsement plan groups returned by discovery, or whether this is an accepted situation (perhaps specific to where you have specified target orgs) and the log should simply not be at error level

bestbeforetoday (Thu, 23 Jul 2020 09:02:29 GMT):
I have raised a Jira: https://jira.hyperledger.org/browse/FABN-1608

randyshu (Mon, 27 Jul 2020 02:01:11 GMT):
hi, Is fabric-sdk-node support idemix ?

davidkel (Mon, 27 Jul 2020 07:19:46 GMT):
No it doesn't

Rachit-gaur (Mon, 27 Jul 2020 08:15:46 GMT):
Hi, I am not able to understand how the offline transactions signing works, is it connecting to a CA by IP ? how is this working? version 1.4.4

mtng (Tue, 28 Jul 2020 09:56:05 GMT):
Hi guys, I have a chaincode(parent) that call to other chaincode (child). I have also in the child chaincode an event that is thrown in a write operation. When I'm listening the events of the child and creating a transaction the parent chaincode, the listener in the sdk is not catching the event. However, if the interaction is made via the chaincode child, the event is caught. Is this a bug? Could someone to explain me what is happening? I'm working with the version 2.1.0

mtng (Tue, 28 Jul 2020 09:56:05 GMT):
Hi guys, I have a chaincode(parent) that call to other chaincode (child). I have also in the child chaincode an event that is thrown in a write operation. When I'm listening the events of the child and creating a transaction the parent chaincode, the listener in the sdk is not catching the event. However, if the interaction is made via the chaincode child, the event is caught. Is this a bug? Could someone explain me what is happening? I'm working with the version 2.1.0

bestbeforetoday (Tue, 28 Jul 2020 09:56:41 GMT):
Offline signing just means that the SDK doesn't have access to the private key to do signing. Instead, you take responsibility for doing the signing yourself. The CA is not involved. See https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-sign-transaction-offline.html

Diegoescalonaro (Tue, 28 Jul 2020 10:20:16 GMT):
Same error here. when there is a chaincode that invokes a second chaincode, there is no possible way to listen to the event emitted by that second chaincode.

bestbeforetoday (Tue, 28 Jul 2020 13:31:29 GMT):
It seems the expected behaviour is that any events emitted by the "child" chaincode are lost. Only the chaincode invoked by the client can emit events. Also, only one event can be emitted by a transaction function invocation

ItaloCarrasco (Tue, 28 Jul 2020 14:54:20 GMT):
hello everyone, when you throw an error on the chaincode, the response you get on the sdk is something like this: `Error: No valid responses from any peers. Errors: peer=peer0.org2.example.com, status=500, message=error in simulation: transaction returned with failure: Error: State does not exist: 40287ba5-423c-4b09-8706-f6a43ecb9be3 at newEndorsementError (/home/italo/Documentos/pagare/api_chain/node_modules/fabric-network/lib/transaction.js:48:12) at getResponsePayload (/home/italo/Documentos/pagare/api_chain/node_modules/fabric-network/lib/transaction.js:17:23) at Transaction.submit (/home/italo/Documentos/pagare/api_chain/node_modules/fabric-network/lib/transaction.js:211:28) at processTicksAndRejections (internal/process/task_queues.js:97:5) { responses: [ { version: 0, timestamp: null, response: [Object], payload: , endorsement: null, connection: [Object], peer: 'peer0.org2.example.com' } ], errors: [] }` How can i check the real structure of the error, as it isnt clear, i would like to be able to access the message.. error in simulation....

bestbeforetoday (Tue, 28 Jul 2020 16:06:21 GMT):
I think it will be in `error.responses[0].response.message`. What you are seeing is the complete error message returned from the peer though. There is no other Error object with stack trace. To see more details you would need to look at the peer logs

ItaloCarrasco (Tue, 28 Jul 2020 16:13:20 GMT):
thanks, i think that complete message is a little weird considering that it is a string with a lot of data, so i was trying to get the real error message thrown by the chaincode

bestbeforetoday (Tue, 28 Jul 2020 17:13:22 GMT):
Peer and/or chaincode containers are the places to look for chaincode side error detail

ItaloCarrasco (Tue, 28 Jul 2020 17:27:35 GMT):
i know, what i meant is i have an app that interacts with the sdk so i need it to return error objects that can be understandable and easy to handle by it, as you said in your previous post i found the error message in that attribute path, thank you

Rachit-gaur (Tue, 28 Jul 2020 21:31:36 GMT):
we are initializing a fabric-ca-client in this tutorial as well, Is CA really not involved?

Rachit-gaur (Tue, 28 Jul 2020 21:31:59 GMT):
Also, is it safe to make the network-config public?

mtng (Wed, 29 Jul 2020 05:38:12 GMT):
@bestbeforetoday but why is this the expected behaviour? If you have a business logic that require more than one chaincode, the event should be caught indepently of the chaincode that you have invoked. If not, it couldn't make sense for us to use HF.

ysai (Wed, 29 Jul 2020 05:47:03 GMT):
Has joined the channel.

Diegoescalonaro (Wed, 29 Jul 2020 07:53:00 GMT):
I agree with @mtng that this doesn't make sense. Every chaincode should emit its events whether it has been invoked by the client or by another chaincode.

bestbeforetoday (Wed, 29 Jul 2020 08:44:52 GMT):
It is the expected behaviour simply because that is the way Fabric behaves. In other words, it is not an implementation bug. I agree it would be great if the behaviour was different. I would encourage you to raise a story in Jira to request this enhancement to Fabric's behaviour: https://jira.hyperledger.org/projects/FAB

bestbeforetoday (Wed, 29 Jul 2020 08:49:49 GMT):
You may well need to make use of the CA in your scenario, perhaps to create identities or obtain certificates. Signing just requires you to use a private key to sign the the proposal or transaction data. The CA doesn't do signing for you

mtng (Wed, 29 Jul 2020 10:07:21 GMT):
Ok, thanks

jrasm91 (Wed, 29 Jul 2020 18:42:38 GMT):
I ran into this same problem. It is a bit difficult to pass error messages up from the chaincode to the application code. What I'm currently doing is using a custom error object in the chaincode with a toString method that returns error name + json ``` public toString() { return this.name + ': ' + JSON.stringify({ name: this.name, code: this.code, message: this.message, statusCode: this.statusCode, data: this.data, }); } ``` Then in the application code, whenever I get an error that starts with my custom error name, I parse the json ``` if (!e.message || e.message.indexOf('No valid responses from any peers') === -1) { return e; } // Try parsing TLPError const match = e.message.match(/TLPError: ({.*)$/); if (match && match.length === 2) { try { const tlpError = JSON.parse(match[1]); return util.parseError(tlpError); } catch { } } ``` If anyone has a better method, I'm always looking for an alternative.

ItaloCarrasco (Wed, 29 Jul 2020 18:55:54 GMT):
i dont know anything better, i had to do something like you, checking the string from the response, still i think there should be a better way

jrasm91 (Wed, 29 Jul 2020 18:57:42 GMT):
Like auto-convert / parse the response as json or something, instead of just relying on plain strings.

duwenhui (Thu, 30 Jul 2020 03:00:47 GMT):
Has joined the channel.

nekia (Fri, 31 Jul 2020 04:14:56 GMT):
Hi team! I have a question about the format of read-write set returned from API. When using fabric-client 1.4.11, value of read-write set in a transaction retrieved by queryTransaction() is converted into string as below. ``` { "writes": [ { "key": "a", "is_delete": false, "value": "90" }, { "key": "b", "is_delete": false, "value": "210" } ] } ``` But when using fabric-network 2.2.0, the value of the same read-write set retrieved via BlockListener isn't converted into string. In the case using 2.2.0 SDK, is there any ways to get string data as well as the case using v1.4.11 ? ``` { "writes": [ { "key": "a", "is_delete": false, "value": { "type": "Buffer", "data": [ 57, 48 ] } }, { "key": "b", "is_delete": false, "value": { "type": "Buffer", "data": [ 50, 49, 48 ] } } ] } ```

bestbeforetoday (Fri, 31 Jul 2020 08:18:43 GMT):
I would try `value.toString('utf8')`

nekia (Fri, 31 Jul 2020 10:00:39 GMT):
Thanks @bestbeforetoday In my understanding, this is one of the spec changes between v1.4 and v2.x, and if I want to have the same result with before when I'm using v2.x SDK, manual conversion of each value is the only way. Is it correct?

bestbeforetoday (Fri, 31 Jul 2020 11:12:26 GMT):
v2 uses a newer pure JavaScript gRPC / protobuf implementation and the decoding of protobuf messages was rewritten so there may be some differences in the protobuf representation. In reality a Buffer is what gets written to the ledger, and the data isn't necessarily a text string, so this Buffer representation is probably truer to what's been written to the ledger. It looks like you will need to do the Buffer -> string conversion if you want to see identical results to v1.4 in this case. If it helps to use the same code for both v1.4 and v2, calling `value.toString('utf8')` in v1.4 should also give you the same result

nekia (Fri, 31 Jul 2020 12:03:16 GMT):
I understood. Thanks a lot.

Adhavpavan (Sat, 01 Aug 2020 16:44:05 GMT):
Hello Guys, I am invoking qscc from SDK(Fabric-Network) to get transaction details by transaction id. Network: Fabric : v2.0 Client SDK: Fabric-Network When I invoke qscc with function name GetTransactionByID with some tx id, I am getting buffer in proto encoded form like below. (I have added some of the part of data below) �" �" � � ���� ���� " mychannel*@eb00ec055803ca538fc32637e622caa62687c30e07c84d7002ad4e73a13e71b1: fabcarB M��5 ѪsS,z/�Pi" �_�I�\��Q �=)v � � Org1MSP � -----BEGIN CERTIFICATE----- MIICjzCCAjWgAwIBAgIUT40thzxsZH5YlVaIX8EJuSTfmDAwCgYIKoZIzj0EAwIw Is there anything in SDK(fabric-Network) to convert this encoded buffer to JSON? If not, Is there any other way to convert this proto encoded buffer to JSON format? Thank you so much in advance.

nekia (Mon, 03 Aug 2020 08:26:44 GMT):
I think you can use [BlockDecoder.decodeTransaction()](https://hyperledger.github.io/fabric-sdk-node/release-2.2/BlockDecoder.html#.decodeTransaction__anchor) in fabric-common package. @Adhavpavan

FabricNoob (Mon, 03 Aug 2020 13:33:21 GMT):
Has joined the channel.

FabricNoob (Mon, 03 Aug 2020 13:33:21 GMT):
Hello everyone, I'm running into an issue with the the event handling strategy. My understanding is that if I use the "NETWORK_SCOPE_ALLFORTX", my `await` function will wait for every peer in the network to commit the transaction before moving on to the next instruction in my code. For example, I have a `createAccont` function and an `updateAccount` function. I want my client application to wait for the `createAccount` to post the new account information to the ledger prior to moving onto the `updateAccount` function; however, I'm running into the below ENDORSMENT_POLICY_FAILURE. I think the failure is occurring because the account that was created is getting updated in the same block. Is my understanding correct? I've tried inspecting the network connection object to see if the strategy is getting set properly, but the field just has `function` as the output. Let me know if you need any additional information or resources I should look into. I've checked out the https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-transaction-commit-events.html and some other pages in that documentation. Error: "warn: [TransactionEventHandler]: strategyFail: commit failure for transaction "$TxID": TransactionError: Commit of transaction $TxID failed on peer peer0.org4.example.com:$PORT with status ENDORSMENT_POLICY_FAILURE... $STACK_TRACE ... Architecture: 4 organizations, 1 peer per organization, 1 orderer, and 1 channel Endorsement Policy is majority Software: HLF v2.1 and fabric-network 2.1.2 Connection Options: ```javascript let connectionOptions = { identity: userName, wallet: wallet, discovery: { enabled: true, asLocalHost: true}, eventHandlerOptions { strategy: DefaultHandlerStrategies.NETWORK_SCOPE_ALLFORTX}, }; await gateway.connect(connectionProfile, connectionOptions); // connect to channel and get contract await submitTransaction('createAccount', $PARAMS); // this works await submitTransaction('updateAccount', $PARAMS); // this fails ```

FabricNoob (Mon, 03 Aug 2020 13:33:21 GMT):
Hello everyone, I'm running into an issue with the the event handling strategy. My understanding is that if I use the `NETWORK_SCOPE_ALLFORTX`, my `await` function will wait for every peer in the network to commit the transaction before moving on to the next instruction in my code. For example, I have a `createAccont` function and an `updateAccount` function. I want my client application to wait for the `createAccount` to post the new account information to the ledger prior to moving onto the `updateAccount` function; however, I'm running into the below `ENDORSMENT_POLICY_FAILURE`. I think the failure is occurring because the account that was created is getting updated in the same block. Is my understanding correct? I've tried inspecting the network connection object to see if the strategy is getting set properly, but the field just has `function` as the output. Let me know if you need any additional information or resources I should look into. I've checked out the https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-transaction-commit-events.html and some other pages in that documentation. ``` Error: "warn: [TransactionEventHandler]: strategyFail: commit failure for transaction "$TxID": TransactionError: Commit of transaction $TxID failed on peer peer0.org4.example.com:$PORT with status ENDORSMENT_POLICY_FAILURE... $STACK_TRACE ... ``` Architecture: 4 organizations, 1 peer per organization, 1 orderer, and 1 channel Endorsement Policy is majority Software: HLF v2.1 and fabric-network 2.1.2 Connection Options: ```javascript let connectionOptions = { identity: userName, wallet: wallet, discovery: { enabled: true, asLocalHost: true}, eventHandlerOptions { strategy: DefaultHandlerStrategies.NETWORK_SCOPE_ALLFORTX}, }; await gateway.connect(connectionProfile, connectionOptions); // connect to channel and get contract await contract.submitTransaction('createAccount', $PARAMS); // this works await contract.submitTransaction('updateAccount', $PARAMS); // this fails ```

adinambiar98 (Mon, 03 Aug 2020 17:39:08 GMT):
Has joined the channel.

adinambiar98 (Mon, 03 Aug 2020 17:39:10 GMT):
Hello everyone, I had a question about the User object's affiliation. Is it normal that the `_affiliation` property of the User shows blank despite mentioning it in the `ca.register` request? The same case goes for `_enrollmentSecret`.

adinambiar98 (Mon, 03 Aug 2020 17:42:38 GMT):
I have already generated the affiliation via admin user so it doesn't throw an error during execution. The only thing is when I log the user object, the `_affiliation` and `_enrollmentSecret` are empty. Initially I assumed this to be normal because they are private properties judging by the `_` but I realized the other similarly prefixed properties like `_mspID` showed their values

Rachit-gaur (Mon, 03 Aug 2020 22:05:28 GMT):
@bestbeforetoday I have added a CA and I am able to register a user offline but when I sign a txn using his key and certificate I get endorsement failure

Adhavpavan (Tue, 04 Aug 2020 05:38:23 GMT):
Thank you @nekia , I will try this

davidkhala (Tue, 04 Aug 2020 07:18:35 GMT):
It might be a code hygience issue.

Rachit-gaur (Tue, 04 Aug 2020 08:40:53 GMT):
Can someone please share how to register user offline in balance transfer application? I have a usecase where I need users to maintain their private keys, I can see there is a guide for how to sign a txn offline but how do I register a user offline?

bestbeforetoday (Tue, 04 Aug 2020 11:10:47 GMT):
The compiled protobuf javascript implementations (with TypeScript definitions) are contained in the `fabric-protos` package. So you can use those to work at the protobuf level directly, something like: ```import * as fabricProtos from 'fabric-protos'; const processedTransaction = fabricProtos.protos.ProcessedTransaction.decode(buffer); ```

bestbeforetoday (Tue, 04 Aug 2020 12:26:00 GMT):
Definitely with the NETWORK_SCOPE_ALLFORTX strategy the Promise returned by `submitTransaction()` should only resolve after commit events have been received from all contactable network peers. From your error it looks like you are getting successful endorsement for your _updateAccount_ transaction (which suggests that the account exists to be updated) but it is failing an endorsement policy check at commit on at least one of your peers. It might be worth looking at the proposal responses attached to the error to see if there is any inconsistency there, and at the peer logs to see if they have any more information about why the failure occurred

adinambiar98 (Tue, 04 Aug 2020 14:12:08 GMT):
Are you referring to the SDK's code or mine? I am not able to control the User object

julian (Tue, 04 Aug 2020 17:07:26 GMT):
Hello. Is there a node chaincode server in the pipeline for fabric sdk node? We have some node chaincode that we would like to utilise on a K8 fabirc 2.1.1. We have been advised to use external chaincode service on K8.

julian (Tue, 04 Aug 2020 17:07:26 GMT):
Hello. Is there a node chaincode server in the pipeline for fabric sdk node? We have some node chaincode that we would like to utilise on a K8 fabirc 2.1.1. We have been advised to use chaincode as an external service on K8.

davidkel (Tue, 04 Aug 2020 17:42:09 GMT):
Suggest you ask on #fabric-chaincode-dev channel as it's about node chaincode

julian (Tue, 04 Aug 2020 18:48:07 GMT):
Thank you.

bestbeforetoday (Tue, 04 Aug 2020 18:58:06 GMT):
Fabric is quite picky about how the hash is generated and signing is done. Make sure you're doing it exactly as the documentation suggests, including using a SHA hash

gauravgiri (Wed, 05 Aug 2020 08:17:07 GMT):
Hi All, fabric-sdk-node, Transaction.submit() if error, packages the peer proposal responses as part of the error object thrown as: `err.responses = proposalResponses;` The proposal responses returned for us from the peer are not the same w.r.t. read-write sets, hence requirement is to parse the proposal responses returned from different peers and retrieve the different read-write sets for public writes, reads and private collections writes and reads for the transaction.

gauravgiri (Wed, 05 Aug 2020 08:17:07 GMT):
Hi All, fabric-sdk-node, Transaction.submit() if error, packages the peer proposal responses as part of the error object thrown as: `err.responses = proposalResponses;` The proposal responses returned for us from the peer are not the same w.r.t. read-write sets, hence requirement is to parse the proposal responses returned from different peers and retrieve the different read-write sets for public writes, reads and private collections writes and reads for the transaction. Need help/way to parse these proposal responses.

davidkhala (Wed, 05 Aug 2020 08:30:11 GMT):
Again, use fabric-protos for customize your parser.

gauravgiri (Wed, 05 Aug 2020 08:56:42 GMT):
Thank you David, in the structure of the ProposalResponse object assume read-write sets are in the payload attribute. Any references w.r.t. to the structure or for parsing it.

davidkhala (Wed, 05 Aug 2020 09:05:09 GMT):
Who tell you that? ProposalResponse is not RWSet

gauravgiri (Wed, 05 Aug 2020 09:07:32 GMT):
Channel.js has method _getProposalResponseResults, which it uses to compare the RW sets: const payload = _responseProto.ProposalResponsePayload.decode(proposal_response.payload); const extension = _proposalProto.ChaincodeAction.decode(payload.extension); and

gauravgiri (Wed, 05 Aug 2020 09:07:51 GMT):
so assuming it should be in proposal_response.payload

davidkhala (Wed, 05 Aug 2020 09:09:18 GMT):
it is inside ChaincodeAction.extension

gauravgiri (Wed, 05 Aug 2020 09:09:32 GMT):
and there is a ledger/rwset proto, maybe we could use it to parse

davidkhala (Wed, 05 Aug 2020 09:12:50 GMT):
So the source already tell you how to parse them. Isn't it?

gauravgiri (Wed, 05 Aug 2020 09:19:01 GMT):
source?

davidkhala (Wed, 05 Aug 2020 09:19:15 GMT):
Yes, Channel.js

gauravgiri (Wed, 05 Aug 2020 09:20:40 GMT):
but it never retrieves the actual RW sets, need to parse to find public reads/writes, collections reads/writes.

davidkhala (Wed, 05 Aug 2020 09:21:41 GMT):
Then maybe they are not there, find RWSet in block instead.

gauravgiri (Wed, 05 Aug 2020 09:22:36 GMT):
yes i did from block, but block only contains a single set of RW set from either of the peer proposals. i need to compare and check differences from both.

davidkhala (Wed, 05 Aug 2020 09:23:55 GMT):
Why you say RWSet in proposal responses are not actual?

gauravgiri (Wed, 05 Aug 2020 09:30:11 GMT):
i meant they are actual RW sets, but its a buffer object, hence need to parse it.

davidkhala (Wed, 05 Aug 2020 09:34:41 GMT):
So go ahead

davidkhala (Wed, 05 Aug 2020 09:34:55 GMT):
BlockDecoder.js `function decodeChaincodeAction(chaincodeActionBuf) `

gauravgiri (Wed, 05 Aug 2020 09:38:44 GMT):
ahh okay this: https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/lib/BlockDecoder.js

gauravgiri (Thu, 06 Aug 2020 10:50:58 GMT):
Thank you David, I was able to decode and get the RW sets from peer proposal responses.

Adhavpavan (Thu, 06 Aug 2020 17:50:05 GMT):
@bestbeforetoday Thank you so much. Now I have three different way of implemenattion 1) BlockDecoder 2) Configtxlater Binary 3) Using fabric-protos I have achieved json response using all these different steps

Adhavpavan (Thu, 06 Aug 2020 17:54:19 GMT):
@MaximusGit Blocklistener callback gives only one argument, do necessary changes as per this arg in other code. I have implemented it and its working fine

Adhavpavan (Fri, 07 Aug 2020 08:27:32 GMT):
@jrasm91 you can use one of the following to decode proto buffer 1) configtxlater tool 2) BlockDecoder Let me know for more info

bestbeforetoday (Fri, 07 Aug 2020 10:25:55 GMT):
:thumbsup:

jtonline (Mon, 10 Aug 2020 14:19:59 GMT):
Has joined the channel.

bh4rtp (Tue, 18 Aug 2020 08:16:03 GMT):
in the `commercial-paper` example, to commit a buy transaction, `paper.js` contract is imported. is it to say that the node.js application must use node.js written smart contract?

SpecialAgentCooper (Tue, 18 Aug 2020 09:18:18 GMT):
no, the application and contract are independent: you can submit transaction proposals to Go chaincodes from node apps and vice versa.

bh4rtp (Tue, 18 Aug 2020 09:45:14 GMT):
thanks. does `fabric-network` interact with `contractapi`, not previous `shim` ? i noticed the function name is added org prefix, i.e. `org1.example.com:registerUser`.

bestbeforetoday (Tue, 18 Aug 2020 11:00:30 GMT):
fabric-network will work with chaincode written using the lower-level shim or higher level contract APIs

bestbeforetoday (Tue, 18 Aug 2020 11:04:18 GMT):
The only difference when working with chaincode using the Contract API is that it may have multiple contracts within the chaincode, and each of these contracts is distinguished by a contract namespace. In this case you just specify the contract name as the second parameter to the call to `network.getContract()` at the client end: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Network.html#getContract

bh4rtp (Tue, 18 Aug 2020 11:32:33 GMT):
the new version sdk is much simpler. i almost get transplantation done. now i got an error when submit a transaction with transient map and args. this is my code digest: ```async function submitContract (contract, consumerHash, draftContract) { let transaction = contract.createTransaction('submitContract'); let transientData = Buffer.from(JSON.stringify(draftContract)); transaction.setTransient({ draft_contract: transientData }); const result = await transaction.submit([consumerHash]); }``` when run this code, it tells an error: ```error: [TransactionEventStrategy]: constructor: No peers for strategy``` i got no idea what this means.

bestbeforetoday (Tue, 18 Aug 2020 12:13:00 GMT):
That looks like the client couldn't find any peers belonging to the same organization as your client identity. By default the call to submit will wait for the transaction to be committed on peers in your client identity's organization

bestbeforetoday (Tue, 18 Aug 2020 12:15:10 GMT):
If your client organization is running any peers then you may need to pick a different `eventHandlerOptions.strategy` in the options supplied when connecting the Gateway: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.GatewayOptions.html

bestbeforetoday (Tue, 18 Aug 2020 12:15:10 GMT):
If your client organization is not running any peers then you may need to pick a different `eventHandlerOptions.strategy` in the options supplied when connecting the Gateway: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.GatewayOptions.html

bh4rtp (Tue, 18 Aug 2020 23:23:05 GMT):
@bestbeforetoday it makes me confused. the client is actually using an identity with peers. sometimes the sdk runs ok sometimes it prompts some discovery errors telling that https://localhost:7051 for peer1.example.com. i didn't define peer1.example.com in the connection-org1.yaml. and its port is 8051, not 7051. i don't know why the sdk uses 7051.

bh4rtp (Tue, 18 Aug 2020 23:32:08 GMT):
the sdk outputs errors like: ```2020-08-18T23:27:33.037Z - error: [DiscoveryService]: _buildPeer[mychannel] - Unable to connect to the discovered peer peer0.org3.example.com:7051 due to Error: Failed to connect before the deadline on Endorser- name: peer0.org3.example.com:7051, url:grpcs://localhost:7051, connected:false, connectAttempted:true``` actually, url for this peer is grpcs://localhost:27051. however, it is not included in the connection-org3.yaml. didn't i configure the profile correctly?

bh4rtp (Tue, 18 Aug 2020 23:35:18 GMT):
and the log of the peer defined in the profile also has error messages: ```2020-08-19 07:27:27.039 CST [core.comm] ServerHandshake -> ERRO 134 TLS handshake failed with error EOF server=PeerServer remoteaddress=172.18.0.1:46394```

bh4rtp (Tue, 18 Aug 2020 23:35:18 GMT):
and the log of the peer (peer0.org1.example.com) defined in the profile also has error messages: ```2020-08-19 07:27:27.039 CST [core.comm] ServerHandshake -> ERRO 134 TLS handshake failed with error EOF server=PeerServer remoteaddress=172.18.0.1:46394```

bh4rtp (Wed, 19 Aug 2020 06:14:58 GMT):
@bestbeforetoday how can i specify peers for the invocation?

bestbeforetoday (Wed, 19 Aug 2020 13:14:54 GMT):
If you are using discovery then you should only need at least one peer in your client's connection profile for it to connect. The client will then use discovery to find all the other network nodes. The URLs for these nodes are what they consider to be their public IP address / port. If you are running nodes within a Docker network, you need to make sure the port numbers within the Docker network match the port numbers that are exposed to the host network where your client is probably running

bh4rtp (Wed, 19 Aug 2020 15:52:50 GMT):
@bestbeforetoday yes. i am using a docker network. and i specified the port number to be the exposed port. however, the sdk reports a random number of discovery errors with 7051 port in the url.

bestbeforetoday (Wed, 19 Aug 2020 16:46:47 GMT):
Somehow your network thinks there is a peer running at `peer0.org3.example.com:7051` and is reporting its existence to your client through discovery. You have `discovery.as_localhost` enabled and so your client is trying to talk to that peer at `localhost:7051`. I don't know why the network believes that peer exists. I would guess it was defined as part of the initial network configuration

hkiridera (Thu, 20 Aug 2020 05:59:57 GMT):
Has joined the channel.

rthatcher (Thu, 20 Aug 2020 14:18:07 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

rbole (Thu, 20 Aug 2020 18:11:06 GMT):
Hi, can I use node.js sdk 2.2 for a 1.4.8 fabric network?

bh4rtp (Fri, 21 Aug 2020 00:43:52 GMT):
@bestbeforetoday which configurations are used in sdk for discovery? i modified the connection profile. it does not work. and it even do not make any changes. the commercial paper example is taken.

bh4rtp (Fri, 21 Aug 2020 00:43:52 GMT):
@bestbeforetoday which configurations are used in sdk for discovery? i modified the connection profile. it does not work. and it even does not make any changes after the modification. the commercial paper example is taken.

bh4rtp (Fri, 21 Aug 2020 02:04:07 GMT):
i am using release-2.2, the `test_network` connection profile ccp-template.yaml is taken as an example. is this template not suitable?

bh4rtp (Fri, 21 Aug 2020 03:09:23 GMT):
i add `orderers` and `channels` sections to the profile, it has not discovery errors.

bh4rtp (Fri, 21 Aug 2020 03:10:03 GMT):
is there a complete template for the connection profile?

bh4rtp (Fri, 21 Aug 2020 03:41:34 GMT):
i did further testing and found a strange thing that one transaction was submitted to all the peers and the other transactions were submitted only peer0.org1.example.com. why?

bh4rtp (Fri, 21 Aug 2020 03:41:34 GMT):
i did further testing and found a strange thing that one transaction was submitted to all the peers and the other transactions were submitted only to peer0.org1.example.com. why?

bestbeforetoday (Fri, 21 Aug 2020 08:15:14 GMT):
I don't think this works. You can use the 1.4 SDK with a 2.2 network though

bestbeforetoday (Fri, 21 Aug 2020 08:18:22 GMT):
The `discovery` property within the options passed to `gateway.connect()` controls discovery behaviour for the client: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.GatewayOptions.html

bestbeforetoday (Fri, 21 Aug 2020 08:19:03 GMT):
There is also server-side configuration required to enable discovery in the network. Hopefully that is included in the samples since using discovery is generally a good thing

bestbeforetoday (Fri, 21 Aug 2020 08:20:43 GMT):
I wonder if your transaction that only went to one peer was an _evaluate_ rather than a _submit_? Evaluate (essentially a query) only tries to get one peer response as it doesn't need to gain endorsement since it is not then sent to the orderer to be committed to the ledger

rbole (Fri, 21 Aug 2020 13:53:46 GMT):
Ok thanksd

rbole (Fri, 21 Aug 2020 13:53:46 GMT):
Ok thanks

davidkhala (Fri, 21 Aug 2020 15:48:17 GMT):
@mffrench I wrote a compensate package for admin capability here. https://github.com/davidkhala/fabric-common/tree/master/nodejs/admin

davidkhala (Fri, 21 Aug 2020 16:01:14 GMT):
May be have a try on https://www.npmjs.com/package/khala-fabric-admin

mffrench (Fri, 21 Aug 2020 16:10:02 GMT):
:+1:

mffrench (Fri, 21 Aug 2020 16:10:24 GMT):
thank you for the input @davidkhala

davidkhala (Fri, 21 Aug 2020 16:10:44 GMT):
Hope it is not too late for the community.

mffrench (Fri, 21 Aug 2020 16:12:33 GMT):
nope for me anyway ;) Will provide you some feedbacks as soon as I can !

Nick (Sat, 22 Aug 2020 04:33:42 GMT):
Has joined the channel.

bh4rtp (Sun, 23 Aug 2020 23:56:09 GMT):
@bestbeforetoday no. all the transactions tested called the `submit` function. i have not reach the `evaluate` testing. :relaxed:

Vanitha (Mon, 24 Aug 2020 07:54:58 GMT):

Clipboard - August 24, 2020 1:24 PM

Vanitha (Mon, 24 Aug 2020 07:56:14 GMT):
Could someone please help to solve this error

bestbeforetoday (Tue, 25 Aug 2020 08:59:41 GMT):
It looks like your orderer is not responding on whatever host/port your client is connecting on. I don't know why that is

haggis (Tue, 25 Aug 2020 15:47:02 GMT):
Should one do a `gateway.disconnect()` after `contract.addContractLilstener()` or will this stop the listener from working?

bestbeforetoday (Wed, 26 Aug 2020 15:01:41 GMT):
Disconnecting the gateway will shutdown all listeners. Only call `disconnect()` when you have finished using the Gateway and all of the network and/or contract objects obtained from it

haggis (Wed, 26 Aug 2020 15:03:29 GMT):
Thanks! That makes totally sense. I was just wondering because I'm in trouble with an IBP Cluster when there are ~20+ open connections

bh4rtp (Sun, 30 Aug 2020 00:39:35 GMT):
hi, how does sdk decide the peer for `evaluateTransaction` for a network with collection policy?

bh4rtp (Sun, 30 Aug 2020 01:21:34 GMT):
how can i specify the peer to call a query private data function?

nkl199 (Tue, 01 Sep 2020 09:47:53 GMT):
The IBM Blockchain extension for VSCode has a tutorial dealing with private data, might be worth having a look at that?

bestbeforetoday (Tue, 01 Sep 2020 10:20:43 GMT):
`evaluateTransaction` uses the query handler specified in the GatewayOptions when connecting the Gateway. The default implementations only use peers belonging to the same organization (MSP ID) as the client identity. Right now, the only way to change the peers targetted by queries using _fabric-network_ is to implement a custom query handler: https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-query-peers.html

bh4rtp (Tue, 01 Sep 2020 10:54:28 GMT):
@bestbeforetoday thanks. perfect answer.

bh4rtp (Tue, 01 Sep 2020 11:53:01 GMT):
@bestbeforetoday the release-2.2 sdk is designed much better and easy to use. but there are few examples.

bh4rtp (Tue, 01 Sep 2020 11:54:21 GMT):
i mean practical examples like previous `balance_transfer`.:grinning:

bestbeforetoday (Tue, 01 Sep 2020 12:54:47 GMT):
Several of the projects in the _fabric-samples_ repository should demonstrate the use of the v2.2 SDK. The *asset-transfer*, *commercial-paper* and *fabcar* samples should all be good examples: https://github.com/hyperledger/fabric-samples

bestbeforetoday (Tue, 01 Sep 2020 12:58:01 GMT):
If there are still pieces that aren't clear enough, I'd be happy to hear where things can be improved. You can always raise Jira's for documentation (or behaviour) enhancements, or even submit fixes to the GitHub repositories yourself! :smiley: https://jira.hyperledger.org/projects/FABN

SpecialAgentCooper (Tue, 01 Sep 2020 15:33:12 GMT):
Any ideas what's causing this warning? It happens while I am building a gateway object: ``` (node:9004) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version. ```

bestbeforetoday (Wed, 02 Sep 2020 08:47:12 GMT):
It seems to be complaining that a numeric IP address is being used for a TLS connection rather than a name that can be resolved in DNS. If you've specified some of your nodes in the connection profile using IP addresses, perhaps changing them to DNS names can fix it. I guess it might also be caused by node addresses obtained from the discovery service, but again this should be something you can fix in the node configuration to use DNS names instead of IP addresses. If you think it's something the SDK itself has caused rather than a configuration issue, I would suggest raising a bug report in Jira with as much supporting information (or steps to reproduce) to help pin it down: https://jira.hyperledger.org/projects/FABN

bestbeforetoday (Wed, 02 Sep 2020 08:47:54 GMT):
I wouldn't expect it to cause an issue any time soon either way. This deprecated warning was introduced in Node v12 and is still just a warning in v14

bh4rtp (Thu, 03 Sep 2020 02:08:02 GMT):
hi, i have a question when using `blockchain-explorer`. it seems to be outputted from `fabric-network` sdk. ``` Error: Failed to authorize invocation due to failed ACL check: Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin] at SingleQueryHandler.evaluate (/opt/explorer/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:41:27)```

bh4rtp (Thu, 03 Sep 2020 02:10:45 GMT):
fabric release-2.2 and 1.1.2 explorer are used.

bestbeforetoday (Thu, 03 Sep 2020 09:00:52 GMT):
That looks like _fabric-network_ is just throwing back an error returned from the peer while invoking the transaction function. I guess is your blockchain explorer is trying to invoke a transaction function that requires admin privilege with a non-admin client identity. I can't help with blockchain explorer

bh4rtp (Thu, 03 Sep 2020 09:11:00 GMT):
@bestbeforetoday yes. actually it is a ca question. when using a ca enrollment, how to specify the identity to be an admin?

mahoney1 (Thu, 03 Sep 2020 13:54:32 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

zhouqingwen (Fri, 04 Sep 2020 09:30:38 GMT):
Has joined the channel.

nekia (Sun, 06 Sep 2020 06:21:00 GMT):
Hi team, when parsing config block for retrieving updated ACLs, I had an issue. Please have a look at the following JIRA. https://jira.hyperledger.org/browse/FABN-1627

nekia (Sun, 06 Sep 2020 06:21:00 GMT):
Hi team, when parsing config block for retrieving updated ACLs, I found an issue. Please have a look at the following JIRA. https://jira.hyperledger.org/browse/FABN-1627

Jakeeyturner (Mon, 07 Sep 2020 10:13:28 GMT):
Has joined the channel.

VladyslavKhymenko (Tue, 08 Sep 2020 17:15:57 GMT):
Has joined the channel.

VladyslavKhymenko (Tue, 08 Sep 2020 17:15:57 GMT):
hey everybody, hope you are in good health, could you please tell where I can have a look on your support matrix? Or maybe you could just tell if these are supported together: `"fabric-contract-api": "^1.4.5"` and `"fabric-network": "^1.4.8"` Thank you

bestbeforetoday (Tue, 08 Sep 2020 17:22:24 GMT):
That should be fine. Any 1.4.x versions should be fundamentally compatible (with Fabric 1.4.x nodes). I would suggest using the latest available patch levels

VladyslavKhymenko (Tue, 08 Sep 2020 18:28:01 GMT):
@bestbeforetoday thank you very much

bh4rtp (Wed, 09 Sep 2020 00:32:47 GMT):
what is difference between using ca and `cryptogen` generated artifacts?

davidkel (Wed, 09 Sep 2020 07:36:02 GMT):
not really a node-sdk question would suggest asking on #fabric or #fabric-questions

ItaloCarrasco (Thu, 10 Sep 2020 16:02:43 GMT):
hello everyone i wanted to ask for maybe a better error message on this: https://github.com/hyperledger/fabric-sdk-node/blob/592fe2460bff48913fb2a7b8a979dd9e10a96a94/fabric-common/lib/Proposal.js#L250

ItaloCarrasco (Thu, 10 Sep 2020 16:02:43 GMT):
hello everyone i wanted to ask for maybe a better error message on this: https://github.com/hyperledger/fabric-sdk-node/blob/592fe2460bff48913fb2a7b8a979dd9e10a96a94/fabric-common/lib/Proposal.js#L250 if you pass a null arg to the invoke, you get an error related to that line saying: TypeError: Cannot read property 'toString' of undefined. you cant pass null arguments for invocation so i think a better error message is needed and maybe checking for null arguments before doing toString()

ItaloCarrasco (Thu, 10 Sep 2020 16:31:22 GMT):
cryptogen is for testing purposes as it doesnt have proper certificate management, using CAs to generate network certs is the proper way on a production network, you can use fabric CA or any other CA service like amazon, etc

negupta (Thu, 10 Sep 2020 17:36:22 GMT):
getting the following error: TypeError: Wallets.newFileSystemWallet is not a function

bestbeforetoday (Thu, 10 Sep 2020 18:49:00 GMT):
Worth checking that you are: 1. Using fabric-network@2.2 (not @1.4) 2. Have imported/required Wallets from fabric-network correctly, e.g. `import { Wallets } from 'fabric-network'`

negupta (Thu, 10 Sep 2020 19:11:54 GMT):
Got it to work. I did something dumb :(

davidkhala (Sat, 12 Sep 2020 11:33:01 GMT):
Not agree on that. I prefer and suggest the caller should take care of most of basic check error message instead of rely on SDK. Otherwise it harm the flexibility of SDK.

davidkel (Sat, 12 Sep 2020 11:47:38 GMT):
I don't think it unreasonable that SDK apis perform parameter checking and that doesn't harm the flexibility of the sdk. When it comes to error handling, it depends on the error and what the SDK is trying to achieve, but what I don't like is the java style of error handling that seems to have become so popular making it really hard to easily handle errors programatically

davidkel (Sat, 12 Sep 2020 11:47:38 GMT):
I don't think it unreasonable that SDK apis perform parameter checking and that doesn't harm the flexibility of the sdk. What I don't like is the java style of error handling that seems to have become so popular making it really hard to easily handle errors programatically

davidkhala (Sun, 13 Sep 2020 04:47:18 GMT):
I see @davidkel replied on me but could not find here. Weird. For italo's case, because it talks about fabric-common, which I prefer to be as lightweight as possible. Type check and error throw code could be done in fabric-network, which is Typescript based.

davidkhala (Sun, 13 Sep 2020 04:47:18 GMT):
I see @davidkel replied on me but could not find here. Weird. For italo's case, I reply so because it talks about fabric-common, which I prefer to be as lightweight as possible. Type check and error throw code could be done in fabric-network, which is Typescript based.

lquintai (Mon, 14 Sep 2020 08:15:57 GMT):
Has joined the channel.

bestbeforetoday (Tue, 15 Sep 2020 12:17:42 GMT):
And if you're using TypeScript the TypeScript compiler will identify incorrect typing for you without the SDK having to include explicit type checking code on every function call :)

mitrashan (Wed, 16 Sep 2020 15:02:25 GMT):
Hi all, I have a chaincode consisting of 3 smart contracts in one .cds package. I have successfully installed and instantiated the chaincode on IBM Cloud but, when I'm trying to call an `invoke` function from one smart contract from my Node SDK I am getting the error - `2020-09-16T05:44:11.067Z - error: [Channel.js]: Channel:mychannel received discovery error:failed constructing descriptor for chaincodes: 2020-09-16T05:44:11.067Z - error: [DiscoveryEndorsementHandler]: endorse - no endorsement plan found for {"chaincodes":[{"name":"contract1"}]}` I have 1 peer per org and there are 3 orgs in the IBP setup also I have marked the single peers as the `anchor peer` on IBP .. can someone please suggest how to resolve the issue.

mitrashan (Wed, 16 Sep 2020 15:02:25 GMT):
Hi all, I have a chaincode consisting of 3 smart contracts in one .cds package. I have successfully installed and instantiated the chaincode on IBM Cloud but, when I'm trying to call an `invoke` function from one smart contract from my Node SDK I am getting the error - ` 2020-09-16T05:44:11.067Z - error: [Channel.js]: Channel:mychannel received discovery error:failed constructing descriptor for chaincodes: 2020-09-16T05:44:11.067Z - error: [DiscoveryEndorsementHandler]: endorse - no endorsement plan found for {"chaincodes":[{"name":"contract1"}]} ` I have 1 peer per org and there are 3 orgs in the IBP setup also I have marked the single peers as the `anchor peer` on IBP .. can someone please suggest how to resolve the issue.

mahoney1 (Thu, 17 Sep 2020 11:14:58 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

SpecialAgentCooper (Thu, 17 Sep 2020 15:01:45 GMT):
what's the password for the meeting?

mahoney1 (Thu, 17 Sep 2020 15:02:42 GMT):
just asking the admin / moderator of Zoom calls @SpecialAgentCooper (there should be no password - first time one is asked - will be back )

SpecialAgentCooper (Thu, 17 Sep 2020 15:03:23 GMT):
thanks @mahoney1

mahoney1 (Thu, 17 Sep 2020 15:26:41 GMT):
ok all - so the meeting ^^ is open now - password is THVoQXVHYUVWbHIwOFdvME0xN0lCZz09 when prompted - apologies - this was prompted by changes that Zoom (the host) have made, apparently

xachen (Mon, 21 Sep 2020 06:58:17 GMT):
Has joined the channel.

xachen (Mon, 21 Sep 2020 06:58:18 GMT):
@davidkhala can you take a look

xachen (Mon, 21 Sep 2020 06:58:26 GMT):
https://jira.hyperledger.org/browse/FABN-401?jql=text%20~%20%22chaincode%20event%22

xachen (Mon, 21 Sep 2020 06:59:19 GMT):

Clipboard - September 21, 2020 2:59 PM

xachen (Mon, 21 Sep 2020 06:59:29 GMT):
i got the result is undefined

erin-hughes (Mon, 21 Sep 2020 07:57:14 GMT):
Has joined the channel.

bestbeforetoday (Tue, 22 Sep 2020 09:59:18 GMT):
@xachen Consider using the _fabric-network_ API to listen for chaincode events: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Contract.html#addContractListener

arner (Wed, 23 Sep 2020 09:29:42 GMT):
When using implicit private data collections in an invoke, do we have to tell the discovery service to add those collections as discovery interests, e.g. _implicit_org_Org1MSP? (see https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-discovery-fabric-network.html)?

bh4rtp (Thu, 24 Sep 2020 01:56:49 GMT):
hi, i am using `contract.addDiscoveryInterest` `fabric-network` api. everything is ok. now i want to transplant from javascript to java. does java sdk have also addDiscoveryInterest function?

bestbeforetoday (Thu, 24 Sep 2020 10:52:44 GMT):
Answered in the #fabric-sdk-java channel

bretharrison (Thu, 24 Sep 2020 13:29:19 GMT):
You may wish to control the endorsements by using the ``` ```

bretharrison (Thu, 24 Sep 2020 13:29:19 GMT):
You may wish to control the endorsements by using the ``` ``` transaction.setEndorsingOrganizations('Org1MSP'); ```

bretharrison (Thu, 24 Sep 2020 13:29:19 GMT):
You may wish to control the endorsements by using the ``` `transaction.setEndorsingOrganizations('Org1MSP');`

bretharrison (Thu, 24 Sep 2020 13:29:19 GMT):
With implicit collections, which are only on the single organization's peer, you may wish to control the endorsements by using the ``` `transaction.setEndorsingOrganizations('Org1MSP');`

bretharrison (Thu, 24 Sep 2020 13:35:28 GMT):
Yes when using collections, you would use set the discovery interest to have the peer's discovery service develop an endorsement plan that is based on the endorsement policy of the chaincode and of the collection(s)

bretharrison (Thu, 24 Sep 2020 13:35:28 GMT):
With collections, you would use set the discovery interest to have the peer's discovery service develop an endorsement plan that is based on the endorsement policy of the chaincode and of the collection(s)

bretharrison (Thu, 24 Sep 2020 13:35:28 GMT):
With most other collections, you would use set the discovery interest to have the peer's discovery service develop an endorsement plan that is based on the endorsement policy of the chaincode and of the collection(s)

Paradox-AT (Sun, 27 Sep 2020 08:36:00 GMT):
Hey Guys, If I am hosting my microservice on the host machine it is working as expected but if I host the same thing in a container I am gettin these errors: ``` 020-09-27T08:35:00.089Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer0.audit.blockit.co:7050, url:grpcs://localhost:7050, connected:false, connectAttempted:true 2020-09-27T08:35:00.089Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer0.audit.blockit.co:7050 url:grpcs://localhost:7050 timeout:3000 2020-09-27T08:35:00.090Z - error: [DiscoveryService]: _buildOrderer[blockit] - Unable to connect to the discovered orderer orderer0.audit.blockit.co:7050 due to Error: Failed to connect before the deadline on Committer- name: orderer0.audit.blockit.co:7050, url:grpcs://localhost:7050, connected:false, connectAttempted:true 2020-09-27T08:35:03.093Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer1.audit.blockit.co:8050, url:grpcs://localhost:8050, connected:false, connectAttempted:true 2020-09-27T08:35:03.094Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer1.audit.blockit.co:8050 url:grpcs://localhost:8050 timeout:3000 2020-09-27T08:35:03.094Z - error: [DiscoveryService]: _buildOrderer[blockit] - Unable to connect to the discovered orderer orderer1.audit.blockit.co:8050 due to Error: Failed to connect before the deadline on Committer- name: orderer1.audit.blockit.co:8050, url:grpcs://localhost:8050, connected:false, connectAttempted:true ``` Any Idea why??

Paradox-AT (Sun, 27 Sep 2020 08:36:00 GMT):
Hey Guys, If I am hosting my microservice on the host machine it is working as expected but if I host the same thing in a container I am getting these errors: ``` 020-09-27T08:35:00.089Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer0.audit.blockit.co:7050, url:grpcs://localhost:7050, connected:false, connectAttempted:true 2020-09-27T08:35:00.089Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer0.audit.blockit.co:7050 url:grpcs://localhost:7050 timeout:3000 2020-09-27T08:35:00.090Z - error: [DiscoveryService]: _buildOrderer[blockit] - Unable to connect to the discovered orderer orderer0.audit.blockit.co:7050 due to Error: Failed to connect before the deadline on Committer- name: orderer0.audit.blockit.co:7050, url:grpcs://localhost:7050, connected:false, connectAttempted:true 2020-09-27T08:35:03.093Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer1.audit.blockit.co:8050, url:grpcs://localhost:8050, connected:false, connectAttempted:true 2020-09-27T08:35:03.094Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer1.audit.blockit.co:8050 url:grpcs://localhost:8050 timeout:3000 2020-09-27T08:35:03.094Z - error: [DiscoveryService]: _buildOrderer[blockit] - Unable to connect to the discovered orderer orderer1.audit.blockit.co:8050 due to Error: Failed to connect before the deadline on Committer- name: orderer1.audit.blockit.co:8050, url:grpcs://localhost:8050, connected:false, connectAttempted:true ``` Any Idea why??

Paradox-AT (Sun, 27 Sep 2020 10:02:01 GMT):
So I just had to set asLocalhost to false, that solved it

KartikChauhan (Tue, 29 Sep 2020 13:04:08 GMT):
How do I use [BlockDecoder](https://hyperledger.github.io/fabric-sdk-node/release-1.4/BlockDecoder.html) class? The class is not exported in fabric-client npm package.

KartikChauhan (Tue, 29 Sep 2020 13:04:08 GMT):
How do I use [BlockDecoder](https://hyperledger.github.io/fabric-sdk-node/release-1.4/BlockDecoder.html) class? The class is not exported in fabric-client npm package. I'm using Fabric v1.4.2.

davidkel (Tue, 29 Sep 2020 13:27:20 GMT):
try ``` const BlockDecoder = require('fabric-client/lib/BlockDecoder'); ```

Sahar (Tue, 29 Sep 2020 15:34:54 GMT):
Hello everyone, I want to install my chaincode and interact with it using node SDK . it seems like the sdk release 2.2 does not support installing the chaincode. Am i wrong ? Unlike the 1.4 release : https://hyperledger.github.io/fabric-sdk-node/release-1.4/Client.html#installChaincode__anchor Am i missing something ? thanks for the help !

Sahar (Tue, 29 Sep 2020 15:55:25 GMT):
Sorry i was missing something, please bare with me. So in the 1.4 release there is: -fabric-network : for submitting txs and querying the chaincode -fabric-client : for installing chaincode and instanciate and doing other things -fabric-ca-client: for the enroll/register .. However in 2.2 release: -fabric-network: for querying the chaincode -fabric-ca-client -fabric-common And i think in the modules f 2.2 release you cant install or instanciate the chaincode Am i right ? so to do that i need to do it with fabric-client 1.4

davidkel (Tue, 29 Sep 2020 16:05:21 GMT):
There are no operational capabilities at the moment for node-sdk 2.2 so you can't install chaincode or instantiate it. If you stick with node-sdk 1.4 you can do install/instantiate but it only works with the old chaincode lifecycle not the new one in fabric 2 (enabled if you declare 2.0 capabilities in your fabric network setup)

davidkel (Tue, 29 Sep 2020 16:10:54 GMT):
I gather that there is a 3rd party library @davidkhala may be able to provide a link

Sahar (Tue, 29 Sep 2020 16:14:18 GMT):
@davidkel thank you for the reply, so basically if i want to work with a network setup of fabric 2, i need to install my chaincode, and approveFor my orgs with script.sh file like in fabric-samples, and then i can query my chaincode using fabric-network node module of the 2.2 release ?

Sahar (Tue, 29 Sep 2020 16:14:18 GMT):
@davidkel thank you for the reply, so basically if i want to work with a network setup of fabric 2, i need to install my chaincode, and approveFor my orgs with script.sh file like in fabric-samples( https://github.com/hyperledger/fabric-samples/blob/v2.1.1/test-network/scripts/deployCC.sh) , and then i can query my chaincode using fabric-network node module of the 2.2 release ?

davidkhala (Tue, 29 Sep 2020 22:37:06 GMT):
if you are interest you could have a look at https://www.npmjs.com/package/khala-fabric-admin

rthatcher (Thu, 01 Oct 2020 13:11:11 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) Agenda: Future Ownership and Format of the calls. - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community?pwd=STZQd0xMZU9xRVVOVnpQM3JNQ2dqZz09 If you are asked for a password, use: STZQd0xMZU9xRVVOVnpQM3JNQ2dqZz09

carlosalca (Thu, 01 Oct 2020 16:21:11 GMT):
Hi everyone, does anybody know how the SDK balance de load of invokes to a pool of peers of the same organization ? I've been studying how much load receives each peer, and in a pool of 3 peers, there is a peer getting the most part of the invokes while the rest only gets arround a 5%. Any idea about how to controll this ?

bestbeforetoday (Thu, 01 Oct 2020 16:34:48 GMT):
Are you talking about `evaluate` or `submit` of transactions? The default query handler used when you call `contract.evaluateTransaction()` sticks to the last peer that returned a result. You can change this default on Gateway connect to use a round-robin handler: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.DefaultQueryHandlerOptions.html

bestbeforetoday (Thu, 01 Oct 2020 16:35:43 GMT):
Peer selection for discovery-based endorsement is done internally but changes have gone into this area very recently that will get rolled into the next point release

carlosalca (Thu, 01 Oct 2020 16:35:46 GMT):
Hi @bestbeforetoday , I actually mean to submit a transaction

bestbeforetoday (Thu, 01 Oct 2020 16:37:44 GMT):
Without looking through the code I'm not sure how the current peer selection is done during submit but look out for the next point release where the behaviour is (hopefully) better

carlosalca (Thu, 01 Oct 2020 16:38:53 GMT):
So, it will be possible in next point release to manage which peers receive the transaction ? Great, thanks. I'm looking forward to it

bestbeforetoday (Thu, 01 Oct 2020 16:39:19 GMT):
One caveat is that selection may be based on a combination of peer ledger height and random selection, but the client's view of the ledger height is cached for a period of time so if all your transactions are submitted within a relatively small time window you might not see exactly the distribution you might expect

carlosalca (Thu, 01 Oct 2020 16:53:57 GMT):
That makes sense because I'm currently doing some load testing so I'm sending a big amount of transactions in a short period of time

carlosalca (Thu, 01 Oct 2020 16:54:38 GMT):
And as I said, the 90% more or less of the transactions goes to one peer out of three

anchit (Thu, 01 Oct 2020 20:23:35 GMT):
Has joined the channel.

ckong (Fri, 02 Oct 2020 03:34:53 GMT):
Has joined the channel.

ckong (Fri, 02 Oct 2020 03:37:46 GMT):
Hi, I have a question regarding the following code snippet: ``` const network = await gateway.getNetwork(channelid) const listener = await network.addBlockListener( async (event) => { await ProcessingMap.set(event.blockData.header.number, event.blockData) console.log(`Added block ${event.blockData.header.number} to ProcessingMap`) }, { startBlock: parseInt(nextBlock, 10) } ) ``` This listens to one channel for block events, but what if I have multiple channels? Is it correct to create multiple `network`s and add block listeners to each of them?

bestbeforetoday (Fri, 02 Oct 2020 08:11:51 GMT):
Yes. The SDKs Network corresponds to a Channel, so if you want to listen to block events for multiple channels then create a Network and attach a block listener for each one

bestbeforetoday (Fri, 02 Oct 2020 08:11:51 GMT):
Yes. The SDK's Network corresponds to a Channel, so if you want to listen to block events for multiple channels then create a Network and attach a block listener for each one

ckong (Fri, 02 Oct 2020 08:46:26 GMT):
Can I perform this process multiple times within a single file? Or can I only do it once, and then I have to run multiple processes of this listener?

bestbeforetoday (Fri, 02 Oct 2020 08:53:12 GMT):
You should be able to do it all in the same process. If the peers you are connecting to (the one(s) in your connection profile) are members of all the channels and you can use the same identity (credentials and MSP ID) to connect to them all, you can use a single Gateway instance to get all the Network objects to which you want to attach listeners. If you need to use different peers or identities to connect to each each network then you will need multiple Gateway instances

ckong (Fri, 02 Oct 2020 08:55:56 GMT):
Perfect, so now I just need a way to get all the channels programmatically

carlosalca (Fri, 02 Oct 2020 09:49:58 GMT):
@bestbeforetoday is there any place where I can find more info about this and this next version feature of the SDK ?

bestbeforetoday (Fri, 02 Oct 2020 15:23:17 GMT):
There is some discussion and commits under FABN-1571: https://jira.hyperledger.org/browse/FABN-1571

razasikander (Mon, 05 Oct 2020 10:03:49 GMT):
Hello my channel Event hub is getting when trying to record a transaction, the block is getting commited. and im able to query the tx with tx id error 👨‍❤️‍💋‍👨 [2020-10-05T09:33:26.726] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: ChannelEventHub has been shutdown

ckong (Tue, 06 Oct 2020 09:33:21 GMT):
I need some help with understanding what the following function does: ```async function processPendingBlocks(ProcessingMap) { setTimeout(async () => { let nextBlockNumber = fs.readFileSync(configPath, "utf8") let processBlock do { processBlock = ProcessingMap.get(nextBlockNumber) if (processBlock == undefined) { break } try { await blockProcessing.processBlockEvent(processBlock, sdkAddress, sdkPort) } catch (error) { console.error(`Failed to process block: ${error}`) } ProcessingMap.remove(nextBlockNumber) fs.writeFileSync(configPath, parseInt(nextBlockNumber, 10) + 1) nextBlockNumber = fs.readFileSync(configPath, "utf8") } while (true) processPendingBlocks(ProcessingMap) }, 250) }```

ckong (Tue, 06 Oct 2020 09:36:20 GMT):
The code above is part of a listener which listens to a particular channel. I'm trying to change the code to listen to multiple channels by creating one network per channel using `gateway.getNetwork()` and then `network.addBlockListener()` for each channel

ckong (Tue, 06 Oct 2020 09:37:18 GMT):
However I'm not sure how to modify this function to process data from multiple channels

nleut (Thu, 08 Oct 2020 15:40:16 GMT):
Has joined the channel.

nleut (Thu, 08 Oct 2020 15:42:12 GMT):
Why was the functionality to install chaincode and other admin functionality removed in the version 2 sdk? this is going to be a pretty big blocker for our org to move to hlf 2

davidkel (Thu, 08 Oct 2020 18:49:31 GMT):
You could take a look at https://www.npmjs.com/package/khala-fabric-admin it might help

SasinduFdo (Fri, 09 Oct 2020 09:46:02 GMT):
Has joined the channel.

Rajatsharma (Mon, 12 Oct 2020 10:28:38 GMT):
Hi everyone, I always installed chaincodes from cli in fabric V1.4.2. I'm trying to use fabric-node-SDK now, but I'm unable to create indexes in the chaincode which had private data. Is there any way to proceed with this?

balaji.viswanathan (Mon, 12 Oct 2020 10:57:38 GMT):
Hi, when using the fabric-networks higher level node sdk (version 1.4.13) to submit transactions, we are seeing a weird issue, where the 1st and 2nd request succeeds but every subsequent request fails with the following error: TypeError: Illegal Invocation the stack trace is " 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _endorse - starting layout plan 0 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _endorse_layout - start 2020-10-09T10:14:10.580Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - TypeError: Illegal invocation 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - start 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - send endorsement to n597082-itorg1peer2.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 2020-10-09T10:14:10.579Z - debug: [Remote.js]: getUrl::grpcs://n597082-itorg1peer2.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 2020-10-09T10:14:10.579Z - debug: [Peer.js]: sendProposal - Start ----n597082-itorg1peer2.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 grpcs://n597082-itorg1peer2.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 2020-10-09T10:14:10.580Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - send endorsement to n597082-itorg1peer1.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 2020-10-09T10:14:10.580Z - debug: [Remote.js]: getUrl::grpcs://n597082-itorg1peer1.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 2020-10-09T10:14:10.580Z - debug: [Peer.js]: sendProposal - Start ----n597082-itorg1peer1.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 grpcs://n597082-itorg1peer1.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 2020-10-09T10:14:10.581Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - not able to get a completed endorsement 2020-10-09T10:14:10.584Z - debug: [DiscoveryEndorsementHandler]: _execute_endorsements - endorsement failed: TypeError: Illegal invocation at getCall (node_modules/grpc/src/client_interceptors.js:655:22) at node_modules/grpc/src/client_interceptors.js:789:16 at node_modules/grpc/src/client_interceptors.js:1402:14 at _buildChain (node_modules/grpc/src/client_interceptors.js:1405:33) at Object.getInterceptingCall (node_modules/grpc/src/client_interceptors.js:1367:10) at ServiceClient.Client.makeUnaryRequest (node_modules/grpc/src/client.js:568:47) at ServiceClient.method_func (node_modules/grpc/src/client.js:1000:43) at node_modules/fabric-client/lib/Peer.js:127:25 at new Promise () at Peer.sendProposal (node_modules/fabric-client/lib/Peer.js:120:10) at ChannelPeer.sendProposal (node_modules/fabric-client/lib/Channel.js:4052:21) at node_modules/fabric-client/lib/impl/DiscoveryEndorsementHandler.js:287:39 at processTicksAndRejections (internal/process/task_queues.js:94:5) 2020-10-09T10:14:10.584Z - debug: [DiscoveryEndorsementHandler]: _endorse - layout plan 0 did not complete successfully, try another layout pla

balaji.viswanathan (Mon, 12 Oct 2020 10:57:38 GMT):
Hi, when using the fabric-networks higher level node sdk (version 1.4.13) to submit transactions, we are seeing a weird issue, where the 1st and 2nd request succeeds but every subsequent request fails with the following error: TypeError: Illegal Invocation the stack trace is " 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _endorse - starting layout plan 0 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _endorse_layout - start 2020-10-09T10:14:10.580Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - TypeError: Illegal invocation 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - start 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - send endorsement to peer1.example.org:7051 2020-10-09T10:14:10.579Z - debug: [Remote.js]: getUrl::grpcs://peer1.example.org:7051 2020-10-09T10:14:10.579Z - debug: [Peer.js]: sendProposal - Start ----peer1.example.org:7051 grpcs://peer1.example.org:7051 2020-10-09T10:14:10.580Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - send endorsement to peer2.example.org:7051 2020-10-09T10:14:10.580Z - debug: [Remote.js]: getUrl::grpcs://peer2.example.org:7051 2020-10-09T10:14:10.580Z - debug: [Peer.js]: sendProposal - Start ----peer2.example.org:7051 grpcs://peer2.example.org:7051 2020-10-09T10:14:10.581Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - not able to get a completed endorsement 2020-10-09T10:14:10.584Z - debug: [DiscoveryEndorsementHandler]: _execute_endorsements - endorsement failed: TypeError: Illegal invocation at getCall (node_modules/grpc/src/client_interceptors.js:655:22) at node_modules/grpc/src/client_interceptors.js:789:16 at node_modules/grpc/src/client_interceptors.js:1402:14 at _buildChain (node_modules/grpc/src/client_interceptors.js:1405:33) at Object.getInterceptingCall (node_modules/grpc/src/client_interceptors.js:1367:10) at ServiceClient.Client.makeUnaryRequest (node_modules/grpc/src/client.js:568:47) at ServiceClient.method_func (node_modules/grpc/src/client.js:1000:43) at node_modules/fabric-client/lib/Peer.js:127:25 at new Promise () at Peer.sendProposal (node_modules/fabric-client/lib/Peer.js:120:10) at ChannelPeer.sendProposal (node_modules/fabric-client/lib/Channel.js:4052:21) at node_modules/fabric-client/lib/impl/DiscoveryEndorsementHandler.js:287:39 at processTicksAndRejections (internal/process/task_queues.js:94:5) 2020-10-09T10:14:10.584Z - debug: [DiscoveryEndorsementHandler]: _endorse - layout plan 0 did not complete successfully, try another layout plan

balaji.viswanathan (Mon, 12 Oct 2020 10:57:38 GMT):
Hi, when using the fabric-networks higher level node sdk (version 1.4.13) to submit transactions, we are seeing a weird issue, where the 1st and 2nd request succeeds but every subsequent request fails with the following error: TypeError: Illegal Invocation the stack trace is ` 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _endorse - starting layout plan 0 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _endorse_layout - start 2020-10-09T10:14:10.580Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - TypeError: Illegal invocation 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - start 2020-10-09T10:14:10.579Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - send endorsement to peer1.example.org:7051 2020-10-09T10:14:10.579Z - debug: [Remote.js]: getUrl::grpcs://peer1.example.org:7051 2020-10-09T10:14:10.579Z - debug: [Peer.js]: sendProposal - Start ----peer1.example.org:7051 grpcs://peer1.example.org:7051 2020-10-09T10:14:10.580Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - send endorsement to peer2.example.org:7051 2020-10-09T10:14:10.580Z - debug: [Remote.js]: getUrl::grpcs://peer2.example.org:7051 2020-10-09T10:14:10.580Z - debug: [Peer.js]: sendProposal - Start ----peer2.example.org:7051 grpcs://peer2.example.org:7051 2020-10-09T10:14:10.581Z - debug: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - not able to get a completed endorsement 2020-10-09T10:14:10.584Z - debug: [DiscoveryEndorsementHandler]: _execute_endorsements - endorsement failed: TypeError: Illegal invocation at getCall (node_modules/grpc/src/client_interceptors.js:655:22) at node_modules/grpc/src/client_interceptors.js:789:16 at node_modules/grpc/src/client_interceptors.js:1402:14 at _buildChain (node_modules/grpc/src/client_interceptors.js:1405:33) at Object.getInterceptingCall (node_modules/grpc/src/client_interceptors.js:1367:10) at ServiceClient.Client.makeUnaryRequest (node_modules/grpc/src/client.js:568:47) at ServiceClient.method_func (node_modules/grpc/src/client.js:1000:43) at node_modules/fabric-client/lib/Peer.js:127:25 at new Promise () at Peer.sendProposal (node_modules/fabric-client/lib/Peer.js:120:10) at ChannelPeer.sendProposal (node_modules/fabric-client/lib/Channel.js:4052:21) at node_modules/fabric-client/lib/impl/DiscoveryEndorsementHandler.js:287:39 at processTicksAndRejections (internal/process/task_queues.js:94:5) 2020-10-09T10:14:10.584Z - debug: [DiscoveryEndorsementHandler]: _endorse - layout plan 0 did not complete successfully, try another layout plan `

balaji.viswanathan (Mon, 12 Oct 2020 10:58:33 GMT):
The TypeError is thrown at different points subsequent to this, post discovery_cache_time of 5minutes, this error occurs when discovery is attempted

mbwhite (Mon, 12 Oct 2020 12:13:14 GMT):
Hi - check the docs at https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html?highlight=indexes#using-indexes-with-collections

mbwhite (Mon, 12 Oct 2020 12:14:07 GMT):
not sure about that ask an expert @bestbeforetoday

Rajatsharma (Mon, 12 Oct 2020 12:14:47 GMT):
This is working from sdk but when, I'm giving this in install using node-sdk. These the indexes are not installed.

mbwhite (Mon, 12 Oct 2020 12:15:17 GMT):
Indexes are specified in the chaincode installation - SDK would just issue the request for the transaction

Rajatsharma (Mon, 12 Oct 2020 12:21:04 GMT):
I'm using the sdk like this: https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-metadata-chaincode.html and I'm using the path in the "metaDataPath" as META-INF path. Still indexes are not reflected.

mbwhite (Mon, 12 Oct 2020 12:22:53 GMT):
To clarify - you're using the client SDK is install chaincode?

Rajatsharma (Mon, 12 Oct 2020 12:23:00 GMT):
Yes

mbwhite (Mon, 12 Oct 2020 12:23:32 GMT):
ok, how are you determing the indexes are not installed?

Rajatsharma (Mon, 12 Oct 2020 12:24:42 GMT):
I opened the attached couchDB fauxton. The design documents were not created and I was getting warning messages while querying the database.

mbwhite (Mon, 12 Oct 2020 12:25:43 GMT):
right - that could be a specific question for the Fabric channel.. however have you attempted to include the indexes inside the chaincode package and install with the peer commands...

mbwhite (Mon, 12 Oct 2020 12:26:09 GMT):
could be a useful diagnostic attempt.

Rajatsharma (Mon, 12 Oct 2020 12:27:19 GMT):
Yes. The indexes were created when I was installing using the CLI. I'll just recheck if I'm making any mistakes in my code. I was unable to find any as of now.

mbwhite (Mon, 12 Oct 2020 12:27:47 GMT):
right.. worth raising an issue then on the SDK component in JIRA I think

Rajatsharma (Mon, 12 Oct 2020 12:28:21 GMT):
Okay sure. I'll confirm and raise this, If I'm still unable to figure out. Thanks !!!

balaji.viswanathan (Tue, 13 Oct 2020 07:18:55 GMT):
I did a little bit more digging into this 1. The above behaviour is seen per-channel. i.e., once an invoke starts failing for a channel, subsequent invocations to the same channel fail. However, at this point - an invocation to a new channel succeeds (and then follows the same behaviour of failures). 2. I read that the Gateway object is long living and can be connected once and reused. Is it true for the network as well? Do i need to do `Gateway..getNetwork()` every time?

balaji.viswanathan (Tue, 13 Oct 2020 07:24:02 GMT):
I am referring to this - https://hyperledger.github.io/fabric-sdk-node/release-1.4/module-fabric-network.html

hoanghoo (Tue, 13 Oct 2020 07:57:48 GMT):

Clipboard - October 13, 2020 2:57 PM

hoanghoo (Tue, 13 Oct 2020 08:01:26 GMT):
Has joined the channel.

hoanghoo (Tue, 13 Oct 2020 08:01:27 GMT):
I got a problem when deploy API using node sdk in cloud with docker. Memory is too high end exit with code 137 after a few time. Memory continues to increase without query or invoke. When I check memory of folder, I found that /usr/local was reason but I don't know solution?

bestbeforetoday (Tue, 13 Oct 2020 09:18:16 GMT):
You should definitely be able to use the same Network and Contract object multiple times

bestbeforetoday (Tue, 13 Oct 2020 09:21:07 GMT):
That error looks way down inside gRPC. It's possible it might be a bug in the version of gRPC used. If you haven't already, could you raise a bug report in Jira with as much accompanying information as possible? https://jira.hyperledger.org/projects/FABN

bestbeforetoday (Tue, 13 Oct 2020 09:26:26 GMT):
Are you talking about memory or storage? /usr/local is on the filesystem so I would think of this as storage rather than memory (RAM). If you're hitting disk space limits then I guess you need to look at what is using that disk space. If it's memory then at least looking at process memory usage and, if it is a Node process, you might need to do some profiling to see what is using the memory

balaji.viswanathan (Tue, 13 Oct 2020 09:31:57 GMT):
Thanks will do. btw, disconnecting the Gateway and creating a new one gets rid of the problem. But that is not desirable. And i see the same error during Peer.close() call as well.

balaji.viswanathan (Tue, 13 Oct 2020 10:03:20 GMT):
on close ` [invoke-processor-7b6b8d48b8-8bzx6] 2020-10-13T08:55:10.131Z - debug: [Gateway]: in disconnect [invoke-processor-7b6b8d48b8-8bzx6] 2020-10-13T08:55:10.131Z - debug: [Network]: in _dispose [invoke-processor-7b6b8d48b8-8bzx6] 2020-10-13T08:55:10.132Z - debug: [Channel.js]: close - closing connections [invoke-processor-7b6b8d48b8-8bzx6] 2020-10-13T08:55:10.132Z - debug: [Peer.js]: close - closing peer endorser connection n597082-itorg1peer1.ift-ibp-v2-org1-k8s-7e2993d0923b39f2a864be6b862f2940-0000.us-south.containers.appdomain.cloud:7051 [invoke-processor-7b6b8d48b8-8bzx6] {"timestamp":"2020-10-13T08:55:10.137Z","level":"warn","message":"HLF client channelName: intg-shared-light disconect gateway TypeError: Illegal invocation TypeError: Illegal invocation\n at ServiceClient.Client.close (node_modules/grpc/src/client.js:858:17)\n at Peer.close (node_modules/fabric-client/lib/Peer.js:76:25)\n at ChannelPeer.close (node_modules/fabric-client/lib/Channel.js:3944:14)\n at node_modules/fabric-client/lib/Channel.js:144:17\n at Map.forEach ()\n at Channel.close (node_modules/fabric-client/lib/Channel.js:143:23)\n at Network._dispose (node_modules/fabric-network/lib/network.js:205:16)\n at Gateway.disconnect (node_modules/fabric-network/lib/gateway.js:262:12)\n at CommonClient.shutdown (ts/packages/hyperledger-fabric-common/src/clients/common-client.ts:177:20)\n at NodeCache. (ts/packages/hyperledger-fabric-common/src/clients/client-cache.ts:40:26)\n at NodeCache.emit (events.js:223:5)\n at NodeCache.del (node_modules/node-cache/lib/node_cache.js:503:18)\n at NodeCache._check (node_modules/node-cache/lib/node_cache.js:657:18)\n at NodeCache._checkData (node_modules/node-cache/lib/node_cache.js:629:16)\n at listOnTimeout (internal/timers.js:533:17)\n at processTimers (internal/timers.js:475:7)","label":"/app/ts/microservices/invoke-processor/container.binary.runfiles/blockheads/ts/packages/hyperledger-fabric-common/src/clients/common-client.js"} `

balaji.viswanathan (Tue, 13 Oct 2020 10:03:20 GMT):
on close ` [invoke-processor-7b6b8d48b8-8bzx6] 2020-10-13T08:55:10.131Z - debug: [Gateway]: in disconnect [invoke-processor-7b6b8d48b8-8bzx6] 2020-10-13T08:55:10.131Z - debug: [Network]: in _dispose [invoke-processor-7b6b8d48b8-8bzx6] 2020-10-13T08:55:10.132Z - debug: [Channel.js]: close - closing connections [invoke-processor-7b6b8d48b8-8bzx6] 2020-10-13T08:55:10.132Z - debug: [Peer.js]: close - closing peer endorser connection peer1.example.org [invoke-processor-7b6b8d48b8-8bzx6] {"timestamp":"2020-10-13T08:55:10.137Z","level":"warn","message":"HLF client channelName: intg-shared-light disconect gateway TypeError: Illegal invocation TypeError: Illegal invocation\n at ServiceClient.Client.close (node_modules/grpc/src/client.js:858:17)\n at Peer.close (node_modules/fabric-client/lib/Peer.js:76:25)\n at ChannelPeer.close (node_modules/fabric-client/lib/Channel.js:3944:14)\n at node_modules/fabric-client/lib/Channel.js:144:17\n at Map.forEach ()\n at Channel.close (node_modules/fabric-client/lib/Channel.js:143:23)\n at Network._dispose (node_modules/fabric-network/lib/network.js:205:16)\n at Gateway.disconnect (node_modules/fabric-network/lib/gateway.js:262:12)\n at CommonClient.shutdown (ts/packages/hyperledger-fabric-common/src/clients/common-client.ts:177:20)\n at NodeCache. (ts/packages/hyperledger-fabric-common/src/clients/client-cache.ts:40:26)\n at NodeCache.emit (events.js:223:5)\n at NodeCache.del (node_modules/node-cache/lib/node_cache.js:503:18)\n at NodeCache._check (node_modules/node-cache/lib/node_cache.js:657:18)\n at NodeCache._checkData (node_modules/node-cache/lib/node_cache.js:629:16)\n at listOnTimeout (internal/timers.js:533:17)\n at processTimers (internal/timers.js:475:7)","label":"/app/ts/microservices/invoke-processor/container.binary.runfiles/blockheads/ts/packages/hyperledger-fabric-common/src/clients/common-client.js"} `

balaji.viswanathan (Tue, 13 Oct 2020 12:18:11 GMT):
https://jira.hyperledger.org/browse/FABN-1652

poojaKamat (Wed, 14 Oct 2020 07:57:25 GMT):
I am trying to create HsmX509Provider object to configure HSM based wallet, following https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html , getting error "TypeError: HsmX509Provider is not a constructor" .

poojaKamat (Wed, 14 Oct 2020 07:57:25 GMT):
I am trying to create HsmX509Provider object to configure HSM based wallet, following https://hyperledger.github.io/fabric-sdk-node/master/tutorial-wallet.html , getting error "TypeError: HsmX509Provider is not a constructor" . went through the fabric-network node modules, HsmX509Provider is not found, how can we use hsm based wallets using node sdk ?

bestbeforetoday (Wed, 14 Oct 2020 09:00:16 GMT):
What version of _fabric-network_ are you using?

poojaKamat (Wed, 14 Oct 2020 09:01:47 GMT):
v1.4

bestbeforetoday (Wed, 14 Oct 2020 09:23:37 GMT):
You are looking at the current development documentation (master branch), which is essentially the v2.x stream. You need to look at the documentation for v1.4 if you are using the v1.4 SDK: https://hyperledger.github.io/fabric-sdk-node/

bestbeforetoday (Wed, 14 Oct 2020 09:29:24 GMT):
Having said that, the documentation for HSM in v1.4 looks to be very light. if you've got the option of working with Fabric v2.2 then that might be an easier path. If you're locked into v1.4 then (from memory) you need to create a Wallet using an HSMWalletMixin

poojaKamat (Wed, 14 Oct 2020 09:29:31 GMT):
https://hyperledger.github.io/fabric-sdk-node/release-1.4/module-fabric-network.HSMWalletMixin.html

poojaKamat (Wed, 14 Oct 2020 09:29:42 GMT):
Any further details on usage

poojaKamat (Wed, 14 Oct 2020 09:29:59 GMT):
an example of how to use this

bestbeforetoday (Wed, 14 Oct 2020 09:32:26 GMT):
Something like this: ``` const hsmWallet = new InMemoryWallet(new HSMWalletMixin(pkcsLibPath, PKCS11_SLOT, PKCS11_PIN)); ```

bestbeforetoday (Wed, 14 Oct 2020 09:33:32 GMT):
See here for an integration test. Not great as an example but it should give you some clues on how it can work: https://github.com/hyperledger/fabric-sdk-node/blob/613b6d250f39f198bce2a11f744d0ff30bd17894/test/integration/network-e2e/invoke-hsm.js#L53

poojaKamat (Wed, 14 Oct 2020 10:56:33 GMT):
Followed this test case - test('\n\n****** Network End-to-end flow: import identity into wallet using hsm *****\n\n', async (t) => { await setupAdmin(); await hsmIdentitySetup(); const exists = await hsmWallet.exists(hsmUser); if (exists) { t.pass('Successfully imported hsmUser into wallet'); } else { t.fail('Failed to import hsmUser into wallet'); } t.end(); });

poojaKamat (Wed, 14 Oct 2020 10:56:49 GMT):
getting Segmentation fault (core dumped)

bestbeforetoday (Wed, 14 Oct 2020 11:15:35 GMT):
I've seen similar issues in the past depending on the versions of HSM library and platform used. In my was certain SoftHSM and Ubuntu versions, but it's an issue with the native HSM library code you're using

bestbeforetoday (Wed, 14 Oct 2020 11:15:35 GMT):
I've seen similar issues in the past depending on the versions of HSM library and platform used. In my case it was certain SoftHSM and Ubuntu versions, but it's an issue with the native HSM library code you're using

bestbeforetoday (Wed, 14 Oct 2020 11:17:09 GMT):
The Node.js version might also be a factor, since the Node.js native code is loading the HSM native library

poojaKamat (Wed, 14 Oct 2020 11:20:50 GMT):
I am using SoftHSM v2.1.0 and OS is Rhel 7.6

poojaKamat (Wed, 14 Oct 2020 11:21:11 GMT):
node version : v10.22.0

poojaKamat (Wed, 14 Oct 2020 11:30:12 GMT):
but if I try to register and enroll using fabric-ca-client binary, it is successfull

poojaKamat (Wed, 14 Oct 2020 11:30:12 GMT):
but if I try to register and enroll identity using fabric-ca-client binary, it is successfull

poojaKamat (Wed, 14 Oct 2020 11:40:22 GMT):
any recommended version of softhsm and Node ?

bestbeforetoday (Wed, 14 Oct 2020 12:53:25 GMT):
It looks like the integration tests for the v1.4 SDK are currently running successfully on Ubuntu 18.04.5 (x64) and SoftHSM v2.2.0 with both Node v10.22.1 and v12.19.0

poojaKamat (Thu, 15 Oct 2020 04:16:56 GMT):
But one concern was, with fabric-ca-client library we can successfully register and enroll identities, with Softhsm 2.1.0

poojaKamat (Thu, 15 Oct 2020 04:17:31 GMT):
Only when trying with node sdk it throws Segmentation fault error

poojaKamat (Thu, 15 Oct 2020 05:43:11 GMT):
HSMWalletMixin { library: '/usr/lib64/libsofthsm2.so', slot: 0, pin: '12345', usertype: null, cryptoSuite: null }

poojaKamat (Thu, 15 Oct 2020 05:43:51 GMT):
How is the token to store the key is obtained here ?

poojaKamat (Thu, 15 Oct 2020 05:43:51 GMT):
How is the token label to store the key is obtained here ?

bestbeforetoday (Thu, 15 Oct 2020 08:16:31 GMT):
fabric-ca-client is part of the Node SDK. It's the part used for registering and enrolling with the CA. I'm guessing when you say "Node SDK" you mean submitting transactions, which is going to be interacting with HSM differently; to do signing

poojaKamat (Thu, 15 Oct 2020 08:55:59 GMT):
sorry , I meant using the fabric-client binary directly by using commands register and enroll it works, when we try same operations using node sdk we are getting segmentation fault

poojaKamat (Thu, 15 Oct 2020 08:55:59 GMT):
sorry , I meant using the fabric-client binary directly by using commands register and enroll it works, when we try same operations using node sdk we are getting an error segmentation fault

bestbeforetoday (Thu, 15 Oct 2020 09:01:04 GMT):
There is no fabric client binary

bestbeforetoday (Thu, 15 Oct 2020 09:01:22 GMT):
Do you mean the `peer` CLI commands?

poojaKamat (Thu, 15 Oct 2020 09:02:05 GMT):
*fabric-ca-client binary , example :./fabric-ca-client enroll -d -u https://:@: --tls.certfiles --enrollment.profile tls --csr.hosts '' --mspdir tls-ca/tlsadmin/msp

bestbeforetoday (Thu, 15 Oct 2020 09:02:35 GMT):
So you're using a binary CLI command written in Go

poojaKamat (Thu, 15 Oct 2020 09:02:42 GMT):
yes right

poojaKamat (Thu, 15 Oct 2020 09:02:51 GMT):
using which register and enroll works

bestbeforetoday (Thu, 15 Oct 2020 09:02:53 GMT):
You are correct, that is different from a JavaScript package

poojaKamat (Thu, 15 Oct 2020 09:03:17 GMT):
so we wanted to try registering and enrolling using node sdk

bestbeforetoday (Thu, 15 Oct 2020 09:03:34 GMT):
Using SoftHSM?

poojaKamat (Thu, 15 Oct 2020 09:03:55 GMT):
which throws an error : "Segmentation fault (core dumped)"

poojaKamat (Thu, 15 Oct 2020 09:04:00 GMT):
Yes using SoftHSM

bestbeforetoday (Thu, 15 Oct 2020 09:04:58 GMT):
I believe the problem is related to native code invocation between the native Node.js runtime and the native SoftHSM library

poojaKamat (Thu, 15 Oct 2020 09:06:12 GMT):
okay will try upgrading node to v10.22.1 or v12.19.0 and SoftHSM v2.2.0

poojaKamat (Thu, 15 Oct 2020 09:06:12 GMT):
okay will try upgrading node to v10.22.1 or v12.19.0 and SoftHSM tov2.2.0

poojaKamat (Thu, 15 Oct 2020 09:06:12 GMT):
okay will try upgrading node to v10.22.1 or v12.19.0 and SoftHSM to v2.2.0

poojaKamat (Thu, 15 Oct 2020 09:06:12 GMT):
okay will try upgrading node to v10.22.1 or v12.19.0 and SoftHSM to v2.2.0 as recommended

poojaKamat (Thu, 15 Oct 2020 12:34:04 GMT):
Upgraded node to v12.19.0 and Softhsm to v2.5, the issue still persists

rthatcher (Thu, 15 Oct 2020 13:12:18 GMT):
Reminder that the Final Fabric Application Developer Community call is today at 3pm UTC (4pm UK, 11am ET, 8am PT) Agenda: Alternative calls, information sources and support routes.. - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community?pwd=STZQd0xMZU9xRVVOVnpQM3JNQ2dqZz09 If you are asked for a password, use: STZQd0xMZU9xRVVOVnpQM3JNQ2dqZz09

poojaKamat (Thu, 15 Oct 2020 14:39:30 GMT):
worked with Node v 10.22.1 and SoftHsm v 2.5.0

poojaKamat (Thu, 15 Oct 2020 14:39:54 GMT):
Thank u

bestbeforetoday (Thu, 15 Oct 2020 15:13:24 GMT):
:thumbsup:

sichen (Thu, 15 Oct 2020 15:22:49 GMT):
Has joined the channel.

rjvsa (Mon, 19 Oct 2020 04:04:21 GMT):
Has joined the channel.

rameshlohala (Tue, 20 Oct 2020 11:17:23 GMT):
Has joined the channel.

ckong (Tue, 20 Oct 2020 15:49:39 GMT):
Can anyone show me how to get the height of a channel using the Node SDK?

ckong (Tue, 20 Oct 2020 15:50:01 GMT):
Is there some sample code that I can refer to?

ckong (Tue, 20 Oct 2020 18:15:26 GMT):
With the following code ```const listener = await network.addBlockListener( async (event) => { await ProcessingMap.set(event.blockData.header.number, event.blockData); console.log(`[Added block ${event.blockData.header.number} to ProcessingMap`); }, { startBlock: parseInt(nextBlock, 10) } ); ``` If `nextBlock` is greater than the ledger height, then I get an error similar to the following: ```2020-10-20T18:02:13.324Z - error: [EventService]: EventService[peer1.org1.xxx.com,peer3.org1.xxx.com,peer2.org1.xxx.com] timed out after:3000 2020-10-20T18:02:13.325Z - error: [EventService]: send[peer1.org1.xxx.com,peer3.org1.xxx.com,peer2.org1.xxx.com] - #1 - Starting stream to peer1.org1.xxx.com failed ``` How do I handle this error?

Paradox-AT (Tue, 20 Oct 2020 21:01:34 GMT):
Hey Guys, I am trying to do a transaction from the user but when I am trying to get the channel then I am getting this error: **Microservice Logs:** ``` error: [DiscoveryService]: send[mychannel] - Channel:mychannel received discovery error:failed constructing descriptor for chaincodes: createTransaction Error: Cannot do transaction in blockchain: DiscoveryService: mychannel error: failed constructing descriptor for chaincodes: at FabricRepository. (/app/microservice/dist/services/blockchain-client.js:235:23) at Generator.throw () at rejected (/app/microservice/dist/services/blockchain-client.js:6:65) at processTicksAndRejections (internal/process/task_queues.js:97:5) POST /fabric-service/createTransaction 997.103 ``` **Peer Logs:** ``` 2020-10-20 20:23:54.218 UTC [discovery.endorsement] func1 -> DEBU d98 Endpoint: peer0.org2.com:7052, InternalEndpoint: , PKI-ID: 82f87b1ae00364c30ce6293dd804af5f81462b137b8e4d151580b9fcafa9b4c9, Metadata: satisfies principal principal:"\n\013Org2MSP\020\003" 2020-10-20 20:23:54.218 UTC [discovery.endorsement] func1 -> DEBU d99 Endpoint: peer0.org2.com:7052, InternalEndpoint: , PKI-ID: 82f87b1ae00364c30ce6293dd804af5f81462b137b8e4d151580b9fcafa9b4c9, Metadata: doesn't satisfy principal principal:"\n\007Org2MSP\020\003" : the identity is a member of a different MSP (expected Org1MSP, got Org2MSP) 2020-10-20 20:23:54.218 UTC [discovery] chaincodeQuery -> ERRO d9a Failed constructing descriptor for chaincode chaincodes: ,: no peer combination can satisfy the endorsement policy ``` **Configtx:** ``` mychannel: Consortium: MyConsortium <<: *ChannelDefaults Application: <<: *ApplicationDefaults Organizations: - *Org1 - *Org2 Capabilities: <<: *ApplicationCapabilities ``` Overall if I am doing the same transaction from org1 Peer I am getting similar error at the peer both are failing. If I remove an organization from the consortium it is working from that org but not when both are there Any idea how to resolve this??

Paradox-AT (Tue, 20 Oct 2020 21:04:22 GMT):
@ckong

bestbeforetoday (Wed, 21 Oct 2020 09:40:00 GMT):
This sounds like the issue reported in FABN-1607: https://jira.hyperledger.org/browse/FABN-1607

bestbeforetoday (Wed, 21 Oct 2020 09:40:23 GMT):
So this should have been fixed in v2.2.1

bestbeforetoday (Wed, 21 Oct 2020 09:42:14 GMT):
Is the event listener actually failing to receive blocks or is the problem just that an error log is being produced?

ckong (Wed, 21 Oct 2020 09:53:24 GMT):
This I'm not too sure, where should I be looking at to ascertain this?

bestbeforetoday (Wed, 21 Oct 2020 10:45:43 GMT):
I guess if transactions are still being submitted and so blocks are being committed, is your block listener receiving any events? But be sure you are using at least v2.2.1 of the SDK too

Paradox-AT (Thu, 22 Oct 2020 10:59:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=jG7JePjcMYC3x7ecA) @bestbeforetoday do you have any idea about this??

bestbeforetoday (Thu, 22 Oct 2020 13:32:03 GMT):
I think I would be checking the endorsement policy to see if there is a potential issue with the requirements vs. your network configuration. Also try running a peer query with the discovery CLI to see what that tells you

said_shah (Fri, 23 Oct 2020 15:28:32 GMT):
Has joined the channel.

said_shah (Fri, 23 Oct 2020 15:28:33 GMT):
I am having trouble accessing my chaincode from a sdk, I can invoke the chaincode and make transactions from the terminal without any issues but I'm getting this error when I do it through a file

said_shah (Fri, 23 Oct 2020 15:29:06 GMT):

Clipboard - October 23, 2020 11:29 AM

said_shah (Fri, 23 Oct 2020 15:29:33 GMT):

Clipboard - October 23, 2020 11:29 AM

said_shah (Fri, 23 Oct 2020 15:30:14 GMT):
can anyone give me some guidance as to what might be going on? I'm using minifab, VMWare, Ubuntu 20.04

Paradox-AT (Sun, 25 Oct 2020 21:43:43 GMT):
The issue was with the anchor peers

BrettLogan (Mon, 26 Oct 2020 02:00:27 GMT):
Are you running the application inside of docker. You endpoints are docker endpoints and thus aren't available from your local machine

smeyerzu (Wed, 28 Oct 2020 13:16:19 GMT):
Has joined the channel.

julian (Fri, 30 Oct 2020 12:07:56 GMT):
Hello. We are using the test-network from fabric samples 2.2.0, and have a node client that is accessing fabric. The node client uses the connection profiles created via the test-network creation scripts. We have moved the node client into a container, we have updated the connection profile to no longer use localhost to access a peer, but on querying the fabric we find localhost is referenced within the GRPCS urls. Where is it obtaining these urls?

julian (Fri, 30 Oct 2020 12:08:07 GMT):

Screenshot 2020-10-30 at 12.06.34.png

julian (Fri, 30 Oct 2020 12:37:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GxAWKbTk9mWFN8zzS) await gateway.connect(ccp, { wallet, identity: userId, discovery: { enabled: true, asLocalhost: false, }, });

julian (Fri, 30 Oct 2020 12:37:51 GMT):
I had to update asLocalhost to false [ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=GxAWKbTk9mWFN8zzS) await gateway.connect(ccp, { wallet, identity: userId, discovery: { enabled: true, asLocalhost: false, }, });

poojaKamat (Fri, 30 Oct 2020 15:00:13 GMT):
Hello, I have tried using HSM based wallet with fabric v1.4, on similar line want to try out the usage for v2.2, for v1.4 had referred to test cases from https://github.com/hyperledger/fabric-sdk-node/blob/613b6d250f39f198bce2a11f744d0ff30bd17894/test/integration/network-e2e/invoke-hsm.js , cant find similar test case for v2.2

poojaKamat (Fri, 30 Oct 2020 15:00:13 GMT):
Hello, I have tried using HSM based wallet with fabric v1.4, on similar lines want to try out the usage for v2.2, for v1.4 had referred to test cases from https://github.com/hyperledger/fabric-sdk-node/blob/613b6d250f39f198bce2a11f744d0ff30bd17894/test/integration/network-e2e/invoke-hsm.js , cant find similar test case for v2.2

bestbeforetoday (Fri, 30 Oct 2020 18:02:54 GMT):
The *Using a Hardware Security Module* section on this doc page might help: https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-wallet.html

bestbeforetoday (Fri, 30 Oct 2020 18:08:06 GMT):
There is some internal test code that creates an HSM identity and adds it to a wallet here: https://github.com/hyperledger/fabric-sdk-node/blob/173a6f026b72e735eacc302fc37f99d07dac0cf1/test/ts-scenario/steps/lib/gateway.ts#L261

bestbeforetoday (Fri, 30 Oct 2020 18:08:29 GMT):
I'm not sure that set up code is really an example of best-practice

poojaKamat (Mon, 02 Nov 2020 09:07:23 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/release-2.2/test/integration/network-e2e/e2e-hsm.js

poojaKamat (Mon, 02 Nov 2020 09:07:36 GMT):
In this the invoke-hsm file is missing ?

danchi (Mon, 02 Nov 2020 11:52:28 GMT):
Has joined the channel.

danchi (Mon, 02 Nov 2020 11:52:29 GMT):
Hi, I need some help to understand how to implement REST API for fabric. I see there is documentation for old versions but for latest one there is no any documentation.

Benjamin (Tue, 03 Nov 2020 14:18:22 GMT):
Has joined the channel.

bestbeforetoday (Tue, 03 Nov 2020 14:20:26 GMT):
Fabric provides a gRPC / protobuf API, not a REST API. The SDKs provide a layer of abstraction around that gRPC API and the mechanics of using it for client applications. I'm not sure I understand exactly what you are asking

bestbeforetoday (Tue, 03 Nov 2020 14:24:42 GMT):
The old (v1.4) HSM integration test that was in the `test/integration/network-e2e` directory is not used in v2.2. The scenario test I linked above replaces it, and that code is driven by this scenario: https://github.com/hyperledger/fabric-sdk-node/blob/c8bb029b91daa030727a85144a129e70017659c8/test/ts-scenario/features/hsm-gateway.feature

adgupta011 (Tue, 03 Nov 2020 21:30:50 GMT):
Hi Team. We are using Openssl to generate root ca & intermediate ca. Chaincode invoke & query is working fine on this network from cli. But when we are trying to connect the client to this network we are getting below error for get query call - _error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0.org1.example.com, url:grpcs://peer0.org1.example.com:7051, connected:false, connectAttempted:true. Is it related to certificate host name?

adgupta011 (Tue, 03 Nov 2020 21:30:50 GMT):
Hi Team. We are using Openssl to generate root ca & intermediate ca. Chaincode invoke & query is working fine on this network from cli. But when we are trying to connect the client to this network we are getting below error for get query call - _error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0.org1.example.com, url:grpcs://peer0.org1.example.com:7051, connected:false, connectAttempted:true. Is it related to certificate host name? There is no error in peer & ca log.

bestbeforetoday (Wed, 04 Nov 2020 09:51:38 GMT):
Can your client actually see the peer on the address `peer0.org1.example.com`? Unless your client is running in a Docker network where that is a valid DNS name within the Docker network, I'm guessing not since `example.org` is a non-resolvable domain. If your nodes are running in Docker containers and your client is running on your local machine, you need to make sure your client is connecting to ports on localhost, which are then mapped (by Docker) to the correct Docker containers

bestbeforetoday (Wed, 04 Nov 2020 09:52:31 GMT):
There are two ways the client gets node endpoint URLs: 1. From the connection profile 2. From service discovery

bestbeforetoday (Wed, 04 Nov 2020 09:55:34 GMT):
If you need your node addresses to resolve to localhost, you can do this in two ways: 1. Add all the DNS names of nodes to your local `hosts` file, mapped to the localhost address 2. Change entries in the connection profile to be `localhost` URLs _and_ set `discovery.asLocalhost: true` in your Gateway connection options: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.GatewayOptions.html https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.DiscoveryOptions.html

adgupta011 (Wed, 04 Nov 2020 10:21:45 GMT):
Thanks for your Reply. Actually I am executing my client also from the Docker container and both of them are in same network. Everything is working fine with same connection configuration when I am not using Openssl root ca.

bestbeforetoday (Wed, 04 Nov 2020 11:10:49 GMT):
Without more details on why the connect failed, it's difficult to suggest a solution

adgupta011 (Wed, 04 Nov 2020 14:53:51 GMT):
Thanks for your prompt reply. I somehow managed to solve the issue by giving both root & intermediate certificates In connection.yaml's tlsCACerts. With only root certificate peer was not able to connect.

dengjiali (Wed, 04 Nov 2020 16:28:53 GMT):
Has joined the channel.

poojaKamat (Thu, 05 Nov 2020 04:49:47 GMT):
could successfully register and enroll identities, but while creating channel between orgs, getting 'KeyMaterial not found in SigningIdentityInfo'

poojaKamat (Thu, 05 Nov 2020 04:50:40 GMT):
Any help around this? seems like the private key is not being fetched from HSM

poojaKamat (Thu, 05 Nov 2020 07:31:44 GMT):
org1 peer is storing identities in HSM, and org2 stores the identities in filesystem, should there be an issue in such scenario when a channel is created between these orgs?

bestbeforetoday (Thu, 05 Nov 2020 09:17:30 GMT):
Glad you got it sorted, and thank you for posting the solution :thumbsup:

danchi (Thu, 05 Nov 2020 09:40:12 GMT):
Thanks for the replay. What I need is next. From external application to use API in order to make CRUD for my SmartContracts. Is it more clear now ?

poojaKamat (Fri, 06 Nov 2020 12:52:47 GMT):
tried above, could successfully register and enroll user, facing issue while connecting to gateway, getting "Error: _pkcs11SkiToHandle[527]: no key with SKI"

poojaKamat (Fri, 06 Nov 2020 12:52:58 GMT):
any help around this?

knagware9 (Sat, 07 Nov 2020 10:12:37 GMT):
@danchi yes you correct there is no such ready sample like balance-transfer but you could any sample ,fabler, commercial paper to create rest server

chbtt (Sun, 08 Nov 2020 13:08:17 GMT):
Has joined the channel.

chbtt (Sun, 08 Nov 2020 13:47:09 GMT):
Hey guys, somehow whatever we pass to the Node SDK in "setTransient()" does not translate to the Node Chaincode in "getTransient()", it always returns an empty object. Both use Node v12.19.0 (with npm 6.14.8). We submit the transaction as follows: ` const transientMap = { 'data1': Buffer.from(data1), 'data2': Buffer.from(data2), 'data3': Buffer.from(data3) }; const response = await chaincode.createTransaction('someFunction').setTransient(transientMap).submit('param1', 'param2'); ` If we then print `const transientMap = stub.getTransient();` on the Node Chaincode it will give an empty object. I'd appreciate any pointers towards a solution for this problem.

chbtt (Sun, 08 Nov 2020 13:47:09 GMT):
Hey guys, somehow whatever we pass to the Node SDK in "setTransient()" does not translate to the Node Chaincode in "getTransient()", it always returns an empty object. Both use Node v12.19.0 (with npm 6.14.8). We submit the transaction as follows: ``` const transientMap = { 'data1': Buffer.from(data1), 'data2': Buffer.from(data2), 'data3': Buffer.from(data3) }; const response = await chaincode.createTransaction('someFunction').setTransient(transientMap).submit('param1', 'param2'); ``` If we then print `const transientMap = stub.getTransient();` on the Node Chaincode it will give an empty object. I'd appreciate any pointers towards a solution for this problem.

chbtt (Sun, 08 Nov 2020 13:47:09 GMT):
Hey guys, somehow whatever we pass to the Node SDK in "setTransient()" does not translate to the Node Chaincode in "getTransient()", it always returns an empty object. Both use Node v12.19.0 (with npm 6.14.8). We submit the transaction as follows: ```javascript const transientMap = { 'data1': Buffer.from(data1), 'data2': Buffer.from(data2), 'data3': Buffer.from(data3) }; const response = await chaincode.createTransaction('someFunction').setTransient(transientMap).submit('param1', 'param2'); ``` If we then print `const transientMap = stub.getTransient();` on the Node Chaincode it will give an empty object. I'd appreciate any pointers towards a solution for this problem.

chbtt (Sun, 08 Nov 2020 13:47:09 GMT):
Hey guys, somehow whatever we pass to the Node SDK in "setTransient()" does not translate to the Node Chaincode in "getTransient()", it always returns an empty object. Both use Node v12.19.0 (with npm 6.14.8). We submit the transaction as follows: ```javascript const transientMap = { 'data1': Buffer.from(data1), 'data2': Buffer.from(data2), 'data3': Buffer.from(data3) }; const response = await chaincode.createTransaction('someFunction').setTransient(transientMap).submit('param1', 'param2'); ``` If we then print `const transientMap = stub.getTransient();` on the Node Chaincode it will give an empty object. I'd appreciate any pointers towards a solution for this problem. If you need further information, drop a comment and I'll do my best to provide it.

chbtt (Sun, 08 Nov 2020 13:47:09 GMT):
Hey guys, somehow whatever we pass to the Node SDK in "setTransient()" does not translate to the Node Chaincode in "getTransient()", it always returns an empty object. Both use Node v12.19.0 (with npm 6.14.8). We submit the transaction as follows: ```javascript const transientMap = { 'data1': Buffer.from(data1), 'data2': Buffer.from(data2), 'data3': Buffer.from(data3) }; const response = await chaincode.createTransaction('someFunction').setTransient(transientMap).submit('param1', 'param2'); ``` If we then print `const transientMap = stub.getTransient();` on the Node Chaincode, it will give an empty object. However, looking at the way you generate the object returned by `getTransient()` ( https://github.com/hyperledger/fabric-chaincode-node/blob/release-2.2/libraries/fabric-shim/lib/stub.js#L205 ), we tried `new Map(Object.entries(transientMap))` on our `transientMap` and kinda hoped it would exhibit the same behavior in returning an empty object. Strangely, it correctly generated a Map with all ":" entries as expected. I'd appreciate any pointers towards a solution for this problem. If you need further information, drop a comment and I'll do my best to provide it.

chbtt (Sun, 08 Nov 2020 13:47:09 GMT):
Hey guys, somehow whatever we pass to the Node SDK in "setTransient()" does not translate to the Node Chaincode in "getTransient()", it always returns an empty object. Both use Node v12.19.0 (with npm 6.14.8). Our Node client is on fabric-network v2.2.3. The Chaincode uses fabric-shim v2.2.0. We submit the transaction as follows: ```javascript const transientMap = { 'data1': Buffer.from(data1), 'data2': Buffer.from(data2), 'data3': Buffer.from(data3) }; const response = await chaincode.createTransaction('someFunction').setTransient(transientMap).submit('param1', 'param2'); ``` If we then print `const transientMap = stub.getTransient();` on the Node Chaincode, it will give an empty object. However, looking at the way you generate the object returned by `getTransient()` ( https://github.com/hyperledger/fabric-chaincode-node/blob/release-2.2/libraries/fabric-shim/lib/stub.js#L205 ), we tried `new Map(Object.entries(transientMap))` on our `transientMap` and kinda hoped it would exhibit the same behavior in returning an empty object. Strangely, it correctly generated a Map with all ":" entries as expected. I'd appreciate any pointers towards a solution for this problem. If you need further information, drop a comment and I'll do my best to provide it.

chbtt (Sun, 08 Nov 2020 13:47:09 GMT):
Hey guys, somehow whatever we pass to the Node SDK in "setTransient()" does not translate to the Node Chaincode in "getTransient()", it always returns an empty object. Both use Node v12.19.0 (with npm 6.14.8). Our Node client is on fabric-network v2.2.3. The Chaincode uses fabric-shim v2.2.0. We submit the transaction as follows: ```javascript const transientMap = { 'data1': Buffer.from(data1), 'data2': Buffer.from(data2), 'data3': Buffer.from(data3) }; const response = await chaincode.createTransaction('someFunction').setTransient(transientMap).submit('param1', 'param2'); ``` If we then print `const transientMap = stub.getTransient();` on the Node Chaincode, it will give an empty object. However, looking at the way you generate the object returned by `getTransient()` ( https://github.com/hyperledger/fabric-chaincode-node/blob/release-2.2/libraries/fabric-shim/lib/stub.js#L205 ), we tried `new Map(Object.entries(transientMap))` on our `transientMap` and kinda hoped it would exhibit the same behavior in returning an empty object. Strangely, it correctly generated a Map with all ":" entries. I'd appreciate any pointers towards a solution for this problem. If you need further information, drop a comment and I'll do my best to provide it.

poojaKamat (Mon, 09 Nov 2020 07:26:35 GMT):
Hi Team, I have been trying to use vendor HSM to store identities, could successfully store identities for Fabric CA, peer and orderer, could successfully store client identities as well, but when gateway.connect takes place, it is not able to retrieve private key for the client identity(app-user), it throws error "No key with SKI". Any additional step required at this stage ?

ckong (Mon, 09 Nov 2020 09:41:23 GMT):
`const listener = await network.addBlockListener(...)` After this I would like to display a message to show whether the listener has been successfully created. How should I go about doing this?

ps.agboola.ayodeji (Mon, 09 Nov 2020 12:04:45 GMT):
Has joined the channel.

nkl199 (Mon, 09 Nov 2020 14:46:14 GMT):
did you add the explicit HSM options to the gateway prior to the connect?

poojaKamat (Mon, 09 Nov 2020 15:22:35 GMT):
created client with hsm options, now can connect to gateway, but there's an issue, if we register an app-user for a session, and later attempt to use the same app-user, gateway fails to fetch its identity from HSM and throws "No key with SKI"

poojaKamat (Mon, 09 Nov 2020 15:22:35 GMT):
created client with hsm options, now can connect to gateway, but there's an issue, if we register an app-user for a session, and later attempt to use the same app-user, gateway fails to fetch its identity from HSM for the next session and throws "No key with SKI"

poojaKamat (Mon, 09 Nov 2020 15:30:25 GMT):
const hsmCAClient = new FabricCAClient(ca_url, tlsOptions, caName, hsmProvider.getCryptoSuite());

poojaKamat (Mon, 09 Nov 2020 15:30:47 GMT):
used this to create client, and then using this client registered and enrolled user

poojaKamat (Mon, 09 Nov 2020 15:32:08 GMT):
Now can successfully register/enroll user, connect to gateway, but next time if I try to use the same user which was already created, its thows "No key with SKI"

poojaKamat (Mon, 09 Nov 2020 15:32:49 GMT):
So every time we have to register/enroll new user with CA

nkl199 (Mon, 09 Nov 2020 15:45:02 GMT):
what version SDK are you using?

poojaKamat (Tue, 10 Nov 2020 03:54:26 GMT):
2.2

nkl199 (Tue, 10 Nov 2020 08:58:38 GMT):
``` const listener = await network.addBlockListener(...); console.log('created'); ``` ?

ckong (Tue, 10 Nov 2020 09:28:28 GMT):
Sorry, what I meant is if there's code that I want to execute upon successful creation of `listener` (e.g console output) then how should I do it?

nkl199 (Tue, 10 Nov 2020 10:57:18 GMT):
It is my understanding that the addBlockListener method will throw if there are any errors, so once "awaited" you have a successfully created listener

Amjadnz (Tue, 10 Nov 2020 14:46:28 GMT):
Upgrading my chaincode using node-sdk. getting this error once I invoke the upgrade: ```2020-11-10 14:41:39.321 UTC [core.comm] ServerHandshake -> ERRO 15a7 TLS handshake failed with error tls: client didn't provide a certificate server=ChaincodeServer remoteaddress=172.20.0.28:47086 2020-11-10 14:41:39.322 UTC [peer.chaincode.dev-peer0.dfm.local.ubn.ae-agmaccounttransactions-v5] func2 -> INFO 15a8 2020-11-10 14:41:39.321 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: remote error: tls: bad certificate```

Amjadnz (Tue, 10 Nov 2020 14:46:28 GMT):
Upgrading my chaincode using node-sdk. getting this error once I invoke the upgrade: ```2020-11-10 14:41:39.321 UTC [core.comm] ServerHandshake -> ERRO 15a7 TLS handshake failed with error tls: client didn't provide a certificate server=ChaincodeServer remoteaddress=172.20.0.28:47086 2020-11-10 14:41:39.322 UTC [peer.chaincode.dev-peer0.xxx.local.xxx.ae-agmaccounttransactions-v5] func2 -> INFO 15a8 2020-11-10 14:41:39.321 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: remote error: tls: bad certificate```

Amjadnz (Tue, 10 Nov 2020 14:48:31 GMT):
my CONTAINER export list: ```declare -x CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS="couchdb_xxx01:5984" declare -x CORE_LEDGER_STATE_STATEDATABASE="CouchDB" declare -x CORE_LOGGING_PEER="debug" declare -x CORE_PEER_ADDRESS="peer0.xxx.local.ubn.xx:7051" declare -x CORE_PEER_ID="peer0.xxx.local.ubn.xx" declare -x CORE_PEER_LOCALMSPID="DfmMSP" declare -x CORE_PEER_MSPCONFIGPATH="/etc/hyperledger/fabric/msp" declare -x CORE_PEER_TLS_CERT_FILE="/etc/hyperledger/fabric/msp/signcerts/peer0.xxx.local.ubn.xx-cert.pem" declare -x CORE_PEER_TLS_CLIENTAUTHREQUIRED="false" declare -x CORE_PEER_TLS_ENABLED="true" declare -x CORE_PEER_TLS_KEY_FILE="/etc/hyperledger/fabric/msp/keystore/9fc50c7d9031b7e4a6432609c1ec424cd71010664e1b74442ef31c05dbd5f041_sk" declare -x CORE_PEER_TLS_ROOTCERT_FILE="/etc/hyperledger/fabric/msp/cacerts/ca.xxx.local.ubn.xx-cert.pem" declare -x CORE_VM_DOCKER_ATTACHSTDOUT="true" declare -x CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE="fixtures_default" declare -x CORE_VM_ENDPOINT="unix:///host/var/run/docker.sock" declare -x FABRIC_CFG_PATH="/etc/hyperledger/fabric" declare -x HOME="/root"```

Amjadnz (Tue, 10 Nov 2020 14:48:31 GMT):
my CONTAINER export list: ```declare -x CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS="couchdb_xxx01:5984" declare -x CORE_LEDGER_STATE_STATEDATABASE="CouchDB" declare -x CORE_LOGGING_PEER="debug" declare -x CORE_PEER_ADDRESS="peer0.xxx.local.ubn.xx:7051" declare -x CORE_PEER_ID="peer0.xxx.local.ubn.xx" declare -x CORE_PEER_LOCALMSPID="DxxMSP" declare -x CORE_PEER_MSPCONFIGPATH="/etc/hyperledger/fabric/msp" declare -x CORE_PEER_TLS_CERT_FILE="/etc/hyperledger/fabric/msp/signcerts/peer0.xxx.local.ubn.xx-cert.pem" declare -x CORE_PEER_TLS_CLIENTAUTHREQUIRED="false" declare -x CORE_PEER_TLS_ENABLED="true" declare -x CORE_PEER_TLS_KEY_FILE="/etc/hyperledger/fabric/msp/keystore/9fc50c7d9031b7e4a6432609c1ec424cd71010664e1b74442ef31c05dbd5f041_sk" declare -x CORE_PEER_TLS_ROOTCERT_FILE="/etc/hyperledger/fabric/msp/cacerts/ca.xxx.local.ubn.xx-cert.pem" declare -x CORE_VM_DOCKER_ATTACHSTDOUT="true" declare -x CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE="fixtures_default" declare -x CORE_VM_ENDPOINT="unix:///host/var/run/docker.sock" declare -x FABRIC_CFG_PATH="/etc/hyperledger/fabric" declare -x HOME="/root"```

Amjadnz (Tue, 10 Nov 2020 14:49:46 GMT):
as see above my `CORE_PEER_TLS_CLIENTAUTHREQUIRED` is switched off so technically it should not request for any certificate while instantiating the chainccode (creating a container).

Amjadnz (Tue, 10 Nov 2020 14:51:38 GMT):
can anyone check this?

Sahar (Tue, 10 Nov 2020 20:16:48 GMT):
Hi everyone, I deployed a fabric network 2.0.0, i want to update my chaincode endorsement policy using the node SDK. According to the docs: "Chaincode-level endorsement policies are agreed to by channel members when they approve a chaincode definition for their organization" , so you can either do it with CLI using : --signature-policy or using the sdk. - So updating chaincode endorsement policy is linked to chaincode lifecycle (the approve step) right? - I was looking into nodeSDK , but i didn't find how to update the chaincode endorsement policy, Could anyone plz tell me what did i miss, thank you !

bestbeforetoday (Wed, 11 Nov 2020 15:29:01 GMT):
There isn't currently an API in the v2 Node SDK to support the v2 chaincode lifecycle. You might be able to use the SDK to invoke the appropriate functions on the system `_lifecycle` chaincode. Or there is a third-party library built on the SDK that provides some lifecycle support: https://github.com/davidkhala/fabric-common/tree/master/nodejs/admin

Sahar (Wed, 11 Nov 2020 15:37:12 GMT):
@bestbeforetoday thank you so much for your reply! If i may ask , what do you mean by "You might be able to use the SDK to invoke the appropriate functions on the system _lifecycle chaincode" ? could you give an example ? thank you !

bestbeforetoday (Wed, 11 Nov 2020 15:54:12 GMT):
There is a system chaincode available on all peers (with the Fabric V2 lifecycle features enabled) named `_lifecycle`. The `peer chaincode lifecycle` CLI invokes transaction functions in the `_lifecycle` chaincode to drive application deployment. You can invoke these transactions function like any other using the SDK, but you may need to do some un/marshalling of protobuf transaction function arguments and responses

bestbeforetoday (Wed, 11 Nov 2020 15:55:03 GMT):
There isn't much in the way of documentation for these system chaincode transaction functions, but the `_lifecycle` system chaincode is implemented here: https://github.com/hyperledger/fabric/blob/4f1e0931eb233b82c0a53658bbba8a9debf61d2b/core/chaincode/lifecycle/scc.go#L177

bestbeforetoday (Wed, 11 Nov 2020 16:00:22 GMT):
Invocation of the `ApproveChaincodeDefinitionForMyOrg` transaction function is handled here: https://github.com/hyperledger/fabric/blob/4f1e0931eb233b82c0a53658bbba8a9debf61d2b/core/chaincode/lifecycle/scc.go#L363 and here: https://github.com/hyperledger/fabric/blob/4f1e0931eb233b82c0a53658bbba8a9debf61d2b/core/chaincode/lifecycle/lifecycle.go#L415

bestbeforetoday (Wed, 11 Nov 2020 16:01:42 GMT):
Or you could look at the Node admin package I linked above to see how that does invocation: https://github.com/davidkhala/fabric-common/blob/ce9841d66f51049324d9f8a6a20e5d76b6826957/nodejs/admin/lifecycleProposal.js#L168

Sahar (Wed, 11 Nov 2020 16:14:54 GMT):
Thank you so much @bestbeforetoday for all those clarifications and the links !

SasinduFdo (Mon, 16 Nov 2020 15:19:00 GMT):
can i register new users into the system through the rest api(Remotely enroll new identities) if i use the ibm vc extension to create the network ?

usamaarshad (Tue, 17 Nov 2020 11:23:30 GMT):
Has joined the channel.

usamaarshad (Tue, 17 Nov 2020 11:23:31 GMT):
Hello everyone. I was reading hyperledger docs and in policies topic it says transaction endorsement is possible through different roles. like AND(ORG1.client,ORG2.client) is a valid policy. my question is how can SDK can sign transaction for two client roles of different orgs (assuming i have key of ORG1.client and Org2.client). Any martial will be helpful. Thank you guys in advance.

usamaarshad (Tue, 17 Nov 2020 11:23:31 GMT):
Hello everyone. I was reading hyperledger docs and in policies topic it says transaction endorsement is possible through different roles. like AND(ORG1.client,ORG2.client) is a valid policy. my question is how SDK can sign transaction for two client roles of different orgs (assuming i have key of ORG1.client and Org2.client). Any martial will be helpful. Thank you guys in advance.

usamaarshad (Tue, 17 Nov 2020 11:23:31 GMT):
Hello everyone. I was reading hyperledger docs and in policies topic it says transaction endorsement is possible through different roles. like AND(ORG1.client,ORG2.client) is a valid policy. my question is how SDK can sign transaction for two client roles of different orgs (assuming i have key of ORG1.client and Org2.client). Any martial will be helpful. Thank you in advance guys.

Jakeeyturner (Tue, 17 Nov 2020 15:11:20 GMT):
Hello! If I'm understanding your question correctly, then I think you'll want to take a look at https://hyperledger-fabric.readthedocs.io/en/release-2.2/txflow.html The SDK sends off the endorsement proposals to the peers, they verify it (or don't), then send the signed proposals back to the client application, where the SDK inspects them and checks if the endorsement policy has been met before doing anything else.

Jakeeyturner (Tue, 17 Nov 2020 15:12:23 GMT):
Using the IBM Blockchain Platform VS Code extension you can register/enroll new identities for local environments.

cynicalsnail (Wed, 18 Nov 2020 07:02:39 GMT):
Has joined the channel.

danchi (Thu, 19 Nov 2020 08:42:56 GMT):
Hello! I had create some node server based on this example: https://medium.com/@kctheservant/rework-an-implementation-of-api-server-for-hyperledger-fabric-network-fabric-v2-2-a747884ce3dc and when I want to call API, I'm getting next errors: 2020-11-16T07:43:34.166Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0.org1.example.com, url:grpcs://127.0.0.1:7051, connected:false, connectAttempted:true `2020-11-16T07:43:34.167Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.org1.example.com url:grpcs://127.0.0.1:7051 timeout:3000 2020-11-16T07:43:34.168Z - error: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0.org1.example.com due to Error: Failed to connect before the deadline on Endorser- name: peer0.org1.example.com, url:grpcs://127.0.0.1:7051, connected:false, connectAttempted:true 2020-11-16T07:43:37.172Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Discoverer- name: peer0.org1.example.com, url:grpcs://127.0.0.1:7051, connected:false, connectAttempted:true 2020-11-16T07:43:37.172Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.org1.example.com url:grpcs://127.0.0.1:7051 timeout:3000` Can anyone help me to understand what I did wrong and if I'm going on right direction ?

Jakeeyturner (Thu, 19 Nov 2020 09:13:54 GMT):
Seems like it can't connect to the peer - worth checking your network is definitely stood up and your peer is callable/connectable

usamaarshad (Thu, 19 Nov 2020 13:31:47 GMT):
hy @Jakeeyturner . By your Answer which implies that in hyperledger you can't endorse transaction from client?

usamaarshad (Thu, 19 Nov 2020 13:32:34 GMT):
which is totally contradiction what docs says "transaction can be endorse by different roles"

usamaarshad (Thu, 19 Nov 2020 13:34:07 GMT):
Hyperledger provided offline signing for these purpose. I just wanna know how I can sign transaction offline using two clients.

Jakeeyturner (Thu, 19 Nov 2020 13:37:56 GMT):
Ah sorry, I misunderstood you. There are docs on offline signing here - https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-sign-transaction-offline.html

danchi (Fri, 20 Nov 2020 07:36:47 GMT):
Hi, when I call application which is working with smart contracts, they are updated. But when I run api server and want to call api's I'm getting this messages...

Jakeeyturner (Fri, 20 Nov 2020 09:11:52 GMT):
You have an application which works, but another application/API server which doesn't?

danchi (Fri, 20 Nov 2020 10:52:24 GMT):
Yes, I have smart contracts written in javascript. Than I had wrote application also in javascript which is communicating with smartcontracts and generating wallets for credentials. Than I'm trying to implement api server. Application and smart contracts are created based on assets example: https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-basic from that part everything is working only problems with APIs

Jakeeyturner (Fri, 20 Nov 2020 11:06:09 GMT):
If your application works, then your code must be wrong in your api server

Jakeeyturner (Fri, 20 Nov 2020 11:06:23 GMT):
or you're not using the correct connection profile or something

SasinduFdo (Fri, 20 Nov 2020 11:45:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=hA46Jsqx9PdyHwbzE) Thank you, But can i register/enroll them through the client application and not from the extension.?

Jakeeyturner (Fri, 20 Nov 2020 11:47:08 GMT):
ah right, yeah you can perform these actions using the SDK

Jakeeyturner (Fri, 20 Nov 2020 11:47:09 GMT):
https://hyperledger.github.io/fabric-sdk-node/release-1.4/FabricCAServices.html

Jakeeyturner (Fri, 20 Nov 2020 11:47:58 GMT):
there are `enroll` and `register` functions you can call

SasinduFdo (Fri, 20 Nov 2020 11:48:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=goXX9rSg3MZikYLJn) okay, thanks a lot mate.

Jakeeyturner (Fri, 20 Nov 2020 11:53:01 GMT):
(there are examples here as well, forgot to mention! https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-basic/application-javascript)

Jakeeyturner (Fri, 20 Nov 2020 11:53:36 GMT):
just make sure you're using the right version / on the correct branch for whatever version of the dependencies you need

garyclark (Mon, 23 Nov 2020 19:57:16 GMT):
Is there a heartbeat API that I can used in the node.js chaincode to know whether the peer is still alive or is this something I have to implement in the chaincode?

garyclark (Mon, 23 Nov 2020 19:58:22 GMT):
I want to make sure that the peer is still running prior to invoke an action on it.

githubckgoh1439 (Tue, 24 Nov 2020 06:23:07 GMT):
Has joined the channel.

ArdianAbazi (Sat, 28 Nov 2020 09:35:07 GMT):
I don't know whether there is such a method, but I've solved this using a health method in the chaincode itself. The health method return 'ok', if it doesn't work it won't return anything obviously. Not the most elegant solution, but it works.

bestbeforetoday (Tue, 01 Dec 2020 09:32:32 GMT):
There is a health check service that can be enabled on peers: https://hyperledger-fabric.readthedocs.io/en/release-2.2/operations_service.html

mcoblenz (Tue, 01 Dec 2020 14:19:14 GMT):
Has joined the channel.

mcoblenz (Tue, 01 Dec 2020 14:20:31 GMT):
Are array properties supported in TypeScript contracts? I'm getting the following error trying to instantiate my contract: `can't resolve reference Array from id Part#', missingRef: 'Array', missingSchema: 'Array'`

mcoblenz (Tue, 01 Dec 2020 14:22:06 GMT):
May be related to this: https://jira.hyperledger.org/browse/FABCN-183

mcoblenz (Tue, 01 Dec 2020 14:22:38 GMT):
but I'm not sure how to use the fix proposed there, since my array only contains strings.

usamaarshad (Wed, 02 Dec 2020 08:45:59 GMT):
@Jakeeyturner yes there is. But it supports sign from one role only. My question was about multi offline signing of a transaction. what will be process of it?

usamaarshad (Wed, 02 Dec 2020 08:48:56 GMT):
in short, how can i merge two off line signs for one proposal.

usamaarshad (Wed, 02 Dec 2020 08:48:56 GMT):
in short, how can i merge two offline signs for one proposal.

usamaarshad (Wed, 02 Dec 2020 08:48:56 GMT):
in short, how can i sign transaction from multiple people and merge them?

usamaarshad (Wed, 02 Dec 2020 08:48:56 GMT):
in short, how can i sign transaction offline from multiple people and merge them?

nekia (Thu, 03 Dec 2020 03:25:23 GMT):
https://jira.hyperledger.org/browse/FABN-1663

nekia (Thu, 03 Dec 2020 03:28:45 GMT):
In this JIRA, SDK needs to cover `cscc`, `lscc`, `qscc` and `_lifecycle` as system chaincode. The last one hasn't been granted yet in this fix. @bestbeforetoday @bretharrison

nekia (Thu, 03 Dec 2020 03:28:45 GMT):
In this JIRA, SDK needs to consider `cscc`, `lscc`, `qscc` and `_lifecycle` as system chaincode. The last one hasn't been granted yet in this fix. @bestbeforetoday @bretharrison

nekia (Thu, 03 Dec 2020 03:28:45 GMT):
In this JIRA, SDK needs to consider `cscc`, `lscc`, `qscc` and `_lifecycle` as system chaincode. The last one hasn't been granted yet in [this fix](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=6C4q27B7d6JBgKApJ). @bestbeforetoday @bretharrison

nekia (Thu, 03 Dec 2020 03:28:45 GMT):
In this JIRA, SDK needs to consider `cscc`, `lscc`, `qscc` and `_lifecycle` as system chaincode. The last one hasn't been granted yet in [this fix](https://github.com/hyperledger/fabric-sdk-node/commit/cbb3ba0aa22d61be6ebe9e258a15e13e3b8ef0d4). @bestbeforetoday @bretharrison

nekia (Thu, 03 Dec 2020 03:28:58 GMT):
https://github.com/hyperledger/fabric/blob/master/sampleconfig/core.yaml#L591

nekia (Thu, 03 Dec 2020 03:45:06 GMT):
> It is expected that '_lifecycle' will eventually be the only builtin SCCs.

nekia (Thu, 03 Dec 2020 03:45:10 GMT):
https://github.com/hyperledger/fabric/blob/4afc136de48efd9d4ade415c937a71531484f859/core/scc/scc.go#L33

bestbeforetoday (Thu, 03 Dec 2020 09:11:51 GMT):
@bretharrison made this comment on the PR: > These are legacy system chaincodes, new system chaincodes are being added with endorsement policies, like the new chaincode lifecycle.

bestbeforetoday (Thu, 03 Dec 2020 09:11:51 GMT):
@bretharrison made this comment on the PR: >These are legacy system chaincodes, new system chaincodes are being added with endorsement policies, like the new chaincode lifecycle.

bestbeforetoday (Thu, 03 Dec 2020 09:13:16 GMT):
Do you actually observe an issue invoking the `_lifecycle` chaincode when using service discovery in the client? If so, please reopen the Jira

nekia (Thu, 03 Dec 2020 13:08:06 GMT):
OK Thanks, I understand. I could invoke `_lifecycle` chaincode when I did double check again with the latest snapshot package.

invalido (Fri, 04 Dec 2020 15:13:50 GMT):
Has joined the channel.

invalido (Fri, 04 Dec 2020 15:13:51 GMT):
Hello everyone. I've got a strange phenomenon regarding endorsements within my 3-Org Network. Org1: 3 Peers, Org2: 2 peers, Org3: 1 peer ENDORSEMENT_POLICY is set to OutOf(2, "Org1MSP.peer", "Org2MSP.peer", "Org3MSP.peer"). I added ~20k Assets successfully so far. Now, there is this one huge Asset which takes about 3 minutes to compute and (would) add ~30MB to each couchdb. The used dev-peers both show logs: "Sending COMPLETED message back to peer" Problem is that somehow Endorsement failed. And I cannot tell why. Here are some logs: Rest-Server: ``` 2020-12-03T20:07:08.496Z - warn: [TransactionEventHandler]: _strategyFail: strategy fail for transaction "d9ec32ce31b85073850599bdd06dd2b33a7222b8a1a61a1673aa024898e2ff66": TransactionError: Peer peer0.org1.de:7051 has rejected transaction "d9ec32ce31b85073850599bdd06dd2b33a7222b8a1a61a1673aa024898e2ff66" with code "ENDORSEMENT_POLICY_FAILURE" { TransactionError: Peer peer0.org1.de:7051 has rejected transaction "d9ec32ce31b85073850599bdd06dd2b33a7222b8a1a61a1673aa024898e2ff66" with code "ENDORSEMENT_POLICY_FAILURE" at TransactionEventHandler._onEvent (/var/hyperledger/node_modules/fabric-network/lib/impl/event/transactioneventhandler.js:114:23) at EventRegistration.eventHub.registerTxEvent [as _onEventFn] (/var/hyperledger/node_modules/fabric-network/lib/impl/event/transactioneventhandler.js:88:26) at EventRegistration.onEvent (/var/hyperledger/node_modules/fabric-client/lib/ChannelEventHub.js:1788:9) at Proxy._callTransactionListener (/var/hyperledger/node_modules/fabric-client/lib/ChannelEventHub.js:1480:13) at Proxy._checkTransactionId (/var/hyperledger/node_modules/fabric-client/lib/ChannelEventHub.js:1464:9) at Proxy._processTxEvents (/var/hyperledger/node_modules/fabric-client/lib/ChannelEventHub.js:1443:11) at ClientDuplexStream._stream.on (/var/hyperledger/node_modules/fabric-client/lib/ChannelEventHub.js:521:11) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) transactionId: 'd9ec32ce31b85073850599bdd06dd2b33a7222b8a1a61a1673aa024898e2ff66', transactionCode: 'ENDORSEMENT_POLICY_FAILURE', name: 'TransactionError', responses: [ { version: 1, timestamp: null, response: [Object], payload: , endorsement: [Object], peer: [Object] }, { version: 1, timestamp: null, response: [Object], payload: , endorsement: [Object], peer: [Object] } ] } ``` Peer0-Org1: ``` 2020-12-03 20:07:08.153 UTC [vscc] Validate -> ERRO 154 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode power-chain in tx 9094:0 failed: signature set did not satisfy policy 2020-12-03 20:07:08.153 UTC [committer.txvalidator] validateTx -> ERRO 155 VSCCValidateTx for transaction txId = d9ec32ce31b85073850599bdd06dd2b33a7222b8a1a61a1673aa024898e2ff66 returned error: validation of endorsement policy for chaincode power-chain in tx 9094:0 failed: signature set did not satisfy policy 2020-12-03 20:07:08.154 UTC [committer.txvalidator] Validate -> INFO 156 [power-channel] Validated block [9094] in 493ms 2020-12-03 20:07:08.198 UTC [valimpl] preprocessProtoBlock -> WARN 157 Channel [power-channel]: Block [9094] Transaction index [0] TxId [d9ec32ce31b85073850599bdd06dd2b33a7222b8a1a61a1673aa024898e2ff66] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2020-12-03 20:07:08.465 UTC [kvledger] CommitWithPvtData -> INFO 158 [power-channel] Committed block [9094] with 1 transaction(s) in 270ms (state_validation=3ms block_and_pvtdata_commit=168ms state_commit=85ms) commitHash=[e4ca56dd23686d7d03c4ae12b4a50d752159c88eb50a8edbcc2df1b1143479c2] ``` Do you have an idea what might cause this issue? Btw: Setting ENDORSEMENT POLICY to OR("Org1MSP.peer", "Org2MSP.peer", "Org3MSP.peer") runs smoothly My Gateway config is pretty much default settings: ``` private async connectGateway(client: Client, wallet: Wallet, userDetails: UserDetails): Promise { logger.info('Creating gateway') const gateway = new Gateway() if (DeploymentConfig.modus === 'production') { await gateway.connect(client, { wallet, identity: userDetails.name, discovery: {enabled: true, asLocalhost: false} }) } else { await gateway.connect(client, { wallet, identity: userDetails.name, discovery: {enabled: true, asLocalhost: true} }) } return gateway } ```

invalido (Fri, 04 Dec 2020 15:14:55 GMT):
I've been redirected here from #fabric-questions. Hope somebody can help me out on this issue

HansrajRami (Fri, 04 Dec 2020 21:56:48 GMT):
Has joined the channel.

amalendusuresh (Mon, 07 Dec 2020 04:37:02 GMT):
Has joined the channel.

amalendusuresh (Mon, 07 Dec 2020 04:37:03 GMT):
I am trying to re-enroll a user in fabricSDK and gets an error like this.. "Error: Invalid re-enroll request, \"currentUser\" is not a valid User object, missing \"getIdentity()\" method", Could anyone please help me with this?

amalendusuresh (Mon, 07 Dec 2020 04:44:39 GMT):
I am trying to re-enroll a user in fabricSDK and gets an error like this.. "Error: Invalid re-enroll request, \"currentUser\" is not a valid User object, missing \"getIdentity()\" method", Could anyone please help me with this?

krabradosty (Mon, 07 Dec 2020 10:01:41 GMT):
Hello. The fabric-client package has been removed from node SDK version 2. I'm seeking for high-level administration API like it was in version 1, e.g. "install chaincode on peers", "update channel config". There is no such functionality in "fabric-network" module. Am I supposed to build such requests from scratch using protobuf files and "fabric-common" module?

james-wallis (Mon, 07 Dec 2020 10:44:26 GMT):
Has joined the channel.

bestbeforetoday (Wed, 09 Dec 2020 18:05:11 GMT):
@invalido My guess is that the issue is related to visibility of the private data collection. You may need to either specify the collection as a chaincode interest for the contract, or perhaps be explicit about the endorsing orgs that need to be used for a given transaction

bestbeforetoday (Wed, 09 Dec 2020 18:08:45 GMT):
Building the protobufs is one option, although I suspect most of it can still be driven through _fabric-network_ rather than having to drop down to _fabric-common_. Another is to drive the `peer` CLI commands to do deployment. If you want to use the SDK then this project might make things easier: https://github.com/davidkhala/fabric-common/tree/master/nodejs/admin

randyshu (Thu, 10 Dec 2020 01:53:54 GMT):
hello,everyone, i'm using fabric-contract-api to develop application and recently a strange requirement make me crazy that I should supply a default method of Init,but this usually called with namespace:funcName type,any ideas?

invalido (Thu, 10 Dec 2020 13:24:48 GMT):
@bestbeforetoday the thing is that the endorsement policy worked for the previous ~22.000 transactions. The particular transaction causing this error is unusually large. Contract loads lots of data (timeseries mostly) => Math => Write. Both endorsing peers return ```Sending COMPLETED message back to peer``` but the endorsement failes nevertheless

invalido (Thu, 10 Dec 2020 13:25:56 GMT):
"My guess is that the issue is related to visibility of the private data collection. " How can I adjust the visibility?

subratoroy (Fri, 11 Dec 2020 06:28:19 GMT):
Has joined the channel.

subratoroy (Fri, 11 Dec 2020 06:35:08 GMT):
Hello All, Is there an example available on how to create a query string that can be used in getQueryResult(query) in Node SDK? Requirement would be to find all transactions from the ledger which fit the condition FilterField == "Value1"

subratoroy (Fri, 11 Dec 2020 06:35:08 GMT):
Hello All, Is there an example available on how to create a query string that can be used in getQueryResult(query) in Node SDK? Requirement would be to find all transactions from the ledger which fit the condition FilterField == "Value1" ..... Also on similar lines, is there a query that can be used to return the number of transactions in the ledger?

bestbeforetoday (Fri, 11 Dec 2020 10:11:50 GMT):
https://github.com/hyperledger/fabric-samples/blob/36b5788bad3d43884e557e11f0db4e60660616d2/asset-transfer-ledger-queries/chaincode-javascript/lib/asset_transfer_ledger_chaincode.js#L228

bestbeforetoday (Fri, 11 Dec 2020 10:14:04 GMT):
I think the syntax is specific to the whichever state database is used, which is typically CouchDB: https://docs.couchdb.org/en/latest/api/database/find.html

bestbeforetoday (Fri, 11 Dec 2020 10:20:37 GMT):
I'm not sure I understand. The `init()` function is part of the lower-level _shim_ API and one of the key objectives of the _contract_ API is to remove the need for you to write the boiler-plate code that always appears in the `init()` function. You shouldn't be writing an `init()` function in your contract implementation. See the example here: https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/

bestbeforetoday (Fri, 11 Dec 2020 10:20:37 GMT):
I'm not sure I understand. The `init()` function is part of the lower-level _shim_ API and one of the key objectives of the _contract_ API is to remove the need for you to write the boiler-plate code required by the _shim_ API. You probably shouldn't be writing an `init()` function in your contract implementation. See the example here: https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/

bestbeforetoday (Fri, 11 Dec 2020 10:34:28 GMT):
The recommendation these days for initializing a chaincode is to invoke a regular transaction function after deployment rather than the specify the "special" init function as part of the deployment

punkrokk (Fri, 11 Dec 2020 15:08:55 GMT):
Has joined the channel.

punkrokk (Fri, 11 Dec 2020 15:09:26 GMT):
Hi there, any ideas what would cause this? I'm 99% sure my file is where I say it is: `Cannot start the application. TypeError: Cannot read property 'newFileSystemWallet' of undefined at Object. (/Users/punkrokk/repos//src/blockchainClient.ts:8:24) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/Users/punkrokk/repos/bluecycle/recollection-api/src/controllers/ping.controller.ts:3:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18)`

punkrokk (Fri, 11 Dec 2020 15:09:50 GMT):
I'm using fabric-sdk-node v1.4.15

bestbeforetoday (Fri, 11 Dec 2020 15:37:38 GMT):
The API around wallets is slightly different between v1.4 and v2.x, and I think you're trying to use the v2 API. Look at the code example here for the v1.4 usage: https://hyperledger.github.io/fabric-sdk-node/release-1.4/module-fabric-network.html

punkrokk (Fri, 11 Dec 2020 15:57:43 GMT):
thank you so much, you were correct

bestbeforetoday (Fri, 11 Dec 2020 15:58:05 GMT):
:thumbsup:

punkrokk (Fri, 11 Dec 2020 16:05:06 GMT):
ok, now I'm getting this: error: [BaseWallet]: setUserContext: identity 'Admin@org1.example.com' isn't enrolled, or loaded

punkrokk (Fri, 11 Dec 2020 16:08:47 GMT):
but the wallet is there

punkrokk (Fri, 11 Dec 2020 16:16:26 GMT):
` FileSystemWallet { storesInitialized: false, walletMixin: X509WalletMixin {}, path: '../local_fabric/wallet/' }`

punkrokk (Fri, 11 Dec 2020 16:29:05 GMT):
Will storesInitialized be `true` when I have loaded it?

punkrokk (Fri, 11 Dec 2020 16:33:27 GMT):
@bestbeforetoday

punkrokk (Fri, 11 Dec 2020 20:46:10 GMT):
What would cause the `mspID` eg. Org1MSP to be cached or overwritten by an incorrect one?

punkrokk (Fri, 11 Dec 2020 21:02:47 GMT):
somehow my `mspID` is ending up the same as my username

punkrokk (Fri, 11 Dec 2020 21:31:30 GMT):
what do file paths have to do with user mspID?

bestbeforetoday (Sat, 12 Dec 2020 00:03:42 GMT):
File paths shouldn't have anything to do with MSP ID. The MSP for a particular identity is stored within the wallet as part of the identity data. A v1.4 wallet has a structure like this, with each identity having its own sub-directory within the file-system wallet directory: ``` . ├── admin │   ├── 4cabd967d1bcb3007b686670ff416327bf7def75c52f8b0e499773ec4d751b82-priv │   ├── 4cabd967d1bcb3007b686670ff416327bf7def75c52f8b0e499773ec4d751b82-pub │   └── admin └── org1Admin ├── df0e8fc72a2d2c54f3226f00f6c85fa11c20004949e24850d2798100ea31560e-priv ├── df0e8fc72a2d2c54f3226f00f6c85fa11c20004949e24850d2798100ea31560e-pub └── org1Admin ``` The MSP ID for a given identity will be located in the file named the same as the identity's label within the wallet. So in the example above you'll file the MSP ID for the identity named `org1Admin` within the `walletDirectory/org1Admin/org1admin` file.

bestbeforetoday (Sat, 12 Dec 2020 00:03:42 GMT):
File paths shouldn't have anything to do with MSP ID. The MSP for a particular identity is stored within the wallet as part of the identity data. A v1.4 wallet has a structure like this, with each identity having its own sub-directory within the file-system wallet directory: ``` . ├── admin │   ├── 4cabd967d1bcb3007b686670ff416327bf7def75c52f8b0e499773ec4d751b82-priv │   ├── 4cabd967d1bcb3007b686670ff416327bf7def75c52f8b0e499773ec4d751b82-pub │   └── admin └── org1Admin ├── df0e8fc72a2d2c54f3226f00f6c85fa11c20004949e24850d2798100ea31560e-priv ├── df0e8fc72a2d2c54f3226f00f6c85fa11c20004949e24850d2798100ea31560e-pub └── org1Admin ``` The MSP ID for a given identity will be located in the file named the same as the identity's label within the wallet. So in the example above you'll file the MSP ID for the identity named `org1Admin` within the `walletDirectory/org1Admin/org1Admin` file.

bestbeforetoday (Sat, 12 Dec 2020 00:03:42 GMT):
File paths shouldn't have anything to do with MSP ID. The MSP for a particular identity is stored within the wallet as part of the identity data. A v1.4 wallet has a structure like this, with each identity having its own sub-directory within the file-system wallet directory: ``` wallet ├── admin │   ├── 4cabd967d1bcb3007b686670ff416327bf7def75c52f8b0e499773ec4d751b82-priv │   ├── 4cabd967d1bcb3007b686670ff416327bf7def75c52f8b0e499773ec4d751b82-pub │   └── admin └── org1Admin ├── df0e8fc72a2d2c54f3226f00f6c85fa11c20004949e24850d2798100ea31560e-priv ├── df0e8fc72a2d2c54f3226f00f6c85fa11c20004949e24850d2798100ea31560e-pub └── org1Admin ``` The MSP ID for a given identity will be located in the file named the same as the identity's label within the wallet. So in the example above you'll file the MSP ID for the identity named `org1Admin` within the `walletDirectory/org1Admin/org1Admin` file.

bestbeforetoday (Sat, 12 Dec 2020 00:07:22 GMT):
An equivalent v2 file-system wallet directory would look like this, with each identity just having a single corresponding file directly in the wallet directory: ``` . ├── admin.id └── org1Admin.id ``` Those v2 format files just contain the MSP ID, certificate and private key (with a little bit of wallet metadata), and omit all the redundant information present in the v1.4 format wallet

bestbeforetoday (Sat, 12 Dec 2020 00:07:22 GMT):
An equivalent v2 file-system wallet directory would look like this, with each identity just having a single corresponding file directly in the wallet directory: ``` . ├── admin.id └── org1Admin.id ``` Those v2 format files just contain the MSP ID, certificate and private key (plus a little bit of wallet metadata), and omit all the redundant information present in the v1.4 format wallet

bestbeforetoday (Sat, 12 Dec 2020 00:07:22 GMT):
An equivalent v2 file-system wallet directory would look like this, with each identity just having a single corresponding file directly in the wallet directory: ``` wallet ├── admin.id └── org1Admin.id ``` Those v2 format files just contain the MSP ID, certificate and private key (plus a little bit of wallet metadata), and omit all the redundant information present in the v1.4 format wallet

subratoroy (Sat, 12 Dec 2020 07:40:52 GMT):
thank you.

subratoroy (Sat, 12 Dec 2020 07:46:13 GMT):
Hi All, is it possible to 1) have multiple ledgers on a channel 2) query one ledger from another ledger's chaincode? Example, lets say there is one ledger that trades an asset (example equity). There is another ledger that trades derivative of this asset. Can the asset derivative ledger (equity derivative) read the latest asset (equity) prices from the asset (equity) ledger? Any example of such a cross ledger chaincode will be very helpful.

amalendusuresh (Mon, 14 Dec 2020 06:39:33 GMT):
Could anyone share re-enroll code of fabric-sdk-node

randyshu (Mon, 14 Dec 2020 08:59:16 GMT):
thanks for your kind reply. I ask this question because of bsn platform only support low level chaincode api and must supply a function of init when initantiating chaincode and after serval test, i found a easy way to do this is declare a init function in the contract and everything goes well.

subratoroy (Mon, 14 Dec 2020 12:42:29 GMT):
Hello All, I have created a chaincode that has been deployed on the test network but I am not able to invoke it. The "docker logs" show following error : "failed to invoke chaincode repoTrade, error: container exited with 1 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1"

subratoroy (Mon, 14 Dec 2020 12:42:29 GMT):
Hello All, I have created a chaincode that has been deployed on the test network but I am not able to invoke it. The "docker logs" show following error : "failed to invoke chaincode repoTrade, error: container exited with 1 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1" How can I debug this more ? I understand the docker logs can be made more detailed with CORE_VM_DOCKER_ATTACHSTDOUT flag - please can you tell me which file should I set this flag in? ... In general how can one the chaincode for any syntax errors before deploy?

davidkel (Mon, 14 Dec 2020 16:23:18 GMT):
You might want to ask on the #fabric-chaincode-dev channel as that's where the chaincode dev people hang out

punkrokk (Mon, 14 Dec 2020 19:15:17 GMT):
anyone ever seen this:

punkrokk (Mon, 14 Dec 2020 19:15:19 GMT):
`Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: Error constructing Docker VM Name. 'dev-peer0.org1.example.com-recollection_-ccs-e4a43cab8eefbdf774e868d1e5380506442458f2974cfc5f7f55e627da72d19d-91ff508ba91894a08dcaa768f98eba6fa7af70b20d10d86a190dff2245c7a17d' breaks Docker's repository naming rules`

punkrokk (Mon, 14 Dec 2020 19:15:39 GMT):
I can't figure out where this underscore is coming from: `dev-peer0.org1.example.com-recollection_`

punkrokk (Mon, 14 Dec 2020 20:31:01 GMT):
` error: [SingleQueryHandler]: evaluate: message=Query failed. Errors: [], stack=FabricError: Query failed. Errors: []`

ckong (Tue, 15 Dec 2020 07:34:45 GMT):
Tried using the debug logger in fabric-client, I obtained the following log excerpt: ``` 335 2020-12-15T07:26:43.736Z - debug: [EventService]: _startService[peer1.isprint.ar2.accessreal.com,peer2.isprint.ar2.accessreal.com,peer3.isprint.ar2.accessreal.com] - #1 - start 336 2020-12-15T07:26:43.736Z - debug: [EventService]: _startService[peer1.isprint.ar2.accessreal.com,peer2.isprint.ar2.accessreal.com,peer3.isprint.ar2.accessreal.com] - #1 - setup timer 3000 337 2020-12-15T07:26:43.736Z - debug: [EventService]: _startService[peer1.isprint.ar2.accessreal.com,peer2.isprint.ar2.accessreal.com,peer3.isprint.ar2.accessreal.com] - #1 - create stream setup timeout 338 2020-12-15T07:26:43.737Z - debug: [EventService]: _startService[peer1.isprint.ar2.accessreal.com,peer2.isprint.ar2.accessreal.com,peer3.isprint.ar2.accessreal.com] - #1 - create stream based on blockType full 339 2020-12-15T07:26:43.738Z - debug: [EventService]: _startService[peer1.isprint.ar2.accessreal.com,peer2.isprint.ar2.accessreal.com,peer3.isprint.ar2.accessreal.com] - #1 - create stream listening callbacks - onData, onEnd, onStatu s, onError 340 2020-12-15T07:26:43.739Z - debug: [EventService]: _startService[peer1.isprint.ar2.accessreal.com,peer2.isprint.ar2.accessreal.com,peer3.isprint.ar2.accessreal.com] - #1 - stream write complete 341 2020-12-15T07:26:43.742Z - debug: [EventService]: on.data - peer:grpcs://192.168.200.36:7051 - 1 342 2020-12-15T07:26:43.742Z - debug: [EventService]: on.data - resolve the promise 343 2020-12-15T07:26:43.742Z - error: [EventService]: on.data - unexpected deliverResponse status received - NOT_FOUND 344 2020-12-15T07:26:43.743Z - debug: [EventService]: _close[peer1.isprint.ar2.accessreal.com,peer2.isprint.ar2.accessreal.com,peer3.isprint.ar2.accessreal.com] - #1 - start - called due to:: Event stream has received an unexpected s tatus message. status:NOT_FOUND ``` What does this `NOT_FOUND` mean? Who is not able to find whom?

bestbeforetoday (Tue, 15 Dec 2020 09:32:24 GMT):
Each channel has (or is) a single ledger: https://hyperledger-fabric.readthedocs.io/en/latest/ledger/ledger.html#channels

bestbeforetoday (Tue, 15 Dec 2020 09:34:19 GMT):
Each chaincode deployed to a single channel also has its own ledger namespace and can't directly see the data for other chaincodes. You can make chaincode-to-chaincode calls. It's worth reading through all the information and examples on this page: https://hyperledger-fabric.readthedocs.io/en/latest/developapps/chaincodenamespace.html

bestbeforetoday (Tue, 15 Dec 2020 09:41:28 GMT):
Glad you got it sorted ok :thumbsup:

davidkel (Tue, 15 Dec 2020 13:35:05 GMT):
That looks strange. Make sure you are using the latest node-sdk and if the problem still occurs would be worth raising a jira against the node sdk at jira.hyperledger.org. Provide as much detail as you can such as what you were trying to do as well as peer logs.

davidkel (Tue, 15 Dec 2020 15:12:33 GMT):
NOT_FOUND comes from the peer so worth checking your peer logs to see if there is anything there to provide some insight

punkrokk (Tue, 15 Dec 2020 16:39:01 GMT):
thanks @davidkel it was DNS.

bestbeforetoday (Tue, 15 Dec 2020 17:35:33 GMT):
I'm a bit worried that no additional error text came back as part of that error message. It might be worth raising a bug report in Jira with details of how the error occurred to see if that message can be improved, since something has appeared in the debug logs: https://jira.hyperledger.org/projects/FABN

punkrokk (Wed, 16 Dec 2020 01:06:07 GMT):
So, I was trying to access the test-network remotely. Would you still wish for me to create a bug?

punkrokk (Wed, 16 Dec 2020 01:06:23 GMT):
@bestbeforetoday

bestbeforetoday (Wed, 16 Dec 2020 09:19:35 GMT):
If you can supply some simple steps that allow the issue to be reproduced, yes please. The lack of any useful information in the error message is not great

punkrokk (Wed, 16 Dec 2020 19:37:00 GMT):
When using the `getHistoryForKey` stub function, how can I see more than just the current state? I am using the new iterator strategy from fabric-sdk-node v2.1, and it's just giving me back the latest data. What am I missing?

punkrokk (Wed, 16 Dec 2020 19:38:06 GMT):
is the key the txID?

punkrokk (Wed, 16 Dec 2020 19:38:23 GMT):
or it can be any value, correct?

davidkel (Wed, 16 Dec 2020 19:40:06 GMT):
That question would be more appropriate on the #fabric-chaincode-dev channel. This channel is for the client side fabric-node-sdk

davidkel (Wed, 16 Dec 2020 19:41:16 GMT):
but as a starter maybe this will help ? https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/tutorial-using-iterators.html

haggis (Mon, 21 Dec 2020 13:50:44 GMT):
Hello! Has experience in implementing a serverless Node.js Fabric Client with Azure Functions? How/where did you store the wallet?

haggis (Mon, 21 Dec 2020 13:50:44 GMT):
Hello! Has anyone experience in implementing a serverless Node.js Fabric Client with Azure Functions? How/where did you store the wallet?

bestbeforetoday (Tue, 22 Dec 2020 09:19:24 GMT):
I haven't done this but, assuming you are running your serverless functions in a Kubernetes environment, perhaps you could inject the credentials as Kubernetes secrets: https://docs.microsoft.com/en-us/azure/aks/concepts-security#kubernetes-secrets

bestbeforetoday (Tue, 22 Dec 2020 09:20:40 GMT):
Either inject the identity file for a filesystem wallet as a file, or the requires credential information (MSP ID, certificate, private key) as environment variables from which you can create the identity object

bestbeforetoday (Tue, 22 Dec 2020 09:20:40 GMT):
Either inject the identity file for a filesystem wallet as a file, or the required credential information (MSP ID, certificate, private key) as environment variables from which you can create the identity object

haggis (Tue, 22 Dec 2020 10:48:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=pviZu2YLKerquo4cS) Thank you. Do I need an additional blob storage for this?

danchi (Wed, 23 Dec 2020 13:12:25 GMT):
Hello, quick one which method should I call from Node SDK, when I want to deploy exist smart contract to the new channel ?

soumilgada-sg (Wed, 23 Dec 2020 15:40:40 GMT):
Has joined the channel.

soumilgada-sg (Wed, 23 Dec 2020 15:40:40 GMT):
Hello! I am try to instantiate chaincode nodejs framework via AWS managed blockchain on 1.4.. After waiting for a while, it shows error Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm WARN safeGold@1.3.0 No repository field. npm ERR! code ENOTCACHED npm ERR! request to https://registry.npmjs.org/class-transformer/-/class-transformer-0.2.3.tgz failed: cache mode is 'only-if-cached' but no cached response available.

soumilgada-sg (Wed, 23 Dec 2020 15:44:19 GMT):
Little help would really help me through..

bestbeforetoday (Wed, 23 Dec 2020 16:04:22 GMT):
If practical, I would recommend using the CLI commands: https://hyperledger-fabric.readthedocs.io/en/release-2.2/commands/peerlifecycle.html

bestbeforetoday (Wed, 23 Dec 2020 16:05:56 GMT):
If you can't script those or drive them from code, v1.4 provides admin capabilities in the `fabric-client` package, or for v2 there are some open source extensions that provide similar admin capability, such as https://github.com/davidkhala/fabric-common/tree/master/nodejs/admin

FilipeSilva (Sun, 27 Dec 2020 16:54:03 GMT):
My transactions sometimes are committed but other times not

FilipeSilva (Sun, 27 Dec 2020 16:54:14 GMT):
By inspecting the logs I found this message:

FilipeSilva (Sun, 27 Dec 2020 16:54:33 GMT):
`2020-12-27 16:37:46.806 UTC [policies] SignatureSetToValidIdentities -> WARN 1b0 signature for identity 1 is invalid: The signature is invalid 2020-12-27 16:37:46.807 UTC [vscc] Validate -> ERRO 1b1 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode datamarket in tx 21:0 failed: implicit policy evaluation failed - 1 sub-policies were satisfied, but this policy requires 2 of the 'Endorsement' sub-policies to be satisfied 2020-12-27 16:37:46.807 UTC [committer.txvalidator] validateTx -> ERRO 1b2 Dispatch for transaction txId = 026405b4e8eb78e367fc44aa225064c0a17e86347d49f7330d92779d51efabc9 returned error: validation of endorsement policy for chaincode datamarket in tx 21:0 failed: implicit policy evaluation failed - 1 sub-policies were satisfied, but this policy requires 2 of the 'Endorsement' sub-policies to be satisfied`

FilipeSilva (Sun, 27 Dec 2020 16:54:33 GMT):
``` 2020-12-27 16:37:46.806 UTC [policies] SignatureSetToValidIdentities -> WARN 1b0 signature for identity 1 is invalid: The signature is invalid 2020-12-27 16:37:46.807 UTC [vscc] Validate -> ERRO 1b1 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode datamarket in tx 21:0 failed: implicit policy evaluation failed - 1 sub-policies were satisfied, but this policy requires 2 of the 'Endorsement' sub-policies to be satisfied 2020-12-27 16:37:46.807 UTC [committer.txvalidator] validateTx -> ERRO 1b2 Dispatch for transaction txId = 026405b4e8eb78e367fc44aa225064c0a17e86347d49f7330d92779d51efabc9 returned error: validation of endorsement policy for chaincode datamarket in tx 21:0 failed: implicit policy evaluation failed - 1 sub-policies were satisfied, but this policy requires 2 of the 'Endorsement' sub-policies to be satisfied ```

FilipeSilva (Sun, 27 Dec 2020 16:56:22 GMT):
Based on my reasearch that may be connected to different read-write set across peers

FilipeSilva (Sun, 27 Dec 2020 16:56:39 GMT):
However, I do not know how to proceed from here on

FilipeSilva (Sun, 27 Dec 2020 16:56:44 GMT):
Any clue?

Adhavpavan (Mon, 28 Dec 2020 15:31:15 GMT):
1) Network configuration? 2) What is signature policy 3) Are you dealing with private data?

Adhavpavan (Mon, 28 Dec 2020 15:31:15 GMT):
@FilipeSilva 1) Network configuration? 2) What is signature policy 3) Are you dealing with private data? 4) Frequency of transaction failure?

punkrokk (Tue, 29 Dec 2020 18:54:10 GMT):
Is there a way to invoke the BlockDecoder in fabric-sdk-node? I can't seem to figure out a way.

ItaloCarrasco (Tue, 29 Dec 2020 19:49:33 GMT):
hello i have a question about endorsing and private collections, i have 3 orgs and 2 collections, the endorsing policy for these two is as follows: collection1= AND(org1,org3); collection2 = AND(org2,org3) the problem i am having is when using discovery i pass the collection names using contract.addDiscoveryInterests(), when i execute the invoke the transaction fails with this error: DiscoveryService: test-cc error: failed constructing descriptor for chaincodes: i suppose its because it cant generate a valid endorsing policy. As an option i tried setting the peers manually for endorsing passing a peer from org1, org2 and org3 and the transaction succeded (meaning that both policies were satisfied?). Is there a way to make discovery work with this? because passing the peers manually is not what i want. PD: i pass both collections because the chaincode method uses both. invoking passing only one throws an error related to not being able to fulfill the endorsing policy of the other.

Imaduddin (Wed, 30 Dec 2020 07:59:16 GMT):
Has joined the channel.

Imaduddin (Wed, 30 Dec 2020 07:59:16 GMT):
Hi. Anyone knows why a newly created peer cannot join an existing channel (FORBIDDEN)?

Imaduddin (Wed, 30 Dec 2020 07:59:16 GMT):
Hi. Anyone knows why a newly created peer cannot join an existing channel (FORBIDDEN)? (joining using sdk. Doing by cli works just fine)

punkrokk (Wed, 30 Dec 2020 18:31:10 GMT):
I figured it out, might be a good blog post topic

Adhavpavan (Thu, 07 Jan 2021 03:20:40 GMT):
We can use fabric-common package for decoding

sigma67 (Thu, 07 Jan 2021 16:22:41 GMT):
Has joined the channel.

sigma67 (Thu, 07 Jan 2021 16:25:46 GMT):
Hey all, is it normal that the txid field is empty for CONFIG type transactions? I'm on Fabric 2.3 and fabric-network v2.2

bdierberger (Fri, 08 Jan 2021 12:15:44 GMT):
Has joined the channel.

bestbeforetoday (Fri, 08 Jan 2021 13:36:44 GMT):
As I understand it, client-submitted config transactions don't require a transaction ID (but can have one) since the actual config transaction included in the blockchain is generated by the orderer. I think that will have a transaction ID generated by the orderer

sigma67 (Fri, 08 Jan 2021 18:05:33 GMT):
That makes sense, but I'm referring to transactions already included in the blockchain. If I receive such a transaction using for example the channel block subscription service, it should contain a txid?

ItaloCarrasco (Fri, 08 Jan 2021 19:15:49 GMT):
hello i have a question related to the endorsers: `2021-01-08T18:11:36.406Z - debug: [Endorser]: Endorser.constructor[peer0.org4.autentia-bchain.com] - start 2021-01-08T18:11:36.406Z - debug: [Client]: getEndorser: gateway client return endorser name:peer0.org4.autentia-bchain.com 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: connect[Endorser-peer0.org4.autentia-bchain.com] - start 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: connect[Endorser-peer0.org4.autentia-bchain.com] - create the grpc service for peer0.org4.autentia-bchain.com 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: waitForReady - start Endorser-peer0.org4.autentia-bchain.com - grpcs://localhost:10051 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: waitForReady - promise running peer0.org4.autentia-bchain.com - grpcs://localhost:10051 2021-01-08T18:11:39.406Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0.org4.autentia-bchain.com, url:grpcs://localhost:10051, connected:false, connectAttempted:true 2021-01-08T18:11:39.406Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.org4.autentia-bchain.com url:grpcs://localhost:10051 timeout:3000 2021-01-08T18:11:39.408Z - info: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0.org4.autentia-bchain.com due to Error: Failed to connect before the deadline on Endorser- name: peer0.org4.autentia-bchain.com, url:grpcs://localhost:10051, connected:false, connectAttempted:true at checkState (/home/italo/Documentos/mvp/pagare-mvp/api-chain/node_modules/@grpc/grpc-js/build/src/client.js:69:26) at Timeout._onTimeout (/home/italo/Documentos/mvp/pagare-mvp/api-chain/node_modules/@grpc/grpc-js/build/src/channel.js:292:17) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) { connectFailed: true }`

ItaloCarrasco (Fri, 08 Jan 2021 19:15:49 GMT):
hello i have a question related to the endorsers, consider having an endorsing peer down, the sdk takes 3 seconds to wait for an answer of this peer every time i do a request, if more peers are down that means 3 seconds more of waiting, like if i have 2 peers down request takes +6 seconds, this behavior is a big hit to the performance of an application, normal requests with all peers up take 1.8 seconds, a request with a peer down takes 4.8 seconds, like i said this time is the same for all the requests, i have a log showing the time it takes to timeout an endorser that isnt online, is there a way to avoid this waiting time? 2021-01-08T18:11:36.406Z - debug: [Endorser]: Endorser.constructor[peer0.org4.autentia-bchain.com] - start 2021-01-08T18:11:36.406Z - debug: [Client]: getEndorser: gateway client return endorser name:peer0.org4.autentia-bchain.com 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: connect[Endorser-peer0.org4.autentia-bchain.com] - start 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: connect[Endorser-peer0.org4.autentia-bchain.com] - create the grpc service for peer0.org4.autentia-bchain.com 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: waitForReady - start Endorser-peer0.org4.autentia-bchain.com - grpcs://localhost:10051 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: waitForReady - promise running peer0.org4.autentia-bchain.com - grpcs://localhost:10051 2021-01-08T18:11:39.406Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0.org4.autentia-bchain.com, url:grpcs://localhost:10051, connected:false, connectAttempted:true 2021-01-08T18:11:39.406Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.org4.autentia-bchain.com url:grpcs://localhost:10051 timeout:3000 2021-01-08T18:11:39.408Z - info: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0.org4.autentia-bchain.com due to Error: Failed to connect before the deadline on Endorser- name: peer0.org4.autentia-bchain.com, url:grpcs://localhost:10051, connected:false, connectAttempted:true at checkState (/home/italo/Documentos/mvp/pagare-mvp/api-chain/node_modules/@grpc/grpc-js/build/src/client.js:69:26) at Timeout._onTimeout (/home/italo/Documentos/mvp/pagare-mvp/api-chain/node_modules/@grpc/grpc-js/build/src/channel.js:292:17) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) { connectFailed: true }

ItaloCarrasco (Fri, 08 Jan 2021 19:15:49 GMT):
hello i have a question related to the endorsers: consider having an endorsing peer down, the sdk takes 3 seconds to wait for an answer of this peer every time i do a request, if more peers are down that means 3 seconds more of waiting, like if i have 2 peers down request takes +6 seconds, this behavior is a big hit to the performance of an application, normal requests with all peers up take 1.8 seconds, a request with a peer down takes 4.8 seconds. like i said this time is the same for all the requests, i have a log showing the time it takes to timeout an endorser that isnt online, is there a way to avoid this waiting time? 2021-01-08T18:11:36.406Z - debug: [Endorser]: Endorser.constructor[peer0.org4.autentia-bchain.com] - start 2021-01-08T18:11:36.406Z - debug: [Client]: getEndorser: gateway client return endorser name:peer0.org4.autentia-bchain.com 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: connect[Endorser-peer0.org4.autentia-bchain.com] - start 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: connect[Endorser-peer0.org4.autentia-bchain.com] - create the grpc service for peer0.org4.autentia-bchain.com 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: waitForReady - start Endorser-peer0.org4.autentia-bchain.com - grpcs://localhost:10051 2021-01-08T18:11:36.406Z - debug: [ServiceEndpoint]: waitForReady - promise running peer0.org4.autentia-bchain.com - grpcs://localhost:10051 2021-01-08T18:11:39.406Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0.org4.autentia-bchain.com, url:grpcs://localhost:10051, connected:false, connectAttempted:true 2021-01-08T18:11:39.406Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.org4.autentia-bchain.com url:grpcs://localhost:10051 timeout:3000 2021-01-08T18:11:39.408Z - info: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0.org4.autentia-bchain.com due to Error: Failed to connect before the deadline on Endorser- name: peer0.org4.autentia-bchain.com, url:grpcs://localhost:10051, connected:false, connectAttempted:true at checkState (/home/italo/Documentos/mvp/pagare-mvp/api-chain/node_modules/@grpc/grpc-js/build/src/client.js:69:26) at Timeout._onTimeout (/home/italo/Documentos/mvp/pagare-mvp/api-chain/node_modules/@grpc/grpc-js/build/src/channel.js:292:17) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) { connectFailed: true }

bh4rtp (Sun, 10 Jan 2021 23:48:17 GMT):
Did you make the transaction with manually specified endorser? I think discovery can avoid it.

bh4rtp (Sun, 10 Jan 2021 23:48:17 GMT):
Did you make the transaction with manually specified endorsers? I think discovery can avoid it.

bh4rtp (Sun, 10 Jan 2021 23:51:09 GMT):
The revisioned 2.0 sdk is much better than than 1.4. Do you use 1.4 sdk?

bh4rtp (Sun, 10 Jan 2021 23:51:09 GMT):
The revisioned 2.0 sdk is much better than 1.4. Do you use 1.4 sdk?

ItaloCarrasco (Mon, 11 Jan 2021 13:02:30 GMT):
i am using v2.0 and using discovery

ItaloCarrasco (Mon, 11 Jan 2021 13:06:31 GMT):
if u check the logs the sdk takes time to check if all the endorsers are online, if they are there is no problem because is a super fast check, but if they arent what i described happens., it seems that is a sequential check instead of a parallel check

ItaloCarrasco (Mon, 11 Jan 2021 13:10:47 GMT):
i think this check is at the start before any invoke happens

bh4rtp (Mon, 11 Jan 2021 14:17:57 GMT):
I will check it tomorrow.

ItaloCarrasco (Mon, 11 Jan 2021 18:01:57 GMT):
ty

ItaloCarrasco (Mon, 11 Jan 2021 19:17:38 GMT):
hello i want to know if the msp names need to have the first letter as upper case like Org1MSP instead of org1MSP, i set my msp names with the first letter as lower case and discovery is throwing errors, because idk how but its searching for Org1MSP instead of org1MSP

ItaloCarrasco (Mon, 11 Jan 2021 19:17:38 GMT):
hello i want to know if the msp names need to have the first letter as upper case like Org1MSP instead of org1MSP, i set my msp names with the first letter as lower case and discovery is throwing errors, because idk how but its searching for Org1MSP instead of org1MSP 2021-01-11T19:12:53.817Z - debug: [Network]: _initializeInternalChannel - start 2021-01-11T19:12:53.817Z - debug: [Network]: _initializeInternalChannel - initialize with discovery 2021-01-11T19:12:53.817Z - debug: [Network]: _initializeInternalChannel - user has not specified discovery targets, check channel and client 2021-01-11T19:12:53.817Z - debug: [Channel]: getEndorsers[pagare-channel] - start 2021-01-11T19:12:53.817Z - debug: [Channel]: _getServiceEndpoints - start - EnjoyMSP 2021-01-11T19:12:53.817Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer0.enjoy.autentia-bchain.com - enjoyMSP

bh4rtp (Tue, 12 Jan 2021 03:22:13 GMT):
I just tested killing peer0 when the network is running. And it makes me disappointed that all the transactions can not be submitted with discovery error. Shall I set connectAttempted: false?

Kestutis_Gudynas (Tue, 12 Jan 2021 10:25:06 GMT):
Has joined the channel.

ItaloCarrasco (Tue, 12 Jan 2021 13:21:32 GMT):
so its a bug on the sdk right?

ItaloCarrasco (Tue, 12 Jan 2021 13:23:18 GMT):
what is connectAttempted?

bh4rtp (Tue, 12 Jan 2021 14:05:22 GMT):
i also tried java sdk. it did not work too.

bh4rtp (Tue, 12 Jan 2021 14:08:38 GMT):
my tested peer has private data. java sdk tells error that private data can not be disseminated.

ItaloCarrasco (Tue, 12 Jan 2021 14:51:30 GMT):
i created a jira issue, it would be cool if you can post your tests and results, https://jira.hyperledger.org/browse/FABN-1687

bh4rtp (Wed, 13 Jan 2021 03:13:48 GMT):
already added a comment.

anweiss (Wed, 13 Jan 2021 22:18:35 GMT):
Has joined the channel.

anweiss (Wed, 13 Jan 2021 22:18:35 GMT):
hey all! ... I'm running into an issue with v1.4.16 of the SDK whereby if I use async/await with `client.installChaincode` the function exits prematurely ... and I can't for the life of me figure out what's going on

anweiss (Wed, 13 Jan 2021 22:19:34 GMT):
``` async function install() { console.log("Installing chaincode"); const result = await client.installChaincode(request, 2000); console.log("Chaincode installed"); } ```

anweiss (Wed, 13 Jan 2021 22:19:46 GMT):
it never gets to the "chiancode installed" log entry

anweiss (Wed, 13 Jan 2021 22:19:54 GMT):
and no errors are being reported

anweiss (Wed, 13 Jan 2021 22:20:04 GMT):
using Node 10 and 12

anweiss (Wed, 13 Jan 2021 22:21:25 GMT):
if I step through with a debugger, the line that seems to exit prematurely is `await super.generateTarGz(descriptors, stream);` in `fabric-client/lib/packager/Golang.js`

anweiss (Wed, 13 Jan 2021 22:21:43 GMT):
it never returns `stream.toBuffer()`

bestbeforetoday (Thu, 14 Jan 2021 10:34:18 GMT):
@anweiss It might be worth putting a try/catch around the call as it might be that a promise rejection is occurring. Also, if you are stepping through with a debugger, you might want to step into the `generateTarGz` call to see what is happening in there

anweiss (Thu, 14 Jan 2021 14:31:55 GMT):
thanks @bestbeforetoday ... I've tried putting a try/catch around that call and no promise rejection is being reported

anweiss (Thu, 14 Jan 2021 14:34:27 GMT):
if I step into that function it doesn't seem to be blocking on this block: ``` Promise.all(tasks).then(() => { pack.finalize(); }).catch((err) => { reject(err); }); ```

anweiss (Thu, 14 Jan 2021 14:35:18 GMT):
https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/lib/packager/BasePackager.js#L192

bestbeforetoday (Thu, 14 Jan 2021 17:25:25 GMT):
I guess it would only block there if the `tasks` array is non-empty (i.e. you've got some files to be packaged) and the promises in `tasks` are not already resolved. Are you saying it's successfully passing that line, or is this a typo and you're saying it just blocks on that line and never continues?

bestbeforetoday (Thu, 14 Jan 2021 17:33:07 GMT):
If you have a very simple client application and sample input data that allows the problem to be reproduced, it might be worth raising a bug report in Jira and attaching that application and input data: https://jira.hyperledger.org/projects/FABN

anweiss (Thu, 14 Jan 2021 17:34:33 GMT):
it successfully passes that line, the function returns and then the program immediately exits

anweiss (Thu, 14 Jan 2021 17:36:07 GMT):
while debugging, the tasks array has tons of "" task promises

anweiss (Thu, 14 Jan 2021 17:36:16 GMT):
but `Promise.all` doesn't block to wait for them all

anweiss (Thu, 14 Jan 2021 17:36:28 GMT):
it just skips right over it and returns the function and exits the program

anweiss (Fri, 15 Jan 2021 15:52:56 GMT):
so I did some more troubleshooting on this ... reverted back to v1.3.0 and it works no problem ... this commit seems to have been the difference -> https://github.com/hyperledger/fabric-sdk-node/commit/2a3e8510de0ada65e3e2c01c702c998f66fc5c16

anweiss (Fri, 15 Jan 2021 15:54:00 GMT):
maybe @sstone1 has some input?? :) ... nonetheless, thanks @bestbeforetoday for the assistance here ... will try and get a bug report up

greg2git (Sun, 17 Jan 2021 13:47:46 GMT):
Has joined the channel.

greg2git (Sun, 17 Jan 2021 13:50:46 GMT):
can anyone enlighten me to what this means in the fabric-sdk-node context: "You need to install Node.js version 8.9.x to use the sample application code"? i believe the 'most current' node.js version is lts/fermium -> v14.15.4

cmhacker (Mon, 18 Jan 2021 10:06:30 GMT):
Has joined the channel.

cmhacker (Mon, 18 Jan 2021 10:06:50 GMT):
Hello everyone, How I can use fabric2.x chaincode life cycle API in JAVA ??

cmhacker (Mon, 18 Jan 2021 10:06:50 GMT):
Hello everyone, How I can use fabric2.x chaincode life cycle API in node ??

bestbeforetoday (Mon, 18 Jan 2021 10:58:18 GMT):
I'm guessing that statement is a little out of date. Perhaps it's an older sample. The v2.2 Node SDK supported Node versions can be found here: https://hyperledger.github.io/fabric-sdk-node/release-2.2/index.html#toc3

bestbeforetoday (Mon, 18 Jan 2021 10:59:17 GMT):
Essentially it's the current supported LTS releases of Node.js

bestbeforetoday (Mon, 18 Jan 2021 11:03:41 GMT):
The Node SDK does not (currently) include admin capabilities such as lifecycle deployment of chaincode. If you can use the _peer_ CLI commands then that is probably a good option since they are well supported and maintained. Alternatively there is at least one admin package aiming to provide this capability to Node applications: https://www.npmjs.com/package/khala-fabric-admin

cmhacker (Mon, 18 Jan 2021 11:21:38 GMT):
Thank you so much

CaptainIRS (Tue, 19 Jan 2021 08:28:45 GMT):
Has joined the channel.

arun17 (Fri, 29 Jan 2021 12:04:42 GMT):
Has joined the channel.

arun17 (Fri, 29 Jan 2021 12:04:43 GMT):
hello any one here

Sahar (Sat, 30 Jan 2021 00:25:46 GMT):
peer channel update -f config_update_in_envelope.pb -c system-channel -o orderer0.bnc.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/org1.bnc.com/orderers/orderer0.bnc.com/msp/tlscacerts/tlsca.example.com-cert.pem Hello i am trying to fetch the latest configuration block from my system channel using node SDK. I basically want to do the equivalent of this command: peer channel fetch config latest_config.block -o $ORDERER_ID -c system-channel --tls --cafile $TLSAFILE but with the sdk. I tried this channel.getChannelConfigFromOrderer() , but it returns the decoded ConfigEnvelope, however, i need it in ".block" format because i will use it as the the genesis.block bootstrap file to start an orderer. Anyone has an idea on how to do it ? Thank you !

RonaldReagan (Mon, 01 Feb 2021 01:23:23 GMT):
Hi developers, 1) If we registered a large number of users and stored their certs in the file system wallet; does looking for a particular user's cert got any impact of the speed of the blockchain/application? 2) what would be the best practices in securing users file system wallet (fabric 1.4).

srihari.sardena (Tue, 02 Feb 2021 06:39:30 GMT):
Has joined the channel.

srihari.sardena (Tue, 02 Feb 2021 06:47:33 GMT):
Hi All,when i am trying to invoke / query i am facing some issue with grpc,we are got this setup in k8 , with hypeledger fabric binaries 2.2 and client side we are using node sdk ( fabric-client 1.4.3) - first i faced issue like grpc time out ( failed to connect before deadline ) [2021-02-01 07:50:45.619] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name orderer1.intain-net [2021-02-01 07:50:45.686] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature:  Signature {   r: ,   s: ,   recoveryParam: 0 } [2021-02-01 07:50:45.687] [INFO] Query - bf9dc4a9-1e65-4dca-b64c-0a72191979b2 now has Error: Failed to connect before the deadline URL:grpcs://peer0.bankema-net:7051 after the move 2021-02-01T07:50:45.687Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.bankema-net:7051 for this issue i increased the time limit in node sdk ( in default configuration grpc-wait-for-ready-timeout ), after that i am facing the following issue [31m2021-02-01 09:03:32.324 UTC [core.comm] ServerHandshake -> ERRO 53dc [0m TLS handshake failed with error read tcp 10.244.4.34:7051->10.244.5.45:55590: i/o timeout server=PeerServer remoteaddress=10.244.5.45:55590 [36m2021-02-01 09:03:32.324 UTC [grpc] Warningf -> DEBU 53dd [0m grpc: Server.Serve failed to complete security handshake from "10.244.5.45:55590": read tcp 10.244.4.34:7051->10.244.5.45:55590: i/o timeout [31m2021-02-01 09:03:32.326 UTC [core.comm] ServerHandshake -> ERRO 53de [0m TLS handshake failed with error read tcp 10.244.4.34:7051->10.244.5.45:55586: i/o timeout server=PeerServer remoteaddress=10.244.5.45:55586 [36m2021-02-01 09:03:32.326 UTC [grpc] Warningf -> DEBU 53df [0m grpc: Server.Serve failed to complete security handshake from "10.244.5.45:55586": read tcp 10.244.4.34:7051->10.244.5.45:55586: i/o timeout [34m2021-02-01 09:03:43.785 UTC [endorser] callChaincode -> INFO 53e0 [0m finished chaincode: CurrencyCC duration: 10ms channel=bankemachannel txID=c7698415 [34m2021-02-01 09:03:43.785 UTC [comm.grpc.server] 1 -> INFO 53e1 [0m unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=10.244.5.45:55890 grpc.code=OK grpc.call_duration=12.966276ms [36m2021-02-01 09:03:43.786 UTC [grpc] infof -> DEBU 53e2 [0m transport: loopyWriter.run returning. connection error: desc = "transport is closing" [34m2021-02-01 09:03:43.788 UTC [endorser] callChaincode -> INFO 53e3 [0m finished chaincode: InsurerCC duration: 12ms channel=bankemachannel txID=60782f12 [34m2021-02-01 09:03:43.791 UTC [comm.grpc.server] 1 -> INFO 53e4 [0m unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=10.244.5.45:55888 grpc.code=OK grpc.call_duration=18.068482ms [36m2021-02-01 09:03:43.792 UTC [grpc] infof -> DEBU 53e5 [0m transport: loopyWriter.run returning. connection error: desc = "transport is closing" [34m2021-02-01 09:03:43.792 UTC [endorser] callChaincode -> INFO 53e6 [0m finished chaincode: VatCC duration: 19ms channel=bankemachannel txID=9945ae78 [34m2021-02-01 09:03:43.792 UTC [comm.grpc.server] 1 -> INFO 53e7 [0m unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=10.244.5.45:55882 grpc.code=OK grpc.call_duration=21.677598ms [34m2021-02-01 09:03:43.793 UTC [endorser] callChaincode -> INFO 53e8 [0m finished chaincode: VatCC duration: 21ms channel=bankemachannel txID=32d1f788 [34m2021-02-01 09:03:43.793 UTC [comm.grpc.server] 1 -> INFO 53e9 [0m unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=10.244.5.45:55880 grpc.code=OK grpc.call_duration=22.71786ms [34m2021-02-01 09:03:43.793 UTC [endorser] callChaincode -> INFO 53ea [0m finished chaincode: BankDetailsCC duration: 21ms channel=bankemachannel txID=4ddb1b34 I appreciate any solution / suggestion, thank you

cmhacker (Tue, 02 Feb 2021 07:54:47 GMT):
This type of issue happened with me in the docker . I restarted docker on that node. also verify your peer addresses and your network ports.

bestbeforetoday (Tue, 02 Feb 2021 18:47:00 GMT):
You could try evaluating the `GetConfigBlock` transaction function on the `cscc` system chaincode to get the serialized serialized response protobuf as the response value

srihari.sardena (Wed, 03 Feb 2021 05:15:44 GMT):
yes, even i used to do the same when in the case of docker , but here we are using k8 to set up this is there any other work around which i can try , plz can you help me to solve this

cmhacker (Wed, 03 Feb 2021 05:30:25 GMT):
Sorry I can't, I don't know much about K8.

bestbeforetoday (Wed, 03 Feb 2021 09:24:05 GMT):
Is your client also within the Kubernetes / Docker network? The server address is in the 10.x.x.x range, which is a private address range so your client unlikely to be able to route to the server unless it is within the same private network

bestbeforetoday (Wed, 03 Feb 2021 09:38:05 GMT):
The number of identities in the wallet should not impact performance. However, establishing Gateway connections for many different client identities simultaneously might have some effect as each Gateway instance will be maintaining its own set of gRPC connections to peer/orderer nodes

bestbeforetoday (Wed, 03 Feb 2021 09:39:54 GMT):
If you really want to keep the client identity private keys secure then you could store them in a Hardware Security Module instead of on the client's filesystem

bestbeforetoday (Wed, 03 Feb 2021 09:43:55 GMT):
Using a filesystem wallet then perhaps normal security practices for files will apply. Ensure access permissions to the wallet files are restricted to the operating system user running the client application. If you're running in a container, you could store the wallet information somewhere more secure and inject the wallet files into the container at runtime, e.g. Kubernetes secrets

bestbeforetoday (Wed, 03 Feb 2021 09:44:47 GMT):
I'm sure there are plenty of people with more security expertise than me who may have better or additional suggestions too

srihari.sardena (Thu, 04 Feb 2021 05:35:26 GMT):
In this particular setup we are using sdk package npm fabric-client 1.4.3 where as the back end network setup is done on fabric 2.2 , is it an issue ?

srihari.sardena (Thu, 04 Feb 2021 05:41:31 GMT):
I am having the network set up which is done using fabric 2.2 , where as i am using node sdk package npm fabric-client 1.4.3 ( here i am using the client sdk 1.4.3 because i am already having this application which i want to deploy it in latest version of fabric , but i couldn't see any release after 1.4.3 ) , i can find the latest release only on fabric-network package ( is fabric-client package is deprecated ?) any suggestions please

Vgkmanju (Thu, 04 Feb 2021 05:47:14 GMT):
Has joined the channel.

bestbeforetoday (Thu, 04 Feb 2021 15:10:39 GMT):
In general I would expect this combination to work OK since the protobufs should be backwards compatible, although it is not a scenario that is specifically covered by the SDK tests. Certainly if the network is still configured with V1 capabilities enabled then any incompatibilities would probably be a bug

bestbeforetoday (Thu, 04 Feb 2021 15:13:02 GMT):
As of today the latest released version of fabric-client is 1.4.17: https://www.npmjs.com/package/fabric-client

bestbeforetoday (Thu, 04 Feb 2021 15:13:20 GMT):
There is no v2.x release of fabric-client

bestbeforetoday (Thu, 04 Feb 2021 15:13:58 GMT):
https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-migration.html

srihari.sardena (Fri, 05 Feb 2021 06:03:43 GMT):
so, is fabric-client package is deprecated in 2.0 ?

bestbeforetoday (Fri, 05 Feb 2021 09:46:05 GMT):
More than deprecated. As the v1.4 to v2 migration page I linked to you above says > fabric-client module has been removed

RonaldReagan (Mon, 08 Feb 2021 01:16:03 GMT):
Thanks.

AbhijeetSamanta (Mon, 08 Feb 2021 14:02:58 GMT):
Anybody know how to getall identity in hyperledger fabric 2.2 node sdk. Please help me?

nkl199 (Mon, 08 Feb 2021 15:05:40 GMT):
do you mean listing identities in an existing wallet, or retrieving identities from a component based on an admin connection?

FilipeSilva (Tue, 09 Feb 2021 10:23:31 GMT):
Has left the channel.

AbhijeetSamanta (Tue, 09 Feb 2021 16:31:42 GMT):
I got it I was missing ` const identityService = ca.newIdentityService();`

AbhijeetSamanta (Tue, 09 Feb 2021 16:31:42 GMT):
I got it I was missing `const identityService = ca.newIdentityService();`

AbhijeetSamanta (Tue, 09 Feb 2021 16:34:27 GMT):
I have checked that event service also redesign in 2.2 version. I am little confused how to do it I checked on fabric node sdk however its look messy and nothing give example like previous one. so could you please help me to understand it

barankilic (Wed, 10 Feb 2021 10:57:31 GMT):
Has joined the channel.

bestbeforetoday (Wed, 10 Feb 2021 13:02:46 GMT):
There is example code in the method documentation: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Network.html#addBlockListener

bestbeforetoday (Wed, 10 Feb 2021 13:03:27 GMT):
For contract events: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Contract.html#addContractListener

Vgkmanju (Thu, 11 Feb 2021 11:09:24 GMT):
Hi, I am using fabric 2.2 with nodesdk v2.1.0. When I tried to use discovery via nodesdk, I got the following error with error: Error: No discovery results found at DiscoveryService.getDiscoveryResults (/usr/lib/node_modules/fabric-network/node_modules/fabric-common/lib/DiscoveryService.js:355:10) at DiscoveryHandler.endorse (/usr/lib/node_modules/fabric-network/node_modules/fabric-common/lib/DiscoveryHandler.js:156:40) at Endorsement.send (/usr/lib/node_modules/fabric-network/node_modules/fabric-common/lib/Proposal.js:362:29) at Transaction.submit (/usr/lib/node_modules/fabric-network/lib/transaction.js:205:52) at Can anyone suggest how to resolve this?

bestbeforetoday (Thu, 11 Feb 2021 12:05:22 GMT):
It might be that you don't have service discovery correctly enabled and/or configured in your peers: - https://hyperledger-fabric.readthedocs.io/en/release-2.2/deploypeer/peerplan.html#service-discovery - https://hyperledger-fabric.readthedocs.io/en/release-2.2/discovery-overview.html

bestbeforetoday (Thu, 11 Feb 2021 12:05:54 GMT):
I would suggest using the v2.2 Node SDK rather then v2.1.0

bestbeforetoday (Thu, 11 Feb 2021 12:06:51 GMT):
As of today, the current version is v2.2.5. You should be using that version

brano543 (Thu, 11 Feb 2021 18:46:18 GMT):
Has joined the channel.

brano543 (Thu, 11 Feb 2021 18:46:26 GMT):
Hello guys, I am trying to use Fabric Node sdk 2.2.5 and using network.addBlockListener. However I am always getting issue "unexpected deliverResponse status received - 404". I have the same issue no matter which fabric ledger I use whether is is 1.4.x or 2.x. I have turned on debugging mode in Node SDK and it seems that library is not able to recognize the channel name. I can see it says [Channel]: buildChannelHeader[mychannel] - chaincodeID {"name":""}. Would you be able to assist?

brano543 (Thu, 11 Feb 2021 18:50:46 GMT):
Exact error from Node.js side: "error: [EventService]: on.data [peer0.org1.example.com:7051] - #66- unexpected deliverResponse status received - 404"

brano543 (Thu, 11 Feb 2021 18:51:36 GMT):
2021-02-11 18:50:06.753 UTC [common.deliver] deliverBlocks -> ERRO 114c [channel: mychannel] Error reading from channel, cause was: NOT_FOUND 2021-02-11 18:50:06.753 UTC [comm.grpc.server] 1 -> INFO 114d streaming call completed grpc.service=protos.Deliver grpc.method=Deliver grpc.peer_address=172.28.0.1:7393 grpc.peer_subject="CN=fabric-common" grpc.code=OK grpc.call_duration=1.014274ms

brano543 (Thu, 11 Feb 2021 18:51:46 GMT):
This is received in ordering node

brano543 (Thu, 11 Feb 2021 18:53:47 GMT):
I am using fabric test-network example

bh4rtp (Fri, 12 Feb 2021 00:29:28 GMT):
Thank you for the information about discovery. We might mistaken it. What are the usages of these gossip env? Fabric defined so many env and the documentation doesn’t cover them together.

bh4rtp (Fri, 12 Feb 2021 00:29:28 GMT):
Thank you for the information about discovery. We might mistake it. What are the usages of these gossip env? Fabric defined so many env and the documentation doesn’t cover them together.

bestbeforetoday (Fri, 12 Feb 2021 11:40:16 GMT):
@brano543 My best guess is that you are running nodes in Docker contains on your local machine, and your client application is running outside of a Docker container on the local machine but does not have the `discovery.asLocalHost` option set to true during the Gateway connect: - https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.GatewayOptions.html This would explain why your client is unable to connect to the server. However, the orderer log messages suggest there might also be something more seriously wrong with your Fabric configuration or set up

brano543 (Fri, 12 Feb 2021 11:56:35 GMT):
@bestbeforetoday We have that option set and we are able to create and list contracts. The only thing which doesn't work is listening to block events. You are correct that we are trying to run application which is outside the docker containers. For the whole setup we are using sample network using curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.3.0 1.4.9. We configure by performing steps './network.sh up -ca -s couchdb' , './network.sh createChannel -c mychannel ', './network.sh deployCC -ccn jcicc -ccl go -ccp github.com/jci/chaincode/' and all of them succeed. We are able to execute smart contracts even. Could you please help us figure out the root cause?

bestbeforetoday (Fri, 12 Feb 2021 12:02:03 GMT):
Gossip is the protocol used by nodes to communicate between themselves. So orderers distribute blocks to peers, and peers update each other with discovery information, ledger heights and other things. I don't know if there is a good resource for what all the options mean. With most things like this, either the main Fabric docs or sometimes the comments in the default configuration file

bestbeforetoday (Fri, 12 Feb 2021 12:03:49 GMT):
That is strange because transaction submit uses a block listener internally to observe the commit status of a transaction. If transaction submit is working fine (and you haven't disabled commit waiting) then block listeners are clearly working too

ArdianAbazi (Fri, 12 Feb 2021 12:39:55 GMT):
Hello, does anyone have any idea why I might be getting this error?

ArdianAbazi (Fri, 12 Feb 2021 12:40:00 GMT):

Clipboard - February 12, 2021 1:39 PM

ArdianAbazi (Fri, 12 Feb 2021 12:43:34 GMT):
Here's how my setup looks. I have a Node.js app as a docker image, which I deploy on various machines. My network is run on a cloud linux machine, and to the outside it exposes only ports 80 and 443, through the use of sniproxy I was able to solve that. I had to do it in that way because the machines that run the apps only support outbound ports 80 and 443.

ArdianAbazi (Fri, 12 Feb 2021 12:46:33 GMT):
I deployed the app on my local machine, and an AWS EC2 instance everything worked fine, the communication with the app and the network only ran on ports 80 and 443 (I checked with wireshark). Now, when I ran the same container on a "enterprise" linux machine, which might have outbound port blocking in place, which is why I had to make the network run on ports 80 and 443 only in the first place.

ArdianAbazi (Fri, 12 Feb 2021 12:47:15 GMT):
Evaluate calls work fine, so communication can be done, but when it comes to submit calls I get the error shown in the image above. Any ideas why this could be happening?

ArdianAbazi (Fri, 12 Feb 2021 12:52:16 GMT):
Extra info: I am using the latest version of both the fabric and node sdk.

AbhijeetSamanta (Fri, 12 Feb 2021 13:25:13 GMT):
Thanks:slight_smile:

AbhijeetSamanta (Fri, 12 Feb 2021 18:19:24 GMT):
Hi I am facing one issue with node sdk 2.2 as I am trying to get block by transaction ID however I couldn't find anything. I was doing previous version as const clientB = gateway.getClient(); const channel = await clientB.getChannel(ChannelName); var trxnID = resulantvalue.TxId var block = await channel.queryTransaction(trxnID, peer);

AbhijeetSamanta (Fri, 12 Feb 2021 18:19:24 GMT):
Hi I am facing one issue with node sdk 2.2 as I am trying to get block by transaction ID however I couldn't find anything. I was doing previous version as ` const clientB = gateway.getClient(); const channel = await clientB.getChannel(ChannelName); var trxnID = resulantvalue.TxId var block = await channel.queryTransaction(trxnID, peer);`

bestbeforetoday (Sat, 13 Feb 2021 11:21:42 GMT):
There is a `qscc` system chaincode available on all peers that you can invoke using the client SDK. Two transaction functions on that system chaincode that may be useful for you are `GetTransactionByID` and `GetBlockByTxID`. Each takes a transaction ID as an argument and they return a serialized _ProcessedTransaction_ and _Block_ protobuf respectively as their response. There are precompiled JavaScript/TypeScript bindings that you can use to deserialize these protobufs in the _fabric-protos_ npm package, or you can use a protobuf package of your choice. The protobuf definitions for Fabric are in this repository: https://github.com/hyperledger/fabric-protos

brano543 (Sat, 13 Feb 2021 11:45:55 GMT):
I am still facing the same issue: "[channel: mychannel] Error reading from channel, cause was: NOT_FOUND". I have even tried to align CORE_PEER_LISTENADDRESS to use orderer.example.com:7051 instead of 0.0.0.0:7051.

brano543 (Sat, 13 Feb 2021 12:59:09 GMT):
I have connected to one of the peers and executed peer channel fetch newest -c mychannel before I successfully ran contract.submitTransaction. It returned '[cli.common] readBlock -> INFO 002 Received block: 5'. After I executed submitTransaction it returns '[cli.common] readBlock -> INFO 002 Received block: 6'. The only scenario when this doesn't work if one tries to do channel fetch without providing a channel name ' peer channel fetch newest'. That will return 'INFO 002 Expect block, but got status: &{NOT_FOUND} '. Are you sure there isn't bug in node.sdk that it is not passing the channel name for block listener?

brano543 (Sat, 13 Feb 2021 16:33:50 GMT):
UPDATE: when hardcode startBlock as 0 it works. The problem I am having is how to send the block through custom checkpointer. In documentation everywhere Long is mentioned, so I was using that library trying to pass const blockNumber = Long.fromString(current_block_number, true, 10); but this seems to fail

brano543 (Sat, 13 Feb 2021 16:57:11 GMT):
UPDATE: I eventually solved the issue by using same function as defined in https://github.com/hyperledger/fabric-sdk-node/blob/adafa70e887b68dad6a0997d8b8f38250d32c9bc/fabric-common/lib/Utils.js#L591 . Seems like zero in string which I was sending from DB confused the library as zero is reserved value... Thank you very much for your help !

brano543 (Sat, 13 Feb 2021 17:00:43 GMT):
@bestbeforetoday I have one question regarding the block listener. How can one handle the exceptions correctly so that checkpoint is always at correct lastProcessedBlock and lastProcessed transaction IDs? The problem of my understanding lies in the callback function. The callback function receives block which can contain multiple transactions. Let's say I have 5 transactions and one of them fails, who is then calling checkpointer.addTransactionId?

bestbeforetoday (Sun, 14 Feb 2021 10:20:13 GMT):
When delivering blocks, the SDK updates the block number on the checkpointer immediately after the callback successfully returns. The SDK does not know when you have processed individual transactions within a block it has delivered to you so it has no way of adding transaction IDs to the checkpointer. You could call `addTransactionId()` on the checkpointer yourself in your callback and then also ignore any transaction IDs in the set returned by the checkpointer from `getTransactionIds()` within your black handling callback

bestbeforetoday (Sun, 14 Feb 2021 10:21:15 GMT):
The SDK does check and update the transaction IDs on the checkpointer when it is used to deliver contract events: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Contract.html#addContractListener

bestbeforetoday (Sun, 14 Feb 2021 10:22:55 GMT):
If you are trying to orchestrate business processes in response to committed transactions, contract events are what you should be using. Emit an appropriate event from your transaction function and receive it to trigger a business process in your client

brano543 (Sun, 14 Feb 2021 21:23:41 GMT):
Thank you for the advice. I will do it as you suggest. I was successful in un-registering block event listener from itself and re-registering it on each exception also assuring block doesn't get incremented so it is not skipped and gets re-processed after listener is registered again.

souptikmakarov (Mon, 15 Feb 2021 09:47:18 GMT):
Has joined the channel.

souptikmakarov (Mon, 15 Feb 2021 09:48:07 GMT):
Hi. Can someone help with this issue? https://stackoverflow.com/questions/66172170/hyperledger-fabric-2-3-error-failed-to-connect-before-the-deadline-on-endorser

Kate256 (Mon, 15 Feb 2021 10:07:41 GMT):
Has joined the channel.

Kate256 (Mon, 15 Feb 2021 10:09:05 GMT):
Hi all, is there anyone who has some experience with using a HTTP POST in fabric to store data (via SMS) in the blockchain? I would need some recommendations / ideas. - Thank you! (see also : https://stackoverflow.com/questions/66200379/how-to-integrate-http-post-method-for-saving-transactions-in-fabric )

bh4rtp (Wed, 17 Feb 2021 01:20:53 GMT):
In the discovery tutorial, it says that In the docker-compose file, notice how Docker is mapping the port addresses, these must be same when using service discovery. Using - 7061:7051 will not work as the application does not have visibility into the virtual system and the port address as seen by the peer's discovery service. If using discovery service, must all ports be the same?

bh4rtp (Wed, 17 Feb 2021 15:10:54 GMT):
I have an extra question about discovery. If enabled discovery service, does gateway api get the configuration by grpc from fabric network? If yes, why need a connection-profile?

bh4rtp (Wed, 17 Feb 2021 15:12:15 GMT):
If enabled discovery, is the connection-profile only valid for pem files?

knagware9 (Thu, 18 Feb 2021 06:30:48 GMT):
yes, peer and orderer information will be available from discovery service.

PraveenVarma (Fri, 19 Feb 2021 07:45:50 GMT):
Has joined the channel.

PraveenVarma (Fri, 19 Feb 2021 07:45:51 GMT):
Hello everyone, I am new to Hyperledger Fabric the question may be very fundamental If proof of work is not used in Fabric, does nonce exist in Fabric and if it does not exist how is the blockchain immutable

souptikmakarov (Fri, 19 Feb 2021 17:38:18 GMT):
Getting error in node sdk 2.2 2021-02-19T17:35:40.721Z - error: [SingleQueryHandler]: evaluate: message=Query failed. Errors: [], stack=FabricError: Query failed. Errors: [] at SingleQueryHandler.evaluate (/fabric23/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:47:23) at Transaction.evaluate (/fabric23/node_modules/fabric-network/lib/transaction.js:276:49) at ContractImpl.evaluateTransaction (/fabric23/node_modules/fabric-network/lib/contract.js:179:45) at main (/fabric23/test.js:65:39) at processTicksAndRejections (internal/process/task_queues.js:97:5), name=FabricError Failed to evaluate transaction: FabricError: Query failed. Errors: []

souptikmakarov (Fri, 19 Feb 2021 17:38:18 GMT):
Getting error in node sdk 2.2 2021-02-19T17:35:40.721Z - error: [SingleQueryHandler]: evaluate: message=Query failed. Errors: [], stack=FabricError: Query failed. Errors: [] at SingleQueryHandler.evaluate (/fabric23/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:47:23) at Transaction.evaluate (/fabric23/node_modules/fabric-network/lib/transaction.js:276:49) at ContractImpl.evaluateTransaction (/fabric23/node_modules/fabric-network/lib/contract.js:179:45) at main (/fabric23/test.js:65:39) at processTicksAndRejections (internal/process/task_queues.js:97:5), name=FabricError Failed to evaluate transaction: FabricError: Query failed. Errors: [] What could be the issue? Also channel.getEndorsingPeers() returns empty list.

knagware9 (Sat, 20 Feb 2021 10:51:43 GMT):
Fabric is permissioned blockchain, so here different consensus mechanisms used for example RAFT, KAFKA called ordering service.

souptikmakarov (Mon, 22 Feb 2021 13:44:22 GMT):
Hi. I am facing an issue in the Fabric SDK 2.2 where the singlequeryhandler.js file s getting passed an empty list of peers even though the connections to all peers were successful. Please help. Details here https://stackoverflow.com/questions/66316846/singlequeryhandler-evaluate-message-query-failed-errors-stack-fabricer

souptikmakarov (Mon, 22 Feb 2021 13:44:22 GMT):

bestbeforetoday (Tue, 23 Feb 2021 11:36:12 GMT):
If your peers are running within a Docker network on your local machine, they will think their public address is the address within the docker network, and this public address will be used to communicate happily with other nodes within the same Docker network. However, your client running outside of the Docker network will need to talk to the nodes at _localhost_. The `discovery.asLocalhost` option tells the client to treat all node addresses obtained from discovery as being at _localhost_ rather than the address within the Docker network, but it leaves the port number unchanged. So for this to work you need to have each node use a different port number and map that internal Docker `host:port` to `localhost:port` (keeping the same port number) so your client running outside of the Docker network can communicate with the nodes within the Docker network

bestbeforetoday (Tue, 23 Feb 2021 11:38:21 GMT):
If you client is also running in a container within the Docker network, or if the nodes are configured with addresses that are publicly visible outside of the Docker network, you don't have to worry about this and everything can just talk direct using the real addresses

bestbeforetoday (Tue, 23 Feb 2021 11:40:41 GMT):
The connection profile is still required because the client needs to know the location of at least one peer from which it can obtain discovery information. Any nodes not in the connection profile will be obtained using discovery so you probably want a minimal set of information in the connection profile when using discovery

bestbeforetoday (Tue, 23 Feb 2021 11:46:08 GMT):
Transactions are endorsed so you know they are valid, and digitally signed so any modification would invalidate the signature. Blocks contain the hash of the previous block so tampering would invalidate the chain

bestbeforetoday (Tue, 23 Feb 2021 12:00:40 GMT):
Does the `mspId` property of the identity used to connect the Gateway match the MSP ID of any network peers? You can try calling `network.getChannel().getEndorsers()` and look at their `mspid` properties to check

bestbeforetoday (Tue, 23 Feb 2021 12:01:29 GMT):
It might also be worth checking you are using the latest v2.2 SDK release, which is currently v2.2.5

souptikmakarov (Tue, 23 Feb 2021 13:36:27 GMT):
network.getChannel.getEndorsers() returns empty array. Even if I specify the mspids it still returns empty array. I am using ver 2.2.4 currently

souptikmakarov (Tue, 23 Feb 2021 13:37:58 GMT):
In the debug log i pasted in stackoverflow you can see that during the "buildChannel" phase it adds all the endorsing peers and the orderers successfully

souptikmakarov (Tue, 23 Feb 2021 13:38:14 GMT):
But during fetch it returns empty array

souptikmakarov (Tue, 23 Feb 2021 13:41:06 GMT):
I just tried with fabric-network@2.2.5. Same issue

bh4rtp (Tue, 23 Feb 2021 16:45:17 GMT):
Understand. Thanks for the detailed explanation. It is very very important to deploy the network in local testing environment and product cluster.

bh4rtp (Tue, 23 Feb 2021 16:45:17 GMT):
Understand. Thanks for the detailed explanation. It is very very important to deploy the network in local testing environment and production cluster.

bh4rtp (Tue, 23 Feb 2021 16:52:02 GMT):
One more extended question, is discovery service related with peer failure tolerance, ie. anchor peer is down?

souptikmakarov (Wed, 24 Feb 2021 09:53:53 GMT):
So I walked through the code of fabric-network and fabric-common and figured out how the endorsers are added and fetched. To debug I put couple of extra debug lines at fabric-common/lib/Channel.js At lines 275,305 and 320 I added logger.debug(`${method} - endorsers size - ${this.endorsers.size}`);

souptikmakarov (Wed, 24 Feb 2021 09:54:20 GMT):
Now when I execute my query the logs show this

souptikmakarov (Wed, 24 Feb 2021 10:03:36 GMT):
stupid mistake

bestbeforetoday (Wed, 24 Feb 2021 10:33:09 GMT):
Glad you got it sorted :thumbsup:

souptikmakarov (Wed, 24 Feb 2021 13:01:59 GMT):
Facing this issue in Node SDK 2.2.5 This is the nodejs log error: [Endorser]: sendProposal[peer1.peers.org1.com] - Received error response from: grpcs://10.167.xxx.xxx:7051 error: Error: 2 UNKNOWN: error validating proposal: access denied: channel [mychannel] creator org [ORG1MSP] error: [Endorser]: sendProposal[peer1.peers.org1.com] - rejecting with: Error: 2 UNKNOWN: error validating proposal: access denied: channel [mychannel] creator org [ORG1MSP] error: [SingleQueryHandler]: evaluate: message=Query failed. Errors: ["Error: 2 UNKNOWN: error validating proposal: access denied: channel [mychannel] creator org [ORG1MSP]"], stack=FabricError: Query failed. Errors: ["Error: 2 UNKNOWN: error validating proposal: access denied: channel [mychannel] creator org [ORG1MSP]"] at SingleQueryHandler.evaluate (/fabric23/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:47:23) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Transaction.evaluate (/fabric23/node_modules/fabric-network/lib/transaction.js:276:25) at async main (/fabric23/test.js:69:25), name=FabricError Failed to evaluate transaction: FabricError: Query failed. Errors: ["Error: 2 UNKNOWN: error validating proposal: access denied: channel [mychannel] creator org [ORG1MSP]"] And this is the peer log [endorser] Validate -> WARN 11f access denied: creator's signature over the proposal is not valid: The signature is invalid channel=mychannel txID=a856ebe9 mspID=ORG1MSP [comm.grpc.server] 1 -> INFO 120 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.23.xxx.xxx:4101 grpc.peer_subject="CN=*.peers.org3.com,OU=org3client,O=MyCompany Inc.,L=,ST=,C=" error="error validating proposal: access denied: channel [mychannel] creator org [ORG1MSP]" grpc.code=Unknown grpc.call_duration=11.273773ms

bh4rtp (Wed, 24 Feb 2021 14:40:09 GMT):
You can try adding IP address of your client to CN.

souptikmakarov (Wed, 24 Feb 2021 14:41:06 GMT):
it is added in the etc/hosts in the peer pod and also in the connection config of the node api

bh4rtp (Wed, 24 Feb 2021 14:44:08 GMT):
I mean the crypto-config.yaml, it may be denied because of CN checking failure.

bh4rtp (Wed, 24 Feb 2021 14:46:31 GMT):
Notice that the CN in your log only gives *.peer.org3.com.

souptikmakarov (Wed, 24 Feb 2021 14:49:15 GMT):
Yes. It is similar for the rest 2 orgs. The CN for their tls certificates is *.peers.orgN.com

souptikmakarov (Wed, 24 Feb 2021 14:50:42 GMT):
Crypto config doesn't have ip addresses for any of the orgs.

bh4rtp (Wed, 24 Feb 2021 14:54:46 GMT):
You can add an entry - 172.23.xx.* or the hostname.

bh4rtp (Wed, 24 Feb 2021 14:56:41 GMT):
Your client accessed the peer by IP address, so I guess you deployed your network in multi-hosts or VMs.

souptikmakarov (Wed, 24 Feb 2021 15:30:59 GMT):
Yes. Our network has 2 orgs in a PKS cluster and 1 org in a vm on docker swarm. The PKS orgs talk to the vm org via a nginx server in the middle. The client ip that i provide for the vm based org is that of the nginx server. The nginx has port forwarding rules defined for both way communication

souptikmakarov (Wed, 24 Feb 2021 15:32:20 GMT):
I know the communication setup is correct because the transactions executed on the clis of these orgs work properly with the endorsement policy enabled

souptikmakarov (Wed, 24 Feb 2021 15:32:20 GMT):
I know the communication setup is correct because the transactions executed on the clis of these orgs work properly with endorsement policy enabled

souptikmakarov (Wed, 24 Feb 2021 15:34:48 GMT):
The weird thing is that I can't find any references for the 172.23.xx.xx ip address. The nginx server ip is 143.xx.xx.xx and the vm has an ip of 10.164.xx.xx

bh4rtp (Wed, 24 Feb 2021 15:37:26 GMT):
Cli is not the same as client. Can your client connect the peer0.peers.org3.com? If yes, it does work.

souptikmakarov (Wed, 24 Feb 2021 15:37:48 GMT):
client as in the nodejs pod?

souptikmakarov (Wed, 24 Feb 2021 15:37:48 GMT):
client as in the nodejs pod or the peer pod?

bh4rtp (Wed, 24 Feb 2021 15:40:01 GMT):
I setup the client in an individual vm out of the fabric network.

bh4rtp (Wed, 24 Feb 2021 15:41:10 GMT):
172.23 could be your client ip.

souptikmakarov (Wed, 24 Feb 2021 15:42:47 GMT):
As far as I know we don't have any such client. The only pods that we have are peers, clis, orderers and the nodejs pods

bh4rtp (Wed, 24 Feb 2021 15:45:26 GMT):
Maybe your volumes were not removed and it contains old crypto files.

souptikmakarov (Wed, 24 Feb 2021 15:46:26 GMT):
But it is able to connect successfully to the other orderers and peers in the network

souptikmakarov (Wed, 24 Feb 2021 15:46:47 GMT):
And this is a fresh network created just 2 weeks ago

bh4rtp (Wed, 24 Feb 2021 15:48:27 GMT):
Already for production or just for testing environment?

souptikmakarov (Wed, 24 Feb 2021 15:48:40 GMT):
testing

souptikmakarov (Wed, 24 Feb 2021 15:48:58 GMT):
But we plan to take the same setup to prod

bh4rtp (Wed, 24 Feb 2021 15:51:18 GMT):
I have also encountered this error and it was solved by adding all available entries to common name in the crypto config file and generating artifacts again.

bh4rtp (Wed, 24 Feb 2021 15:53:08 GMT):
Such as peer0.org1.example.com, localhost, exchange.dev, 192.168.56.108.

souptikmakarov (Wed, 24 Feb 2021 15:53:31 GMT):
the crypto config is different than the configtx.yaml that has the org definitions, channel definitions etc?

souptikmakarov (Wed, 24 Feb 2021 15:54:41 GMT):
Actually In our case the certificates were issued by our company. They were signed using the intermediate cert of our company

bh4rtp (Wed, 24 Feb 2021 15:54:53 GMT):
It does have hostname and common name configuration, and the latter is important for sdk client.

souptikmakarov (Wed, 24 Feb 2021 15:55:02 GMT):
So they weren't generated in the traditional way

bh4rtp (Wed, 24 Feb 2021 15:56:41 GMT):
Ok, you go further than us. We still use cryptogen tool.

souptikmakarov (Wed, 24 Feb 2021 15:57:47 GMT):
This is what the tls cert looks like for org3

souptikmakarov (Wed, 24 Feb 2021 15:57:49 GMT):
Issuer: C=XX, ST=XX, L=XX, O=XX, CN=XX Issuing CA 101 Validity Not Before: Jan 21 05:44:18 2021 GMT Not After : Jan 21 05:44:18 2023 GMT Subject: C=XX, ST=XX, L=XX, O=XX., OU=org3client, CN=*.peers.org3.com

bh4rtp (Wed, 24 Feb 2021 15:58:10 GMT):
But from the log, the CN can be a clue to probe the issue. Hope this can help you:)

bh4rtp (Wed, 24 Feb 2021 15:59:13 GMT):
Yes, look at the CN field.

bh4rtp (Thu, 25 Feb 2021 00:10:54 GMT):
Template: Count: 2 SANS: - hostname - hostname.domain - localhost - 192.168.43.108 I configured PeerOrg in crypto-config.yaml like this.

bh4rtp (Thu, 25 Feb 2021 00:10:54 GMT):
```Template: Count: 2 SANS: - hostname - hostname.domain - localhost - 192.168.43.108``` I configured `PeerOrgs` in `crypto-config.yaml` like this.

souptikmakarov (Mon, 01 Mar 2021 06:17:17 GMT):
Hi. Need help with the issue described here https://stackoverflow.com/questions/66390671/hyperledger-fabric-2-3-connection-issue . We are planning to productionize this use-case and having difficulty with getting node sdk to work on our complicated network layout. Any help is appreciated

AbhijeetSamanta (Mon, 01 Mar 2021 17:55:25 GMT):
Hi @bestbeforetoday I am trying same however I am getting error with it I have below code for that

AbhijeetSamanta (Mon, 01 Mar 2021 17:55:27 GMT):
const walletPath = path.join(process.cwd(), OrgName); const wallet = await Wallets.newFileSystemWallet(walletPath); logger.info(`Wallet path: ${walletPath}`); // Create a new gateway for connecting to our peer node. const gateway = new Gateway(); await gateway.connect(connection, { wallet, identity: username, discovery: gatewayDiscovery }); const network = await gateway.getNetwork(channelName); const contract = network.getContract('qscc'); // here some issue with 'qscc' var block; var resultBlock = await contract.evaluateTransaction('GetBlockByTxID', ChannelName, trxnID); block = BlockDecoder.decode(resultBlock); console.log('@@@@@@block@@@@@@@@', block);

Imaduddin (Tue, 02 Mar 2021 02:53:47 GMT):
Hi, i was going through one of the e2e test inside this repo, and noticed that the Client class used is imported from fabric-client, even though there's a Client class in fabric-common. This is version 1.4 right? If so, does that mean we can just use Client class from version 1.4 or is this just not updated?

Imaduddin (Tue, 02 Mar 2021 06:08:30 GMT):
nevermind. Found out that the 2.2 sdk of Client doesn't have way to send transaction to create channel or join channel

Imaduddin (Tue, 02 Mar 2021 06:08:30 GMT):
nevermind. Found out that the v2.2 sdk of Client doesn't have way to send transaction to create channel or join channel

arun17 (Thu, 04 Mar 2021 04:17:07 GMT):
Hi, I am facing the error while running the sdk 2019-03-12T02:54:08.611Z - error: [DefaultQueryHandler]: queryChaincode - No peers out of a total of 1 were available to query can any help me out what will be the cause of these error.

Jakeeyturner (Thu, 04 Mar 2021 09:18:24 GMT):
Someone saw something similar here - https://lists.hyperledger.org/g/fabric/topic/30397971 where they weren't awaiting properly. Is your peer definitely running?

arun17 (Thu, 04 Mar 2021 10:13:39 GMT):
@Jakeeyturner yes all peers were up and also i checked the node sdk code for properly awaiting of function call it was all correct

bestbeforetoday (Tue, 09 Mar 2021 11:59:19 GMT):
From memory, the use of v1.4 Client (from fabric-client) in the v2.2 tests is just as some test set up. Ideally it wouldn't be used at all but nobody got around to reworking that piece of test code during the v2 SDK development. The flip side is that I think it showed up some coexistence issues with v1.4 fabric-client and v2.2 fabric-common that got fixed before release, so I guess every cloud has a silver lining!

knagware9 (Tue, 09 Mar 2021 12:16:58 GMT):
@bestbeforetoday Could you please check this stack overflow issue. its very interesting problem

knagware9 (Tue, 09 Mar 2021 12:18:24 GMT):
there is Kubernetes network for 2 orgs and one org in docker swamp.Kubernetes nodes able to connect from node cline unit docker swamp node not able to connect

mano-ranjith (Fri, 12 Mar 2021 11:44:42 GMT):
Has left the channel.

bharadwajambati (Mon, 15 Mar 2021 01:08:35 GMT):
Has joined the channel.

bharadwajambati (Mon, 15 Mar 2021 01:08:35 GMT):
Hi, I am using node sdk and go chaincode in my project. I am facing some issue while invoking transactions. All the transactions are committing. But sometimes, the invokes are failing with ENDORSEMENT_POLICY_FAILURE. But, if I try the same call again the transaction is getting committed. Not sure whats happening during the first time. Can some one help me out in resolving the issue? I am using HLF of version 2.2.x and fabric-network this is the error I am getting [TransactionEventHandler]: strategyFail: commit failure for transaction "5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f": TransactionError: Commit of transaction 5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f failed on peer peer0.org1 with status ENDORSEMENT_POLICY_FAILURE Below is the peer log *2021-03-15 00:17:58.704 UTC [vscc] Validate -> ERRO 37d6 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection collection1 chaincode custom-chaoncode in tx 1738:0 failed: signature set did not satisfy policy 2021-03-15 00:17:58.704 UTC [committer.txvalidator] validateTx -> ERRO 37d7 Dispatch for transaction txId = 5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f returned error: validation of endorsement policy for collection collection1 chaincode custom-chaincode in tx 1738:0 failed: signature set did not satisfy policy*

bharadwajambati (Mon, 15 Mar 2021 01:08:35 GMT):
@bretharrison Hi, I am using node sdk and go chaincode in my project. I am facing some issue while invoking transactions. All the transactions are committing. But sometimes, the invokes are failing with ENDORSEMENT_POLICY_FAILURE. But, if I try the same call again the transaction is getting committed. Not sure whats happening during the first time. Can some one help me out in resolving the issue? I am using HLF of version 2.2.x and fabric-network this is the error I am getting [TransactionEventHandler]: strategyFail: commit failure for transaction "5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f": TransactionError: Commit of transaction 5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f failed on peer peer0.org1 with status ENDORSEMENT_POLICY_FAILURE Below is the peer log *2021-03-15 00:17:58.704 UTC [vscc] Validate -> ERRO 37d6 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection collection1 chaincode custom-chaoncode in tx 1738:0 failed: signature set did not satisfy policy 2021-03-15 00:17:58.704 UTC [committer.txvalidator] validateTx -> ERRO 37d7 Dispatch for transaction txId = 5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f returned error: validation of endorsement policy for collection collection1 chaincode custom-chaincode in tx 1738:0 failed: signature set did not satisfy policy*

bharadwajambati (Mon, 15 Mar 2021 01:08:35 GMT):
Hi, I am using node sdk and go chaincode in my project. I am facing some issue while invoking transactions. All the transactions are committing. But sometimes, the invokes are failing with ENDORSEMENT_POLICY_FAILURE. But, if I try the same call again the transaction is getting committed. Not sure whats happening during the first time. Can some one help me out in resolving the issue? I am using HLF of version 2.2.x and fabric-network this is the error I am getting [TransactionEventHandler]: strategyFail: commit failure for transaction "5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f": TransactionError: Commit of transaction 5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f failed on peer peer0.org1 with status ENDORSEMENT_POLICY_FAILURE Below is the peer log *2021-03-15 00:17:58.704 UTC [vscc] Validate -> ERRO 37d6 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection collection1 chaincode custom-chaoncode in tx 1738:0 failed: signature set did not satisfy policy 2021-03-15 00:17:58.704 UTC [committer.txvalidator] validateTx -> ERRO 37d7 Dispatch for transaction txId = 5500c8b8eb546f93bd8c075f9f2df961d832faaa0d9ef8092f0ba9fb450e365f returned error: validation of endorsement policy for collection collection1 chaincode custom-chaincode in tx 1738:0 failed: signature set did not satisfy policy*

bestbeforetoday (Tue, 16 Mar 2021 10:31:38 GMT):
On the error thrown by the SDK when the unsuccessful commit occurs should have all the proposal responses (and errors) attached as a `responses` (and `errors`) property. You might need to interrogate them to see why endorsement failed. It could be that there were insufficient endorsements, the endorsements were not from the required organizations (particularly if a non-default endorsement policy was applied, such as with state-/key-based endorement), or not endorsement responses might not all match for some reason, such as non-deterministic ordering of response data

bharadwajambati (Thu, 18 Mar 2021 07:31:28 GMT):
okay.. thanks for the info :)

bharadwajambati (Thu, 18 Mar 2021 07:33:23 GMT):
Hi, I am using contract.addContractListener method for listening my chaincode events. Its working fine. But if I restart my peer and trigger a chaincode, I am unable to receive the events any more, unless and until I restart my listeners.

bharadwajambati (Thu, 18 Mar 2021 07:33:23 GMT):
Hi, I am using contract.addContractListener method for listening my chaincode events. Its working fine. But if I restart my peers, my chaincode listener is avle to connect back successfully. But if I trigger a chaincode event, I am unable to receive the events any more, unless and until I restart my listeners.

bestbeforetoday (Thu, 18 Mar 2021 09:53:39 GMT):
The eventing process should reconnect if the peer currently being used to obtain events disconnects. However, there is a known issue where, if no peers for your client identity's org are contactable at that point of reconnect, the eventing process gives up and doesn't reconnect: https://jira.hyperledger.org/projects/FABN/issues/FABN-1642 This sounds like it might be the situation you are seeing. This is fixable behaviour but, until it is fixed, you should be able to avoid it by ensuring that at least one of you org peers is active at all times

bestbeforetoday (Thu, 18 Mar 2021 09:53:39 GMT):
The eventing process should reconnect if the peer currently being used to obtain events disconnects. However, there is a known issue where, if no peers for your client identity's org are contactable at that point of reconnect, the eventing process gives up and doesn't reconnect: https://jira.hyperledger.org/projects/FABN/issues/FABN-1657 This sounds like it might be the situation you are seeing. This is fixable behaviour but, until it is fixed, you should be able to avoid it by ensuring that at least one of you org peers is active at all times

bharadwajambati (Thu, 18 Mar 2021 15:18:16 GMT):
Thats seems to be the similar issue I have. This is what I am using to listen chaincode events *contract.addContractListener*

bestbeforetoday (Thu, 18 Mar 2021 16:11:07 GMT):
Internally, the contract listener actually uses a block listener. It just does the work of pulling out the relevant contract event information for you. So re-attach behaviour of the block listener affects both `network.addBlockListener()` and `contract.addContractListener()` equally

bharadwajambati (Thu, 18 Mar 2021 16:11:36 GMT):
got it.. thanks alot :)

amalendusuresh (Fri, 19 Mar 2021 03:46:31 GMT):
Hi all, Im facing errors when i try to bring op the network in 2.0.. This is the error which Im getting and finally itz failing to craete genesis block... [common.tools.configtxgen.localconfig] Load -> PANI 002 Error reading configuration: While parsing config: yaml: line 36: did not find expected key 2021-03-16 06:27:37.350 UTC [common.tools.configtxgen] func1 -> PANI 003 Error reading configuration: While parsing config: yaml: line 36: did not find expected key panic: Error reading configuration: While parsing config: yaml: line 36: did not find expected key [recovered] panic: Error reading configuration: While parsing config: yaml: line 36: did not find expected key Could anyone help me with this... Thanks in advance

jbergdev (Fri, 19 Mar 2021 07:39:59 GMT):
Has joined the channel.

amalendusuresh (Thu, 25 Mar 2021 10:45:14 GMT):
Hi Im upgarding 1.4.7 to 2.01 ..do anyone has fabricSDK files in version 2.0?

bestbeforetoday (Thu, 25 Mar 2021 18:47:39 GMT):
I'm not sure I understand the question but you should definitely not be using v2.0.x of the SDK (or Fabric). You should be moving to v2.2.x (or `latest` npm tag) of the Node SDK packages, along with either v2.2 or v2.3 of Fabric

bestbeforetoday (Thu, 25 Mar 2021 18:47:57 GMT):
Also look at this documentation page for changes you will need to consider when moving from v1.4 to v2.2: https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-migration.html

yixinhuo (Fri, 26 Mar 2021 02:01:57 GMT):
Has joined the channel.

randyshu (Mon, 29 Mar 2021 06:45:04 GMT):
hi, Could I call reenroll with the same keypair and how to do?

krgko (Mon, 05 Apr 2021 05:44:17 GMT):
Has joined the channel.

nkl199 (Thu, 08 Apr 2021 16:18:16 GMT):
Has left the channel.

hoang-tranviet (Wed, 14 Apr 2021 08:29:26 GMT):
Has joined the channel.

shubhamirpachi (Fri, 16 Apr 2021 10:36:10 GMT):
Has joined the channel.

shubhamirpachi (Wed, 21 Apr 2021 10:45:49 GMT):
Hi all, I'm using fabric-node-sdk v2.2. I'm trying to get the channelInfo like block height. In v1.4 channel.queryInfo(peer) use to give these details. Is there any equivalent function in v2.2?

knagware9 (Thu, 22 Apr 2021 10:00:25 GMT):
you can check this email thread https://lists.hyperledger.org/g/fabric/topic/hyperleger_fabric_2_0_how/72537602?p=

bestbeforetoday (Thu, 22 Apr 2021 10:20:03 GMT):
You could evaluate the `GetChainInfo` transaction function on the `qscc` system chaincode (available on all peers). This returns a serialized `BlockchainInfo` protobuf, which includes the current block height: https://github.com/hyperledger/fabric/blob/6393adbb27d1af5f32299ff3927f11e0cbcadb33/vendor/github.com/hyperledger/fabric-protos-go/common/ledger.pb.go#L25

bestbeforetoday (Thu, 22 Apr 2021 10:23:20 GMT):
Another approach might be to attach a block listener and then remove it immediately after it receives the latest block event (from which you can grab the block number): https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Network.html#addBlockListener

davidkhala (Fri, 23 Apr 2021 00:51:35 GMT):
Hi fabric-sdk-node maintainers, recently I can still see some e2e testing existiing in code repository, is it a good time to clean up them? As fas as I know,there is no need to test 1.4 capabilities in main branches. I would love to help as some PRs if welcome.

davidkhala (Fri, 23 Apr 2021 00:51:35 GMT):
Hi fabric-sdk-node maintainers, recently I can still see some e2e testing existiing in code repository, is it a good time to clean up them? As fas as I know,there is no need to test 1.4 capabilities in main branches. I would love to help with some PRs if welcome.

shubhamirpachi (Fri, 23 Apr 2021 04:58:46 GMT):
Thank you @knagware9 . But the result of the query is something that I'm not able to decode it. I didn't get any helpful resource for decoding protobuf in javascript. Can you please help me here?

bestbeforetoday (Fri, 23 Apr 2021 10:25:09 GMT):
It would be great to replace any remaining legacy integration tests, and any help you can provide would be very much appreciated! We just need to avoid losing coverage by removing old tests so it might need some new style tests to be created as replacements

bestbeforetoday (Fri, 23 Apr 2021 10:26:42 GMT):
Some of the tests also use fabric-client for test set up. This actually turned out to be useful during v2.2 development as it turned up some config incompatibilities when fabric-client was used alongside the v2.2 packages, but it might be good to remove the dependency on that v1.4 code in the v2.2 tests now

bestbeforetoday (Fri, 23 Apr 2021 10:40:28 GMT):
Off the top of my head, you might be able to do something like: ``` const fabproto = require('fabric-protos'); const blockInfo = fabproto.common.BlockchainInfo.decode(chainInfoResult); const blockHeight = blockInfo.height; ```

kmilo.denis.glez (Fri, 23 Apr 2021 11:29:32 GMT):
Has joined the channel.

shubhamirpachi (Fri, 23 Apr 2021 18:55:48 GMT):
Thank you, it worked.

dhavera (Sun, 25 Apr 2021 11:34:39 GMT):
Has joined the channel.

dhavera (Sun, 25 Apr 2021 11:34:39 GMT):
Hi, I am trying to add a react front end to Fabcar. Has anyone gotten this to work? https://kctheservant.medium.com/rework-an-implementation-of-api-server-for-hyperledger-fabric-network-fabric-v2-2-a747884ce3dc

dhavera (Sun, 25 Apr 2021 11:43:14 GMT):
If I try to just do a create-react-app

dhavera (Sun, 25 Apr 2021 11:43:24 GMT):
I keep getting a missing module .framer error

dhavera (Sun, 25 Apr 2021 12:01:17 GMT):
One thing I struggle with on the instructions is how to find the ip address of the fabric network: "Step 6: Modify connection profile The connection profile when generated is using localhost. We change it from localhost to IP of Fabric Host (change to yours)." https://kctheservant.medium.com/deep-dive-into-fabcar-revised-57cb54642572

dhavera (Sun, 25 Apr 2021 12:38:03 GMT):
by default it looks like fabric deploys to 0.0.0.0:7051 for peer 1

dhavera (Sun, 25 Apr 2021 12:38:17 GMT):
and when I try to curl this with queryall, I get an empty response

davidkhala (Sun, 25 Apr 2021 14:34:38 GMT):
@bestbeforetoday Dear Mark, thanks for your feedback. I am not expertise on cumcumber, but I find mocha.js is also in use. Is it OK for us to migrate those tape intergration to be mocha tests? And the second question is in those cucumber scenario test, are we using commands to setup network, channel and new chaincode lifecycle?

davidkhala (Sun, 25 Apr 2021 14:34:38 GMT):
@bestbeforetoday Dear Mark, thanks for your feedback. I am not expertise on cumcumber, but I find mocha.js is also in use. Is it OK for us to migrate those tape intergration to be mocha tests? a hygience PR has been created here https://github.com/hyperledger/fabric-sdk-node/pull/449

bh4rtp (Mon, 26 Apr 2021 15:33:37 GMT):
i set the batch timeout to be 2s in the configtx.yaml. why does every query also take 2s? i remeber query is very fast than invocation.

bh4rtp (Mon, 26 Apr 2021 15:33:37 GMT):
i set the batch timeout to be 2s in the configtx.yaml. why does every query also take 2s? i remember query is very faster than invocation.

cmhacker (Tue, 27 Apr 2021 07:03:18 GMT):
For me reducing batch timeout worked, but there are some consequences you should figure out what should be batch timeout

bestbeforetoday (Tue, 27 Apr 2021 09:19:18 GMT):
The batch timeout is an orderer setting and should only affect the rate at which the orderer commits blocks. It should not affect how long it takes to call an `evaluateTransaction()` since this doesn't send anything to the orderer. Is it possible that you're accidentally invoking your query by calling `submitTransaction()` (and so commit changes to the ledger)?

bestbeforetoday (Tue, 27 Apr 2021 09:19:18 GMT):
The batch timeout is an orderer setting and should only affect the rate at which the orderer commits blocks. It should not affect how long it takes to call an `evaluateTransaction()` since this doesn't send anything to the orderer. Is it possible that you're accidentally invoking your query by calling `submitTransaction()` (and so commiting changes to the ledger)?

bestbeforetoday (Tue, 27 Apr 2021 09:19:18 GMT):
The batch timeout is an orderer setting and should only affect the rate at which the orderer commits blocks. It should not affect how long it takes to call an `evaluateTransaction()` since this doesn't send anything to the orderer. Is it possible that you're accidentally invoking your query by calling `submitTransaction()` (and so committing changes to the ledger)?

bestbeforetoday (Tue, 27 Apr 2021 09:48:00 GMT):
We're using Mocha as the test runner for unit tests (that run in isolation) and Cucumber for scenario tests (that operate against a real Fabric network). Tape was previously used for both so it depends on the tests being migrated, although I think we might already have removed all the old tape unit tests. The actual test code for either approach is fairly similar and both use Sinon/Chai for assertions, but we should keep that separation of Mocha for unit tests and Cucumber for scenario tests

bh4rtp (Tue, 27 Apr 2021 09:51:47 GMT):
Let me check it. Maybe.

bestbeforetoday (Tue, 27 Apr 2021 09:52:14 GMT):
In case it's of interest... we're taking a broadly similar approach with the new Fabric Gateway development work. The unit tests live with the source and use Jest as both the test runner and for assertions: https://github.com/hyperledger/fabric-gateway/tree/main/node/src The scenario tests use Cucumber and exactly the same test definitions drive Node, Go and Java clients so we ensure consistent functionality across all three languages: https://github.com/hyperledger/fabric-gateway/tree/main/scenario/features

davidkhala (Tue, 27 Apr 2021 09:57:04 GMT):
Indeed, cross-language is the power of Cucumber

bh4rtp (Tue, 27 Apr 2021 10:02:12 GMT):
Just confirmed evaluateTransaction is used. In fact query by Java sdk also has 2s latency.

bh4rtp (Tue, 27 Apr 2021 10:02:12 GMT):
Just confirmed that evaluateTransaction is used. In fact query by Java sdk also has 2s latency. I am using fabric 2.3. Is it a bug of this release version?

randyshu (Thu, 29 Apr 2021 03:21:23 GMT):

Clipboard - April 29, 2021 11:21 AM

randyshu (Thu, 29 Apr 2021 03:23:11 GMT):
HI, I meet above problem while converting keypair generated by fabric-sdk-java...is there some advice for it?

urkizu (Fri, 30 Apr 2021 09:47:26 GMT):
Hi all. Anyone has an approach to manage different error codes from chaincode to NodeJS SDK? The SDK returns an error message `"No valid responses from any peers. Errors:\n peer=172.26.41.179:7004, status=500, message=error in simulation: transaction returned with failure: {\"code\":10001}\n at ... at async handleMessage (/usr/local/src/node_modules/fabric-shim/lib/handler.js:602:24)" ` and the status is always 500. Any idea?

amalendusuresh (Mon, 03 May 2021 03:48:01 GMT):
Hi, I'm facing user when I am implementing wallet and gateway in hyperledger fabric 2,0.. Could anyone help me with this? Im getting an error as couldnot find connection-org.yaml ... But I am not able to know what is to be written in the connection-org.yaml..

bestbeforetoday (Tue, 04 May 2021 09:14:03 GMT):
The status is the code returned by the peer to indicate success (or failure) of the call. In v2.x, the Error thrown should have `responses` and `errors` properties. These are arrays of `EndorsementResponse` and `ServiceError` respectively. So you should be able to look at the endorsement response for additional information returned from the chaincode. In v1.4 the Error should have only a `responses` property, which contains an array of proposal responses and errors

bestbeforetoday (Tue, 04 May 2021 09:19:10 GMT):
The connection profile needs to describe (at least some) of the nodes in your network. The content depends on the network you've configured. See the docs here for details: https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/connectionprofile.html

bestbeforetoday (Tue, 04 May 2021 09:20:27 GMT):
If you're using Service Discovery then the client just needs at least 1 peer in the connection profile, which it can connect to and retrieve information about all the other nodes in the network. If you're not using Service Discovery then the connection profile needs to contain all the nodes your client may want to use

bh4rtp (Thu, 06 May 2021 11:18:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=73TG22KDyiF3DqDBH) Was it caused by no correct indexes created for couchdb?

bh4rtp (Fri, 07 May 2021 02:16:22 GMT):
I find the reason. Every query is done by establishing a new network connection. The connection latency can be 0.5s. And the actual total latency is 0.7s, not 2s. And java sdk keeps 2s latency for every query. It may be caused network delay. We are still profile this.

bh4rtp (Fri, 07 May 2021 02:16:22 GMT):
I find the reason. Every query is done by establishing a new network connection. The connection latency can be 0.5s. And the actual total latency is 0.7s, not 2s. But java sdk keeps 2s latency for every query. It may be caused network delay. We are still profile this.

bh4rtp (Fri, 07 May 2021 02:16:22 GMT):
I find the reason. Every query is done by establishing a new network connection. The connection latency can be 0.5s. And the actual total latency is 0.7s, not 2s. But java sdk keeps 2s latency for every query. It may be caused by network delay. We are still profile this.

bh4rtp (Fri, 07 May 2021 02:16:22 GMT):
I find the reason. Every query is done by establishing a new network connection. The connection latency can be 0.5s. And the actual total latency is 0.7s, not 2s. But java sdk keeps 2s latency for every query. It may be caused by network delay. We still profile this.

bestbeforetoday (Fri, 07 May 2021 08:26:09 GMT):
Are you reusing the same Gateway instance for multiple requests from the same client identity? If not, you certainly should be. If you are using the same Gateway then it should not be establishing new connections for every request. At least not if requests are close enough to each other than they haven't been closed as idle

bh4rtp (Fri, 07 May 2021 09:22:17 GMT):
Yes, not reused the gateway, query latency is not longer than 120ms. We misused the gateway.

tac911 (Wed, 12 May 2021 18:16:27 GMT):
Has joined the channel.

tac911 (Wed, 12 May 2021 18:16:28 GMT):
I'm trying to understand how the `invokeChainCode` for calling another chaincode works. The documentation is not providing detailed information. ``` var parameters = [methodName, to, value]; var params = []; for(var i = 0; i < parameters.length; i++){ var bytes = []; for (var j = 0; j < parameters[i].length; ++j) bytes.push(parameters[i].charCodeAt(j)); params.push(bytes); } let response = ctx.stub.invokeChaincode(chaincodeName, [params[0], params[1], params[2]], channelName); ```

tac911 (Wed, 12 May 2021 18:16:28 GMT):
I'm trying to understand how the `invokeChainCode` for calling another chaincode works. The documentation is not providing detailed information. I have tried it this way but I'm not sure if this will work. Can anyone help me out, how to set the args correct when calling the method? The documentation states that it must be an `Array.>` ``` var parameters = [methodName, to, value]; var params = []; for(var i = 0; i < parameters.length; i++){ var bytes = []; for (var j = 0; j < parameters[i].length; ++j) bytes.push(parameters[i].charCodeAt(j)); params.push(bytes); } let response = ctx.stub.invokeChaincode(chaincodeName, [params[0], params[1], params[2]], channelName); ```

tac911 (Wed, 12 May 2021 18:16:28 GMT):
I'm trying to understand how the `invokeChainCode` for calling another chaincode works. The documentation is not providing detailed information. I have tried it this way but I'm not sure if this will work. Can anyone help me out, how to set the args correct when calling the method? The documentation states that it must be an `Array.>` ``` var parameters = [methodName, to, value]; var params = []; for(var i = 0; i < parameters.length; i++){ var bytes = []; for (var j = 0; j < parameters[i].length; ++j) bytes.push(parameters[i].charCodeAt(j)); params.push(bytes); } let response = ctx.stub.invokeChaincode(chaincodeName, [params[0], params[1], params[2]], channelName); ``` Will this work?

davidkel (Wed, 12 May 2021 18:47:54 GMT):
An example can be seen here https://github.com/hyperledger/fabric-chaincode-node/blob/98b41d1096d7533d8dc719b592f4f72cebc5d1bd/test/integration/test.js#L175 note also channel is optional if chaincode is on the same channel

davidkel (Wed, 12 May 2021 18:47:54 GMT):
An example can be seen here https://github.com/hyperledger/fabric-chaincode-node/blob/98b41d1096d7533d8dc719b592f4f72cebc5d1bd/test/integration/test.js#L175 note also channel is optional if chaincode is on the same channel, but basically you can just pass in strings

amalendusuresh (Tue, 18 May 2021 03:52:52 GMT):
Hi I had a running fabric network in my local ubuntu in kubernetes , I have migrated the network to the Azure Kubernetes with the same files and bring up all the pods using the kubectl command and it is the only method I can interact with AKS there is no SSH access to the cluster or the worker nodes in AKS. I am stuck with running the fabricSDK in AKS, Anyone suggest me the method to run the fabricSDK in Azure kubernetes .

tac911 (Tue, 18 May 2021 16:30:18 GMT):
Thank you @davidkel We also got it working with above mentioned method.

tac911 (Tue, 18 May 2021 16:30:18 GMT):
Thank you @davidkel We also got it working with above mentioned method. Just wondering: The example you've provided - is it also transforming the parameters to byte first? Or is it OK to send them not as byte?

davidkel (Tue, 18 May 2021 16:32:25 GMT):
No the example doesn't convert to byte first ``` const results = await stub.invokeChaincode('mycc2', ['getKey', 'whoami']); ```

canenas (Tue, 18 May 2021 22:40:55 GMT):
Has joined the channel.

canenas (Tue, 18 May 2021 22:40:56 GMT):
hi all, on a multiorg network , when invoking gateway.connect() with discovery set to true, do i need to have in the connection profile definitions for peers for every organisation that's member of the network or a single peer will allow me to discover the rest of the peers of different organisations in the channel?

bestbeforetoday (Wed, 19 May 2021 09:03:55 GMT):
If discovery is configured correctly (with anchor peers to allow cross-organisation communication) then having in your connection profile just a single peer that is a member of the networks (channels) you want to connect to should be sufficient. You might want to have more than one peer in the connection profile in case one is unavailable when you try to connect

canenas (Wed, 19 May 2021 10:33:49 GMT):
@bestbeforetoday Thanks. That's what I was expecting. Probably I have misconfigured something.

canenas (Wed, 19 May 2021 13:04:08 GMT):
I'm going mad, It's still failing on fabric 2.2. Works ok with a single org but fails when 2 orgs are added.

canenas (Wed, 19 May 2021 13:22:35 GMT):
Is it possible to disable discovery and add peers from different organizations in the connection profile?

canenas (Wed, 19 May 2021 13:23:01 GMT):
How would that look like can't find an example online

bestbeforetoday (Wed, 19 May 2021 16:04:50 GMT):
Here is a contrived connection profile with multiple channels and orgs used in the SDK tests: https://github.com/hyperledger/fabric-sdk-node/blob/9212aa088f43dad113cd9f9ad6e14e4a9ffc83b7/test/ts-scenario/config/ccp-tls.json

bestbeforetoday (Wed, 19 May 2021 16:08:47 GMT):
I don't know what the specific problem you're hitting is, but worth checking that anchor peers are configured for each when when building the network, as in this network set up script: https://github.com/hyperledger/fabric-gateway/blob/979566c003ddfd51e13de492d3b35560616b3716/scenario/fixtures/generate.sh#L16

bestbeforetoday (Wed, 19 May 2021 16:08:47 GMT):
I don't know what the specific problem you're hitting is, but worth checking that anchor peers are configured for each org when when building the network, as in this network set up script: https://github.com/hyperledger/fabric-gateway/blob/979566c003ddfd51e13de492d3b35560616b3716/scenario/fixtures/generate.sh#L16

tac911 (Thu, 20 May 2021 20:05:56 GMT):
But they have to be converted to bytes first, right?

tac911 (Thu, 20 May 2021 20:07:03 GMT):
@davidkel Another thing we have noticed is that with a cross-chaincode call, events are not emitted. We couldn't figure out why. Any ideas? This is critical for us as we have an application that listens to those events.

tac911 (Thu, 20 May 2021 20:11:46 GMT):
When invoking a chaincode with a cross-chaincode call (`stub.invokeChaincode`) we noticed that the event in the invoked chaincode is not emitting. Is this a bug or a feature? How can we emit the event in the called chaincode?

tac911 (Fri, 21 May 2021 06:41:48 GMT):
Found a documentation here stating that the event must be emitted from the outer-most contract. So I guess it is not possible to emit event in the called contract, which is too unfortunate.

tac911 (Fri, 21 May 2021 06:41:48 GMT):
Found a documentation here stating that the event must be emitted from the outer-most contract. So I guess it is not possible to emit event in the called contract, which is too unfortunate. https://hlf.readthedocs.io/en/latest/developapps/transactioncontext.html#stub

akshay.sood (Tue, 25 May 2021 06:33:21 GMT):
Hey guys Is there any way to update the config block with a CRL generated through fabric-node-sdk?

akshay.sood (Tue, 25 May 2021 06:35:16 GMT):
I have generated a CRL but I am having hard time in finding out a way to push that crl into the config block so that transactions through that certificate can be rejected

Vgkmanju (Tue, 25 May 2021 08:56:07 GMT):
Hi I am using hyperledger fabric 2.2 with 3orgs, 5 orderers and 3 channels. I used raft orderering service for my deployment. In the nodejs server config file, I have mentioned all the 5 orderers certs under orderers like the following, orderer1.example.com orderer2.example.com orderer3.example.com orderer4.example.com orderer5.example.com For testing how the raft consensus working, I stopped orderer2 and orderer3. The leader election goes fine and allocate a lead for each channel. When I stopped 3 out of 5 orderer, it is not working why because, it is not statisfying quorum. When I stopped one orderer out of 5 which is orderer1, I got service unavailable connection deadline exceed error. Why the node server always takes the first orderer in the list? If the first orderer goes down, it can take second, or some other orderer which are listed there but it is not doing that. Can anyone suggest how to configure that? Why it is happening? Thanks in Advance.

bestbeforetoday (Tue, 25 May 2021 09:45:08 GMT):
Are you using the latest version (v2.2.5) of the Node SDK? The behaviour of the client should be that it picks a random orderer when submitting a transactions, and fails over to other orderers if the one it picks is unavailable

bestbeforetoday (Tue, 25 May 2021 09:52:04 GMT):
Although... having a quick look at the code now, it seems that the randomisation of orderers may only happen when discovery is used. If you have discovery disabled then, first I would probably advise that you do use discovery, but if you do have it disabled then it looks like the code is currently just trying the orderers in a fixed order but it should still fail-over to other orderers

Vgkmanju (Tue, 25 May 2021 10:10:44 GMT):
i am using v1.4 node sdk.

Vgkmanju (Tue, 25 May 2021 10:12:00 GMT):
is this version supports random orderer picks?

GeorgePals (Tue, 25 May 2021 19:22:56 GMT):
Has joined the channel.

GeorgePals (Tue, 25 May 2021 19:22:56 GMT):
Hello! I have an issue with my nodejs client. I'm trying to connect with the Blockchain, but I'm getting a "PEM encoded certificate is required." error. Here you can see the codes: ``` const x509Identity = { credentials: { certificate: enrollment.certificate, privateKey: enrollment.key.toBytes() }, mspId: orgMspId, type: 'X.509' }; ``` ``` await gateway.connect(this.ccp, this.opts); --> this.opts is a {} which holds the identity, wallet, discovery ``` My CCP is very simple. I only hold the connection info, without any PEM (tlsca etc.) files The identity is saved successfully under the wallet and, yep, the file is ok. The structure of the file is: ``` { "credentials": { "certificate": "", "privateKey": "" }, "mspId": "", "type": "X.509" } ``` Here is my wallet: ``` { providerRegistry: IdentityProviderRegistry { providers: Map(1) { 'X.509' => [X509Provider] } }, store: FileSystemWalletStore { storePath: '/usr/src/api/wallets/user0' } } ``` Edit: I added the TLSCACERTS of the orderer and the peers in the ccp, but the issue still persists. I'm out of ideas. Any ideas? Thanks!

GeorgePals (Tue, 25 May 2021 19:22:56 GMT):
Hello! I have an issue with my nodejs client. I'm trying to connect with the Blockchain, but I'm getting a "PEM encoded certificate is required." error. Here you can see the codes: ``` const x509Identity = { credentials: { certificate: enrollment.certificate, privateKey: enrollment.key.toBytes() }, mspId: orgMspId, type: 'X.509' }; ``` ``` await gateway.connect(this.ccp, this.opts); --> this.opts is a {} which holds the identity, wallet, discovery ``` My CCP is very simple. I only hold the connection info, without any PEM (tlsca etc.) files The identity is saved successfully under the wallet and, yep, the file is ok. The structure of the file is: ``` { "credentials": { "certificate": "", "privateKey": "" }, "mspId": "", "type": "X.509" } ``` Here is my wallet: ``` { providerRegistry: IdentityProviderRegistry { providers: Map(1) { 'X.509' => [X509Provider] } }, store: FileSystemWalletStore { storePath: '/usr/src/api/wallets/user0' } } ``` Edit: I added the TLSCACERTS of the orderer and the peers in the ccp, but the issue still persists. I'm out of ideas. Edit 2: I created a channel to check if I am connected and, guess what, I am. So, everything works, but I'm getting an error. Maybe a bug? Any ideas? Thanks!

GeorgePals (Tue, 25 May 2021 19:58:19 GMT):
I created a channel to check if I am connected and, guess what, I am. So, everything works, but I'm getting an error. Maybe a bug?

davidkhala (Wed, 26 May 2021 04:09:26 GMT):
I think admin capability has been removed from sdk-node for a year.

bestbeforetoday (Wed, 26 May 2021 08:21:32 GMT):
Yes, it looks like there were some improvements in that area in v1.4.13 onwards, so current versions should pick a random orderer first

bestbeforetoday (Wed, 26 May 2021 08:35:08 GMT):
It looks like that error is thrown if the TLS root certificate defined for a node is not a PEM string

GeorgePals (Wed, 26 May 2021 08:38:14 GMT):
Hello. Thanks for your assistance. So, this doesn't concern the user's certificate, but the CA's? I mean, it concerns the "certificateAuthorities: {}" field, of the ccp?

GeorgePals (Wed, 26 May 2021 08:43:31 GMT):
I'll try to feed it with the ca.crt and I'll post the outcome.

bestbeforetoday (Wed, 26 May 2021 09:20:21 GMT):
I haven't walked through to code to check exactly how it gets to the point where that error can be generated, but I think it's the tlsCACerts for nodes, which are expected to contain either a `path` to a certificate PEM, or a `pem` field containing the certificate PEM directly

bestbeforetoday (Wed, 26 May 2021 09:21:51 GMT):
Here is one used by the scenario tests for the SDK: https://github.com/hyperledger/fabric-sdk-node/blob/9212aa088f43dad113cd9f9ad6e14e4a9ffc83b7/test/ts-scenario/config/ccp-lifecycle.json

bestbeforetoday (Wed, 26 May 2021 09:21:51 GMT):
Here is one used by the scenario tests for the SDK: https://github.com/hyperledger/fabric-sdk-node/blob/9212aa088f43dad113cd9f9ad6e14e4a9ffc83b7/test/ts-scenario/config/ccp-tls.json

GeorgePals (Wed, 26 May 2021 09:50:18 GMT):
Aaaand yep. Problem solved. It needed the ca.crt of the orderer. I added the tlsCACerts at the orderer section and the error message is gone. So: ``` "orderers": { "orderer": { "url": "grpcs://orderer:1111", "grpcOptions": { "ssl-target-name-override": "orderer-proxy", "grpc.keepalive_timeout_ms": 15 }, "certificateAuthorities": [ "" ], "tlsCACerts":{ "path":"path to the ca.crt" } } ```

GeorgePals (Wed, 26 May 2021 09:50:18 GMT):
Aaaand yep. Problem solved. It needed the ca.crt of the orderer. I added the tlsCACerts at the orderer section and the error message is gone. So: ``` "orderers": { "orderer": { "url": "grpcs://orderer:1111", "grpcOptions": { "ssl-target-name-override": "orderer", "grpc.keepalive_timeout_ms": 15 }, "certificateAuthorities": [ "" ], "tlsCACerts":{ "path":"path to the ca.crt" } } ```

bestbeforetoday (Wed, 26 May 2021 10:31:24 GMT):
Glad you got it sorted! :thumbsup:

GeorgePals (Wed, 26 May 2021 10:33:24 GMT):
Thank you for your time! Have a nice day

nao (Thu, 27 May 2021 05:00:49 GMT):
Has joined the channel.

nao (Thu, 27 May 2021 05:24:37 GMT):
Hello. Does anyone know when publishing fabric-sdk-node v2.2.6? It has been four months since release v2.2.5.

bestbeforetoday (Thu, 27 May 2021 08:38:26 GMT):
I don't think many changes have gone in since that release. Is there a fix you are particularly waiting for?

bestbeforetoday (Thu, 27 May 2021 08:41:02 GMT):
You're right though, it's nicer to keep releases coming more quickly, even if they contain very few changes. I'll see if I can do a release today

nao (Thu, 27 May 2021 09:19:18 GMT):
Thank you for your reply. I'm waiting for pulling grpc, which is the bellow issue fixed version because when a connection is broken between sdk client and peer, sdk client cannot reconnect a peer, we got an error. https://github.com/grpc/grpc-node/issues/1411 The latest code fixed that issue with this pull request. https://github.com/hyperledger/fabric-sdk-node/pull/449

bestbeforetoday (Thu, 27 May 2021 10:26:32 GMT):
v2.2.6 is released: https://github.com/hyperledger/fabric-sdk-node/releases/tag/v2.2.6

nao (Thu, 27 May 2021 10:40:17 GMT):
Thank you so much!

Ssrihari (Fri, 28 May 2021 06:24:50 GMT):
Has joined the channel.

Ssrihari (Fri, 28 May 2021 06:30:25 GMT):
Hi ,

Ssrihari (Fri, 28 May 2021 06:39:17 GMT):
Hi  i am using the fabric-client package to write my client application there i am facing an issue with orderer , in my network we are using raft consensus mechanism to order the transactions , to connect / reach out to that particular service we are having 5 ordering services to reach out , i mentioned all the ordering service names in my network-config.yaml / common file , if  the first ordering service is goes down i am getting error like failed to connect before deadline , it is defaultly taking the first orderer service name from my network-config file can anyone please help me how do i make it configurable  Thanks

RobertBetschinger (Fri, 28 May 2021 10:22:00 GMT):
Has joined the channel.

lcvalves (Sun, 30 May 2021 18:10:58 GMT):
Has joined the channel.

bh4rtp (Tue, 01 Jun 2021 01:02:44 GMT):
hi, if using discovery insterest by private data (org1, org2, org3), how to specify the transaction to be delivered to peers of org2?

bh4rtp (Tue, 01 Jun 2021 01:02:44 GMT):
hi, if using discovery insterest by private data (r/w by org1, org2 and org3), how to specify the transaction to be delivered to peers of org2?

bh4rtp (Tue, 01 Jun 2021 01:02:44 GMT):
hi, if using discovery insterest with private data read/written by org1, org2 and org3, how to specify a transaction to be submitted to peers of org2?

pmorrall (Sun, 06 Jun 2021 19:01:10 GMT):
Has joined the channel.

pritam_01 (Wed, 09 Jun 2021 06:31:31 GMT):
Does fabric-network 1.4 breaks when used with fabric 2.x network?

bestbeforetoday (Wed, 09 Jun 2021 08:05:37 GMT):
I think it should work OK, at least if the Fabric nodes have 1.4 capabilities enabled

ydkishore30 (Sat, 12 Jun 2021 17:50:03 GMT):
Has joined the channel.

tusharbansal (Sun, 13 Jun 2021 18:34:13 GMT):
Has joined the channel.

longdoan7421 (Mon, 14 Jun 2021 13:58:17 GMT):
Has joined the channel.

toddinpal (Thu, 17 Jun 2021 15:19:30 GMT):
Can someone explain the rationale of removing the management and administrative functions from the SDK? Requiring using a CLI is a huge step backward.

ROHAN_SHROTHRIUM (Thu, 17 Jun 2021 16:31:03 GMT):
Has joined the channel.

ROHAN_SHROTHRIUM (Thu, 17 Jun 2021 16:31:03 GMT):
Hi everyone! I was wondering if the node SDK provides functionality to update the Certificate Revocation List of the peers once we revoke a certificate using the FabricCAClient?

subhasisb (Mon, 21 Jun 2021 11:40:08 GMT):
Has joined the channel.

subhasisb (Mon, 21 Jun 2021 11:40:08 GMT):
Hi everyone, I am facing the below issue in invoking private transaction from the Hyperledger Node SDK 2.2. This error occurs intermittently and is resolved whenever I try it once again. or several times unless it is successful. Error: status=500, message=make sure the chaincode asset_private has been successfully defined on channel devchannel and try again: chaincode definition for 'asset_private' exists, but chaincode is not installed I am using: Hyperledger Fabric 2.3 network with 2 peers and 3 orderers NodeSDK 2.2 Gateway based transaction mechanism If anyone has any leads here, please help me.

subhasisb (Mon, 21 Jun 2021 11:40:08 GMT):
Hi everyone, I am facing the below issue in invoking private transaction from the Hyperledger Node SDK 2.2. This error occurs intermittently and is resolved whenever I try it once again or several times unless it is successful. Error: status=500, message=make sure the chaincode asset_private has been successfully defined on channel devchannel and try again: chaincode definition for 'asset_private' exists, but chaincode is not installed I am using the below configuration: Hyperledger Fabric 2.3 network with 2 peers and 3 orderers NodeSDK 2.2 Gateway based transaction mechanism Network used: fabric-samples (https://github.com/hyperledger/fabric-samples) Contract used: asset-transfer-private-data NodeSDK used: application-javascript in asset-transfer-private-data If anyone has any leads here, please help me.

subhasisb (Mon, 21 Jun 2021 11:40:08 GMT):
Hi everyone, I am facing the below issue in invoking private transaction from the Hyperledger Node SDK 2.2. This error occurs intermittently and is resolved whenever I try it once again or several times unless it is successful. Error: status=500, message=make sure the chaincode asset_private has been successfully defined on channel devchannel and try again: chaincode definition for 'asset_private' exists, but chaincode is not installed I am using the below configuration: Hyperledger Fabric 2.3 network with 2 peers and 3 orderers NodeSDK 2.2 Gateway based transaction mechanism Network used: fabric-samples (https://github.com/hyperledger/fabric-samples) Contract used: asset-transfer-private-data NodeSDK used: application-javascript in asset-transfer-private-data Note: This is not occurring ever in executing public transaction If anyone has any leads here, please help me.

bestbeforetoday (Tue, 22 Jun 2021 09:02:04 GMT):
I answered in the #fabric-maintainers channel. At least some of the Fabric admin capability has been reimplemented on top of the v2 Node SDK in this third-party package: https://github.com/davidkhala/fabric-common/tree/master/nodejs/admin

bestbeforetoday (Tue, 22 Jun 2021 10:19:33 GMT):
That message is coming back from the peer so it doesn't obviously look like a client-side (SDK) issue. This message is mentioned in the Fabric docs: https://hyperledger-fabric.readthedocs.io/en/latest/deploy_chaincode.html#invoke-failure

bestbeforetoday (Tue, 22 Jun 2021 10:22:20 GMT):
A possibility might be that, even though you have successfully executed a `peer lifecycle chaincode commit` command to start the chaincode, maybe the chaincode start has not yet completed when you first invoke your transaction

subhasisb (Thu, 24 Jun 2021 08:29:31 GMT):
no actually this transaction is not the first transaction invoked and I have specifically invoked couple of transactions from the cli before this

bestbeforetoday (Thu, 24 Jun 2021 08:40:18 GMT):
Is the chaincode definitely running on both peers? You might see this message if the client happens to pick the peer where it is not running and then fails over to the other peer (where it is running) on subsequent evaluate requests

subhasisb (Thu, 24 Jun 2021 13:22:19 GMT):
I see. this was probably the problem. I missed it deploying the chaincode in both the peers. Let me try deploying in both the peers and revert back. I think this will work. Thanks in advance.

alicia.antony (Fri, 25 Jun 2021 10:22:40 GMT):
Has joined the channel.

subhasisb (Tue, 29 Jun 2021 09:04:35 GMT):
Hey, thanks, It worked. I had to install the chaincode in all the peers of the organization

bestbeforetoday (Tue, 29 Jun 2021 09:21:08 GMT):
Glad you got it sorted :thumbsup:

TravisPayne (Wed, 30 Jun 2021 08:57:29 GMT):
Has joined the channel.

TravisPayne (Wed, 30 Jun 2021 08:57:30 GMT):
Hi All, Quick question, I'm trying to sign a transaction offline and send it using channel.sendSignedProposal(). The docs provided @ https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-sign-transaction-offline.html detail a method where the above function takes an object of the form: `{ signedProposal: { signature: Buffer, proposalBytes: string}, targets: Peer[]}` But the typings in index.d.ts require: `{ signedProposal: Buffer, targets: Peer[]}` Is this intentional? Thanks

bestbeforetoday (Wed, 30 Jun 2021 13:27:24 GMT):
My reading of the doc page you've linked in that the proposalBytes are a Buffer, not a string. However, I think the typings (and JSDoc) actually match the implementation in this case, and the tutorial page is wrong about the method signature: https://hyperledger.github.io/fabric-sdk-node/release-1.4/Channel.html#sendSignedProposal

TravisPayne (Wed, 30 Jun 2021 13:46:14 GMT):
Ah I see, thanks for the response! Is there a working tutorial flying about anywhere?

alvaropicazo (Fri, 02 Jul 2021 08:35:45 GMT):
Has joined the channel.

mbeza (Fri, 02 Jul 2021 11:20:37 GMT):
Has joined the channel.

mbeza (Fri, 02 Jul 2021 11:23:36 GMT):
Hello everyone! I am wondering, if is it possible, to get chaincode sequence number using fabric-sdk-node? I mean I want to fetch information if chaincode was updated or not. I think, getting the sequence number is the best option. Or maybe there is another way to get information, that chaincode changed?

TravisPayne (Fri, 02 Jul 2021 15:16:18 GMT):
Is it possible to connect to a gateway via the SDK without providing a PEM/Certification for the wallet?

bestbeforetoday (Fri, 02 Jul 2021 18:06:01 GMT):
Fabric is a permissioned blockchain so you need client credentials in order to interact with Fabric nodes. So you need to have a X.509 certificate (which is included in messages sent to nodes) and the ability to sign those messages using the corresponding private key. You don't actually need to put anything in a wallet though. In your connect options you can pass an identity object directly instead of the name of an identity in a wallet: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.GatewayOptions.html

nekia (Sun, 04 Jul 2021 05:17:50 GMT):
Hi, is there any plans to fix the following vulnerability included in fabric-ca-client and fabric-common? https://snyk.io/vuln/npm:jsrsasign@8.0.24

bestbeforetoday (Mon, 05 Jul 2021 19:27:46 GMT):
It would be great to move to a version of jsrsasign that doesn’t have any reported vulnerabilities but the current SDK code will require changes to make it work with versions beyond 8.x.x. The good news is that this vulnerability affects the validation of RSA signatures, and the Node SDK does not use RSA keys or signatures

nekia (Tue, 06 Jul 2021 11:50:04 GMT):
I understand. Thank you for clarification.

amalendusuresh (Wed, 07 Jul 2021 07:52:52 GMT):
Hi All...I'm trying to regenerate the signing certificate of peers and orderers in ca, as it has expired.. How can i regenerate it... Could anyone please help me with this? Thanks in advance

TravisPayne (Fri, 09 Jul 2021 12:02:45 GMT):
Hi all, I've noticed there's a method in fabric 1.4 sdk, Channel.js that is as follows: ` isInRole(role) { if (!role) { throw new Error('Missing "role" parameter'); } else if (typeof this._roles[role] === 'undefined') { return true; } else { return this._roles[role]; } }` This seemingly returns true if the role doesn't exist on the object? If the role doesn't exist, surely it should return false, at which point a user would return setRole()?

TravisPayne (Fri, 09 Jul 2021 12:02:45 GMT):
Hi all, I've noticed there's a method in fabric 1.4 sdk, Channel.js that is as follows: ` isInRole(role) { if (!role) { throw new Error('Missing "role" parameter'); } else if (typeof this._roles[role] === 'undefined') { return true; } else { return this._roles[role]; } } ` This seemingly returns true if the role doesn't exist on the object? If the role doesn't exist, surely it should return false, at which point a user would return setRole()?

TravisPayne (Fri, 09 Jul 2021 12:02:45 GMT):
Hi all, I've noticed there's a method in fabric 1.4 sdk, Channel.js that is as follows: `isInRole(role) { if (!role) { throw new Error('Missing "role" parameter'); } else if (typeof this._roles[role] === 'undefined') { return true; } else { return this._roles[role]; } } ` This seemingly returns true if the role doesn't exist on the object? If the role doesn't exist, surely it should return false, at which point a user would return setRole()?

TravisPayne (Fri, 09 Jul 2021 12:02:45 GMT):
Hi all, I've noticed there's a method in fabric 1.4 sdk, Channel.js that is as follows: ``` isInRole(role) { if (!role) { throw new Error('Missing "role" parameter'); } else if (typeof this._roles[role] === 'undefined') { return true; } else { return this._roles[role]; } } ``` This seemingly returns true if the role doesn't exist on the object? If the role doesn't exist, surely it should return false, at which point a user would return setRole()?

davidkel (Fri, 09 Jul 2021 12:43:08 GMT):
A peer is in all roles by default. Only is you explicitly state it's not in a role (ie list the role as false) will it not be in the role. Saying that The concept of roles were dropped in node sdk 2.2 and both fabric and node-sdk 1.4 are out of lts now

davidkel (Fri, 09 Jul 2021 12:43:08 GMT):
A peer is in all roles by default. Only if you explicitly state it's not in a role (ie list the role as false) will it not be in the role. Saying that The concept of roles were dropped in node sdk 2.2 and both fabric and node-sdk 1.4 are out of lts now

davidkel (Fri, 09 Jul 2021 12:43:08 GMT):
A peer is in all roles by default. Only if you explicitly state it's not in a role (ie list the role as false) will it not be in the role. Saying that The concept of roles were dropped in node sdk 2.2 and both fabric and node-sdk 1.4 are out of LTS now

Jannoshh (Fri, 09 Jul 2021 19:36:06 GMT):
Has joined the channel.

Jannoshh (Fri, 09 Jul 2021 19:36:06 GMT):
Hello, I am trying to invoke a smart contract which is needs a long time to compute, resulting in the following error:

Jannoshh (Fri, 09 Jul 2021 19:43:45 GMT):
Hello, I'm trying to invoke a smart contract which needs a long time to execute and thus results in the error [DiscoveryEndorsementHandler]: _build_endorse_group_member >> ... - endorsement failed - Error: failed to execute transaction ... : error sending: timeout expired while executing transaction after 3 similar warnings. I've tried different ways of increasing the timeout, but to no avail. Any ideas? I'm using the node sdk with Fabric 1.4.8 and invoking the chaincode with contract.submitTransaction(...) Thank you for the help.

Jannoshh (Fri, 09 Jul 2021 19:43:45 GMT):
Hello, I'm trying to invoke a smart contract which needs a long time to execute and thus results in the error [DiscoveryEndorsementHandler]: \_build_endorse_group_member >> ... - endorsement failed - Error: failed to execute transaction ... : error sending: timeout expired while executing transaction after 3 similar warnings. I've tried different ways of increasing the timeout, but to no avail. Any ideas? I'm using the node sdk with Fabric 1.4.8 and invoking the chaincode with contract.submitTransaction(...) Thank you for the help.

Jannoshh (Fri, 09 Jul 2021 19:43:45 GMT):
Hello, I'm trying to invoke a smart contract which needs a long time to execute and thus results in the error [DiscoveryEndorsementHandler]: \__build_endorse_group_member >> ... - endorsement failed - Error: failed to execute transaction ... : error sending: timeout expired while executing transaction after 3 similar warnings. I've tried different ways of increasing the timeout, but to no avail. Any ideas? I'm using the node sdk with Fabric 1.4.8 and invoking the chaincode with contract.submitTransaction(...) Thank you for the help.

Jannoshh (Fri, 09 Jul 2021 19:43:45 GMT):
Hello, I'm trying to invoke a smart contract which needs a long time to execute and thus results in the error [DiscoveryEndorsementHandler]: build_endorse_group_member >> ... - endorsement failed - Error: failed to execute transaction ... : error sending: timeout expired while executing transaction after 3 similar warnings. I've tried different ways of increasing the timeout, but to no avail. Any ideas? I'm using the node sdk with Fabric 1.4.8 and invoking the chaincode with contract.submitTransaction(...) Thank you for the help.

amalendusuresh (Tue, 13 Jul 2021 04:21:16 GMT):
Hi All...I'm trying to regenerate the signing certificate of peers and orderers in ca, as it has expired.. How can i regenerate it... Could anyone please help me with this? Thanks in advance

jscode017 (Mon, 19 Jul 2021 07:02:33 GMT):
Has joined the channel.

jscode017 (Mon, 19 Jul 2021 07:04:56 GMT):
Hi I am building a typescript project and would want to use the blockdecoder from fabric-common. But When I import{blockDecoder} from “fabric-common} it would say that there is not exported member called blockdecoder. Could anyone help me with this please?

jscode017 (Mon, 19 Jul 2021 07:04:56 GMT):
Hi I am building a typescript project and would want to use the blockdecoder from fabric-common. But When I import{blockDecoder} from “fabric-common” it would say that there is not exported member called blockdecoder. Could anyone help me with this please?

eodahee (Wed, 21 Jul 2021 09:17:11 GMT):
Has joined the channel.

eodahee (Wed, 21 Jul 2021 09:17:12 GMT):
Hi.. I develop fabric-sdk-node v2.2.

eodahee (Wed, 21 Jul 2021 09:17:12 GMT):
Hello, I'm developing using fabric-sdk-node v2.2. It was previously updated while writing v1.4, and I found that the network.channel.queryBlock() or network.channel.queryBlockTxID() that could query the block and transaction information disappeared. I wonder if you don't provide this or if it has been updated with a different function. Please give me a lot of answers, masters!

bestbeforetoday (Wed, 21 Jul 2021 10:14:50 GMT):
It would be `BlockDecoder` with a capital B

bestbeforetoday (Wed, 21 Jul 2021 10:15:41 GMT):
Also, it looks like TypeScript definitions for BlockDecoder are missing. I'm not sure if that's because it wasn't really intended to be used externally or if they just got forgotten

bestbeforetoday (Wed, 21 Jul 2021 10:16:36 GMT):
Since BlockDecoder is exported from the package, and is included in the JSDoc, I suspect that the type definitions just didn't get written

bestbeforetoday (Wed, 21 Jul 2021 10:17:08 GMT):
You could raise a bug report in Jira: https://jira.hyperledger.org/browse/FABN

bestbeforetoday (Wed, 21 Jul 2021 10:17:40 GMT):
But an accompanying pull request with the missing type definitions would also be very welcome!

bestbeforetoday (Wed, 21 Jul 2021 13:46:41 GMT):
Look to evaluate the corresponding transaction functions on the `qscc` chaincode: https://hyperledger-fabric.readthedocs.io/en/release-2.2/smartcontract/smartcontract.html?highlight=qscc#system-chaincode

bestbeforetoday (Wed, 21 Jul 2021 13:48:01 GMT):
The implementation is here: https://github.com/hyperledger/fabric/blob/main/core/scc/qscc/query.go

bestbeforetoday (Wed, 21 Jul 2021 13:48:41 GMT):
The only tricky piece is that these transaction functions return serialized protobufs as their payload, so you need to deserialize the return value using protobuf definitions

eodahee (Thu, 22 Jul 2021 02:03:00 GMT):
Thank you so much. You've been a great help! Have a nice day today:smile:

Chem (Tue, 27 Jul 2021 05:25:11 GMT):
Has joined the channel.

Chem (Tue, 27 Jul 2021 05:29:18 GMT):
Hi Team I am trying to print the response after submit a transaction. But shows some JSON related error result = await contract.submitTransaction(....)

Chem (Tue, 27 Jul 2021 05:29:49 GMT):
Transaction executed successfully. But not able to print response

baohua (Tue, 27 Jul 2021 23:05:19 GMT):
Hi team, for the latest node sdk, do you know where i can find a full sample code on how to use it? e..g, connect to the network, and send some query command.

Takuro-Mine (Wed, 28 Jul 2021 06:11:58 GMT):
Has joined the channel.

Takuro-Mine (Wed, 28 Jul 2021 06:11:59 GMT):
Hi All, Is it possible to change the endpoints (host, port) of the peer and orderer containers that I get using fabric-sdk-node? Also, what files in "fabric-samples/test-network/" do I need to modify to change them?

prakash04 (Wed, 28 Jul 2021 08:28:32 GMT):
Has joined the channel.

prakash04 (Wed, 28 Jul 2021 08:28:33 GMT):
Hello Everyone . I am using HLF 1.4 node sdk and getting SimulateProposal Error with high input send rate. 2021-07-28 07:46:34.211 UTC [endorser] callChaincode -> INFO 98e [mychannel][cb17f6a5] Exit chaincode: name:"mycc" (500002ms) 2021-07-28 07:46:34.212 UTC [endorser] SimulateProposal -> ERRO 98f [mychannel][cb17f6a5] failed to invoke chaincode name:"mycc" , error: timeout expired while executing transaction github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1225 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:313 Can someone please help troubleshooting this timeout issue ?

pritam_01 (Wed, 28 Jul 2021 15:04:46 GMT):
Hello Everyone, I am trying to use HSM via PKCS#11 Proxy (also Vault transit secret engine) for signing the messages. To achieve that I will have to have to implement `ICryptoSuite` interface for each. ``` export interface ICryptoSuite { // ...... sign(key: ICryptoKey, digest: Buffer): Buffer; verify(key: ICryptoKey, signature: Buffer, digest: Buffer): boolean; } ``` ^ this is the CryptoSuite interface . sign and verify is a synchronous function , but to use PKCS#11 Proxy and Vault Transit engine sign and verify function will be an Asynchronous. So my question how can I implement CryptoSuit , should change the interface to implement this >> ``` export interface ICryptoSuite { sign(key: ICryptoKey, digest: Buffer): Buffer | Promise; verify(key: ICryptoKey, signature: Buffer, digest: Buffer): boolean | Promise; } ``` Or is there any better option then this ?

pritam_01 (Wed, 28 Jul 2021 15:04:46 GMT):
Hello Everyone, I am trying to use HSM via PKCS#11 Proxy (also Vault transit secret engine) for signing the messages. To achieve that I will have to have to implement `ICryptoSuite` interface for each. ``` export interface ICryptoSuite { // ...... sign(key: ICryptoKey, digest: Buffer): Buffer; verify(key: ICryptoKey, signature: Buffer, digest: Buffer): boolean; } ``` ^ this is the CryptoSuite interface . sign and verify is a synchronous function , but to use PKCS#11 Proxy and Vault Transit engine, sign and verify function will be an Asynchronous. So my question how can I implement CryptoSuit , should change I the interface to implement this >> ``` export interface ICryptoSuite { sign(key: ICryptoKey, digest: Buffer): Buffer | Promise; verify(key: ICryptoKey, signature: Buffer, digest: Buffer): boolean | Promise; } ``` Or is there any better option then this ?

pritam_01 (Wed, 28 Jul 2021 15:04:46 GMT):
Hello Everyone, I am trying to use HSM via PKCS#11 Proxy (also Vault transit secret engine) for signing the messages. To achieve that I will have to have to implement `ICryptoSuite` interface for each. ``` export interface ICryptoSuite { // ...... sign(key: ICryptoKey, digest: Buffer): Buffer; verify(key: ICryptoKey, signature: Buffer, digest: Buffer): boolean; } ``` ^ this is the CryptoSuite interface . sign and verify is a synchronous function , but to use PKCS#11 Proxy and Vault Transit engine, sign and verify function will be an Asynchronous. So my question how can I implement CryptoSuit , should change I the interface to implement this >> ``` export interface ICryptoSuite { // ...... sign(key: ICryptoKey, digest: Buffer): Buffer | Promise; verify(key: ICryptoKey, signature: Buffer, digest: Buffer): boolean | Promise; } ``` Or is there any better option then this ?

zenilvaghasiya (Wed, 28 Jul 2021 22:49:47 GMT):
Has joined the channel.

pritam_01 (Wed, 04 Aug 2021 19:26:53 GMT):
opened a PR for fabric-sdk-node, to support async signing of message https://github.com/hyperledger/fabric-sdk-node/pull/479

jworthington (Mon, 09 Aug 2021 14:56:40 GMT):
All, after several days I have been unable to get a gateway connection. sdk fabric-network 2.2.4. peers and orderer 2.2. Mutual TLS on peers and orderer. I can invoke (write or read) fine with CLI. I can remove various gateway config options (TLS, ClientAuth, etc.) and see the correct errors in the peer or orderer about bad TLS, so that seems correct and the sdk seems to be calling the peers and orderer. But discovery true and false both just timeout with no peer log messages that I can see. (In debug mode). I have connected many gateways with 2.2.4 for other networks (but not with mutual TLS). I have used the peer admin identity, new users registered and enrolled. But nothing I have tried does anything except timeout. Discovery also works fine from the CLI. gossip working fine. Any clues appreciated. What am I missing here? THX!

RonaldReagan (Tue, 10 Aug 2021 07:56:16 GMT):
Hi developers. 1. What is the best strategy to manage client connection to the Blockchain using the nodesdk? Should I create a client instance with each user connection? How will the app performance be impacted say with 100,000 active client connections. 2. How can I manage user credentials for maximum performance? I assume enrolling say a million user and using the file system wallet will impact performance due to time taken searching for user credentials in a large folder. Thanks.

pritam_01 (Thu, 12 Aug 2021 10:18:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=CcA9CUiPvbfjrGuqu) This PR has been pending for past 1 week, can some please review this?

bestbeforetoday (Fri, 13 Aug 2021 08:23:28 GMT):
Remember that the response will be a Buffer (or at least a gRPC object that looks like a Node Buffer), so you will likely need to convert it to a string with `result.toString('utf8')` before JSON parsing it

bestbeforetoday (Fri, 13 Aug 2021 08:25:00 GMT):
https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-basic might be a good place to start

akshay.sood (Tue, 24 Aug 2021 07:34:45 GMT):
Hey guys My fabric-node-sdk based application is listening for chaincode events using `network.getContract(smartContractName).addContractListener`. When I kill all the peer nodes, it prints the following logs, disconnects the event listener, and never tries ``` 2021-08-24T07:22:26.056Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Eventer- name: peer1.org1.com, url:grpcs://peer1.org1.com:7051, connected:false, connectAttempted:true 2021-08-24T07:22:26.057Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer1.org1.com url:grpcs://peer1.org1.com:7051 timeout:3000 2021-08-24T07:22:26.057Z - error: [Eventer]: ServiceEndpoint grpcs://peer1.org1.com:7051 reset connection failed :: Error: Failed to connect before the deadline on Eventer- name: peer1.org1.com, url:grpcs://peer1.org1.com:7051, connected:false, connectAttempted:true 2021-08-24T07:22:29.057Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Eventer- name: peer0.org1.com, url:grpcs://peer0.org1.com:7051, connected:false, connectAttempted:true 2021-08-24T07:22:29.058Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.org1.com url:grpcs://peer0.org1.com:7051 timeout:3000 2021-08-24T07:22:29.058Z - error: [Eventer]: ServiceEndpoint grpcs://peer0.org1.com:7051 reset connection failed :: Error: Failed to connect before the deadline on Eventer- name: peer0.org1.com, url:grpcs://peer0.org1.com:7051, connected:false, connectAttempted:true 2021-08-24T07:22:29.059Z - error: [EventService]: send[peer1.org1.com,peer0.org1.com] - #3 - no targets started - Error: Event service peer0.org1.com is not connected at EventService.send (/home/ubuntu/rest-client/node_modules/fabric-common/lib/EventService.js:368:20) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async EventServiceManager.startEventService (/home/ubuntu/rest-client/node_modules/fabric-network/lib/impl/event/eventservicemanager.js:50:9) at async BlockEventSource.startEventService (/home/ubuntu/rest-client/node_modules/fabric-network/lib/impl/event/blockeventsource.js:100:9) at async BlockEventSource.start (/home/ubuntu/rest-client/node_modules/fabric-network/lib/impl/event/blockeventsource.js:64:13) 2021-08-24T07:22:29.059Z - error: [BlockEventSource]: Failed to start event service message=Event service peer0.org1.com is not connected, stack=Error: Event service peer0.org1.com is not connected at EventService.send (/home/ubuntu/rest-client/node_modules/fabric-common/lib/EventService.js:368:20) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async EventServiceManager.startEventService (/home/ubuntu/rest-client/node_modules/fabric-network/lib/impl/event/eventservicemanager.js:50:9) at async BlockEventSource.startEventService (/home/ubuntu/rest-client/node_modules/fabric-network/lib/impl/event/blockeventsource.js:100:9) at async BlockEventSource.start (/home/ubuntu/rest-client/node_modules/fabric-network/lib/impl/event/blockeventsource.js:64:13) ``` It does not throw any error that I can catch and handle it in a way that it can keep trying to connect to peer. Is there any way to handle it? Besides this, I can also see in the logs that it try to connect to other peer `grpcs://peer1.org1.com:7051 timeout:3000` and timeout after 3000 ms. Is there anyway to increase this timeout? The application listens to a lot of events and keep the state in postgres database which is essential for the product. I have also posted this question on SO: https://stackoverflow.com/questions/68903486/chaincode-event-listener-wont-connect-again-to-peers-after-peer-nodes-killed-res

bestbeforetoday (Tue, 24 Aug 2021 10:52:59 GMT):
I've replied to the Stack Overflow post

akshay.sood (Wed, 25 Aug 2021 03:15:41 GMT):
Thanks @bestbeforetoday. I was looking for this for so long

akshay.sood (Wed, 25 Aug 2021 03:15:41 GMT):
Thanks @bestbeforetoday . I was looking for this for so long

bestbeforetoday (Wed, 25 Aug 2021 08:27:06 GMT):
Node SDK v2.2.9 has been released, which should resolve the issue with event listeners reconnecting, even if no peers are reachable for a period of time: https://github.com/hyperledger/fabric-sdk-node/releases/tag/v2.2.9

akshay.sood (Thu, 26 Aug 2021 03:06:29 GMT):
awesome @bestbeforetoday . Thank you

MarcoOliveira (Tue, 07 Sep 2021 11:24:38 GMT):
Has joined the channel.

manish-sethi (Tue, 07 Sep 2021 15:14:01 GMT):
Has joined the channel.

indirajith (Mon, 13 Sep 2021 02:20:03 GMT):
Hi all, when I try to connect to the chaincode from client application I get timeout error at client side ``` error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2, url:grpcs://peer2-org2-map:7051, connected:false, connectAttempted:true error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer2 url:grpcs://peer2-org2-map:7051 timeout:3000 info: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer2 due to Error: Failed to connect before the deadline on Endorser- name: peer2, url:grpcs://peer2-org2-map:7051, connected:false, connectAttempted:true at checkState (/home/vfilipe/Documents/Projects/fabric-samples/fabcar/javascript/node_modules/@grpc/grpc-js/build/src/client.js:69:26) at Timeout._onTimeout (/home/vfilipe/Documents/Projects/fabric-samples/fabcar/javascript/node_modules/@grpc/grpc-js/build/src/channel.js:292:17) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) { connectFailed: true } error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer, url:grpcs://ord1-org2-map:7050, connected:false, connectAttempted:true error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer url:grpcs://ord1-org2-map:7050 timeout:3000 info: [NetworkConfig]: buildOrderer - Unable to connect to the committer orderer due to Error: Failed to connect before the deadline on Committer- name: orderer, url:grpcs://ord1-org2-map:7050, connected:false, connectAttempted:true``` and the folowing error in the peer logs ```Server TLS handshake failed in 3.566890298s with error tls: first record does not look like a TLS handshake server=Orderer remoteaddress=``` I have TLS enabled and can anyone explain what might be the problem here?

vlaca (Mon, 13 Sep 2021 08:59:08 GMT):
Has joined the channel.

vlaca (Mon, 13 Sep 2021 13:26:25 GMT):
Are there any errors in the peer logs while you are trying to connect?

vlaca (Mon, 13 Sep 2021 13:33:11 GMT):
From the peer log seams you can see that the client is terminating the connection, which usually means a TLS verification issue. The issue could be the TLS field is missing in the docker-compose file of the CLI service. Try adding the following field if you are using CLI for installing and invoking the chaincode. CORE_PEER_TLS_ENABLED=true CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org.com/peers/peer0.com/tls/server.crt CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org.com/peers/peer0.com/tls/server.key CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org.com/peers/peer0.com/tls/ca.crt

indirajith (Mon, 20 Sep 2021 08:06:51 GMT):
Hi all, I am encountering a problem when trying to enroll an admin user. Getting an error of CA does not exists, but it actually exists. ``` error: [FabricCAClientService.js]: Failed to enroll mogtestadmin, error:%o message=fabric-ca request enroll failed with errors [[ { code: 19, message: "CA 'rca-org2-map.example.com' does not exist" } ]], stack=Error: fabric-ca request enroll failed with errors [[ { code: 19, message: "CA 'rca-org2-map.example.com' does not exist" } ]] at IncomingMessage. (/home/indirajith/map/app/node_modules/fabric-ca-client/lib/FabricCAClient.js:298:19) at IncomingMessage.emit (events.js:412:35) at endReadableNT (internal/streams/readable.js:1317:12) at processTicksAndRejections (internal/process/task_queues.js:82:21), result=, errors=[code=19, message=CA 'rca-org2-map.example.com' does not exist], messages=[], success=false Failed to enroll admin user : Error: fabric-ca request enroll failed with errors [[ { code: 19, message: "CA 'rca-org2-map.example.com' does not exist" } ``` Can anyone please shed some light on it?

indirajith (Mon, 20 Sep 2021 10:20:32 GMT):
Hi all, I can not send queries to the chaincode as I encounter the following problem. It seems like there is some spelling mistake somewhere. Can you guys point where I should I be looking to find it. I have checked the docker-compose files, application code, and connection profile. ``` *** FAILED to run the application: Error: error in simulation: failed to execute transaction eb5947cb39201e011af466c3322c7526339a2d532b733b41e3883ff6bfd8817c: could not launch chaincode mapchaincode_1.0:1cfe3537978a7e296c39f239ed3a8b4ca9e56a39b73d4da2119e97b015a846ca: error starting container: error starting container: API error (404): network msp_map-fab-net not found ``` But I have ``` map_map-fab-net bridge local ``` this docker noetwork on my server. What couold be the reason why the node sdk client gets 'msp_map-fab-net' instead of 'map_map-fab-net' ?

indirajith (Mon, 20 Sep 2021 10:20:32 GMT):
Hi all, I can not send queries to the chaincode as I encounter the following problem. I found the error was in docker-compose file. Now I would like to change the following environment variable ' CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE' without restarting the peer node. Is there any way it is possible? ``` *** FAILED to run the application: Error: error in simulation: failed to execute transaction eb5947cb39201e011af466c3322c7526339a2d532b733b41e3883ff6bfd8817c: could not launch chaincode mapchaincode_1.0:1cfe3537978a7e296c39f239ed3a8b4ca9e56a39b73d4da2119e97b015a846ca: error starting container: error starting container: API error (404): network msp_map-fab-net not found ```

canenas (Fri, 24 Sep 2021 22:34:34 GMT):
hi all i've got a question with regards to clientidentity. On the smart contract side, If i do ctc.clientIdentiy.getID() i'll get something that would look like : x509::{subject DN}::{issuer DN}

canenas (Fri, 24 Sep 2021 22:34:50 GMT):
how can i get the same information on the client side?

canenas (Fri, 24 Sep 2021 22:34:59 GMT):
Get that specific string?

barankilic (Sun, 26 Sep 2021 12:00:43 GMT):
I am not sure what this function exactly return, but it may help you: https://hyperledger.github.io/fabric-sdk-node/release-2.2/User.html#getIdentity

barankilic (Sun, 26 Sep 2021 12:00:43 GMT):
I am not sure what this function exactly returns, but it may help you: https://hyperledger.github.io/fabric-sdk-node/release-2.2/User.html#getIdentity

barankilic (Sun, 26 Sep 2021 12:00:43 GMT):
I am not sure what this function "getIdentity()" exactly returns, but it may help you: https://hyperledger.github.io/fabric-sdk-node/release-2.2/User.html#getIdentity

bestbeforetoday (Tue, 28 Sep 2021 08:27:10 GMT):
That just looks to be information obtained from the client X.509 certificate, and you have that certificate in your client app. Perhaps you just need to pick your NPM package of choice to parse your certificate and obtain whatever information you need

vsadriano (Wed, 29 Sep 2021 10:30:35 GMT):
Has left the channel.

zhasni (Thu, 30 Sep 2021 15:15:03 GMT):
Hi, I've got a strange error and I can find any info about it online... I'm trying to upgrade a typescript Chaincode written for HLF 1.4.X to make it run in HLF v2.X It happen when I try to test it with `fabric-mock-stub` from the ledger Here's the error : ``` tests/common/InitChaincode.ts:14:50 - error TS2345: Argument of type 'Chaincode' is not assignable to parameter of type 'ChaincodeInterface'. Types of property 'Init' are incompatible. Type '(stub: import("fabric-shim-api").ChaincodeStub) => Promise' is not assignable to type '(stub: import("fabric-shim").ChaincodeStub) => Promise'. Types of parameters 'stub' and 'stub' are incompatible. Type 'ChaincodeStub' is missing the following properties from type 'ChaincodeStub': getMspID, getDateTimestamp 14 mockStub = new ChaincodeMockStub('MyMockStub', new Chaincode()); ``` and my package.json : ``` { "name": "chaincode", "version": "2.0.0", "description": "chaincode", "engines": { "node": ">12.16.1", "npm": ">6.13.4" }, "scripts": { "build": "tsc", "start": "node dist/src/index.js", "lint": "tslint --fix -c tslint.json './src/**/*.ts'", "test": "npm run lint && mocha -r ts-node/register tests/**/*.spec.ts --reporter spec", "test:watch": "npm run lint && mocha -r ts-node/register tests/**/*.spec.ts --reporter spec --watch app/**/*.spec.ts --watch-extensions ts", "clean": "rm -rf dist" }, "engine-strict": true, "engineStrict": true, "license": "Apache-2.0", "dependencies": { "@types/long": "^4.0.0", "fabric-shim": "^2.0.0", "fast-safe-stringify": "^2.1.1", "modules": "^0.4.0", "winston": "3.2.1" }, "devDependencies": { "@theledger/fabric-mock-stub": "5.0.1", "@types/node": "14.6.2", "ts-node": "8.4.1", "typescript": "3.6.3", "tslint": "5.20.0", "@types/chai": "4.2.3", "@types/mocha": "5.2.7", "chai": "4.2.0", "mocha": "6.2.0" } } ``` tks

bestbeforetoday (Thu, 30 Sep 2021 16:04:11 GMT):
The README for _fabric-mock-stub_ doesn't mention any support for Fabric versions beyond v1.4, and the GitHub project has been archived so I guess it is no longer developed or supported: https://github.com/wearetheledger/fabric-mock-stub#version-matching

bestbeforetoday (Thu, 30 Sep 2021 16:10:27 GMT):
This project in the _fabric-samples_ repository has some examples of unit testing chaincode using Sinon to create stubs: https://github.com/hyperledger/fabric-samples/blob/98028c7da006289d0731ce162a9620cf25c80e4a/asset-transfer-basic/chaincode-javascript/test/assetTransfer.test.js

canenas (Sun, 03 Oct 2021 22:38:31 GMT):
Hi all, does anyone konw what's the max number of new simultaneous connections I can open to a fabric peer node?

canenas (Sun, 03 Oct 2021 22:38:31 GMT):
Hi all, does anyone konw what's the max number of new simultaneous connections I can open to a fabric 2.2 peer node?

canenas (Sun, 03 Oct 2021 22:43:02 GMT):
i'm using nodesdk but i expect it doesn't make a difference. i'm getting some errors like the following when trying to open too many connections: `error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser`

canenas (Sun, 03 Oct 2021 22:43:27 GMT):
Problem is i don't know how many are too many and if there is a setting for that

canenas (Sun, 03 Oct 2021 22:49:50 GMT):
To answer my own question it seems that if i increase grpc-wait-for-ready-timeout it works fine.

Param-S (Tue, 05 Oct 2021 06:07:08 GMT):
Has joined the channel.

GeorgePals (Wed, 06 Oct 2021 11:42:15 GMT):
Hey, I'm trying to implement offline signing. I can send the proposal to the endorsers, however I have a couple of questions. 1. endorsement.send() just sends the proposal to the endorsers, right? It is like the .evaluate() 2. Say that I have successfully defined the proposal bytes, signed the proposal and got it endorsed. How can I commit it? As I said, endorsement.send() just asks the endorsers to endorse and does not send the endorsed proposal to the Orderer, right? 3. When we use endorsement.send(), we can target distinct endorsers. If, for example, I target an endorser that does not exist in the CCs policy, what will happen? E.g., we have a CC with an endorsement policy (Org0 AND org1) and at endorsement.send() we specify the targets as: endorsement.send(targets: ['Org0', 'Org1', 'Org2']). Will Org2 return an error and fail the endorsement? 4. When I do `endorsed = endorsement.send()`, I get back an `Object: {errors: ServiceError[], responses: EndorsementResponse[], queryResults: Buffer[]}` While `endorsed.responses` is okay (I can see the response of every endorser), `queryResults` returns `undefined`. Any ideas why? Thanks! Edit: One more question: As I can see, if we want to commit, we need to construct a new Commit() `const commit = new Commit(contract, channel, endorsement)`, create a new proposal (?) with `commit.build(idx, build_options)` and then sign again (again?) the built object. Is this correct? So, the user needs to (offline) sign a proposal twice? Maybe I'm losing something here. BTW, I've tried to commit but I get this error: `"this.channel.getTargetCommitters is not a function"` when I `await commit.send({ targets: channel.getCommitters() });`

GeorgePals (Wed, 06 Oct 2021 11:42:15 GMT):
Hey, I'm trying to implement offline signing. I can send the proposal to the endorsers, however I have a couple of questions. 1. endorsement.send() just sends the proposal to the endorsers, right? It is like the .evaluate() 2. Say that I have successfully defined the proposal bytes, signed the proposal and got it endorsed. How can I commit it? As I said, endorsement.send() just asks the endorsers to endorse and does not send the endorsed proposal to the Orderer, right? 3. When we use endorsement.send(), we can target distinct endorsers. If, for example, I target an endorser that does not exist in the CCs policy, what will happen? E.g., we have a CC with an endorsement policy (Org0 AND org1) and at endorsement.send() we specify the targets as: endorsement.send(targets: ['Org0', 'Org1', 'Org2']). Will Org2 return an error and fail the endorsement? 4. When I do `endorsed = endorsement.send()`, I get back an `Object: {errors: ServiceError[], responses: EndorsementResponse[], queryResults: Buffer[]}` While `endorsed.responses` is okay (I can see the response of every endorser), `queryResults` returns `undefined`. Any ideas why? Thanks! Edit: One more question: As I can see, if we want to commit, we need to construct a new Commit() `const commit = new Commit(contract, channel, endorsement)`, create a new proposal (?) with `commit.build(idx, build_options)` and then sign again (again?) the built object. Is this correct? So, the user needs to (offline) sign a proposal twice? Maybe I'm losing something here. BTW, I've tried to commit but I get this error: `"this.channel.getTargetCommitters is not a function"` when I `await commit.send({ targets: channel.getCommitters() });` Solved the last error and I was able to commit with: ``` const commit = channel.newCommit(functionParams.contract); const commitProposalBytes = commit.build(idx, { endorsement }); ``` However, do the user really need to sign two times? One for endorsement, and one for commit?

GeorgePals (Wed, 06 Oct 2021 11:42:15 GMT):
Hey, I'm trying to implement offline signing. I can send the proposal to the endorsers, however I have a couple of questions. 1. endorsement.send() just sends the proposal to the endorsers, right? It is like the .evaluate() 2. Say that I have successfully defined the proposal bytes, signed the proposal and got it endorsed. How can I commit it? As I said, endorsement.send() just asks the endorsers to endorse and does not send the endorsed proposal to the Orderer, right? 3. When we use endorsement.send(), we can target distinct endorsers. If, for example, I target an endorser that does not exist in the CCs policy, what will happen? E.g., we have a CC with an endorsement policy (Org0 AND org1) and at endorsement.send() we specify the targets as: endorsement.send(targets: ['Org0', 'Org1', 'Org2']). Will Org2 return an error and fail the endorsement? 4. When I do `endorsed = endorsement.send()`, I get back an `Object: {errors: ServiceError[], responses: EndorsementResponse[], queryResults: Buffer[]}` While `endorsed.responses` is okay (I can see the response of every endorser), `queryResults` returns `undefined`. Any ideas why? Thanks! Edit: One more question: As I can see, if we want to commit, we need to construct a new Commit() `const commit = new Commit(contract, channel, endorsement)`, create a new proposal (?) with `commit.build(idx, build_options)` and then sign again (again?) the built object. Is this correct? So, the user needs to (offline) sign a proposal twice? Maybe I'm losing something here. BTW, I've tried to commit but I get this error: `"this.channel.getTargetCommitters is not a function"` when I `await commit.send({ targets: channel.getCommitters() });` Solved the last error and I was able to commit with: ``` const commit = channel.newCommit(functionParams.contract); const commitProposalBytes = commit.build(idx, { endorsement }); ``` However, do the user really need to sign twice? One for endorsement, and one for commit?

GeorgePals (Wed, 06 Oct 2021 11:42:15 GMT):
Hey, I'm trying to implement offline signing. I can send the proposal to the endorsers, however I have a couple of questions. 1. endorsement.send() just sends the proposal to the endorsers, right? It is like the .evaluate() 2. Say that I have successfully defined the proposal bytes, signed the proposal and got it endorsed. How can I commit it? As I said, endorsement.send() just asks the endorsers to endorse and does not send the endorsed proposal to the Orderer, right? 3. When we use endorsement.send(), we can target distinct endorsers. If, for example, I target an endorser that does not exist in the CCs policy, what will happen? E.g., we have a CC with an endorsement policy (Org0 AND org1) and at endorsement.send() we specify the targets as: endorsement.send(targets: ['Org0', 'Org1', 'Org2']). Will Org2 return an error and fail the endorsement? 4. When I do `endorsed = endorsement.send()`, I get back an `Object: {errors: ServiceError[], responses: EndorsementResponse[], queryResults: Buffer[]}` While `endorsed.responses` is okay (I can see the response of every endorser), `queryResults` returns `undefined`. Any ideas why? Thanks! Edit: One more question: As I can see, if we want to commit, we need to construct a new Commit() `const commit = new Commit(contract, channel, endorsement)`, create a new proposal (?) with `commit.build(idx, build_options)` and then sign again (again?) the built object. Is this correct? So, the user needs to (offline) sign a proposal twice? Maybe I'm losing something here. BTW, I've tried to commit but I get this error: `"this.channel.getTargetCommitters is not a function"` when I `await commit.send({ targets: channel.getCommitters() });` Solved the last error and I was able to commit with: ``` const commit = channel.newCommit(functionParams.contract); const commitProposalBytes = commit.build(idx, { endorsement }); ``` However, does the user really need to sign twice? One for endorsement, and one for commit?

GeorgePals (Wed, 06 Oct 2021 11:42:15 GMT):
Hey, I'm trying to implement offline signing. I can send the proposal to the endorsers, however I have a couple of questions. 1. endorsement.send() just sends the proposal to the endorsers, right? It is like the .evaluate() 2. Say that I have successfully defined the proposal bytes, signed the proposal and got it endorsed. How can I commit it? As I said, endorsement.send() just asks the endorsers to endorse and does not send the endorsed proposal to the Orderer, right? 3. When we use endorsement.send(), we can target distinct endorsers. If, for example, I target an endorser that does not exist in the CCs policy, what will happen? E.g., we have a CC with an endorsement policy (Org0 AND org1) and at endorsement.send() we specify the targets as: endorsement.send(targets: ['Org0', 'Org1', 'Org2']). Will Org2 return an error and fail the endorsement? 4. When I do `endorsed = endorsement.send()`, I get back an `Object: {errors: ServiceError[], responses: EndorsementResponse[], queryResults: Buffer[]}` While `endorsed.responses` is okay (I can see the response of every endorser), `queryResults` returns `undefined`. Any ideas why? Thanks! Edit: One more question: As I can see, if we want to commit, we need to construct a new Commit() `const commit = new Commit(contract, channel, endorsement)`, create a new proposal (?) with `commit.build(idx, build_options)` and then sign again (again?) the built object. Is this correct? So, the user needs to (offline) sign a proposal twice? Maybe I'm losing something here. BTW, I've tried to commit but I get this error: `"this.channel.getTargetCommitters is not a function"` when I `await commit.send({ targets: channel.getCommitters() });` Edit 2: Solved the last error and I was able to commit with: ``` const commit = channel.newCommit(functionParams.contract); const commitProposalBytes = commit.build(idx, { endorsement }); ``` However, does the user really need to sign twice? One for endorsement, and one for commit?

GeorgePals (Wed, 06 Oct 2021 11:42:15 GMT):
Hey, I'm trying to implement offline signing. I can send the proposal to the endorsers, however I have a couple of questions. 1. endorsement.send() just sends the proposal to the endorsers, right? It is like the .evaluate() 2. Say that I have successfully defined the proposal bytes, signed the proposal and got it endorsed. How can I commit it? As I said, endorsement.send() just asks the endorsers to endorse and does not send the endorsed proposal to the Orderer, right? 3. When we use endorsement.send(), we can target distinct endorsers. If, for example, I target an endorser that does not exist in the CCs policy, what will happen? E.g., we have a CC with an endorsement policy (Org0 AND org1) and at endorsement.send() we specify the targets as: endorsement.send(targets: ['Org0', 'Org1', 'Org2']). Will Org2 return an error and fail the endorsement? 4. When I do `endorsed = endorsement.send()`, I get back an `Object: {errors: ServiceError[], responses: EndorsementResponse[], queryResults: Buffer[]}` While `endorsed.responses` is okay (I can see the response of every endorser), `queryResults` returns `undefined`. Any ideas why? Thanks! Edit: One more question: As I can see, if we want to commit, we need to construct a new Commit() `const commit = new Commit(contract, channel, endorsement)`, create a new proposal (?) with `commit.build(idx, build_options)` and then sign again (again?) the built object. Is this correct? So, the user needs to (offline) sign a proposal twice? Maybe I'm losing something here. BTW, I've tried to commit but I get this error: `"this.channel.getTargetCommitters is not a function"` when I `await commit.send({ targets: channel.getCommitters() });` Edit 2: Solved the last error and I was able to commit with: ``` const commit = channel.newCommit(contractName); const commitProposalBytes = commit.build(idx, { endorsement }); ``` However, does the user really need to sign twice? One for endorsement, and one for commit?

GeorgePals (Wed, 06 Oct 2021 11:42:15 GMT):
Hey, I'm trying to implement offline signing. I can send the proposal to the endorsers, however I have a couple of questions. 1. endorsement.send() just sends the proposal to the endorsers, right? It is like the .evaluate() 2. Say that I have successfully defined the proposal bytes, signed the proposal and got it endorsed. How can I commit it? As I said, endorsement.send() just asks the endorsers to endorse and does not send the endorsed proposal to the Orderer, right? 3. When we use endorsement.send(), we can target distinct endorsers. If, for example, I target an endorser that does not exist in the CCs policy, what will happen? E.g., we have a CC with an endorsement policy (Org0 AND org1) and at endorsement.send() we specify the targets as: endorsement.send(targets: ['Org0', 'Org1', 'Org2']). Will Org2 return an error and fail the endorsement? 4. When I do `endorsed = endorsement.send()`, I get back an `Object: {errors: ServiceError[], responses: EndorsementResponse[], queryResults: Buffer[]}` While `endorsed.responses` is okay (I can see the response of every endorser), `queryResults` returns `undefined`. Any ideas why? Thanks! Edit: One more question: As I can see, if we want to commit, we need to construct a new Commit() `const commit = new Commit(contract, channel, endorsement)`, create a new proposal (?) with `commit.build(idx, build_options)` and then sign again (again?) the built object. Is this correct? So, the user needs to (offline) sign a proposal twice? Maybe I'm losing something here. BTW, I've tried to commit but I get this error: `"this.channel.getTargetCommitters is not a function"` when I `await commit.send({ targets: channel.getCommitters() });` Edit 2: Solved the last error and I was able to commit with: ``` const commit = channel.newCommit(contractName); const commitProposalBytes = commit.build(idx, { endorsement }); ``` However, does the user really need to sign twice? One for endorsement, and one to commit?

bestbeforetoday (Wed, 06 Oct 2021 19:33:21 GMT):
More than one signature is required as part of the transaction submit flow. The proposal sent to endorsing peers needs to be signed, and the transaction envelope submitted to the orderer also needs to be signed

Rajatsharma (Wed, 06 Oct 2021 19:46:04 GMT):
Hey all, I've cloned the fabric-sdk-node repository, and I'm running `npm test` on my local machine. I'm receiving this error: ``` sh: line 1: 24661 Segmentation fault nyc --check-coverage --statements 54 --branches 32 --functions 46 --lines 54 npm run test:ts-cucumber ``` Can anyone help with this?

Rajatsharma (Wed, 06 Oct 2021 19:46:04 GMT):
Hey all, I've cloned the fabric-sdk-node repository, and I'm running `npm test` on my local machine. I'm receiving this error: ``` Will create HSM Identity User2@Org1 ----------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- All files | 0 | 0 | 0 | 0 | ----------|---------|----------|---------|---------|------------------- sh: line 1: 24661 Segmentation fault nyc --check-coverage --statements 54 --branches 32 --functions 46 --lines 54 npm run test:t s-cucumber ``` Can anyone help with this?

bestbeforetoday (Wed, 06 Oct 2021 20:16:07 GMT):
If it's failing in HSM tests it might be some version of platform compatibility issue with SoftHSM on your machine. If you need to run the scenario tests locally then you could use the `test:ts-cucumberNoHSM` npm script to exclude the HSM tests. Have a look at the top-level package.json to see how all the different tests are driven by `npm test`

bestbeforetoday (Wed, 06 Oct 2021 20:18:07 GMT):
I would probably lean towards just running the unit tests (and linting) locally as a matter of course. Then run scenario tests just when required, or even leave the PR build process to run them if you're submitting a PR and aren't making changes likely to impact the scenario tests

Rajatsharma (Wed, 06 Oct 2021 20:25:27 GMT):
I'm trying to submit a PR, for which the unit test cases are working fine. I'm getting issues in the HSM part only. So When I was trying to replicate the same on my dev machine, I'm getting this. I looked the documentation up - https://github.com/hyperledger/fabric-sdk-node/tree/7b49442189278db990046f796a278b0ceea1b0c2/test. When I'm running ``` softhsm2-util --init-token --slot 0 --label "ForFabric" --pin 98765432 --so-pin 1234 ``` The slot is not generated on 0, but I'm getting this - ``` Available slots: Slot 166564309 Slot info: Description: SoftHSM slot ID 0x9ed91d5 Manufacturer ID: SoftHSM project Hardware version: 2.2 Firmware version: 2.2 Token present: yes Token info: Manufacturer ID: SoftHSM project Model: SoftHSM v2 Hardware version: 2.2 Firmware version: 2.2 Serial number: a2b93b3509ed91d5 Initialized: yes User PIN init.: yes Label: ForFabric ``` As per the documentation, I've exported `PKCS11_SLOT=166564309` and `PKCS11_PIN="98765432"`, still this is not working fine.

Rajatsharma (Wed, 06 Oct 2021 21:01:55 GMT):
@bestbeforetoday, is there a way to run the azure pipeline using our code if I'm not able to resolve this issue.

bestbeforetoday (Thu, 07 Oct 2021 09:17:02 GMT):
You should be able to set up Azure Pipelines to run against your fork using the `azure-pipelines.yml` build definition in the root directory of the repository

bestbeforetoday (Thu, 07 Oct 2021 09:17:39 GMT):
Or you could raise a draft PR against the _fabric-sdk-node_ repository and Azure pipelines will build the contents of that PR

bestbeforetoday (Thu, 07 Oct 2021 09:18:46 GMT):
Probably best only to use the PR option if you're actually going to submit a change to the main repo, to avoid confusion

GeorgePals (Thu, 07 Oct 2021 09:29:39 GMT):
Thank you once again @bestbeforetoday I'll post a new question regarding my needs, as I'm a bit lost and need some guidance.

GeorgePals (Thu, 07 Oct 2021 09:30:38 GMT):
Right now, in order to connect with the HF's nodes, there is a backend which: - receives requests from clients that want to submit something to HF - implements a `queue` mechanism, to avoid a large number of concurrent users submitting to the HF The current issue is that this backend **can not be trusted**. Thus, the only thing that the backend should, actually, do is to just forward the signed proposal/transaction envelope to the endorsing peers/orderers. However, this is not feasible. E.g. 1. The proposal is constructed at the backend and is then forwarded back to the clients 2. Client receives the proposal, signs it and sends it back to the backend 3. Backend receives the signed proposal and forwards it to the blockchain The very first step is where the main security issue comes from. I don't want the backend to construct the proposal. I need the client to do it. Also, if the client wanted to commit the endorsements to an orderer, the steps above needs to be repeated. Very tedious procedure. All of the above issues, even the need for a `queue` system (if I'm not mistaken), are solved through the new Fabric Gateway. So, 1. Is there any way for the proposal/transaction envelope to be created and signed by the clients themselves and let the backend just forward the requests to the HF? 2. Is it safe to use the new Fabric Gateway, that is found at the 2.4-beta? Is it functional enough to cover my needs? Do we know how much it will take for the new Gateway feature to actually reach "release/production ready level"? Any suggestions or ideas will be much appreciated.

bestbeforetoday (Thu, 07 Oct 2021 09:39:19 GMT):
One thing to consider with off-line signing... to my mind it's only really required if you don't have access to the signing credentials where your client application is running. If you do have the signing credentials, you're much better off either giving the private key to the client SDK so it can do the signing for you, or provide your own CryptoSuite implementation that the SDK can use to do the signing if you don't want the client-side SDK code to be able to see your credentials (although the code is open source so you can see it's not doing anything malicious)

bestbeforetoday (Thu, 07 Oct 2021 09:40:24 GMT):
If you need to send the digest somewhere else for signing, you might need to consider off-line signing. Although you could still provide a CryptoSuite implementation that calls remotely to get the signing done, as the HSM support does

bestbeforetoday (Thu, 07 Oct 2021 09:41:57 GMT):
The key use case for off-line signing is if your client application is actually an intermediary, like a REST server, and the signing credentials are only held by a remote client that is invoking you. Then you need to return data to that remote client for them to sign before passing back to you so you can send the signed messages to Fabric

bestbeforetoday (Thu, 07 Oct 2021 09:47:37 GMT):
There's a description of the flow and example of how it's implemented in the *fabric-gateway* API (currently in development) here, which might make it clearer: https://hyperledger.github.io/fabric-gateway/main/api/node/interfaces/Contract.html

GeorgePals (Thu, 07 Oct 2021 09:52:21 GMT):
My main issue is that the "intermediary" that does the communication with the HF, can not be trusted. I've written a more detailed post here: https://chat.hyperledger.org/channel/fabric-questions?msg=rbcCExtAaFQY49RWw What I'd really like is to have the client to directly communicate with the HF, however this can not be achieved for many reasons. One of them being that every client should have a dedicated gateway to them, which is something that bottlenecks the whole HF infrastructure. The new Gateway implementation seems to actually solve all of my issues, however I don't really know the state of its development.

bestbeforetoday (Thu, 07 Oct 2021 09:58:52 GMT):
It's an interesting use case, for sure! When looking at the off-line signing flow, the use-case I was trying to address with *fabric-gateway* is where the client (quite reasonably) doesn't trust the intermediary with their signing credentials, but they do trust the intermediary to build proposals and send them on request

bestbeforetoday (Thu, 07 Oct 2021 10:00:35 GMT):
Using the flow in the examples, you could have the intermediary send back the proposal bytes it's constructed so you can inspect them before signing, but that sounds like hard work

bestbeforetoday (Thu, 07 Oct 2021 10:03:09 GMT):
I hadn't really considered it before, but you could have the client create and sign the proposal itself, then forward to the intermediary, where they just send it on to Fabric

bestbeforetoday (Thu, 07 Oct 2021 10:05:22 GMT):
There's still the issue of the endorsed transaction coming back from the intermediary for you to sign. The proposal is signed by you and the endorsements are signed by the endorsing peers, so they should be safe from tampering, but you might want to check they are as expected if you don't trust the intermediary not to try to manufacture and endorse their own proposal to send back to you

bestbeforetoday (Thu, 07 Oct 2021 10:10:06 GMT):
Fabric Gateway is not yet complete, and I wouldn't want to commit to a date, but I'm expecting to get an initial release out before end of the year. It might be worth some experimentation to see if it does solve problems for you, particularly as we've still got some scope to respond to user feedback

bestbeforetoday (Thu, 07 Oct 2021 10:12:05 GMT):
For a first release the functionality will be limited to evaluate and submit of transaction (including checking commit status) and chaincode event listening. So if you need more capability than that, you're looking further out and dependent on development priority for Fabric Gateway to be a complete solution for you

GeorgePals (Thu, 07 Oct 2021 10:12:36 GMT):
So, Fabric Gateway is actually okay to work with. If the user can actually directly communicate with the HF, without the need of an intermediary, then it seems to solve my issues. The only issue that I'm not sure if it is solved, is with what happens if, for example, 5.000 clients try to communicate with the HF. Will Fabric Gateway handle all these concurrent requests?

GeorgePals (Thu, 07 Oct 2021 10:12:36 GMT):
So, Fabric Gateway is actually okay to work with. If the user can actually directly communicate with the HF, without the need of an intermediary, then it seems that my main issue gets solved. The only issue that I'm not sure if it is solved, is with what happens if, for example, 5.000 clients try to communicate with the HF. Will Fabric Gateway handle all these concurrent requests?

bestbeforetoday (Thu, 07 Oct 2021 10:15:17 GMT):
Good question, and it's not something I've tried. It's still using gRPC for communication between client and Gateway, so any gRPC limitations for your environment will apply. The Gateway peer then talks gRPC to other Fabric nodes as required, similar to the way clients today talk directly to any/all Fabric nodes to get endorsement. Fabric Gateway does prefer to target the local peer where possible though, which is done in-process and not with a network call

bestbeforetoday (Thu, 07 Oct 2021 10:17:27 GMT):
So I guess the thing to test is how many concurrent clients you can drive against a Fabric Gateway peer in your environment. The Gateway Peer is then a bit like a single client hitting other Nodes. Just one that's routing requests from potentially many remote clients. So there should be few conenctions from Gateway peer to other nodes, but high volume of requests on those connections

GeorgePals (Thu, 07 Oct 2021 10:22:59 GMT):
Exactly, the only issue now is how good the Fabric Gateway can handle all these concurrent (external) connections. However, the much bigger issue of having trust to the infrastructure, seems to get solved with the use of the Fabric Gateway. I'm so thankful for the time that you contributed to answer my issue @bestbeforetoday I'll think a bit more of my issue, maybe test Fabric Gateway as well and will give you any feedback I may have.

GeorgePals (Thu, 07 Oct 2021 10:22:59 GMT):
Exactly, the only issue now is how good the Fabric Gateway can handle all these concurrent (external) connections. However, the much bigger issue of having trust to the infrastructure, seems to get solved with the use of the Fabric Gateway. I'm so thankful for the time that you contributed answering my issues @bestbeforetoday I'll think a bit more of my issue, maybe test Fabric Gateway as well and will give you any feedback I may have.

GeorgePals (Thu, 07 Oct 2021 10:32:52 GMT):
Just a random thought. If I could have an external queueing system that would manage the concurrent requests to the Gateway Fabric, then the issue would be solved. However, this seems extremely difficult, if not infeasible, to achieve, as this suggests that there is total trust to the clients.

GeorgePals (Thu, 07 Oct 2021 10:32:52 GMT):
Just a random thought. If I could have an external queueing system that would manage the concurrent requests to the Fabric Gateway, then the issue would be solved. However, this seems extremely difficult, if not infeasible, to achieve, as this suggests that there is total trust to the clients.

bestbeforetoday (Thu, 07 Oct 2021 11:17:47 GMT):
Well the messages (proposal, endorsement, transaction) are all signed so, as long as you check the signatures are from who you expect and are valid, you can check no tampering has taken place. Perhaps your level of trust of the intermediary might depend on who owns it though. If it's the same org that owns the Fabric nodes you are using to transact, maybe you can trust it. Or if it's owned by the same organisation that owns the set of clients it is servicing, maybe those clients can trust it implicitly

bestbeforetoday (Thu, 07 Oct 2021 11:21:45 GMT):
On the number of connections, where your clients actually are might be a consideration. If every client is at a different location / org, they are going to need their own connection. If a set of client identities are transacting from a single location (application client), Fabric Gateway can help since multiple identities can easily transact using a single shared gRPC connection. The existing Node SDK has a stronger tie between gRPC connections and identities, so tends to require a gRPC connection per identity

GeorgePals (Thu, 07 Oct 2021 11:56:16 GMT):
Okay, the signatures can be checked. However, is there any way to check the arguments that were sent to the HF? Suppose that a client, `clientX`, wants to invoke a function of a `chaincodeA`. Right now, `clientX` will communicate with the intermediary and will tell it to invoke `functionA` of `chaincodeA` with payload `(x, y, z)`. The best that we can do to make sure that the intermediary did not fake the invoker, is to let the invoker sign the request himself (`sign(hash(proposalBytes))`). However, how can the invoker, `clientX`, make sure that the payload that is defined at the proposal wasn't tampered from, e.g. `(x,y,z)` to `(2x, 7y, z)`? This is the reason that I'd like the invoker himself to construct the proposal and sign it at the same time. This way, the intermediary would only just forward the already-signed proposal and then return the response back to the client. As for the number of connections, I was thinking of a System without an intermediary. Imagine a frontend or something that `clientX` can access and have a direct communication with HF. This way: + There is no intermediary + The client talks directly with Fabric and authenticates himself much more easier but - Too many concurrent users could bring the Fabric Gateway down All in all, it is a very interesting issue. However, it seems difficult to find an appropriate solution.

GeorgePals (Thu, 07 Oct 2021 11:56:16 GMT):
Okay, the signatures can be checked. However, is there any way to check the arguments that were sent to the HF? Suppose that a client, `clientX`, wants to invoke a function of `chaincodeA`. Right now, `clientX` will communicate with the intermediary and will tell it to invoke `functionA` of `chaincodeA` with payload `(x, y, z)`. The best that we can do to make sure that the intermediary did not fake the invoker, is to let the invoker sign the request himself (`sign(hash(proposalBytes))`). However, how can the invoker, `clientX`, make sure that the payload that is defined at the proposal wasn't tampered from, e.g. `(x,y,z)` to `(2x, 7y, z)`? This is the reason that I'd like the invoker himself to construct the proposal and sign it at the same time. This way, the intermediary would only just forward the already-signed proposal and then return the response back to the client. As for the number of connections, I was thinking of a System without an intermediary. Imagine a frontend or something that `clientX` can access and have a direct communication with HF. This way: + There is no intermediary + The client talks directly with Fabric and authenticates himself much more easier but - Too many concurrent users could bring the Fabric Gateway down All in all, it is a very interesting issue. However, it seems difficult to find an appropriate solution.

bestbeforetoday (Thu, 07 Oct 2021 12:04:55 GMT):
Having the invoker construct the proposal definitely makes it easier. You might still want to check when signing the transaction envelope that the correct proposal is included

bestbeforetoday (Thu, 07 Oct 2021 12:05:45 GMT):
All the messages are protobufs so can be deserialized and inspected

bestbeforetoday (Thu, 07 Oct 2021 12:06:19 GMT):
If you really want to you can deserialize the transaction and check the actual read/write sets that will be applied to the ledger

GeorgePals (Thu, 07 Oct 2021 12:07:49 GMT):
Exactly. However, isn't the channel configuration needed in order to construct a proposal? As I earlier said, now I construct a proposal with: `channel.newEndorsement(contract)`. How can I construct a new proposal Object without any other info? I hope that it's clear what I'm telling above.

GeorgePals (Thu, 07 Oct 2021 12:07:49 GMT):
Exactly. However, isn't the channel configuration needed in order to construct a proposal? As I earlier said, now I construct a proposal with: `channel.newEndorsement(contract)`. How can I construct a new proposal Object without any other info and then pass it to the intermediary? I hope that it's clear what I'm telling above.

GeorgePals (Thu, 07 Oct 2021 12:07:49 GMT):
Exactly. However, isn't the channel configuration needed in order to construct a proposal? As I earlier said, now I construct a proposal with: `channel.newEndorsement(contract)`. How can I construct a new proposal Object without any other info and then pass it to the intermediary? I hope that it's clear what I'm saying.

bestbeforetoday (Thu, 07 Oct 2021 12:08:28 GMT):
One more thought on connections... with Fabric Gateway, and (or all) peers can act as Gateway peers. You can sit a load balancer or ingress controller between the client and peers that balances client connections a pool of Gateway peers. So you can add more peers to help scale to higher client connection load

bestbeforetoday (Thu, 07 Oct 2021 12:17:37 GMT):
The Node SDK API does tie all the different elements to it's channel representation, but I think it should be possible to create a Channel with minimal configuration. However, if all you want to do is create a signed proposal protobuf message to send somewhere else, that might be overcomplicating things

bestbeforetoday (Thu, 07 Oct 2021 12:18:12 GMT):
The Fabric Gateway client API builds proposals much more simply: https://github.com/hyperledger/fabric-gateway/blob/c70885ed0d740aa7b24508ee028f478dff037450/node/src/proposalbuilder.ts#L75

bestbeforetoday (Thu, 07 Oct 2021 12:19:33 GMT):
The Proposal in Fabric Gateway actually encapsulates a ProposedTransaction protobuf message, which is a wrapper around a SignedProposal

bestbeforetoday (Thu, 07 Oct 2021 12:20:57 GMT):
You can extract the SignedProposal from the Fabric Gateway ProposedTransaction message. Or you can create them directly yourself using generated protobuf implementation classes

bestbeforetoday (Thu, 07 Oct 2021 12:21:44 GMT):
The Fabric protobuf definitions are all located at: https://github.com/hyperledger/fabric-protos

bestbeforetoday (Thu, 07 Oct 2021 12:22:46 GMT):
The client APIs are all designed to make working with easier, but you can work right down at the protobuf and gRPC level if you really need to

bestbeforetoday (Thu, 07 Oct 2021 12:26:13 GMT):
The fabric-protos NPM package has the generated protobuf stubs used by the Node SDK: https://www.npmjs.com/package/fabric-protos

GeorgePals (Thu, 07 Oct 2021 12:26:22 GMT):
So, if I have understood correctly, you're telling me to use Fabric-Gateway at my client, construct the proposal and then send it to the intermediary? Then the intermediary can use the Fabric-Gateway as well, take the already constructed proposal and forward it to the HF?

GeorgePals (Thu, 07 Oct 2021 12:26:47 GMT):
Is this feasible?

bestbeforetoday (Thu, 07 Oct 2021 12:26:48 GMT):
Note that they are generated using a different protobuf compiler to the one currently used in the Fabric Gateway client though, so the API provided by them is a little different

bestbeforetoday (Thu, 07 Oct 2021 12:27:27 GMT):
I wouldn't say I'm telling you to do that! :)

bestbeforetoday (Thu, 07 Oct 2021 12:27:47 GMT):
But it's one possible option open to you

GeorgePals (Thu, 07 Oct 2021 12:28:16 GMT):
Yup, that's what I meant. It seems like a good option :thinking:

bestbeforetoday (Thu, 07 Oct 2021 12:30:17 GMT):
It's essentially the "off-line signing" flow I've documented, but instead of the (trusted) intermediary creating the proposal on your behalf, returning it to you for signing and then your client sending the proposal and signature back, your client could just create the proposal itself, then send the proposal and signature to the intermediary

GeorgePals (Thu, 07 Oct 2021 12:30:36 GMT):
Yup, exactly.

bestbeforetoday (Thu, 07 Oct 2021 12:31:44 GMT):
Although if you can scale to the required number of connections and not have to worry about the intermediary at all, your life might be simpler

GeorgePals (Thu, 07 Oct 2021 12:34:45 GMT):
So, my 2 main options are: 1. Everything stays as-is. The only thing that changes is that I need to use the Fabric-Gateway at the client and the intermediary and use the 2.4 version of the HF peers in order to be able to expose a Gateway at the peer 2. Get rid of the intermediary and have the client directly communicating with the HF. In front of the peers will be an ingress controller or something that helps with the concurrent connections.

mauricio (Fri, 08 Oct 2021 14:43:28 GMT):
Hi, actually 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. Thanks in advance

mauricio (Fri, 08 Oct 2021 14:43:28 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.

DevendranM (Sat, 09 Oct 2021 16:08:35 GMT):
Has joined the channel.

canenas (Wed, 13 Oct 2021 13:35:23 GMT):
Hi all I've got a question on connectivity from the client. After I do gateway.disconnect(), all connections should be severed and the memory freed both on the client and the peers I was connected right? I'm on Fabric 2.2 with "fabric-ca-client": "^2.2.0" & "fabric-network": "^2.2.0",

bestbeforetoday (Wed, 13 Oct 2021 15:05:03 GMT):
All the connections and resources at the client end created by that Gateway instance should get cleaned up, yes. I would expect the peers to reclaim resources associated with that client's connection too, once it observes the client connections closing. Although this may not reduce the memory use as the runtimes (Node and Go) might retain allocated memory

bestbeforetoday (Wed, 13 Oct 2021 15:05:08 GMT):
The CA client will likely have a separate set of resources and connections

akshay.sood (Thu, 14 Oct 2021 11:06:59 GMT):
Hey guys I am trying the Key-based endorsement policy on Hyperledger fabric v2.3.3. My chaincode endorsement policy is `"OR('org1.peer','org2.peer','org3.peer','org4.peer')"` and for a very specific key, the endorsement policy is `"AND('org1.peer','org2.peer')"`. When a transaction is submitted very first time, it works fine because at that time chaincode endorsement policy works, but when I try to update the same key, it does not work. The node fabric-sdk sends the endorsement request to only 1 org i.e org1 (invoker) and the peer rejects the block and throws "Endorsement Policy Failure". When I verified the block, I saw that the transaction was endorsed by only `org1` not by both `org1` and `org2`. Seems like the fabric-sdk does not sends the transaction to the other org. However, if I change my chaincode-endorsement policy to `"AND('org1.peer','org2.peer','org3.peer','org4.peer')"`, everything works fine because the fabric-sdk is sending the transaction to every org's peer for endorsement. The official document says ``` In practice, this means that the key-level endorsement policy can be either less restrictive or more restrictive than the chaincode-level or collection-level endorsement policies. ``` but from the above scenario, it seems like it can only be less-restrictive. fabric-sdk logs: ``` 2021-10-14T11:05:24.491Z - warn: [TransactionEventHandler]: strategyFail: commit failure for transaction "b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e": TransactionError: Commit of transaction b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e failed on peer peer1.org1.com:7051 with status ENDORSEMENT_POLICY_FAILURE 2021-10-14T11:05:24.491Z - warn: [TransactionEventHandler]: strategyFail: commit failure for transaction "b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e": TransactionError: Commit of transaction b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e failed on peer peer1.org1.com:7051 with status ENDORSEMENT_POLICY_FAILURE ```

akshay.sood (Thu, 14 Oct 2021 11:06:59 GMT):
Hey guys I am trying the Key-based endorsement policy on Hyperledger fabric v2.3.3. My chaincode endorsement policy is `"OR('org1.peer','org2.peer','org3.peer','org4.peer')"` and for a very specific key, the endorsement policy is `"AND('org1.peer','org2.peer')"`. When a transaction is submitted very first time, it works fine because at that time chaincode endorsement policy works, but when I try to update the same key, it does not work. The node fabric-sdk sends the endorsement request to only 1 org i.e org1 (invoker) and the peer rejects the block and throws "Endorsement Policy Failure". When I verified the block, I saw that the transaction was endorsed by only `org1` not by both `org1` and `org2`. Seems like the fabric-sdk does not sends the transaction to the other org. However, if I change my chaincode-endorsement policy to `"AND('org1.peer','org2.peer','org3.peer','org4.peer')"`, everything works fine because the fabric-sdk is sending the transaction to every org's peer for endorsement. The official document says ``` In practice, this means that the key-level endorsement policy can be either less restrictive or more restrictive than the chaincode-level or collection-level endorsement policies. ``` but from the above scenario, it seems like it can only be less-restrictive. Peer logs: ``` 2021-10-14 11:05:24.443 UTC [gossip.privdata] StoreBlock -> INFO 36d Received block [207] from buffer channel=assetschannel 2021-10-14 11:05:24.450 UTC [vscc] Validate -> ERRO 36e VSCC error: stateBasedValidator.Validate failed, err validation of key PUB-TEST-6 (coll'':ns'assets') in tx 207:0 failed: signature set did not satisfy policy 2021-10-14 11:05:24.454 UTC [committer.txvalidator] validateTx -> ERRO 36f Dispatch for transaction txId = b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e returned error: validation of key PUB-TEST-6 (coll'':ns'assets') in tx 207:0 failed: signature set did not satisfy policy 2021-10-14 11:05:24.454 UTC [committer.txvalidator] Validate -> INFO 370 [assetschannel] Validated block [207] in 5ms 2021-10-14 11:05:24.459 UTC [validation] preprocessProtoBlock -> WARN 371 Channel [assetschannel]: Block [207] Transaction index [0] TxId [b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2021-10-14 11:05:24.495 UTC [kvledger] commit -> INFO 372 [assetschannel] Committed block [207] with 1 transaction(s) in 36ms (state_validation=0ms block_and_pvtdata_commit=6ms state_commit=29ms) commitHash=[35570558fc04d3dfa400f053f2a0f9bed92ea227c894ae4536990627a5a19036] ``` fabric-sdk logs: ``` 2021-10-14T11:05:24.491Z - warn: [TransactionEventHandler]: strategyFail: commit failure for transaction "b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e": TransactionError: Commit of transaction b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e failed on peer peer1.org1.com:7051 with status ENDORSEMENT_POLICY_FAILURE 2021-10-14T11:05:24.491Z - warn: [TransactionEventHandler]: strategyFail: commit failure for transaction "b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e": TransactionError: Commit of transaction b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e failed on peer peer1.org1.com:7051 with status ENDORSEMENT_POLICY_FAILURE ```

akshay.sood (Thu, 14 Oct 2021 11:06:59 GMT):
Hey guys I am trying the Key-based endorsement policy on Hyperledger fabric v2.3.3. My chaincode endorsement policy is `"OR('org1.peer','org2.peer','org3.peer','org4.peer')"` and for a very specific key, the endorsement policy is `"AND('org1.peer','org2.peer')"`. When a transaction is submitted very first time, it works fine because at that time chaincode endorsement policy works, but when I try to update the same key, it does not work. The node fabric-sdk sends the endorsement request to only 1 org i.e org1 (invoker) and the peer rejects the block and throws "Endorsement Policy Failure". When I verified the block, I saw that the transaction was endorsed by only `org1` not by both `org1` and `org2`. Seems like the fabric-sdk did not send the transaction to the other org. However, if I change my chaincode-endorsement policy to `"AND('org1.peer','org2.peer','org3.peer','org4.peer')"`, everything works fine because the fabric-sdk is sending the transaction to every org's peer for endorsement. The official document says ``` In practice, this means that the key-level endorsement policy can be either less restrictive or more restrictive than the chaincode-level or collection-level endorsement policies. ``` but from the above scenario, it seems like it can only be less-restrictive. Peer logs: ``` 2021-10-14 11:05:24.443 UTC [gossip.privdata] StoreBlock -> INFO 36d Received block [207] from buffer channel=assetschannel 2021-10-14 11:05:24.450 UTC [vscc] Validate -> ERRO 36e VSCC error: stateBasedValidator.Validate failed, err validation of key PUB-TEST-6 (coll'':ns'assets') in tx 207:0 failed: signature set did not satisfy policy 2021-10-14 11:05:24.454 UTC [committer.txvalidator] validateTx -> ERRO 36f Dispatch for transaction txId = b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e returned error: validation of key PUB-TEST-6 (coll'':ns'assets') in tx 207:0 failed: signature set did not satisfy policy 2021-10-14 11:05:24.454 UTC [committer.txvalidator] Validate -> INFO 370 [assetschannel] Validated block [207] in 5ms 2021-10-14 11:05:24.459 UTC [validation] preprocessProtoBlock -> WARN 371 Channel [assetschannel]: Block [207] Transaction index [0] TxId [b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2021-10-14 11:05:24.495 UTC [kvledger] commit -> INFO 372 [assetschannel] Committed block [207] with 1 transaction(s) in 36ms (state_validation=0ms block_and_pvtdata_commit=6ms state_commit=29ms) commitHash=[35570558fc04d3dfa400f053f2a0f9bed92ea227c894ae4536990627a5a19036] ``` fabric-sdk logs: ``` 2021-10-14T11:05:24.491Z - warn: [TransactionEventHandler]: strategyFail: commit failure for transaction "b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e": TransactionError: Commit of transaction b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e failed on peer peer1.org1.com:7051 with status ENDORSEMENT_POLICY_FAILURE 2021-10-14T11:05:24.491Z - warn: [TransactionEventHandler]: strategyFail: commit failure for transaction "b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e": TransactionError: Commit of transaction b13b21ddd0cb351b93b47ccc556ea4b62bf41abd3a23a3734d56304c91e6066e failed on peer peer1.org1.com:7051 with status ENDORSEMENT_POLICY_FAILURE ```

akshay.sood (Thu, 14 Oct 2021 11:13:18 GMT):
I have also posted this question on stackoverflow: https://stackoverflow.com/questions/69569688/key-level-endorsement-policy-is-not-fully-functional-in-hyperledger-fabric

bestbeforetoday (Thu, 14 Oct 2021 16:26:43 GMT):
I've answered on StackOverflow

akshay.sood (Fri, 15 Oct 2021 06:51:01 GMT):
Thank you @bestbeforetoday

GeorgePals (Fri, 15 Oct 2021 13:10:15 GMT):
Today I'm trying to implement all of the above, however it seems that I'm doing something wrong. So, - I changed the images that are used by the orderer/peers to: 2.4.0-beta - I also added: `CORE_PEER_GATEWAY_ENABLED` to true as env. variable These were the only things that I found that I had to change. If there is any other thing that I have to do/change in the orderer's/peers' YAML files, can you please provide me with the appropriate configs? Also, I tried to connect with a peer's gateway. But, the Gateway object that is created with `connect({})` is an empty `GatewayImpl` object: `GatewayImpl {}` Do you have any ideas on this, Mark? Thank you!

GeorgePals (Fri, 15 Oct 2021 13:10:15 GMT):
Today I'm trying to implement all of the above, however it seems that I'm doing something wrong. So, - I changed the images that are used by the orderer/peers to: 2.4.0-beta - I also added: `CORE_PEER_GATEWAY_ENABLED` to true as env. variable to every peer These were the only things that I found that I had to change. If there is any other thing that I have to do/change in the orderer's/peers' YAML files, can you please provide me with the appropriate configs? Also, I tried to connect with a peer's gateway. But, the Gateway object that is created with `connect({})` is an empty `GatewayImpl` object: `GatewayImpl {}` Do you have any ideas on this, Mark? Thank you!

GeorgePals (Fri, 15 Oct 2021 13:10:15 GMT):
Today I'm trying to implement all of the above, however it seems that I'm doing something wrong. So, - I changed the images that are used by the orderer/peers to: 2.4.0-beta - I also added: `CORE_PEER_GATEWAY_ENABLED` to true as env. variable to every peer These were the only things that I found that I had to change. If there is any other thing that I have to do/change in the orderer's/peers' YAML files, can you please provide me with the appropriate configs? I, also, tried to connect with a peer's gateway. But, the Gateway object that is created with `connect({})` is an empty `GatewayImpl` object: `GatewayImpl {}` Do you have any ideas on this, Mark? Thank you!

bestbeforetoday (Fri, 15 Oct 2021 13:18:17 GMT):
The connect options must include an `identity` and `client` property. You would typically also include `signer` property but, if you are going to use off-line signing to explicitly sign every interaction, this can be omitted. See the minimal example client at the top page of the API documentation: https://hyperledger.github.io/fabric-gateway/main/api/node/

bestbeforetoday (Fri, 15 Oct 2021 13:19:06 GMT):
There is also a fully working sample here: https://github.com/hyperledger/fabric-gateway/blob/main/samples/node/src/sample.ts

bestbeforetoday (Fri, 15 Oct 2021 13:20:28 GMT):
Those samples don't use the off-line signing flow, but there are code snippets and explanation of the flow in the API documentation: https://hyperledger.github.io/fabric-gateway/main/api/node/interfaces/Contract.html

GeorgePals (Fri, 15 Oct 2021 13:22:45 GMT):
Yup, this is how `connect` is called: ``` const gateway = connect({ client: await this.newGrpcConnection(), identity: await this.newIdentity(certificate), signer: await this.newSigner(privateKey), }); ``` The certificate/privateKey are just .pem encoded strings that I turn into a buffer inside the newIdentity/newSigner functions. I'm just testing for now if the Gateway is okay. Haven't implemented offline signing yet.

GeorgePals (Fri, 15 Oct 2021 13:23:48 GMT):
And the newGrpcConnection function: ``` async newGrpcConnection() { const tlsRootCert = await fs.readFile( "/etc/peertls/organization0-peer0-tls/ca.crt" ); const tlsCredentials = grpc.credentials.createSsl(tlsRootCert); const peerEndpoint = "organization0-peer0:4433"; const GrpcClient = grpc.makeGenericClientConstructor({}, ""); return new GrpcClient(peerEndpoint, tlsCredentials, { "grpc.ssl_target_name_override": "org0-peer0", }); } ```

bestbeforetoday (Fri, 15 Oct 2021 13:26:37 GMT):
The `Gateway` object should have callable methods on it. It does not have any accessible properties though, since it's using ECMAScript private fields

GeorgePals (Fri, 15 Oct 2021 13:28:03 GMT):
Yes, it has `.getNetwork, .getIdentity(), .close()`, however, even if I: `gateway.getNetwork('channelThatExists')`, I end up with an empty network object as well.

GeorgePals (Fri, 15 Oct 2021 13:28:03 GMT):
Yes, it has `.getNetwork(), .getIdentity(), .close()`, however, even if I: `gateway.getNetwork('channelThatExists')`, I end up with an empty network object as well.

bestbeforetoday (Fri, 15 Oct 2021 13:28:43 GMT):
Same deal. All the fields are private a not visible outside the object

bestbeforetoday (Fri, 15 Oct 2021 13:28:54 GMT):
But it will have callable methods

GeorgePals (Fri, 15 Oct 2021 13:33:04 GMT):
I tried to `.submit()` and it worked. The chaincode was actually called. Thank you very much for all your support all this time, Mark.

bestbeforetoday (Fri, 15 Oct 2021 13:33:22 GMT):
:thumbsup:

bestbeforetoday (Fri, 15 Oct 2021 13:34:22 GMT):
Feedback, bug reports or feature requests for fabric-gateway are welcome

GeorgePals (Fri, 15 Oct 2021 13:34:33 GMT):
Of course!

canenas (Mon, 18 Oct 2021 13:21:21 GMT):
I'm looking at a high throughput environment on my test setup where many clients connect and disconnect simultaneously and I notice that memory usage on the peer climbs very quickly occupying most of the ram of the container. I run a multithread application on a pod and I also notice that the ram consumption becomes very high very quickly. It's also visible on the metrics. The number of grpc connectios left open on the peer increases exponentiall.y

canenas (Mon, 18 Oct 2021 13:21:21 GMT):
I'm looking at a high throughput environment on my test setup where many clients connect and disconnect simultaneously and I notice that memory usage on the peer climbs very quickly occupying most of the ram of the container. I run a multithread client application on a pod and I also notice that the ram consumption becomes very high very quickly. It's also visible on the metrics. The number of grpc connectios left open on the peer increases exponentiall.y

canenas (Mon, 18 Oct 2021 13:21:21 GMT):
I'm looking at a high throughput environment on my test setup where many clients connect and disconnect simultaneously and I notice that memory usage on the peer climbs very quickly occupying most of the ram of the container. I run a multithread client application on a pod and I also notice that the ram consumption on th client pod becomes very high very quickly. It's also visible on the metrics. The number of grpc connections left open on the peer increases exponentiall.y

jkneubuhl (Mon, 18 Oct 2021 16:43:10 GMT):
Has joined the channel.

bestbeforetoday (Tue, 19 Oct 2021 09:07:48 GMT):
It would be helpful if you can see which connections are left open, or the client operation that established them. In other words, see which connections are not being closed correctly. And then confirm that dangling peer connections correspond to those client connections.

bestbeforetoday (Tue, 19 Oct 2021 09:10:09 GMT):
It's worth pointing out that good practice would be to not continually open and close connections. You generally want to establish a connection and then perform all your transactional work using the same connection. I appreciate that a client-side Gateway object is tied to a client identity so you do need one Gateway (and associated connections) per client identity

bestbeforetoday (Tue, 19 Oct 2021 13:46:14 GMT):
Also... maybe not so helpful for you as it's still in development and doesn't (yet) offer exactly the feature set of the existing SDKs, but the new Fabric Gateway client API can use a single gRPC connection for a client application, regardless of the number/type of requests made or how many client identities you are using: https://github.com/hyperledger/fabric-gateway

canenas (Wed, 20 Oct 2021 12:08:35 GMT):
Thanks for your answer @bestbeforetoday . Unfortunately the use case is for multiple IoT sensors that would require individual connections & the lifetime of each connection is quite small. Each sensor creates gateway object, connects, discovers the rest of the network, submits a couple of lightweight transactions and then disconnects. I will take a look at fabric-gateway perhaps it is what I need. Although it seems I'll have to upgrade to 2.4 beta.

bestbeforetoday (Wed, 20 Oct 2021 13:02:19 GMT):
It sounds like your use case doesn't suit the client (IoT sensor) maintaining a long-lived connection, so what you're doing is sensible. If resources from those connections is not being freed after they are closed, there might be a bug that needs to be addressed, although runtimes don't always free up memory once they've allocated it for heap use, so memory use not shrinking as connections are closed doesn't necessarily indicate a bug

bestbeforetoday (Wed, 20 Oct 2021 13:06:04 GMT):
One other option you could consider if what you have really isn't working is to have an intermediary that acts as the server for your IoT devices, and also as a client to your Fabric network. So your intermediary is holding a limited number of longer-lived client connections and transacts with Fabric on behalf of the IoT devices as they periodically send in requests

canenas (Wed, 20 Oct 2021 14:03:59 GMT):
I'll take a look and make sure there are no dangling connections. Although I don't expect any. When I had forgotten to actually call gateway.disconnect() after a few hundred connections the simulation was erroring out.

bestbeforetoday (Fri, 22 Oct 2021 09:50:13 GMT):
Node SDK v2.2.10 is release, which updates the version of jsrsasign used to address a security vulnerability, thanks to a contribution from several community members. The vulnerability wasn't in functionality used by the SDK, but it wasn't great for end users to see the vulnerability message, and it's good to be on the latest version of jsrsasign. https://github.com/hyperledger/fabric-sdk-node/releases/tag/v2.2.10

bestbeforetoday (Fri, 22 Oct 2021 09:50:13 GMT):
Node SDK v2.2.10 is released, which updates the version of jsrsasign used to address a security vulnerability, thanks to a contribution from several community members. The vulnerability wasn't in functionality used by the SDK, but it wasn't great for end users to see the vulnerability message, and it's good to be on the latest version of jsrsasign. https://github.com/hyperledger/fabric-sdk-node/releases/tag/v2.2.10

canenas (Fri, 22 Oct 2021 11:14:48 GMT):
@bestbeforetoday it seems you were right. I'm looking at the client and i see far too many dangling connections. The keep increasing for the duration of the experiment. The are stuck in established mode. I've enabled debug mode and I do see network._dispose() being called.

canenas (Fri, 22 Oct 2021 11:14:48 GMT):
@bestbeforetoday it seems you were right. I'm looking at the client and i see far too many dangling connections. They keep increasing for the duration of the experiment. They are stuck in established mode. I've enabled debug mode and I do see network._dispose() being called.

canenas (Fri, 22 Oct 2021 11:17:44 GMT):
it's also very interesting that connection to the discovered nodes closes as expected. I only see connections left open to the peer I'm connecting initially.

canenas (Fri, 22 Oct 2021 11:18:04 GMT):
the peer defined in the connection config file

bestbeforetoday (Fri, 22 Oct 2021 11:28:55 GMT):
It might be there is a bug in cleanup of any connections made when processing the connection profile during client connect. Could you raise an issue with any details you have? https://github.com/hyperledger/fabric-sdk-node/issues

canenas (Fri, 22 Oct 2021 11:38:02 GMT):
sure.

canenas (Fri, 22 Oct 2021 11:38:51 GMT):
I'll try with 2.2.10 just in case.

RonaldReagan (Mon, 25 Oct 2021 06:11:44 GMT):
Hello guys... I used nodesdk 1.4.6 to create my API. How do I make the sdk connect to any random peers ? In the connection profile CLIENT section, I have one ORG defined..so the api seems only to connect to to this ORG.If this ORG is down , no transactions are committed. How can I define multiple clients so that the sdk can select any one client at random? I have 4 other ORGs in the organization section. What can I do to make sure that the sdk can select any random peer to send transactions to. Thanks.

bestbeforetoday (Tue, 26 Oct 2021 08:31:55 GMT):
I would probably enable service discovery in your network and have the client use service discovery to dynamically discover all the available peers (and orderers) in the network

RonaldReagan (Wed, 27 Oct 2021 06:34:19 GMT):
Thanks. I did enable the discovery but am getting the following error:- ` warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G5:0 - endorsement failed - Error: 14 UNAVAILABLE: DNS resolution failed 2021-10-27T06:29:58.864Z - error: [DiscoveryEndorsementHandler]: _endorse - endorsement failed::Error: Endorsement has failed`.

RonaldReagan (Wed, 27 Oct 2021 06:34:19 GMT):
Thanks. I did enable the discovery but am getting the following error:- ` warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G5:0 - endorsement failed - Error: 14 UNAVAILABLE: DNS resolution failed 2021-10-27T06:29:58.864Z - error: [DiscoveryEndorsementHandler]: _endorse - endorsement failed::Error: Endorsement has failed`. I guess it's something do to with DNS resolution, I just don't know what to mess with.

RonaldReagan (Wed, 27 Oct 2021 06:34:19 GMT):
Thanks. I did enable the discovery but am getting the following error:- ` warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G5:0 - endorsement failed - Error: 14 UNAVAILABLE: DNS resolution failed 2021-10-27T06:29:58.864Z - error: [DiscoveryEndorsementHandler]: _endorse - endorsement failed::Error: Endorsement has failed`. I guess it's something do to with DNS resolution, I just don't know what to mess with. I have six nodes running on a bare metal servers all with public ip addresses. The API is running locally on my pc.

RonaldReagan (Wed, 27 Oct 2021 06:34:19 GMT):
Thanks. I did enable the discovery but am getting the following error:- ` warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G5:0 - endorsement failed - Error: 14 UNAVAILABLE: DNS resolution failed 2021-10-27T06:29:58.864Z - error: [DiscoveryEndorsementHandler]: _endorse - endorsement failed::Error: Endorsement has failed`. I guess it's something do to with DNS resolution, I just don't know what to mess with. I have six nodes running on a bare metal servers all with public ip addresses. The API is running locally on my pc. Query transactions all succeed; only invoke transactions produce this error.

bestbeforetoday (Wed, 27 Oct 2021 16:05:28 GMT):
If the configured addresses of the nodes can be resolved in DNS from your client machine, you should be good. Just make sure `discovery.asLocalhost` is set to false in your client connect options: https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.GatewayOptions.html

bestbeforetoday (Wed, 27 Oct 2021 16:06:09 GMT):
It's worth checking your error message to see the peer address it is trying to connect to, and then checking you really can resolve that address on your client machine

bestbeforetoday (Wed, 27 Oct 2021 16:07:37 GMT):
If the address doesn't look like what you're expecting for the public address of the node, probably it's a problem with the node configuration. Unless it's saying `localhost`, in which case likely you have `discovery.asLocalhost` set to `true`

bestbeforetoday (Wed, 27 Oct 2021 16:08:03 GMT):
If the address looks OK, check you really can resolve it from the client

davidfdr (Wed, 27 Oct 2021 21:13:50 GMT):
Has joined the channel.

davidfdr (Wed, 27 Oct 2021 21:13:50 GMT):
Hi! Is there a way to query a transaction ID from a specific Processed Transaction? Find the transaction ID that do some change on the world status?

davidfdr (Wed, 27 Oct 2021 21:13:50 GMT):
Hi! Is there a way to query a transaction ID from a specific Processed Transaction? Find the transaction ID that did some change on the world status?

davidfdr (Wed, 27 Oct 2021 21:13:50 GMT):
Hi! Is there a way to query a transaction ID from a specific Processed Transaction? Find the transaction ID that did some change at the world status?

bestbeforetoday (Thu, 28 Oct 2021 09:07:01 GMT):
Do you want `getHistoryForKey` in the chaincode? https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/fabric-shim.ChaincodeStub.html#getHistoryForKey

davidfdr (Thu, 28 Oct 2021 11:35:08 GMT):
I want to find the TXID of the transaction. getHistoryForKey bring the txid too? Or only the asset history?

GeorgePals (Thu, 04 Nov 2021 21:09:43 GMT):
Would like to apologize about this, but if by any chance you have some time to spare, please @bestbeforetoday , take a look here: https://stackoverflow.com/questions/69845825/queueing-requests-at-the-api-and-offline-signing-hyperledger-fabric Today I tried to bring everything we said together, but it didn't work out.

GeorgePals (Thu, 04 Nov 2021 21:09:43 GMT):
Would like to apologize about this, but if by any chance you have some time to spare, please @bestbeforetoday , take a look here: https://stackoverflow.com/questions/69845825/queueing-requests-at-the-api-and-offline-signing-hyperledger-fabric Today I tried to bring everything we discussed, together, but it didn't work out.

dave.enyeart (Fri, 05 Nov 2021 02:49:58 GMT):
yes, getHistoryForKey will return the txids that wrote to this key, see an example at https://github.com/hyperledger/fabric-samples/blob/main/asset-transfer-ledger-queries/chaincode-go/asset_transfer_ledger_chaincode.go#L380-L424

bestbeforetoday (Fri, 05 Nov 2021 13:54:12 GMT):
Just had a quick skim through it so initial thoughts: 1. I don't know why your "gateway" component (that runs the Fabric client and sends gRPC requests to Fabric) needs to run in React. Maybe this can just be a Node process, maybe providing REST endpoints for your clients to interact with? https://expressjs.com/ 2. On the off-line signing flow, you need to send the digest back to your client for them to generate a signature (i.e. encrypt with their private key). Once you get the signature back you use this and the message bytes to construct a signed proposal using the Contract. You could keep the required contract and message bytes at the server end and reference back to them when processing the client request delivering the signature to you using some kind of token. Or you could return the message bytes, channel name and contract name back to the client. Just the strings, not the Network and Contract objects. Then the client request would need to deliver back to you the signature, message bytes, channel name and contract names so you can proceed with creating the signed proposal and endorsing it

bestbeforetoday (Fri, 05 Nov 2021 13:56:14 GMT):
Or maybe use a persistent connection like a websocket to handle the series of interactions between client and server that do request / sign / endorse / sign / submit / response

davidfdr (Fri, 05 Nov 2021 13:57:52 GMT):
Thanks Dave. It worked very well.

bestbeforetoday (Fri, 05 Nov 2021 14:01:04 GMT):
The CommitStatus request to check whether the transaction committed successfully also needs to be signed but this is just to ensure the client has permission to read data in the ledger so you might prefer to use a "gateway" component identity for that (so just the default automatic signing) rather than get your client to sign that request

bestbeforetoday (Fri, 05 Nov 2021 17:18:04 GMT):
This raises a good question though... can it work without needing to also remember the channel and chaincode name? I think perhaps yes. But I would need to make some tweaks to the API to support that

davidfdr (Fri, 05 Nov 2021 19:49:41 GMT):
Just to know. My error was that i am trying to get the txid using wrong key: jsonRes.TxId = res.value.tx_Id; inside the GetAllResultsMethod. I think I copy this line from other fabric sample. When I saw your link, I manage to correct the code. Thank you very much for your time.

davidfdr (Fri, 05 Nov 2021 19:56:57 GMT):
I manage to find. I used https://github.com/hyperledger/fabric-samples/blob/release-2.2/asset-transfer-ledger-queries/chaincode-javascript/lib/asset_transfer_ledger_chaincode.js. Tehe method getAllResults here has this bug.

bestbeforetoday (Fri, 05 Nov 2021 21:25:47 GMT):
You can raise an issue to report any bugs in the samples here: https://github.com/hyperledger/fabric-samples/issues

bestbeforetoday (Fri, 05 Nov 2021 21:26:35 GMT):
If you know the solution, you could even contribute a PR to fix it too! :wink:

davidfdr (Fri, 05 Nov 2021 21:29:18 GMT):
In main branch the code is correct.

bestbeforetoday (Fri, 05 Nov 2021 21:30:09 GMT):
Ah, that's good to know. Thank you for checking :thumbsup:

bestbeforetoday (Fri, 05 Nov 2021 23:30:42 GMT):
https://github.com/hyperledger/fabric-gateway/issues/301

RonaldReagan (Tue, 09 Nov 2021 00:56:38 GMT):
Hi, Got my discovery working by including the container names and IP addresses in the /etc/hosts file.. BUT the API is still sending all the requests to one org only(the client org). What do you think am missing? I want the API to be able to send the requests to any org in the channel NOT only to the org client is registered with. My endorsement policy is set to any One org in the channel.

GeorgePals (Thu, 11 Nov 2021 12:04:43 GMT):
Sorry for the late reply. Thank you very much for taking my issue into consideration @bestbeforetoday Still, I am not really sure that I understand the procedure. If I'm not mistaken: *Client* A client can now create a signed proposal by doing: gateway = connect( { grpcConnection, identity, signer} ) ``` const proposal = gateway.getNetwork('testNetwork').getContract('testContract).newProposal("something", options) const bytes = proposal.getBytes() const digest = proposal.getDigest() const signedProposal = gateway.newSignedProposal(bytes, digest) ``` and send this signedProposal to the intermediary in order to: *Intermediary* `signedProposal.submit()` it?

GeorgePals (Thu, 11 Nov 2021 12:04:43 GMT):
Sorry for the late reply. Thank you very much for taking my issue into consideration @bestbeforetoday Still, I am not really sure that I understand the procedure. If I'm not mistaken: *Client* A client can now create a signed proposal by doing: ``` gateway = connect( { grpcConnection, identity, signer} ) const proposal = gateway.getNetwork('testNetwork').getContract('testContract).newProposal("something", options) const bytes = proposal.getBytes() const digest = proposal.getDigest() const signedProposal = gateway.newSignedProposal(bytes, digest) ``` and send this signedProposal to the intermediary in order to: *Intermediary* `signedProposal.submit()` it?

GeorgePals (Thu, 11 Nov 2021 12:04:43 GMT):
Sorry for the late reply. Thank you very much for taking my issue into consideration @bestbeforetoday Still, I am not really sure that I understand the procedure. If I'm not mistaken: *Client* A client can now create a signed proposal by doing: ``` gateway = connect( { grpcConnection, identity, signer} ) const proposal = gateway.getNetwork('testNetwork').getContract('testContract).newProposal("something", options) const bytes = proposal.getBytes() const digest = proposal.getDigest() const signedProposal = gateway.newSignedProposal(bytes, digest) ``` and send this signedProposal to the intermediary in order to: *Intermediary* `signedProposal.endorse()` it?

GeorgePals (Thu, 11 Nov 2021 15:28:47 GMT):
I think that this can work: A client can create a "fake" (unusable) gateway instance. E.g. ``` const gatewayClient = connect({ client: {}, identity: await newIdentity(this.identity.credentials.certificate, mspId), signer: newSigner(this.identity.credentials.privateKey), }); ``` As you can see, I don't pass any connect information to it (just an empty `{}`). Then, the client can ``` const proposal = gatewayClient .getNetwork("someChannel") .getContract("someCC") .newProposal("someFunction"); const bytes = proposal.getBytes(); const digest = proposal.getDigest(); const signer = newSigner(this.identity.credentials.privateKey); const signedDigest = await signer(digest); ``` and it can pass the `bytes` and the signed `digest` to the intermediary. Then the intermediary will: ``` const signedProposal = gatewayIntermediary.newSignedProposal(bytes, signedDigest); signedProposal.evaluate() ``` It seems that it works perfectly. The CC is actually invoked.

GeorgePals (Thu, 11 Nov 2021 15:28:47 GMT):
I think that this seems work: A client can create a "fake" (unusable) gateway instance. E.g. ``` const gatewayClient = connect({ client: {}, identity: await newIdentity(this.identity.credentials.certificate, mspId), signer: newSigner(this.identity.credentials.privateKey), }); ``` As you can see, I don't pass any connect information to it (just an empty `{}`). Then, the client can ``` const proposal = gatewayClient .getNetwork("someChannel") .getContract("someCC") .newProposal("someFunction"); const bytes = proposal.getBytes(); const digest = proposal.getDigest(); const signer = newSigner(this.identity.credentials.privateKey); const signedDigest = await signer(digest); ``` and it can pass the `bytes` and the signed `digest` to the intermediary. Then the intermediary will: ``` const signedProposal = gatewayIntermediary.newSignedProposal(bytes, signedDigest); signedProposal.evaluate() ``` It seems that it works perfectly. The CC is actually invoked.

GeorgePals (Thu, 11 Nov 2021 15:28:47 GMT):
I think that this seems to be working: A client can create a "fake" (unusable) gateway instance. E.g. ``` const gatewayClient = connect({ client: {}, identity: await newIdentity(this.identity.credentials.certificate, mspId), signer: newSigner(this.identity.credentials.privateKey), }); ``` As you can see, I don't pass any connect information to it (just an empty `{}`). Then, the client can ``` const proposal = gatewayClient .getNetwork("someChannel") .getContract("someCC") .newProposal("someFunction"); const bytes = proposal.getBytes(); const digest = proposal.getDigest(); const signer = newSigner(this.identity.credentials.privateKey); const signedDigest = await signer(digest); ``` and it can pass the `bytes` and the signed `digest` to the intermediary. Then the intermediary will: ``` const signedProposal = gatewayIntermediary.newSignedProposal(bytes, signedDigest); signedProposal.evaluate() ``` It seems that it works perfectly. The CC is actually invoked.

bestbeforetoday (Fri, 12 Nov 2021 14:22:11 GMT):
Yep, you've got it. There was one typo above where you had: ``` const signedProposal = gateway.newSignedProposal(bytes, digest); ``` You create a signature by encrypting the digest with the signer's private key, which is what you have correctly in the later code snippet

bestbeforetoday (Fri, 12 Nov 2021 14:24:09 GMT):
You can create the proposal entirely at the client end as you are doing, but this will only get you to a working "evaluate". The "submit" flow is more complex and involves several signing steps, so you will need to pass the resulting digest (and bytes) from the intermediary back to the client for signing at each stage

GeorgePals (Fri, 12 Nov 2021 14:25:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=kQ2xJdz3HtcuBuA7n) I'm aware of this. Unfortunately. I'm thinking of, maybe, opening a websocket or something.

bestbeforetoday (Fri, 12 Nov 2021 14:27:00 GMT):
If the client trusts the intermediary to create correct messages then you could send only the digest for the client to sign and keep the message bytes in the intermediary

GeorgePals (Fri, 12 Nov 2021 14:30:24 GMT):
I still have some work to do. Basically, I'm moving the whole infrastructure to an electron app, so I can have both the CA (in order to login the client directly without the need of an intermediary) and the fabric-gateway available at the client. I'll provide you with feedback on how I developed the whole "signing" thing.

GeorgePals (Fri, 12 Nov 2021 14:30:24 GMT):
I still have some work to do. Basically, I'm moving the whole infrastructure to an electron app, so I can have both the CA (in order to login the client directly without the need of an intermediary) and the fabric-gateway available at the client. I'll provide you feedback on how I developed the whole "signing" thing.

bestbeforetoday (Fri, 12 Nov 2021 14:31:30 GMT):
If you don't trust the intermediary to do that you might want to send the message bytes back to the client, where you could unmarshall and inspect those protobufs to ensure they are what you expect

GeorgePals (Fri, 12 Nov 2021 14:36:22 GMT):
Do I need to do anything "special" in order to unmarshal the protobufs? e.g. say that I'm sending a proposal with the payload: "{ animal: "dog" }. I get the proposal endorsed. Then I receive back the endorsed protobufs (?). Does the endorsed message (that's included in the protobufs) include the original message? So I can contrast it with the original message.

GeorgePals (Fri, 12 Nov 2021 14:36:22 GMT):
Do I need to do anything "special" in order to unmarshal the protobufs? e.g. say that I'm sending a proposal with the payload: "{ animal: "dog" }". I get the proposal endorsed. Then I receive back the endorsed protobufs (?). Does the endorsed message (that's included in the protobufs) include the original message? So I can contrast it with the original message.

GeorgePals (Fri, 12 Nov 2021 14:37:33 GMT):
I have no idea how a protobuf is structured, and, unfortunately, I can't test it yet.

bestbeforetoday (Fri, 12 Nov 2021 14:44:59 GMT):
The transaction you sign before it's sent to the orderer contains the original proposal payload with transient data removed, endorsements, read/write sets and some other things like emitted chaincode events

bestbeforetoday (Fri, 12 Nov 2021 14:47:07 GMT):
It is protobuf structure that you can unmarshall using the protobuf definitions at https://github.com/hyperledger/fabric-protos and generated protobuf stubs: https://developers.google.com/protocol-buffers/docs/reference/javascript-generated

bestbeforetoday (Fri, 12 Nov 2021 14:48:39 GMT):
In a browser environment, this protobuf library might (or might not!) work better than the Google protobuf compiled stubs: https://github.com/protobufjs/protobuf.js/

bestbeforetoday (Fri, 12 Nov 2021 14:49:40 GMT):
Unfortunately the Fabric protobuf structures are horribly complex nested structures, and not well documented, so not the easiest things to work with. But you can do it!

GeorgePals (Fri, 12 Nov 2021 14:49:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=RbXapqyASytuX9tTm) As I said, I'll be using Node in the background (cause of Electron), so that shouldn't be an issue.

bestbeforetoday (Fri, 12 Nov 2021 14:50:48 GMT):
It might be easier to stand up a more local intermediary that you trust, or even to just run the whole client locally if you've got a Node environment it can run in

bestbeforetoday (Fri, 12 Nov 2021 14:52:37 GMT):
My usual assumption is that you can trust the intermediary you're using enough to build messages reliably, even if you wouldn't hand over your credentials to them. It's doable if that isn't the case, but not so simple

GeorgePals (Fri, 12 Nov 2021 15:03:47 GMT):
One last question, in case that you know. Who is being seen as the invoker by the chaincodes? The entity that talks with the gateway, or the entity that signs the message? 'Cause, in case that you remember, right now I'm sending to the chaincodes the certificate of the invoker, in order to tell the chaincode that "this is the entity that started the procedure, not me (who talks with the gateway)"

GeorgePals (Fri, 12 Nov 2021 15:03:47 GMT):
One last question, in case that you know. Who is being seen as the invoker by the chaincodes? The entity that talks with the gateway, or the entity that signs the messages? 'Cause, in case that you remember, right now I'm sending to the chaincodes the certificate of the invoker, in order to tell the chaincode that "this is the entity that started the procedure, not me (who talks with the gateway)"

bestbeforetoday (Fri, 12 Nov 2021 15:06:07 GMT):
In the existing Node SDK you can see the the transaction being constructed using stubs generated by protobuf.js: https://github.com/hyperledger/fabric-sdk-node/blob/a2d0f5c93baeac884a31bcf85a1e6a741cb43096/fabric-common/lib/Commit.js#L87-L137

bestbeforetoday (Fri, 12 Nov 2021 15:07:11 GMT):
That is wrapped in en envelope that contains the serialized transaction payload and a signature

bestbeforetoday (Fri, 12 Nov 2021 15:07:11 GMT):
That is wrapped in an envelope that contains the serialized transaction payload and a signature

bestbeforetoday (Fri, 12 Nov 2021 15:11:34 GMT):
Using the fabric-gateway client, the bytes you get back from the Transaction object are a PreparedTransaction, which contains that transaction envelope to be sent to the orderer, the transaction response and some metadata (currently only the transaction ID): https://github.com/hyperledger/fabric-protos/blob/21b5a221face864d41bae3771b388bad74a164fa/gateway/gateway.proto#L204-L212

GeorgePals (Sun, 14 Nov 2021 14:55:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-node?msg=EZ5geTDbfx56YRtEr) Just tested this. As the invoker is seen (by the BC) the entity that signs the proposal (which is expected) and not the entity that talks with the gateway.

bestbeforetoday (Tue, 16 Nov 2021 17:54:07 GMT):
I think I missed that question before. As you've seen, the signer should be the invoking identity to the chaincode, since the proposal originated from them

GeorgePals (Wed, 17 Nov 2021 12:57:12 GMT):
So, the clients can successfully build proposals, sign them, get the endorsed proposal response, sign it as well and commit the transaction. I also tried to access the endorsed proposal bytes in order to verify that that the client signs the correct (endorsed) proposal and that the proposal has not been tampered. However, I'm not that sure of what to check. Here is a sample of the code that will be used in order to check the proposals: ``` function verifyTransactionProposal(originalProposal, transactionProposal) { const asBuffer = (proposal) => { var buf = Buffer.alloc(proposal.byteLength); var view = new Uint8Array(proposal); for (var i = 0; i < buf.length; ++i) { buf[i] = view[i]; } return buf; }; const asBufferProposal = asBuffer(originalProposal.proposalBytes); const asBufferTransactionProposal = asBuffer( transactionProposal.endorsedProposal.transactionBytes ); const originalProposalEnvelope = fabproto6.common.Envelope.decode(asBufferProposal); const transactionProposalEnvelope = fabproto6.common.Envelope.decode( asBufferTransactionProposal ); console.log("Original Proposal: ", originalProposalEnvelope.toJSON()); console.log("Transaction Proposal: ", transactionProposalEnvelope.toJSON()); ``` The `asBuffer` arrow function just turns an Uint8Array into a Buffer. So, I can have access to the Transaction Envelope of the endorsed proposal. What I don't really understand is, how I have access to the Transaction Envelope of the `OriginalProposal`. I mean, the ProposedTransaction has a protos.SignedProposal and not a common.Envelope (as seen here: https://github.com/hyperledger/fabric-protos/blob/21b5a221face864d41bae3771b388bad74a164fa/gateway/gateway.proto#L194-L201) Anyways. So, both the OriginalProposal and the TransactionProposal have the same (hashed?) `payload` field. What is different, is the `signatures` field which, at the TransactionProposal, is a lot bigger in terms of data (and which is totally expected). But, is checking only this field (`payload`), enough? I don't think so. Is there anything you would suggest? Thank you @bestbeforetoday for all of your assistance all this time.

GeorgePals (Wed, 17 Nov 2021 12:57:12 GMT):
So, the clients can successfully build proposals, sign them, get the endorsed proposal response, sign it as well and commit the transaction. I also tried to access the endorsed proposal bytes in order to verify that the client signs the correct (endorsed) proposal and that the proposal has not been tampered. However, I'm not that sure of what to check. Here is a sample of the code that will be used in order to check the proposals: ``` function verifyTransactionProposal(originalProposal, transactionProposal) { const asBuffer = (proposal) => { var buf = Buffer.alloc(proposal.byteLength); var view = new Uint8Array(proposal); for (var i = 0; i < buf.length; ++i) { buf[i] = view[i]; } return buf; }; const asBufferProposal = asBuffer(originalProposal.proposalBytes); const asBufferTransactionProposal = asBuffer( transactionProposal.endorsedProposal.transactionBytes ); const originalProposalEnvelope = fabproto6.common.Envelope.decode(asBufferProposal); const transactionProposalEnvelope = fabproto6.common.Envelope.decode( asBufferTransactionProposal ); console.log("Original Proposal: ", originalProposalEnvelope.toJSON()); console.log("Transaction Proposal: ", transactionProposalEnvelope.toJSON()); ``` The `asBuffer` arrow function just turns an Uint8Array into a Buffer. So, I can have access to the Transaction Envelope of the endorsed proposal. What I don't really understand is, how I have access to the Transaction Envelope of the `OriginalProposal`. I mean, the ProposedTransaction has a protos.SignedProposal and not a common.Envelope (as seen here: https://github.com/hyperledger/fabric-protos/blob/21b5a221face864d41bae3771b388bad74a164fa/gateway/gateway.proto#L194-L201) Anyways. So, both the OriginalProposal and the TransactionProposal have the same (hashed?) `payload` field. What is different, is the `signatures` field which, at the TransactionProposal, is a lot bigger in terms of data (and which is totally expected). But, is checking only this field (`payload`), enough? I don't think so. Is there anything you would suggest? Thank you @bestbeforetoday for all of your assistance all this time.

GeorgePals (Wed, 17 Nov 2021 13:06:19 GMT):
I suspect that the `payload` is the hash of the given arguments that were sent to the chaincode and that can be seen inside the signatures. Do you know if this is true?

GeorgePals (Mon, 22 Nov 2021 09:41:40 GMT):
Hi @bestbeforetoday Any chance that you may have any idea on this? Thanks!

bestbeforetoday (Wed, 24 Nov 2021 09:40:45 GMT):
It isn't just the hash. The transaction envelope contains a signature and payload. The payload is a serialized *common.Payload* protobuf message, which itself contains several layers of serialized (and non-serialized) protobuf messages, which includes the original proposal input, proposal response and endorsements. You can see that transaction envelope payload being built in the existing Node SDK here: https://github.com/hyperledger/fabric-sdk-node/blob/85e877cf7e3bacbeb9c045648ab4523fbfe903b4/fabric-common/lib/Commit.js#L71-L137

bestbeforetoday (Wed, 24 Nov 2021 09:45:00 GMT):
The protobuf structures are fiendishly (unnecessarily?) complex and it would be great if the people who developed it could have produced more thorough documentation, but the best I know of (outside just looking at the implementation code) is in the protobuf definitions: https://github.com/hyperledger/fabric-protos/blob/main/peer/transaction.proto

bestbeforetoday (Thu, 25 Nov 2021 16:45:45 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 - https://www.npmjs.com/package/@hyperledger/fabric-gateway

bestbeforetoday (Thu, 25 Nov 2021 17:37:54 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

s.vahidi (Mon, 29 Nov 2021 13:01:59 GMT):
Has joined the channel.

neetusharma (Sun, 16 Jan 2022 09:03:27 GMT):
Has joined the channel.

neetusharma (Sun, 16 Jan 2022 09:03:28 GMT):
Am getting error- 2022.01.13-19:58:17.738 error [caliper] [connectors/v1/FabricGateway] Failed to perform submit transaction [addDrug] using arguments [drugName,serialNo,mfgDate,expDate,companyCRN], with error: Error: No event hubs for strategy. Plz suggest something . I attached the screenshots of caliper logs, workmodule and chaincode function that i want to test

neetusharma (Sun, 16 Jan 2022 09:04:35 GMT):

Screenshot from 2022-01-14 18-55-34.png

neetusharma (Sun, 16 Jan 2022 09:04:56 GMT):

Screenshot from 2022-01-14 18-55-34.png

neetusharma (Sun, 16 Jan 2022 09:05:11 GMT):

Screenshot from 2022-01-14 18-55-34.png

bestbeforetoday (Sun, 16 Jan 2022 09:36:25 GMT):
It looks like you are using Node SDK v1.4, which is no longer supported. But that error occurs if there are no peers in your client identity's organisation

bestbeforetoday (Sun, 16 Jan 2022 09:37:49 GMT):
You can select a different event handler strategy in the Gateway connect options to use all network peers instead

neetusharma (Sun, 16 Jan 2022 12:17:41 GMT):
Yes am using using fabric SDK 1.4, which version is supported by caliper

neetusharma (Sun, 16 Jan 2022 12:51:48 GMT):

Screenshot from 2022-01-16 18-20-24.png

neetusharma (Sun, 16 Jan 2022 12:56:35 GMT):
U can see message"No valid responses from any peers", So as per my understanding, there is no issue of discovering peers. I think am doing some mistake in putting addDrug function in caliper workmodule. Plz help me to figure out the issue.

neetusharma (Mon, 17 Jan 2022 07:09:45 GMT):
It would be great if someone help me to figure out the issue

bestbeforetoday (Tue, 18 Jan 2022 09:35:45 GMT):
That's a different error to the one you posted earlier. This one says it couldn't invoke the transaction function because the `pharmanet` chaincode failed to start. I don't know why that is

jkalwar (Tue, 25 Jan 2022 07:40:53 GMT):
Has joined the channel.

barankilic (Fri, 28 Jan 2022 09:32:01 GMT):
Hi! How can I get block timestamp for Fabric? For example, in Ethereum, it can be obtained with getBlock() https://eth.wiki/json-rpc/API#eth_getblockbyhash and then getting the "timestamp" field. For Bitcoin, it can be obtained with getBlock() https://developer.bitcoin.org/reference/rpc/getblock.html and then getting the "time" field. In these blockchains, the transactions have the timestamp of the block. It can be thought like all of the transactions in the same block are executed at the time one after another taking into account the transaction order. It is the same for Fabric?

barankilic (Fri, 28 Jan 2022 09:41:33 GMT):
I also need to add that my question is regarding reading (or listening) the ledger. It is not about submitting transactions.

bestbeforetoday (Fri, 28 Jan 2022 11:25:51 GMT):
Transactions within a block contain a timestamp, but this is the time the proposal was created by the client (proposer), not the time the transaction was endorsed or comitted

bestbeforetoday (Fri, 28 Jan 2022 11:25:51 GMT):
Transactions within a block contain a timestamp, but this is the time the proposal was created by the client (proposer), not the time the transaction was endorsed or committed

bestbeforetoday (Fri, 28 Jan 2022 11:27:41 GMT):
The block doesn't have a timestamp, just a block number. Here is an issue for adding a timestamp to the block header, but it's been there a long time with no resolution and hasn't (as far as I know) made it over to GitHub where issues are now tracked: https://jira.hyperledger.org/browse/FAB-15584

bestbeforetoday (Fri, 28 Jan 2022 11:31:11 GMT):
If it's needed then I'd suggest raising an issue with a supporting use case that articulates the value: https://github.com/hyperledger/fabric/issues

barankilic (Fri, 28 Jan 2022 14:36:29 GMT):
Thank you @bestbeforetoday for the detailed description.

gentios (Mon, 07 Feb 2022 21:51:02 GMT):
Hi Everyone, can someone help me out why this code https://github.com/hyperledger/blockchain-explorer/blob/fa20bd950f9c4d90ff8260f7b2ed55c6309793b3/app/platform/fabric/gateway/FabricGateway.ts#L240 calls my fabric-ca-server few times and it fails with an error: ``` [2022-02-07T21:39:25.122] [ERROR] FabricGateway - Error instantiating FabricCAServices Error: fabric-ca request register failed with errors [[ { code: 0, message: "Registration of 'master10' failed: Identity 'master10' is already registered" } ]] at IncomingMessage. (/opt/explorer/node_modules/fabric-ca-client/lib/FabricCAClient.js:298:19) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1201:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) { result: '', errors: [ { code: 0, message: "Registration of 'master10' failed: Identity 'master10' is already registered" } ], messages: [], success: false } ``` However at the very first attempt everything is `200`

gentios (Mon, 07 Feb 2022 21:51:02 GMT):
Hi Everyone, can someone help me out why this code https://github.com/hyperledger/blockchain-explorer/blob/fa20bd950f9c4d90ff8260f7b2ed55c6309793b3/app/platform/fabric/gateway/FabricGateway.ts#L240 calls my `fabric-ca-server` multiple times and it fails with an error: ``` [2022-02-07T21:39:25.122] [ERROR] FabricGateway - Error instantiating FabricCAServices Error: fabric-ca request register failed with errors [[ { code: 0, message: "Registration of 'master10' failed: Identity 'master10' is already registered" } ]] at IncomingMessage. (/opt/explorer/node_modules/fabric-ca-client/lib/FabricCAClient.js:298:19) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1201:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) { result: '', errors: [ { code: 0, message: "Registration of 'master10' failed: Identity 'master10' is already registered" } ], messages: [], success: false } ``` However at the very first attempt everything is `200`

bestbeforetoday (Tue, 08 Feb 2022 10:20:02 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

bh4rtp (Wed, 09 Feb 2022 06:54:42 GMT):
Can I use HsmX509Provider simultaneously in multiple applications?

bestbeforetoday (Tue, 15 Feb 2022 10:33:36 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

rjones (Tue, 22 Mar 2022 19:52:43 GMT):

rjones (Tue, 22 Mar 2022 19:52:43 GMT):